From bunk@fs.tum.de Sun Aug 1 07:28:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 07:28:20 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i71ESAPm020056 for ; Sun, 1 Aug 2004 07:28:13 -0700 Received: (qmail 28287 invoked from network); 1 Aug 2004 14:20:58 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 1 Aug 2004 14:20:58 -0000 Date: Sun, 1 Aug 2004 16:27:59 +0200 From: Adrian Bunk To: Marcelo Tosatti , Stephen Hemminger Cc: linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: [2.4 patch] CONFIG_NET_SCH_NETEM Configure.help entry Message-ID: <20040801142759.GQ2746@fs.tum.de> References: <20040731142658.GA6497@logos.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040731142658.GA6497@logos.cnet> User-Agent: Mutt/1.5.6i X-archive-position: 7388 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev On Sat, Jul 31, 2004 at 11:26:59AM -0300, Marcelo Tosatti wrote: >... > Summary of changes from v2.4.27-rc3 to v2.4.27-rc4 > ============================================ >... > Stephen Hemminger: > o [PKT_SCHED]: Update to network emulation QOS scheduler > o [PKT_SCHED]: One small netem fixes > o [BRIDGE]: Fix assertion failure in 2.4.27-rc3 > o [PKT_SCHED]: netem update for 2.4 >... The Configure.help entry was forgotten: Signed-off-by: Adrian Bunk --- linux-2.4.27-rc4-full/Documentation/Configure.help.old 2004-08-01 16:20:15.000000000 +0200 +++ linux-2.4.27-rc4-full/Documentation/Configure.help 2004-08-01 16:22:23.000000000 +0200 @@ -10949,13 +10949,15 @@ whenever you want). If you want to compile it as a module, say M here and read . -Network delay simualtor -CONFIG_NET_SCH_DELAY - Say Y if you want to delay packets by a fixed amount of - time. This is often useful to simulate network delay when +CONFIG_NET_SCH_NETEM + Say Y if you want to emulate network delay, loss, and packet + re-ordering. This is often useful to simulate networks when testing applications or protocols. - - This code is also available as a module called sch_delay.o + + To compile this driver as a module, choose M here: the module + will be called sch_netem. + + If unsure, say N. Ingress Qdisc CONFIG_NET_SCH_INGRESS From bunk@fs.tum.de Sun Aug 1 07:33:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 07:33:22 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i71EXG3b020415 for ; Sun, 1 Aug 2004 07:33:17 -0700 Received: (qmail 28500 invoked from network); 1 Aug 2004 14:26:05 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 1 Aug 2004 14:26:05 -0000 Date: Sun, 1 Aug 2004 16:33:07 +0200 From: Adrian Bunk To: Stephen Hemminger Cc: linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: [2.6 patch] update NET_SCH_NETEM help text Message-ID: <20040801143307.GR2746@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7389 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev The patch below contains the following changes for the NET_SCH_NETEM help text: - correct the module name - "If unsure, say N." Signed-off-by: Adrian Bunk --- linux-2.6.8-rc2-mm1-full/net/sched/Kconfig.old 2004-08-01 16:28:22.000000000 +0200 +++ linux-2.6.8-rc2-mm1-full/net/sched/Kconfig 2004-08-01 16:29:12.000000000 +0200 @@ -207,19 +207,21 @@ config NET_SCH_NETEM tristate "Network emulator" depends on NET_SCHED help Say Y if you want to emulate network delay, loss, and packet re-ordering. This is often useful to simulate networks when testing applications or protocols. To compile this driver as a module, choose M here: the module - will be called sch_delay. + will be called sch_netem. + + If unsure, say N. config NET_SCH_INGRESS tristate "Ingress Qdisc" depends on NET_SCHED help If you say Y here, you will be able to police incoming bandwidth and drop packets when this bandwidth exceeds your desired rate. If unsure, say Y. From rddunlap@osdl.org Sun Aug 1 10:43:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 10:43:44 -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 i71HhbY4027638 for ; Sun, 1 Aug 2004 10:43:38 -0700 Received: from dragon.pdx.osdl.net (dragon.pdx.osdl.net [172.20.1.27]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i71HhP116814; Sun, 1 Aug 2004 10:43:26 -0700 Date: Sun, 1 Aug 2004 10:22:47 -0700 From: "Randy.Dunlap" To: bruce@it.usyd.edu.au (Bruce Janson) Cc: netdev Subject: Re: 2.6.7 kernel boot-time configuration of a non-modular tulip driver Message-Id: <20040801102247.33363e99.rddunlap@osdl.org> In-Reply-To: <200407311521.i6VFLcOC022100@nlp0.cs.usyd.edu.au> References: <200407311521.i6VFLcOC022100@nlp0.cs.usyd.edu.au> Organization: OSDL X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: +5V?h'hZQPB9kW Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7390 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 (moving this to netdev mailing list) On Sun, 01 Aug 2004 00:48:22 +1000 Bruce Janson wrote: | I have a linux 2.6.7 kernel which contains a compiled-in tulip driver. | I would like to be able to boot the kernel with parameters that | will allow control of the tulip device. On some ethernet devices | this used to be possible via (something like): | | ether=0,0,1,0,eth0 | | which would pass the four numeric parameters (as, I think, dev->irq, | dev->ioaddr, dev->mem_start and dev->mem_end) to the net driver that | controlled eth0. A convention adopted by some net drivers then allowed | dev->mem_start to be interpretted as a set of flags that would control | device characteristics (e.g. full-duplex vs half-duplex mode). | In .../linux-2.6.7/drivers/net/tulip/tulip_core.c:1587: | | if (dev->mem_start & MEDIA_MASK) | tp->default_port = dev->mem_start & MEDIA_MASK; | | suggests that this might still work. However, I have been unable | to force dev->mem_start in that driver to become non-zero via any | kernel boot-time parameters. My limited understanding of the code | that precedes the above lines in that file suggests that the "dev" | structure is not what it used to be... The driver never calls netdev_boot_setup_check(), which is what would give the driver its command line parameters. Did this work in early 2.6.x? There have been several changes in this area. The driver can't do a simple call to netdev_boot_setup_check() because that will overwrite dev-> {irq, base_addr, mem_start, mem_end}, and those values come from PCI config space for PCI drivers. The driver could create a fake for that purpose, but it's more likely that ethtool or mii-tool should be used to change media/speed etc... Although now that I look at the driver source code, I don't see ethtool or mii-tool support for those options. | ../linux-2.6.7/Documentation/kernel-parameters.txt:402 still | mentions "ether=..." but marks it as obsolete, replaced by | the equivalent "netdev=...". Elsewhere in that file, the entry | for "netdev=..." describes what appears to be the functionality | that I seek. | | So, is it still possible to perform the same sort of control | operations on a tulip driver via kernel boot-time parameters | as one can do via module load-time parameters? If so, how? The current tulip-core driver supports setting only the default transceiver (media type) on the kernel boot/command line when the driver is built into the kernel image (using mem_start, as you noted above). When modular, it supports that plus forcing full duplex and MTU for jumbo frames. Anyone have more definite answers on this? -- ~Randy From kaber@trash.net Sun Aug 1 10:51:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 10:51:44 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i71HpYw8028091 for ; Sun, 1 Aug 2004 10:51:35 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 74DC919F353; Sun, 1 Aug 2004 19:51:25 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id B89CB3940EE; Sun, 1 Aug 2004 19:51:20 +0200 (CEST) Message-ID: <410D2E30.2050104@trash.net> Date: Sun, 01 Aug 2004 19:53:52 +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: Tomasz Paszkowski Cc: "David S. Miller" , hadi@cyberus.ca, devik@cdi.cz, netdev@oss.sgi.com Subject: Re: Fw: hfsc and huge set of rules References: <20040729211844.61e8d328.davem@redhat.com> <410A2449.3020701@trash.net> <20040730110815.GA7812@krezus.e-wro.net> In-Reply-To: <20040730110815.GA7812@krezus.e-wro.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7391 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 Tomasz Paszkowski wrote: >On Fri, Jul 30, 2004 at 12:34:49PM +0200, Patrick McHardy wrote: > > >>hfsc_destroy_qdisc takes O(n) time wrt. the number of classes, >>but 5-6 seconds is still long. If all these classes contain inner >>qdiscs other than the default, I guess removing the classes from >>dev->qdisc_list in qdisc_destroy takes up most of the time, with >>n O(n) operations. The __qdisc_destroy rcu callback also calls >>reset before destroy, I don't know any qdisc where this is really >>neccessary. Without inner qdiscs, I need to see the script first to >>judge what's going wrong. Tomasz ? >> >> > >http://www.e-wro.pl/~acid/tc.batch.gz. In my opinion it's not the case >of expensive algorithms, but the number of classes. With this rule set loaded >(tc -b tc.batch) command: > >for i in 'e1.903 e0.930 e0.931 e0.932' ; do > tc qdisc del dev ${i} root >done >completly freezes machine for about 5-6 seconds. > > I've done some profiles with your script (on an old kernel without the lockless loopback patch), qdisc_destroy takes up 89% of the time when destroying the qdiscs. These are the exact results: - execute the script on unpatched kernel: time: real 2m28.822s user 0m2.347s sys 2m25.395s top 5 in profile: 799773 65.4986 vmlinux vmlinux qdisc_lookup 199964 16.3763 vmlinux vmlinux qdisc_destroy 92504 7.5758 sch_hfsc.ko sch_hfsc hfsc_adjust_levels 36722 3.0074 sch_hfsc.ko sch_hfsc hfsc_get_class 12471 1.0213 vmlinux vmlinux mark_offset_tsc - execute the script on kernel using double-linked lists for dev->qdisc_list: time: real 0m51.804s user 0m2.286s sys 0m48.795s top 5 in profile: 201152 49.6049 vmlinux vmlinux qdisc_lookup 92706 22.8617 sch_hfsc.ko sch_hfsc hfsc_adjust_levels 37140 9.1589 sch_hfsc.ko sch_hfsc hfsc_get_class 12310 3.0357 sch_hfsc.ko sch_hfsc hfsc_bind_tcf 12190 3.0061 sch_hfsc.ko sch_hfsc hfsc_change_class - destroy the qdiscs on unpatched kernel: time: real 0m13.258s user 0m0.019s sys 0m13.206s top 5 in profile: 29839 89.5367 vmlinux vmlinux qdisc_destroy 1229 3.6878 sch_hfsc.ko sch_hfsc hfsc_reset_class 338 1.0142 vmlinux vmlinux mark_offset_tsc 289 0.8672 vmlinux vmlinux qdisc_reset 287 0.8612 sch_hfsc.ko sch_hfsc rtsc_init - destroy the qdiscs on kernel using double-linked lists for dev->qdisc_list: time: real 0m0.389s user 0m0.019s sys 0m0.363s top 5 in profile: 1261 33.6896 sch_hfsc.ko sch_hfsc hfsc_reset_class 311 8.3088 sch_hfsc.ko sch_hfsc rtsc_init 277 7.4005 vmlinux vmlinux qdisc_reset 187 4.9960 vmlinux vmlinux free_block 181 4.8357 vmlinux vmlinux kfree So double-linked lists clearly solve your problem. Using a hash would speed up creating the qdiscs even more, but it wastes too much memory in my opinion. I'm going to send a patch after I've fixed the other problems with qdisc_destroy. >I was trying do modify the code od hfsc_qdisc_destroy scheduling another >task using schedule_task (), but i don't have enough knowledge to do deal >with proper locking of qdisc structures. > > That doesn't work, hfsc_qdisc_destroy is called under a lock. Regards Patrick From kaber@trash.net Sun Aug 1 10:53:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 10:53:51 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i71HrkLp028447 for ; Sun, 1 Aug 2004 10:53:46 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 7A7C519F353; Sun, 1 Aug 2004 19:53:37 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id D39343940EE; Sun, 1 Aug 2004 19:53:32 +0200 (CEST) Message-ID: <410D2EB4.1060205@trash.net> Date: Sun, 01 Aug 2004 19:56:04 +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: devik Cc: "David S. Miller" , hadi@cyberus.ca, netdev@oss.sgi.com, tomasz.paszkowski@e-wro.pl Subject: Re: Fw: hfsc and huge set of rules References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7392 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 devik wrote: >Also IIRC class lookup is done before each remove. With >hashing size a few tens of buckets the complexity >starts to be very near to O(n^2). > > I think the hash size of HTB, HFSC and CBQ should be increased, the hash function performs well even with 2^16. With HFSC using many classes doesn't scale well right now, but with the rbtree patches it will. Regards Patrick >devik > >On Fri, 30 Jul 2004, Patrick McHardy wrote: > > > >>David S. Miller wrote: >> >> >>>Looks like qdisc destruction has some expensive algorithms. >>>Any quick ideas about the root culprit at least in the hfsc >>>case? He says htb does it too. >>> >>> >>hfsc_destroy_qdisc takes O(n) time wrt. the number of classes, >>but 5-6 seconds is still long. If all these classes contain inner >>qdiscs other than the default, I guess removing the classes from >>dev->qdisc_list in qdisc_destroy takes up most of the time, with >>n O(n) operations. The __qdisc_destroy rcu callback also calls >>reset before destroy, I don't know any qdisc where this is really >>neccessary. Without inner qdiscs, I need to see the script first to >>judge what's going wrong. Tomasz ? >> >> From JDrabb@tampabay.rr.com Sun Aug 1 11:15:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 11:16:01 -0700 (PDT) Received: from ms-smtp-03.tampabay.rr.com (ms-smtp-03-smtplb.tampabay.rr.com [65.32.5.133]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i71IFrin029245 for ; Sun, 1 Aug 2004 11:15:54 -0700 Received: from [192.168.1.101] (189-66.35-65.tampabay.rr.com [65.35.66.189]) by ms-smtp-03.tampabay.rr.com (8.12.10/8.12.7) with ESMTP id i71IFgfP011721; Sun, 1 Aug 2004 14:15:42 -0400 (EDT) Message-ID: <410D3377.3030505@tampabay.rr.com> Date: Sun, 01 Aug 2004 14:16:23 -0400 From: James Drabb User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com CC: c-d.hailfinger.kernel.2004@gmx.net, manfred@colorfullife.com Subject: forcedeth Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-archive-position: 7393 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: JDrabb@tampabay.rr.com Precedence: bulk X-list: netdev I am having some issues with the forcedeth driver. jim@keelie $ modinfo forcedeth parm: max_interrupt_work:forcedeth maximum events handled per interrupt author: Manfred Spraul description: Reverse Engineered nForce ethernet driver license: GPL vermagic: 2.6.7-1 686 REGPARM gcc-3.3 depends: alias: pci:v000010DEd000001C3sv*sd*bc*sc*i* alias: pci:v000010DEd00000066sv*sd*bc*sc*i* alias: pci:v000010DEd000000D6sv*sd*bc*sc*i* jim@keelie $ uname -a Linux keelie 2.6.7-1 #1 Thu Jul 22 11:42:58 CEST 2004 i686 athlon i386 GNU/Linux My system is an Athlon XP 2800+, on an MSI K7N2 Delta Mobo based on the NForce 2 chipset. I have a dual boot with WinXP and Fedora Core 2 and spend 99% of my time in FC2. Once in a while I shut the system down. When I boot from a cold boot right into FC2, the forcedeth driver appears not to work. I am not able to get to the net over my cable mode. Bringing eth0 up and down, unplugging the network cable does nothing. However, if I reboot into WinXP, and then reboot right away back into FC2, the forcedeth driver works like a champ. Is there anything I can do to look into what might be causing this issue? Any more information I may be able to send to help? Thanks for any help, -- James Drabb Senior Programmer Davenport, FL USA From scarfboy@gmail.com Sun Aug 1 12:03:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 12:03:43 -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 i71J3ajP030662 for ; Sun, 1 Aug 2004 12:03:37 -0700 Received: by mproxy.gmail.com with SMTP id 73so103371rnk for ; Sun, 01 Aug 2004 12:03:32 -0700 (PDT) Received: by 10.38.181.17 with SMTP id d17mr222682rnf; Sun, 01 Aug 2004 12:03:32 -0700 (PDT) Message-ID: Date: Sun, 1 Aug 2004 21:03:32 +0200 From: Bart Alewijnse To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: gigabit trouble In-Reply-To: <20040731231836.A31121@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_60_22762740.1091387012317" References: <20040729210401.A32456@electric-eye.fr.zoreil.com> <20040730205412.A15669@electric-eye.fr.zoreil.com> <20040730234120.A15536@electric-eye.fr.zoreil.com> <20040731231836.A31121@electric-eye.fr.zoreil.com> X-archive-position: 7394 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scarfboy@gmail.com Precedence: bulk X-list: netdev ------=_Part_60_22762740.1091387012317 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, 31 Jul 2004 23:18:36 +0200, Francois Romieu wrote: > > Right, both computers now run 2.6.8-rc2-mm1. It's better. Roughly > > speaking, the top *benchmark* speeds, rouding slightly up, are: > > udp: 33MB/s (using ~26Kints) one way, 12MB/s (9Kints/s) the other, > > tcp: 22MB/s (16Kints)one way, 12MB/s (9Kints/s) the other. > > > > (The 9Kints ca be 12 when the packet size is 1K or 2K) > > Can you give a try to a napi version of the module (it is a compile-time > option) ? > You may want higher {r/w}mem_max as well as renicing ksoftirqd with > a strongly < 0 value on the celeron client. That's with NAPI on both. I notice r/wmem has an effect, but it's not much. Although on my new computer it seems moot as there's something weird going on with interrupts with my botherboard. > > Oddly enough, the slow direction is sending from my new computer > > (XP1700, KT333, 1GB ram) to my old (both running linux and the > > mentioned kernel). I'm fairly sure this is due to the fact that my > > The r8169 driver has been reported to be faster on Rx than on Tx so your > observation makes sense. How does that make sense? When one side receives, the other sends, hrm? They're two identical cards, it should be entirely symmetrical assuming equal hardware - not faster on the years older hardware. > [...] > > I guess I'll have to settle for this. I'm just annoyed that the 'giga' > > is basically a joke, especially on my setup. > > It should be possible to make things slightly better for the celeron box > as a client. I'll cook up a patch. The celeron box is the server, that's the entire point. Anyhow, it's much faster in transmission than my new computer right now due to said mobo problem, so I *want* it as the server. > Would you be kind enough to do some ftp transfer test where the celeron > box retrieves data and send the 'vmstat 1' output of the client during > the test ? Sure, but I can tell you right now with reasonable certaintly that my new computer won't top 9000interrupts/sec, i.e. 9000 packets per second, and therefore do the 12MB/s at most, and probably less; interruptwise, my new computer is the bottleneck, and I'm guessing UDP is faster because TCP is limited by the amount of packets, or in the other direction ACKs, it can send per second. Transfers to the celeron are a relatively pointless measure because of my new computer being horribly interrupt limited at the moment. That may have started when I installed the gbit card, but mostly because it disturbs the mobo's precious and unguessable hardware balance. I'll try figuring out if I can solve it, but basically it just involves swapping around cards until it works better, so that'ld take a while. Attached are the vmstats for an ftp and nfs transfer, as measured from my old computer (the nfs and ftp server). Both were going at a pretty low speed, sub-9000 packets; this may have to do with drive fragmentation, my hard drives are rather full at the moment. Also, the logs on the client (my new computer) while sending data to my old one. These were made at a different time, and I believe the transfer rate was better (6MB for ftp, 9MB for nfs) than for the -to-old- logs, which were worse, and varied more. --Bart ------=_Part_60_22762740.1091387012317 Content-Type: application/octet-stream; name="ftp-put-to-old-computer__lin-mm-to-lin-mm_larger" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ftp-put-to-old-computer__lin-mm-to-lin-mm_larger" cHJvY3MgLS0tLS0tLS0tLS1tZW1vcnktLS0tLS0tLS0tIC0tLXN3YXAtLSAtLS0tLWlvLS0tLSAt LXN5c3RlbS0tIC0tLS1jcHUtLS0tCiByICBiICAgc3dwZCAgIGZyZWUgICBidWZmICBjYWNoZSAg IHNpICAgc28gICAgYmkgICAgYm8gICBpbiAgICBjcyB1cyBzeSBpZCB3YQogMSAgMCAgICAgIDAg IDQ4NTMyICAyOTY0OCAxNzU0NjQgICAgMCAgICAwICAgMTAxICAgIDMxICAyNzMgICAxNjkgMTUg IDIgODAgIDIKIDAgIDAgICAgICAwICA0ODUzMiAgMjk2NDggMTc1NDY4ICAgIDAgICAgMCAgICAg MCAgICAgMCAxMDA3ICAgICA5ICAwICAxIDk5ICAwCiAxICAwICAgICAgMCAgNDU3OTYgIDI5NjQ4 IDE3ODIxMiAgICAwICAgIDAgICAgIDAgICAgIDAgMjg3MyAgICAzNSAgMiAzMyA2NSAgMAogMSAg MCAgICAgIDAgIDM5MjE2ICAyOTY0OCAxODQ1MzIgICAgMCAgICAwICAgICAwICAgICAwIDUxMzEg ICAgMzYgI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gOTYgIDYgOTQgIDAgIDAKIDEgIDEgICAgICAwICAgMjY2NCAgMjgzNjggMjI2NDgw ICAgIDAgICAgMCAgICAgMCAxOTI2NCAzMjYxICAgIDQ0ICA2IDk0ICAwICAwCiAxICAxICAgICAg MCAgIDI0NzYgIDI4Mjg4IDIyNjczMiAgICAwICAgIDAgICAgIDAgMTYxODQgMjEyNCAgIDI1MiAg NyA5MyAgMCAgMAogMSAgMCAgICAgIDAgICAyOTIwICAyODA1NiAyMjY5NjggICAgMCAgICAwICAg ICAwICAgNTM2IDM4OTggICAgNjcgIDcgOTMgIDAgIDAKIDEgIDAgICAgICAwICAgMjgwNCAgMjc2 OTYgMjI3NzAwICAgIDAgICAgMCAgICAgMCAgICAgOCA1ODYzICAgIDUzICA2IDk0ICAwICAwCiAx ICAwICAgICAgMCAgIDI5ODQgIDI3NTA0IDIyNzkyOCAgICAwICAgIDAgICAgIDAgICAgIDggNTky OSAgICA3MCAgNyA5MyAgMCAgMAogMSAgMCAgICAgIDAgICAyOTIwICAyNzAwOCAyMjg2NDggICAg MCAgICAwICAgICAwICAgICA0IDU5NDkgICAgNTMgIDkgOTEgIDAgIDAKIDEgIDAgICAgICAwICAg MjQwOCAgMjY4NDAgMjI5NDY4ICAgIDAgICAgMCAgICAgMCAgMTQzNiA1NTQzICAgIDUwICA2IDk0 ICAwICAwCiAyICAwICAgICAgMCAgIDI3OTIgIDI2ODA4IDIyODU2MCAgICAwICAgIDAgICAgIDAg MzU1MzIgMzY4NSAgICA0NiAgOCA5MiAgMCAgMAogMSAgMSAgICAgIDAgICAzMDY0ICAyNjcxNiAy Mjg5MTYgICAgMCAgICAwICAgICAwICAgICAwIDIwODUgICAyMTcgIDggOTIgIDAgIDAKIDEgIDAg ICAgICAwICAgMjk4NCAgMjY1MjAgMjI5NTcyICAgIDAgICAgMCAgICAgMCAgIDE2MCAzNzUxICAg IDY5ICA2IDk0ICAwICAwCiAxICAwICAgICAgMCAgIDI1MzYgIDI2MzUyIDIzMDM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zIHN5IGlkIHdhCiAxICAwICAgICAgMCAxNzg1MTYgIDE4OTg0 ICA2MzY3NiAgICAwICAgIDAgICAgIDAgICAgIDAgMTAwOSAgICAxMiAgMCAzMyA2NyAgMAogMCAg MCAgICAgIDAgMTc3NTcyICAyMDE4MCAgNjM2ODAgICAgMCAgICAwICAgIDQ4ICAxMTkyIDEwMzMg ICAgNzMgIDEgIDQgNzAgMjUKIDAgIDAgICAgICAwIDE3NzU3MiAgMjAxODAgIDYzNjgwICAgIDAg ICAgMCAgICAgMCAgICAgMCAxMDA4ICAgIDEwICAwICAwIDEwMCAgMAogMCAgMCAgICAgIDAgMTc3 ODkyICAyMDIxNiAgNjM2ODAgICAgMCAgICAwICAgICAwICAxMTI0IDEyMjQgICAgMzkgIDAgIDMg NDAgNTcKIDAgIDAgICAgICAwIDE3Nzg5MiAgMjAyMTYgIDYzNjg0ICAgIDAgICAgMCAgICAgMCAg ICAgMCAxMDY3ICAgIDEzICAwICAxIDg1IDE0CiAwICAwICAgICAgMCAxNzc4OTIgIDIwMjIwICA2 MzY4OCAgICAwICAgIDAgICAgIDggICAgIDAgMTAxMSAgICAxNiAgMCAgMCA5OSAgMQo= ------=_Part_60_22762740.1091387012317 Content-Type: application/octet-stream; name="nfs-to-old-computer__lin-mm-to-lin-mm" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="nfs-to-old-computer__lin-mm-to-lin-mm" cHJvY3MgLS0tLS0tLS0tLS1tZW1vcnktLS0tLS0tLS0tIC0tLXN3YXAtLSAtLS0tLWlvLS0tLSAt LXN5c3RlbS0tIC0tLS1jcHUtLS0tCiByICBiICAgc3dwZCAgIGZyZWUgICBidWZmICBjYWNoZSAg IHNpICAgc28gICAgYmkgICAgYm8gICBpbiAgICBjcyB1cyBzeSBpZCB3YQogMSAgMCAgICAgIDAg MTc4MjQwICAyMDM2MCAgNjM2ODggICAgMCAgICAwICAgMTAxICAgIDMzICAyNzYgICAxNjkgMTUg IDIgODAgIDIKIDAgIDAgIC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zIgMjQ1 NzQwICAgIDAgICAgMCAgICAgMCAgNDIyNCAyOTcwICAyMzEyICAwIDM1ICAwIDY1CiAwICAxICAg ICAgMCAgIDMwNjAgIDEzNDA0IDI0NDgyOCAgICAwICAgIDAgICAgIDAgIDgwMjggMTY2MCAgICA1 MiAgMCAgNSAgMCA5NQpwcm9jcyAtLS0tLS0tLS0tLW1lbW9yeS0tLS0tLS0tLS0gLS0tc3dhcC0t IC0tLS0taW8tLS0tIC0tc3lzdGVtLS0gLS0tLWNwdS0tLS0KIHIgIGIgICBzd3BkICAgZnJlZSAg IGJ1ZmYgIGNhY2hlICAgc2kgICBzbyAgICBiaSAgICBibyAgIGluICAgIGNzIHVzIHN5IGlkIHdh CiAyICAwICAgICAgMCAgIDI3MzYgIDEzMzgwIDI0NTcwOCAgICAwICAgIDAgICAgIDAgIDMxNDgg MzMxMCAgMjMxNyAgMCA0MiAgMCA1OAogMSAgMCAgICAgIDAgICAyODU2ICAxMjYxNiAyNDY1MDAg ICAgMCAgICAwICAgICAwICAgICAwIDY4OTIgIDU3OTIgIDAgMTAwICAwICAwCiAxICAxICAgICAg MCAgIDI3MzIgIDEyMzk2IDI0NzU0NCAgICAwICAgIDAgICAgIDAgIDI2MjQgNjI4NyAgMTEzMSAg MCAxMDAgIDAgIDAKIDEgIDEgICAgICAwICAgMjUzNiAgMTIxMDAgMjQ4MTk2ICAgIDAgICAgMCAg ICAgMCAxMTQwNCAzOTQwICAgMjUxICAwIDEwMCAgMCAgMAo= ------=_Part_60_22762740.1091387012317 Content-Type: application/octet-stream; name="clientlog-ftpput" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="clientlog-ftpput" cHJvY3MgLS0tLS0tLS0tLS1tZW1vcnktLS0tLS0tLS0tIC0tLXN3YXAtLSAtLS0tLWlvLS0tLSAt LXN5c3RlbS0tIC0tLS1jcHUtLS0tCiByICBiICAgc3dwZCAgIGZyZWUgICBidWZmICBjYWNoZSAg IHNpICAgc28gICAgYmkgICAgYm8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0MCAzOTgwMTYgICAgMCAgICAwICAgICAwICAgICAwIDE1NjggIDE1NzQgMTMgIDQgODMgIDAK IDAgIDAgICAgICAwICA0NjYyMCAgNzA2NDAgMzk4MDE2ICAgIDAgICAgMCAgICAgMCAgICAgMCAy Mjk4ICAxNDM5IDEyICA2IDgyICAwCiAwICAwICAgICAgMCAgNDY2NDggIDcwNjQwIDM5ODAxNiAg ICAwICAgIDAgICAgIDAgICAgIDAgMTQwOCAgIDkwOCAgNSAgMiA5MyAgMAo= ------=_Part_60_22762740.1091387012317 Content-Type: application/octet-stream; name="clientlog-nfsput" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="clientlog-nfsput" cHJvY3MgLS0tLS0tLS0tLS1tZW1vcnktLS0tLS0tLS0tIC0tLXN3YXAtLSAtLS0tLWlvLS0tLSAt LXN5c3RlbS0tIC0tLS1jcHUtLS0tCiByICBiICAgc3dwZCAgIGZyZWUgICBidWZmICBjYWNoZSAg IHNpICAgc28gICAgYmkgICAgYm8gICBpbiAgICBjcyB1cyBzeSBpZCB3YQogMSAgMCAgICAgIDAg IDE2Nzc2IDI5MjAxMiAxNjY5ODggICAgMCAgICAwICAgMjc2ICAgIDg3IDE1MjEgICA3NzAgIDgg IDYgNzggIDgKIDAgIDAgICAgICAwICAxNjc0OCAyOTIwMTIgMTY2OTg4ICAgIDAgICAgMCAgICAg MCAgICAgMCAxNDc2ICAgNDE2ICAzICAxIDk2ICAwCiAwICAwICAgICAgMCAgMTY3NDggMjkyMDEy IDE2Njk4OCAgICAwICAgIDAgICAgIDAgICAgIDAgMjY0MCAgMTU2NCAxMiAgNiA4MiAgMAogMCAg MCAgICAgIDAgIDE2NzQ4IDI5MjAxMiAxNjY5ODggICAgMCAgICAwICAgICAwICAgICAwIDExMDQg ICA0MjYgIDEgIDAgOTkgIDAKIDAgIDAgICAgICAwICAxNjc0OCAyOTIwMTIgMTY2OTg4ICAgIDAg ICAgMCAgICAgMCAgICAgMCAxMjE5ICAgNDM1ICAx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AgNjk5Mjgg NDQ2MDU2ICAgIDAgICAgMCAgICAgMCAgICAgMCA1NDMzICAgODIyICAxICA1IDk0ICAwCiAwICAw ICAgICAgMCAgMTA0ODggIDY5OTQ0IDQ0NjA0MCAgICAwICAgIDAgICAgIDcgICAgIDAgMjA5OSAg IDcyOCAgNCAgNiA4NiAgNAogMCAgMCAgICAgIDAgIDEwNDgwICA2OTk1NiA0NDYwOTYgICAgMCAg ICAwICAgICAwICAgIDIwIDEyMjQgICA5NTIgIDQgIDEgOTUgIDAKIDAgIDAgICAgICAwICAxMDQ4 MCAgNjk5NTYgNDQ2MDk2ICAgIDAgICAgMCAgICAgMCAgICAgMCAxMjgzICAgNDY1ICAyICAxIDk3 ICAwCiAwICAwICAgICAgMCAxOTkyNTIgIDY5OTU2IDI1NzYwMCAgICAwICAgIDAgICAgIDAgICAg IDAgMTc3OSAgMTMwMCAgOSAgNyA4NCAgMAogMCAgMCAgICAgIDAgMTk5MjUyICA2OTk1NiAyNTc2 MDAgICAgMCAgICAwICAgICAwICAgICAwIDE0NDUgIDEyMDUgMTkgIDQgNzcgIDAK ------=_Part_60_22762740.1091387012317-- From jgarzik@pobox.com Sun Aug 1 12:03:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 12: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 i71J3jMr030684 for ; Sun, 1 Aug 2004 12:03:48 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1BrLcR-0005Pa-LB; Sun, 01 Aug 2004 20:03:39 +0100 Message-ID: <410D3E77.4090303@pobox.com> Date: Sun, 01 Aug 2004 15:03:19 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chris Wright CC: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ethtool_get_regs copy right number of bytes to user References: <20040615155541.Q21045@build.pdx.osdl.net> In-Reply-To: <20040615155541.Q21045@build.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7395 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 manfred@colorfullife.com Sun Aug 1 12:13:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 12:13:30 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i71JDNut031783 for ; Sun, 1 Aug 2004 12:13:24 -0700 Received: from colorfullife.com (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i71JCbuG024874; Sun, 1 Aug 2004 21:12:39 +0200 Message-ID: <410D4120.2020604@colorfullife.com> Date: Sun, 01 Aug 2004 21:14:40 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Drabb CC: netdev@oss.sgi.com, c-d.hailfinger.kernel.2004@gmx.net Subject: Re: forcedeth References: <410D3377.3030505@tampabay.rr.com> In-Reply-To: <410D3377.3030505@tampabay.rr.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7396 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 James Drabb wrote: > jim@keelie $ uname -a > Linux keelie 2.6.7-1 #1 Thu Jul 22 11:42:58 CEST 2004 i686 athlon i386 > GNU/Linux There should be a message in the dmesg log about the driver version: If it's less than 0.28: could you try a newer kernel? 0.28 is definitively in 2.5.8-rc1-mm1 and later. I could also send you just the forcedeth.c file, then you don't have to upgrade the whole kernel. > However, if I reboot into WinXP, and then reboot right away back into > FC2, the forcedeth driver works like a champ. Probably the phy reset and/or the media detection do not work properly. That part is completely rewritten in 0.28. I'm interested in two infos: - with 2.6.7 (probably version 0.25), after booting into winXP first: what does # ethtool eth0 report? Then unplug the network cable. Run ethtool again. Does it report "Link detected: No"? What if you plug the network cable back in? - The same thing with the 0.28 driver. Note that the phy initialization in 0.28 is not perfect either: it seems there is a race between the phy reset and the media detection. You might have to wait 2 seconds or so between modprobe and ifup. -- Manfred From JDrabb@tampabay.rr.com Sun Aug 1 15:00:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 15:00:54 -0700 (PDT) Received: from ms-smtp-04.tampabay.rr.com (ms-smtp-04-smtplb.tampabay.rr.com [65.32.5.134]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i71M0kjG005473 for ; Sun, 1 Aug 2004 15:00:47 -0700 Received: from [192.168.1.101] (189-66.35-65.tampabay.rr.com [65.35.66.189]) by ms-smtp-04.tampabay.rr.com (8.12.10/8.12.7) with ESMTP id i71M0Z7t029887; Sun, 1 Aug 2004 18:00:35 -0400 (EDT) Message-ID: <410D682F.4090809@tampabay.rr.com> Date: Sun, 01 Aug 2004 18:01:19 -0400 From: James Drabb User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Manfred Spraul CC: netdev@oss.sgi.com, c-d.hailfinger.kernel.2004@gmx.net Subject: Re: forcedeth References: <410D3377.3030505@tampabay.rr.com> <410D4120.2020604@colorfullife.com> In-Reply-To: <410D4120.2020604@colorfullife.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-archive-position: 7397 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: JDrabb@tampabay.rr.com Precedence: bulk X-list: netdev Manfred Spraul wrote: > James Drabb wrote: > >> jim@keelie $ uname -a >> Linux keelie 2.6.7-1 #1 Thu Jul 22 11:42:58 CEST 2004 i686 athlon i386 >> GNU/Linux > > > There should be a message in the dmesg log about the driver version: If > it's less than 0.28: could you try a newer kernel? 0.28 is definitively > in 2.5.8-rc1-mm1 and later. I could also send you just the forcedeth.c > file, then you don't have to upgrade the whole kernel. dmesg shows version 0.25. > Probably the phy reset and/or the media detection do not work properly. > That part is completely rewritten in 0.28. > > I'm interested in two infos: > - with 2.6.7 (probably version 0.25), after booting into winXP first: > what does > # ethtool eth0 > report? Then unplug the network cable. Run ethtool again. Does it report > "Link detected: No"? What if you plug the network cable back in? ethtool eth0 shows: Settings for eth0: Supports Wake-on: g Wake-on: d Link detected: yes Unplugging the network cable showed the same settings: Settings for eth0: Supports Wake-on: g Wake-on: d Link detected: yes > -- > Manfred Please send me the latest forcedeth.c and I will give it a go. Do you have the makefile so I can compile the module outside of the kernel? Thanks, Jim Drabb -- James Drabb Senior Programmer Davenport, FL USA From laforge@netfilter.org Sun Aug 1 16:03:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 16:04: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 i71N3reK007511 for ; Sun, 1 Aug 2004 16:03:55 -0700 Received: from dsl-082-083-225-237.arcor-ip.net ([82.83.225.237] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BrPMl-00027N-JB; Mon, 02 Aug 2004 01:03:43 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BrPMg-00050K-Ab; Mon, 02 Aug 2004 01:03:38 +0200 Date: Mon, 2 Aug 2004 01:03:38 +0200 From: Harald Welte To: David Miller Cc: Netfilter Development Mailinglist , netdev@oss.sgi.com, immidi_kiran@yahoo.com Subject: [PATCH 2.6] NETFILTER: new ip_conntrack_sctp Message-ID: <20040801230338.GE18758@sunbeam2> Mail-Followup-To: Harald Welte , David Miller , Netfilter Development Mailinglist , netdev@oss.sgi.com, immidi_kiran@yahoo.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6e7ZaeXHKrTJCxdu" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040523i X-archive-position: 7398 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 --6e7ZaeXHKrTJCxdu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dave! Incremental to all other patches so far, there is also the new SCTP conntrack helper by Kiran Kumar. Please apply for 2.6.9 ++, thanks. Signed-off-by: Kiran Kumar Immidi Signed-off-by: Harald Welte Please apply, thanks. diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.8-rc2-nf= quilt-nfp/include/linux/netfilter_ipv4/ip_conntrack.h --- linux-2.6.8-rc2-nfquilt/include/linux/netfilter_ipv4/ip_conntrack.h 200= 4-08-02 00:51:27.793033003 +0200 +++ linux-2.6.8-rc2-nfquilt-nfp/include/linux/netfilter_ipv4/ip_conntrack.h= 2004-08-02 00:52:49.107882646 +0200 @@ -51,10 +51,12 @@ =20 #include #include +#include =20 /* per conntrack: protocol private data */ union ip_conntrack_proto { /* insert conntrack proto private data here */ + struct ip_ct_sctp sctp; struct ip_ct_tcp tcp; struct ip_ct_icmp icmp; }; diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/include/linux/netfilter_ipv4/ip_conntrack_sctp.h linux-2.6.8-r= c2-nfquilt-nfp/include/linux/netfilter_ipv4/ip_conntrack_sctp.h --- linux-2.6.8-rc2-nfquilt/include/linux/netfilter_ipv4/ip_conntrack_sctp.= h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.8-rc2-nfquilt-nfp/include/linux/netfilter_ipv4/ip_conntrack_s= ctp.h 2004-08-02 00:52:49.088883383 +0200 @@ -0,0 +1,25 @@ +#ifndef _IP_CONNTRACK_SCTP_H +#define _IP_CONNTRACK_SCTP_H +/* SCTP tracking. */ + +enum sctp_conntrack { + SCTP_CONNTRACK_NONE, + SCTP_CONNTRACK_CLOSED, + SCTP_CONNTRACK_COOKIE_WAIT, + SCTP_CONNTRACK_COOKIE_ECHOED, + SCTP_CONNTRACK_ESTABLISHED, + SCTP_CONNTRACK_SHUTDOWN_SENT, + SCTP_CONNTRACK_SHUTDOWN_RECD, + SCTP_CONNTRACK_SHUTDOWN_ACK_SENT, + SCTP_CONNTRACK_MAX +}; + +struct ip_ct_sctp +{ + enum sctp_conntrack state; + + u_int32_t vtag[IP_CT_DIR_MAX]; + u_int32_t ttag[IP_CT_DIR_MAX]; +}; + +#endif /* _IP_CONNTRACK_SCTP_H */ diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/include/linux/netfilter_ipv4/ip_conntrack_tuple.h linux-2.6.8-= rc2-nfquilt-nfp/include/linux/netfilter_ipv4/ip_conntrack_tuple.h --- linux-2.6.8-rc2-nfquilt/include/linux/netfilter_ipv4/ip_conntrack_tuple= =2Eh 2004-06-16 07:19:43.000000000 +0200 +++ linux-2.6.8-rc2-nfquilt-nfp/include/linux/netfilter_ipv4/ip_conntrack_t= uple.h 2004-08-02 00:52:49.143881251 +0200 @@ -25,6 +25,9 @@ struct { u_int16_t id; } icmp; + struct { + u_int16_t port; + } sctp; }; =20 /* The manipulable part of the tuple. */ @@ -55,6 +58,9 @@ struct { u_int8_t type, code; } icmp; + struct { + u_int16_t port; + } sctp; } u; =20 /* The protocol. */ diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/include/linux/sysctl.h linux-2.6.8-rc2-nfquilt-nfp/include/lin= ux/sysctl.h --- linux-2.6.8-rc2-nfquilt/include/linux/sysctl.h 2004-08-01 23:52:00.0215= 86979 +0200 +++ linux-2.6.8-rc2-nfquilt-nfp/include/linux/sysctl.h 2004-08-02 00:52:49.= 146881135 +0200 @@ -410,6 +410,13 @@ NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=3D12, NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=3D13, NET_IPV4_NF_CONNTRACK_BUCKETS=3D14, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=3D15, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=3D16, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=3D17, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=3D18, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=3D19, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=3D20, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=3D21, }; =20 /* /proc/sys/net/ipv6 */ diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/net/ipv4/netfilter/Kconfig linux-2.6.8-rc2-nfquilt-nfp/net/ipv= 4/netfilter/Kconfig --- linux-2.6.8-rc2-nfquilt/net/ipv4/netfilter/Kconfig 2004-08-02 00:51:27.= 223055074 +0200 +++ linux-2.6.8-rc2-nfquilt-nfp/net/ipv4/netfilter/Kconfig 2004-08-02 00:52= :49.115882336 +0200 @@ -636,5 +636,9 @@ tristate 'SCTP protocol match support' depends on IP_NF_IPTABLES =20 +config IP_NF_CT_PROTO_SCTP + tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)' + depends on IP_NF_CONNTRACK && EXPERIMENTAL + endmenu =20 diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/net/ipv4/netfilter/Makefile linux-2.6.8-rc2-nfquilt-nfp/net/ip= v4/netfilter/Makefile --- linux-2.6.8-rc2-nfquilt/net/ipv4/netfilter/Makefile 2004-08-02 00:51:27= =2E224055035 +0200 +++ linux-2.6.8-rc2-nfquilt-nfp/net/ipv4/netfilter/Makefile 2004-08-02 00:5= 2:49.117882259 +0200 @@ -19,6 +19,9 @@ # connection tracking obj-$(CONFIG_IP_NF_CONNTRACK) +=3D ip_conntrack.o =20 +# SCTP protocol connection tracking +obj-$(CONFIG_IP_NF_CT_PROTO_SCTP) +=3D ip_conntrack_proto_sctp.o + # connection tracking helpers obj-$(CONFIG_IP_NF_AMANDA) +=3D ip_conntrack_amanda.o obj-$(CONFIG_IP_NF_TFTP) +=3D ip_conntrack_tftp.o diff --exclude-from /sunbeam/home/laforge/scripts/dontdiff -Nru linux-2.6.8= -rc2-nfquilt/net/ipv4/netfilter/ip_conntrack_proto_sctp.c linux-2.6.8-rc2-n= fquilt-nfp/net/ipv4/netfilter/ip_conntrack_proto_sctp.c --- linux-2.6.8-rc2-nfquilt/net/ipv4/netfilter/ip_conntrack_proto_sctp.c 19= 70-01-01 01:00:00.000000000 +0100 +++ linux-2.6.8-rc2-nfquilt-nfp/net/ipv4/netfilter/ip_conntrack_proto_sctp.= c 2004-08-02 00:52:49.098882995 +0200 @@ -0,0 +1,650 @@ +/* + * Connection tracking protocol helper module for SCTP. + *=20 + * SCTP is defined in RFC 2960. References to various sections in this cod= e=20 + * are to this RFC. + *=20 + * 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. + */ + +/* + * Added support for proc manipulation of timeouts. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#if 0 +#define DEBUGP(format, ...) printk(format, ## __VA_ARGS__) +#else +#define DEBUGP(format, args...) +#endif + +/* Protects conntrack->proto.sctp */ +static DECLARE_RWLOCK(sctp_lock); + +/* FIXME: Examine ipfilter's timeouts and conntrack transitions more + closely. They're more complex. --RR=20 + + And so for me for SCTP :D -Kiran */ + +static const char *sctp_conntrack_names[] =3D { + "NONE", + "CLOSED", + "COOKIE_WAIT", + "COOKIE_ECHOED", + "ESTABLISHED", + "SHUTDOWN_SENT", + "SHUTDOWN_RECD", + "SHUTDOWN_ACK_SENT", +}; + +#define SECS * HZ +#define MINS * 60 SECS +#define HOURS * 60 MINS +#define DAYS * 24 HOURS + +unsigned long ip_ct_sctp_timeout_closed =3D 10 SECS; +unsigned long ip_ct_sctp_timeout_cookie_wait =3D 3 SECS; +unsigned long ip_ct_sctp_timeout_cookie_echoed =3D 3 SECS; +unsigned long ip_ct_sctp_timeout_established =3D 5 DAYS; +unsigned long ip_ct_sctp_timeout_shutdown_sent =3D 300 SECS / 1000; +unsigned long ip_ct_sctp_timeout_shutdown_recd =3D 300 SECS / 1000; +unsigned long ip_ct_sctp_timeout_shutdown_ack_sent =3D 3 SECS; + +static unsigned long * sctp_timeouts[] +=3D { 0, /* SCTP_CONNTRACK_NONE */ + &ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */ + &ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */ + &ip_ct_sctp_timeout_cookie_echoed, /* SCTP_CONNTRACK_COOKIE_ECHOED= */ + &ip_ct_sctp_timeout_established, /* SCTP_CONNTRACK_ESTABLISHED */ + &ip_ct_sctp_timeout_shutdown_sent, /* SCTP_CONNTRACK_SHUTDOWN_SENT= */ + &ip_ct_sctp_timeout_shutdown_recd, /* SCTP_CONNTRACK_SHUTDOWN_RECD= */ + &ip_ct_sctp_timeout_shutdown_ack_sent /* SCTP_CONNTRACK_SHUTDOWN_ACK_= SENT */ + }; + +#define sNO SCTP_CONNTRACK_NONE +#define sCL SCTP_CONNTRACK_CLOSED +#define sCW SCTP_CONNTRACK_COOKIE_WAIT +#define sCE SCTP_CONNTRACK_COOKIE_ECHOED +#define sES SCTP_CONNTRACK_ESTABLISHED +#define sSS SCTP_CONNTRACK_SHUTDOWN_SENT +#define sSR SCTP_CONNTRACK_SHUTDOWN_RECD +#define sSA SCTP_CONNTRACK_SHUTDOWN_ACK_SENT +#define sIV SCTP_CONNTRACK_MAX + +/*=20 + These are the descriptions of the states: + +NOTE: These state names are tantalizingly similar to the states of an=20 +SCTP endpoint. But the interpretation of the states is a little different, +considering that these are the states of the connection and not of an end= =20 +point. Please note the subtleties. -Kiran + +NONE - Nothing so far. +COOKIE WAIT - We have seen an INIT chunk in the original direction, = or also=20 + an INIT_ACK chunk in the reply direction. +COOKIE ECHOED - We have seen a COOKIE_ECHO chunk in the original direc= tion. +ESTABLISHED - We have seen a COOKIE_ACK in the reply direction. +SHUTDOWN_SENT - We have seen a SHUTDOWN chunk in the original directio= n. +SHUTDOWN_RECD - We have seen a SHUTDOWN chunk in the reply directoin. +SHUTDOWN_ACK_SENT - We have seen a SHUTDOWN_ACK chunk in the direction opp= osite + to that of the SHUTDOWN chunk. +CLOSED - We have seen a SHUTDOWN_COMPLETE chunk in the directio= n of=20 + the SHUTDOWN chunk. Connection is closed. +*/ + +/* TODO + - I have assumed that the first INIT is in the original direction.=20 + This messes things when an INIT comes in the reply direction in CLOSED + state. + - Check the error type in the reply dir before transitioning from=20 +cookie echoed to closed. + - Sec 5.2.4 of RFC 2960 + - Multi Homing support. +*/ + +/* SCTP conntrack state transitions */ +static enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] =3D { + { +/* ORIGINAL */ +/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */ +/* init */ {sCW, sCW, sCW, sCE, sES, sSS, sSR, sSA}, +/* init_ack */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA}, +/* abort */ {sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL}, +/* shutdown */ {sCL, sCL, sCW, sCE, sSS, sSS, sSR, sSA}, +/* shutdown_ack */ {sSA, sCL, sCW, sCE, sES, sSA, sSA, sSA}, +/* error */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant have S= tale cookie*/ +/* cookie_echo */ {sCL, sCL, sCE, sCE, sES, sSS, sSR, sSA},/* 5.2.4 - Big= TODO */ +/* cookie_ack */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come i= n orig dir */ +/* shutdown_comp*/ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sCL} + }, + { +/* REPLY */ +/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */ +/* init */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* INIT in sCL= Big TODO */ +/* init_ack */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA}, +/* abort */ {sIV, sCL, sCL, sCL, sCL, sCL, sCL, sCL}, +/* shutdown */ {sIV, sCL, sCW, sCE, sSR, sSS, sSR, sSA}, +/* shutdown_ack */ {sIV, sCL, sCW, sCE, sES, sSA, sSA, sSA}, +/* error */ {sIV, sCL, sCW, sCL, sES, sSS, sSR, sSA}, +/* cookie_echo */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come i= n reply dir */ +/* cookie_ack */ {sIV, sCL, sCW, sES, sES, sSS, sSR, sSA}, +/* shutdown_comp*/ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sCL} + } +}; + +static int sctp_pkt_to_tuple(const struct sk_buff *skb, + unsigned int dataoff, + struct ip_conntrack_tuple *tuple) +{ + sctp_sctphdr_t hdr; + + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + /* Actually only need first 8 bytes. */ + if (skb_copy_bits(skb, dataoff, &hdr, 8) !=3D 0) + return 0; + + tuple->src.u.sctp.port =3D hdr.source; + tuple->dst.u.sctp.port =3D hdr.dest; + + return 1; +} + +static int sctp_invert_tuple(struct ip_conntrack_tuple *tuple, + const struct ip_conntrack_tuple *orig) +{ + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + tuple->src.u.sctp.port =3D orig->dst.u.sctp.port; + tuple->dst.u.sctp.port =3D orig->src.u.sctp.port; + return 1; +} + +/* Print out the per-protocol part of the tuple. */ +static unsigned int sctp_print_tuple(char *buffer, + const struct ip_conntrack_tuple *tuple) +{ + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + return sprintf(buffer, "sport=3D%hu dport=3D%hu ", + ntohs(tuple->src.u.sctp.port), + ntohs(tuple->dst.u.sctp.port)); +} + +/* Print out the private part of the conntrack. */ +static unsigned int sctp_print_conntrack(char *buffer, + const struct ip_conntrack *conntrack) +{ + enum sctp_conntrack state; + + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + READ_LOCK(&sctp_lock); + state =3D conntrack->proto.sctp.state; + READ_UNLOCK(&sctp_lock); + + return sprintf(buffer, "%s ", sctp_conntrack_names[state]); +} + +#define for_each_sctp_chunk(skb, sch, offset, count) \ +for (offset =3D skb->nh.iph->ihl * 4 + sizeof (sctp_sctphdr_t), count =3D = 0; \ + offset < skb->len && !skb_copy_bits(skb, offset, &sch, sizeof(sch)); \ + offset +=3D (htons(sch.length) + 3) & ~3, count++) + +/* Some validity checks to make sure the chunks are fine */ +static int do_basic_checks(struct ip_conntrack *conntrack, + const struct sk_buff *skb, + char *map) +{ + u_int32_t offset, count; + sctp_chunkhdr_t sch; + int flag; + + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + flag =3D 0; + + for_each_sctp_chunk (skb, sch, offset, count) { + DEBUGP("Chunk Num: %d Type: %d\n", count, sch.type); + + if (sch.type =3D=3D SCTP_CID_INIT=20 + || sch.type =3D=3D SCTP_CID_INIT_ACK + || sch.type =3D=3D SCTP_CID_SHUTDOWN_COMPLETE) { + flag =3D 1; + } + + /* Cookie Ack/Echo chunks not the first OR=20 + Init / Init Ack / Shutdown compl chunks not the only chunks */ + if ((sch.type =3D=3D SCTP_CID_COOKIE_ACK=20 + || sch.type =3D=3D SCTP_CID_COOKIE_ECHO + || flag) + && count !=3D0 ) { + DEBUGP("Basic checks failed\n"); + return 1; + } + + if (map) { + set_bit (sch.type, (void *)map); + } + } + + DEBUGP("Basic checks passed\n"); + return 0; +} + +static int new_state(enum ip_conntrack_dir dir, + enum sctp_conntrack cur_state, + int chunk_type) +{ + int i; + + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + DEBUGP("Chunk type: %d\n", chunk_type); + + switch (chunk_type) { + case SCTP_CID_INIT:=20 + DEBUGP("SCTP_CID_INIT\n"); + i =3D 0; break; + case SCTP_CID_INIT_ACK:=20 + DEBUGP("SCTP_CID_INIT_ACK\n"); + i =3D 1; break; + case SCTP_CID_ABORT:=20 + DEBUGP("SCTP_CID_ABORT\n"); + i =3D 2; break; + case SCTP_CID_SHUTDOWN:=20 + DEBUGP("SCTP_CID_SHUTDOWN\n"); + i =3D 3; break; + case SCTP_CID_SHUTDOWN_ACK:=20 + DEBUGP("SCTP_CID_SHUTDOWN_ACK\n"); + i =3D 4; break; + case SCTP_CID_ERROR:=20 + DEBUGP("SCTP_CID_ERROR\n"); + i =3D 5; break; + case SCTP_CID_COOKIE_ECHO:=20 + DEBUGP("SCTP_CID_COOKIE_ECHO\n"); + i =3D 6; break; + case SCTP_CID_COOKIE_ACK:=20 + DEBUGP("SCTP_CID_COOKIE_ACK\n"); + i =3D 7; break; + case SCTP_CID_SHUTDOWN_COMPLETE:=20 + DEBUGP("SCTP_CID_SHUTDOWN_COMPLETE\n"); + i =3D 8; break; + default: + /* Other chunks like DATA, SACK, HEARTBEAT and + its ACK do not cause a change in state */ + DEBUGP("Unknown chunk type, Will stay in %s\n",=20 + sctp_conntrack_names[cur_state]); + return cur_state; + } + + DEBUGP("dir: %d cur_state: %s chunk_type: %d new_state: %s\n",=20 + dir, sctp_conntrack_names[cur_state], chunk_type, + sctp_conntrack_names[sctp_conntracks[dir][i][cur_state]]); + + return sctp_conntracks[dir][i][cur_state]; +} + +/* Returns verdict for packet, or -1 for invalid. */ +static int sctp_packet(struct ip_conntrack *conntrack, + const struct sk_buff *skb, + enum ip_conntrack_info ctinfo) +{ + enum sctp_conntrack newconntrack, oldsctpstate; + sctp_sctphdr_t sctph; + sctp_chunkhdr_t sch; + u_int32_t offset, count; + char map[256 / sizeof (char)] =3D {0}; + + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + if (skb_copy_bits(skb, skb->nh.iph->ihl * 4, &sctph, sizeof(sctph)) !=3D = 0) + return -1; + + if (do_basic_checks(conntrack, skb, map) !=3D 0) + return -1; + + /* Check the verification tag (Sec 8.5) */ + if (!test_bit(SCTP_CID_INIT, (void *)map) + && !test_bit(SCTP_CID_SHUTDOWN_COMPLETE, (void *)map) + && !test_bit(SCTP_CID_COOKIE_ECHO, (void *)map) + && !test_bit(SCTP_CID_ABORT, (void *)map) + && !test_bit(SCTP_CID_SHUTDOWN_ACK, (void *)map) + && (sctph.vtag !=3D conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])) { + DEBUGP("Verification tag check failed\n"); + return -1; + } + + oldsctpstate =3D newconntrack =3D SCTP_CONNTRACK_MAX; + for_each_sctp_chunk (skb, sch, offset, count) { + WRITE_LOCK(&sctp_lock); + + /* Special cases of Verification tag check (Sec 8.5.1) */ + if (sch.type =3D=3D SCTP_CID_INIT) { + /* Sec 8.5.1 (A) */ + if (sctph.vtag !=3D 0) { + WRITE_UNLOCK(&sctp_lock); + return -1; + } + } else if (sch.type =3D=3D SCTP_CID_ABORT) { + /* Sec 8.5.1 (B) */ + if (!(sctph.vtag =3D=3D conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)]) + && !(sctph.vtag =3D=3D conntrack->proto.sctp.vtag + [1 - CTINFO2DIR(ctinfo)])) { + WRITE_UNLOCK(&sctp_lock); + return -1; + } + } else if (sch.type =3D=3D SCTP_CID_SHUTDOWN_COMPLETE) { + /* Sec 8.5.1 (C) */ + if (!(sctph.vtag =3D=3D conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)]) + && !(sctph.vtag =3D=3D conntrack->proto.sctp.vtag + [1 - CTINFO2DIR(ctinfo)]=20 + && (sch.flags & 1))) { + WRITE_UNLOCK(&sctp_lock); + return -1; + } + } else if (sch.type =3D=3D SCTP_CID_COOKIE_ECHO) { + /* Sec 8.5.1 (D) */ + if (!(sctph.vtag =3D=3D conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])= ) { + WRITE_UNLOCK(&sctp_lock); + return -1; + } + } + + oldsctpstate =3D conntrack->proto.sctp.state; + newconntrack =3D new_state(CTINFO2DIR(ctinfo), oldsctpstate, sch.type); + + /* Invalid */ + if (newconntrack =3D=3D SCTP_CONNTRACK_MAX) { + DEBUGP("ip_conntrack_sctp: Invalid dir=3D%i ctype=3D%u conntrack=3D%u\n= ", + CTINFO2DIR(ctinfo), sch.type, oldsctpstate); + WRITE_UNLOCK(&sctp_lock); + return -1; + } + + /* If it is an INIT or an INIT ACK note down the vtag */ + if (sch.type =3D=3D SCTP_CID_INIT=20 + || sch.type =3D=3D SCTP_CID_INIT_ACK) { + sctp_inithdr_t inithdr; + + if (skb_copy_bits(skb, offset + sizeof (sctp_chunkhdr_t), + &inithdr, sizeof(inithdr)) !=3D 0) { + WRITE_UNLOCK(&sctp_lock); + return -1; + } + DEBUGP("Setting vtag %x for dir %d\n",=20 + inithdr.init_tag, CTINFO2DIR(ctinfo)); + conntrack->proto.sctp.vtag[IP_CT_DIR_ORIGINAL] =3D inithdr.init_tag; + } + + conntrack->proto.sctp.state =3D newconntrack; + WRITE_UNLOCK(&sctp_lock); + } + + ip_ct_refresh(conntrack, *sctp_timeouts[newconntrack]); + + if (oldsctpstate =3D=3D SCTP_CONNTRACK_COOKIE_ECHOED + && CTINFO2DIR(ctinfo) =3D=3D IP_CT_DIR_REPLY + && newconntrack =3D=3D SCTP_CONNTRACK_ESTABLISHED) { + DEBUGP("Setting assured bit\n"); + set_bit(IPS_ASSURED_BIT, &conntrack->status); + } + + return NF_ACCEPT; +} + +/* Called when a new connection for this protocol found. */ +static int sctp_new(struct ip_conntrack *conntrack,=20 + const struct sk_buff *skb) +{ + enum sctp_conntrack newconntrack; + sctp_sctphdr_t sctph; + sctp_chunkhdr_t sch; + u_int32_t offset, count; + char map[256 / sizeof (char)] =3D {0}; + + DEBUGP(__FUNCTION__); + DEBUGP("\n"); + + if (skb_copy_bits(skb, skb->nh.iph->ihl * 4, &sctph, sizeof(sctph)) !=3D = 0) + return -1; + + if (do_basic_checks(conntrack, skb, map) !=3D 0) + return -1; + + /* If an OOTB packet has any of these chunks discard (Sec 8.4) */ + if ((test_bit (SCTP_CID_ABORT, (void *)map)) + || (test_bit (SCTP_CID_SHUTDOWN_COMPLETE, (void *)map)) + || (test_bit (SCTP_CID_COOKIE_ACK, (void *)map))) { + return -1; + } + + newconntrack =3D SCTP_CONNTRACK_MAX; + for_each_sctp_chunk (skb, sch, offset, count) { + /* Don't need lock here: this conntrack not in circulation yet */ + newconntrack =3D new_state (IP_CT_DIR_ORIGINAL,=20 + SCTP_CONNTRACK_NONE, sch.type); + + /* Invalid: delete conntrack */ + if (newconntrack =3D=3D SCTP_CONNTRACK_MAX) { + DEBUGP("ip_conntrack_sctp: invalid new deleting.\n"); + return 0; + } + + /* Copy the vtag into the state info */ + if (sch.type =3D=3D SCTP_CID_INIT) { + if (sctph.vtag =3D=3D 0) { + sctp_inithdr_t inithdr; + + if (skb_copy_bits(skb, offset + sizeof (sctp_chunkhdr_t),=20 + &inithdr, sizeof(inithdr)) !=3D 0) { + return -1; + } + + DEBUGP("Setting vtag %x for new conn\n",=20 + inithdr.init_tag); + + conntrack->proto.sctp.vtag[IP_CT_DIR_REPLY] =3D=20 + inithdr.init_tag; + } else { + /* Sec 8.5.1 (A) */ + return -1; + } + } + /* If it is a shutdown ack OOTB packet, we expect a return + shutdown complete, otherwise an ABORT Sec 8.4 (5) and (8) */ + else { + DEBUGP("Setting vtag %x for new conn OOTB\n",=20 + sctph.vtag); + conntrack->proto.sctp.vtag[IP_CT_DIR_REPLY] =3D sctph.vtag; + } + + conntrack->proto.sctp.state =3D newconntrack; + } + + return 1; +} + +static int sctp_exp_matches_pkt(struct ip_conntrack_expect *exp, + const struct sk_buff *skb) +{ + /* To be implemented */ + return 0; +} + +struct ip_conntrack_protocol ip_conntrack_protocol_sctp =3D {=20 + .list =3D { NULL, NULL },=20 + .proto =3D IPPROTO_SCTP,=20 + .name =3D "sctp", + .pkt_to_tuple =3D sctp_pkt_to_tuple,=20 + .invert_tuple =3D sctp_invert_tuple,=20 + .print_tuple =3D sctp_print_tuple,=20 + .print_conntrack =3D sctp_print_conntrack, + .packet =3D sctp_packet,=20 + .new =3D sctp_new,=20 + .destroy =3D NULL,=20 + .exp_matches_pkt =3D sctp_exp_matches_pkt,=20 + .me =3D THIS_MODULE=20 +}; + +#ifdef CONFIG_SYSCTL +static ctl_table ip_ct_sysctl_table[] =3D { + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED, + .procname =3D "ip_conntrack_sctp_timeout_closed", + .data =3D &ip_ct_sctp_timeout_closed, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT, + .procname =3D "ip_conntrack_sctp_timeout_cookie_wait", + .data =3D &ip_ct_sctp_timeout_cookie_wait, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED, + .procname =3D "ip_conntrack_sctp_timeout_cookie_echoed", + .data =3D &ip_ct_sctp_timeout_cookie_echoed, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED, + .procname =3D "ip_conntrack_sctp_timeout_established", + .data =3D &ip_ct_sctp_timeout_established, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT, + .procname =3D "ip_conntrack_sctp_timeout_shutdown_sent", + .data =3D &ip_ct_sctp_timeout_shutdown_sent, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD, + .procname =3D "ip_conntrack_sctp_timeout_shutdown_recd", + .data =3D &ip_ct_sctp_timeout_shutdown_recd, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { + .ctl_name =3D NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT, + .procname =3D "ip_conntrack_sctp_timeout_shutdown_ack_sent", + .data =3D &ip_ct_sctp_timeout_shutdown_ack_sent, + .maxlen =3D sizeof(unsigned int), + .mode =3D 0644, + .proc_handler =3D &proc_dointvec_jiffies, + }, + { .ctl_name =3D 0 } +}; + +static ctl_table ip_ct_netfilter_table[] =3D { + { + .ctl_name =3D NET_IPV4_NETFILTER, + .procname =3D "netfilter", + .mode =3D 0555, + .child =3D ip_ct_sysctl_table, + }, + { .ctl_name =3D 0 } +}; + +static ctl_table ip_ct_ipv4_table[] =3D { + { + .ctl_name =3D NET_IPV4, + .procname =3D "ipv4", + .mode =3D 0555, + .child =3D ip_ct_netfilter_table, + }, + { .ctl_name =3D 0 } +}; + +static ctl_table ip_ct_net_table[] =3D { + { + .ctl_name =3D CTL_NET, + .procname =3D "net", + .mode =3D 0555,=20 + .child =3D ip_ct_ipv4_table, + }, + { .ctl_name =3D 0 } +}; + +static struct ctl_table_header *ip_ct_sysctl_header; +#endif + +int __init init(void) +{ + int ret; + + ret =3D ip_conntrack_protocol_register(&ip_conntrack_protocol_sctp); + if (ret) { + printk("ip_conntrack_proto_sctp: protocol register failed\n"); + goto out; + } + +#ifdef CONFIG_SYSCTL + ip_ct_sysctl_header =3D register_sysctl_table(ip_ct_net_table, 0); + if (ip_ct_sysctl_header =3D=3D NULL) { + printk("ip_conntrack_proto_sctp: can't register to sysctl.\n"); + goto cleanup; + } +#endif + + return ret; + + cleanup: +#ifdef CONFIG_SYSCTL + ip_conntrack_protocol_unregister(&ip_conntrack_protocol_sctp); +#endif + out: + DEBUGP("SCTP conntrack module loading %s\n",=20 + ret ? "failed": "succeeded"); + return ret; +} + +void __exit fini(void) +{ + ip_conntrack_protocol_unregister(&ip_conntrack_protocol_sctp); +#ifdef CONFIG_SYSCTL + unregister_sysctl_table(ip_ct_sysctl_header); +#endif + DEBUGP("SCTP conntrack module unloaded\n"); +} + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Kiran Kumar Immidi"); +MODULE_DESCRIPTION("Netfilter connection tracking protocol helper for SCTP= "); --=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 --6e7ZaeXHKrTJCxdu 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) iD8DBQFBDXbKXaXGVTD0i/8RAuE0AKCpndyX/rb5mdL8ryi/8ZIk8a8V4gCfWeme AXWAfdrWrFUBmvMdhd9nWIY= =w/3I -----END PGP SIGNATURE----- --6e7ZaeXHKrTJCxdu-- From davem@redhat.com Sun Aug 1 19:23:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 19:23:07 -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 i722MxAj014040 for ; Sun, 1 Aug 2004 19:23:02 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i722Lle1017554; Sun, 1 Aug 2004 22:21:47 -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 i722Lla12942; Sun, 1 Aug 2004 22:21:47 -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 i722L3XV020332; Sun, 1 Aug 2004 22:21:04 -0400 Date: Sun, 1 Aug 2004 19:20:41 -0700 From: "David S. Miller" To: Adrian Bunk Cc: marcelo.tosatti@cyclades.com, shemminger@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [2.4 patch] CONFIG_NET_SCH_NETEM Configure.help entry Message-Id: <20040801192041.48bbc395.davem@redhat.com> In-Reply-To: <20040801142759.GQ2746@fs.tum.de> References: <20040731142658.GA6497@logos.cnet> <20040801142759.GQ2746@fs.tum.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: 7399 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 Applied, thanks Adrian. From davem@redhat.com Sun Aug 1 19:23:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 19:23:46 -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 i722NdHk014131 for ; Sun, 1 Aug 2004 19:23:39 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i722MWe1017665; Sun, 1 Aug 2004 22:22:32 -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 i722MWa13003; Sun, 1 Aug 2004 22:22:32 -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 i722LmUX020510; Sun, 1 Aug 2004 22:21:49 -0400 Date: Sun, 1 Aug 2004 19:21:26 -0700 From: "David S. Miller" To: Adrian Bunk Cc: shemminger@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [2.6 patch] update NET_SCH_NETEM help text Message-Id: <20040801192126.064ad0ac.davem@redhat.com> In-Reply-To: <20040801143307.GR2746@fs.tum.de> References: <20040801143307.GR2746@fs.tum.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: 7400 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 1 Aug 2004 16:33:07 +0200 Adrian Bunk wrote: > The patch below contains the following changes for the NET_SCH_NETEM > help text: > - correct the module name > - "If unsure, say N." Also applied, thanks. From davem@redhat.com Sun Aug 1 19:29:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 19:29:31 -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 i722TNCa014826 for ; Sun, 1 Aug 2004 19:29:23 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i722TEe1019278; Sun, 1 Aug 2004 22:29:14 -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 i722TEa14187; Sun, 1 Aug 2004 22:29:14 -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 i722SVQB023174; Sun, 1 Aug 2004 22:28:31 -0400 Date: Sun, 1 Aug 2004 19:28:09 -0700 From: "David S. Miller" To: Harald Welte Cc: netfilter-devel@lists.netfilter.org, netdev@oss.sgi.com, immidi_kiran@yahoo.com Subject: Re: [PATCH 2.6] NETFILTER: new ip_conntrack_sctp Message-Id: <20040801192809.5ab29c25.davem@redhat.com> In-Reply-To: <20040801230338.GE18758@sunbeam2> References: <20040801230338.GE18758@sunbeam2> 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: 7401 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 2 Aug 2004 01:03:38 +0200 Harald Welte wrote: > Incremental to all other patches so far Not really. Harald you really need to fixup your diff scripts wrt. handling non-netfilter files. Every diff you've sent me in this whole set against linux/sysctl.h has rejected, including this one. In this instance, none of the tcp-window-tracking sysctls were in the sysctl.h file you diffed against. I fixed this up by hand, so don't worry about this instance. From werner@almesberger.net Sun Aug 1 19:51:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 19:51:19 -0700 (PDT) Received: from host.almesberger.net (almesberger.net [63.105.73.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i722pCle015454 for ; Sun, 1 Aug 2004 19:51:13 -0700 Received: from almesberger.net (vpnwa-home [10.200.0.2]) by host.almesberger.net (8.11.6/8.9.3) with ESMTP id i722pA432049; Sun, 1 Aug 2004 19:51:10 -0700 Received: (from werner@localhost) by almesberger.net (8.11.6/8.11.6) id i722p2T12467; Sun, 1 Aug 2004 23:51:02 -0300 Date: Sun, 1 Aug 2004 23:51:02 -0300 From: Werner Almesberger To: Suparna Bhattacharya Cc: netdev@oss.sgi.com Subject: net-AIO and real-time TCP (blue sky research) Message-ID: <20040801235102.K1276@almesberger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 7402 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: werner@almesberger.net Precedence: bulk X-list: netdev Hi Suparna, I'm copying this to netdev, because people there may get a good chuckle out of this outlandish idea as well :-) At OLS we were chatting about using AIO also for networking. While this concept didn't seem to rank particularly high on the lunacy scale, it didn't appear overly useful either. About the only possibly interesting new functionality, besides the possibility to connect this with some eccentric TCP offloading and zero-copy scheme, would be - when applied to TCP - to make unACKed data in the out-of-order buffer available to user space. Now, it occurred to me that this may lead to something a lot more exciting: a step towards making TCP real-time capable. I'm using the term "real-time" loosely here, as in "there's a deadline, but we're flexible". I haven't followed what's going on at IETF in that area for a while, and I'm sure plenty of other people must have thought of similar schemes before, but since this seems nicer and maybe even simpler than some, let me describe it anyway. First of all, one of the main complaints of the real-time networking people is that TCP stubbornly insists on retransmitting every single segment until it is absolutely certain that the segment has been received, even if the real-time application has long since moved on. Now, with net-AIO, the application could already get all the data that has arrived after a lost segment. That's a good start, but TCP will still try to retransmit. So the next step would be to have a means to indicate that we've lost interest in the outcome of a pending AIO operation, and - as a side effect - communicate this also to TCP, so that TCP can stop trying, and do something more useful instead. Let's call this operation aio_forget(). For disk IO, this may work just like aio_cancel(). Now, aio_forget() would be a great tool for making TCP blissfully ignorant of any losses, actually making it very TCP-unfriendly. So the next step would be to record the fact that we've just forgotten some segments, but still need to make the peer aware of the fact that there (may) have been losses, and to slow down accordingly. Obviously, if we have reason to believe that the peer already knows of a loss in the general vicinity, no action is needed. Reliably communicating a loss isn't trivial, but there should be good background material in the context of ECN. Of course, if ECN is available, we may just use that. Otherwise, we may have to force a retransmission, to be sure that the peer has noticed. (And, if the forgotten segment(s) should arrive while TCP is trying to indicate a loss, it should stop doing so.) Now, assuming we have a solution for indicating losses that is satisfying both in terms of congestion control and in terms of efficiency, there are still a few things that would be nice to have, that this approach doesn't solve: - message boundaries and segment-message alignment. Not being able to use messages just because a few of their bytes ended up in a lost (and then aio_forgotten) segment would be just too bad. In some cases, it may be possible to just set the MSS to a suitable value. Also, recovering message boundaries after a loss may be tricky. - there's no direct provision for allowing adaptive coding. Of course, this is a fairly orthogonal problem. - as time passes, the sender may want to remove or substitute data it had already enqueued, e.g because there is less bandwidth than originally anticipated. So there may be a place for aio_forget() at the sender side too. Now, why could this scheme be "nicer" than just inventing some new protocol that is designed to do all these things ? The main thing that "looks good" is that this mechanism could use all of TCP, and may not even need major maintenance if some minor aspect of TCP congestion control gets changed. Anyway, this may be peculiar enough for someone to spin the idea a little further. In the worst case, I might just have provided additional evidence that, if you just search long enough, there's a perfectly plausible problem for every solution :-) - Werner -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / /_http://www.almesberger.net/____________________________________________/ From davem@redhat.com Sun Aug 1 19:53:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 01 Aug 2004 19:53:09 -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 i722r2QQ015700 for ; Sun, 1 Aug 2004 19:53:02 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i722qfe1023684; Sun, 1 Aug 2004 22:52:41 -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 i722qfa17865; Sun, 1 Aug 2004 22:52:41 -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 i722pwgP031055; Sun, 1 Aug 2004 22:51:58 -0400 Date: Sun, 1 Aug 2004 19:51:35 -0700 From: "David S. Miller" To: Kazunori Miyazawa Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, kazunori@miyazawa.org Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup Message-Id: <20040801195135.16734846.davem@redhat.com> In-Reply-To: <20040730171205.114f22ba.kazunori@miyazawa.org> References: <20040730171205.114f22ba.kazunori@miyazawa.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: 7403 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 Fri, 30 Jul 2004 17:12:05 +0900 Kazunori Miyazawa wrote: > I consider copying flowi(fl_rt) uses too much stack at the moment. > I'll re-send the fixed patch again. I agree, and let's defer this patch until we resolve that. It is simple to fix, I think. From herbert@gondor.apana.org.au Mon Aug 2 00:42:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 00:43: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 i727gWcJ028544 for ; Mon, 2 Aug 2004 00:42: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 1BrXSX-0000qR-00; Mon, 02 Aug 2004 17:42:14 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BrXS7-0004Gy-00; Mon, 02 Aug 2004 17:41:47 +1000 Date: Mon, 2 Aug 2004 17:41:47 +1000 To: Kazunori Miyazawa Cc: davem@redhat.com, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, Alexey Kuznetsov Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup Message-ID: <20040802074147.GA16381@gondor.apana.org.au> References: <20040730171205.114f22ba.kazunori@miyazawa.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040730171205.114f22ba.kazunori@miyazawa.org> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7404 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, Jul 30, 2004 at 05:12:05PM +0900, Kazunori Miyazawa wrote: > > This patch separates xfrm_lookup from ip6_dst_lookup > to support srcrt correctly. ip6_dst_lookup should be > called with next hop. however xfrm_lookup should be > called with final destination. It fixes them. Thanks for the patch. This raises an interesting question. Is it really correct to look at the first hop address when doing the route lookup? The problem is that if we use the first-hop address as the dst when doing the route lookup then we may end up with incorrect MTU information. This is because the MTU to the final destination may well be smaller than the MTU to the first hop. It seems that Alexey thought about this six years ago according to the rthdr comment in icmpv6_rcv(). 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 Mon Aug 2 02:32:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 02:32: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 i729W5sL030546 for ; Mon, 2 Aug 2004 02:32: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 1BrZAh-0001VE-00; Mon, 02 Aug 2004 19:31:56 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BrZAf-00058H-00; Mon, 02 Aug 2004 19:31:53 +1000 Date: Mon, 2 Aug 2004 19:31:53 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [1/2] [IPSEC] Remove unnecessary inet_ecn.h inclusions Message-ID: <20040802093153.GA19706@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7405 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 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: This is a couple of clean-ups stemming from the xfrm_output change. I should've removed the inet_ecn.h inclusions in that change as the ECN code has been moved to xfrm[46]_output.c. This patch does 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 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p1 ===== net/ipv4/ah4.c 1.38 vs edited ===== --- 1.38/net/ipv4/ah4.c 2004-07-30 21:16:40 +10:00 +++ edited/net/ipv4/ah4.c 2004-08-02 17:44:36 +10:00 @@ -1,6 +1,5 @@ #include #include -#include #include #include #include ===== net/ipv4/esp4.c 1.53 vs edited ===== --- 1.53/net/ipv4/esp4.c 2004-07-12 20:00:21 +10:00 +++ edited/net/ipv4/esp4.c 2004-08-02 17:44:49 +10:00 @@ -1,6 +1,5 @@ #include #include -#include #include #include #include ===== net/ipv4/ipcomp.c 1.28 vs edited ===== --- 1.28/net/ipv4/ipcomp.c 2004-07-12 20:00:21 +10:00 +++ edited/net/ipv4/ipcomp.c 2004-08-02 17:44:55 +10:00 @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include ===== net/ipv4/xfrm4_tunnel.c 1.13 vs edited ===== --- 1.13/net/ipv4/xfrm4_tunnel.c 2004-07-12 20:00:21 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-02 17:44:30 +10:00 @@ -7,7 +7,6 @@ #include #include #include -#include int xfrm4_tunnel_check_size(struct sk_buff *skb) { ===== net/ipv6/ah6.c 1.38 vs edited ===== --- 1.38/net/ipv6/ah6.c 2004-08-02 07:15:03 +10:00 +++ edited/net/ipv6/ah6.c 2004-08-02 17:45:20 +10:00 @@ -26,7 +26,6 @@ #include #include -#include #include #include #include ===== net/ipv6/esp6.c 1.34 vs edited ===== --- 1.34/net/ipv6/esp6.c 2004-08-02 07:15:03 +10:00 +++ edited/net/ipv6/esp6.c 2004-08-02 17:45:23 +10:00 @@ -26,7 +26,6 @@ #include #include -#include #include #include #include ===== net/ipv6/ipcomp6.c 1.19 vs edited ===== --- 1.19/net/ipv6/ipcomp6.c 2004-08-02 07:15:03 +10:00 +++ edited/net/ipv6/ipcomp6.c 2004-08-02 17:45:25 +10:00 @@ -32,7 +32,6 @@ */ #include #include -#include #include #include #include --GvXjxJ+pjyke8COw-- From herbert@gondor.apana.org.au Mon Aug 2 02:35:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 02:35: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 i729ZAXZ030888 for ; Mon, 2 Aug 2004 02:35:11 -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 1BrZDg-0001Ws-00; Mon, 02 Aug 2004 19:35:00 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BrZDg-00059H-00; Mon, 02 Aug 2004 19:35:00 +1000 Date: Mon, 2 Aug 2004 19:35:00 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [2/2] [IPSEC] Move xfrm[46]_tunnel_check_size into xfrm[46]_output.c Message-ID: <20040802093500.GA19747@gondor.apana.org.au> References: <20040802093153.GA19706@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline In-Reply-To: <20040802093153.GA19706@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7406 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 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This patch moves xfrm[46]_tunnel_check_size() into xfrm[46]_output.c where it can be made static since it's only used there. While moving the icmp.h inclusions over I also discovered that the tunnel files are missing an inclusion of net/protocol.h. So I've added them 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 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p2 ===== include/net/xfrm.h 1.62 vs edited ===== --- 1.62/include/net/xfrm.h 2004-08-02 07:15:02 +10:00 +++ edited/include/net/xfrm.h 2004-08-02 18:02:32 +10:00 @@ -821,12 +821,10 @@ extern int xfrm4_output(struct sk_buff **pskb); extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); -extern int xfrm4_tunnel_check_size(struct sk_buff *skb); extern int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp); extern int xfrm6_output(struct sk_buff **pskb); extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); -extern int xfrm6_tunnel_check_size(struct sk_buff *skb); 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); ===== net/ipv4/xfrm4_output.c 1.1 vs edited ===== --- 1.1/net/ipv4/xfrm4_output.c 2004-07-11 04:53:15 +10:00 +++ edited/net/ipv4/xfrm4_output.c 2004-08-02 17:58:15 +10:00 @@ -13,6 +13,7 @@ #include #include #include +#include /* Add encapsulation header. * @@ -65,6 +66,30 @@ top_iph->protocol = IPPROTO_IPIP; memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); +} + +static int xfrm4_tunnel_check_size(struct sk_buff *skb) +{ + int mtu, ret = 0; + struct dst_entry *dst; + struct iphdr *iph = skb->nh.iph; + + if (IPCB(skb)->flags & IPSKB_XFRM_TUNNEL_SIZE) + goto out; + + IPCB(skb)->flags |= IPSKB_XFRM_TUNNEL_SIZE; + + if (!(iph->frag_off & htons(IP_DF))) + goto out; + + dst = skb->dst; + mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; + if (skb->len > mtu) { + icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); + ret = -EMSGSIZE; + } +out: + return ret; } int xfrm4_output(struct sk_buff **pskb) ===== net/ipv4/xfrm4_tunnel.c 1.14 vs edited ===== --- 1.14/net/ipv4/xfrm4_tunnel.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-02 18:06:32 +10:00 @@ -6,31 +6,7 @@ #include #include #include -#include - -int xfrm4_tunnel_check_size(struct sk_buff *skb) -{ - int mtu, ret = 0; - struct dst_entry *dst; - struct iphdr *iph = skb->nh.iph; - - if (IPCB(skb)->flags & IPSKB_XFRM_TUNNEL_SIZE) - goto out; - - IPCB(skb)->flags |= IPSKB_XFRM_TUNNEL_SIZE; - - if (!(iph->frag_off & htons(IP_DF))) - goto out; - - dst = skb->dst; - mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; - if (skb->len > mtu) { - icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); - ret = -EMSGSIZE; - } -out: - return ret; -} +#include static int ipip_output(struct sk_buff **pskb) { ===== net/ipv6/xfrm6_output.c 1.1 vs edited ===== --- 1.1/net/ipv6/xfrm6_output.c 2004-07-30 12:17:21 +10:00 +++ edited/net/ipv6/xfrm6_output.c 2004-08-02 18:01:03 +10:00 @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -66,6 +67,23 @@ top_iph->hop_limit = iph->hop_limit; ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); +} + +static int xfrm6_tunnel_check_size(struct sk_buff *skb) +{ + int mtu, ret = 0; + struct dst_entry *dst = skb->dst; + + mtu = dst_pmtu(dst) - sizeof(struct ipv6hdr); + if (mtu < IPV6_MIN_MTU) + mtu = IPV6_MIN_MTU; + + if (skb->len > mtu) { + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); + ret = -EMSGSIZE; + } + + return ret; } int xfrm6_output(struct sk_buff **pskb) ===== net/ipv6/xfrm6_tunnel.c 1.4 vs edited ===== --- 1.4/net/ipv6/xfrm6_tunnel.c 2004-08-02 07:15:03 +10:00 +++ edited/net/ipv6/xfrm6_tunnel.c 2004-08-02 18:07:06 +10:00 @@ -27,8 +27,8 @@ #include #include #include -#include #include +#include #include #include @@ -342,25 +342,6 @@ } EXPORT_SYMBOL(xfrm6_tunnel_free_spi); - -int xfrm6_tunnel_check_size(struct sk_buff *skb) -{ - int mtu, ret = 0; - struct dst_entry *dst = skb->dst; - - mtu = dst_pmtu(dst) - sizeof(struct ipv6hdr); - if (mtu < IPV6_MIN_MTU) - mtu = IPV6_MIN_MTU; - - if (skb->len > mtu) { - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); - ret = -EMSGSIZE; - } - - return ret; -} - -EXPORT_SYMBOL(xfrm6_tunnel_check_size); static int xfrm6_tunnel_output(struct sk_buff **pskb) { ===== net/xfrm/xfrm_export.c 1.2 vs edited ===== --- 1.2/net/xfrm/xfrm_export.c 2004-06-18 16:20:58 +10:00 +++ edited/net/xfrm/xfrm_export.c 2004-08-02 17:58:32 +10:00 @@ -35,7 +35,6 @@ EXPORT_SYMBOL(xfrm4_rcv); EXPORT_SYMBOL(xfrm4_tunnel_register); EXPORT_SYMBOL(xfrm4_tunnel_deregister); -EXPORT_SYMBOL(xfrm4_tunnel_check_size); EXPORT_SYMBOL(xfrm_register_type); EXPORT_SYMBOL(xfrm_unregister_type); EXPORT_SYMBOL(xfrm_get_type); --82I3+IH0IqGh5yIs-- From ptsjohol@cc.jyu.fi Mon Aug 2 02:58:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 02:58:20 -0700 (PDT) Received: from posti5.jyu.fi (posti5.jyu.fi [130.234.4.34]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i729wCVX002631 for ; Mon, 2 Aug 2004 02:58:13 -0700 Received: from silmu.st.jyu.fi (IDENT:KCtRHLQSWRfY1ggLLWY2hN3kjBDFjO1g@silmu.st.jyu.fi [130.234.4.64]) by posti5.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i729vicn005376; Mon, 2 Aug 2004 12:57:45 +0300 Date: Mon, 2 Aug 2004 12:57:41 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , , , , Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) In-Reply-To: <20040731143330.A25736@electric-eye.fr.zoreil.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti5.jyu.fi; Mon, 02 Aug 2004 12:57:47 +0300 X-archive-position: 7407 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev On Sat, 31 Jul 2004, Francois Romieu wrote: > Pasi Sjoholm : > [interesting report] >> The hardest part is to tell where the problem is but I think that >> rtl8139_poll-function would be good place to start looking for the bug? >> readprofile didn't tell much.. Where to go next? I'm not so good >> programmer that I could find the right place to fix.. > In case it could make a difference: did you check if CONFIG_8139_OLD_RX_RESET > changes the behavior or not ? Yep, I tried that one also, didn't help a thing. > If it does not, I'd welcome a test report + log with the two attached patch > applied. The first one is just a placebo but the second one could help. We are making some sort of a progress but not enough. Patch r8139-20.patch didn't help. I made some printk(...)-debug messages and that part of a code was never ran. With both patch applied and RTL8139DEBUG = 1 I couldn't make the driver crash but without DEBUG it did crash. I assume that it has something to with fact that syslog did take so much io-bandwidth. (a couple of minutes log was ~1GB =)) But without: -- @@ -2024,17 +2024,17 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); + } - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); + /* Clear out errors and receive interrupts */ + status = RTL_R16 (IntrStatus) & RxAckBits; + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; } + RTL_W16_F (IntrStatus, RxAckBits); } done: -- the driver crashed... even with debug-option was turned on. Everytime the ksoftirqd started to take cpu-time there were this line in the logs: -- Aug 2 12:10:37 139_interrupt: eth0:..... -- Notice the 139... it should read rtl8139_interrupt: Here is a snapshot from the log file when driver is crashing: Full logfile is available from: http://www.cc.jyu.fi/~ptsjohol/syslog-debug.gz -- Aug 2 12:10:37 rtl8139_rx: eth0: In rtl8139_rx(), current 03ac BufAddr 036c, free to 039c, Cmd 0c. Aug 2 12:10:37 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000. Aug 2 12:10:37 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001. Aug 2 12:10:37 rtl8139_rx: eth0: In rtl8139_rx(), current 0484 BufAddr 0444, free to 0474, Cmd 0c. Aug 2 12:10:37 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000. Aug 2 12:10:37 139_interrupt: eth0: exiting interrupt, intr_status=0x0010. Aug 2 12:10:37 rtl8139_rx: eth0: In rtl8139_rx(), current 04d0 BufAddr 04cc, free to 04c0, Cmd 0d. Aug 2 12:10:37 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0010. Aug 2 12:10:37 rtl8139_rx: eth0: In rtl8139_rx(), current 04d0 BufAddr 04cc, free to 04c0, Cmd 0d. Aug 2 12:10:37 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0010. Aug 2 12:10:37 rtl8139_rx: eth0: In rtl8139_rx(), current 04d0 BufAddr 04cc, free to 04c0, Cmd 0d. ...... ...... Aug 2 12:12:11 rtl8139_rx: eth0: In rtl8139_rx(), current 04d0 BufAddr 04cc, free to 04c0, Cmd 0d. Aug 2 12:12:11 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0050. Aug 2 12:12:11 rtl8139_rx: eth0: In rtl8139_rx(), current 04d0 BufAddr 04cc, free to 04c0, Cmd 0d. Aug 2 12:12:11 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0050. Aug 2 12:12:11 rtl8139_rx: eth0: In rtl8139_rx(), current 04d0 BufAddr 04cc, free to 04c0, Cmd 0d. Aug 2 12:12:11 rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0050. -- -- Pasi Sjöholm From ptsjohol@cc.jyu.fi Mon Aug 2 03:03:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 03:03:44 -0700 (PDT) Received: from posti6.jyu.fi (posti6.jyu.fi [130.234.4.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72A3cR6003493 for ; Mon, 2 Aug 2004 03:03:39 -0700 Received: from silmu.st.jyu.fi (IDENT:oxRA6s6O4mJuvi+sWEjRqL5K3wIrdnnK@silmu.st.jyu.fi [130.234.4.64]) by posti6.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i72A3Iob001597; Mon, 2 Aug 2004 13:03:18 +0300 Date: Mon, 2 Aug 2004 13:03:15 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , , , , Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti6.jyu.fi; Mon, 02 Aug 2004 13:03:19 +0300 X-archive-position: 7408 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev I forgot to mention that it was quite hard to crash the driver with that /* Clear out errors and receive interrupts */-patch. Took about 15minutes everytime, when normally it takes about 2mins. On Mon, 2 Aug 2004, Pasi Sjoholm wrote: > With both patch applied and RTL8139DEBUG = 1 I couldn't make the driver > crash but without DEBUG it did crash. I assume that it has something to > with fact that syslog did take so much io-bandwidth. (a couple of minutes log > was ~1GB =)) > > But without: > > -- > @@ -2024,17 +2024,17 @@ static int rtl8139_rx(struct net_device > > cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; > RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); > + } > > - /* Clear out errors and receive interrupts */ > - status = RTL_R16 (IntrStatus) & RxAckBits; > - if (likely(status != 0)) { > - if (unlikely(status & (RxFIFOOver | RxOverflow))) > { > - tp->stats.rx_errors++; > - if (status & RxFIFOOver) > - tp->stats.rx_fifo_errors++; > - } > - RTL_W16_F (IntrStatus, RxAckBits); > + /* Clear out errors and receive interrupts */ > + status = RTL_R16 (IntrStatus) & RxAckBits; > + if (likely(status != 0)) { > + if (unlikely(status & (RxFIFOOver | RxOverflow))) { > + tp->stats.rx_errors++; > + if (status & RxFIFOOver) > + tp->stats.rx_fifo_errors++; > } > + RTL_W16_F (IntrStatus, RxAckBits); > } > > done: > -- > > the driver crashed... even with debug-option was turned on. > Everytime the ksoftirqd started to take cpu-time there were this line in > the logs: From ak@suse.de Mon Aug 2 04:46:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 04:46:48 -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 i72BkfUC009561 for ; Mon, 2 Aug 2004 04:46: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 B3C839A8D29; Mon, 2 Aug 2004 13:45:07 +0200 (CEST) Date: Mon, 2 Aug 2004 13:45:06 +0200 From: Andi Kleen To: "David S. Miller" Cc: Jeff Garzik , tmattox@gmail.com, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [RFC,PATCH] fastroute dead code... Message-ID: <20040802114506.GC25951@wotan.suse.de> References: <20040730060348.GA22854@havoc.gtf.org> <20040730193515.GA11365@havoc.gtf.org> <20040730131004.2be1274d.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040730131004.2be1274d.davem@redhat.com> X-archive-position: 7409 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, Jul 30, 2004 at 01:10:04PM -0700, David S. Miller wrote: > On Fri, 30 Jul 2004 15:35:15 -0400 > Jeff Garzik wrote: > > > It is dead code, as-is, in the kernel. It would require patches to > > actually work at all. > > > > It is impossible that fastrouting is being actively used, without patches. > > I totally agree. And people can always resurrect it from the > repository history or an old tarball if they wish. > > I think it should be killed entirely, and that's what I'm going > to do. The s390 people used to use it for local forwarding between partitions. I don't know if they still do however. -Andi > From bruce@cs.usyd.edu.au Mon Aug 2 06:41:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 06:41:24 -0700 (PDT) Received: from staff.cs.usyd.edu.au (staff.cs.usyd.edu.au [129.78.8.1]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i72DfF2n018446 for ; Mon, 2 Aug 2004 06:41:17 -0700 Received: from nlp0.cs.usyd.edu.au. [129.78.10.52] by staff.cs.usyd.edu.au.; Mon, 02 Aug 2004 23:41:09 +1000 Received: from nlp0.cs.usyd.edu.au (localhost.cs.usyd.edu.au [127.0.0.1]) by nlp0.cs.usyd.edu.au (8.12.8/8.12.8) with ESMTP id i72Df9Yo021571 for ; Mon, 2 Aug 2004 23:41:09 +1000 Received: (from bruce@localhost) by nlp0.cs.usyd.edu.au (8.12.8/8.12.8/Submit) id i72Df9TP021569 for netdev@oss.sgi.com; Mon, 2 Aug 2004 23:41:09 +1000 Message-Id: <200408021341.i72Df9TP021569@nlp0.cs.usyd.edu.au> Date: Mon, 02 Aug 2004 23:29:20 +1000 From: bruce@it.usyd.edu.au (Bruce Janson) Subject: Re: 2.6.7 kernel boot-time configuration of a non-modular tulip driver To: netdev@oss.sgi.com Cc: bruce@it.usyd.edu.au X-archive-position: 7410 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bruce@it.usyd.edu.au Precedence: bulk X-list: netdev Hi Randy, Thanks for your reply. From rddunlap@osdl.org Mon Aug 02 03:43:31 2004 ... To: bruce@it.usyd.edu.au (Bruce Janson) Cc: netdev ... (moving this to netdev mailing list) ... [OK, but please Cc me explicitly as I don't subscribe to netdev.] On Sun, 01 Aug 2004 00:48:22 +1000 Bruce Janson wrote: | I have a linux 2.6.7 kernel which contains a compiled-in tulip driver. | I would like to be able to boot the kernel with parameters that | will allow control of the tulip device. On some ethernet devices | this used to be possible via (something like): | | ether=0,0,1,0,eth0 | | which would pass the four numeric parameters (as, I think, dev->irq, | dev->ioaddr, dev->mem_start and dev->mem_end) to the net driver that | controlled eth0. A convention adopted by some net drivers then allowed | dev->mem_start to be interpretted as a set of flags that would control | device characteristics (e.g. full-duplex vs half-duplex mode). | In .../linux-2.6.7/drivers/net/tulip/tulip_core.c:1587: | | if (dev->mem_start & MEDIA_MASK) | tp->default_port = dev->mem_start & MEDIA_MASK; | | suggests that this might still work. However, I have been unable | to force dev->mem_start in that driver to become non-zero via any | kernel boot-time parameters. My limited understanding of the code | that precedes the above lines in that file suggests that the "dev" | structure is not what it used to be... The driver never calls netdev_boot_setup_check(), which is what would give the driver its command line parameters. Did this work in early 2.6.x? There have been several changes in this area. ... No idea. This is the first in the 2.6 kernel series that I have tried. The driver can't do a simple call to netdev_boot_setup_check() because that will overwrite dev-> {irq, base_addr, mem_start, mem_end}, and those values come from PCI config space for PCI drivers. The driver could create a fake for that purpose, but it's more likely that ethtool or mii-tool should be used to change media/speed etc... Although now that I look at the driver source code, I don't see ethtool or mii-tool support for those options. ... Yes (tried that too :-(). | ../linux-2.6.7/Documentation/kernel-parameters.txt:402 still | mentions "ether=..." but marks it as obsolete, replaced by | the equivalent "netdev=...". Elsewhere in that file, the entry | for "netdev=..." describes what appears to be the functionality | that I seek. | | So, is it still possible to perform the same sort of control | operations on a tulip driver via kernel boot-time parameters | as one can do via module load-time parameters? If so, how? The current tulip-core driver supports setting only the default transceiver (media type) on the kernel boot/command line when the driver is built into the kernel image (using mem_start, as you noted above). ... Sorry, I don't follow the above. Would you mind giving me an example, please, of how for the tulip driver I might set the default transceiver (media type) on the kernel boot/command line when the driver is built into the kernel image? Regards, bruce. From shinemohamed_j@naturesoft.net Mon Aug 2 06:54:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 06:54:10 -0700 (PDT) Received: from naturesoft.net ([203.145.184.221]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72Drw4i019218 for ; Mon, 2 Aug 2004 06:54:03 -0700 Received: from shine.naturesoft.com ([192.168.0.84]) by naturesoft.net with esmtp (Exim 3.35 #1) id 1BrcyI-0005qE-00; Mon, 02 Aug 2004 19:05:22 +0530 Subject: [TRIVIAL PATCH]mistake in the comment in include/linux/wireless.h From: Shine Mohamed Jabbar Reply-To: shinemohamed_j@naturesoft.net To: davem@redhat.com Cc: jt@hpl.hp.com, netdev@oss.sgi.com Content-Type: multipart/mixed; boundary="=-kVZOS8vuCIva4VAmkT5m" Organization: Naturesoft Message-Id: <1091454063.25300.109.camel@shine.naturesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 02 Aug 2004 19:11:03 +0530 X-archive-position: 7411 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shinemohamed_j@naturesoft.net Precedence: bulk X-list: netdev --=-kVZOS8vuCIva4VAmkT5m Content-Type: text/plain Content-Transfer-Encoding: 7bit [Resend - forgot to cc to netdev ML] Hi Dave, There is a mistake in the comment given in the include/linux/wireless.h. The given patch will fix it. Please apply if its useful. Regards, Shine Mohamed Jabbar --=-kVZOS8vuCIva4VAmkT5m Content-Description: Content-Disposition: attachment; filename=diff.patch Content-Type: text/x-patch; charset=UTF-8 Content-Transfer-Encoding: 7bit --- linux-2.6.8-rc2-bk11/include/linux/wireless.h.orig 2004-08-02 17:39:11.891418904 +0530 +++ linux-2.6.8-rc2-bk11/include/linux/wireless.h 2004-08-02 17:35:56.309151928 +0530 @@ -47,12 +47,12 @@ * # include/net/iw_handler.h * * Note as well that /proc/net/wireless implementation has now moved in : - * # include/linux/wireless.c + * # net/core/wireless.c * * Wireless Events (2002 -> onward) : * -------------------------------- * Events are defined at the end of this file, and implemented in : - * # include/linux/wireless.c + * # net/core/wireless.c * * Other comments : * -------------- --=-kVZOS8vuCIva4VAmkT5m-- From yoshfuji@linux-ipv6.org Mon Aug 2 06:59:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 06:59:26 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72DxJVW019590 for ; Mon, 2 Aug 2004 06:59:19 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id BEE3233CE5; Mon, 2 Aug 2004 22:59:40 +0900 (JST) Date: Mon, 02 Aug 2004 06:59:40 -0700 (PDT) Message-Id: <20040802.065940.86004622.yoshfuji@linux-ipv6.org> To: suckfish@ihug.co.nz Cc: davem@redhat.com, pekkas@netcore.fi, linux-kernel@vger.kernel.org, yoshfuji@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] Trivial ipv6 fix. From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <1091434328.16469.5.camel@localhost.localdomain> References: <1091434328.16469.5.camel@localhost.localdomain> 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: 7412 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 <1091434328.16469.5.camel@localhost.localdomain> (at Mon, 02 Aug 2004 20:12:08 +1200), Ralph Loader says: > ipv6_addr_hash doesn't do what it's comment says. The comment was > probably what was intended, not that it'll make much difference in > practice. Oops, David, please apply this. > Signed-off-by: Ralph Loader Signed-off-by: Hideaki YOSHIFUJI ===== include/net/addrconf.h 1.17 vs edited ===== --- 1.17/include/net/addrconf.h 2004-07-29 02:00:50 +09:00 +++ edited/include/net/addrconf.h 2004-08-02 22:57:38 +09:00 @@ -178,8 +178,8 @@ * This will include the IEEE address token on links that support it. */ - word = addr->s6_addr[2] ^ addr->s6_addr32[3]; - word ^= (word>>16); + word = addr->s6_addr32[2] ^ addr->s6_addr32[3]; + word ^= (word >> 16); word ^= (word >> 8); return ((word ^ (word >> 4)) & 0x0f); -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From kumar.gala@freescale.com Mon Aug 2 06:59:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 07:00:03 -0700 (PDT) Received: from motgate2.mot.com (motgate2.mot.com [144.189.100.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72DxuoY019709 for ; Mon, 2 Aug 2004 06:59:56 -0700 Received: from az33exr02.mot.com (az33exr02.mot.com [10.64.251.232]) by motgate2.mot.com (Motorola/Motgate2) with ESMTP id i72Dt6QO007583; Mon, 2 Aug 2004 06:55:06 -0700 (MST) Received: from [192.168.123.112] ([163.14.1.11]) by az33exr02.mot.com (Motorola/az33exr02) with ESMTP id i72DvZVh017469; Mon, 2 Aug 2004 08:57:35 -0500 In-Reply-To: <41058139.5040400@pobox.com> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <40EB89CC.2040100@pobox.com> <10E7AA25-DF50-11D8-90B5-000393C30512@freescale.com> <41058139.5040400@pobox.com> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <277DBAC2-E48C-11D8-BC10-000393DBC2E8@freescale.com> Content-Transfer-Encoding: 7bit Cc: Andy Fleming , Kumar Gala , netdev@oss.sgi.com, dwmw2@infradead.org, hadi@cyberus.ca, Andy Fleming From: Kumar Gala Subject: Re: [RFR] gianfar ethernet driver Date: Mon, 2 Aug 2004 08:59:21 -0500 To: Jeff Garzik X-Mailer: Apple Mail (2.618) X-archive-position: 7413 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kumar.gala@freescale.com Precedence: bulk X-list: netdev Jeff, Any update on this review of Andy's latest fixes? thanks - kumar On Jul 26, 2004, at 5:10 PM, Jeff Garzik wrote: > Andy Fleming wrote: >> Argh. We found a couple bugs in that last patch. This patch fixes >> those bugs. However, please note that the patch is done against the >> original submission from weeks ago. This patch replaces my most >> recent patch. > > > Thanks, I'll look it over. > > I've been away celebrating (or mourning) my 30th birthday, and have > several patches to run through. I'll add it to the pile, though it > may be a few days before I get to it. > > Jeff From bernie@step.polymtl.ca Mon Aug 2 07:06:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 07:07:02 -0700 (PDT) Received: from tomts16-srv.bellnexxia.net (tomts16.bellnexxia.net [209.226.175.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72E6uAK020279 for ; Mon, 2 Aug 2004 07:06:56 -0700 Received: from [192.168.0.100] ([67.68.201.22]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20040802140651.YVTU9492.tomts16-srv.bellnexxia.net@[192.168.0.100]> for ; Mon, 2 Aug 2004 10:06:51 -0400 Message-ID: <410E4C16.6070604@step.polymtl.ca> Date: Mon, 02 Aug 2004 10:13:42 -0400 From: Bertrand Guay-Paquet User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: skb_clone slower than copying skb data Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7414 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bernie@step.polymtl.ca Precedence: bulk X-list: netdev Hello, I am writing a patch for the usbnet driver to add support for the Prolific PL2501 USB host-to-host cable. My question is entirely related to netdev business however, so please read on. In order to achieve Win32 interropability, the driver needs to receive up to 6 ethernet packets wrapped up in a single skb. My current implementation for reading the contained individual packets is: (simplified to show relevant parts) for (each packet in skb except last one) { length = packet_length(); if (!(skb2 = alloc_skb(length, GFP_ATOMIC))) return -ENOMEM; //Copy the data related to the current ethernet packet memcpy(skb_put(skb2, length), skb->data, length); //Jump to next ethernet packet skb_pull(skb, length); netif_rx(skb2); } //Process last packet netif_rx(skb); ========== This works very well but uses unnecessary memory for the memcpy. I then tried: (again simplified to show relevant parts): for (each packet in skb except last one) { length = packet_length(); if (!(skb2 = skb_clone(skb, GFP_ATOMIC))) return -ENOMEM; //Copy the data related to the current ethernet packet skb_trim(skb2, length); //Jump to next ethernet packet skb_pull(skb, length); netif_rx(skb2); } //Process last packet netif_rx(skb); ========== This works as well, but the throughput is cut in half. How can this be so? Is skb_clone combined with netif_rx supposed to be so slow? I have searched other uses of skb_clone and have not found any similar to mine so I do not know if this is normal behaviour or not. I have tried using skb_clone with 2.4.26 and 2.6.7 with the same results. Any help would be greatly appreciated! Bertrand From SRS0+c8a65e14805b63b7c82e+344+infradead.org+hch@phoenix-150906.srs.infradead.org Mon Aug 2 07:09:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 07:09:40 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72E9TPW020621 for ; Mon, 2 Aug 2004 07:09:32 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1BrdUv-0001Oz-TA; Mon, 02 Aug 2004 15:09:05 +0100 Date: Mon, 2 Aug 2004 15:09:05 +0100 From: Christoph Hellwig To: Kumar Gala Cc: Jeff Garzik , Andy Fleming , Kumar Gala , netdev@oss.sgi.com, dwmw2@infradead.org, hadi@cyberus.ca, Andy Fleming Subject: Re: [RFR] gianfar ethernet driver Message-ID: <20040802150905.A5381@infradead.org> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <40EB89CC.2040100@pobox.com> <10E7AA25-DF50-11D8-90B5-000393C30512@freescale.com> <41058139.5040400@pobox.com> <277DBAC2-E48C-11D8-BC10-000393DBC2E8@freescale.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: <277DBAC2-E48C-11D8-BC10-000393DBC2E8@freescale.com>; from kumar.gala@freescale.com on Mon, Aug 02, 2004 at 08:59:21AM -0500 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7415 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 Mon, Aug 02, 2004 at 08:59:21AM -0500, Kumar Gala wrote: > Jeff, > > Any update on this review of Andy's latest fixes? > > thanks > > - kumar So when will you fix the modular compile? From kumar.gala@freescale.com Mon Aug 2 07:12:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 07:12:13 -0700 (PDT) Received: from motgate3.mot.com (motgate3.mot.com [144.189.100.103]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72EC851021014 for ; Mon, 2 Aug 2004 07:12:08 -0700 Received: from az33exr02.mot.com (az33exr02.mot.com [10.64.251.232]) by motgate3.mot.com (Motorola/Motgate3) with ESMTP id i72EBkiC003772; Mon, 2 Aug 2004 07:11:49 -0700 (MST) Received: from [192.168.123.112] ([163.14.1.11]) by az33exr02.mot.com (Motorola/az33exr02) with ESMTP id i72E9xVh005035; Mon, 2 Aug 2004 09:10:00 -0500 In-Reply-To: <20040802150905.A5381@infradead.org> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <40EB89CC.2040100@pobox.com> <10E7AA25-DF50-11D8-90B5-000393C30512@freescale.com> <41058139.5040400@pobox.com> <277DBAC2-E48C-11D8-BC10-000393DBC2E8@freescale.com> <20040802150905.A5381@infradead.org> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: Jeff Garzik , , Kumar Gala , , Andy Fleming , From: Kumar Gala Subject: Re: [RFR] gianfar ethernet driver Date: Mon, 2 Aug 2004 09:11:44 -0500 To: Christoph Hellwig X-Mailer: Apple Mail (2.618) X-archive-position: 7416 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kumar.gala@freescale.com Precedence: bulk X-list: netdev hch, Will look at it today. Was not aware of this still not work. thanks - kumar On Aug 2, 2004, at 9:09 AM, Christoph Hellwig wrote: > On Mon, Aug 02, 2004 at 08:59:21AM -0500, Kumar Gala wrote: >> Jeff, >> >> Any update on this review of Andy's latest fixes? >> >> thanks >> >> - kumar > > So when will you fix the modular compile? From kumar.gala@freescale.com Mon Aug 2 08:26:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 08:26:54 -0700 (PDT) Received: from motgate8.mot.com (motgate8.mot.com [129.188.136.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72FQla5026193 for ; Mon, 2 Aug 2004 08:26:47 -0700 Received: from il06exr02.mot.com (il06exr02.mot.com [129.188.137.132]) by motgate8.mot.com (Motorola/Motgate8) with ESMTP id i72FRSRC017075; Mon, 2 Aug 2004 08:27:29 -0700 (MST) Received: from [10.82.17.247] ([10.82.17.247]) by il06exr02.mot.com (Motorola/il06exr02) with ESMTP id i72FPMO6000950; Mon, 2 Aug 2004 10:25:23 -0500 In-Reply-To: <9DFF23E1E33391449FDC324526D1F25902833769@sjc1exm02.pmc_nt.nt.pmc-sierra.bc.ca> References: <9DFF23E1E33391449FDC324526D1F25902833769@sjc1exm02.pmc_nt.nt.pmc-sierra.bc.ca> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <578EC36E-E498-11D8-939F-000393DBC2E8@freescale.com> Content-Transfer-Encoding: 7bit Cc: Jeff Garzik , , , , Ralf Baechle From: Kumar Gala Subject: Re: [RFC,PATCH] fastroute dead code... Date: Mon, 2 Aug 2004 10:26:36 -0500 To: Manish Lachwani X-Mailer: Apple Mail (2.618) X-archive-position: 7417 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kumar.gala@freescale.com Precedence: bulk X-list: netdev I want to say an internal group in Freescale has seen similar style performance improvements for integrated gig-e controllers in 2.4. - kumar On Jul 30, 2004, at 3:31 PM, Manish Lachwani wrote: > Is this a 2.6 issue or a 2.4 issue? This is because I am using 2.4.21 > kernel and so do the customers of the board. This board supports 1.0 > Ghz PMC-Sierra Rm9000 processor. With fast routing, the IP forwarding > numbers are about 900 Kpps. While in the case where there is no fast > routing, the numbers are about 450 Kpps (NAPI enabled) > > I still have not done any 2.6 benchmarking since the board support is > not completely functional in 2.6 as yet. > > Thanks > Manish > > -----Original Message----- > From: jamal [mailto:hadi@cyberus.ca] > Sent: Friday, July 30, 2004 1:35 PM > To: Manish Lachwani > Cc: Jeff Garzik; tmattox@gmail.com; netdev@oss.sgi.com; Ralf Baechle > Subject: Re: [RFC,PATCH] fastroute dead code... > > > On Fri, 2004-07-30 at 16:10, David S. Miller wrote: >> On Fri, 30 Jul 2004 15:35:15 -0400 >> Jeff Garzik wrote: >> >>> It is dead code, as-is, in the kernel. It would require patches to >>> actually work at all. >>> >>> It is impossible that fastrouting is being actively used, without >>> patches. >> >> I totally agree. And people can always resurrect it from the >> repository history or an old tarball if they wish. > > Patches are needed for the driver to use that code. So its not entirely > dead code i.e it is referenced from fastroute enabled drivers. > Sample (really old) code found at: > http://ftp.iasi.roedu.net/mirrors/ftp.inr.ac.ru/ip-routing/fastroute/ > > >> I think it should be killed entirely, and that's what I'm going >> to do. > > Nod from here. > Before you kill it lets hear from Ralf who is acquinted with someone > that uses it and sings praises of it (although i personaly dont believe > it ;->). > > cheers, > jamal From rddunlap@osdl.org Mon Aug 2 08:47:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 08:47:39 -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 i72FlV39026753 for ; Mon, 2 Aug 2004 08:47:33 -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 i72FlG130409; Mon, 2 Aug 2004 08:47:16 -0700 Date: Mon, 2 Aug 2004 08:38:37 -0700 From: "Randy.Dunlap" To: bruce@it.usyd.edu.au (Bruce Janson) Cc: netdev@oss.sgi.com, bruce@it.usyd.edu.au Subject: Re: 2.6.7 kernel boot-time configuration of a non-modular tulip driver Message-Id: <20040802083837.131a17e3.rddunlap@osdl.org> In-Reply-To: <200408021341.i72Df9TP021569@nlp0.cs.usyd.edu.au> References: <200408021341.i72Df9TP021569@nlp0.cs.usyd.edu.au> Organization: OSDL X-Mailer: Sylpheed version 0.9.8a (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: 7418 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 On Mon, 02 Aug 2004 23:29:20 +1000 Bruce Janson wrote: | Hi Randy, | Thanks for your reply. | | (moving this to netdev mailing list) | ... | | [OK, but please Cc me explicitly as I don't subscribe to netdev.] | | On Sun, 01 Aug 2004 00:48:22 +1000 Bruce Janson wrote: | | | I have a linux 2.6.7 kernel which contains a compiled-in tulip driver. | | I would like to be able to boot the kernel with parameters that | | will allow control of the tulip device. On some ethernet devices | | this used to be possible via (something like): | | | | ether=0,0,1,0,eth0 | | | | which would pass the four numeric parameters (as, I think, dev->irq, | | dev->ioaddr, dev->mem_start and dev->mem_end) to the net driver that | | controlled eth0. A convention adopted by some net drivers then allowed | | dev->mem_start to be interpretted as a set of flags that would control | | device characteristics (e.g. full-duplex vs half-duplex mode). | | In .../linux-2.6.7/drivers/net/tulip/tulip_core.c:1587: | | | | if (dev->mem_start & MEDIA_MASK) | | tp->default_port = dev->mem_start & MEDIA_MASK; | | | | suggests that this might still work. However, I have been unable | | to force dev->mem_start in that driver to become non-zero via any | | kernel boot-time parameters. My limited understanding of the code | | that precedes the above lines in that file suggests that the "dev" | | structure is not what it used to be... | | The driver never calls netdev_boot_setup_check(), which is | what would give the driver its command line parameters. | | Did this work in early 2.6.x? There have been several changes | in this area. | ... | | No idea. This is the first in the 2.6 kernel series that I have | tried. | | The driver can't do a simple call to netdev_boot_setup_check() | because that will overwrite dev-> {irq, base_addr, mem_start, mem_end}, | and those values come from PCI config space for PCI drivers. | The driver could create a fake for that purpose, but it's | more likely that ethtool or mii-tool should be used to change | media/speed etc... Although now that I look at the driver source | code, I don't see ethtool or mii-tool support for those options. | ... | | Yes (tried that too :-(). Which/what have you tried? Is it possible for you to use the tulip driver as modular instead of builtin? With modular, you can set the parameters... but your environment may not allow modular? | | ../linux-2.6.7/Documentation/kernel-parameters.txt:402 still | | mentions "ether=..." but marks it as obsolete, replaced by | | the equivalent "netdev=...". Elsewhere in that file, the entry | | for "netdev=..." describes what appears to be the functionality | | that I seek. | | | | So, is it still possible to perform the same sort of control | | operations on a tulip driver via kernel boot-time parameters | | as one can do via module load-time parameters? If so, how? | | The current tulip-core driver supports setting only the default transceiver | (media type) on the kernel boot/command line when the driver is built into | the kernel image (using mem_start, as you noted above). | ... | | Sorry, I don't follow the above. Would you mind giving me an example, | please, of how for the tulip driver I might set the default transceiver | (media type) on the kernel boot/command line when the driver is built | into the kernel image? No, I can't. tulip-core uses to mean transceiver, but like I said above, it never calls netdev_boot_setup_check() to get that data, so it's useless currently. Sorry. I'm hoping that someone else will chime in with suggestions for the right thing to do here. -- ~Randy From bruce@cs.usyd.edu.au Mon Aug 2 09:32:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 09:32:51 -0700 (PDT) Received: from staff.cs.usyd.edu.au (staff.cs.usyd.edu.au [129.78.8.1]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i72GWfit027725 for ; Mon, 2 Aug 2004 09:32:42 -0700 Received: from nlp0.cs.usyd.edu.au. [129.78.10.52] by staff.cs.usyd.edu.au.; Tue, 03 Aug 2004 02:32:34 +1000 Received: from nlp0.cs.usyd.edu.au (localhost.cs.usyd.edu.au [127.0.0.1]) by nlp0.cs.usyd.edu.au (8.12.8/8.12.8) with ESMTP id i72GWYYo022014 for ; Tue, 3 Aug 2004 02:32:34 +1000 Received: (from bruce@localhost) by nlp0.cs.usyd.edu.au (8.12.8/8.12.8/Submit) id i72GWYfs022012 for netdev@oss.sgi.com; Tue, 3 Aug 2004 02:32:34 +1000 Message-Id: <200408021632.i72GWYfs022012@nlp0.cs.usyd.edu.au> Date: Tue, 03 Aug 2004 01:58:46 +1000 From: bruce@it.usyd.edu.au (Bruce Janson) Subject: Re: 2.6.7 kernel boot-time configuration of a non-modular tulip driver To: netdev@oss.sgi.com Cc: bruce@it.usyd.edu.au X-archive-position: 7419 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bruce@it.usyd.edu.au Precedence: bulk X-list: netdev From rddunlap@osdl.org Tue Aug 03 01:47:23 2004 ... On Mon, 02 Aug 2004 23:29:20 +1000 Bruce Janson wrote: ... | On Sun, 01 Aug 2004 00:48:22 +1000 Bruce Janson wrote: | | | I have a linux 2.6.7 kernel which contains a compiled-in tulip driver. | | I would like to be able to boot the kernel with parameters that | | will allow control of the tulip device. On some ethernet devices | | this used to be possible via (something like): | | | | ether=0,0,1,0,eth0 | | | | which would pass the four numeric parameters (as, I think, dev->irq, | | dev->ioaddr, dev->mem_start and dev->mem_end) to the net driver that | | controlled eth0. A convention adopted by some net drivers then allowed | | dev->mem_start to be interpretted as a set of flags that would control | | device characteristics (e.g. full-duplex vs half-duplex mode). | | In .../linux-2.6.7/drivers/net/tulip/tulip_core.c:1587: | | | | if (dev->mem_start & MEDIA_MASK) | | tp->default_port = dev->mem_start & MEDIA_MASK; | | | | suggests that this might still work. However, I have been unable | | to force dev->mem_start in that driver to become non-zero via any | | kernel boot-time parameters. My limited understanding of the code | | that precedes the above lines in that file suggests that the "dev" | | structure is not what it used to be... | | The driver never calls netdev_boot_setup_check(), which is | what would give the driver its command line parameters. | | Did this work in early 2.6.x? There have been several changes | in this area. | ... | | No idea. This is the first in the 2.6 kernel series that I have | tried. | | The driver can't do a simple call to netdev_boot_setup_check() | because that will overwrite dev-> {irq, base_addr, mem_start, mem_end}, | and those values come from PCI config space for PCI drivers. | The driver could create a fake for that purpose, but it's | more likely that ethtool or mii-tool should be used to change | media/speed etc... Although now that I look at the driver source | code, I don't see ethtool or mii-tool support for those options. | ... | | Yes (tried that too :-(). Which/what have you tried? ... By that I meant that I had tried to use ethtool to change settings after boot and found that the tulip driver did not support use of ethtool in that way. I have not tried mii-tool (recently). However, neither of these are a satisfactory solution as I need to have the interace come up in the desired mode initially, not some time later. | | ../linux-2.6.7/Documentation/kernel-parameters.txt:402 still | | mentions "ether=..." but marks it as obsolete, replaced by | | the equivalent "netdev=...". Elsewhere in that file, the entry | | for "netdev=..." describes what appears to be the functionality | | that I seek. | | | | So, is it still possible to perform the same sort of control | | operations on a tulip driver via kernel boot-time parameters | | as one can do via module load-time parameters? If so, how? | | The current tulip-core driver supports setting only the default transceiver | (media type) on the kernel boot/command line when the driver is built into | the kernel image (using mem_start, as you noted above). | ... | | Sorry, I don't follow the above. Would you mind giving me an example, | please, of how for the tulip driver I might set the default transceiver | (media type) on the kernel boot/command line when the driver is built | into the kernel image? No, I can't. tulip-core uses to mean transceiver, but like I said above, it never calls netdev_boot_setup_check() to get that data, so it's useless currently. Sorry. ... No need to apologise. All I wanted to hear was that someone who actually understood the code agreed that the tulip driver, this boot-time parameter setting mechanism and the documentation (such as it is) are currently mutually buggered :-). Now that I know that, I can stop beating my head against the wall trying to work out what I have done wrong and instead, get on with working around this limitation. Many thanks! :-) From rmk+netdev=oss.sgi.com@arm.linux.org.uk Mon Aug 2 12:02:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 12:02: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 i72J2QZR003078 for ; Mon, 2 Aug 2004 12:02:28 -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.33) id 1Bri4Z-0004Qi-B6; Mon, 02 Aug 2004 20:02:11 +0100 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.33) id 1Bri4Y-0002Wk-Cq; Mon, 02 Aug 2004 20:02:10 +0100 Date: Mon, 2 Aug 2004 20:02:10 +0100 From: Russell King To: "David S. Miller" Cc: jgarzik@pobox.com, shemminger@osdl.org, netdev@oss.sgi.com, greg@kroah.com Subject: Re: [Fwd: pcmcia ether drivers can't be unloaded] Message-ID: <20040802200210.A9498@flint.arm.linux.org.uk> References: <41068BEF.7010200@pobox.com> <20040727233614.B30782@flint.arm.linux.org.uk> <20040727171929.17858c7b.davem@redhat.com> <20040728165024.A8475@flint.arm.linux.org.uk> <20040728085419.773c4d94.davem@redhat.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: <20040728085419.773c4d94.davem@redhat.com>; from davem@redhat.com on Wed, Jul 28, 2004 at 08:54:19AM -0700 X-archive-position: 7420 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk@arm.linux.org.uk Precedence: bulk X-list: netdev On Wed, Jul 28, 2004 at 08:54:19AM -0700, David S. Miller wrote: > On Wed, 28 Jul 2004 16:50:24 +0100 > Russell King wrote: > > > On Tue, Jul 27, 2004 at 05:19:29PM -0700, David S. Miller wrote: > > > I totally disagree. This is a bogus argument for two reasons: > > > > You may disagree, that is your option. However, facts are facts - > > this is how the PCMCIA layer currently works, and short of rewriting > > the whole damned thing it isn't going to change. Sorry. > > Stephen offered a solution, moving this stray refcount into a toplevel > pcmcia bus type object. We are not constrained by how the PCMCIA layer > currently works, just as we were not constrained a year ago by how the > generic network device handling worked when it was totally broken in > this area. We just fixed it instead of whining. Sorry, I'm not the one whining here. I just have _ZERO_ time at the moment because I'm still in Canada and only have sporadic access to stuff. Sorry if this doesn't meet your requirements, but this is the best I can offer you at the moment. In short, my best and only answer is "tough, live with it until I can investigate." -- 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 manfred@colorfullife.com Mon Aug 2 12:37:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 12:37:40 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72JbItf010698 for ; Mon, 2 Aug 2004 12:37:29 -0700 Received: from colorfullife.com (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i72JaXuG014435; Mon, 2 Aug 2004 21:36:34 +0200 Message-ID: <410E9841.8000100@colorfullife.com> Date: Mon, 02 Aug 2004 21:38:41 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Drabb CC: netdev@oss.sgi.com, c-d.hailfinger.kernel.2004@gmx.net Subject: Re: forcedeth References: <410D3377.3030505@tampabay.rr.com> <410D4120.2020604@colorfullife.com> <410D682F.4090809@tampabay.rr.com> In-Reply-To: <410D682F.4090809@tampabay.rr.com> Content-Type: multipart/mixed; boundary="------------090405070803030805000201" X-archive-position: 7421 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 This is a multi-part message in MIME format. --------------090405070803030805000201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit James Drabb wrote: >> Manfred > > -- > > Please send me the latest forcedeth.c and I will give it a go. Do you > have the makefile so I can compile the module outside of the kernel? > No - you need the 2.6.7 tree as the base. Attached is the patch against 2.6.7 I'm again interested in the same sequence as you did after booting into WinXP, just without WinXP: modprobe, wait, ifup, ethtool, unplug cable, ethtool, plug cable back in, ethtool Always wait ~ 5 seconds before calling ethtool. The patch is a special version, it already contains a timer that polls for phy state changes and prints them into the kernel log (dmesg). -- Manfred --------------090405070803030805000201 Content-Type: text/plain; name="patch-fff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-fff" // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 7 // EXTRAVERSION = --- 2.6/drivers/net/forcedeth.c 2004-08-02 21:19:05.979380576 +0200 +++ build-2.6/drivers/net/forcedeth.c 2004-08-02 21:16:47.678405520 +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,18 @@ * 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 * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -80,7 +86,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.28a" +#define DRV_NAME "forcedeth" #include #include @@ -117,12 +124,14 @@ #define DEV_IRQMASK_1 0x0002 #define DEV_IRQMASK_2 0x0004 #define DEV_NEED_TIMERIRQ 0x0008 +#define DEV_NEED_LINKTIMER 0x0010 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 +141,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 +168,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 +177,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 +192,9 @@ enum { NvRegMulticastMaskA = 0xB8, NvRegMulticastMaskB = 0xBC, + NvRegPhyInterface = 0xC0, +#define PHY_RGMII 0x10000000 + NvRegTxRingPhysAddr = 0x100, NvRegRxRingPhysAddr = 0x104, NvRegRingSizes = 0x108, @@ -189,12 +203,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 +227,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 +267,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 +349,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 +427,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 +448,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 +460,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 +485,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 +517,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 +550,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 */ + 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 +675,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 +687,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 +710,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 +719,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); } @@ -650,11 +841,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 +861,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 +894,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 +909,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 +926,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 +958,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 +980,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 +993,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 +1078,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 +1088,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 +1108,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 +1117,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 +1204,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 +1268,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 +1277,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,47 +1349,75 @@ 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; + +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); + + writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), + base + NvRegMisc1); + pci_push(base); + writel(np->linkspeed, base + NvRegLinkSpeed); + pci_push(base); + + return retval; } 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; miistat = readl(base + NvRegMIIStatus); writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - printk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); +printk(KERN_INFO "%s: link change notification, status 0x%x.\n", dev->name, miistat); - miival = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); - if (miival & BMSR_ANEGCOMPLETE) { - nv_update_linkspeed(dev); - - if (netif_carrier_ok(dev)) { - nv_stop_rx(dev); + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) { + 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); + } + nv_start_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)) { - netif_carrier_off(dev); - printk(KERN_INFO "%s: link down.\n", dev->name); - nv_stop_rx(dev); + if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); + printk(KERN_INFO "%s: link down.\n", dev->name); + nv_stop_rx(dev); + } } - writel(np->linkspeed, base + NvRegLinkSpeed); - pci_push(base); } + 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) @@ -1135,7 +1444,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 +1459,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_link_irq(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 +1472,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 +1525,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 +1553,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 +1589,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 +1602,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 +1613,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 +1622,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; @@ -1424,7 +1724,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 +1747,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 +1814,63 @@ 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) { + np->need_linktimer = 1; + np->link_timeout = jiffies + LINK_TIMEOUT; + } else { + 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 +1925,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, @@ -1610,9 +2022,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.6/include/linux/pci_ids.h 2004-08-02 21:19:11.940474352 +0200 +++ build-2.6/include/linux/pci_ids.h 2004-08-02 21:17:46.234503640 +0200 @@ -1061,21 +1061,33 @@ #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_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_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_NFORCE2S_SATA 0x008e #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 #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_NFORCE3S_SATA2 0x00ee #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 @@ -1103,6 +1115,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 --------------090405070803030805000201-- From vkondra@mail.ru Mon Aug 2 12:39:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 12:39:30 -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 i72JdGMx011061 for ; Mon, 2 Aug 2004 12:39:16 -0700 Received: from [82.80.15.190] (port=14176 helo=[192.168.10.2]) by mx2.mail.ru with esmtp id 1BrieL-000IEm-00 for netdev@oss.sgi.com; Mon, 02 Aug 2004 23:39:10 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: TGe overview #3 Date: Mon, 2 Aug 2004 22:38:57 +0300 User-Agent: KMail/1.6.82 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6500354.cgk6mvoYQD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408022239.04871.vkondra@mail.ru> X-Spam: Not detected X-archive-position: 7422 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 --nextPart6500354.cgk6mvoYQD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =46inally, let's review Traffic Streams. There are 2 different concepts: logical layer (admission) and completely ne= w=20 media access mechanism HCCA (Hybrid Coordinator Channel Access). Idea behind HCCA is similar to PCF (Point Coordinator Function) from old=20 802.11 standard. Hybrid Coordinator (HC), which have to be AP, decides who= =20 will talk when. Technically it is implemented as following: All time divided into contention based (EDCA TXOP's) and contention free CA= P=20 (Controlled AccessPhase). When HC want to start CAP, it simply starts it=20 after PIFS interval of idle media. PIFS is shorter then any interval betwee= n=20 EDCA frame exchange sequences, thus HC will preempt any EDCA flow at his=20 will. Then, HC can either transmit frames, or it may send Contention Free=20 Poll (CFP) frame to some STA. This frame gives to the STA "polled" TXOP, in= =20 contrast with EDCA TXOP. CFP frame provides TXOP duration. Now, admission control. For HCCA it is the only mechanism. But, admission=20 control may be activated also for 2 high priority EDCA categories. =46or EDCA it mean the following: one can't use these categories as it was= =20 described in EDCA, instead, TID should be obtained. For EDCA this mechanism= =20 used to control bandwidth allocation. But remember, EDCA is contention base= d=20 policy, without any guarantee. TID's 8-15 dedicates to TS (Traffic Streams). In order to obtain TID, STA=20 should send request to AP. Corresponded frame called ADDTS, it contain=20 traffic specification: requested bandwidth, delay, periodicity, frame size= =20 etc. AP may accept or decline this request. It may also come with counter=20 proposal with different parameters. TS may be up-stream, down-stream, or bi-direction If TS accepted by AP, AP provides schedule information. This information=20 consist of Service Interval (SI) - interval between successive Service=20 Periods (SP), during which AP serves this TS, and Start Time. Start time have the following meaning: STA may request exact timing in ADDT= S=20 request. In this case, it will be served at precise times StartTime+n*SI.=20 This used for power save: STA may identify itself as power down, but wake u= p=20 for its stream. Obvious usage is .11 phones. Here, important QoS related part is: AP admin decides upon admission control policy. For "legacy stations", that= =20 don't speak TS (stations implementing WME spec), it may provide only 2 low= =20 priority access categories. These STA will be severely impacted in=20 performance. STA have to know TGE in order to get real performance. And, STA need to kno= w=20 how to identify streams (RSVP like). One additional feature: DLP (Direct Link Protocol). Unrelated to anything=20 else. Idea is to let 2 stations to talk directly. Link establishment is=20 through AP, but later they send frames directly, reducing media time 2x. Th= is=20 is important for applications like streaming of high definition TV, for whi= ch=20 "usual" way when AP forward frames, is unacceptable. P.S. I did not covered many other stuff which is not related directly to Qo= S. --nextPart6500354.cgk6mvoYQD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBDphYqxdj7mhC6o0RAmzAAKCFDMlYn7QuujVswZshlWPTZehMMQCgpXEw 7UWwHkUzYOgsx0c61i82UpU= =QGXS -----END PGP SIGNATURE----- --nextPart6500354.cgk6mvoYQD-- From akpm@osdl.org Mon Aug 2 14:23:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 14:23: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 i72LNo8Z016626 for ; Mon, 2 Aug 2004 14:23:50 -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 i72LNd131100; Mon, 2 Aug 2004 14:23:39 -0700 Date: Mon, 2 Aug 2004 14:27:06 -0700 From: Andrew Morton To: Matthias Andree Cc: netdev@oss.sgi.com Subject: Re: 2.6.8-rc2-mm1 breaks PPPoE for me (was: 2.6.8-rc2-mm1) Message-Id: <20040802142706.46100c6d.akpm@osdl.org> In-Reply-To: <20040731100947.GA7453@merlin.emma.line.org> References: <20040728020444.4dca7e23.akpm@osdl.org> <20040731100947.GA7453@merlin.emma.line.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: 7423 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 Matthias Andree wrote: > > On Wed, 28 Jul 2004, Andrew Morton wrote: > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8-rc2/2.6.8-rc2-mm1/ > ... > > gcc35-pppoe.c.patch > > gcc-3.5 fixes > > Andrew, > > I'm not sure if my problem is related to this patch, but in > 2.6.8-rc2-mm1, PPPoE doesn't work for me, kernel compiled with gcc (GCC) > 3.3.1 (SuSE Linux), a vanilla 2.6.7 is fine with the same compiler. > > pppd[5685]: Plugin /usr/lib/pppd/2.4.1/pppoe.so loaded. > pppd[5685]: PPPoE Plugin Initialized > pppd[5685]: pppd 2.4.1 started by root, uid 0 > pppd[5685]: Sending PADI > pppd[5685]: HOST_UNIQ successful match > pppd[5685]: Failed to negotiate PPPoE connection: 25 Inappropriate ioctl for device > pppd[5685]: Exit. > > A successful pppd session start, with 2.6.7, looks like this: > > pppd[5070]: PPPoE Plugin Initialized > pppd[5070]: pppd 2.4.1 started by root, uid 0 > pppd[5070]: Sending PADI > pppd[5070]: HOST_UNIQ successful match > pppd[5070]: HOST_UNIQ successful match > pppd[5070]: Got connection: 164b > pppd[5070]: Connecting PPPoE socket: 00:90:1a:XX:XX:XX 4b16 eth1 0x808a560 > /sbin/hotplug[5166]: INTERFACE=ppp0 > pppd[5070]: Using interface ppp0 > pppd[5070]: Connect: ppp0 <--> eth1 > pppd[5070]: Setting MTU to 1492. > pppd[5070]: Couldn't increase MRU to 1500 > pppd[5070]: Setting MTU to 1492. > pppd[5070]: local IP address 217.81.XXX.XXX > pppd[5070]: remote IP address 217.5.XXX.XXX > pppd[5070]: Script /etc/ppp/ip-up finished (pid 5180), status = 0x0 > I'm a bit stumped by this - I'm not aware of any change which would have caused the pppoe device to start returning -ENOTTY. Is this still happening? Are you sure the relevant modules are loaded? Could you capture an strace of pppd while it's happening? From afleming@freescale.com Mon Aug 2 15:19:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 15:19:52 -0700 (PDT) Received: from motgate3.mot.com (motgate3.mot.com [144.189.100.103]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72MJhZt018057 for ; Mon, 2 Aug 2004 15:19:46 -0700 Received: from az33exr04.mot.com (pobox4.mot.com [10.64.251.243]) by motgate3.mot.com (Motorola/Motgate3) with ESMTP id i72MJKiC008676; Mon, 2 Aug 2004 15:19:20 -0700 (MST) Received: from [10.82.17.240] ([10.82.17.240]) by az33exr04.mot.com (Motorola/az33exr04) with ESMTP id i72KJBoa015263; Mon, 2 Aug 2004 15:19:11 -0500 In-Reply-To: <20040707032913.GA1822@havoc.gtf.org> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <1089170282.1038.80.camel@jzny.localdomain> <20040707032913.GA1822@havoc.gtf.org> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: Andy Fleming , Kumar Gala , "" , jamal , "" , Christoph Hellwig From: Andy Fleming Subject: Re: [RFR] gianfar ethernet driver Date: Mon, 2 Aug 2004 17:19:13 -0500 To: Jeff Garzik X-Mailer: Apple Mail (2.618) X-archive-position: 7424 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: afleming@freescale.com Precedence: bulk X-list: netdev Here's an updated patch which fixes module support which does this: * More cleanup/minor bug fixes * Added locking to PHY read/write wrappers * Fixed module support * Removed fastroute code As before, this patch replaces the previous ones I have submitted. Thanks, Andy Fleming From bunk@fs.tum.de Mon Aug 2 15:33:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 15:33:58 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i72MXoCC018554 for ; Mon, 2 Aug 2004 15:33:51 -0700 Received: (qmail 22776 invoked from network); 2 Aug 2004 22:26:27 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 2 Aug 2004 22:26:27 -0000 Date: Tue, 3 Aug 2004 00:33:32 +0200 From: Adrian Bunk To: Jeff Garzik Cc: linux-net@vger.kernel.org, Netdev , linux-kernel@vger.kernel.org Subject: [2.6 patch] fix net/hamradio/dmascc with gcc 3.4 Message-ID: <20040802223332.GP2746@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7425 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev Trying to compile net/hamradio/dmascc.c in 2.6.8-rc2-mm2 with gcc 3.4 results in compile errors starting with the following: <-- snip --> ... CC drivers/net/hamradio/dmascc.o drivers/net/hamradio/dmascc.c: In function `scc_isr': drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining failed in call to 'z8530_isr': function body not available drivers/net/hamradio/dmascc.c:969: sorry, unimplemented: called from here drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining failed in call to 'z8530_isr': function body not available drivers/net/hamradio/dmascc.c:978: sorry, unimplemented: called from here make[3]: *** [drivers/net/hamradio/dmascc.o] Error 1 <-- snip --> The patch below moves all inline functions above their first caller. diffstat output: drivers/net/hamradio/dmascc.c | 290 ++++++++++++++++------------------ 1 files changed, 144 insertions(+), 146 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.7-mm7-full-gcc3.4/drivers/net/hamradio/dmascc.c.old 2004-07-13 00:55:54.000000000 +0200 +++ linux-2.6.7-mm7-full-gcc3.4/drivers/net/hamradio/dmascc.c 2004-07-13 01:01:06.000000000 +0200 @@ -246,8 +246,14 @@ static struct net_device_stats *scc_get_stats(struct net_device *dev); static int scc_set_mac_address(struct net_device *dev, void *sa); -static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); +static inline void tx_on(struct scc_priv *priv); +static inline void rx_on(struct scc_priv *priv); +static inline void rx_off(struct scc_priv *priv); +static void start_timer(struct scc_priv *priv, int t, int r15); +static inline unsigned char random(void); + static inline void z8530_isr(struct scc_info *info); +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); static void rx_isr(struct scc_priv *priv); static void special_condition(struct scc_priv *priv, int rc); static void rx_bh(void *arg); @@ -255,12 +261,6 @@ static void es_isr(struct scc_priv *priv); static void tm_isr(struct scc_priv *priv); -static inline void tx_on(struct scc_priv *priv); -static inline void rx_on(struct scc_priv *priv); -static inline void rx_off(struct scc_priv *priv); -static void start_timer(struct scc_priv *priv, int t, int r15); -static inline unsigned char random(void); - /* Initialization variables */ @@ -945,42 +945,115 @@ } -static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { - struct scc_info *info = dev_id; +static inline void tx_on(struct scc_priv *priv) { + int i, n; + unsigned long flags; - spin_lock(info->priv[0].register_lock); - /* At this point interrupts are enabled, and the interrupt under service - is already acknowledged, but masked off. + if (priv->param.dma >= 0) { + n = (priv->chip == Z85230) ? 3 : 1; + /* Program DMA controller */ + flags = claim_dma_lock(); + set_dma_mode(priv->param.dma, DMA_MODE_WRITE); + set_dma_addr(priv->param.dma, (int) priv->tx_buf[priv->tx_tail]+n); + set_dma_count(priv->param.dma, priv->tx_len[priv->tx_tail]-n); + release_dma_lock(flags); + /* Enable TX underrun interrupt */ + write_scc(priv, R15, TxUIE); + /* Configure DREQ */ + if (priv->type == TYPE_TWIN) + outb((priv->param.dma == 1) ? TWIN_DMA_HDX_T1 : TWIN_DMA_HDX_T3, + priv->card_base + TWIN_DMA_CFG); + else + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | WT_RDY_ENAB); + /* Write first byte(s) */ + spin_lock_irqsave(priv->register_lock, flags); + for (i = 0; i < n; i++) + write_scc_data(priv, priv->tx_buf[priv->tx_tail][i], 1); + enable_dma(priv->param.dma); + spin_unlock_irqrestore(priv->register_lock, flags); + } else { + write_scc(priv, R15, TxUIE); + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | TxINT_ENAB); + tx_isr(priv); + } + /* Reset EOM latch if we do not have the AUTOEOM feature */ + if (priv->chip == Z8530) write_scc(priv, R0, RES_EOM_L); +} - Interrupt processing: We loop until we know that the IRQ line is - low. If another positive edge occurs afterwards during the ISR, - another interrupt will be triggered by the interrupt controller - as soon as the IRQ level is enabled again (see asm/irq.h). - Bottom-half handlers will be processed after scc_isr(). This is - important, since we only have small ringbuffers and want new data - to be fetched/delivered immediately. */ +static inline void rx_on(struct scc_priv *priv) { + unsigned long flags; - if (info->priv[0].type == TYPE_TWIN) { - int is, card_base = info->priv[0].card_base; - while ((is = ~inb(card_base + TWIN_INT_REG)) & - TWIN_INT_MSK) { - if (is & TWIN_SCC_MSK) { - z8530_isr(info); - } else if (is & TWIN_TMR1_MSK) { - inb(card_base + TWIN_CLR_TMR1); - tm_isr(&info->priv[0]); - } else { - inb(card_base + TWIN_CLR_TMR2); - tm_isr(&info->priv[1]); - } + /* Clear RX FIFO */ + while (read_scc(priv, R0) & Rx_CH_AV) read_scc_data(priv); + priv->rx_over = 0; + if (priv->param.dma >= 0) { + /* Program DMA controller */ + flags = claim_dma_lock(); + set_dma_mode(priv->param.dma, DMA_MODE_READ); + set_dma_addr(priv->param.dma, (int) priv->rx_buf[priv->rx_head]); + set_dma_count(priv->param.dma, BUF_SIZE); + release_dma_lock(flags); + enable_dma(priv->param.dma); + /* Configure PackeTwin DMA */ + if (priv->type == TYPE_TWIN) { + outb((priv->param.dma == 1) ? TWIN_DMA_HDX_R1 : TWIN_DMA_HDX_R3, + priv->card_base + TWIN_DMA_CFG); } - } else z8530_isr(info); - spin_unlock(info->priv[0].register_lock); - return IRQ_HANDLED; + /* Sp. cond. intr. only, ext int enable, RX DMA enable */ + write_scc(priv, R1, EXT_INT_ENAB | INT_ERR_Rx | + WT_RDY_RT | WT_FN_RDYFN | WT_RDY_ENAB); + } else { + /* Reset current frame */ + priv->rx_ptr = 0; + /* Intr. on all Rx characters and Sp. cond., ext int enable */ + write_scc(priv, R1, EXT_INT_ENAB | INT_ALL_Rx | WT_RDY_RT | + WT_FN_RDYFN); + } + write_scc(priv, R0, ERR_RES); + write_scc(priv, R3, RxENABLE | Rx8 | RxCRC_ENAB); +} + + +static inline void rx_off(struct scc_priv *priv) { + /* Disable receiver */ + write_scc(priv, R3, Rx8); + /* Disable DREQ / RX interrupt */ + if (priv->param.dma >= 0 && priv->type == TYPE_TWIN) + outb(0, priv->card_base + TWIN_DMA_CFG); + else + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN); + /* Disable DMA */ + if (priv->param.dma >= 0) disable_dma(priv->param.dma); +} + + +static void start_timer(struct scc_priv *priv, int t, int r15) { + unsigned long flags; + + outb(priv->tmr_mode, priv->tmr_ctrl); + if (t == 0) { + tm_isr(priv); + } else if (t > 0) { + save_flags(flags); + cli(); + outb(t & 0xFF, priv->tmr_cnt); + outb((t >> 8) & 0xFF, priv->tmr_cnt); + if (priv->type != TYPE_TWIN) { + write_scc(priv, R15, r15 | CTSIE); + priv->rr0 |= CTS; + } + restore_flags(flags); + } } +static inline unsigned char random(void) { + /* See "Numerical Recipes in C", second edition, p. 284 */ + rand = rand * 1664525L + 1013904223L; + return (unsigned char) (rand >> 24); +} + static inline void z8530_isr(struct scc_info *info) { int is, i = 100; @@ -1009,6 +1082,42 @@ } +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { + struct scc_info *info = dev_id; + + spin_lock(info->priv[0].register_lock); + /* At this point interrupts are enabled, and the interrupt under service + is already acknowledged, but masked off. + + Interrupt processing: We loop until we know that the IRQ line is + low. If another positive edge occurs afterwards during the ISR, + another interrupt will be triggered by the interrupt controller + as soon as the IRQ level is enabled again (see asm/irq.h). + + Bottom-half handlers will be processed after scc_isr(). This is + important, since we only have small ringbuffers and want new data + to be fetched/delivered immediately. */ + + if (info->priv[0].type == TYPE_TWIN) { + int is, card_base = info->priv[0].card_base; + while ((is = ~inb(card_base + TWIN_INT_REG)) & + TWIN_INT_MSK) { + if (is & TWIN_SCC_MSK) { + z8530_isr(info); + } else if (is & TWIN_TMR1_MSK) { + inb(card_base + TWIN_CLR_TMR1); + tm_isr(&info->priv[0]); + } else { + inb(card_base + TWIN_CLR_TMR2); + tm_isr(&info->priv[1]); + } + } + } else z8530_isr(info); + spin_unlock(info->priv[0].register_lock); + return IRQ_HANDLED; +} + + static void rx_isr(struct scc_priv *priv) { if (priv->param.dma >= 0) { /* Check special condition and perform error reset. See 2.4.7.5. */ @@ -1292,114 +1401,3 @@ break; } } - - -static inline void tx_on(struct scc_priv *priv) { - int i, n; - unsigned long flags; - - if (priv->param.dma >= 0) { - n = (priv->chip == Z85230) ? 3 : 1; - /* Program DMA controller */ - flags = claim_dma_lock(); - set_dma_mode(priv->param.dma, DMA_MODE_WRITE); - set_dma_addr(priv->param.dma, (int) priv->tx_buf[priv->tx_tail]+n); - set_dma_count(priv->param.dma, priv->tx_len[priv->tx_tail]-n); - release_dma_lock(flags); - /* Enable TX underrun interrupt */ - write_scc(priv, R15, TxUIE); - /* Configure DREQ */ - if (priv->type == TYPE_TWIN) - outb((priv->param.dma == 1) ? TWIN_DMA_HDX_T1 : TWIN_DMA_HDX_T3, - priv->card_base + TWIN_DMA_CFG); - else - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | WT_RDY_ENAB); - /* Write first byte(s) */ - spin_lock_irqsave(priv->register_lock, flags); - for (i = 0; i < n; i++) - write_scc_data(priv, priv->tx_buf[priv->tx_tail][i], 1); - enable_dma(priv->param.dma); - spin_unlock_irqrestore(priv->register_lock, flags); - } else { - write_scc(priv, R15, TxUIE); - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | TxINT_ENAB); - tx_isr(priv); - } - /* Reset EOM latch if we do not have the AUTOEOM feature */ - if (priv->chip == Z8530) write_scc(priv, R0, RES_EOM_L); -} - - -static inline void rx_on(struct scc_priv *priv) { - unsigned long flags; - - /* Clear RX FIFO */ - while (read_scc(priv, R0) & Rx_CH_AV) read_scc_data(priv); - priv->rx_over = 0; - if (priv->param.dma >= 0) { - /* Program DMA controller */ - flags = claim_dma_lock(); - set_dma_mode(priv->param.dma, DMA_MODE_READ); - set_dma_addr(priv->param.dma, (int) priv->rx_buf[priv->rx_head]); - set_dma_count(priv->param.dma, BUF_SIZE); - release_dma_lock(flags); - enable_dma(priv->param.dma); - /* Configure PackeTwin DMA */ - if (priv->type == TYPE_TWIN) { - outb((priv->param.dma == 1) ? TWIN_DMA_HDX_R1 : TWIN_DMA_HDX_R3, - priv->card_base + TWIN_DMA_CFG); - } - /* Sp. cond. intr. only, ext int enable, RX DMA enable */ - write_scc(priv, R1, EXT_INT_ENAB | INT_ERR_Rx | - WT_RDY_RT | WT_FN_RDYFN | WT_RDY_ENAB); - } else { - /* Reset current frame */ - priv->rx_ptr = 0; - /* Intr. on all Rx characters and Sp. cond., ext int enable */ - write_scc(priv, R1, EXT_INT_ENAB | INT_ALL_Rx | WT_RDY_RT | - WT_FN_RDYFN); - } - write_scc(priv, R0, ERR_RES); - write_scc(priv, R3, RxENABLE | Rx8 | RxCRC_ENAB); -} - - -static inline void rx_off(struct scc_priv *priv) { - /* Disable receiver */ - write_scc(priv, R3, Rx8); - /* Disable DREQ / RX interrupt */ - if (priv->param.dma >= 0 && priv->type == TYPE_TWIN) - outb(0, priv->card_base + TWIN_DMA_CFG); - else - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN); - /* Disable DMA */ - if (priv->param.dma >= 0) disable_dma(priv->param.dma); -} - - -static void start_timer(struct scc_priv *priv, int t, int r15) { - unsigned long flags; - - outb(priv->tmr_mode, priv->tmr_ctrl); - if (t == 0) { - tm_isr(priv); - } else if (t > 0) { - save_flags(flags); - cli(); - outb(t & 0xFF, priv->tmr_cnt); - outb((t >> 8) & 0xFF, priv->tmr_cnt); - if (priv->type != TYPE_TWIN) { - write_scc(priv, R15, r15 | CTSIE); - priv->rr0 |= CTS; - } - restore_flags(flags); - } -} - - -static inline unsigned char random(void) { - /* See "Numerical Recipes in C", second edition, p. 284 */ - rand = rand * 1664525L + 1013904223L; - return (unsigned char) (rand >> 24); -} - From romieu@fr.zoreil.com Mon Aug 2 15:36:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 15:36:27 -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 i72MaCBJ018892 for ; Mon, 2 Aug 2004 15:36:19 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i72MZah9031941; Tue, 3 Aug 2004 00:35:36 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i72MZF4G031940; Tue, 3 Aug 2004 00:35:15 +0200 Date: Tue, 3 Aug 2004 00:35:15 +0200 From: Francois Romieu To: Pasi Sjoholm Cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) Message-ID: <20040803003515.A29885@electric-eye.fr.zoreil.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from ptsjohol@cc.jyu.fi on Mon, Aug 02, 2004 at 01:03:15PM +0300 X-Organisation: Land of Sunshine Inc. X-archive-position: 7426 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 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Pasi Sjoholm : > I forgot to mention that it was quite hard to crash the driver with that > /* Clear out errors and receive interrupts */-patch. Took about 15minutes > everytime, when normally it takes about 2mins. I have made a few changes. Please enable the DEBUG option and set msglvl to its maximal value via ethtool. You may test the patches separately if you find some time but the log once both r8139-10.patch and r8139-20.patch are applied would be enough. If the log fills too fast, you may comment out any message which does not belong to rtl8139_rx(). -- Ueimor --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="r8139-10.patch" - read the interruption status word that the driver will ack before the actual processing is done; - avoid a few heavy pci transactions when several packets are received at the same time. drivers/net/8139too.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff -puN drivers/net/8139too.c~r8139-10 drivers/net/8139too.c --- linux-2.6.8-rc2/drivers/net/8139too.c~r8139-10 2004-08-02 22:39:24.000000000 +0200 +++ linux-2.6.8-rc2-romieu/drivers/net/8139too.c 2004-08-02 23:08:00.000000000 +0200 @@ -1934,12 +1934,15 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); + status = RTL_R16 (IntrStatus) & RxAckBits; + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; @@ -1947,7 +1950,6 @@ static int rtl8139_rx(struct net_device unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1979,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +1991,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2024,21 +2027,20 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); + } + if (received > 0) { /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; if (likely(status != 0)) { if (unlikely(status & (RxFIFOOver | RxOverflow))) { tp->stats.rx_errors++; - if (status & RxFIFOOver) + if (status & RxFIFOOver) tp->stats.rx_fifo_errors++; } RTL_W16_F (IntrStatus, RxAckBits); } } - done: - #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, @@ -2047,6 +2049,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="r8139-20.patch" Let's be sure that the driver will make some progress/reset when crap hits the packet size descriptor. drivers/net/8139too.c | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletion(-) diff -puN drivers/net/8139too.c~r8139-20 drivers/net/8139too.c --- linux-2.6.8-rc2/drivers/net/8139too.c~r8139-20 2004-08-02 23:21:36.000000000 +0200 +++ linux-2.6.8-rc2-romieu/drivers/net/8139too.c 2004-08-03 00:13:56.000000000 +0200 @@ -593,6 +593,7 @@ struct rtl8139_private { int time_to_die; struct mii_if_info mii; unsigned int regs_len; + unsigned long fifo_copy_timeout; }; MODULE_AUTHOR ("Jeff Garzik "); @@ -1937,7 +1938,7 @@ static int rtl8139_rx(struct net_device u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," - " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, + " free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); @@ -1978,10 +1979,24 @@ static int rtl8139_rx(struct net_device * since EarlyRx is disabled. */ if (unlikely(rx_size == 0xfff0)) { + if (!tp->fifo_copy_timeout) + tp->fifo_copy_timeout = jiffies + 2; + else if (time_after(jiffies, tp->fifo_copy_timeout)) { + DPRINTK ("%s: hung FIFO. Reset.", dev->name); + rx_size = 0; + goto no_early_rx; + } + if (netif_msg_intr(tp)) { + printk(KERN_DEBUG "%s: fifo copy in progress.", + dev->name); + } tp->xstats.early_rx++; break; } +no_early_rx: + tp->fifo_copy_timeout = 0; + /* If Rx err or invalid rx_size/rx_status received * (which happens if we get lost in the ring), * Rx process gets reset, so we abort any further @@ -2049,6 +2064,14 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; + + /* + * The receive buffer should be mostly empty. + * Tell NAPI to reenable the Rx irq. + */ + if (tp->fifo_copy_timeout) + received = budget; + out: return received; } _ --bp/iNruPH9dso1Pn-- From shemminger@osdl.org Mon Aug 2 15:38:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 15:38:36 -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 i72McVwt019243 for ; Mon, 2 Aug 2004 15:38:31 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i72Mc5114309; Mon, 2 Aug 2004 15:38:05 -0700 Date: Mon, 2 Aug 2004 15:38:05 -0700 From: Stephen Hemminger To: Jamal Hadi Salim , "David S. Miller" Cc: netdev@oss.sgi.com Subject: iproute2 and kernel headers Message-Id: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7427 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 I am willing to put some headers (not all) in with the user level code, provided they are copies since they I can easily update. I don't want to get into keeping an edited set of headers in sync. What headers really seem to change a lot? The obvious ones are: linux/pkt_sched.h linux/tcp_diag.h linux/xfrm.h From davem@redhat.com Mon Aug 2 16:06:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 16:06: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 i72N6FCJ019781 for ; Mon, 2 Aug 2004 16:06:16 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i72N69e1004105; Mon, 2 Aug 2004 19:06:09 -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 i72N68a13968; Mon, 2 Aug 2004 19:06:08 -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 i72N5PA1016870; Mon, 2 Aug 2004 19:05:25 -0400 Date: Mon, 2 Aug 2004 16:04:45 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: hadi@znyx.com, netdev@oss.sgi.com Subject: Re: iproute2 and kernel headers Message-Id: <20040802160445.5ef3b251.davem@redhat.com> In-Reply-To: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> References: <20040802153805.487f832f@dell_ss3.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: 7428 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 2 Aug 2004 15:38:05 -0700 Stephen Hemminger wrote: > I am willing to put some headers (not all) in with the user level > code, provided they are copies since they I can easily update. I don't want > to get into keeping an edited set of headers in sync. > > What headers really seem to change a lot? The obvious ones are: > > linux/pkt_sched.h > linux/tcp_diag.h > linux/xfrm.h I would add linux/rtnetlink.h From garzik@havoc.gtf.org Mon Aug 2 16:11:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 16:11:28 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72NBNSm020257 for ; Mon, 2 Aug 2004 16:11:23 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id BD2D575A5; Mon, 2 Aug 2004 19:11:12 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i72NBC2T001012; Mon, 2 Aug 2004 19:11:12 -0400 Date: Mon, 2 Aug 2004 19:11:12 -0400 From: Jeff Garzik To: Andy Fleming Cc: Andy Fleming , Kumar Gala , "" , jamal , "" , Christoph Hellwig Subject: Re: [RFR] gianfar ethernet driver Message-ID: <20040802231112.GA890@havoc.gtf.org> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <1089170282.1038.80.camel@jzny.localdomain> <20040707032913.GA1822@havoc.gtf.org> 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: 7429 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 Mon, Aug 02, 2004 at 05:19:13PM -0500, Andy Fleming wrote: > Here's an updated patch which fixes module support which does this: > > * More cleanup/minor bug fixes > * Added locking to PHY read/write wrappers > * Fixed module support > * Removed fastroute code > > As before, this patch replaces the previous ones I have submitted. the patch? :) Jeff From afleming@freescale.com Mon Aug 2 16:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 16:41:32 -0700 (PDT) Received: from motgate8.mot.com (motgate8.mot.com [129.188.136.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72NfFkx024061 for ; Mon, 2 Aug 2004 16:41:17 -0700 Received: from il06exr03.mot.com (il06exr03.mot.com [129.188.137.133]) by motgate8.mot.com (Motorola/Motgate8) with ESMTP id i72NQoRC008533; Mon, 2 Aug 2004 16:26:50 -0700 (MST) Received: from [10.82.17.240] ([10.82.17.240]) by il06exr03.mot.com (Motorola/il06exr03) with ESMTP id i72NPrLl003257; Mon, 2 Aug 2004 18:25:53 -0500 In-Reply-To: <20040802231112.GA890@havoc.gtf.org> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <1089170282.1038.80.camel@jzny.localdomain> <20040707032913.GA1822@havoc.gtf.org> <20040802231112.GA890@havoc.gtf.org> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: multipart/mixed; boundary=Apple-Mail-1--634686679 Message-Id: <4819CC65-E4DB-11D8-999F-000393C30512@freescale.com> Cc: Andy Fleming , , Kumar Gala , jamal , Christoph Hellwig , From: Andy Fleming Subject: Re: [RFR] gianfar ethernet driver Date: Mon, 2 Aug 2004 18:25:46 -0500 To: Jeff Garzik X-Mailer: Apple Mail (2.618) X-archive-position: 7430 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: afleming@freescale.com Precedence: bulk X-list: netdev --Apple-Mail-1--634686679 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed D'oh! --Apple-Mail-1--634686679 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="patch_2004_8_2" Content-Disposition: attachment; filename=patch_2004_8_2 diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile --- a/drivers/net/Makefile Mon Aug 2 17:03:36 2004 +++ b/drivers/net/Makefile Mon Aug 2 17:03:36 2004 @@ -10,7 +10,9 @@ obj-$(CONFIG_IBM_EMAC) += ibm_emac/ obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_BONDING) += bonding/ -obj-$(CONFIG_GIANFAR) += gianfar.o gianfar_ethtool.o gianfar_phy.o +obj-$(CONFIG_GIANFAR) += gianfar_driver.o + +gianfar_driver-objs := gianfar.o gianfar_ethtool.o gianfar_phy.o # # link order important here diff -Nru a/drivers/net/gianfar.c b/drivers/net/gianfar.c --- a/drivers/net/gianfar.c Mon Aug 2 17:03:36 2004 +++ b/drivers/net/gianfar.c Mon Aug 2 17:03:36 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -96,15 +96,6 @@ #include "gianfar.h" #include "gianfar_phy.h" -#ifdef CONFIG_NET_FASTROUTE -#include -#include -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41) -#define irqreturn_t void -#define IRQ_HANDLED -#endif #define TX_TIMEOUT (1*HZ) #define SKB_ALLOC_TIMEOUT 1000000 @@ -117,9 +108,8 @@ #define RECEIVE(x) netif_rx(x) #endif -#define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.0, " -char gfar_driver_name[] = "Gianfar Ethernet"; -char gfar_driver_version[] = "1.0"; +const char gfar_driver_name[] = "Gianfar Ethernet"; +const char gfar_driver_version[] = "1.1"; int startup_gfar(struct net_device *dev); static int gfar_enet_open(struct net_device *dev); @@ -148,24 +138,11 @@ #ifdef CONFIG_GFAR_NAPI static int gfar_poll(struct net_device *dev, int *budget); #endif -#ifdef CONFIG_NET_FASTROUTE -static int gfar_accept_fastpath(struct net_device *dev, struct dst_entry *dst); -#endif -static inline int try_fastroute(struct sk_buff *skb, struct net_device *dev, int length); -#ifdef CONFIG_GFAR_NAPI static int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit); -#else -static int gfar_clean_rx_ring(struct net_device *dev); -#endif static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length); +static void gfar_phy_startup_timer(unsigned long data); extern struct ethtool_ops gfar_ethtool_ops; -extern void gfar_gstrings_normon(struct net_device *dev, u32 stringset, - u8 * buf); -extern void gfar_fill_stats_normon(struct net_device *dev, - struct ethtool_stats *dummy, u64 * buf); -extern int gfar_stats_count_normon(struct net_device *dev); - MODULE_AUTHOR("Freescale Semiconductor, Inc"); MODULE_DESCRIPTION("Gianfar Ethernet Driver"); @@ -183,7 +160,7 @@ struct ocp_gfar_data *einfo; int idx; int err = 0; - struct ethtool_ops *dev_ethtool_ops; + int dev_ethtool_ops = 0; einfo = (struct ocp_gfar_data *) ocpdev->def->additions; @@ -197,7 +174,8 @@ /* get a pointer to the register memory which can * configure the PHYs. If it's different from this set, * get the device which has those regs */ - if ((einfo->phyregidx >= 0) && (einfo->phyregidx != ocpdev->def->index)) { + if ((einfo->phyregidx >= 0) && + (einfo->phyregidx != ocpdev->def->index)) { mdiodev = ocp_find_device(OCP_ANY_ID, OCP_FUNC_GFAR, einfo->phyregidx); @@ -222,7 +200,7 @@ /* get a pointer to the register memory */ priv->regs = (struct gfar *) - ioremap(ocpdev->def->paddr, sizeof (struct gfar)); + ioremap(ocpdev->def->paddr, sizeof (struct gfar)); if (priv->regs == NULL) { err = -ENOMEM; @@ -238,6 +216,8 @@ goto phy_regs_fail; } + spin_lock_init(&priv->lock); + ocp_set_drvdata(ocpdev, dev); /* Stop the DMA engine now, in case it was running before */ @@ -269,15 +249,13 @@ gfar_write(&priv->regs->ecntrl, ECNTRL_INIT_SETTINGS); /* Copy the station address into the dev structure, */ - /* and into the address registers MAC_STNADDR1,2. */ - /* Backwards, because little endian MACs are dumb. */ - /* Don't set the regs if the firmware already did */ memcpy(dev->dev_addr, einfo->mac_addr, MAC_ADDR_LEN); /* Set the dev->base_addr to the gfar reg region */ dev->base_addr = (unsigned long) (priv->regs); SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &ocpdev->dev); /* Fill in the dev structure */ dev->open = gfar_enet_open; @@ -293,37 +271,16 @@ dev->change_mtu = gfar_change_mtu; dev->mtu = 1500; dev->set_multicast_list = gfar_set_multi; - dev->flags |= IFF_MULTICAST; - dev_ethtool_ops = - (struct ethtool_ops *)kmalloc(sizeof(struct ethtool_ops), - GFP_KERNEL); + /* Index into the array of possible ethtool + * ops to catch all 4 possibilities */ + if((priv->einfo->flags & GFAR_HAS_RMON) == 0) + dev_ethtool_ops += 1; - if(dev_ethtool_ops == NULL) { - err = -ENOMEM; - goto ethtool_fail; - } + if((priv->einfo->flags & GFAR_HAS_COALESCE) == 0) + dev_ethtool_ops += 2; - memcpy(dev_ethtool_ops, &gfar_ethtool_ops, sizeof(gfar_ethtool_ops)); - - /* If there is no RMON support in this device, we don't - * want to expose non-existant statistics */ - if((priv->einfo->flags & GFAR_HAS_RMON) == 0) { - dev_ethtool_ops->get_strings = gfar_gstrings_normon; - dev_ethtool_ops->get_stats_count = gfar_stats_count_normon; - dev_ethtool_ops->get_ethtool_stats = gfar_fill_stats_normon; - } - - if((priv->einfo->flags & GFAR_HAS_COALESCE) == 0) { - dev_ethtool_ops->set_coalesce = NULL; - dev_ethtool_ops->get_coalesce = NULL; - } - - dev->ethtool_ops = dev_ethtool_ops; - -#ifdef CONFIG_NET_FASTROUTE - dev->accept_fastpath = gfar_accept_fastpath; -#endif + dev->ethtool_ops = gfar_op_array[dev_ethtool_ops]; priv->rx_buffer_size = DEFAULT_RX_BUFFER_SIZE; #ifdef CONFIG_GFAR_BUFSTASH @@ -332,27 +289,26 @@ priv->tx_ring_size = DEFAULT_TX_RING_SIZE; priv->rx_ring_size = DEFAULT_RX_RING_SIZE; - /* Initially, coalescing is disabled */ - priv->txcoalescing = 0; - priv->txcount = 0; - priv->txtime = 0; - priv->rxcoalescing = 0; - priv->rxcount = 0; - priv->rxtime = 0; + priv->txcoalescing = DEFAULT_TX_COALESCE; + priv->txcount = DEFAULT_TXCOUNT; + priv->txtime = DEFAULT_TXTIME; + priv->rxcoalescing = DEFAULT_RX_COALESCE; + priv->rxcount = DEFAULT_RXCOUNT; + priv->rxtime = DEFAULT_RXTIME; err = register_netdev(dev); if (err) { printk(KERN_ERR "%s: Cannot register net device, aborting.\n", - dev->name); + dev->name); goto register_fail; } /* Print out the device info */ - printk(DEVICE_NAME, dev->name); + printk(KERN_INFO DEVICE_NAME, dev->name); for (idx = 0; idx < 6; idx++) - printk("%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); - printk("\n"); + printk(KERN_INFO "%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); + printk(KERN_INFO "\n"); /* Even more device info helps when determining which kernel */ /* provided which set of benchmarks. Since this is global for all */ @@ -367,10 +323,7 @@ return 0; - register_fail: - kfree(dev_ethtool_ops); -ethtool_fail: iounmap((void *) priv->phyregs); phy_regs_fail: iounmap((void *) priv->regs); @@ -386,7 +339,6 @@ ocp_set_drvdata(ocpdev, NULL); - kfree(dev->ethtool_ops); iounmap((void *) priv->regs); iounmap((void *) priv->phyregs); free_netdev(dev); @@ -399,26 +351,90 @@ { struct gfar_private *priv = netdev_priv(dev); struct phy_info *curphy; + unsigned int timeout = PHY_INIT_TIMEOUT; + struct gfar *phyregs = priv->phyregs; + struct gfar_mii_info *mii_info; + int err; - priv->link = 1; priv->oldlink = 0; priv->oldspeed = 0; - priv->olddplx = -1; + priv->oldduplex = -1; + + mii_info = kmalloc(sizeof(struct gfar_mii_info), + GFP_KERNEL); + + if(NULL == mii_info) { + printk(KERN_ERR "%s: Could not allocate mii_info\n", + dev->name); + return -ENOMEM; + } + + mii_info->speed = SPEED_1000; + mii_info->duplex = DUPLEX_FULL; + mii_info->pause = 0; + mii_info->link = 1; + + mii_info->advertising = (ADVERTISED_10baseT_Half | + ADVERTISED_10baseT_Full | + ADVERTISED_100baseT_Half | + ADVERTISED_100baseT_Full | + ADVERTISED_1000baseT_Full); + mii_info->autoneg = 1; + + mii_info->mii_id = priv->einfo->phyid; + + mii_info->dev = dev; + + mii_info->mdio_read = &read_phy_reg; + mii_info->mdio_write = &write_phy_reg; + + priv->mii_info = mii_info; + + /* Reset the management interface */ + gfar_write(&phyregs->miimcfg, MIIMCFG_RESET); + + /* Setup the MII Mgmt clock speed */ + gfar_write(&phyregs->miimcfg, MIIMCFG_INIT_VALUE); + + /* Wait until the bus is free */ + while ((gfar_read(&phyregs->miimind) & MIIMIND_BUSY) && + timeout--) + cpu_relax(); + + if(timeout <= 0) { + printk(KERN_ERR "%s: The MII Bus is stuck!\n", + dev->name); + err = -1; + goto bus_fail; + } /* get info for this PHY */ - curphy = get_phy_info(dev); + curphy = get_phy_info(priv->mii_info); if (curphy == NULL) { printk(KERN_ERR "%s: No PHY found\n", dev->name); - return -1; + err = -1; + goto no_phy; } - priv->phyinfo = curphy; + mii_info->phyinfo = curphy; - /* Run the commands which configure the PHY */ - phy_run_commands(dev, curphy->config); + /* Run the commands which initialize the PHY */ + if(curphy->init) { + err = curphy->init(priv->mii_info); + + if (err) + goto phy_init_fail; + } return 0; + +phy_init_fail: +no_phy: +bus_fail: + kfree(mii_info); + + return err; } static void init_registers(struct net_device *dev) @@ -494,7 +510,7 @@ spin_lock_irqsave(&priv->lock, flags); /* Tell the kernel the link is down */ - priv->link = 0; + priv->mii_info->link = 0; adjust_link(dev); /* Mask all interrupts */ @@ -521,7 +537,12 @@ gfar_write(®s->maccfg1, tempval); if (priv->einfo->flags & GFAR_HAS_PHY_INTR) { - phy_run_commands(dev, priv->phyinfo->shutdown); + /* Clear any pending interrupts */ + mii_clear_phy_interrupt(priv->mii_info); + + /* Disable PHY Interrupts */ + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_DISABLED); } spin_unlock_irqrestore(&priv->lock, flags); @@ -543,15 +564,17 @@ free_skb_resources(priv); - dma_unmap_single(NULL, gfar_read(®s->tbase), - sizeof(struct txbd)*priv->tx_ring_size, - DMA_BIDIRECTIONAL); - dma_unmap_single(NULL, gfar_read(®s->rbase), - sizeof(struct rxbd)*priv->rx_ring_size, - DMA_BIDIRECTIONAL); + dma_free_coherent(NULL, + sizeof(struct txbd8)*priv->tx_ring_size + + sizeof(struct rxbd8)*priv->rx_ring_size, + priv->tx_bd_base, + gfar_read(®s->tbase)); /* Free the buffer descriptors */ - kfree(priv->tx_bd_base); + kfree(priv->mii_info); + + if (priv->mii_info->phyinfo->close) + priv->mii_info->phyinfo->close(priv->mii_info); } /* If there are any tx skbs or rx skbs still around, free them. @@ -610,7 +633,8 @@ { struct txbd8 *txbdp; struct rxbd8 *rxbdp; - unsigned long addr; + dma_addr_t addr; + unsigned long vaddr; int i; struct gfar_private *priv = netdev_priv(dev); struct gfar *regs = priv->regs; @@ -620,32 +644,27 @@ gfar_write(®s->imask, IMASK_INIT_CLEAR); /* Allocate memory for the buffer descriptors */ - addr = - (unsigned int) kmalloc(sizeof (struct txbd8) * priv->tx_ring_size + - sizeof (struct rxbd8) * priv->rx_ring_size, - GFP_KERNEL); + vaddr = (unsigned long) dma_alloc_coherent(NULL, + sizeof (struct txbd8) * priv->tx_ring_size + + sizeof (struct rxbd8) * priv->rx_ring_size, + &addr, GFP_KERNEL); - if (addr == 0) { + if (vaddr == 0) { printk(KERN_ERR "%s: Could not allocate buffer descriptors!\n", dev->name); return -ENOMEM; } - priv->tx_bd_base = (struct txbd8 *) addr; + priv->tx_bd_base = (struct txbd8 *) vaddr; /* enet DMA only understands physical addresses */ - gfar_write(®s->tbase, - dma_map_single(NULL, (void *)addr, - sizeof(struct txbd8) * priv->tx_ring_size, - DMA_BIDIRECTIONAL)); + gfar_write(®s->tbase, addr); /* Start the rx descriptor ring where the tx ring leaves off */ addr = addr + sizeof (struct txbd8) * priv->tx_ring_size; - priv->rx_bd_base = (struct rxbd8 *) addr; - gfar_write(®s->rbase, - dma_map_single(NULL, (void *)addr, - sizeof(struct rxbd8) * priv->rx_ring_size, - DMA_BIDIRECTIONAL)); + vaddr = vaddr + sizeof (struct txbd8) * priv->tx_ring_size; + priv->rx_bd_base = (struct rxbd8 *) vaddr; + gfar_write(®s->rbase, addr); /* Setup the skbuff rings */ priv->tx_skbuff = @@ -755,39 +774,13 @@ } } - /* Grab the PHY interrupt */ - if (priv->einfo->flags & GFAR_HAS_PHY_INTR) { - if (request_irq(priv->einfo->interruptPHY, phy_interrupt, - SA_SHIRQ, "phy_interrupt", dev) < 0) { - printk(KERN_ERR "%s: Can't get IRQ %d (PHY)\n", - dev->name, priv->einfo->interruptPHY); - - err = -1; - - if (priv->einfo->flags & GFAR_HAS_MULTI_INTR) - goto phy_irq_fail; - else - goto tx_irq_fail; - } - } else { - init_timer(&priv->phy_info_timer); - priv->phy_info_timer.function = &gfar_phy_timer; - priv->phy_info_timer.data = (unsigned long) dev; - mod_timer(&priv->phy_info_timer, jiffies + 2 * HZ); - } - - /* Set up the bottom half queue */ - INIT_WORK(&priv->tq, (void (*)(void *))gfar_phy_change, dev); + /* Set up the PHY change work queue */ + INIT_WORK(&priv->tq, gfar_phy_change, dev); - /* Configure the PHY interrupt */ - phy_run_commands(dev, priv->phyinfo->startup); - - /* Tell the kernel the link is up, and determine the - * negotiated features (speed, duplex) */ - adjust_link(dev); - - if (priv->link == 0) - printk(KERN_INFO "%s: No link detected\n", dev->name); + init_timer(&priv->phy_info_timer); + priv->phy_info_timer.function = &gfar_phy_startup_timer; + priv->phy_info_timer.data = (unsigned long) priv->mii_info; + mod_timer(&priv->phy_info_timer, jiffies + HZ); /* Configure the coalescing support */ if (priv->txcoalescing) @@ -827,8 +820,6 @@ return 0; -phy_irq_fail: - free_irq(priv->einfo->interruptReceive, dev); rx_irq_fail: free_irq(priv->einfo->interruptTransmit, dev); tx_irq_fail: @@ -837,7 +828,16 @@ rx_skb_fail: free_skb_resources(priv); tx_skb_fail: - kfree(priv->tx_bd_base); + dma_free_coherent(NULL, + sizeof(struct txbd8)*priv->tx_ring_size + + sizeof(struct rxbd8)*priv->rx_ring_size, + priv->tx_bd_base, + gfar_read(®s->tbase)); + kfree(priv->mii_info); + + if (priv->mii_info->phyinfo->close) + priv->mii_info->phyinfo->close(priv->mii_info); + return err; } @@ -854,7 +854,7 @@ err = init_phy(dev); - if (err) + if(err) return err; err = startup_gfar(dev); @@ -971,121 +971,6 @@ return 0; } -/********************************************************************** - * gfar_accept_fastpath - * - * Used to authenticate to the kernel that a fast path entry can be - * added to device's routing table cache - * - * Input : pointer to ethernet interface network device structure and - * a pointer to the designated entry to be added to the cache. - * Output : zero upon success, negative upon failure - **********************************************************************/ -#ifdef CONFIG_NET_FASTROUTE -static int gfar_accept_fastpath(struct net_device *dev, struct dst_entry *dst) -{ - struct net_device *odev = dst->dev; - - if ((dst->ops->protocol != __constant_htons(ETH_P_IP)) - || (odev->type != ARPHRD_ETHER) - || (odev->accept_fastpath == NULL)) { - return -1; - } - - return 0; -} -#endif - -/* try_fastroute() -- Checks the fastroute cache to see if a given packet - * can be routed immediately to another device. If it can, we send it. - * If we used a fastroute, we return 1. Otherwise, we return 0. - * Returns 0 if CONFIG_NET_FASTROUTE is not on - */ -static inline int try_fastroute(struct sk_buff *skb, struct net_device *dev, int length) -{ -#ifdef CONFIG_NET_FASTROUTE - struct ethhdr *eth; - struct iphdr *iph; - unsigned int hash; - struct rtable *rt; - struct net_device *odev; - struct gfar_private *priv = netdev_priv(dev); - unsigned int CPU_ID = smp_processor_id(); - - eth = (struct ethhdr *) (skb->data); - - /* Only route ethernet IP packets */ - if (eth->h_proto == __constant_htons(ETH_P_IP)) { - iph = (struct iphdr *) (skb->data + ETH_HLEN); - - /* Generate the hash value */ - hash = ((*(u8 *) &iph->daddr) ^ (*(u8 *) & iph->saddr)) & NETDEV_FASTROUTE_HMASK; - - rt = (struct rtable *) (dev->fastpath[hash]); - if (rt != NULL - && ((*(u32 *) &iph->daddr) == (*(u32 *) &rt->key.dst)) - && ((*(u32 *) &iph->saddr) == (*(u32 *) &rt->key.src)) - && !(rt->u.dst.obsolete)) { - odev = rt->u.dst.dev; - netdev_rx_stat[CPU_ID].fastroute_hit++; - - /* Make sure the packet is: - * 1) IPv4 - * 2) without any options (header length of 5) - * 3) Not a multicast packet - * 4) going to a valid destination - * 5) Not out of time-to-live - */ - if (iph->version == 4 - && iph->ihl == 5 - && (!(eth->h_dest[0] & 0x01)) - && neigh_is_valid(rt->u.dst.neighbour) - && iph->ttl > 1) { - - /* Fast Route Path: Taken if the outgoing device is ready to transmit the packet now */ - if ((!netif_queue_stopped(odev)) - && (!spin_is_locked(odev->xmit_lock)) - && (skb->len <= (odev->mtu + ETH_HLEN + 2 + 4))) { - - skb->pkt_type = PACKET_FASTROUTE; - skb->protocol = __constant_htons(ETH_P_IP); - ip_decrease_ttl(iph); - memcpy(eth->h_source, odev->dev_addr, MAC_ADDR_LEN); - memcpy(eth->h_dest, rt->u.dst.neighbour->ha, MAC_ADDR_LEN); - skb->dev = odev; - - /* Prep the skb for the packet */ - skb_put(skb, length); - - if (odev->hard_start_xmit(skb, odev) != 0) { - panic("%s: FastRoute path corrupted", dev->name); - } - netdev_rx_stat[CPU_ID].fastroute_success++; - } - - /* Semi Fast Route Path: Mark the packet as needing fast routing, but let the - * stack handle getting it to the device */ - else { - skb->pkt_type = PACKET_FASTROUTE; - skb->nh.raw = skb->data + ETH_HLEN; - skb->protocol = __constant_htons(ETH_P_IP); - netdev_rx_stat[CPU_ID].fastroute_defer++; - - /* Prep the skb for the packet */ - skb_put(skb, length); - - if(RECEIVE(skb) == NET_RX_DROP) { - priv->extra_stats.kernel_dropped++; - } - } - - return 1; - } - } - } -#endif /* CONFIG_NET_FASTROUTE */ - return 0; -} static int gfar_change_mtu(struct net_device *dev, int new_mtu) { @@ -1148,8 +1033,7 @@ startup_gfar(dev); } - if (!netif_queue_stopped(dev)) - netif_schedule(dev); + netif_schedule(dev); } /* Interrupt Handler for Transmit complete */ @@ -1315,7 +1199,7 @@ #else spin_lock(&priv->lock); - gfar_clean_rx_ring(dev); + gfar_clean_rx_ring(dev, priv->rx_ring_size); /* If we are coalescing interrupts, update the timer */ /* Otherwise, clear it */ @@ -1336,7 +1220,7 @@ /* gfar_process_frame() -- handle one incoming packet if skb - * isn't NULL. Try the fastroute before using the stack */ + * isn't NULL. */ static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length) { @@ -1350,17 +1234,15 @@ priv->stats.rx_dropped++; priv->extra_stats.rx_skbmissing++; } else { - if(try_fastroute(skb, dev, length) == 0) { - /* Prep the skb for the packet */ - skb_put(skb, length); - - /* Tell the skb what kind of packet this is */ - skb->protocol = eth_type_trans(skb, dev); - - /* Send the packet up the stack */ - if (RECEIVE(skb) == NET_RX_DROP) { - priv->extra_stats.kernel_dropped++; - } + /* Prep the skb for the packet */ + skb_put(skb, length); + + /* Tell the skb what kind of packet this is */ + skb->protocol = eth_type_trans(skb, dev); + + /* Send the packet up the stack */ + if (RECEIVE(skb) == NET_RX_DROP) { + priv->extra_stats.kernel_dropped++; } } @@ -1368,14 +1250,10 @@ } /* gfar_clean_rx_ring() -- Processes each frame in the rx ring - * until all are gone (or, in the case of NAPI, the budget/quota - * has been reached). Returns the number of frames handled + * until the budget/quota has been reached. Returns the number + * of frames handled */ -#ifdef CONFIG_GFAR_NAPI static int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) -#else -static int gfar_clean_rx_ring(struct net_device *dev) -#endif { struct rxbd8 *bdp; struct sk_buff *skb; @@ -1386,12 +1264,7 @@ /* Get the first full descriptor */ bdp = priv->cur_rx; -#ifdef CONFIG_GFAR_NAPI -#define GFAR_RXDONE() ((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0)) -#else -#define GFAR_RXDONE() (bdp->status & RXBD_EMPTY) -#endif - while (!GFAR_RXDONE()) { + while (!((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0))) { skb = priv->rx_skbuff[priv->skb_currx]; if (!(bdp->status & @@ -1407,7 +1280,6 @@ gfar_process_frame(dev, skb, pkt_len); priv->stats.rx_bytes += pkt_len; - } else { count_errors(bdp->status, priv); @@ -1462,7 +1334,6 @@ if (rx_work_limit > dev->quota) rx_work_limit = dev->quota; - spin_lock(&priv->lock); howmany = gfar_clean_rx_ring(dev, rx_work_limit); dev->quota -= howmany; @@ -1489,8 +1360,6 @@ priv->rxclean = 1; } - spin_unlock(priv->lock); - return (rx_work_limit < 0) ? 1 : 0; } #endif @@ -1586,10 +1455,14 @@ struct net_device *dev = (struct net_device *) dev_id; struct gfar_private *priv = netdev_priv(dev); - /* Run the commands which acknowledge the interrupt */ - phy_run_commands(dev, priv->phyinfo->ack_int); + /* Clear the interrupt */ + mii_clear_phy_interrupt(priv->mii_info); + + /* Disable PHY interrupts */ + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_DISABLED); - /* Schedule the bottom half */ + /* Schedule the phy change */ schedule_work(&priv->tq); return IRQ_HANDLED; @@ -1600,18 +1473,24 @@ { struct net_device *dev = (struct net_device *) data; struct gfar_private *priv = netdev_priv(dev); - int timeout = HZ / 1000 + 1; + int result = 0; /* Delay to give the PHY a chance to change the * register state */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(timeout); + msleep(1); - /* Run the commands which check the link state */ - phy_run_commands(dev, priv->phyinfo->handle_int); + /* Update the link, speed, duplex */ + result = priv->mii_info->phyinfo->read_status(priv->mii_info); - /* React to the change in state */ - adjust_link(dev); + /* Adjust the known status as long as the link + * isn't still coming up */ + if((0 == result) || (priv->mii_info->link == 0)) + adjust_link(dev); + + /* Reenable interrupts, if needed */ + if (priv->einfo->flags & GFAR_HAS_PHY_INTR) + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_ENABLED); } /* Called every so often on systems that don't interrupt @@ -1623,7 +1502,72 @@ schedule_work(&priv->tq); - mod_timer(&priv->phy_info_timer, jiffies + 2 * HZ); + mod_timer(&priv->phy_info_timer, jiffies + + GFAR_PHY_CHANGE_TIME * HZ); +} + +/* Keep trying aneg for some time + * If, after GFAR_AN_TIMEOUT seconds, it has not + * finished, we switch to forced. + * Either way, once the process has completed, we either + * request the interrupt, or switch the timer over to + * using gfar_phy_timer to check status */ +static void gfar_phy_startup_timer(unsigned long data) +{ + int result; + static int secondary = GFAR_AN_TIMEOUT; + struct gfar_mii_info *mii_info = (struct gfar_mii_info *)data; + struct gfar_private *priv = netdev_priv(mii_info->dev); + + /* Configure the Auto-negotiation */ + result = mii_info->phyinfo->config_aneg(mii_info); + + /* If autonegotiation failed to start, and + * we haven't timed out, reset the timer, and return */ + if (result && secondary--) { + mod_timer(&priv->phy_info_timer, jiffies + HZ); + return; + } else if (result) { + /* Couldn't start autonegotiation. + * Try switching to forced */ + mii_info->autoneg = 0; + result = mii_info->phyinfo->config_aneg(mii_info); + + /* Forcing failed! Give up */ + if(result) { + printk(KERN_ERR "%s: Forcing failed!\n", + mii_info->dev->name); + return; + } + } + + /* Kill the timer so it can be restarted */ + del_timer_sync(&priv->phy_info_timer); + + /* Grab the PHY interrupt, if necessary/possible */ + if (priv->einfo->flags & GFAR_HAS_PHY_INTR) { + if (request_irq(priv->einfo->interruptPHY, + phy_interrupt, + SA_SHIRQ, + "phy_interrupt", + mii_info->dev) < 0) { + printk(KERN_ERR "%s: Can't get IRQ %d (PHY)\n", + mii_info->dev->name, + priv->einfo->interruptPHY); + } else { + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_ENABLED); + return; + } + } + + /* Start the timer again, this time in order to + * handle a change in status */ + init_timer(&priv->phy_info_timer); + priv->phy_info_timer.function = &gfar_phy_timer; + priv->phy_info_timer.data = (unsigned long) mii_info->dev; + mod_timer(&priv->phy_info_timer, jiffies + + GFAR_PHY_CHANGE_TIME * HZ); } /* Called every time the controller might need to be made @@ -1637,12 +1581,13 @@ struct gfar_private *priv = netdev_priv(dev); struct gfar *regs = priv->regs; u32 tempval; + struct gfar_mii_info *mii_info = priv->mii_info; - if (priv->link) { + if (mii_info->link) { /* Now we make sure that we can be in full duplex mode. * If not, we operate in half-duplex mode. */ - if (priv->duplexity != priv->olddplx) { - if (!(priv->duplexity)) { + if (mii_info->duplex != priv->oldduplex) { + if (!(mii_info->duplex)) { tempval = gfar_read(®s->maccfg2); tempval &= ~(MACCFG2_FULL_DUPLEX); gfar_write(®s->maccfg2, tempval); @@ -1658,11 +1603,11 @@ dev->name); } - priv->olddplx = priv->duplexity; + priv->oldduplex = mii_info->duplex; } - if (priv->speed != priv->oldspeed) { - switch (priv->speed) { + if (mii_info->speed != priv->oldspeed) { + switch (mii_info->speed) { case 1000: tempval = gfar_read(®s->maccfg2); tempval = @@ -1679,14 +1624,14 @@ default: printk(KERN_WARNING "%s: Ack! Speed (%d) is not 10/100/1000!\n", - dev->name, priv->speed); + dev->name, mii_info->speed); break; } printk(KERN_INFO "%s: Speed %dBT\n", dev->name, - priv->speed); + mii_info->speed); - priv->oldspeed = priv->speed; + priv->oldspeed = mii_info->speed; } if (!priv->oldlink) { @@ -1700,7 +1645,7 @@ printk(KERN_INFO "%s: Link is down\n", dev->name); priv->oldlink = 0; priv->oldspeed = 0; - priv->olddplx = -1; + priv->oldduplex = -1; netif_carrier_off(dev); } } @@ -1900,11 +1845,7 @@ int rc; rc = ocp_register_driver(&gfar_driver); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41) if (rc != 0) { -#else - if (rc == 0) { -#endif ocp_unregister_driver(&gfar_driver); return -ENODEV; } diff -Nru a/drivers/net/gianfar.h b/drivers/net/gianfar.h --- a/drivers/net/gianfar.h Mon Aug 2 17:03:36 2004 +++ b/drivers/net/gianfar.h Mon Aug 2 17:03:36 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -42,15 +42,7 @@ #include #include #include - -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41) #include -#else -#include -#define work_struct tq_struct -#define schedule_work schedule_task -#endif - #include #include #include @@ -70,8 +62,13 @@ #define MAC_ADDR_LEN 6 -extern char gfar_driver_name[]; -extern char gfar_driver_version[]; +#define PHY_INIT_TIMEOUT 100000 +#define GFAR_PHY_CHANGE_TIME 2 + +#define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.1, " +#define DRV_NAME "gfar-enet" +extern const char gfar_driver_name[]; +extern const char gfar_driver_version[]; /* These need to be powers of 2 for this driver */ #ifdef CONFIG_GFAR_NAPI @@ -105,11 +102,13 @@ #define GFAR_100_TIME 2560 #define GFAR_10_TIME 25600 +#define DEFAULT_TX_COALESCE 1 #define DEFAULT_TXCOUNT 16 -#define DEFAULT_TXTIME 32768 +#define DEFAULT_TXTIME 400 +#define DEFAULT_RX_COALESCE 1 #define DEFAULT_RXCOUNT 16 -#define DEFAULT_RXTIME 32768 +#define DEFAULT_RXTIME 400 #define TBIPA_VALUE 0x1f #define MIIMCFG_INIT_VALUE 0x00000007 @@ -467,8 +466,7 @@ * empty and completely full conditions. The empty/ready indicator in * the buffer descriptor determines the actual condition. */ -struct gfar_private -{ +struct gfar_private { /* pointers to arrays of skbuffs for tx and rx */ struct sk_buff ** tx_skbuff; struct sk_buff ** rx_skbuff; @@ -496,7 +494,6 @@ struct txbd8 *cur_tx; /* Next free ring entry */ struct txbd8 *dirty_tx; /* The Ring entry to be freed. */ struct gfar *regs; /* Pointer to the GFAR memory mapped Registers */ - struct phy_info *phyinfo; struct gfar *phyregs; struct work_struct tq; struct timer_list phy_info_timer; @@ -509,15 +506,14 @@ unsigned int rx_ring_size; wait_queue_head_t rxcleanupq; unsigned int rxclean; - int link; /* current link state */ - int oldlink; - int duplexity; /* Indicates negotiated duplex state */ - int olddplx; - int speed; /* Indicates negotiated speed */ - int oldspeed; - + /* Info structure initialized by board setup code */ struct ocp_gfar_data *einfo; + + struct gfar_mii_info *mii_info; + int oldspeed; + int oldduplex; + int oldlink; }; extern inline u32 gfar_read(volatile unsigned *addr) @@ -532,6 +528,6 @@ out_be32(addr, val); } - +extern struct ethtool_ops *gfar_op_array[]; #endif /* __GIANFAR_H */ diff -Nru a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c --- a/drivers/net/gianfar_ethtool.c Mon Aug 2 17:03:36 2004 +++ b/drivers/net/gianfar_ethtool.c Mon Aug 2 17:03:36 2004 @@ -1,18 +1,18 @@ /* - * drivers/net/gianfar_ethtool.c + * drivers/net/gianfar_ethtool.c * - * Gianfar Ethernet Driver - * Ethtool support for Gianfar Enet - * Based on e1000 ethtool support + * Gianfar Ethernet Driver + * Ethtool support for Gianfar Enet + * Based on e1000 ethtool support * - * Author: Andy Fleming - * Maintainer: Kumar Gala (kumar.gala@freescale.com) + * Author: Andy Fleming + * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2003,2004 Freescale Semiconductor, Inc. * - * This software may be used and distributed according to - * the terms of the GNU Public License, Version 2, incorporated herein - * by reference. + * This software may be used and distributed according to + * the terms of the GNU Public License, Version 2, incorporated herein + * by reference. */ #include @@ -58,64 +58,64 @@ void gfar_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo); static char stat_gstrings[][ETH_GSTRING_LEN] = { - "RX Dropped by Kernel", - "RX Large Frame Errors", - "RX Short Frame Errors", - "RX Non-Octet Errors", - "RX CRC Errors", - "RX Overrun Errors", - "RX Busy Errors", - "RX Babbling Errors", - "RX Truncated Frames", - "Ethernet Bus Error", - "TX Babbling Errors", - "TX Underrun Errors", - "RX SKB Missing Errors", - "TX Timeout Errors", - "tx&rx 64B frames", - "tx&rx 65-127B frames", - "tx&rx 128-255B frames", - "tx&rx 256-511B frames", - "tx&rx 512-1023B frames", - "tx&rx 1024-1518B frames", - "tx&rx 1519-1522B Good VLAN", - "RX bytes", - "RX Packets", - "RX FCS Errors", - "Receive Multicast Packet", - "Receive Broadcast Packet", - "RX Control Frame Packets", - "RX Pause Frame Packets", - "RX Unknown OP Code", - "RX Alignment Error", - "RX Frame Length Error", - "RX Code Error", - "RX Carrier Sense Error", - "RX Undersize Packets", - "RX Oversize Packets", - "RX Fragmented Frames", - "RX Jabber Frames", - "RX Dropped Frames", - "TX Byte Counter", - "TX Packets", - "TX Multicast Packets", - "TX Broadcast Packets", - "TX Pause Control Frames", - "TX Deferral Packets", - "TX Excessive Deferral Packets", - "TX Single Collision Packets", - "TX Multiple Collision Packets", - "TX Late Collision Packets", - "TX Excessive Collision Packets", - "TX Total Collision", - "RESERVED", - "TX Dropped Frames", - "TX Jabber Frames", - "TX FCS Errors", - "TX Control Frames", - "TX Oversize Frames", - "TX Undersize Frames", - "TX Fragmented Frames", + "rx-dropped-by-kernel", + "rx-large-frame-errors", + "rx-short-frame-errors", + "rx-non-octet-errors", + "rx-crc-errors", + "rx-overrun-errors", + "rx-busy-errors", + "rx-babbling-errors", + "rx-truncated-frames", + "ethernet-bus-error", + "tx-babbling-errors", + "tx-underrun-errors", + "rx-skb-missing-errors", + "tx-timeout-errors", + "tx-rx-64-frames", + "tx-rx-65-127-frames", + "tx-rx-128-255-frames", + "tx-rx-256-511-frames", + "tx-rx-512-1023-frames", + "tx-rx-1024-1518-frames", + "tx-rx-1519-1522-good-vlan", + "rx-bytes", + "rx-packets", + "rx-fcs-errors", + "receive-multicast-packet", + "receive-broadcast-packet", + "rx-control-frame-packets", + "rx-pause-frame-packets", + "rx-unknown-op-code", + "rx-alignment-error", + "rx-frame-length-error", + "rx-code-error", + "rx-carrier-sense-error", + "rx-undersize-packets", + "rx-oversize-packets", + "rx-fragmented-frames", + "rx-jabber-frames", + "rx-dropped-frames", + "tx-byte-counter", + "tx-packets", + "tx-multicast-packets", + "tx-broadcast-packets", + "tx-pause-control-frames", + "tx-deferral-packets", + "tx-excessive-deferral-packets", + "tx-single-collision-packets", + "tx-multiple-collision-packets", + "tx-late-collision-packets", + "tx-excessive-collision-packets", + "tx-total-collision", + "reserved", + "tx-dropped-frames", + "tx-jabber-frames", + "tx-fcs-errors", + "tx-control-frames", + "tx-oversize-frames", + "tx-undersize-frames", + "tx-fragmented-frames", }; /* Fill in an array of 64-bit statistics from various sources. @@ -125,7 +125,7 @@ void gfar_fill_stats(struct net_device *dev, struct ethtool_stats *dummy, u64 * buf) { int i; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); u32 *rmon = (u32 *) & priv->regs->rmon; u64 *extra = (u64 *) & priv->extra_stats; struct gfar_stats *stats = (struct gfar_stats *) buf; @@ -154,7 +154,7 @@ struct ethtool_stats *dummy, u64 * buf) { int i; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); u64 *extra = (u64 *) & priv->extra_stats; for (i = 0; i < GFAR_EXTRA_STATS_LEN; i++) { @@ -171,7 +171,7 @@ void gfar_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo) { - strncpy(drvinfo->driver, gfar_driver_name, GFAR_INFOSTR_LEN); + strncpy(drvinfo->driver, DRV_NAME, GFAR_INFOSTR_LEN); strncpy(drvinfo->version, gfar_driver_version, GFAR_INFOSTR_LEN); strncpy(drvinfo->fw_version, "N/A", GFAR_INFOSTR_LEN); strncpy(drvinfo->bus_info, "N/A", GFAR_INFOSTR_LEN); @@ -184,7 +184,7 @@ /* Return the current settings in the ethtool_cmd structure */ int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); uint gigabit_support = priv->einfo->flags & GFAR_HAS_GIGABIT ? SUPPORTED_1000baseT_Full : 0; uint gigabit_advert = @@ -201,10 +201,10 @@ | ADVERTISED_100baseT_Full | gigabit_advert | ADVERTISED_Autoneg); - cmd->speed = priv->speed; - cmd->duplex = priv->duplexity; + cmd->speed = priv->mii_info->speed; + cmd->duplex = priv->mii_info->duplex; cmd->port = PORT_MII; - cmd->phy_address = priv->einfo->phyid; + cmd->phy_address = priv->mii_info->mii_id; cmd->transceiver = XCVR_EXTERNAL; cmd->autoneg = AUTONEG_ENABLE; cmd->maxtxpkt = priv->txcount; @@ -223,7 +223,7 @@ void gfar_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) { int i; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); u32 *theregs = (u32 *) priv->regs; u32 *buf = (u32 *) regbuf; @@ -231,13 +231,6 @@ buf[i] = theregs[i]; } -/* Return the link state 1 is up, 0 is down */ -u32 gfar_get_link(struct net_device *dev) -{ - struct gfar_private *priv = (struct gfar_private *) dev->priv; - return (u32) priv->link; -} - /* Fill in a buffer with the strings which correspond to the * stats */ void gfar_gstrings(struct net_device *dev, u32 stringset, u8 * buf) @@ -252,7 +245,7 @@ unsigned int count; /* The timer is different, depending on the interface speed */ - switch (priv->speed) { + switch (priv->mii_info->speed) { case 1000: count = GFAR_GBIT_TIME; break; @@ -276,7 +269,7 @@ unsigned int count; /* The timer is different, depending on the interface speed */ - switch (priv->speed) { + switch (priv->mii_info->speed) { case 1000: count = GFAR_GBIT_TIME; break; @@ -298,7 +291,7 @@ * structure. */ int gfar_gcoalesce(struct net_device *dev, struct ethtool_coalesce *cvals) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); cvals->rx_coalesce_usecs = gfar_ticks2usecs(priv, priv->rxtime); cvals->rx_max_coalesced_frames = priv->rxcount; @@ -344,7 +337,7 @@ */ int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); /* Set up rx coalescing */ if ((cvals->rx_coalesce_usecs == 0) || @@ -386,7 +379,7 @@ * jumbo are ignored by the driver */ void gfar_gringparam(struct net_device *dev, struct ethtool_ringparam *rvals) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); rvals->rx_max_pending = GFAR_RX_MAX_RING_SIZE; rvals->rx_mini_max_pending = GFAR_RX_MAX_RING_SIZE; @@ -409,7 +402,7 @@ int gfar_sringparam(struct net_device *dev, struct ethtool_ringparam *rvals) { u32 tempval; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); int err = 0; if (rvals->rx_pending > GFAR_RX_MAX_RING_SIZE) @@ -473,7 +466,7 @@ .get_drvinfo = gfar_gdrvinfo, .get_regs_len = gfar_reglen, .get_regs = gfar_get_regs, - .get_link = gfar_get_link, + .get_link = ethtool_op_get_link, .get_coalesce = gfar_gcoalesce, .set_coalesce = gfar_scoalesce, .get_ringparam = gfar_gringparam, @@ -481,4 +474,52 @@ .get_strings = gfar_gstrings, .get_stats_count = gfar_stats_count, .get_ethtool_stats = gfar_fill_stats, +}; + +struct ethtool_ops gfar_normon_nocoalesce_ethtool_ops = { + .get_settings = gfar_gsettings, + .get_drvinfo = gfar_gdrvinfo, + .get_regs_len = gfar_reglen, + .get_regs = gfar_get_regs, + .get_link = ethtool_op_get_link, + .get_ringparam = gfar_gringparam, + .set_ringparam = gfar_sringparam, + .get_strings = gfar_gstrings_normon, + .get_stats_count = gfar_stats_count_normon, + .get_ethtool_stats = gfar_fill_stats_normon, +}; + +struct ethtool_ops gfar_nocoalesce_ethtool_ops = { + .get_settings = gfar_gsettings, + .get_drvinfo = gfar_gdrvinfo, + .get_regs_len = gfar_reglen, + .get_regs = gfar_get_regs, + .get_link = ethtool_op_get_link, + .get_ringparam = gfar_gringparam, + .set_ringparam = gfar_sringparam, + .get_strings = gfar_gstrings, + .get_stats_count = gfar_stats_count, + .get_ethtool_stats = gfar_fill_stats, +}; + +struct ethtool_ops gfar_normon_ethtool_ops = { + .get_settings = gfar_gsettings, + .get_drvinfo = gfar_gdrvinfo, + .get_regs_len = gfar_reglen, + .get_regs = gfar_get_regs, + .get_link = ethtool_op_get_link, + .get_coalesce = gfar_gcoalesce, + .set_coalesce = gfar_scoalesce, + .get_ringparam = gfar_gringparam, + .set_ringparam = gfar_sringparam, + .get_strings = gfar_gstrings_normon, + .get_stats_count = gfar_stats_count_normon, + .get_ethtool_stats = gfar_fill_stats_normon, +}; + +struct ethtool_ops *gfar_op_array[] = { + &gfar_ethtool_ops, + &gfar_normon_ethtool_ops, + &gfar_nocoalesce_ethtool_ops, + &gfar_normon_nocoalesce_ethtool_ops }; diff -Nru a/drivers/net/gianfar_phy.c b/drivers/net/gianfar_phy.c --- a/drivers/net/gianfar_phy.c Mon Aug 2 17:03:36 2004 +++ b/drivers/net/gianfar_phy.c Mon Aug 2 17:03:36 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -38,21 +38,31 @@ #include #include #include +#include #include "gianfar.h" #include "gianfar_phy.h" +static void config_genmii_advert(struct gfar_mii_info *mii_info); +static void genmii_setup_forced(struct gfar_mii_info *mii_info); +static void genmii_restart_aneg(struct gfar_mii_info *mii_info); +static int gbit_config_aneg(struct gfar_mii_info *mii_info); +static int genmii_config_aneg(struct gfar_mii_info *mii_info); +static int genmii_update_link(struct gfar_mii_info *mii_info); +static int genmii_read_status(struct gfar_mii_info *mii_info); +u16 phy_read(struct gfar_mii_info *mii_info, u16 regnum); +void phy_write(struct gfar_mii_info *mii_info, u16 regnum, u16 val); + /* Write value to the PHY for this device to the register at regnum, */ /* waiting until the write is done before it returns. All PHY */ /* configuration has to be done through the TSEC1 MIIM regs */ -void write_phy_reg(struct net_device *dev, u16 regnum, u16 value) +void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); struct gfar *regbase = priv->phyregs; - struct ocp_gfar_data *einfo = priv->einfo; /* Set the PHY address and the register address we want to write */ - gfar_write(®base->miimadd, ((einfo->phyid) << 8) | regnum); + gfar_write(®base->miimadd, (mii_id << 8) | regnum); /* Write out the value we want */ gfar_write(®base->miimcon, value); @@ -65,19 +75,18 @@ /* Reads from register regnum in the PHY for device dev, */ /* returning the value. Clears miimcom first. All PHY */ /* configuration has to be done through the TSEC1 MIIM regs */ -u16 read_phy_reg(struct net_device *dev, u16 regnum) +int read_phy_reg(struct net_device *dev, int mii_id, int regnum) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); struct gfar *regbase = priv->phyregs; - struct ocp_gfar_data *einfo = priv->einfo; u16 value; /* Set the PHY address and the register address we want to read */ - gfar_write(®base->miimadd, ((einfo->phyid) << 8) | regnum); + gfar_write(®base->miimadd, (mii_id << 8) | regnum); /* Clear miimcom, and then initiate a read */ gfar_write(®base->miimcom, 0); - gfar_write(®base->miimcom, MIIM_READ_COMMAND); + gfar_write(®base->miimcom, MII_READ_COMMAND); /* Wait for the transaction to finish */ while (gfar_read(®base->miimind) & (MIIMIND_NOTVALID | MIIMIND_BUSY)) @@ -89,362 +98,557 @@ return value; } -/* returns which value to write to the control register. */ -/* For 10/100 the value is slightly different. */ -u16 mii_cr_init(u16 mii_reg, struct net_device * dev) +void mii_clear_phy_interrupt(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; - struct ocp_gfar_data *einfo = priv->einfo; + if(mii_info->phyinfo->ack_interrupt) + mii_info->phyinfo->ack_interrupt(mii_info); +} - if (einfo->flags & GFAR_HAS_GIGABIT) - return MIIM_CONTROL_INIT; - else - return MIIM_CR_INIT; + +void mii_configure_phy_interrupt(struct gfar_mii_info *mii_info, u32 interrupts) +{ + mii_info->interrupts = interrupts; + if(mii_info->phyinfo->config_intr) + mii_info->phyinfo->config_intr(mii_info); +} + + +/* Writes MII_ADVERTISE with the appropriate values, after + * sanitizing advertise to make sure only supported features + * are advertised + */ +static void config_genmii_advert(struct gfar_mii_info *mii_info) +{ + u32 advertise; + u16 adv; + + /* Only allow advertising what this PHY supports */ + mii_info->advertising &= mii_info->phyinfo->features; + advertise = mii_info->advertising; + + /* Setup standard advertisement */ + adv = phy_read(mii_info, MII_ADVERTISE); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); + if (advertise & ADVERTISED_10baseT_Half) + adv |= ADVERTISE_10HALF; + if (advertise & ADVERTISED_10baseT_Full) + adv |= ADVERTISE_10FULL; + if (advertise & ADVERTISED_100baseT_Half) + adv |= ADVERTISE_100HALF; + if (advertise & ADVERTISED_100baseT_Full) + adv |= ADVERTISE_100FULL; + phy_write(mii_info, MII_ADVERTISE, adv); +} + +static void genmii_setup_forced(struct gfar_mii_info *mii_info) +{ + u16 ctrl; + u32 features = mii_info->phyinfo->features; + + ctrl = phy_read(mii_info, MII_BMCR); + + ctrl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_SPEED1000|BMCR_ANENABLE); + ctrl |= BMCR_RESET; + + switch(mii_info->speed) { + case SPEED_1000: + if(features & (SUPPORTED_1000baseT_Half + | SUPPORTED_1000baseT_Full)) { + ctrl |= BMCR_SPEED1000; + break; + } + mii_info->speed = SPEED_100; + case SPEED_100: + if (features & (SUPPORTED_100baseT_Half + | SUPPORTED_100baseT_Full)) { + ctrl |= BMCR_SPEED100; + break; + } + mii_info->speed = SPEED_10; + case SPEED_10: + if (features & (SUPPORTED_10baseT_Half + | SUPPORTED_10baseT_Full)) + break; + default: /* Unsupported speed! */ + printk(KERN_ERR "%s: Bad speed!\n", + mii_info->dev->name); + break; + } + + phy_write(mii_info, MII_BMCR, ctrl); +} + + +/* Enable and Restart Autonegotiation */ +static void genmii_restart_aneg(struct gfar_mii_info *mii_info) +{ + u16 ctl; + + ctl = phy_read(mii_info, MII_BMCR); + ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); + phy_write(mii_info, MII_BMCR, ctl); +} + + +static int gbit_config_aneg(struct gfar_mii_info *mii_info) +{ + u16 adv; + u32 advertise; + + if(mii_info->autoneg) { + /* Configure the ADVERTISE register */ + config_genmii_advert(mii_info); + advertise = mii_info->advertising; + + adv = phy_read(mii_info, MII_1000BASETCONTROL); + adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP | + MII_1000BASETCONTROL_HALFDUPLEXCAP); + if (advertise & SUPPORTED_1000baseT_Half) + adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP; + if (advertise & SUPPORTED_1000baseT_Full) + adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP; + phy_write(mii_info, MII_1000BASETCONTROL, adv); + + /* Start/Restart aneg */ + genmii_restart_aneg(mii_info); + } else + genmii_setup_forced(mii_info); + + return 0; +} + +static int marvell_config_aneg(struct gfar_mii_info *mii_info) +{ + /* The Marvell PHY has an errata which requires + * that certain registers get written in order + * to restart autonegotiation */ + phy_write(mii_info, MII_BMCR, BMCR_RESET); + + phy_write(mii_info, 0x1d, 0x1f); + phy_write(mii_info, 0x1e, 0x200c); + phy_write(mii_info, 0x1d, 0x5); + phy_write(mii_info, 0x1e, 0); + phy_write(mii_info, 0x1e, 0x100); + + gbit_config_aneg(mii_info); + + return 0; +} +static int genmii_config_aneg(struct gfar_mii_info *mii_info) +{ + if (mii_info->autoneg) { + config_genmii_advert(mii_info); + genmii_restart_aneg(mii_info); + } else + genmii_setup_forced(mii_info); + + return 0; } -#define BRIEF_GFAR_ERRORS -/* Wait for auto-negotiation to complete */ -u16 mii_parse_sr(u16 mii_reg, struct net_device * dev) + +static int genmii_update_link(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + u16 status; - unsigned int timeout = GFAR_AN_TIMEOUT; + /* Do a fake read */ + phy_read(mii_info, MII_BMSR); - if (mii_reg & MIIM_STATUS_LINK) - priv->link = 1; + /* Read link and autonegotiation status */ + status = phy_read(mii_info, MII_BMSR); + if ((status & BMSR_LSTATUS) == 0) + mii_info->link = 0; else - priv->link = 0; + mii_info->link = 1; - /* Only auto-negotiate if the link has just gone up */ - if (priv->link && !priv->oldlink) { - while ((!(mii_reg & MIIM_STATUS_AN_DONE)) && timeout--) - mii_reg = read_phy_reg(dev, MIIM_STATUS); - -#if defined(BRIEF_GFAR_ERRORS) - if (mii_reg & MIIM_STATUS_AN_DONE) - printk(KERN_INFO "%s: Auto-negotiation done\n", - dev->name); - else - printk(KERN_INFO "%s: Auto-negotiation timed out\n", - dev->name); -#endif - } + /* If we are autonegotiating, and not done, + * return an error */ + if (mii_info->autoneg && !(status & BMSR_ANEGCOMPLETE)) + return -EAGAIN; return 0; } -/* Determine the speed and duplex which was negotiated */ -u16 mii_parse_88E1011_psr(u16 mii_reg, struct net_device * dev) +static int genmii_read_status(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; - unsigned int speed; + u16 status; + int err; - if (priv->link) { - if (mii_reg & MIIM_88E1011_PHYSTAT_DUPLEX) - priv->duplexity = 1; + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + if (mii_info->autoneg) { + status = phy_read(mii_info, MII_LPA); + + if (status & (LPA_10FULL | LPA_100FULL)) + mii_info->duplex = DUPLEX_FULL; + else + mii_info->duplex = DUPLEX_HALF; + if (status & (LPA_100FULL | LPA_100HALF)) + mii_info->speed = SPEED_100; else - priv->duplexity = 0; + mii_info->speed = SPEED_10; + mii_info->pause = 0; + } + /* On non-aneg, we assume what we put in BMCR is the speed, + * though magic-aneg shouldn't prevent this case from occurring + */ - speed = (mii_reg & MIIM_88E1011_PHYSTAT_SPEED); + return 0; +} +static int marvell_read_status(struct gfar_mii_info *mii_info) +{ + u16 status; + int err; - switch (speed) { - case MIIM_88E1011_PHYSTAT_GBIT: - priv->speed = 1000; - break; - case MIIM_88E1011_PHYSTAT_100: - priv->speed = 100; - break; - default: - priv->speed = 10; - break; + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + /* If the link is up, read the speed and duplex */ + /* If we aren't autonegotiating, assume speeds + * are as set */ + if (mii_info->autoneg && mii_info->link) { + int speed; + status = phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS); + +#if 0 + /* If speed and duplex aren't resolved, + * return an error. Isn't this handled + * by checking aneg? + */ + if ((status & MII_M1011_PHY_SPEC_STATUS_RESOLVED) == 0) + return -EAGAIN; +#endif + + /* Get the duplexity */ + if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX) + mii_info->duplex = DUPLEX_FULL; + else + mii_info->duplex = DUPLEX_HALF; + + /* Get the speed */ + speed = status & MII_M1011_PHY_SPEC_STATUS_SPD_MASK; + switch(speed) { + case MII_M1011_PHY_SPEC_STATUS_1000: + mii_info->speed = SPEED_1000; + break; + case MII_M1011_PHY_SPEC_STATUS_100: + mii_info->speed = SPEED_100; + break; + default: + mii_info->speed = SPEED_10; + break; } - } else { - priv->speed = 0; - priv->duplexity = 0; + mii_info->pause = 0; } return 0; } -u16 mii_parse_cis8201(u16 mii_reg, struct net_device * dev) + +static int cis820x_read_status(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; - unsigned int speed; + u16 status; + int err; - if (priv->link) { - if (mii_reg & MIIM_CIS8201_AUXCONSTAT_DUPLEX) - priv->duplexity = 1; + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + /* If the link is up, read the speed and duplex */ + /* If we aren't autonegotiating, assume speeds + * are as set */ + if (mii_info->autoneg && mii_info->link) { + int speed; + + status = phy_read(mii_info, MII_CIS8201_AUX_CONSTAT); + if (status & MII_CIS8201_AUXCONSTAT_DUPLEX) + mii_info->duplex = DUPLEX_FULL; else - priv->duplexity = 0; + mii_info->duplex = DUPLEX_HALF; - speed = mii_reg & MIIM_CIS8201_AUXCONSTAT_SPEED; + speed = status & MII_CIS8201_AUXCONSTAT_SPEED; switch (speed) { - case MIIM_CIS8201_AUXCONSTAT_GBIT: - priv->speed = 1000; + case MII_CIS8201_AUXCONSTAT_GBIT: + mii_info->speed = SPEED_1000; break; - case MIIM_CIS8201_AUXCONSTAT_100: - priv->speed = 100; + case MII_CIS8201_AUXCONSTAT_100: + mii_info->speed = SPEED_100; break; default: - priv->speed = 10; + mii_info->speed = SPEED_10; break; } - } else { - priv->speed = 0; - priv->duplexity = 0; } return 0; } -u16 mii_parse_dm9161_scsr(u16 mii_reg, struct net_device * dev) +static int marvell_ack_interrupt(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + /* Clear the interrupts by reading the reg */ + phy_read(mii_info, MII_M1011_IEVENT); - if (mii_reg & (MIIM_DM9161_SCSR_100F | MIIM_DM9161_SCSR_100H)) - priv->speed = 100; + return 0; +} + +static int marvell_config_intr(struct gfar_mii_info *mii_info) +{ + if(mii_info->interrupts == MII_INTERRUPT_ENABLED) + phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT); else - priv->speed = 10; + phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); + + return 0; +} + +static int cis820x_init(struct gfar_mii_info *mii_info) +{ + phy_write(mii_info, MII_CIS8201_AUX_CONSTAT, + MII_CIS8201_AUXCONSTAT_INIT); + phy_write(mii_info, MII_CIS8201_EXT_CON1, + MII_CIS8201_EXTCON1_INIT); + + return 0; +} + +static int cis820x_ack_interrupt(struct gfar_mii_info *mii_info) +{ + phy_read(mii_info, MII_CIS8201_ISTAT); - if (mii_reg & (MIIM_DM9161_SCSR_100F | MIIM_DM9161_SCSR_10F)) - priv->duplexity = 1; + return 0; +} + +static int cis820x_config_intr(struct gfar_mii_info *mii_info) +{ + if(mii_info->interrupts == MII_INTERRUPT_ENABLED) + phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK); else - priv->duplexity = 0; + phy_write(mii_info, MII_CIS8201_IMASK, 0); return 0; } -u16 dm9161_wait(u16 mii_reg, struct net_device *dev) +#define DM9161_DELAY 10 + +static int dm9161_read_status(struct gfar_mii_info *mii_info) { - int timeout = HZ; - int secondary = 10; - u16 temp; - - do { - - /* Davicom takes a bit to come up after a reset, - * so wait here for a bit */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(timeout); - - temp = read_phy_reg(dev, MIIM_STATUS); - - secondary--; - } while ((!(temp & MIIM_STATUS_AN_DONE)) && secondary); - - return 0; -} - -static struct phy_info phy_info_M88E1011S = { - 0x01410c6, - "Marvell 88E1011S", - 4, - (const struct phy_cmd[]) { /* config */ - /* Reset and configure the PHY */ - {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Status is read once to clear old link state */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_88E1011_PHY_STATUS, miim_read, mii_parse_88E1011_psr}, - /* Clear the IEVENT register */ - {MIIM_88E1011_IEVENT, miim_read, NULL}, - /* Set up the mask */ - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_INIT, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - /* Clear the interrupt */ - {MIIM_88E1011_IEVENT, miim_read, NULL}, - /* Disable interrupts */ - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_CLEAR, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Check the status */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - {MIIM_88E1011_PHY_STATUS, miim_read, mii_parse_88E1011_psr}, - /* Enable Interrupts */ - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_INIT, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - {MIIM_88E1011_IEVENT, miim_read, NULL}, - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_CLEAR, NULL}, - {miim_end,} - }, -}; + u16 status; + int err; + + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + /* If the link is up, read the speed and duplex */ + /* If we aren't autonegotiating, assume speeds + * are as set */ + if (mii_info->autoneg && mii_info->link) { + status = phy_read(mii_info, MII_DM9161_SCSR); + if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_100H)) + mii_info->speed = SPEED_100; + else + mii_info->speed = SPEED_10; + + if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_10F)) + mii_info->duplex = DUPLEX_FULL; + else + mii_info->duplex = DUPLEX_HALF; + } + + return 0; +} + + +static int dm9161_config_aneg(struct gfar_mii_info *mii_info) +{ + struct dm9161_private *priv = mii_info->priv; + + if(0 == priv->resetdone) + return -EAGAIN; + + return 0; +} + +static void dm9161_timer(unsigned long data) +{ + struct gfar_mii_info *mii_info = (struct gfar_mii_info *)data; + struct dm9161_private *priv = mii_info->priv; + u16 status = phy_read(mii_info, MII_BMSR); + + if (status & BMSR_ANEGCOMPLETE) { + priv->resetdone = 1; + } else + mod_timer(&priv->timer, jiffies + DM9161_DELAY * HZ); +} + +static int dm9161_init(struct gfar_mii_info *mii_info) +{ + struct dm9161_private *priv; + + /* Allocate the private data structure */ + priv = kmalloc(sizeof(struct dm9161_private), GFP_KERNEL); + + if (NULL == priv) + return -ENOMEM; + + mii_info->priv = priv; + + /* Reset is not done yet */ + priv->resetdone = 0; + + /* Isolate the PHY */ + phy_write(mii_info, MII_BMCR, BMCR_ISOLATE); + + /* Do not bypass the scrambler/descrambler */ + phy_write(mii_info, MII_DM9161_SCR, MII_DM9161_SCR_INIT); + + /* Clear 10BTCSR to default */ + phy_write(mii_info, MII_DM9161_10BTCSR, MII_DM9161_10BTCSR_INIT); + + /* Reconnect the PHY, and enable Autonegotiation */ + phy_write(mii_info, MII_BMCR, BMCR_ANENABLE); + + /* Start a timer for DM9161_DELAY seconds to wait + * for the PHY to be ready */ + init_timer(&priv->timer); + priv->timer.function = &dm9161_timer; + priv->timer.data = (unsigned long) mii_info; + mod_timer(&priv->timer, jiffies + DM9161_DELAY * HZ); + + return 0; +} -/* Cicada 8204 */ -static struct phy_info phy_info_cis8204 = { - 0x3f11, +static void dm9161_close(struct gfar_mii_info *mii_info) +{ + struct dm9161_private *priv = mii_info->priv; + + del_timer_sync(&priv->timer); + kfree(priv); +} + +#if 0 +static int dm9161_ack_interrupt(struct gfar_mii_info *mii_info) +{ + phy_read(mii_info, MII_DM9161_INTR); + + return 0; +} +#endif + +/* Cicada 820x */ +static struct phy_info phy_info_cis820x = { + 0x000fc440, "Cicada Cis8204", - 6, - (const struct phy_cmd[]) { /* config */ - /* Override PHY config settings */ - {MIIM_CIS8201_AUX_CONSTAT, MIIM_CIS8201_AUXCONSTAT_INIT, NULL}, - /* Set up the interface mode */ - {MIIM_CIS8201_EXT_CON1, MIIM_CIS8201_EXTCON1_INIT, NULL}, - /* Configure some basic stuff */ - {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_CIS8201_AUX_CONSTAT, miim_read, mii_parse_cis8201}, - /* Clear the status register */ - {MIIM_CIS8204_ISTAT, miim_read, NULL}, - /* Enable interrupts */ - {MIIM_CIS8204_IMASK, MIIM_CIS8204_IMASK_MASK, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - /* Clear the status register */ - {MIIM_CIS8204_ISTAT, miim_read, NULL}, - /* Disable interrupts */ - {MIIM_CIS8204_IMASK, 0x0, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_CIS8201_AUX_CONSTAT, miim_read, mii_parse_cis8201}, - /* Enable interrupts */ - {MIIM_CIS8204_IMASK, MIIM_CIS8204_IMASK_MASK, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - /* Clear the status register */ - {MIIM_CIS8204_ISTAT, miim_read, NULL}, - /* Disable interrupts */ - {MIIM_CIS8204_IMASK, 0x0, NULL}, - {miim_end,} - }, + 0x000fffc0, + .features = MII_GBIT_FEATURES, + .init = &cis820x_init, + .config_aneg = &gbit_config_aneg, + .read_status = &cis820x_read_status, + .ack_interrupt = &cis820x_ack_interrupt, + .config_intr = &cis820x_config_intr, }; -/* Cicada 8201 */ -static struct phy_info phy_info_cis8201 = { - 0xfc41, - "CIS8201", - 4, - (const struct phy_cmd[]) { /* config */ - /* Override PHY config settings */ - {MIIM_CIS8201_AUX_CONSTAT, MIIM_CIS8201_AUXCONSTAT_INIT, NULL}, - /* Set up the interface mode */ - {MIIM_CIS8201_EXT_CON1, MIIM_CIS8201_EXTCON1_INIT, NULL}, - /* Configure some basic stuff */ - {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_CIS8201_AUX_CONSTAT, miim_read, mii_parse_cis8201}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - {miim_end,} - }, +static struct phy_info phy_info_dm9161 = { + .phy_id = 0x0181b880, + .name = "Davicom DM9161E", + .phy_id_mask = 0x0ffffff0, + .init = dm9161_init, + .config_aneg = dm9161_config_aneg, + .read_status = dm9161_read_status, + .close = dm9161_close, }; -static struct phy_info phy_info_dm9161 = { - 0x0181b88, - "Davicom DM9161E", - 4, - (const struct phy_cmd[]) { /* config */ - {MIIM_CONTROL, MIIM_DM9161_CR_STOP, NULL}, - /* Do not bypass the scrambler/descrambler */ - {MIIM_DM9161_SCR, MIIM_DM9161_SCR_INIT, NULL}, - /* Clear 10BTCSR to default */ - {MIIM_DM9161_10BTCSR, MIIM_DM9161_10BTCSR_INIT, NULL}, - /* Configure some basic stuff */ - {MIIM_CONTROL, MIIM_CR_INIT, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Restart Auto Negotiation */ - {MIIM_CONTROL, MIIM_DM9161_CR_RSTAN, NULL}, - /* Status is read once to clear old link state */ - {MIIM_STATUS, miim_read, dm9161_wait}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_DM9161_SCSR, miim_read, mii_parse_dm9161_scsr}, - /* Clear any pending interrupts */ - {MIIM_DM9161_INTR, miim_read, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - {MIIM_DM9161_INTR, miim_read, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - {MIIM_STATUS, miim_read, NULL}, - {MIIM_STATUS, miim_read, mii_parse_sr}, - {MIIM_DM9161_SCSR, miim_read, mii_parse_dm9161_scsr}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - {MIIM_DM9161_INTR, miim_read, NULL}, - {miim_end,} - }, +static struct phy_info phy_info_marvell = { + .phy_id = 0x01410c00, + .phy_id_mask = 0xffffff00, + .name = "Marvell 88E1101", + .features = MII_GBIT_FEATURES, + .config_aneg = &marvell_config_aneg, + .read_status = &marvell_read_status, + .ack_interrupt = &marvell_ack_interrupt, + .config_intr = &marvell_config_intr, +}; + +static struct phy_info phy_info_genmii= { + .phy_id = 0x00000000, + .phy_id_mask = 0x00000000, + .name = "Generic MII", + .features = MII_BASIC_FEATURES, + .config_aneg = genmii_config_aneg, + .read_status = genmii_read_status, }; static struct phy_info *phy_info[] = { - &phy_info_cis8201, - &phy_info_cis8204, - &phy_info_M88E1011S, + &phy_info_cis820x, + &phy_info_marvell, &phy_info_dm9161, + &phy_info_genmii, NULL }; +u16 phy_read(struct gfar_mii_info *mii_info, u16 regnum) +{ + u16 retval; + unsigned long flags; + + spin_lock_irqsave(&mii_info->mdio_lock, flags); + retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum); + spin_unlock_irqrestore(&mii_info->mdio_lock, flags); + + return retval; +} + +void phy_write(struct gfar_mii_info *mii_info, u16 regnum, u16 val) +{ + unsigned long flags; + + spin_lock_irqsave(&mii_info->mdio_lock, flags); + mii_info->mdio_write(mii_info->dev, + mii_info->mii_id, + regnum, val); + spin_unlock_irqrestore(&mii_info->mdio_lock, flags); +} + /* Use the PHY ID registers to determine what type of PHY is attached * to device dev. return a struct phy_info structure describing that PHY */ -struct phy_info * get_phy_info(struct net_device *dev) +struct phy_info * get_phy_info(struct gfar_mii_info *mii_info) { u16 phy_reg; u32 phy_ID; int i; struct phy_info *theInfo = NULL; + struct net_device *dev = mii_info->dev; /* Grab the bits from PHYIR1, and put them in the upper half */ - phy_reg = read_phy_reg(dev, MIIM_PHYIR1); + phy_reg = phy_read(mii_info, MII_PHYSID1); phy_ID = (phy_reg & 0xffff) << 16; /* Grab the bits from PHYIR2, and put them in the lower half */ - phy_reg = read_phy_reg(dev, MIIM_PHYIR2); + phy_reg = phy_read(mii_info, MII_PHYSID2); phy_ID |= (phy_reg & 0xffff); /* loop through all the known PHY types, and find one that */ /* matches the ID we read from the PHY. */ for (i = 0; phy_info[i]; i++) - if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) + if (phy_info[i]->phy_id == + (phy_ID & phy_info[i]->phy_id_mask)) { theInfo = phy_info[i]; + break; + } + /* This shouldn't happen, as we have generic PHY support */ if (theInfo == NULL) { printk("%s: PHY id %x is not supported!\n", dev->name, phy_ID); return NULL; @@ -454,51 +658,4 @@ } return theInfo; -} - -/* Take a list of struct phy_cmd, and, depending on the values, either */ -/* read or write, using a helper function if provided */ -/* It is assumed that all lists of struct phy_cmd will be terminated by */ -/* mii_end. */ -void phy_run_commands(struct net_device *dev, const struct phy_cmd *cmd) -{ - int i; - u16 result; - struct gfar_private *priv = (struct gfar_private *) dev->priv; - struct gfar *phyregs = priv->phyregs; - - /* Reset the management interface */ - gfar_write(&phyregs->miimcfg, MIIMCFG_RESET); - - /* Setup the MII Mgmt clock speed */ - gfar_write(&phyregs->miimcfg, MIIMCFG_INIT_VALUE); - - /* Wait until the bus is free */ - while (gfar_read(&phyregs->miimind) & MIIMIND_BUSY) - cpu_relax(); - - for (i = 0; cmd->mii_reg != miim_end; i++) { - /* The command is a read if mii_data is miim_read */ - if (cmd->mii_data == miim_read) { - /* Read the value of the PHY reg */ - result = read_phy_reg(dev, cmd->mii_reg); - - /* If a function was supplied, we need to let it process */ - /* the result. */ - if (cmd->funct != NULL) - (*(cmd->funct)) (result, dev); - } else { /* Otherwise, it's a write */ - /* If a function was supplied, it will provide - * the value to write */ - /* Otherwise, the value was supplied in cmd->mii_data */ - if (cmd->funct != NULL) - result = (*(cmd->funct)) (0, dev); - else - result = cmd->mii_data; - - /* Write the appropriate value to the PHY reg */ - write_phy_reg(dev, cmd->mii_reg, result); - } - cmd++; - } } diff -Nru a/drivers/net/gianfar_phy.h b/drivers/net/gianfar_phy.h --- a/drivers/net/gianfar_phy.h Mon Aug 2 17:03:36 2004 +++ b/drivers/net/gianfar_phy.h Mon Aug 2 17:03:36 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -19,135 +19,144 @@ #ifndef __GIANFAR_PHY_H #define __GIANFAR_PHY_H -#define miim_end ((u32)-2) -#define miim_read ((u32)-1) +#define MII_end ((u32)-2) +#define MII_read ((u32)-1) #define MIIMIND_BUSY 0x00000001 #define MIIMIND_NOTVALID 0x00000004 -#define MIIM_CONTROL 0x00 -#define MIIM_CONTROL_RESET 0x00008000 -#define MIIM_CONTROL_INIT 0x00001140 -#define MIIM_ANEN 0x00001000 - -#define MIIM_CR 0x00 -#define MIIM_CR_RST 0x00008000 -#define MIIM_CR_INIT 0x00001000 - -#define MIIM_STATUS 0x1 -#define MIIM_STATUS_AN_DONE 0x00000020 -#define MIIM_STATUS_LINK 0x0004 - -#define MIIM_PHYIR1 0x2 -#define MIIM_PHYIR2 0x3 - -#define GFAR_AN_TIMEOUT 0x000fffff - -#define MIIM_ANLPBPA 0x5 -#define MIIM_ANLPBPA_HALF 0x00000040 -#define MIIM_ANLPBPA_FULL 0x00000020 - -#define MIIM_ANEX 0x6 -#define MIIM_ANEX_NP 0x00000004 -#define MIIM_ANEX_PRX 0x00000002 +#define GFAR_AN_TIMEOUT 2000 +/* 1000BT control (Marvell & BCM54xx at least) */ +#define MII_1000BASETCONTROL 0x09 +#define MII_1000BASETCONTROL_FULLDUPLEXCAP 0x0200 +#define MII_1000BASETCONTROL_HALFDUPLEXCAP 0x0100 /* Cicada Extended Control Register 1 */ -#define MIIM_CIS8201_EXT_CON1 0x17 -#define MIIM_CIS8201_EXTCON1_INIT 0x0000 +#define MII_CIS8201_EXT_CON1 0x17 +#define MII_CIS8201_EXTCON1_INIT 0x0000 /* Cicada Interrupt Mask Register */ -#define MIIM_CIS8204_IMASK 0x19 -#define MIIM_CIS8204_IMASK_IEN 0x8000 -#define MIIM_CIS8204_IMASK_SPEED 0x4000 -#define MIIM_CIS8204_IMASK_LINK 0x2000 -#define MIIM_CIS8204_IMASK_DUPLEX 0x1000 -#define MIIM_CIS8204_IMASK_MASK 0xf000 +#define MII_CIS8201_IMASK 0x19 +#define MII_CIS8201_IMASK_IEN 0x8000 +#define MII_CIS8201_IMASK_SPEED 0x4000 +#define MII_CIS8201_IMASK_LINK 0x2000 +#define MII_CIS8201_IMASK_DUPLEX 0x1000 +#define MII_CIS8201_IMASK_MASK 0xf000 /* Cicada Interrupt Status Register */ -#define MIIM_CIS8204_ISTAT 0x1a -#define MIIM_CIS8204_ISTAT_STATUS 0x8000 -#define MIIM_CIS8204_ISTAT_SPEED 0x4000 -#define MIIM_CIS8204_ISTAT_LINK 0x2000 -#define MIIM_CIS8204_ISTAT_DUPLEX 0x1000 +#define MII_CIS8201_ISTAT 0x1a +#define MII_CIS8201_ISTAT_STATUS 0x8000 +#define MII_CIS8201_ISTAT_SPEED 0x4000 +#define MII_CIS8201_ISTAT_LINK 0x2000 +#define MII_CIS8201_ISTAT_DUPLEX 0x1000 /* Cicada Auxiliary Control/Status Register */ -#define MIIM_CIS8201_AUX_CONSTAT 0x1c -#define MIIM_CIS8201_AUXCONSTAT_INIT 0x0004 -#define MIIM_CIS8201_AUXCONSTAT_DUPLEX 0x0020 -#define MIIM_CIS8201_AUXCONSTAT_SPEED 0x0018 -#define MIIM_CIS8201_AUXCONSTAT_GBIT 0x0010 -#define MIIM_CIS8201_AUXCONSTAT_100 0x0008 +#define MII_CIS8201_AUX_CONSTAT 0x1c +#define MII_CIS8201_AUXCONSTAT_INIT 0x0004 +#define MII_CIS8201_AUXCONSTAT_DUPLEX 0x0020 +#define MII_CIS8201_AUXCONSTAT_SPEED 0x0018 +#define MII_CIS8201_AUXCONSTAT_GBIT 0x0010 +#define MII_CIS8201_AUXCONSTAT_100 0x0008 /* 88E1011 PHY Status Register */ -#define MIIM_88E1011_PHY_STATUS 0x11 -#define MIIM_88E1011_PHYSTAT_SPEED 0xc000 -#define MIIM_88E1011_PHYSTAT_GBIT 0x8000 -#define MIIM_88E1011_PHYSTAT_100 0x4000 -#define MIIM_88E1011_PHYSTAT_DUPLEX 0x2000 -#define MIIM_88E1011_PHYSTAT_LINK 0x0400 - -#define MIIM_88E1011_IEVENT 0x13 -#define MIIM_88E1011_IEVENT_CLEAR 0x0000 - -#define MIIM_88E1011_IMASK 0x12 -#define MIIM_88E1011_IMASK_INIT 0x6400 -#define MIIM_88E1011_IMASK_CLEAR 0x0000 - -/* DM9161 Control register values */ -#define MIIM_DM9161_CR_STOP 0x0400 -#define MIIM_DM9161_CR_RSTAN 0x1200 +#define MII_M1011_PHY_SPEC_STATUS 0x11 +#define MII_M1011_PHY_SPEC_STATUS_1000 0x8000 +#define MII_M1011_PHY_SPEC_STATUS_100 0x4000 +#define MII_M1011_PHY_SPEC_STATUS_SPD_MASK 0xc000 +#define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX 0x2000 +#define MII_M1011_PHY_SPEC_STATUS_RESOLVED 0x0800 +#define MII_M1011_PHY_SPEC_STATUS_LINK 0x0400 + +#define MII_M1011_IEVENT 0x13 +#define MII_M1011_IEVENT_CLEAR 0x0000 + +#define MII_M1011_IMASK 0x12 +#define MII_M1011_IMASK_INIT 0x6400 +#define MII_M1011_IMASK_CLEAR 0x0000 -#define MIIM_DM9161_SCR 0x10 -#define MIIM_DM9161_SCR_INIT 0x0610 +#define MII_DM9161_SCR 0x10 +#define MII_DM9161_SCR_INIT 0x0610 /* DM9161 Specified Configuration and Status Register */ -#define MIIM_DM9161_SCSR 0x11 -#define MIIM_DM9161_SCSR_100F 0x8000 -#define MIIM_DM9161_SCSR_100H 0x4000 -#define MIIM_DM9161_SCSR_10F 0x2000 -#define MIIM_DM9161_SCSR_10H 0x1000 +#define MII_DM9161_SCSR 0x11 +#define MII_DM9161_SCSR_100F 0x8000 +#define MII_DM9161_SCSR_100H 0x4000 +#define MII_DM9161_SCSR_10F 0x2000 +#define MII_DM9161_SCSR_10H 0x1000 /* DM9161 Interrupt Register */ -#define MIIM_DM9161_INTR 0x15 -#define MIIM_DM9161_INTR_PEND 0x8000 -#define MIIM_DM9161_INTR_DPLX_MASK 0x0800 -#define MIIM_DM9161_INTR_SPD_MASK 0x0400 -#define MIIM_DM9161_INTR_LINK_MASK 0x0200 -#define MIIM_DM9161_INTR_MASK 0x0100 -#define MIIM_DM9161_INTR_DPLX_CHANGE 0x0010 -#define MIIM_DM9161_INTR_SPD_CHANGE 0x0008 -#define MIIM_DM9161_INTR_LINK_CHANGE 0x0004 -#define MIIM_DM9161_INTR_INIT 0x0000 -#define MIIM_DM9161_INTR_STOP \ -(MIIM_DM9161_INTR_DPLX_MASK | MIIM_DM9161_INTR_SPD_MASK \ - | MIIM_DM9161_INTR_LINK_MASK | MIIM_DM9161_INTR_MASK) +#define MII_DM9161_INTR 0x15 +#define MII_DM9161_INTR_PEND 0x8000 +#define MII_DM9161_INTR_DPLX_MASK 0x0800 +#define MII_DM9161_INTR_SPD_MASK 0x0400 +#define MII_DM9161_INTR_LINK_MASK 0x0200 +#define MII_DM9161_INTR_MASK 0x0100 +#define MII_DM9161_INTR_DPLX_CHANGE 0x0010 +#define MII_DM9161_INTR_SPD_CHANGE 0x0008 +#define MII_DM9161_INTR_LINK_CHANGE 0x0004 +#define MII_DM9161_INTR_INIT 0x0000 +#define MII_DM9161_INTR_STOP \ +(MII_DM9161_INTR_DPLX_MASK | MII_DM9161_INTR_SPD_MASK \ + | MII_DM9161_INTR_LINK_MASK | MII_DM9161_INTR_MASK) /* DM9161 10BT Configuration/Status */ -#define MIIM_DM9161_10BTCSR 0x12 -#define MIIM_DM9161_10BTCSR_INIT 0x7800 +#define MII_DM9161_10BTCSR 0x12 +#define MII_DM9161_10BTCSR_INIT 0x7800 - -#define MIIM_READ_COMMAND 0x00000001 - -/* - * struct phy_cmd: A command for reading or writing a PHY register - * - * mii_reg: The register to read or write - * - * mii_data: For writes, the value to put in the register. - * A value of -1 indicates this is a read. - * - * funct: A function pointer which is invoked for each command. - * For reads, this function will be passed the value read - * from the PHY, and process it. - * For writes, the result of this function will be written - * to the PHY register - */ -struct phy_cmd { - u32 mii_reg; - u32 mii_data; - u16 (*funct) (u16 mii_reg, struct net_device * dev); +#define MII_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ + SUPPORTED_10baseT_Full | \ + SUPPORTED_100baseT_Half | \ + SUPPORTED_100baseT_Full | \ + SUPPORTED_Autoneg | \ + SUPPORTED_TP | \ + SUPPORTED_MII) + +#define MII_GBIT_FEATURES (MII_BASIC_FEATURES | \ + SUPPORTED_1000baseT_Half | \ + SUPPORTED_1000baseT_Full) + +#define MII_READ_COMMAND 0x00000001 + +#define MII_INTERRUPT_DISABLED 0x0 +#define MII_INTERRUPT_ENABLED 0x1 +/* Taken from mii_if_info and sungem_phy.h */ +struct gfar_mii_info { + /* Information about the PHY type */ + /* And management functions */ + struct phy_info *phyinfo; + + /* forced speed & duplex (no autoneg) + * partner speed & duplex & pause (autoneg) + */ + int speed; + int duplex; + int pause; + + /* The most recently read link state */ + int link; + + /* Enabled Interrupts */ + u32 interrupts; + + u32 advertising; + int autoneg; + int mii_id; + + /* private data pointer */ + /* For use by PHYs to maintain extra state */ + void *priv; + + /* Provided by host chip */ + struct net_device *dev; + + /* A lock to ensure that only one thing can read/write + * the MDIO bus at a time */ + spinlock_t mdio_lock; + + /* Provided by ethernet driver */ + int (*mdio_read) (struct net_device *dev, int mii_id, int reg); + void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val); }; /* struct phy_info: a structure which defines attributes for a PHY @@ -155,38 +164,50 @@ * id will contain a number which represents the PHY. During * startup, the driver will poll the PHY to find out what its * UID--as defined by registers 2 and 3--is. The 32-bit result - * gotten from the PHY will be shifted right by "shift" bits to + * gotten from the PHY will be ANDed with phy_id_mask to * discard any bits which may change based on revision numbers * unimportant to functionality * - * The struct phy_cmd entries represent pointers to an arrays of - * commands which tell the driver what to do to the PHY. + * There are 6 commands which take a gfar_mii_info structure. + * Each PHY must declare config_aneg, and read_status. */ struct phy_info { - u32 id; - char *name; - unsigned int shift; - /* Called to configure the PHY, and modify the controller - * based on the results */ - const struct phy_cmd *config; - - /* Called when starting up the controller. Usually sets - * up the interrupt for state changes */ - const struct phy_cmd *startup; - - /* Called inside the interrupt handler to acknowledge - * the interrupt */ - const struct phy_cmd *ack_int; - - /* Called in the bottom half to handle the interrupt */ - const struct phy_cmd *handle_int; - - /* Called when bringing down the controller. Usually stops - * the interrupts from being generated */ - const struct phy_cmd *shutdown; + u32 phy_id; + char *name; + unsigned int phy_id_mask; + u32 features; + + /* Called to initialize the PHY */ + int (*init)(struct gfar_mii_info *mii_info); + + /* Called to suspend the PHY for power */ + int (*suspend)(struct gfar_mii_info *mii_info); + + /* Reconfigures autonegotiation (or disables it) */ + int (*config_aneg)(struct gfar_mii_info *mii_info); + + /* Determines the negotiated speed and duplex */ + int (*read_status)(struct gfar_mii_info *mii_info); + + /* Clears any pending interrupts */ + int (*ack_interrupt)(struct gfar_mii_info *mii_info); + + /* Enables or disables interrupts */ + int (*config_intr)(struct gfar_mii_info *mii_info); + + /* Clears up any memory if needed */ + void (*close)(struct gfar_mii_info *mii_info); }; -struct phy_info *get_phy_info(struct net_device *dev); -void phy_run_commands(struct net_device *dev, const struct phy_cmd *cmd); +struct phy_info *get_phy_info(struct gfar_mii_info *mii_info); +int read_phy_reg(struct net_device *dev, int mii_id, int regnum); +void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value); +void mii_clear_phy_interrupt(struct gfar_mii_info *mii_info); +void mii_configure_phy_interrupt(struct gfar_mii_info *mii_info, u32 interrupts); + +struct dm9161_private { + struct timer_list timer; + int resetdone; +}; #endif /* GIANFAR_PHY_H */ diff -Nru a/include/linux/mii.h b/include/linux/mii.h --- a/include/linux/mii.h Mon Aug 2 17:03:36 2004 +++ b/include/linux/mii.h Mon Aug 2 17:03:36 2004 @@ -33,7 +33,8 @@ #define MII_NCONFIG 0x1c /* Network interface config */ /* Basic mode control register. */ -#define BMCR_RESV 0x007f /* Unused... */ +#define BMCR_RESV 0x003f /* Unused... */ +#define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */ #define BMCR_CTST 0x0080 /* Collision test */ #define BMCR_FULLDPLX 0x0100 /* Full duplex */ #define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ --Apple-Mail-1--634686679 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Aug 2, 2004, at 18:11, Jeff Garzik wrote: > On Mon, Aug 02, 2004 at 05:19:13PM -0500, Andy Fleming wrote: >> Here's an updated patch which fixes module support which does this: >> >> * More cleanup/minor bug fixes >> * Added locking to PHY read/write wrappers >> * Fixed module support >> * Removed fastroute code >> >> As before, this patch replaces the previous ones I have submitted. > > the patch? :) > > Jeff > --Apple-Mail-1--634686679-- From matthias.andree@gmx.de Mon Aug 2 17:09:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 17:09:54 -0700 (PDT) Received: from mail.dt.e-technik.uni-dortmund.de (IDENT:7RfVXN0v6r7rTx3dughqjqVtOTfrqSoX@mail.dt.E-Technik.Uni-Dortmund.DE [129.217.163.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7309jrR025163 for ; Mon, 2 Aug 2004 17:09:46 -0700 Received: from m2a2.dyndns.org (pD9E1ED50.dip.t-dialin.net [217.225.237.80]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 49E492BDA5; Tue, 3 Aug 2004 02:09:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id 87AF9C2C65; Tue, 3 Aug 2004 02:03:54 +0200 (CEST) Received: from merlin.emma.line.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05176-02; Tue, 3 Aug 2004 02:03:54 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 28218C1104; Tue, 3 Aug 2004 02:03:54 +0200 (CEST) Date: Tue, 3 Aug 2004 02:03:54 +0200 From: Matthias Andree To: Andrew Morton Cc: Matthias Andree , netdev@oss.sgi.com Subject: Re: 2.6.8-rc2-mm1 breaks PPPoE for me (was: 2.6.8-rc2-mm1) Message-ID: <20040803000354.GA5327@merlin.emma.line.org> References: <20040728020444.4dca7e23.akpm@osdl.org> <20040731100947.GA7453@merlin.emma.line.org> <20040802142706.46100c6d.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040802142706.46100c6d.akpm@osdl.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at m2a2.dyndns.org X-archive-position: 7431 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: matthias.andree@gmx.de Precedence: bulk X-list: netdev On Mon, 02 Aug 2004, Andrew Morton wrote: > I'm a bit stumped by this - I'm not aware of any change which would have > caused the pppoe device to start returning -ENOTTY. > > Is this still happening? Are you sure the relevant modules are loaded? > Could you capture an strace of pppd while it's happening? It happens in 2.6.8-rc2-mm2, too. The strace is inconclusive. Setup description: I am running pppd 2.4.1 (SuSE 8.2 RPM) with the PPPOE plugin tied to eth1: PCI: Enabling device 0000:00:0b.0 (0004 -> 0005) ACPI: PCI interrupt 0000:00:0b.0[A] -> GSI 19 (level, low) -> IRQ 19 0000:00:0b.0: 3Com PCI 3c905 Boomerang 100baseTx at 0xd400. Vers LK1.1.19 eth1: Dropping NETIF_F_SG since no checksum feature. I am starting pppd via DJB's daemontools (http://cr.yp.to/daemontools.html), with this run file: #! /bin/sh exec strace -ff -F -o /tmp/dump-pppd /usr/sbin/pppd call pppoe Starting pppd from a bash (in an xterm, only thing I've tried) works, I get a connection. Writing such a pppd command into inittab yields ENOENT rather than ENOTTY and fails as well. The strace looks unhelpful to me, the only occurrence of ENOTTY is: readlink("/proc/self/fd/0", "/dev/null", 511) = 9 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff700) = -1 ENOTTY (Inappropriate ioctl for device) ltrace reveals this happens inside getlogin() - and pppd appears to fall back to getpwuid. I'd think this is unrelated for I have the same lines with a working kernel as well. Using rp-pppoe as pty (instead of the plugin) doesn't work either, the PPP link is negotiated properly but my log is full of "martian address" log entries as though it was receiving its own packets externally. How strange. I wonder if this is an strace artifact... No useful debugging information. I hope someone can reproduce this. :-( -- Matthias Andree Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred) From davem@redhat.com Mon Aug 2 17:09:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 17:10: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 i7309s6o025172 for ; Mon, 2 Aug 2004 17:09:55 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7309fe1015846; Mon, 2 Aug 2004 20:09:41 -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 i7309fa28153; Mon, 2 Aug 2004 20:09:41 -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 i7308vtZ014741; Mon, 2 Aug 2004 20:08:58 -0400 Date: Mon, 2 Aug 2004 17:08:17 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: suckfish@ihug.co.nz, pekkas@netcore.fi, linux-kernel@vger.kernel.org, yoshfuji@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] Trivial ipv6 fix. Message-Id: <20040802170817.3f9be894.davem@redhat.com> In-Reply-To: <20040802.065940.86004622.yoshfuji@linux-ipv6.org> References: <1091434328.16469.5.camel@localhost.localdomain> <20040802.065940.86004622.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 i7309s6o025172 X-archive-position: 7432 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 02 Aug 2004 06:59:40 -0700 (PDT) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > In article <1091434328.16469.5.camel@localhost.localdomain> (at Mon, 02 Aug 2004 20:12:08 +1200), Ralph Loader says: > > > ipv6_addr_hash doesn't do what it's comment says. The comment was > > probably what was intended, not that it'll make much difference in > > practice. > > Oops, David, please apply this. Done, thanks guys. From davem@redhat.com Mon Aug 2 17:11:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 17:11: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 i730B6eu025460 for ; Mon, 2 Aug 2004 17:11:07 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i730Ate1016125; Mon, 2 Aug 2004 20:10:55 -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 i730Ata28669; Mon, 2 Aug 2004 20:10:55 -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 i730ABRe015548; Mon, 2 Aug 2004 20:10:11 -0400 Date: Mon, 2 Aug 2004 17:09:30 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [1/2] [IPSEC] Remove unnecessary inet_ecn.h inclusions Message-Id: <20040802170930.2073894f.davem@redhat.com> In-Reply-To: <20040802093153.GA19706@gondor.apana.org.au> References: <20040802093153.GA19706@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: 7433 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 2 Aug 2004 19:31:53 +1000 Herbert Xu wrote: > I should've removed the inet_ecn.h inclusions in that change as the > ECN code has been moved to xfrm[46]_output.c. This patch does exactly > that. Ok, applied. From achirica@telefonica.net Mon Aug 2 17:12:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 17:12:27 -0700 (PDT) Received: from pc22.admin.cnc (194-179-2-161.mad.ttd.net [194.179.2.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i730CKSx026003 for ; Mon, 2 Aug 2004 17:12:21 -0700 Received: from tudela.mad.ttd.net (tudela.gestion.cnc [172.24.8.233]) by pc22.admin.cnc (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id i730CAq05669; Tue, 3 Aug 2004 02:12:10 +0200 Received: from localhost (localhost [127.0.0.1]) by tudela.mad.ttd.net (8.11.6/8.11.6) with ESMTP id i730C9g13773; Tue, 3 Aug 2004 02:12:09 +0200 (MEST) Date: Tue, 3 Aug 2004 02:12:09 +0200 (MEST) From: Javier Achirica X-Sender: To: cc: Jeff Garzik , Subject: Re: [PATCH 2.6] airo.c set_bit bug In-Reply-To: <20040723002114.GA11815@bougret.hpl.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7434 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: achirica@telefonica.net Precedence: bulk X-list: netdev Thanks. Applied. I haven't found any other occurrence. Javier Achirica On Thu, 22 Jul 2004, Jean Tourrilhes wrote: > Hi Javier, > > Managed to find a bug in the usage of set_bit/clear_bit in the > airo driver. I'm not sure if I caught all occurence of this pattern, > and not sure about exact consequences of the bug, but we might as well > fix it... > Patch below... > > Have fun... > > Jean > > -------------------------------------------------------- > > --- linux/drivers/net/wireless/airo.j1.c Thu Jul 22 15:27:48 2004 > +++ linux/drivers/net/wireless/airo.c Thu Jul 22 15:29:11 2004 > @@ -1808,7 +1808,8 @@ static int writeConfigRid(struct airo_in > if (!test_bit (FLAG_COMMIT, &ai->flags)) > return SUCCESS; > > - clear_bit (FLAG_COMMIT | FLAG_RESET, &ai->flags); > + clear_bit (FLAG_COMMIT, &ai->flags); > + clear_bit (FLAG_RESET, &ai->flags); > checkThrottle(ai); > cfgr = ai->config; > > @@ -6158,7 +6159,8 @@ static int airo_set_txpow(struct net_dev > readCapabilityRid(local, &cap_rid); > > if (vwrq->disabled) { > - set_bit (FLAG_RADIO_OFF | FLAG_COMMIT, &local->flags); > + set_bit (FLAG_RADIO_OFF, &local->flags); > + set_bit (FLAG_COMMIT, &local->flags); > return -EINPROGRESS; /* Call commit handler */ > } > if (vwrq->flags != IW_TXPOW_MWATT) { > From davem@redhat.com Mon Aug 2 17:12:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 17:13:03 -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 i730Cw08026236 for ; Mon, 2 Aug 2004 17:12:58 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i730Coe1016484; Mon, 2 Aug 2004 20:12: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 i730Coa29031; Mon, 2 Aug 2004 20:12:50 -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 i730C7SI016381; Mon, 2 Aug 2004 20:12:07 -0400 Date: Mon, 2 Aug 2004 17:11:26 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [2/2] [IPSEC] Move xfrm[46]_tunnel_check_size into xfrm[46]_output.c Message-Id: <20040802171126.09dc4887.davem@redhat.com> In-Reply-To: <20040802093500.GA19747@gondor.apana.org.au> References: <20040802093153.GA19706@gondor.apana.org.au> <20040802093500.GA19747@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: 7435 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 2 Aug 2004 19:35:00 +1000 Herbert Xu wrote: > This patch moves xfrm[46]_tunnel_check_size() into xfrm[46]_output.c > where it can be made static since it's only used there. > > While moving the icmp.h inclusions over I also discovered that the > tunnel files are missing an inclusion of net/protocol.h. So I've > added them as well. The net/xfrm.h hunk failed, but I fixed that up by hand. Applied, thanks. From zdzichu@irc.pl Mon Aug 2 17:15:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 17:15:09 -0700 (PDT) Received: from mother.ds.pg.gda.pl (serwer.tvgawex.pl [212.122.214.2]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i730F1Ct026770 for ; Mon, 2 Aug 2004 17:15:02 -0700 Received: (qmail 8739 invoked by uid 1000); 3 Aug 2004 00:14:59 -0000 Date: Tue, 3 Aug 2004 02:14:59 +0200 From: Tomasz Torcz To: netdev@oss.sgi.com Subject: Re: iproute2 and kernel headers Message-ID: <20040803001459.GA8637@irc.pl> References: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> User-Agent: Mutt/1.5.4i X-archive-position: 7436 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: zdzichu@irc.pl Precedence: bulk X-list: netdev On Mon, Aug 02, 2004 at 03:38:05PM -0700, Stephen Hemminger wrote: > I am willing to put some headers (not all) in with the user level > code, provided they are copies since they I can easily update. I don't want > to get into keeping an edited set of headers in sync. Aren't linux-libc-headers (*) sufficient? * - http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ -- Tomasz Torcz To co nierealne - tutaj jest normalne. zdzichu@irc.-nie.spam-.pl Ziomale na ¿ycie maj± tu patenty specjalne. From jesse.brandeburg@intel.com Mon Aug 2 19:07:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 19:07:57 -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 i7327oIC032489 for ; Mon, 2 Aug 2004 19:07:50 -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 i73285eH015744 for ; Tue, 3 Aug 2004 02:08:05 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 i7327eal012712 for ; Tue, 3 Aug 2004 02:07:40 GMT Received: from Westville2.jf.intel.com ([134.134.3.161]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004080219074112919 ; Mon, 02 Aug 2004 19:07:41 -0700 Date: Mon, 2 Aug 2004 18:51:21 -0700 (PDT) From: Jesse Brandeburg To: netdev@oss.sgi.com Subject: [PATCH 2.6] ixgb - fix bug in transmit cleanup for ppc64 Message-ID: ReplyTo: "Jesse Brandeburg" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 7437 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jesse.brandeburg@intel.com Precedence: bulk X-list: netdev This fixes an endianness error when on PPC64 arch. Signed off by: Jesse Brandeburg diff -Nurp --exclude=CVS linux-2.6.7/drivers/net/ixgb/ixgb_main.c linux-2.6.7_mod/drivers/net/ixgb/ixgb_main.c --- linux-2.6.7/drivers/net/ixgb/ixgb_main.c 2004-06-16 05:19:01.000000000 +0000 +++ linux-2.6.7_mod/drivers/net/ixgb/ixgb_main.c 2004-08-03 01:34:52.000000000 +0000 @@ -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 davem@redhat.com Mon Aug 2 19:11:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 19:11:06 -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 i732Ax7T000474 for ; Mon, 2 Aug 2004 19:11:00 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i732Aee1010321; Mon, 2 Aug 2004 22:10:40 -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 i732Aea22704; Mon, 2 Aug 2004 22:10:40 -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 i7329uCl008359; Mon, 2 Aug 2004 22:09:56 -0400 Date: Mon, 2 Aug 2004 19:09:14 -0700 From: "David S. Miller" To: Herbert Xu Cc: kazunori@miyazawa.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, kuznet@ms2.inr.ac.ru Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup Message-Id: <20040802190914.303ccfbe.davem@redhat.com> In-Reply-To: <20040802074147.GA16381@gondor.apana.org.au> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040802074147.GA16381@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: 7438 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 2 Aug 2004 17:41:47 +1000 Herbert Xu wrote: > This raises an interesting question. Is it really correct to look at > the first hop address when doing the route lookup? > > The problem is that if we use the first-hop address as the dst when > doing the route lookup then we may end up with incorrect MTU information. > This is because the MTU to the final destination may well be smaller than > the MTU to the first hop. > > It seems that Alexey thought about this six years ago according to > the rthdr comment in icmpv6_rcv(). When the ICMP6 packet comes back in such a case, the type zero routing header will be suitable edited. So at least we can determine which exact destination address the PMTU information applies to. But I understand what the problem is. We cannot update the destination cache entry for destination "D" if the ICMP message is for hop "B" specified in the routing header. Furthermore, we cannot even update a destination cache entry for hop "B" in the case where the routing header specifies --> A --> B --> C --> D because a direct packet destinated for "B" might use a different path than "A" does. An intesting solution would be to use stacked destinations, which do no actual encapsulation (or perhaps do the routing header work) and merely represent the hop-by-hop path. Then the PMTU propagation machinery can be used, and route lookups will go through a slower path to find these special stacked hop-by-hop routes. From scarfboy@gmail.com Mon Aug 2 19:47:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Aug 2004 19:47:58 -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 i732lotV001376 for ; Mon, 2 Aug 2004 19:47:53 -0700 Received: by mproxy.gmail.com with SMTP id 73so143907rnk for ; Mon, 02 Aug 2004 19:47:43 -0700 (PDT) Received: by 10.38.81.50 with SMTP id e50mr138197rnb; Mon, 02 Aug 2004 19:47:43 -0700 (PDT) Message-ID: Date: Tue, 3 Aug 2004 04:47:43 +0200 From: Bart Alewijnse To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: gigabit trouble In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_102_23147333.1091501263553" References: <20040729210401.A32456@electric-eye.fr.zoreil.com> <20040730205412.A15669@electric-eye.fr.zoreil.com> <20040730234120.A15536@electric-eye.fr.zoreil.com> <20040731231836.A31121@electric-eye.fr.zoreil.com> X-archive-position: 7439 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scarfboy@gmail.com Precedence: bulk X-list: netdev ------=_Part_102_23147333.1091501263553 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Okay, after I Did Stuff(tm) to my new computer, it's capable of generating approximately 50Kints/s, which transates to 66MB/s in a network benchmark (Actually, netio misreports the speeds, probably because of an overflow; I was amused) There's two howevers and one unfortunately, though. The howevers: - it's not in the direction I want -- meaning I should update, which I can live with. But: - the bench speed going from my old computer wend down from ~33mb to ~20MB/s which I can't make any sense of at all, and the practical speeds from the server didn't change for the better, possibly for the worse. I'm not sure, because of... The unfortunately: - After a few minutes, my old computer kernel paniced. I assume this is because it can't handle the incoming traffic, as its own pace of sending (and therefore probably handling interrupts) is more like 20kints/sec than 50. I couldn't tell anything vmstat-wise as during the data going in that direction (un udp; tcp hung around 17MB both ways - which is better thn before, but *still* short of impressive), the ssh shells just stopped responding, and I guess so did vmstat. It's probably being battered in hardware interrupts, I saw high figures. Quite possibly this has to do with renicing ksoftircq (negatively) as someone suggested. However, I am still of the opinion that a difference in processor speeds should not crash anything. The panic looks a lot like the last one; same kernel (napi still enabled for the 8169). Image attached. I'ld like to know what's wrong here, so that I can avoid it. I can deal and live with stupid speeds better than crashing serves. Makes me grumble less, y'know. --Bart Alewijnse ------=_Part_102_23147333.1091501263553 Content-Type: image/gif; name="panic2.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="panic2.gif" R0lGODlhIANMAsQAAAAAAP///6Kiop2dnZmZmZSUlIuLi4GBgXV1dWdnZ1hYWEdHRzg4OCgoKBsb GxAQEAkJCQQEBAEBAf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA ABMALAAAAAAgA0wCAAX/oAM9ZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikDOJ4AJ7QqHRK rVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tv+S6vi8fs/v+/+AgYKDhIWGc3eHiouMjY6PkJGS k5SMiZWYmZqbnJ2en6Cal6GkpaanqKmqq4qjrK+wsbKztLWZrra5uru8vb6/UrjAw8TFxsfIgcLJ zM3Oz9DRy9HU1dbX2KTT2dzd3t/gedvh5OXm5+jBTuns7e7v1ONSElEj9AASEfdV+WoRD/vgSCAR UEy+gmAkIITHsKFDR/KiOGjAoCKDBQwajLjoYCG+jOvMPMAY8o2EBgoY/3jsAuHiAgdjHjRoECgC hAhjIuCMsvKhz5/DIkJBmQCBUQQHEiyIoCApTCoRFiBQ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/zBL/zDT/zFb/yybxAhAAA7 ------=_Part_102_23147333.1091501263553-- From romieu@fr.zoreil.com Tue Aug 3 00:51:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 00:51:54 -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 i737pl2a014879 for ; Tue, 3 Aug 2004 00:51:48 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i737mhh9005238; Tue, 3 Aug 2004 09:48:43 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i737mgmS005236; Tue, 3 Aug 2004 09:48:42 +0200 Date: Tue, 3 Aug 2004 09:48:42 +0200 From: Francois Romieu To: Bart Alewijnse Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: gigabit trouble Message-ID: <20040803094842.B4911@electric-eye.fr.zoreil.com> References: <20040729210401.A32456@electric-eye.fr.zoreil.com> <20040730205412.A15669@electric-eye.fr.zoreil.com> <20040730234120.A15536@electric-eye.fr.zoreil.com> <20040731231836.A31121@electric-eye.fr.zoreil.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 scarfboy@gmail.com on Tue, Aug 03, 2004 at 04:47:43AM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 7440 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 Bart Alewijnse : [...] > The panic looks a lot like the last one; same kernel (napi still > enabled for the 8169). Image attached. The irq rate are strangely high for a napi version of the r8169 driver. Can you describe your test commands so that I reproduce these here ? -- Ueimor From yoshfuji@linux-ipv6.org Tue Aug 3 00:55:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 00:55:32 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i737tPTO015212 for ; Tue, 3 Aug 2004 00:55:26 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 2A36333CE5; Tue, 3 Aug 2004 16:55:48 +0900 (JST) Date: Tue, 03 Aug 2004 00:55:42 -0700 (PDT) Message-Id: <20040803.005542.104434029.yoshfuji@linux-ipv6.org> To: davem@redhat.com, shemminger@osdl.org Cc: hadi@znyx.com, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: iproute2 and kernel headers From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040802160445.5ef3b251.davem@redhat.com> References: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> <20040802160445.5ef3b251.davem@redhat.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: 7441 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 <20040802160445.5ef3b251.davem@redhat.com> (at Mon, 2 Aug 2004 16:04:45 -0700), "David S. Miller" says: > > What headers really seem to change a lot? The obvious ones are: > > > > linux/pkt_sched.h > > linux/tcp_diag.h > > linux/xfrm.h > > I would add linux/rtnetlink.h Then, linux/snmp.h. --yoshfuji From yoshfuji@linux-ipv6.org Tue Aug 3 01:18:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 01:19:02 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i738Itpn016068 for ; Tue, 3 Aug 2004 01:18:55 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id DBE1233CE5; Tue, 3 Aug 2004 17:19:17 +0900 (JST) Date: Tue, 03 Aug 2004 01:19:12 -0700 (PDT) Message-Id: <20040803.011912.128392049.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: herbert@gondor.apana.org.au, kazunori@miyazawa.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040802190914.303ccfbe.davem@redhat.com> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040802074147.GA16381@gondor.apana.org.au> <20040802190914.303ccfbe.davem@redhat.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: 7442 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 <20040802190914.303ccfbe.davem@redhat.com> (at Mon, 2 Aug 2004 19:09:14 -0700), "David S. Miller" says: > An intesting solution would be to use stacked destinations, which > do no actual encapsulation (or perhaps do the routing header work) > and merely represent the hop-by-hop path. Then the PMTU propagation > machinery can be used, and route lookups will go through a slower path > to find these special stacked hop-by-hop routes. Well, I think it would probably be another rt6_info{} member rt6i_srcrt (or something like that). --yoshfuji From yoshfuji@linux-ipv6.org Tue Aug 3 01:59:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 02:00:05 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i738xw9h017014 for ; Tue, 3 Aug 2004 01:59:59 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 2319533CE5; Tue, 3 Aug 2004 18:00:21 +0900 (JST) Date: Tue, 03 Aug 2004 02:00:15 -0700 (PDT) Message-Id: <20040803.020015.44364045.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: kazunori@miyazawa.org, herbert@gondor.apana.org.au, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, yoshfuji@linux-ipv6.org Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040801195135.16734846.davem@redhat.com> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040801195135.16734846.davem@redhat.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: 7443 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 <20040801195135.16734846.davem@redhat.com> (at Sun, 1 Aug 2004 19:51:35 -0700), "David S. Miller" says: > On Fri, 30 Jul 2004 17:12:05 +0900 > Kazunori Miyazawa wrote: > > > I consider copying flowi(fl_rt) uses too much stack at the moment. > > I'll re-send the fixed patch again. > > I agree, and let's defer this patch until we > resolve that. Is the overhead for allocating memory okay? Or, do we allcoate some per-cpu memory while ipv6.o initalization phase? (check: lock? preemption?) Or, will we allocate fl (and fl_rt) per sock{} (ipv6_pinfo{})? (ditto.) We have similar stack usage in other codes, and I would fix them at the same time. Another question just for future reference: how many bytes (approx.) do we accept on stack? Note: sizeof(struct flowi) is 72 bytes (on i386) --yoshfuji From kazunori@miyazawa.org Tue Aug 3 02:22:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 02:22:20 -0700 (PDT) Received: from miyazawa.org (usen-221x116x13x66.ap-US01.usen.ad.jp [221.116.13.66]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i739M6gR023201 for ; Tue, 3 Aug 2004 02:22:06 -0700 Received: from [IPv6:2001:240:5bf:128:a59f:7c54:52e4:e0e8] ([2001:240:5bf:128:a59f:7c54:52e4:e0e8]) (AUTH: LOGIN kazunori, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by miyazawa.org with esmtp; Tue, 03 Aug 2004 18:20:05 +0900 id 00000C4F.410F58C6.00007301 Message-ID: <410F5906.30402@miyazawa.org> Date: Tue, 03 Aug 2004 18:21:10 +0900 From: Kazunori Miyazawa User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: YOSHIFUJI Hideaki CC: davem@redhat.com, herbert@gondor.apana.org.au, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040801195135.16734846.davem@redhat.com> <20040803.020015.44364045.yoshfuji@linux-ipv6.org> In-Reply-To: <20040803.020015.44364045.yoshfuji@linux-ipv6.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7444 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kazunori@miyazawa.org Precedence: bulk X-list: netdev YOSHIFUJI Hideaki wrote: > In article <20040801195135.16734846.davem@redhat.com> (at Sun, 1 Aug 2004 19:51:35 -0700), "David S. Miller" says: > > >>On Fri, 30 Jul 2004 17:12:05 +0900 >>Kazunori Miyazawa wrote: >> >> >>>I consider copying flowi(fl_rt) uses too much stack at the moment. >>>I'll re-send the fixed patch again. >> >>I agree, and let's defer this patch until we >>resolve that. > > > Is the overhead for allocating memory okay? > Or, do we allcoate some per-cpu memory while ipv6.o initalization phase? > (check: lock? preemption?) > Or, will we allocate fl (and fl_rt) per sock{} (ipv6_pinfo{})? > (ditto.) > My intention is not high art, just using struct in6_addr instead of struct flowi to store final destination. > We have similar stack usage in other codes, and > I would fix them at the same time. > These might be my changes. I will fix them. > > Another question just for future reference: > how many bytes (approx.) do we accept on stack? > > Note: sizeof(struct flowi) is 72 bytes (on i386) > > --yoshfuji --Kazunori Miyazawa From herbert@gondor.apana.org.au Tue Aug 3 03:55:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 03:55: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 i73Atgsj016097 for ; Tue, 3 Aug 2004 03:55:44 -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 1Brwx3-0005cn-00; Tue, 03 Aug 2004 20:55:25 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Brwwy-0007ZY-00; Tue, 03 Aug 2004 20:55:20 +1000 Date: Tue, 3 Aug 2004 20:55:20 +1000 To: "David S. Miller" Cc: kazunori@miyazawa.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, kuznet@ms2.inr.ac.ru Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup Message-ID: <20040803105520.GA29077@gondor.apana.org.au> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040802074147.GA16381@gondor.apana.org.au> <20040802190914.303ccfbe.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040802190914.303ccfbe.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7445 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 Mon, Aug 02, 2004 at 07:09:14PM -0700, David S. Miller wrote: > > An intesting solution would be to use stacked destinations, which > do no actual encapsulation (or perhaps do the routing header work) > and merely represent the hop-by-hop path. Then the PMTU propagation > machinery can be used, and route lookups will go through a slower path > to find these special stacked hop-by-hop routes. Yes that's brilliant. We can replace the current rt dst with an rthdr dst + an rt dst. The rt dst will be the same one pointing to the first hop. The rthdr will contain MTU information for that exact path. This will work since any ICMP messages we receive due to MTU issues must carry the entire IP header including the rthdr (or in the case of IPv4 the ?SR option). We can then attribute that MTU to the rthdr dst. The rthdr can even add the option/extension header as a transform. 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 ptsjohol@cc.jyu.fi Tue Aug 3 05:33:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 05:33:14 -0700 (PDT) Received: from posti6.jyu.fi (posti6.jyu.fi [130.234.4.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73CWjVf027633 for ; Tue, 3 Aug 2004 05:33:06 -0700 Received: from silmu.st.jyu.fi (IDENT:i+l7SQ6073MYpVQbfBUEyZ6AO77O2o0J@silmu.st.jyu.fi [130.234.4.64]) by posti6.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i73CWIob027197; Tue, 3 Aug 2004 15:32:18 +0300 Date: Tue, 3 Aug 2004 15:32:15 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , , , , Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) In-Reply-To: <20040803003515.A29885@electric-eye.fr.zoreil.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti6.jyu.fi; Tue, 03 Aug 2004 15:32:21 +0300 X-archive-position: 7447 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev On Tue, 3 Aug 2004, Francois Romieu wrote: > I have made a few changes. Please enable the DEBUG option and set msglvl > to its maximal value via ethtool. You may test the patches separately if > you find some time but the log once both r8139-10.patch and r8139-20.patch > are applied would be enough. The full logfiles can be downloaded from: http://www.cc.jyu.fi/~ptsjohol/syslog1.gz http://www.cc.jyu.fi/~ptsjohol/syslog2.gz The first log file is with both patchs applied and the second one with one little change to rx8139_rx() to show if it even goes to through " while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {"-section. This was the change which I made.. so you can see in the second log file that there won't be any of these messages after the driver has crashed. /* if (netif_msg_rx_status(tp))*/ printk(KERN_DEBUG "%s: rtl8139_rx() status %4.4x, size %4.4x," " cur %4.4x.\n", dev->name, rx_status, rx_size, cur_rx); For the first logfile the exact crash time is "13:02:22" and the for the second one it is "14:54:49". > If the log fills too fast, you may comment out any message which does > not belong to rtl8139_rx(). I took out those "exiting with interrupt"-messages. -- Pasi Sjöholm From scarfboy@gmail.com Tue Aug 3 05:32:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 05:32:44 -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 i73CWGTN027626 for ; Tue, 3 Aug 2004 05:32:37 -0700 Received: by mproxy.gmail.com with SMTP id 73so153437rnk for ; Tue, 03 Aug 2004 05:32:07 -0700 (PDT) Received: by 10.38.81.50 with SMTP id e50mr258492rnb; Tue, 03 Aug 2004 05:32:07 -0700 (PDT) Message-ID: Date: Tue, 3 Aug 2004 14:32:07 +0200 From: Bart Alewijnse To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: gigabit trouble In-Reply-To: <20040803094842.B4911@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_9_19135111.1091536327656" References: <20040729210401.A32456@electric-eye.fr.zoreil.com> <20040730205412.A15669@electric-eye.fr.zoreil.com> <20040730234120.A15536@electric-eye.fr.zoreil.com> <20040731231836.A31121@electric-eye.fr.zoreil.com> <20040803094842.B4911@electric-eye.fr.zoreil.com> X-archive-position: 7446 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scarfboy@gmail.com Precedence: bulk X-list: netdev ------=_Part_9_19135111.1091536327656 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Quite simply a 'netio -s' on one computer, and a 'netio -u 192.168.1.whichever' on the other. I was monitoring with 'vmstat 1' for hardware stuff and bmon to see the actual speed and had a ssh open. The things I've been fiddling with recently to see if it'd make a difference: - Renicing of ksoftirqc to anything between -5 and -17, I don't remember exactly. - Disabling tcp window scaling. I read somewhere that that may help throughhput, but it may be a stupid move. - Some barely thought about (I did read the following: http://lists.samba.org/archive/samba/2003-December/077198.html) window memory buffer size changes, with a 'so that that at least won't be a bottleneck' angle: -------------------- echo 400000 > /proc/sys/net/core/wmem_default echo 512000 > /proc/sys/net/core/wmem_max echo 400000 > /proc/sys/net/core/rmem_default echo 512000 > /proc/sys/net/core/rmem_max echo 98304 512000 640000 > /proc/sys/net/ipv4/tcp_mem echo 98304 512000 640000 > /proc/sys/net/ipv4/tcp_wmem echo 98304 512000 640000 > /proc/sys/net/ipv4/tcp_rmem echo 98304 512000 640000 > /proc/sys/net/ipv4/tcp_mem ----------- It seems that windows (in which I have jumbo frames on) doesn' quite need as many interrupts, although I'm not sure that was for the same speed, as I had another kernel panic (attached, this one has a small visible trace). I was running the windows version of netio as a server, and doing a client test with udp. --Bart Alewijnse ------=_Part_9_19135111.1091536327656 Content-Type: image/gif; name="panic3.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="panic3.gif" R0lGODlhIANsArMAAAAAAP///0o+QJZzpldfdZ6rx87c6zQqICERDf///wAAAAAAAAAAAAAAAAAA AAAAACH5BAEAAAkALAAAAAAgA2wCAAT/EMgJEKq2YnmtvxzVZdQEmmJYdmVLri0az+ZnHfbobRzo 0zKM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9DLSNDnLcri6lJIhqi+EMfE11tO0+n1SXDYV2DgDjR kCatbCfRcGPsY86tEL6Aswt3kLUYOHUVUG8RNluzhmzKe2Phkf95ulmbn4CBRUYl7HMvEmZMW5Nq x5VjS+y6mjgLpuKV3mEqervDWbbYSQzP8szY/nzUlK0GNMwUlX1tqAwEu/TO5RsRWrk8FOuFPpBa rHnVlbFqCs02G3lw5UhTSbWlY2E3Y20fB1LQrIVSVuQnYfHXf/mAdsNB0sJ3SmTVLDB3dZR32GW9 WBW/DEEFQbi+UlqxoHwIQJ3ZmZzOl33P2G3doqxueoudoQ3aQHQ0IGJEpKIpm5hAxGouJdc1GhxO k4IUkuJESPgSLzhrid0dAqRoAJF3GmLQYMU4pl1MK1B2LWFSCCSs0x0a4O3ERNzdEl46SQEXZD3h 3u0iEC7eka3torzk4VetNLS2b8/RLDHVdlgcRQvD3qqlAxi9x88jUxGTGfLnMF2odwh92om7QFPl meODPCGCsJQTNGEnxLA6yhie5MIhMFtTP+zD3UreER/DMTzt4VT+2D2t1Am0Y8UdItfZge1Xzldy YXrX4rFltdw3EGyr35voWmwu4EvM4lJdEEDuNDlKPRPDOb9IOeTd2N4d5YCuKpb21/FoH08O5YFu E6Mj0CRjQU99Qc/NPEvgvlNFRiY35whtQJtIw5ag023OR+pU5sp13C7bRHKO00gz6RQ7oplDKsZx uIke665CfxIHDXxZ6JXw5BEAADs= ------=_Part_9_19135111.1091536327656-- From kaber@trash.net Tue Aug 3 08:23:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:23:15 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73FN7sO002811 for ; Tue, 3 Aug 2004 08:23:07 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 353CC19F377; Tue, 3 Aug 2004 17:22:55 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 7A70A39413B; Tue, 3 Aug 2004 17:22:54 +0200 (CEST) Message-ID: <410FAE65.6010802@trash.net> Date: Tue, 03 Aug 2004 17:25: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: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6 4/5]: remove unneccessary checks for qdisc->dev Content-Type: multipart/mixed; boundary="------------070305030108050302020103" X-archive-position: 7450 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: 2129 Lines: 68 This is a multi-part message in MIME format. --------------070305030108050302020103 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit qdisc->dev is always valid, this patch removes a couple of unneccessary checks. --------------070305030108050302020103 Content-Type: text/x-patch; name="04-qdisc-dev-checks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="04-qdisc-dev-checks.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/03 01:28:36+02:00 kaber@coreworks.de # [PKT_SCHED]: remove unneccessary checks for qdisc->dev # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/03 01:28:15+02:00 kaber@coreworks.de +1 -2 # [PKT_SCHED]: remove unneccessary checks for qdisc->dev # # net/sched/sch_api.c # 2004/08/03 01:28:15+02:00 kaber@coreworks.de +2 -2 # [PKT_SCHED]: remove unneccessary checks for qdisc->dev # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-03 01:30:00 +02:00 +++ b/net/sched/sch_api.c 2004-08-03 01:30:00 +02:00 @@ -753,7 +753,7 @@ nlh->nlmsg_flags = flags; tcm = NLMSG_DATA(nlh); tcm->tcm_family = AF_UNSPEC; - tcm->tcm_ifindex = q->dev ? q->dev->ifindex : 0; + tcm->tcm_ifindex = q->dev->ifindex; tcm->tcm_parent = clid; tcm->tcm_handle = q->handle; tcm->tcm_info = atomic_read(&q->refcnt); @@ -970,7 +970,7 @@ nlh->nlmsg_flags = flags; tcm = NLMSG_DATA(nlh); tcm->tcm_family = AF_UNSPEC; - tcm->tcm_ifindex = q->dev ? q->dev->ifindex : 0; + tcm->tcm_ifindex = q->dev->ifindex; tcm->tcm_parent = q->handle; tcm->tcm_handle = q->handle; tcm->tcm_info = 0; diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-03 01:30:00 +02:00 +++ b/net/sched/sch_generic.c 2004-08-03 01:30:00 +02:00 @@ -443,8 +443,7 @@ write_unlock(&qdisc_tree_lock); module_put(ops->owner); - if (qdisc->dev) - dev_put(qdisc->dev); + dev_put(qdisc->dev); if (!(qdisc->flags&TCQ_F_BUILTIN)) kfree(qdisc); } --------------070305030108050302020103-- From kaber@trash.net Tue Aug 3 08:22:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:22:41 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73FMYGd002692 for ; Tue, 3 Aug 2004 08:22:34 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id E9CD619F377; Tue, 3 Aug 2004 17:22:20 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id F049F39413B; Tue, 3 Aug 2004 17:22:19 +0200 (CEST) Message-ID: <410FAE42.2050909@trash.net> Date: Tue, 03 Aug 2004 17:24:50 +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/5]: Use double-linked list for dev->qdisc_list Content-Type: multipart/mixed; boundary="------------030000030800010808020702" X-archive-position: 7449 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: 6290 Lines: 235 This is a multi-part message in MIME format. --------------030000030800010808020702 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch changes dev->qdisc_list to a double-linked list. This solves the performance problems when destroying qdiscs with large number of inner qdiscs. --------------030000030800010808020702 Content-Type: text/x-patch; name="03-qdisc_list-list_h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="03-qdisc_list-list_h.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/03 00:48:50+02:00 kaber@coreworks.de # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/03 00:48:19+02:00 kaber@coreworks.de +5 -19 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # net/sched/sch_api.c # 2004/08/03 00:48:19+02:00 kaber@coreworks.de +16 -11 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # include/net/pkt_sched.h # 2004/08/03 00:48:19+02:00 kaber@coreworks.de +1 -1 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # include/linux/netdevice.h # 2004/08/03 00:48:19+02:00 kaber@coreworks.de +1 -1 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-08-03 01:11:00 +02:00 +++ b/include/linux/netdevice.h 2004-08-03 01:11:00 +02:00 @@ -362,8 +362,8 @@ struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; - struct Qdisc *qdisc_list; struct Qdisc *qdisc_ingress; + struct list_head qdisc_list; unsigned long tx_queue_len; /* Max frames per queue allowed */ /* ingress path synchronizer */ diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h --- a/include/net/pkt_sched.h 2004-08-03 01:11:00 +02:00 +++ b/include/net/pkt_sched.h 2004-08-03 01:11:00 +02:00 @@ -78,11 +78,11 @@ #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 struct Qdisc_ops *ops; - struct Qdisc *next; u32 handle; atomic_t refcnt; struct sk_buff_head q; struct net_device *dev; + struct list_head list; struct tc_stats stats; spinlock_t *stats_lock; diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-03 01:11:00 +02:00 +++ b/net/sched/sch_api.c 2004-08-03 01:11:00 +02:00 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -195,7 +196,7 @@ { struct Qdisc *q; - for (q = dev->qdisc_list; q; q = q->next) { + list_for_each_entry(q, &dev->qdisc_list, list) { if (q->handle == handle) return q; } @@ -421,6 +422,7 @@ memset(sch, 0, size); + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); if (handle == TC_H_INGRESS) @@ -454,8 +456,7 @@ smp_wmb(); if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { qdisc_lock_tree(dev); - sch->next = dev->qdisc_list; - dev->qdisc_list = sch; + list_add_tail(&sch->list, &dev->qdisc_list); qdisc_unlock_tree(dev); #ifdef CONFIG_NET_ESTIMATOR @@ -814,9 +815,9 @@ if (idx > s_idx) s_q_idx = 0; read_lock_bh(&qdisc_tree_lock); - for (q = dev->qdisc_list, q_idx = 0; q; - q = q->next, q_idx++) { - if (q_idx < s_q_idx) + q_idx = 0; + list_for_each_entry(q, &dev->qdisc_list, list) { + if (q_idx++ < s_q_idx) continue; if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { @@ -831,7 +832,7 @@ read_unlock(&dev_base_lock); cb->args[0] = idx; - cb->args[1] = q_idx; + cb->args[1] = q_idx - 1; return skb->len; } @@ -1033,13 +1034,16 @@ return 0; s_t = cb->args[0]; + t = 0; read_lock_bh(&qdisc_tree_lock); - for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { - if (t < s_t) continue; - if (!q->ops->cl_ops) continue; - if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle) + list_for_each_entry(q, &dev->qdisc_list, list) { + if (t < s_t || !q->ops->cl_ops || + (tcm->tcm_parent && + TC_H_MAJ(tcm->tcm_parent) != q->handle)) { + t++; continue; + } if (t > s_t) memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); arg.w.fn = qdisc_class_dump; @@ -1052,6 +1056,7 @@ cb->args[1] = arg.w.count; if (arg.w.stop) break; + t++; } read_unlock_bh(&qdisc_tree_lock); diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-03 01:11:00 +02:00 +++ b/net/sched/sch_generic.c 2004-08-03 01:11:00 +02:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -394,6 +395,7 @@ return NULL; memset(sch, 0, size); + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); sch->ops = ops; sch->enqueue = ops->enqueue; @@ -451,20 +453,9 @@ void qdisc_destroy(struct Qdisc *qdisc) { - struct net_device *dev = qdisc->dev; - if (!atomic_dec_and_test(&qdisc->refcnt)) return; - - if (dev) { - struct Qdisc *q, **qp; - for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) { - if (q == qdisc) { - *qp = q->next; - break; - } - } - } + list_del(&qdisc->list); call_rcu(&qdisc->q_rcu, __qdisc_destroy); } @@ -484,12 +475,9 @@ printk(KERN_INFO "%s: activation failed\n", dev->name); return; } - write_lock_bh(&qdisc_tree_lock); - qdisc->next = dev->qdisc_list; - dev->qdisc_list = qdisc; + list_add_tail(&qdisc->list, &dev->qdisc_list); write_unlock_bh(&qdisc_tree_lock); - } else { qdisc = &noqueue_qdisc; } @@ -531,7 +519,7 @@ qdisc_lock_tree(dev); dev->qdisc = &noop_qdisc; dev->qdisc_sleeping = &noop_qdisc; - dev->qdisc_list = NULL; + INIT_LIST_HEAD(&dev->qdisc_list); qdisc_unlock_tree(dev); dev_watchdog_init(dev); @@ -552,9 +540,7 @@ qdisc_destroy(qdisc); } #endif - BUG_TRAP(dev->qdisc_list == NULL); BUG_TRAP(!timer_pending(&dev->watchdog_timer)); - dev->qdisc_list = NULL; qdisc_unlock_tree(dev); } --------------030000030800010808020702-- From kaber@trash.net Tue Aug 3 08:23:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:23:48 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73FNfsZ003069 for ; Tue, 3 Aug 2004 08:23:41 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 7C0E719F378; Tue, 3 Aug 2004 17:23:28 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 104D139413B; Tue, 3 Aug 2004 17:23:24 +0200 (CEST) Message-ID: <410FAE82.7070604@trash.net> Date: Tue, 03 Aug 2004 17:25: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 Subject: [PATCH 2.6 5/5]: remove noop_qdisc assignments in destroy functions Content-Type: multipart/mixed; boundary="------------060803040006040108040500" X-archive-position: 7451 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: 3603 Lines: 120 This is a multi-part message in MIME format. --------------060803040006040108040500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch removes useless noop_qdisc assignments in multiple qdiscs destroy functions, the memory where the pointer is stored is freed directly after the destroy function. --------------060803040006040108040500 Content-Type: text/x-patch; name="05-destroy-noop-qdisc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="05-destroy-noop-qdisc.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/03 03:02:03+02:00 kaber@coreworks.de # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # Signed-off-by: Patrick McHardy # # net/sched/sch_tbf.c # 2004/08/03 03:01:39+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_red.c # 2004/08/03 03:01:39+02:00 kaber@coreworks.de +0 -5 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_prio.c # 2004/08/03 03:01:39+02:00 kaber@coreworks.de +1 -3 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_netem.c # 2004/08/03 03:01:39+02:00 kaber@coreworks.de +0 -2 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_dsmark.c # 2004/08/03 03:01:39+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # diff -Nru a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c --- a/net/sched/sch_dsmark.c 2004-08-03 03:03:09 +02:00 +++ b/net/sched/sch_dsmark.c 2004-08-03 03:03:09 +02:00 @@ -383,7 +383,6 @@ tcf_destroy(tp); } qdisc_destroy(p->q); - p->q = &noop_qdisc; kfree(p->mask); } diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-03 03:03:09 +02:00 +++ b/net/sched/sch_netem.c 2004-08-03 03:03:09 +02:00 @@ -812,9 +812,7 @@ struct netem_sched_data *q = (struct netem_sched_data *)sch->data; del_timer_sync(&q->timer); - qdisc_destroy(q->qdisc); - q->qdisc = &noop_qdisc; } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) diff -Nru a/net/sched/sch_prio.c b/net/sched/sch_prio.c --- a/net/sched/sch_prio.c 2004-08-03 03:03:09 +02:00 +++ b/net/sched/sch_prio.c 2004-08-03 03:03:09 +02:00 @@ -208,10 +208,8 @@ tcf_destroy(tp); } - for (prio=0; priobands; prio++) { + for (prio=0; priobands; prio++) qdisc_destroy(q->queues[prio]); - q->queues[prio] = &noop_qdisc; - } } static int prio_tune(struct Qdisc *sch, struct rtattr *opt) diff -Nru a/net/sched/sch_red.c b/net/sched/sch_red.c --- a/net/sched/sch_red.c 2004-08-03 03:03:09 +02:00 +++ b/net/sched/sch_red.c 2004-08-03 03:03:09 +02:00 @@ -434,10 +434,6 @@ return -1; } -static void red_destroy(struct Qdisc *sch) -{ -} - static struct Qdisc_ops red_qdisc_ops = { .next = NULL, .cl_ops = NULL, @@ -449,7 +445,6 @@ .drop = red_drop, .init = red_init, .reset = red_reset, - .destroy = red_destroy, .change = red_change, .dump = red_dump, .owner = THIS_MODULE, diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c --- a/net/sched/sch_tbf.c 2004-08-03 03:03:09 +02:00 +++ b/net/sched/sch_tbf.c 2004-08-03 03:03:09 +02:00 @@ -393,7 +393,6 @@ qdisc_put_rtab(q->R_tab); qdisc_destroy(q->qdisc); - q->qdisc = &noop_qdisc; } static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) --------------060803040006040108040500-- From shemminger@osdl.org Tue Aug 3 08:31:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:32:01 -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 i73FVsWg003901 for ; Tue, 3 Aug 2004 08:31:55 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73FVg105697; Tue, 3 Aug 2004 08:31:42 -0700 Date: Tue, 3 Aug 2004 08:31:42 -0700 From: Stephen Hemminger To: Tomasz Torcz Cc: netdev@oss.sgi.com Subject: Re: iproute2 and kernel headers Message-Id: <20040803083142.5a4ccaad@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803001459.GA8637@irc.pl> References: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> <20040803001459.GA8637@irc.pl> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7452 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: 797 Lines: 16 On Tue, 3 Aug 2004 02:14:59 +0200 Tomasz Torcz wrote: > On Mon, Aug 02, 2004 at 03:38:05PM -0700, Stephen Hemminger wrote: > > I am willing to put some headers (not all) in with the user level > > code, provided they are copies since they I can easily update. I don't want > > to get into keeping an edited set of headers in sync. > > Aren't linux-libc-headers (*) sufficient? > > * - http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ The theory of that is good, but in practice it would make the problem worse. What iproute2 wants is to have the same kernel data structures as the latest kernel. It is awkward enough making sure to get them from the correct kernel sources, but doing it from a different package would make updating and keeping everything current worse. From shemminger@osdl.org Tue Aug 3 08:36:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:36: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 i73Fa0aG004303 for ; Tue, 3 Aug 2004 08:36:00 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73FZe106428; Tue, 3 Aug 2004 08:35:40 -0700 Date: Tue, 3 Aug 2004 08:35:40 -0700 From: Stephen Hemminger To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list Message-Id: <20040803083540.13675d64@dell_ss3.pdx.osdl.net> In-Reply-To: <410FAE42.2050909@trash.net> References: <410FAE42.2050909@trash.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7453 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: 4755 Lines: 187 On Tue, 03 Aug 2004 17:24:50 +0200 Patrick McHardy wrote: > This patch changes dev->qdisc_list to a double-linked list. This solves > the performance problems when destroying qdiscs with large number of inner > qdiscs. > > Since qdisc lists are using rcu for deletion, you should use the _rcu flavors of list stuff. replace BUG_TRAP(dev->qdisc_list == NULL); with BUG_TRAP(list_empty(&dev->qdisc_list)); I tried a similar patch but was finding the bug_trap() was showing up on deletion so did not trust it. This is what I was experimenting with. ------------ diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-07-28 15:14:27 -07:00 +++ b/include/linux/netdevice.h 2004-07-28 15:14:27 -07:00 @@ -362,7 +362,7 @@ struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; - struct Qdisc *qdisc_list; + struct list_head qdisc_list; struct Qdisc *qdisc_ingress; unsigned long tx_queue_len; /* Max frames per queue allowed */ diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h --- a/include/net/pkt_sched.h 2004-07-28 15:14:27 -07:00 +++ b/include/net/pkt_sched.h 2004-07-28 15:14:27 -07:00 @@ -79,7 +79,7 @@ #define TCQ_F_INGRES 4 int padded; struct Qdisc_ops *ops; - struct Qdisc *next; + struct list_head list; u32 handle; atomic_t refcnt; struct sk_buff_head q; diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-07-28 15:14:27 -07:00 +++ b/net/sched/sch_api.c 2004-07-28 15:14:27 -07:00 @@ -195,7 +195,7 @@ { struct Qdisc *q; - for (q = dev->qdisc_list; q; q = q->next) { + list_for_each_entry_rcu(q, &dev->qdisc_list, list) { if (q->handle == handle) return q; } @@ -453,8 +453,7 @@ smp_wmb(); if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { qdisc_lock_tree(dev); - sch->next = dev->qdisc_list; - dev->qdisc_list = sch; + list_add_rcu(&sch->list, &dev->qdisc_list); qdisc_unlock_tree(dev); #ifdef CONFIG_NET_ESTIMATOR @@ -812,18 +811,20 @@ continue; if (idx > s_idx) s_q_idx = 0; - read_lock(&qdisc_tree_lock); - for (q = dev->qdisc_list, q_idx = 0; q; - q = q->next, q_idx++) { - if (q_idx < s_q_idx) + + rcu_read_lock(); + + q_idx = 0; + list_for_each_entry_rcu(q, &dev->qdisc_list, list) { + if (q_idx++ < s_q_idx) continue; if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { - read_unlock(&qdisc_tree_lock); + rcu_read_unlock(); goto done; } } - read_unlock(&qdisc_tree_lock); + rcu_read_unlock(); } done: @@ -1033,9 +1034,10 @@ s_t = cb->args[0]; - read_lock(&qdisc_tree_lock); - for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { - if (t < s_t) continue; + rcu_read_lock(); + t = 0; + list_for_each_entry_rcu(q, &dev->qdisc_list, list) { + if (t++ < s_t) continue; if (!q->ops->cl_ops) continue; if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle) continue; @@ -1052,7 +1054,7 @@ if (arg.w.stop) break; } - read_unlock(&qdisc_tree_lock); + rcu_read_unlock(); cb->args[0] = t; diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-07-28 15:14:27 -07:00 +++ b/net/sched/sch_generic.c 2004-07-28 15:14:27 -07:00 @@ -405,6 +405,8 @@ sch->dev = dev; sch->stats_lock = &dev->queue_lock; atomic_set(&sch->refcnt, 1); + INIT_LIST_HEAD(&sch->list); + /* enqueue is accessed locklessly - make sure it's visible * before we set a netdevice's qdisc pointer to sch */ smp_wmb(); @@ -450,23 +452,12 @@ void qdisc_destroy(struct Qdisc *qdisc) { - struct net_device *dev = qdisc->dev; - if (!atomic_dec_and_test(&qdisc->refcnt)) return; - if (dev) { - struct Qdisc *q, **qp; - for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) { - if (q == qdisc) { - *qp = q->next; - break; - } - } - } - + if (qdisc->dev) + list_del_rcu(&qdisc->list); call_rcu(&qdisc->q_rcu, __qdisc_destroy); - } @@ -488,8 +479,7 @@ } write_lock(&qdisc_tree_lock); - qdisc->next = dev->qdisc_list; - dev->qdisc_list = qdisc; + list_add_rcu(&qdisc->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); } else { @@ -533,7 +523,7 @@ qdisc_lock_tree(dev); dev->qdisc = &noop_qdisc; dev->qdisc_sleeping = &noop_qdisc; - dev->qdisc_list = NULL; + INIT_LIST_HEAD(&dev->qdisc_list); qdisc_unlock_tree(dev); dev_watchdog_init(dev); @@ -554,9 +544,9 @@ qdisc_destroy(qdisc); } #endif - BUG_TRAP(dev->qdisc_list == NULL); + BUG_TRAP(!list_empty(&dev->qdisc_list)); BUG_TRAP(!timer_pending(&dev->watchdog_timer)); - dev->qdisc_list = NULL; + qdisc_unlock_tree(dev); } From shemminger@osdl.org Tue Aug 3 08:38:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:38: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 i73FceJh004668 for ; Tue, 3 Aug 2004 08:38:40 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73FcK107304; Tue, 3 Aug 2004 08:38:20 -0700 Date: Tue, 3 Aug 2004 08:38:20 -0700 From: Stephen Hemminger To: Patrick McHardy , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] cache align qdisc data Message-Id: <20040803083820.711c917c@dell_ss3.pdx.osdl.net> In-Reply-To: <410FAE42.2050909@trash.net> References: <410FAE42.2050909@trash.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7454 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: 46927 Lines: 1542 This patch has qdisc code use the same interface as the netdevice code to cache align the object private data. Signed-off-by: Stephen Hemminger diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h --- a/include/net/pkt_sched.h 2004-07-27 11:03:02 -07:00 +++ b/include/net/pkt_sched.h 2004-07-27 11:03:02 -07:00 @@ -77,6 +77,7 @@ #define TCQ_F_BUILTIN 1 #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 + int padded; struct Qdisc_ops *ops; struct Qdisc *next; u32 handle; @@ -93,9 +94,16 @@ * and it will live until better solution will be invented. */ struct Qdisc *__parent; - - char data[0]; }; + +#define QDISC_ALIGN 32 +#define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) + +static inline void *qdisc_priv(struct Qdisc *q) +{ + return (char *)q + ((sizeof(struct Qdisc) + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); +} struct qdisc_rate_table { diff -Nru a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c --- a/net/sched/sch_cbq.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_cbq.c 2004-07-27 11:03:02 -07:00 @@ -241,7 +241,7 @@ static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *head = &q->link; struct cbq_class **defmap; struct cbq_class *cl = NULL; @@ -344,7 +344,7 @@ static __inline__ void cbq_activate_class(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); int prio = cl->cpriority; struct cbq_class *cl_tail; @@ -368,7 +368,7 @@ static void cbq_deactivate_class(struct cbq_class *this) { - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); int prio = this->cpriority; struct cbq_class *cl; struct cbq_class *cl_prev = q->active[prio]; @@ -419,7 +419,7 @@ static int cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); int len = skb->len; int ret = NET_XMIT_SUCCESS; struct cbq_class *cl = cbq_classify(skb, sch,&ret); @@ -466,7 +466,7 @@ static int cbq_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int ret; @@ -500,7 +500,7 @@ static void cbq_ovl_classic(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { @@ -554,7 +554,7 @@ static void cbq_ovl_rclassic(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *this = cl; do { @@ -573,7 +573,7 @@ static void cbq_ovl_delay(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { @@ -609,7 +609,7 @@ static void cbq_ovl_lowprio(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); cl->penalized = jiffies + cl->penalty; @@ -678,7 +678,7 @@ static void cbq_undelay(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); long delay = 0; unsigned pmask; @@ -715,7 +715,7 @@ { int len = skb->len; struct Qdisc *sch = child->__parent; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = q->rx_class; q->rx_class = NULL; @@ -863,7 +863,7 @@ static __inline__ struct cbq_class * cbq_under_limit(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *this_cl = cl; if (cl->tparent == NULL) @@ -903,7 +903,7 @@ static __inline__ struct sk_buff * cbq_dequeue_prio(struct Qdisc *sch, int prio) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl_tail, *cl_prev, *cl; struct sk_buff *skb; int deficit; @@ -1006,7 +1006,7 @@ static __inline__ struct sk_buff * cbq_dequeue_1(struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; unsigned activemask; @@ -1025,7 +1025,7 @@ cbq_dequeue(struct Qdisc *sch) { struct sk_buff *skb; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); psched_time_t now; psched_tdiff_t incr; @@ -1150,7 +1150,7 @@ static void cbq_sync_defmap(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *split = cl->split; unsigned h; int i; @@ -1216,7 +1216,7 @@ static void cbq_unlink_class(struct cbq_class *this) { struct cbq_class *cl, **clp; - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); for (clp = &q->classes[cbq_hash(this->classid)]; (cl = *clp) != NULL; clp = &cl->next) { if (cl == this) { @@ -1249,7 +1249,7 @@ static void cbq_link_class(struct cbq_class *this) { - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); unsigned h = cbq_hash(this->classid); struct cbq_class *parent = this->tparent; @@ -1270,7 +1270,7 @@ static unsigned int cbq_drop(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl, *cl_head; int prio; unsigned int len; @@ -1293,7 +1293,7 @@ static void cbq_reset(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int prio; unsigned h; @@ -1363,7 +1363,7 @@ static int cbq_set_wrr(struct cbq_class *cl, struct tc_cbq_wrropt *wrr) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); if (wrr->allot) cl->allot = wrr->allot; @@ -1432,7 +1432,7 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_CBQ_MAX]; struct tc_ratespec *r; @@ -1623,7 +1623,7 @@ static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; @@ -1650,7 +1650,7 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; unsigned char *b = skb->tail; struct rtattr *rta; @@ -1726,7 +1726,7 @@ static unsigned long cbq_get(struct Qdisc *sch, u32 classid) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = cbq_class_lookup(q, classid); if (cl) { @@ -1760,7 +1760,7 @@ static void cbq_destroy(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; unsigned h; @@ -1791,7 +1791,7 @@ if (--cl->refcnt == 0) { #ifdef CONFIG_NET_CLS_POLICE - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); spin_lock_bh(&sch->dev->queue_lock); if (q->rx_class == cl) @@ -1808,7 +1808,7 @@ unsigned long *arg) { int err; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)*arg; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct rtattr *tb[TCA_CBQ_MAX]; @@ -2004,7 +2004,7 @@ static int cbq_delete(struct Qdisc *sch, unsigned long arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; if (cl->filters || cl->children || cl == &q->link) @@ -2042,7 +2042,7 @@ static struct tcf_proto **cbq_find_tcf(struct Qdisc *sch, unsigned long arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class *)arg; if (cl == NULL) @@ -2054,7 +2054,7 @@ static unsigned long cbq_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *p = (struct cbq_class*)parent; struct cbq_class *cl = cbq_class_lookup(q, classid); @@ -2076,7 +2076,7 @@ static void cbq_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); unsigned h; if (arg->stop) diff -Nru a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c --- a/net/sched/sch_dsmark.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_dsmark.c 2004-07-27 11:03:02 -07:00 @@ -30,7 +30,7 @@ #endif -#define PRIV(sch) ((struct dsmark_qdisc_data *) (sch)->data) +#define PRIV(sch) qdisc_priv(sch) /* diff -Nru a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c --- a/net/sched/sch_fifo.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_fifo.c 2004-07-27 11:03:02 -07:00 @@ -45,7 +45,7 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct fifo_sched_data *q = (struct fifo_sched_data *)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (sch->stats.backlog + skb->len <= q->limit) { __skb_queue_tail(&sch->q, skb); @@ -106,7 +106,7 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct fifo_sched_data *q = (struct fifo_sched_data *)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (sch->q.qlen < q->limit) { __skb_queue_tail(&sch->q, skb); @@ -138,7 +138,7 @@ static int fifo_init(struct Qdisc *sch, struct rtattr *opt) { - struct fifo_sched_data *q = (void*)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (opt == NULL) { unsigned int limit = sch->dev->tx_queue_len ? : 1; @@ -158,7 +158,7 @@ static int fifo_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct fifo_sched_data *q = (void*)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_fifo_qopt opt; diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_generic.c 2004-07-27 11:03:02 -07:00 @@ -283,10 +283,9 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) { - struct sk_buff_head *list; + struct sk_buff_head *list = qdisc_priv(qdisc); - list = ((struct sk_buff_head*)qdisc->data) + - prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[skb->priority&TC_PRIO_MAX]; if (list->qlen < qdisc->dev->tx_queue_len) { __skb_queue_tail(list, skb); @@ -304,7 +303,7 @@ pfifo_fast_dequeue(struct Qdisc* qdisc) { int prio; - struct sk_buff_head *list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); struct sk_buff *skb; for (prio = 0; prio < 3; prio++, list++) { @@ -320,10 +319,9 @@ static int pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc) { - struct sk_buff_head *list; + struct sk_buff_head *list = qdisc_priv(qdisc); - list = ((struct sk_buff_head*)qdisc->data) + - prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[skb->priority&TC_PRIO_MAX]; __skb_queue_head(list, skb); qdisc->q.qlen++; @@ -334,7 +332,7 @@ pfifo_fast_reset(struct Qdisc* qdisc) { int prio; - struct sk_buff_head *list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); for (prio=0; prio < 3; prio++) skb_queue_purge(list+prio); @@ -359,9 +357,7 @@ static int pfifo_fast_init(struct Qdisc *qdisc, struct rtattr *opt) { int i; - struct sk_buff_head *list; - - list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); for (i=0; i<3; i++) skb_queue_head_init(list+i); @@ -385,13 +381,22 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) { + void *p; struct Qdisc *sch; - int size = sizeof(*sch) + ops->priv_size; + int size; + + /* ensure that the Qdisc and the private data are 32-byte aligned */ + size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); + size += ops->priv_size + QDISC_ALIGN_CONST; - sch = kmalloc(size, GFP_KERNEL); - if (!sch) + p = kmalloc(size, GFP_KERNEL); + if (!p) return NULL; - memset(sch, 0, size); + memset(p, 0, size); + + sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); + sch->padded = (char *)sch - (char *)p; skb_queue_head_init(&sch->q); sch->ops = ops; @@ -406,7 +411,7 @@ if (!ops->init || ops->init(sch, NULL) == 0) return sch; - kfree(sch); + kfree(p); return NULL; } @@ -438,7 +443,7 @@ module_put(ops->owner); if (!(qdisc->flags&TCQ_F_BUILTIN)) - kfree(qdisc); + kfree((char *) qdisc - qdisc->padded); } /* Under dev->queue_lock and BH! */ diff -Nru a/net/sched/sch_gred.c b/net/sched/sch_gred.c --- a/net/sched/sch_gred.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_gred.c 2004-07-27 11:03:02 -07:00 @@ -106,7 +106,7 @@ { psched_time_t now; struct gred_sched_data *q=NULL; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); unsigned long qave=0; int i=0; @@ -215,7 +215,7 @@ gred_requeue(struct sk_buff *skb, struct Qdisc* sch) { struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); q= t->tab[(skb->tc_index&0xf)]; /* error checking here -- probably unnecessary */ PSCHED_SET_PASTPERFECT(q->qidlestart); @@ -231,7 +231,7 @@ { struct sk_buff *skb; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); skb = __skb_dequeue(&sch->q); if (skb) { @@ -264,7 +264,7 @@ struct sk_buff *skb; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); skb = __skb_dequeue_tail(&sch->q); if (skb) { @@ -300,7 +300,7 @@ { int i; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); __skb_queue_purge(&sch->q); @@ -323,7 +323,7 @@ static int gred_change(struct Qdisc *sch, struct rtattr *opt) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct gred_sched_data *q; struct tc_gred_qopt *ctl; struct tc_gred_sopt *sopt; @@ -469,7 +469,7 @@ static int gred_init(struct Qdisc *sch, struct rtattr *opt) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct tc_gred_sopt *sopt; struct rtattr *tb[TCA_GRED_STAB]; struct rtattr *tb2[TCA_GRED_DPS]; @@ -502,7 +502,7 @@ struct rtattr *rta; struct tc_gred_qopt *opt = NULL ; struct tc_gred_qopt *dst; - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct gred_sched_data *q; int i; unsigned char *b = skb->tail; @@ -593,7 +593,7 @@ static void gred_destroy(struct Qdisc *sch) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); int i; for (i = 0;i < table->DPs; i++) { diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_hfsc.c 2004-07-27 11:03:02 -07:00 @@ -1016,7 +1016,7 @@ static inline struct hfsc_class * hfsc_find_class(u32 classid, struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; list_for_each_entry(cl, &q->clhash[hfsc_hash(classid)], hlist) { @@ -1061,7 +1061,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **tca, unsigned long *arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)*arg; struct hfsc_class *parent = NULL; struct rtattr *opt = tca[TCA_OPTIONS-1]; @@ -1204,7 +1204,7 @@ static void hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); hfsc_destroy_filters(&cl->filter_list); qdisc_destroy(cl->qdisc); @@ -1218,7 +1218,7 @@ static int hfsc_delete_class(struct Qdisc *sch, unsigned long arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl->level > 0 || cl->filter_cnt > 0 || cl == &q->root) @@ -1240,7 +1240,7 @@ static struct hfsc_class * hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct tcf_result res; struct tcf_proto *tcf; @@ -1381,7 +1381,7 @@ static struct tcf_proto ** hfsc_tcf_chain(struct Qdisc *sch, unsigned long arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl == NULL) @@ -1489,7 +1489,7 @@ static void hfsc_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int i; @@ -1523,7 +1523,7 @@ static void hfsc_schedule_watchdog(struct Qdisc *sch, u64 cur_time) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; u64 next_time = 0; long delay; @@ -1545,7 +1545,7 @@ static int hfsc_init_qdisc(struct Qdisc *sch, struct rtattr *opt) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct tc_hfsc_qopt *qopt; unsigned int i; @@ -1554,7 +1554,6 @@ qopt = RTA_DATA(opt); memset(q, 0, sizeof(struct hfsc_sched)); - sch->stats_lock = &sch->dev->queue_lock; q->defcls = qopt->defcls; for (i = 0; i < HFSC_HSIZE; i++) @@ -1585,7 +1584,7 @@ static int hfsc_change_qdisc(struct Qdisc *sch, struct rtattr *opt) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct tc_hfsc_qopt *qopt; if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) @@ -1632,7 +1631,7 @@ static void hfsc_reset_qdisc(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int i; @@ -1651,7 +1650,7 @@ static void hfsc_destroy_qdisc(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl, *next; unsigned int i; @@ -1666,7 +1665,7 @@ static int hfsc_dump_qdisc(struct Qdisc *sch, struct sk_buff *skb) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_hfsc_qopt qopt; @@ -1674,7 +1673,7 @@ 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) + if (qdisc_copy_stats(skb, &sch->stats, &sch->dev->queue_lock) < 0) goto rtattr_failure; return skb->len; @@ -1730,7 +1729,7 @@ static struct sk_buff * hfsc_dequeue(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct sk_buff *skb; u64 cur_time; @@ -1799,7 +1798,7 @@ static int hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); __skb_queue_head(&q->requeue, skb); sch->q.qlen++; @@ -1809,7 +1808,7 @@ static unsigned int hfsc_drop(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int len; diff -Nru a/net/sched/sch_htb.c b/net/sched/sch_htb.c --- a/net/sched/sch_htb.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_htb.c 2004-07-27 11:03:02 -07:00 @@ -267,7 +267,7 @@ /* find class in global hash table using given handle */ static __inline__ struct htb_class *htb_find(u32 handle, struct Qdisc *sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct list_head *p; if (TC_H_MAJ(handle) != sch->handle) return NULL; @@ -300,7 +300,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; struct tcf_result res; struct tcf_proto *tcf; @@ -712,7 +712,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_classify(skb,sch,&ret); @@ -759,7 +759,7 @@ /* TODO: requeuing packet charges it to policers again !! */ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int ret = NET_XMIT_SUCCESS; struct htb_class *cl = htb_classify(skb,sch, &ret); struct sk_buff *tskb; @@ -800,7 +800,7 @@ static void htb_rate_timer(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct list_head *p; /* lock queue so that we can muck with it */ @@ -1060,7 +1060,7 @@ static void htb_delay_by(struct Qdisc *sch,long delay) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); if (delay <= 0) delay = 1; if (unlikely(delay > 5*HZ)) { if (net_ratelimit()) @@ -1077,7 +1077,7 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch) { struct sk_buff *skb = NULL; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int level; long min_delay; #ifdef HTB_DEBUG @@ -1147,7 +1147,7 @@ /* try to drop from each class (by prio) until one succeed */ static unsigned int htb_drop(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int prio; for (prio = TC_HTB_NUMPRIO - 1; prio >= 0; prio--) { @@ -1172,7 +1172,7 @@ /* always caled under BH & queue lock */ static void htb_reset(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int i; HTB_DBG(0,1,"htb_reset sch=%p, handle=%X\n",sch,sch->handle); @@ -1210,7 +1210,7 @@ static int htb_init(struct Qdisc *sch, struct rtattr *opt) { - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct rtattr *tb[TCA_HTB_INIT]; struct tc_htb_glob *gopt; int i; @@ -1265,7 +1265,7 @@ static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_htb_glob gopt; @@ -1300,7 +1300,7 @@ struct sk_buff *skb, struct tcmsg *tcm) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = (struct htb_class*)arg; unsigned char *b = skb->tail; @@ -1358,7 +1358,7 @@ sch_tree_lock(sch); if ((*old = xchg(&cl->un.leaf.q, new)) != NULL) { if (cl->prio_activity) - htb_deactivate ((struct htb_sched*)sch->data,cl); + htb_deactivate (qdisc_priv(sch),cl); /* TODO: is it correct ? Why CBQ doesn't do it ? */ sch->q.qlen -= (*old)->q.qlen; @@ -1379,7 +1379,7 @@ static unsigned long htb_get(struct Qdisc *sch, u32 classid) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = htb_find(classid,sch); HTB_DBG(0,1,"htb_get clid=%X q=%p cl=%p ref=%d\n",classid,q,cl,cl?cl->refcnt:0); @@ -1400,7 +1400,7 @@ static void htb_destroy_class(struct Qdisc* sch,struct htb_class *cl) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); HTB_DBG(0,1,"htb_destrycls clid=%X ref=%d\n", cl?cl->classid:0,cl?cl->refcnt:0); if (!cl->level) { BUG_TRAP(cl->un.leaf.q); @@ -1435,7 +1435,7 @@ /* always caled under BH & queue lock */ static void htb_destroy(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); HTB_DBG(0,1,"htb_destroy q=%p\n",q); del_timer_sync (&q->timer); @@ -1457,7 +1457,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class*)arg; HTB_DBG(0,1,"htb_delete q=%p cl=%X ref=%d\n",q,cl?cl->classid:0,cl?cl->refcnt:0); @@ -1484,7 +1484,7 @@ static void htb_put(struct Qdisc *sch, unsigned long arg) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = (struct htb_class*)arg; HTB_DBG(0,1,"htb_put q=%p cl=%X ref=%d\n",q,cl?cl->classid:0,cl?cl->refcnt:0); @@ -1497,7 +1497,7 @@ u32 parentid, struct rtattr **tca, unsigned long *arg) { int err = -EINVAL; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class*)*arg,*parent; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct qdisc_rate_table *rtab = NULL, *ctab = NULL; @@ -1623,7 +1623,7 @@ static struct tcf_proto **htb_find_tcf(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; struct tcf_proto **fl = cl ? &cl->filter_list : &q->filter_list; HTB_DBG(0,2,"htb_tcf q=%p clid=%X fref=%d fl=%p\n",q,cl?cl->classid:0,cl?cl->filter_cnt:q->filter_cnt,*fl); @@ -1633,7 +1633,7 @@ static unsigned long htb_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_find (classid,sch); HTB_DBG(0,2,"htb_bind q=%p clid=%X cl=%p fref=%d\n",q,classid,cl,cl?cl->filter_cnt:q->filter_cnt); /*if (cl && !cl->level) return 0; @@ -1654,7 +1654,7 @@ static void htb_unbind_filter(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; HTB_DBG(0,2,"htb_unbind q=%p cl=%p fref=%d\n",q,cl,cl?cl->filter_cnt:q->filter_cnt); if (cl) @@ -1665,7 +1665,7 @@ static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int i; if (arg->stop) diff -Nru a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c --- a/net/sched/sch_ingress.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_ingress.c 2004-07-27 11:03:02 -07:00 @@ -40,7 +40,7 @@ #endif -#define PRIV(sch) ((struct ingress_qdisc_data *) (sch)->data) +#define PRIV(sch) qdisc_priv(sch) /* Thanks to Doron Oz for this hack diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_netem.c 2004-07-27 11:03:02 -07:00 @@ -603,7 +603,7 @@ */ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; long delay; @@ -659,7 +659,7 @@ /* Requeue packets but don't change time stamp */ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -670,7 +670,7 @@ static unsigned int netem_drop(struct Qdisc* sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -686,7 +686,7 @@ */ static struct sk_buff *netem_dequeue(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; psched_time_t now; @@ -726,7 +726,7 @@ static void netem_reset(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); skb_queue_purge(&q->delayed); @@ -754,7 +754,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct tc_netem_qopt *qopt = RTA_DATA(opt); struct Qdisc *child; int ret; @@ -791,7 +791,7 @@ static int netem_init(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (!opt) return -EINVAL; @@ -809,7 +809,7 @@ static void netem_destroy(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); del_timer_sync(&q->timer); @@ -819,7 +819,7 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_netem_qopt qopt; @@ -841,7 +841,7 @@ static int netem_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct netem_sched_data *q = (struct netem_sched_data*)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -855,7 +855,7 @@ static int netem_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -871,7 +871,7 @@ static struct Qdisc *netem_leaf(struct Qdisc *sch, unsigned long arg) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); return q->qdisc; } diff -Nru a/net/sched/sch_prio.c b/net/sched/sch_prio.c --- a/net/sched/sch_prio.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_prio.c 2004-07-27 11:03:02 -07:00 @@ -49,7 +49,7 @@ struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); u32 band = skb->priority; struct tcf_result res; @@ -151,7 +151,7 @@ prio_dequeue(struct Qdisc* sch) { struct sk_buff *skb; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; struct Qdisc *qdisc; @@ -169,7 +169,7 @@ static unsigned int prio_drop(struct Qdisc* sch) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; unsigned int len; struct Qdisc *qdisc; @@ -189,7 +189,7 @@ prio_reset(struct Qdisc* sch) { int prio; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); for (prio=0; priobands; prio++) qdisc_reset(q->queues[prio]); @@ -200,7 +200,7 @@ prio_destroy(struct Qdisc* sch) { int prio; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); struct tcf_proto *tp; while ((tp = q->filter_list) != NULL) { @@ -216,7 +216,7 @@ static int prio_tune(struct Qdisc *sch, struct rtattr *opt) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); struct tc_prio_qopt *qopt = RTA_DATA(opt); int i; @@ -261,7 +261,7 @@ static int prio_init(struct Qdisc *sch, struct rtattr *opt) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int i; for (i=0; idata; + struct prio_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_prio_qopt opt; @@ -297,7 +297,7 @@ static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = arg - 1; if (band >= q->bands) @@ -319,7 +319,7 @@ static struct Qdisc * prio_leaf(struct Qdisc *sch, unsigned long arg) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = arg - 1; if (band >= q->bands) @@ -330,7 +330,7 @@ static unsigned long prio_get(struct Qdisc *sch, u32 classid) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = TC_H_MIN(classid); if (band - 1 >= q->bands) @@ -352,7 +352,7 @@ static int prio_change(struct Qdisc *sch, u32 handle, u32 parent, struct rtattr **tca, unsigned long *arg) { unsigned long cl = *arg; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; @@ -361,7 +361,7 @@ static int prio_delete(struct Qdisc *sch, unsigned long cl) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; return 0; @@ -371,7 +371,7 @@ static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; @@ -383,7 +383,7 @@ static void prio_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; if (arg->stop) @@ -404,7 +404,7 @@ static struct tcf_proto ** prio_find_tcf(struct Qdisc *sch, unsigned long cl) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl) return NULL; diff -Nru a/net/sched/sch_red.c b/net/sched/sch_red.c --- a/net/sched/sch_red.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_red.c 2004-07-27 11:03:02 -07:00 @@ -180,7 +180,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); psched_time_t now; @@ -303,7 +303,7 @@ static int red_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); PSCHED_SET_PASTPERFECT(q->qidlestart); @@ -316,7 +316,7 @@ red_dequeue(struct Qdisc* sch) { struct sk_buff *skb; - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); skb = __skb_dequeue(&sch->q); if (skb) { @@ -330,7 +330,7 @@ static unsigned int red_drop(struct Qdisc* sch) { struct sk_buff *skb; - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); skb = __skb_dequeue_tail(&sch->q); if (skb) { @@ -347,7 +347,7 @@ static void red_reset(struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); __skb_queue_purge(&sch->q); sch->stats.backlog = 0; @@ -358,7 +358,7 @@ static int red_change(struct Qdisc *sch, struct rtattr *opt) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_RED_STAB]; struct tc_red_qopt *ctl; @@ -407,7 +407,7 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_red_qopt opt; diff -Nru a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c --- a/net/sched/sch_sfq.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_sfq.c 2004-07-27 11:03:02 -07:00 @@ -211,7 +211,7 @@ static unsigned int sfq_drop(struct Qdisc *sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); sfq_index d = q->max_depth; struct sk_buff *skb; unsigned int len; @@ -253,7 +253,7 @@ static int sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned hash = sfq_hash(q, skb); sfq_index x; @@ -288,7 +288,7 @@ static int sfq_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned hash = sfq_hash(q, skb); sfq_index x; @@ -324,7 +324,7 @@ static struct sk_buff * sfq_dequeue(struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; sfq_index a, old_a; @@ -369,7 +369,7 @@ static void sfq_perturbation(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); q->perturbation = net_random()&0x1F; q->perturb_timer.expires = jiffies + q->perturb_period; @@ -382,7 +382,7 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); struct tc_sfq_qopt *ctl = RTA_DATA(opt); if (opt->rta_len < RTA_LENGTH(sizeof(*ctl))) @@ -408,7 +408,7 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); int i; init_timer(&q->perturb_timer); @@ -440,13 +440,13 @@ static void sfq_destroy(struct Qdisc *sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); del_timer(&q->perturb_timer); } static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_sfq_qopt opt; diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c --- a/net/sched/sch_tbf.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_tbf.c 2004-07-27 11:03:02 -07:00 @@ -137,7 +137,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); int ret; if (skb->len > q->max_size) { @@ -163,7 +163,7 @@ static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -174,7 +174,7 @@ static unsigned int tbf_drop(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -194,7 +194,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; skb = q->qdisc->dequeue(q->qdisc); @@ -261,7 +261,7 @@ static void tbf_reset(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); sch->q.qlen = 0; @@ -300,7 +300,7 @@ static int tbf_change(struct Qdisc* sch, struct rtattr *opt) { int err = -EINVAL; - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_TBF_PTAB]; struct tc_tbf_qopt *qopt; struct qdisc_rate_table *rtab = NULL; @@ -366,7 +366,7 @@ static int tbf_init(struct Qdisc* sch, struct rtattr *opt) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (opt == NULL) return -EINVAL; @@ -383,7 +383,7 @@ static void tbf_destroy(struct Qdisc *sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); del_timer(&q->wd_timer); @@ -398,7 +398,7 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_tbf_qopt opt; @@ -427,7 +427,7 @@ static int tbf_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct tbf_sched_data *q = (struct tbf_sched_data*)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -441,7 +441,7 @@ static int tbf_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -457,7 +457,7 @@ static struct Qdisc *tbf_leaf(struct Qdisc *sch, unsigned long arg) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); return q->qdisc; } diff -Nru a/net/sched/sch_teql.c b/net/sched/sch_teql.c --- a/net/sched/sch_teql.c 2004-07-27 11:03:02 -07:00 +++ b/net/sched/sch_teql.c 2004-07-27 11:03:02 -07:00 @@ -81,7 +81,7 @@ struct sk_buff_head q; }; -#define NEXT_SLAVE(q) (((struct teql_sched_data*)((q)->data))->next) +#define NEXT_SLAVE(q) (((struct teql_sched_data*)qdisc_priv(q))->next) #define FMASK (IFF_BROADCAST|IFF_POINTOPOINT|IFF_BROADCAST) @@ -91,7 +91,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct net_device *dev = sch->dev; - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_tail(&q->q, skb); if (q->q.qlen <= dev->tx_queue_len) { @@ -109,7 +109,7 @@ static int teql_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_head(&q->q, skb); return 0; @@ -118,7 +118,7 @@ static struct sk_buff * teql_dequeue(struct Qdisc* sch) { - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); struct sk_buff *skb; skb = __skb_dequeue(&dat->q); @@ -143,7 +143,7 @@ static void teql_reset(struct Qdisc* sch) { - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); skb_queue_purge(&dat->q); sch->q.qlen = 0; @@ -154,7 +154,7 @@ teql_destroy(struct Qdisc* sch) { struct Qdisc *q, *prev; - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); struct teql_master *master = dat->m; if ((prev = master->slaves) != NULL) { @@ -184,7 +184,7 @@ { struct net_device *dev = sch->dev; struct teql_master *m = (struct teql_master*)sch->ops; - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); if (dev->hard_header_len > m->dev->hard_header_len) return -EINVAL; @@ -229,7 +229,7 @@ static int __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev) { - struct teql_sched_data *q = (void*)dev->qdisc->data; + struct teql_sched_data *q = qdisc_priv(dev->qdisc); struct neighbour *mn = skb->dst->neighbour; struct neighbour *n = q->ncache; From kaber@trash.net Tue Aug 3 08:47:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:47:27 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73Fl9bN005592 for ; Tue, 3 Aug 2004 08:47:10 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id BBBC819F359; Tue, 3 Aug 2004 17:47:00 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 25F0D39413A; Tue, 3 Aug 2004 17:20:06 +0200 (CEST) Message-ID: <410FADBC.6000904@trash.net> Date: Tue, 03 Aug 2004 17:22: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 2/5]: refcount qdisc->dev Content-Type: multipart/mixed; boundary="------------040702070608010202030705" X-archive-position: 7455 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: 2185 Lines: 68 This is a multi-part message in MIME format. --------------040702070608010202030705 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds refcounting for qdisc->dev to avoid accessing freed memory from the __qdisc_destroy rcu-callback when the device is unregistered. Without refcounting netdev_wait_allrefs could free the device before __qdisc_destroy is done. --------------040702070608010202030705 Content-Type: text/x-patch; name="02-refcount-qdisc-dev.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02-refcount-qdisc-dev.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/02 23:50:01+02:00 kaber@coreworks.de # [PKT_SCHED: Refcount qdisc->dev for __qdisc_destroy rcu-callback # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/02 23:49:40+02:00 kaber@coreworks.de +3 -0 # [PKT_SCHED: Refcount qdisc->dev for __qdisc_destroy rcu-callback # # net/sched/sch_api.c # 2004/08/02 23:49:40+02:00 kaber@coreworks.de +1 -0 # [PKT_SCHED: Refcount qdisc->dev for __qdisc_destroy rcu-callback # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-03 01:10:18 +02:00 +++ b/net/sched/sch_api.c 2004-08-03 01:10:18 +02:00 @@ -430,6 +430,7 @@ sch->enqueue = ops->enqueue; sch->dequeue = ops->dequeue; sch->dev = dev; + dev_hold(dev); atomic_set(&sch->refcnt, 1); sch->stats_lock = &dev->queue_lock; if (handle == 0) { diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-03 01:10:18 +02:00 +++ b/net/sched/sch_generic.c 2004-08-03 01:10:18 +02:00 @@ -399,6 +399,7 @@ sch->enqueue = ops->enqueue; sch->dequeue = ops->dequeue; sch->dev = dev; + dev_hold(dev); sch->stats_lock = &dev->queue_lock; atomic_set(&sch->refcnt, 1); /* enqueue is accessed locklessly - make sure it's visible @@ -440,6 +441,8 @@ write_unlock(&qdisc_tree_lock); module_put(ops->owner); + if (qdisc->dev) + dev_put(qdisc->dev); if (!(qdisc->flags&TCQ_F_BUILTIN)) kfree(qdisc); } --------------040702070608010202030705-- From kaber@trash.net Tue Aug 3 08:47:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 08:47:28 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73FlAoI005593 for ; Tue, 3 Aug 2004 08:47:10 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id CF73619F35A; Tue, 3 Aug 2004 17:47:00 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 78A62394139; Tue, 3 Aug 2004 17:18:06 +0200 (CEST) Message-ID: <410FAD44.7020503@trash.net> Date: Tue, 03 Aug 2004 17:20: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 1/5]: Fix locking in __qdisc_destroy rcu-callback Content-Type: multipart/mixed; boundary="------------010405060805000700060907" X-archive-position: 7456 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: 4779 Lines: 166 This is a multi-part message in MIME format. --------------010405060805000700060907 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit The __qdisc_destroy rcu-callback doesn't do any locking when calling ops->reset and ops->destroy. qdisc_destroy is often called from both of these functions and it changes dev->qdisc_list. This patch adds proper locking to __qdisc_destroy. Unfortunately when using qdisc_tree_lock in process context we now also need to disable local bh's to avoid beeing interrupted by the rcu-callback. I'm not sure if RCU callback can be scheduled while the kernel is running in process context, so this may be unneccessary. --------------010405060805000700060907 Content-Type: text/x-patch; name="01-qdisc_destroy-rcu-locking.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-qdisc_destroy-rcu-locking.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/02 14:02:29+02:00 kaber@coreworks.de # [PKT_SCHED]: Fix locking in __qdisc_destroy rcu-callback # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/02 14:02:07+02:00 kaber@coreworks.de +12 -12 # [PKT_SCHED]: Fix locking in __qdisc_destroy rcu-callback # # net/sched/sch_api.c # 2004/08/02 14:02:07+02:00 kaber@coreworks.de +5 -5 # [PKT_SCHED]: Fix locking in __qdisc_destroy rcu-callback # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-03 01:09:43 +02:00 +++ b/net/sched/sch_api.c 2004-08-03 01:09:43 +02:00 @@ -812,18 +812,18 @@ continue; if (idx > s_idx) s_q_idx = 0; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); for (q = dev->qdisc_list, q_idx = 0; q; q = q->next, q_idx++) { if (q_idx < s_q_idx) continue; if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); goto done; } } - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); } done: @@ -1033,7 +1033,7 @@ s_t = cb->args[0]; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { if (t < s_t) continue; if (!q->ops->cl_ops) continue; @@ -1052,7 +1052,7 @@ if (arg.w.stop) break; } - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); cb->args[0] = t; diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-03 01:09:43 +02:00 +++ b/net/sched/sch_generic.c 2004-08-03 01:09:43 +02:00 @@ -45,10 +45,11 @@ The idea is the following: - enqueue, dequeue are serialized via top level device spinlock dev->queue_lock. - - tree walking is protected by read_lock(qdisc_tree_lock) + - tree walking is protected by read_lock_bh(qdisc_tree_lock) and this lock is used only in process context. - - updates to tree are made only under rtnl semaphore, - hence this lock may be made without local bh disabling. + - updates to tree are made under rtnl semaphore or + from softirq context (__qdisc_destroy rcu-callback) + hence this lock needs local bh disabling. qdisc_tree_lock must be grabbed BEFORE dev->queue_lock! */ @@ -56,14 +57,14 @@ void qdisc_lock_tree(struct net_device *dev) { - write_lock(&qdisc_tree_lock); + write_lock_bh(&qdisc_tree_lock); spin_lock_bh(&dev->queue_lock); } void qdisc_unlock_tree(struct net_device *dev) { spin_unlock_bh(&dev->queue_lock); - write_unlock(&qdisc_tree_lock); + write_unlock_bh(&qdisc_tree_lock); } /* @@ -431,10 +432,12 @@ #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&qdisc->stats); #endif + write_lock(&qdisc_tree_lock); if (ops->reset) ops->reset(qdisc); if (ops->destroy) ops->destroy(qdisc); + write_unlock(&qdisc_tree_lock); module_put(ops->owner); if (!(qdisc->flags&TCQ_F_BUILTIN)) @@ -459,12 +462,9 @@ } } } - call_rcu(&qdisc->q_rcu, __qdisc_destroy); - } - void dev_activate(struct net_device *dev) { /* No queueing discipline is attached to device; @@ -482,17 +482,17 @@ return; } - write_lock(&qdisc_tree_lock); + write_lock_bh(&qdisc_tree_lock); qdisc->next = dev->qdisc_list; dev->qdisc_list = qdisc; - write_unlock(&qdisc_tree_lock); + write_unlock_bh(&qdisc_tree_lock); } else { qdisc = &noqueue_qdisc; } - write_lock(&qdisc_tree_lock); + write_lock_bh(&qdisc_tree_lock); dev->qdisc_sleeping = qdisc; - write_unlock(&qdisc_tree_lock); + write_unlock_bh(&qdisc_tree_lock); } spin_lock_bh(&dev->queue_lock); --------------010405060805000700060907-- From romieu@fr.zoreil.com Tue Aug 3 09:52:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 09:52:14 -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 i73Gq6wV007285 for ; Tue, 3 Aug 2004 09:52:07 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i73GoSh9010837; Tue, 3 Aug 2004 18:50:28 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i73GoQ7I010835; Tue, 3 Aug 2004 18:50:26 +0200 Date: Tue, 3 Aug 2004 18:50:26 +0200 From: Francois Romieu To: Pasi Sjoholm Cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) Message-ID: <20040803185026.A10580@electric-eye.fr.zoreil.com> References: <20040803003515.A29885@electric-eye.fr.zoreil.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 ptsjohol@cc.jyu.fi on Tue, Aug 03, 2004 at 03:32:15PM +0300 X-Organisation: Land of Sunshine Inc. X-archive-position: 7457 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: 682 Lines: 17 Pasi Sjoholm : [...] > The first log file is with both patchs applied and the second one with one > little change to rx8139_rx() to show if it even goes to through > > " while (netif_running(dev) && received < budget > && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {"-section. > > This was the change which I made.. so you can see in the second log file > that there won't be any of these messages after the driver has crashed. If you remove the "if (received > 0) {" test in r8139-10.patch and keep both patches applied, I assume you are back to a crash within 15min (instead of within 2min as suggested by the log), right ? -- Ueimor From mmazur@kernel.pl Tue Aug 3 10:17:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 10:17:27 -0700 (PDT) Received: from box.punkt.pl (box.punkt.pl [217.8.180.66]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i73HHJVF008130 for ; Tue, 3 Aug 2004 10:17:20 -0700 Received: (qmail 24887 invoked by uid 0); 3 Aug 2004 17:17:04 -0000 Received: from do-box-z.zwm.punkt.pl (HELO home) (zwm?305-xf.pl@217.197.78.33) by box.punkt.pl with SMTP; 3 Aug 2004 17:17:03 -0000 From: Mariusz Mazur To: Stephen Hemminger Subject: Re: iproute2 and kernel headers Date: Tue, 3 Aug 2004 19:14:40 +0200 User-Agent: KMail/1.6.2 References: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> <20040803001459.GA8637@irc.pl> <20040803083142.5a4ccaad@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803083142.5a4ccaad@dell_ss3.pdx.osdl.net> Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit Message-Id: <200408031914.40751.mmazur@kernel.pl> X-archive-position: 7458 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mmazur@kernel.pl Precedence: bulk X-list: netdev Content-Length: 1864 Lines: 38 On wtorek 03 sierpieñ 2004 17:31, Stephen Hemminger wrote: > > > I am willing to put some headers (not all) in with the user level > > > code, provided they are copies since they I can easily update. I don't > > > want to get into keeping an edited set of headers in sync. > > > > Aren't linux-libc-headers (*) sufficient? > > > > * - http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ > > The theory of that is good, but in practice it would make the problem > worse. What iproute2 wants is to have the same kernel data structures as > the latest kernel. It is awkward enough making sure to get them from the > correct kernel sources, but doing it from a different package would make > updating and keeping everything current worse. This message was forwarded to me (I'm the llh maintainer). Llh is being updated by generating a diff between incremental kernel releases, fixing that diff and applying it to the last version of llh. I do have scripts to check wether such an update doesn't break any headers. There is a slight possibility that such an update might omit some crucial changes, but (at least when it comes to network headers) co-developers of my distribution (PLD) will most likely detect that allmost instantly and notify me what's wrong (in such a case I will release a fixed version of llh asap). Since removing all those glibc/linux-headers workarounds from iproute2/iptables was quite a pain for me I would really like to see building against llh at least as an option available from 'configure'. (In case you're wondering - yes, we've been building all the linux network userland stuff against llh for about 8 months now without any problems... quite the opposite actually) -- In the year eighty five ten God is gonna shake his mighty head He'll either say, "I'm pleased where man has been" Or tear it down, and start again From shemminger@osdl.org Tue Aug 3 10:50:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 10:50:43 -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 i73Hoan3009008 for ; Tue, 3 Aug 2004 10:50:36 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73HoH101317; Tue, 3 Aug 2004 10:50:17 -0700 Date: Tue, 3 Aug 2004 10:50:17 -0700 From: Stephen Hemminger To: Ben Greear , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (1/3) add ethtool ioctl forwarding to vlan Message-Id: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7459 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: 2269 Lines: 63 When network devices are used in bridges, the bridge does an ethtool ioctl to pick up the speed; this doesn't work with vlans. This patch makes any ethtool gets forwarded to the under lying real device. It seemed to make sense to do MII as well. Signed-off-by: Stephen Hemminger diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-07-27 15:45:02 -07:00 +++ b/net/8021q/vlan.c 2004-07-27 15:45:02 -07:00 @@ -358,6 +358,7 @@ new_dev->set_mac_address = vlan_dev_set_mac_address; new_dev->set_multicast_list = vlan_dev_set_multicast_list; new_dev->destructor = free_netdev; + new_dev->do_ioctl = vlan_dev_ioctl; } /* Attach a VLAN device to a mac address (ie Ethernet Card). diff -Nru a/net/8021q/vlan.h b/net/8021q/vlan.h --- a/net/8021q/vlan.h 2004-07-27 15:45:02 -07:00 +++ b/net/8021q/vlan.h 2004-07-27 15:45:02 -07:00 @@ -65,6 +65,7 @@ int vlan_dev_set_mac_address(struct net_device *dev, void* addr); int vlan_dev_open(struct net_device* dev); int vlan_dev_stop(struct net_device* dev); +int vlan_dev_ioctl(struct net_device* dev, struct ifreq *ifr, int cmd); 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); diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c --- a/net/8021q/vlan_dev.c 2004-07-27 15:45:02 -07:00 +++ b/net/8021q/vlan_dev.c 2004-07-27 15:45:02 -07:00 @@ -757,6 +757,30 @@ vlan_flush_mc_list(dev); return 0; } + +int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +{ + struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; + int err = -EOPNOTSUPP; + + switch(cmd) { + case SIOCGMIIPHY: + case SIOCGMIIREG: + case SIOCSMIIREG: + if (real_dev->do_ioctl && netif_device_present(real_dev)) { + strncpy(ifr->ifr_name, real_dev->name, IFNAMSIZ); + err = real_dev->do_ioctl(dev, ifr, cmd); + } + break; + + case SIOCETHTOOL: + strncpy(ifr->ifr_name, real_dev->name, IFNAMSIZ); + err = dev_ethtool(ifr); + } + + return err; +} + /** Taken from Gleb + Lennert's VLAN code, and modified... */ void vlan_dev_set_multicast_list(struct net_device *vlan_dev) { From greearb@candelatech.com Tue Aug 3 11:03:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 11:03: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 i73I2rM9009563 for ; Tue, 3 Aug 2004 11:03:14 -0700 Received: from candelatech.com (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 i73IHPSb012513; Tue, 3 Aug 2004 11:17:25 -0700 Message-ID: <410FD348.9040301@candelatech.com> Date: Tue, 03 Aug 2004 11:02:48 -0700 From: Ben Greear Organization: Candela Technologies 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: Stephen Hemminger CC: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (1/3) add ethtool ioctl forwarding to vlan References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7460 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: 527 Lines: 16 Stephen Hemminger wrote: > When network devices are used in bridges, the bridge does an ethtool > ioctl to pick up the speed; this doesn't work with vlans. > This patch makes any ethtool gets forwarded to the under lying > real device. It seemed to make sense to do MII as well. Looks good to me. I'll also send a patch against 2.6.8 (when it's out) to bring the 2.6 VLAN code up to date with the latest 2.4 stuff. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From kaber@trash.net Tue Aug 3 12:15:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 12:15:55 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73JFTDv012584 for ; Tue, 3 Aug 2004 12:15:50 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 86ABD19F355; Tue, 3 Aug 2004 21:15:20 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 6F092394134; Tue, 3 Aug 2004 21:15:19 +0200 (CEST) Message-ID: <410FE4DD.5000306@trash.net> Date: Tue, 03 Aug 2004 21:17:49 +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: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] cache align qdisc data References: <410FAE42.2050909@trash.net> <20040803083820.711c917c@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803083820.711c917c@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7461 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: 850 Lines: 32 Stephen Hemminger wrote: >This patch has qdisc code use the same interface as the netdevice code >to cache align the object private data. > > These two hunks look bogus. >diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c >--- a/net/sched/sch_hfsc.c 2004-07-27 11:03:02 -07:00 >+++ b/net/sched/sch_hfsc.c 2004-07-27 11:03:02 -07:00 >@@ -1554,7 +1554,6 @@ > qopt = RTA_DATA(opt); > > memset(q, 0, sizeof(struct hfsc_sched)); >- sch->stats_lock = &sch->dev->queue_lock; > > q->defcls = qopt->defcls; > for (i = 0; i < HFSC_HSIZE; i++) > >@@ -1674,7 +1673,7 @@ > 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) >+ if (qdisc_copy_stats(skb, &sch->stats, &sch->dev->queue_lock) < 0) > goto rtattr_failure; > > return skb->len; > > From kaber@trash.net Tue Aug 3 12:20:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 12:20:31 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73JKP3o016102 for ; Tue, 3 Aug 2004 12:20:25 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 5F7EE19F355; Tue, 3 Aug 2004 21:20:16 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id ACFC9394133; Tue, 3 Aug 2004 21:20:15 +0200 (CEST) Message-ID: <410FE605.8070606@trash.net> Date: Tue, 03 Aug 2004 21:22:45 +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: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list References: <410FAE42.2050909@trash.net> <20040803083540.13675d64@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803083540.13675d64@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7462 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: 4919 Lines: 193 Stephen Hemminger wrote: >Since qdisc lists are using rcu for deletion, you should use the >_rcu flavors of list stuff. > > RCU is used for dev->qdisc, but not for dev->qdisc_list. >replace BUG_TRAP(dev->qdisc_list == NULL); >with BUG_TRAP(list_empty(&dev->qdisc_list)); > >I tried a similar patch but was finding the bug_trap() was showing up on >deletion so did not trust it. > > The BUG_TRAP is no longer valid with RCU. The qdiscs aren't destroyed immediately, so they are still in the list. Regards Patrick >This is what I was experimenting with. > >------------ >diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h >--- a/include/linux/netdevice.h 2004-07-28 15:14:27 -07:00 >+++ b/include/linux/netdevice.h 2004-07-28 15:14:27 -07:00 >@@ -362,7 +362,7 @@ > > struct Qdisc *qdisc; > struct Qdisc *qdisc_sleeping; >- struct Qdisc *qdisc_list; >+ struct list_head qdisc_list; > struct Qdisc *qdisc_ingress; > unsigned long tx_queue_len; /* Max frames per queue allowed */ > >diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h >--- a/include/net/pkt_sched.h 2004-07-28 15:14:27 -07:00 >+++ b/include/net/pkt_sched.h 2004-07-28 15:14:27 -07:00 >@@ -79,7 +79,7 @@ > #define TCQ_F_INGRES 4 > int padded; > struct Qdisc_ops *ops; >- struct Qdisc *next; >+ struct list_head list; > u32 handle; > atomic_t refcnt; > struct sk_buff_head q; >diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c >--- a/net/sched/sch_api.c 2004-07-28 15:14:27 -07:00 >+++ b/net/sched/sch_api.c 2004-07-28 15:14:27 -07:00 >@@ -195,7 +195,7 @@ > { > struct Qdisc *q; > >- for (q = dev->qdisc_list; q; q = q->next) { >+ list_for_each_entry_rcu(q, &dev->qdisc_list, list) { > if (q->handle == handle) > return q; > } >@@ -453,8 +453,7 @@ > smp_wmb(); > if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { > qdisc_lock_tree(dev); >- sch->next = dev->qdisc_list; >- dev->qdisc_list = sch; >+ list_add_rcu(&sch->list, &dev->qdisc_list); > qdisc_unlock_tree(dev); > > #ifdef CONFIG_NET_ESTIMATOR >@@ -812,18 +811,20 @@ > continue; > if (idx > s_idx) > s_q_idx = 0; >- read_lock(&qdisc_tree_lock); >- for (q = dev->qdisc_list, q_idx = 0; q; >- q = q->next, q_idx++) { >- if (q_idx < s_q_idx) >+ >+ rcu_read_lock(); >+ >+ q_idx = 0; >+ list_for_each_entry_rcu(q, &dev->qdisc_list, list) { >+ if (q_idx++ < s_q_idx) > continue; > if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, > cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { >- read_unlock(&qdisc_tree_lock); >+ rcu_read_unlock(); > goto done; > } > } >- read_unlock(&qdisc_tree_lock); >+ rcu_read_unlock(); > } > > done: >@@ -1033,9 +1034,10 @@ > > s_t = cb->args[0]; > >- read_lock(&qdisc_tree_lock); >- for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { >- if (t < s_t) continue; >+ rcu_read_lock(); >+ t = 0; >+ list_for_each_entry_rcu(q, &dev->qdisc_list, list) { >+ if (t++ < s_t) continue; > if (!q->ops->cl_ops) continue; > if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle) > continue; >@@ -1052,7 +1054,7 @@ > if (arg.w.stop) > break; > } >- read_unlock(&qdisc_tree_lock); >+ rcu_read_unlock(); > > cb->args[0] = t; > >diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c >--- a/net/sched/sch_generic.c 2004-07-28 15:14:27 -07:00 >+++ b/net/sched/sch_generic.c 2004-07-28 15:14:27 -07:00 >@@ -405,6 +405,8 @@ > sch->dev = dev; > sch->stats_lock = &dev->queue_lock; > atomic_set(&sch->refcnt, 1); >+ INIT_LIST_HEAD(&sch->list); >+ > /* enqueue is accessed locklessly - make sure it's visible > * before we set a netdevice's qdisc pointer to sch */ > smp_wmb(); >@@ -450,23 +452,12 @@ > > void qdisc_destroy(struct Qdisc *qdisc) > { >- struct net_device *dev = qdisc->dev; >- > if (!atomic_dec_and_test(&qdisc->refcnt)) > return; > >- if (dev) { >- struct Qdisc *q, **qp; >- for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) { >- if (q == qdisc) { >- *qp = q->next; >- break; >- } >- } >- } >- >+ if (qdisc->dev) >+ list_del_rcu(&qdisc->list); > call_rcu(&qdisc->q_rcu, __qdisc_destroy); >- > } > > >@@ -488,8 +479,7 @@ > } > > write_lock(&qdisc_tree_lock); >- qdisc->next = dev->qdisc_list; >- dev->qdisc_list = qdisc; >+ list_add_rcu(&qdisc->list, &dev->qdisc_list); > write_unlock(&qdisc_tree_lock); > > } else { >@@ -533,7 +523,7 @@ > qdisc_lock_tree(dev); > dev->qdisc = &noop_qdisc; > dev->qdisc_sleeping = &noop_qdisc; >- dev->qdisc_list = NULL; >+ INIT_LIST_HEAD(&dev->qdisc_list); > qdisc_unlock_tree(dev); > > dev_watchdog_init(dev); >@@ -554,9 +544,9 @@ > qdisc_destroy(qdisc); > } > #endif >- BUG_TRAP(dev->qdisc_list == NULL); >+ BUG_TRAP(!list_empty(&dev->qdisc_list)); > BUG_TRAP(!timer_pending(&dev->watchdog_timer)); >- dev->qdisc_list = NULL; >+ > qdisc_unlock_tree(dev); > } > > > > From mcr@sandelman.ottawa.on.ca Tue Aug 3 12:35:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 12:36:10 -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 i73JZw8i016675 for ; Tue, 3 Aug 2004 12:35:58 -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 i73JZe825542 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified FAIL); Tue, 3 Aug 2004 15:35:41 -0400 (EDT) Received: from sandelman.ottawa.on.ca (desk.marajade.sandelman.ca [205.150.200.247]) by lox.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i73JePs01612 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified FAIL); Tue, 3 Aug 2004 15:40:31 -0400 (EDT) Received: from sandelman.ottawa.on.ca (marajade [127.0.0.1]) by sandelman.ottawa.on.ca (8.12.3/8.12.3/Debian-6.6) with ESMTP id i73JX74F022098 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 3 Aug 2004 15:33:08 -0400 Received: from marajade.sandelman.ottawa.on.ca (mcr@localhost) by sandelman.ottawa.on.ca (8.12.3/8.12.3/Debian-6.6) with ESMTP id i73JWxZF022094; Tue, 3 Aug 2004 15:33:02 -0400 To: Herbert Xu cc: netdev , dev@lists.openswan.org Subject: CONFIG_XFRM vs udp.c X-Mailer: MH-E 7.4.2; nmh 1.0.4+dev; XEmacs 21.4 (patch 6) Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Tue, 03 Aug 2004 15:32:59 -0400 Message-ID: <22093.1091561579@marajade.sandelman.ottawa.on.ca> From: Michael Richardson X-archive-position: 7463 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: 1242 Lines: 33 -----BEGIN PGP SIGNED MESSAGE----- I was examining udp.c to understand how NAT-T (UDP encap of ESP packets) is handled. udp_encap_rcv() clearly bails if CONFIG_XFRM is not defined. but, udp_queue_rcv_skb() seems to call xfrm4_rcv_encap() regardless. It is it intentional that this part of XFRM can not be a module? It seems that one should call xfrm4_rcv_encap() directly only if one is all statically linked, and indirect through some function pointer otherwise. Or am I missing some magic that defines xfrom4_rcv_encap() all the time, and replaces it when XFRM is loaded? - -- ] "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 iQCVAwUBQQ/oaYqHRg3pndX9AQHtrAQAmO8u1SMq24mtYcq1bT1gFvYXEjZozHmf k6MJFLz/U9OzETMdBwa6V+geIjOhAN/7BUIilONcT0Q9ESzr8SeW1cRpIv2/jQb3 maGAiVE8dqM2wdUKPX5x3nY7t5FHIxz3zUVD6Eyk8McpfzA7z42fYTqyJn4pKiNQ gjcjs/uLdRo= =SWZ1 -----END PGP SIGNATURE----- From shemminger@osdl.org Tue Aug 3 13:11:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:11:36 -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 i73KBQSZ017778 for ; Tue, 3 Aug 2004 13:11:29 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73KBB125550; Tue, 3 Aug 2004 13:11:11 -0700 Date: Tue, 3 Aug 2004 13:11:11 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] netem limit not returned correctly Message-Id: <20040803131111.6ce2c36c@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7464 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: 612 Lines: 20 Minor leftover from earlier code. Netem scheduler is not reporting correct limit (ie for 'tc qdisc ls') because it is returning devices limit not it's own. Should apply to 2.4 as well (with fuzz) Signed-off-by: Stephen Hemminger diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-03 13:10:17 -07:00 +++ b/net/sched/sch_netem.c 2004-08-03 13:10:17 -07:00 @@ -825,7 +825,7 @@ qopt.latency = q->latency; qopt.jitter = q->jitter; - qopt.limit = sch->dev->tx_queue_len; + qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; From shemminger@osdl.org Tue Aug 3 13:14:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:14: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 i73KEian018480 for ; Tue, 3 Aug 2004 13:14:46 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73KEP126052; Tue, 3 Aug 2004 13:14:25 -0700 Date: Tue, 3 Aug 2004 13:14:25 -0700 From: Stephen Hemminger To: Ben Greear , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] vlan - device refcount bug. Message-Id: <20040803131425.503f8f45@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7465 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: 619 Lines: 17 If you rmmod a network device that is in a vlan, the system hangs waiting for the refcount to go to zero, because it is -1. The problem is that the vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier. Signed-off-by: Stephen Hemminger diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-08-03 13:13:33 -07:00 +++ b/net/8021q/vlan.c 2004-08-03 13:13:33 -07:00 @@ -645,7 +645,6 @@ ret = unregister_vlan_dev(dev, VLAN_DEV_INFO(vlandev)->vlan_id); - dev_put(vlandev); unregister_netdevice(vlandev); /* Group was destroyed? */ From ptsjohol@cc.jyu.fi Tue Aug 3 13:19:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:20:05 -0700 (PDT) Received: from posti5.jyu.fi (posti5.jyu.fi [130.234.4.34]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73KJvT1018895 for ; Tue, 3 Aug 2004 13:19:58 -0700 Received: from silmu.st.jyu.fi (IDENT:zzeTGsDHselP2xnHa6XVvCA77CN0dcuo@silmu.st.jyu.fi [130.234.4.64]) by posti5.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i73KJYcn022592; Tue, 3 Aug 2004 23:19:34 +0300 Date: Tue, 3 Aug 2004 23:19:33 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , , , , Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) In-Reply-To: <20040803185026.A10580@electric-eye.fr.zoreil.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti5.jyu.fi; Tue, 03 Aug 2004 23:19:36 +0300 X-archive-position: 7466 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev Content-Length: 1252 Lines: 35 On Tue, 3 Aug 2004, Francois Romieu wrote: > > The first log file is with both patchs applied and the second one with one > > little change to rx8139_rx() to show if it even goes to through > > > > " while (netif_running(dev) && received < budget > > && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {"-section. > > > > This was the change which I made.. so you can see in the second log file > > that there won't be any of these messages after the driver has crashed. > If you remove the "if (received > 0) {" test in r8139-10.patch and keep > both patches applied, I assume you are back to a crash within 15min (instead > of within 2min as suggested by the log), right ? Hmm, I removed "if (received > 0) {" and tested it something like 3 hours and wasn't able to crash the driver. I will test it for couple more hours tomorrow and if I'm not still able the crash it, we may have find some sort of a solution. I'm not sure yet if it's a good one because of that earlier crash I had. I guess I will also test if - read the interruption status word that the driver will ack before the actual processing is done; has something to do it. We'll see.. I'll get back to you tomorrow with more information. -- Pasi Sjöholm From shemminger@osdl.org Tue Aug 3 13:32:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:32:17 -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 i73KW3EI019429 for ; Tue, 3 Aug 2004 13:32:05 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73KVd128792; Tue, 3 Aug 2004 13:31:39 -0700 Date: Tue, 3 Aug 2004 13:31:39 -0700 From: Stephen Hemminger To: Patrick McHardy , "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] cache align qdisc data Message-Id: <20040803133139.43107fd3@dell_ss3.pdx.osdl.net> In-Reply-To: <410FE4DD.5000306@trash.net> References: <410FAE42.2050909@trash.net> <20040803083820.711c917c@dell_ss3.pdx.osdl.net> <410FE4DD.5000306@trash.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7467 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: 53558 Lines: 1550 On Tue, 03 Aug 2004 21:17:49 +0200 Patrick McHardy wrote: > Stephen Hemminger wrote: > > >This patch has qdisc code use the same interface as the netdevice code > >to cache align the object private data. That was some old messing around, that got in there... Here is the correct patch. diff -urNp -X dontdiff linux-2.6/include/net/pkt_sched.h qdisc-2.6/include/net/pkt_sched.h --- linux-2.6/include/net/pkt_sched.h 2004-07-30 12:17:02.000000000 -0700 +++ qdisc-2.6/include/net/pkt_sched.h 2004-08-03 12:50:52.324952264 -0700 @@ -77,6 +77,7 @@ struct Qdisc #define TCQ_F_BUILTIN 1 #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 + int padded; struct Qdisc_ops *ops; struct Qdisc *next; u32 handle; @@ -93,10 +94,17 @@ struct Qdisc * and it will live until better solution will be invented. */ struct Qdisc *__parent; - - char data[0]; }; +#define QDISC_ALIGN 32 +#define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) + +static inline void *qdisc_priv(struct Qdisc *q) +{ + return (char *)q + ((sizeof(struct Qdisc) + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); +} + struct qdisc_rate_table { struct tc_ratespec rate; diff -urNp -X dontdiff linux-2.6/net/sched/sch_cbq.c qdisc-2.6/net/sched/sch_cbq.c --- linux-2.6/net/sched/sch_cbq.c 2004-07-07 10:14:26.000000000 -0700 +++ qdisc-2.6/net/sched/sch_cbq.c 2004-07-27 09:17:28.000000000 -0700 @@ -241,7 +241,7 @@ cbq_reclassify(struct sk_buff *skb, stru static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *head = &q->link; struct cbq_class **defmap; struct cbq_class *cl = NULL; @@ -344,7 +344,7 @@ fallback: static __inline__ void cbq_activate_class(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); int prio = cl->cpriority; struct cbq_class *cl_tail; @@ -368,7 +368,7 @@ static __inline__ void cbq_activate_clas static void cbq_deactivate_class(struct cbq_class *this) { - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); int prio = this->cpriority; struct cbq_class *cl; struct cbq_class *cl_prev = q->active[prio]; @@ -419,7 +419,7 @@ cbq_mark_toplevel(struct cbq_sched_data static int cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); int len = skb->len; int ret = NET_XMIT_SUCCESS; struct cbq_class *cl = cbq_classify(skb, sch,&ret); @@ -466,7 +466,7 @@ cbq_enqueue(struct sk_buff *skb, struct static int cbq_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int ret; @@ -500,7 +500,7 @@ cbq_requeue(struct sk_buff *skb, struct static void cbq_ovl_classic(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { @@ -554,7 +554,7 @@ static void cbq_ovl_classic(struct cbq_c static void cbq_ovl_rclassic(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *this = cl; do { @@ -573,7 +573,7 @@ static void cbq_ovl_rclassic(struct cbq_ static void cbq_ovl_delay(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { @@ -609,7 +609,7 @@ static void cbq_ovl_delay(struct cbq_cla static void cbq_ovl_lowprio(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); cl->penalized = jiffies + cl->penalty; @@ -678,7 +678,7 @@ static unsigned long cbq_undelay_prio(st static void cbq_undelay(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); long delay = 0; unsigned pmask; @@ -715,7 +715,7 @@ static int cbq_reshape_fail(struct sk_bu { int len = skb->len; struct Qdisc *sch = child->__parent; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = q->rx_class; q->rx_class = NULL; @@ -863,7 +863,7 @@ cbq_update(struct cbq_sched_data *q) static __inline__ struct cbq_class * cbq_under_limit(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *this_cl = cl; if (cl->tparent == NULL) @@ -903,7 +903,7 @@ cbq_under_limit(struct cbq_class *cl) static __inline__ struct sk_buff * cbq_dequeue_prio(struct Qdisc *sch, int prio) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl_tail, *cl_prev, *cl; struct sk_buff *skb; int deficit; @@ -1006,7 +1006,7 @@ next_class: static __inline__ struct sk_buff * cbq_dequeue_1(struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; unsigned activemask; @@ -1025,7 +1025,7 @@ static struct sk_buff * cbq_dequeue(struct Qdisc *sch) { struct sk_buff *skb; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); psched_time_t now; psched_tdiff_t incr; @@ -1150,7 +1150,7 @@ static void cbq_normalize_quanta(struct static void cbq_sync_defmap(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *split = cl->split; unsigned h; int i; @@ -1216,7 +1216,7 @@ static void cbq_change_defmap(struct cbq static void cbq_unlink_class(struct cbq_class *this) { struct cbq_class *cl, **clp; - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); for (clp = &q->classes[cbq_hash(this->classid)]; (cl = *clp) != NULL; clp = &cl->next) { if (cl == this) { @@ -1249,7 +1249,7 @@ static void cbq_unlink_class(struct cbq_ static void cbq_link_class(struct cbq_class *this) { - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); unsigned h = cbq_hash(this->classid); struct cbq_class *parent = this->tparent; @@ -1270,7 +1270,7 @@ static void cbq_link_class(struct cbq_cl static unsigned int cbq_drop(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl, *cl_head; int prio; unsigned int len; @@ -1293,7 +1293,7 @@ static unsigned int cbq_drop(struct Qdis static void cbq_reset(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int prio; unsigned h; @@ -1363,7 +1363,7 @@ static void cbq_addprio(struct cbq_sched static int cbq_set_wrr(struct cbq_class *cl, struct tc_cbq_wrropt *wrr) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); if (wrr->allot) cl->allot = wrr->allot; @@ -1432,7 +1432,7 @@ static int cbq_set_fopt(struct cbq_class static int cbq_init(struct Qdisc *sch, struct rtattr *opt) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_CBQ_MAX]; struct tc_ratespec *r; @@ -1623,7 +1623,7 @@ rtattr_failure: static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; @@ -1650,7 +1650,7 @@ static int cbq_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; unsigned char *b = skb->tail; struct rtattr *rta; @@ -1726,7 +1726,7 @@ cbq_leaf(struct Qdisc *sch, unsigned lon static unsigned long cbq_get(struct Qdisc *sch, u32 classid) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = cbq_class_lookup(q, classid); if (cl) { @@ -1760,7 +1760,7 @@ static void cbq_destroy_class(struct cbq static void cbq_destroy(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; unsigned h; @@ -1791,7 +1791,7 @@ static void cbq_put(struct Qdisc *sch, u if (--cl->refcnt == 0) { #ifdef CONFIG_NET_CLS_POLICE - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); spin_lock_bh(&sch->dev->queue_lock); if (q->rx_class == cl) @@ -1808,7 +1808,7 @@ cbq_change_class(struct Qdisc *sch, u32 unsigned long *arg) { int err; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)*arg; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct rtattr *tb[TCA_CBQ_MAX]; @@ -2004,7 +2004,7 @@ failure: static int cbq_delete(struct Qdisc *sch, unsigned long arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; if (cl->filters || cl->children || cl == &q->link) @@ -2042,7 +2042,7 @@ static int cbq_delete(struct Qdisc *sch, static struct tcf_proto **cbq_find_tcf(struct Qdisc *sch, unsigned long arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class *)arg; if (cl == NULL) @@ -2054,7 +2054,7 @@ static struct tcf_proto **cbq_find_tcf(s static unsigned long cbq_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *p = (struct cbq_class*)parent; struct cbq_class *cl = cbq_class_lookup(q, classid); @@ -2076,7 +2076,7 @@ static void cbq_unbind_filter(struct Qdi static void cbq_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); unsigned h; if (arg->stop) diff -urNp -X dontdiff linux-2.6/net/sched/sch_dsmark.c qdisc-2.6/net/sched/sch_dsmark.c --- linux-2.6/net/sched/sch_dsmark.c 2004-04-19 10:03:23.000000000 -0700 +++ qdisc-2.6/net/sched/sch_dsmark.c 2004-07-27 09:17:28.000000000 -0700 @@ -30,7 +30,7 @@ #endif -#define PRIV(sch) ((struct dsmark_qdisc_data *) (sch)->data) +#define PRIV(sch) qdisc_priv(sch) /* diff -urNp -X dontdiff linux-2.6/net/sched/sch_fifo.c qdisc-2.6/net/sched/sch_fifo.c --- linux-2.6/net/sched/sch_fifo.c 2004-02-19 10:28:27.000000000 -0800 +++ qdisc-2.6/net/sched/sch_fifo.c 2004-07-27 09:17:28.000000000 -0700 @@ -45,7 +45,7 @@ struct fifo_sched_data static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct fifo_sched_data *q = (struct fifo_sched_data *)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (sch->stats.backlog + skb->len <= q->limit) { __skb_queue_tail(&sch->q, skb); @@ -106,7 +106,7 @@ fifo_reset(struct Qdisc* sch) static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct fifo_sched_data *q = (struct fifo_sched_data *)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (sch->q.qlen < q->limit) { __skb_queue_tail(&sch->q, skb); @@ -138,7 +138,7 @@ pfifo_dequeue(struct Qdisc* sch) static int fifo_init(struct Qdisc *sch, struct rtattr *opt) { - struct fifo_sched_data *q = (void*)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (opt == NULL) { unsigned int limit = sch->dev->tx_queue_len ? : 1; @@ -158,7 +158,7 @@ static int fifo_init(struct Qdisc *sch, static int fifo_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct fifo_sched_data *q = (void*)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_fifo_qopt opt; diff -urNp -X dontdiff linux-2.6/net/sched/sch_generic.c qdisc-2.6/net/sched/sch_generic.c --- linux-2.6/net/sched/sch_generic.c 2004-07-30 12:17:03.000000000 -0700 +++ qdisc-2.6/net/sched/sch_generic.c 2004-08-03 12:50:53.071838720 -0700 @@ -283,10 +283,9 @@ static const u8 prio2band[TC_PRIO_MAX+1] static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) { - struct sk_buff_head *list; + struct sk_buff_head *list = qdisc_priv(qdisc); - list = ((struct sk_buff_head*)qdisc->data) + - prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[skb->priority&TC_PRIO_MAX]; if (list->qlen < qdisc->dev->tx_queue_len) { __skb_queue_tail(list, skb); @@ -304,7 +303,7 @@ static struct sk_buff * pfifo_fast_dequeue(struct Qdisc* qdisc) { int prio; - struct sk_buff_head *list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); struct sk_buff *skb; for (prio = 0; prio < 3; prio++, list++) { @@ -320,10 +319,9 @@ pfifo_fast_dequeue(struct Qdisc* qdisc) static int pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc) { - struct sk_buff_head *list; + struct sk_buff_head *list = qdisc_priv(qdisc); - list = ((struct sk_buff_head*)qdisc->data) + - prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[skb->priority&TC_PRIO_MAX]; __skb_queue_head(list, skb); qdisc->q.qlen++; @@ -334,7 +332,7 @@ static void pfifo_fast_reset(struct Qdisc* qdisc) { int prio; - struct sk_buff_head *list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); for (prio=0; prio < 3; prio++) skb_queue_purge(list+prio); @@ -359,9 +357,7 @@ rtattr_failure: static int pfifo_fast_init(struct Qdisc *qdisc, struct rtattr *opt) { int i; - struct sk_buff_head *list; - - list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); for (i=0; i<3; i++) skb_queue_head_init(list+i); @@ -385,13 +381,22 @@ static struct Qdisc_ops pfifo_fast_ops = struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) { + void *p; struct Qdisc *sch; - int size = sizeof(*sch) + ops->priv_size; + int size; + + /* ensure that the Qdisc and the private data are 32-byte aligned */ + size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); + size += ops->priv_size + QDISC_ALIGN_CONST; - sch = kmalloc(size, GFP_KERNEL); - if (!sch) + p = kmalloc(size, GFP_KERNEL); + if (!p) return NULL; - memset(sch, 0, size); + memset(p, 0, size); + + sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); + sch->padded = (char *)sch - (char *)p; skb_queue_head_init(&sch->q); sch->ops = ops; @@ -406,7 +411,7 @@ struct Qdisc * qdisc_create_dflt(struct if (!ops->init || ops->init(sch, NULL) == 0) return sch; - kfree(sch); + kfree(p); return NULL; } @@ -438,7 +443,7 @@ static void __qdisc_destroy(struct rcu_h module_put(ops->owner); if (!(qdisc->flags&TCQ_F_BUILTIN)) - kfree(qdisc); + kfree((char *) qdisc - qdisc->padded); } /* Under dev->queue_lock and BH! */ diff -urNp -X dontdiff linux-2.6/net/sched/sch_gred.c qdisc-2.6/net/sched/sch_gred.c --- linux-2.6/net/sched/sch_gred.c 2004-06-30 13:42:31.000000000 -0700 +++ qdisc-2.6/net/sched/sch_gred.c 2004-07-27 09:17:28.000000000 -0700 @@ -106,7 +106,7 @@ gred_enqueue(struct sk_buff *skb, struct { psched_time_t now; struct gred_sched_data *q=NULL; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); unsigned long qave=0; int i=0; @@ -215,7 +215,7 @@ static int gred_requeue(struct sk_buff *skb, struct Qdisc* sch) { struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); q= t->tab[(skb->tc_index&0xf)]; /* error checking here -- probably unnecessary */ PSCHED_SET_PASTPERFECT(q->qidlestart); @@ -231,7 +231,7 @@ gred_dequeue(struct Qdisc* sch) { struct sk_buff *skb; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); skb = __skb_dequeue(&sch->q); if (skb) { @@ -264,7 +264,7 @@ static unsigned int gred_drop(struct Qdi struct sk_buff *skb; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); skb = __skb_dequeue_tail(&sch->q); if (skb) { @@ -300,7 +300,7 @@ static void gred_reset(struct Qdisc* sch { int i; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); __skb_queue_purge(&sch->q); @@ -323,7 +323,7 @@ static void gred_reset(struct Qdisc* sch static int gred_change(struct Qdisc *sch, struct rtattr *opt) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct gred_sched_data *q; struct tc_gred_qopt *ctl; struct tc_gred_sopt *sopt; @@ -469,7 +469,7 @@ static int gred_change(struct Qdisc *sch static int gred_init(struct Qdisc *sch, struct rtattr *opt) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct tc_gred_sopt *sopt; struct rtattr *tb[TCA_GRED_STAB]; struct rtattr *tb2[TCA_GRED_DPS]; @@ -502,7 +502,7 @@ static int gred_dump(struct Qdisc *sch, struct rtattr *rta; struct tc_gred_qopt *opt = NULL ; struct tc_gred_qopt *dst; - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct gred_sched_data *q; int i; unsigned char *b = skb->tail; @@ -593,7 +593,7 @@ rtattr_failure: static void gred_destroy(struct Qdisc *sch) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); int i; for (i = 0;i < table->DPs; i++) { diff -urNp -X dontdiff linux-2.6/net/sched/sch_hfsc.c qdisc-2.6/net/sched/sch_hfsc.c --- linux-2.6/net/sched/sch_hfsc.c 2004-07-26 09:20:38.000000000 -0700 +++ qdisc-2.6/net/sched/sch_hfsc.c 2004-07-27 09:17:28.000000000 -0700 @@ -1016,7 +1016,7 @@ hfsc_hash(u32 h) static inline struct hfsc_class * hfsc_find_class(u32 classid, struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; list_for_each_entry(cl, &q->clhash[hfsc_hash(classid)], hlist) { @@ -1061,7 +1061,7 @@ static int hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **tca, unsigned long *arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)*arg; struct hfsc_class *parent = NULL; struct rtattr *opt = tca[TCA_OPTIONS-1]; @@ -1204,7 +1204,7 @@ hfsc_destroy_filters(struct tcf_proto ** static void hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); hfsc_destroy_filters(&cl->filter_list); qdisc_destroy(cl->qdisc); @@ -1218,7 +1218,7 @@ hfsc_destroy_class(struct Qdisc *sch, st static int hfsc_delete_class(struct Qdisc *sch, unsigned long arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl->level > 0 || cl->filter_cnt > 0 || cl == &q->root) @@ -1240,7 +1240,7 @@ hfsc_delete_class(struct Qdisc *sch, uns static struct hfsc_class * hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct tcf_result res; struct tcf_proto *tcf; @@ -1381,7 +1381,7 @@ hfsc_unbind_tcf(struct Qdisc *sch, unsig static struct tcf_proto ** hfsc_tcf_chain(struct Qdisc *sch, unsigned long arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl == NULL) @@ -1489,7 +1489,7 @@ hfsc_dump_class(struct Qdisc *sch, unsig static void hfsc_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int i; @@ -1523,7 +1523,7 @@ hfsc_watchdog(unsigned long arg) static void hfsc_schedule_watchdog(struct Qdisc *sch, u64 cur_time) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; u64 next_time = 0; long delay; @@ -1545,7 +1545,7 @@ hfsc_schedule_watchdog(struct Qdisc *sch static int hfsc_init_qdisc(struct Qdisc *sch, struct rtattr *opt) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct tc_hfsc_qopt *qopt; unsigned int i; @@ -1554,7 +1554,6 @@ hfsc_init_qdisc(struct Qdisc *sch, struc qopt = RTA_DATA(opt); memset(q, 0, sizeof(struct hfsc_sched)); - sch->stats_lock = &sch->dev->queue_lock; q->defcls = qopt->defcls; for (i = 0; i < HFSC_HSIZE; i++) @@ -1585,7 +1584,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struc static int hfsc_change_qdisc(struct Qdisc *sch, struct rtattr *opt) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct tc_hfsc_qopt *qopt; if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) @@ -1632,7 +1631,7 @@ hfsc_reset_class(struct hfsc_class *cl) static void hfsc_reset_qdisc(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int i; @@ -1651,7 +1650,7 @@ hfsc_reset_qdisc(struct Qdisc *sch) static void hfsc_destroy_qdisc(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl, *next; unsigned int i; @@ -1666,7 +1665,7 @@ hfsc_destroy_qdisc(struct Qdisc *sch) static int hfsc_dump_qdisc(struct Qdisc *sch, struct sk_buff *skb) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_hfsc_qopt qopt; @@ -1674,7 +1673,7 @@ hfsc_dump_qdisc(struct Qdisc *sch, struc 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) + if (qdisc_copy_stats(skb, &sch->stats, &sch->dev->queue_lock) < 0) goto rtattr_failure; return skb->len; @@ -1730,7 +1729,7 @@ hfsc_enqueue(struct sk_buff *skb, struct static struct sk_buff * hfsc_dequeue(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct sk_buff *skb; u64 cur_time; @@ -1799,7 +1798,7 @@ hfsc_dequeue(struct Qdisc *sch) static int hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); __skb_queue_head(&q->requeue, skb); sch->q.qlen++; @@ -1809,7 +1808,7 @@ hfsc_requeue(struct sk_buff *skb, struct static unsigned int hfsc_drop(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int len; diff -urNp -X dontdiff linux-2.6/net/sched/sch_htb.c qdisc-2.6/net/sched/sch_htb.c --- linux-2.6/net/sched/sch_htb.c 2004-07-26 09:20:38.000000000 -0700 +++ qdisc-2.6/net/sched/sch_htb.c 2004-07-27 09:17:28.000000000 -0700 @@ -267,7 +267,7 @@ static __inline__ int htb_hash(u32 h) /* find class in global hash table using given handle */ static __inline__ struct htb_class *htb_find(u32 handle, struct Qdisc *sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct list_head *p; if (TC_H_MAJ(handle) != sch->handle) return NULL; @@ -300,7 +300,7 @@ static inline u32 htb_classid(struct htb static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; struct tcf_result res; struct tcf_proto *tcf; @@ -712,7 +712,7 @@ htb_deactivate(struct htb_sched *q,struc static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_classify(skb,sch,&ret); @@ -759,7 +759,7 @@ static int htb_enqueue(struct sk_buff *s /* TODO: requeuing packet charges it to policers again !! */ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int ret = NET_XMIT_SUCCESS; struct htb_class *cl = htb_classify(skb,sch, &ret); struct sk_buff *tskb; @@ -800,7 +800,7 @@ static void htb_timer(unsigned long arg) static void htb_rate_timer(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct list_head *p; /* lock queue so that we can muck with it */ @@ -1060,7 +1060,7 @@ next: static void htb_delay_by(struct Qdisc *sch,long delay) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); if (delay <= 0) delay = 1; if (unlikely(delay > 5*HZ)) { if (net_ratelimit()) @@ -1077,7 +1077,7 @@ static void htb_delay_by(struct Qdisc *s static struct sk_buff *htb_dequeue(struct Qdisc *sch) { struct sk_buff *skb = NULL; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int level; long min_delay; #ifdef HTB_DEBUG @@ -1147,7 +1147,7 @@ fin: /* try to drop from each class (by prio) until one succeed */ static unsigned int htb_drop(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int prio; for (prio = TC_HTB_NUMPRIO - 1; prio >= 0; prio--) { @@ -1172,7 +1172,7 @@ static unsigned int htb_drop(struct Qdis /* always caled under BH & queue lock */ static void htb_reset(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int i; HTB_DBG(0,1,"htb_reset sch=%p, handle=%X\n",sch,sch->handle); @@ -1210,7 +1210,7 @@ static void htb_reset(struct Qdisc* sch) static int htb_init(struct Qdisc *sch, struct rtattr *opt) { - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct rtattr *tb[TCA_HTB_INIT]; struct tc_htb_glob *gopt; int i; @@ -1265,7 +1265,7 @@ static int htb_init(struct Qdisc *sch, s static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_htb_glob gopt; @@ -1300,7 +1300,7 @@ static int htb_dump_class(struct Qdisc * struct sk_buff *skb, struct tcmsg *tcm) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = (struct htb_class*)arg; unsigned char *b = skb->tail; @@ -1358,7 +1358,7 @@ static int htb_graft(struct Qdisc *sch, sch_tree_lock(sch); if ((*old = xchg(&cl->un.leaf.q, new)) != NULL) { if (cl->prio_activity) - htb_deactivate ((struct htb_sched*)sch->data,cl); + htb_deactivate (qdisc_priv(sch),cl); /* TODO: is it correct ? Why CBQ doesn't do it ? */ sch->q.qlen -= (*old)->q.qlen; @@ -1379,7 +1379,7 @@ static struct Qdisc * htb_leaf(struct Qd static unsigned long htb_get(struct Qdisc *sch, u32 classid) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = htb_find(classid,sch); HTB_DBG(0,1,"htb_get clid=%X q=%p cl=%p ref=%d\n",classid,q,cl,cl?cl->refcnt:0); @@ -1400,7 +1400,7 @@ static void htb_destroy_filters(struct t static void htb_destroy_class(struct Qdisc* sch,struct htb_class *cl) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); HTB_DBG(0,1,"htb_destrycls clid=%X ref=%d\n", cl?cl->classid:0,cl?cl->refcnt:0); if (!cl->level) { BUG_TRAP(cl->un.leaf.q); @@ -1435,7 +1435,7 @@ static void htb_destroy_class(struct Qdi /* always caled under BH & queue lock */ static void htb_destroy(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); HTB_DBG(0,1,"htb_destroy q=%p\n",q); del_timer_sync (&q->timer); @@ -1457,7 +1457,7 @@ static void htb_destroy(struct Qdisc* sc static int htb_delete(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class*)arg; HTB_DBG(0,1,"htb_delete q=%p cl=%X ref=%d\n",q,cl?cl->classid:0,cl?cl->refcnt:0); @@ -1484,7 +1484,7 @@ static int htb_delete(struct Qdisc *sch, static void htb_put(struct Qdisc *sch, unsigned long arg) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = (struct htb_class*)arg; HTB_DBG(0,1,"htb_put q=%p cl=%X ref=%d\n",q,cl?cl->classid:0,cl?cl->refcnt:0); @@ -1497,7 +1497,7 @@ static int htb_change_class(struct Qdisc u32 parentid, struct rtattr **tca, unsigned long *arg) { int err = -EINVAL; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class*)*arg,*parent; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct qdisc_rate_table *rtab = NULL, *ctab = NULL; @@ -1623,7 +1623,7 @@ failure: static struct tcf_proto **htb_find_tcf(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; struct tcf_proto **fl = cl ? &cl->filter_list : &q->filter_list; HTB_DBG(0,2,"htb_tcf q=%p clid=%X fref=%d fl=%p\n",q,cl?cl->classid:0,cl?cl->filter_cnt:q->filter_cnt,*fl); @@ -1633,7 +1633,7 @@ static struct tcf_proto **htb_find_tcf(s static unsigned long htb_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_find (classid,sch); HTB_DBG(0,2,"htb_bind q=%p clid=%X cl=%p fref=%d\n",q,classid,cl,cl?cl->filter_cnt:q->filter_cnt); /*if (cl && !cl->level) return 0; @@ -1654,7 +1654,7 @@ static unsigned long htb_bind_filter(str static void htb_unbind_filter(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; HTB_DBG(0,2,"htb_unbind q=%p cl=%p fref=%d\n",q,cl,cl?cl->filter_cnt:q->filter_cnt); if (cl) @@ -1665,7 +1665,7 @@ static void htb_unbind_filter(struct Qdi static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int i; if (arg->stop) diff -urNp -X dontdiff linux-2.6/net/sched/sch_ingress.c qdisc-2.6/net/sched/sch_ingress.c --- linux-2.6/net/sched/sch_ingress.c 2004-06-24 08:52:58.000000000 -0700 +++ qdisc-2.6/net/sched/sch_ingress.c 2004-07-27 09:17:28.000000000 -0700 @@ -40,7 +40,7 @@ #endif -#define PRIV(sch) ((struct ingress_qdisc_data *) (sch)->data) +#define PRIV(sch) qdisc_priv(sch) /* Thanks to Doron Oz for this hack diff -urNp -X dontdiff linux-2.6/net/sched/sch_netem.c qdisc-2.6/net/sched/sch_netem.c --- linux-2.6/net/sched/sch_netem.c 2004-07-23 09:36:18.000000000 -0700 +++ qdisc-2.6/net/sched/sch_netem.c 2004-07-27 09:17:28.000000000 -0700 @@ -603,7 +603,7 @@ static inline int tabledist(int mu, int */ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; long delay; @@ -659,7 +659,7 @@ static int netem_enqueue(struct sk_buff /* Requeue packets but don't change time stamp */ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -670,7 +670,7 @@ static int netem_requeue(struct sk_buff static unsigned int netem_drop(struct Qdisc* sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -686,7 +686,7 @@ static unsigned int netem_drop(struct Qd */ static struct sk_buff *netem_dequeue(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; psched_time_t now; @@ -726,7 +726,7 @@ static void netem_watchdog(unsigned long static void netem_reset(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); skb_queue_purge(&q->delayed); @@ -754,7 +754,7 @@ static int set_fifo_limit(struct Qdisc * static int netem_change(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct tc_netem_qopt *qopt = RTA_DATA(opt); struct Qdisc *child; int ret; @@ -791,7 +791,7 @@ static int netem_change(struct Qdisc *sc static int netem_init(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (!opt) return -EINVAL; @@ -809,7 +809,7 @@ static int netem_init(struct Qdisc *sch, static void netem_destroy(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); del_timer_sync(&q->timer); @@ -819,7 +819,7 @@ static void netem_destroy(struct Qdisc * static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_netem_qopt qopt; @@ -841,7 +841,7 @@ rtattr_failure: static int netem_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct netem_sched_data *q = (struct netem_sched_data*)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -855,7 +855,7 @@ static int netem_dump_class(struct Qdisc static int netem_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -871,7 +871,7 @@ static int netem_graft(struct Qdisc *sch static struct Qdisc *netem_leaf(struct Qdisc *sch, unsigned long arg) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); return q->qdisc; } diff -urNp -X dontdiff linux-2.6/net/sched/sch_prio.c qdisc-2.6/net/sched/sch_prio.c --- linux-2.6/net/sched/sch_prio.c 2004-07-07 10:14:26.000000000 -0700 +++ qdisc-2.6/net/sched/sch_prio.c 2004-07-27 09:17:28.000000000 -0700 @@ -49,7 +49,7 @@ struct prio_sched_data struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); u32 band = skb->priority; struct tcf_result res; @@ -151,7 +151,7 @@ static struct sk_buff * prio_dequeue(struct Qdisc* sch) { struct sk_buff *skb; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; struct Qdisc *qdisc; @@ -169,7 +169,7 @@ prio_dequeue(struct Qdisc* sch) static unsigned int prio_drop(struct Qdisc* sch) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; unsigned int len; struct Qdisc *qdisc; @@ -189,7 +189,7 @@ static void prio_reset(struct Qdisc* sch) { int prio; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); for (prio=0; priobands; prio++) qdisc_reset(q->queues[prio]); @@ -200,7 +200,7 @@ static void prio_destroy(struct Qdisc* sch) { int prio; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); struct tcf_proto *tp; while ((tp = q->filter_list) != NULL) { @@ -216,7 +216,7 @@ prio_destroy(struct Qdisc* sch) static int prio_tune(struct Qdisc *sch, struct rtattr *opt) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); struct tc_prio_qopt *qopt = RTA_DATA(opt); int i; @@ -261,7 +261,7 @@ static int prio_tune(struct Qdisc *sch, static int prio_init(struct Qdisc *sch, struct rtattr *opt) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int i; for (i=0; idata; + struct prio_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_prio_qopt opt; @@ -297,7 +297,7 @@ rtattr_failure: static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = arg - 1; if (band >= q->bands) @@ -319,7 +319,7 @@ static int prio_graft(struct Qdisc *sch, static struct Qdisc * prio_leaf(struct Qdisc *sch, unsigned long arg) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = arg - 1; if (band >= q->bands) @@ -330,7 +330,7 @@ prio_leaf(struct Qdisc *sch, unsigned lo static unsigned long prio_get(struct Qdisc *sch, u32 classid) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = TC_H_MIN(classid); if (band - 1 >= q->bands) @@ -352,7 +352,7 @@ static void prio_put(struct Qdisc *q, un static int prio_change(struct Qdisc *sch, u32 handle, u32 parent, struct rtattr **tca, unsigned long *arg) { unsigned long cl = *arg; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; @@ -361,7 +361,7 @@ static int prio_change(struct Qdisc *sch static int prio_delete(struct Qdisc *sch, unsigned long cl) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; return 0; @@ -371,7 +371,7 @@ static int prio_delete(struct Qdisc *sch static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; @@ -383,7 +383,7 @@ static int prio_dump_class(struct Qdisc static void prio_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; if (arg->stop) @@ -404,7 +404,7 @@ static void prio_walk(struct Qdisc *sch, static struct tcf_proto ** prio_find_tcf(struct Qdisc *sch, unsigned long cl) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl) return NULL; diff -urNp -X dontdiff linux-2.6/net/sched/sch_red.c qdisc-2.6/net/sched/sch_red.c --- linux-2.6/net/sched/sch_red.c 2004-06-30 13:42:31.000000000 -0700 +++ qdisc-2.6/net/sched/sch_red.c 2004-07-27 09:17:28.000000000 -0700 @@ -180,7 +180,7 @@ static int red_ecn_mark(struct sk_buff * static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); psched_time_t now; @@ -303,7 +303,7 @@ drop: static int red_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); PSCHED_SET_PASTPERFECT(q->qidlestart); @@ -316,7 +316,7 @@ static struct sk_buff * red_dequeue(struct Qdisc* sch) { struct sk_buff *skb; - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); skb = __skb_dequeue(&sch->q); if (skb) { @@ -330,7 +330,7 @@ red_dequeue(struct Qdisc* sch) static unsigned int red_drop(struct Qdisc* sch) { struct sk_buff *skb; - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); skb = __skb_dequeue_tail(&sch->q); if (skb) { @@ -347,7 +347,7 @@ static unsigned int red_drop(struct Qdis static void red_reset(struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); __skb_queue_purge(&sch->q); sch->stats.backlog = 0; @@ -358,7 +358,7 @@ static void red_reset(struct Qdisc* sch) static int red_change(struct Qdisc *sch, struct rtattr *opt) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_RED_STAB]; struct tc_red_qopt *ctl; @@ -407,7 +407,7 @@ rtattr_failure: static int red_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_red_qopt opt; diff -urNp -X dontdiff linux-2.6/net/sched/sch_sfq.c qdisc-2.6/net/sched/sch_sfq.c --- linux-2.6/net/sched/sch_sfq.c 2004-02-23 08:31:40.000000000 -0800 +++ qdisc-2.6/net/sched/sch_sfq.c 2004-07-27 09:17:28.000000000 -0700 @@ -211,7 +211,7 @@ static inline void sfq_inc(struct sfq_sc static unsigned int sfq_drop(struct Qdisc *sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); sfq_index d = q->max_depth; struct sk_buff *skb; unsigned int len; @@ -253,7 +253,7 @@ static unsigned int sfq_drop(struct Qdis static int sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned hash = sfq_hash(q, skb); sfq_index x; @@ -288,7 +288,7 @@ sfq_enqueue(struct sk_buff *skb, struct static int sfq_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned hash = sfq_hash(q, skb); sfq_index x; @@ -324,7 +324,7 @@ sfq_requeue(struct sk_buff *skb, struct static struct sk_buff * sfq_dequeue(struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; sfq_index a, old_a; @@ -369,7 +369,7 @@ sfq_reset(struct Qdisc* sch) static void sfq_perturbation(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); q->perturbation = net_random()&0x1F; q->perturb_timer.expires = jiffies + q->perturb_period; @@ -382,7 +382,7 @@ static void sfq_perturbation(unsigned lo static int sfq_change(struct Qdisc *sch, struct rtattr *opt) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); struct tc_sfq_qopt *ctl = RTA_DATA(opt); if (opt->rta_len < RTA_LENGTH(sizeof(*ctl))) @@ -408,7 +408,7 @@ static int sfq_change(struct Qdisc *sch, static int sfq_init(struct Qdisc *sch, struct rtattr *opt) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); int i; init_timer(&q->perturb_timer); @@ -440,13 +440,13 @@ static int sfq_init(struct Qdisc *sch, s static void sfq_destroy(struct Qdisc *sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); del_timer(&q->perturb_timer); } static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_sfq_qopt opt; diff -urNp -X dontdiff linux-2.6/net/sched/sch_tbf.c qdisc-2.6/net/sched/sch_tbf.c --- linux-2.6/net/sched/sch_tbf.c 2004-06-30 13:42:31.000000000 -0700 +++ qdisc-2.6/net/sched/sch_tbf.c 2004-07-27 09:17:28.000000000 -0700 @@ -137,7 +137,7 @@ struct tbf_sched_data static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); int ret; if (skb->len > q->max_size) { @@ -163,7 +163,7 @@ static int tbf_enqueue(struct sk_buff *s static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -174,7 +174,7 @@ static int tbf_requeue(struct sk_buff *s static unsigned int tbf_drop(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -194,7 +194,7 @@ static void tbf_watchdog(unsigned long a static struct sk_buff *tbf_dequeue(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; skb = q->qdisc->dequeue(q->qdisc); @@ -261,7 +261,7 @@ static struct sk_buff *tbf_dequeue(struc static void tbf_reset(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); sch->q.qlen = 0; @@ -300,7 +300,7 @@ static struct Qdisc *tbf_create_dflt_qdi static int tbf_change(struct Qdisc* sch, struct rtattr *opt) { int err = -EINVAL; - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_TBF_PTAB]; struct tc_tbf_qopt *qopt; struct qdisc_rate_table *rtab = NULL; @@ -366,7 +366,7 @@ done: static int tbf_init(struct Qdisc* sch, struct rtattr *opt) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (opt == NULL) return -EINVAL; @@ -383,7 +383,7 @@ static int tbf_init(struct Qdisc* sch, s static void tbf_destroy(struct Qdisc *sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); del_timer(&q->wd_timer); @@ -398,7 +398,7 @@ static void tbf_destroy(struct Qdisc *sc static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_tbf_qopt opt; @@ -427,7 +427,7 @@ rtattr_failure: static int tbf_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct tbf_sched_data *q = (struct tbf_sched_data*)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -441,7 +441,7 @@ static int tbf_dump_class(struct Qdisc * static int tbf_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -457,7 +457,7 @@ static int tbf_graft(struct Qdisc *sch, static struct Qdisc *tbf_leaf(struct Qdisc *sch, unsigned long arg) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); return q->qdisc; } diff -urNp -X dontdiff linux-2.6/net/sched/sch_teql.c qdisc-2.6/net/sched/sch_teql.c --- linux-2.6/net/sched/sch_teql.c 2004-02-23 08:31:40.000000000 -0800 +++ qdisc-2.6/net/sched/sch_teql.c 2004-07-27 09:17:28.000000000 -0700 @@ -81,7 +81,7 @@ struct teql_sched_data struct sk_buff_head q; }; -#define NEXT_SLAVE(q) (((struct teql_sched_data*)((q)->data))->next) +#define NEXT_SLAVE(q) (((struct teql_sched_data*)qdisc_priv(q))->next) #define FMASK (IFF_BROADCAST|IFF_POINTOPOINT|IFF_BROADCAST) @@ -91,7 +91,7 @@ static int teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct net_device *dev = sch->dev; - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_tail(&q->q, skb); if (q->q.qlen <= dev->tx_queue_len) { @@ -109,7 +109,7 @@ teql_enqueue(struct sk_buff *skb, struct static int teql_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_head(&q->q, skb); return 0; @@ -118,7 +118,7 @@ teql_requeue(struct sk_buff *skb, struct static struct sk_buff * teql_dequeue(struct Qdisc* sch) { - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); struct sk_buff *skb; skb = __skb_dequeue(&dat->q); @@ -143,7 +143,7 @@ teql_neigh_release(struct neighbour *n) static void teql_reset(struct Qdisc* sch) { - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); skb_queue_purge(&dat->q); sch->q.qlen = 0; @@ -154,7 +154,7 @@ static void teql_destroy(struct Qdisc* sch) { struct Qdisc *q, *prev; - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); struct teql_master *master = dat->m; if ((prev = master->slaves) != NULL) { @@ -184,7 +184,7 @@ static int teql_qdisc_init(struct Qdisc { struct net_device *dev = sch->dev; struct teql_master *m = (struct teql_master*)sch->ops; - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); if (dev->hard_header_len > m->dev->hard_header_len) return -EINVAL; @@ -229,7 +229,7 @@ static int teql_qdisc_init(struct Qdisc static int __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev) { - struct teql_sched_data *q = (void*)dev->qdisc->data; + struct teql_sched_data *q = qdisc_priv(dev->qdisc); struct neighbour *mn = skb->dst->neighbour; struct neighbour *n = q->ncache; From greearb@candelatech.com Tue Aug 3 13:36:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:36: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 i73KaLjJ019857 for ; Tue, 3 Aug 2004 13:36:21 -0700 Received: from candelatech.com (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 i73KorSb014494; Tue, 3 Aug 2004 13:50:53 -0700 Message-ID: <410FF740.5060903@candelatech.com> Date: Tue, 03 Aug 2004 13:36:16 -0700 From: Ben Greear Organization: Candela Technologies 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: Stephen Hemminger CC: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan - device refcount bug. References: <20040803131425.503f8f45@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803131425.503f8f45@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7468 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: 500 Lines: 15 Stephen Hemminger wrote: > If you rmmod a network device that is in a vlan, the system hangs waiting > for the refcount to go to zero, because it is -1. The problem is that the > vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier. Good catch. It would seem to me that it would be good to have a BUG() or similar to catch any instance of the reference count going negative. Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From kaber@trash.net Tue Aug 3 13:40:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:40:29 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73KeOwS020263 for ; Tue, 3 Aug 2004 13:40:25 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 66EF619F355; Tue, 3 Aug 2004 22:40:15 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id A7B6F394133; Tue, 3 Aug 2004 22:40:14 +0200 (CEST) Message-ID: <410FF8C4.7010705@trash.net> Date: Tue, 03 Aug 2004 22:42: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: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] cache align qdisc data References: <410FAE42.2050909@trash.net> <20040803083820.711c917c@dell_ss3.pdx.osdl.net> <410FE4DD.5000306@trash.net> <20040803133139.43107fd3@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803133139.43107fd3@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7469 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: 732 Lines: 28 Stephen Hemminger wrote: >That was some old messing around, that got in there... >Here is the correct patch. > > The hunks are still there. > >@@ -1554,7 +1554,6 @@ hfsc_init_qdisc(struct Qdisc *sch, struc > qopt = RTA_DATA(opt); > > memset(q, 0, sizeof(struct hfsc_sched)); >- sch->stats_lock = &sch->dev->queue_lock; > > q->defcls = qopt->defcls; > for (i = 0; i < HFSC_HSIZE; i++) >@@ -1674,7 +1673,7 @@ hfsc_dump_qdisc(struct Qdisc *sch, struc > 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) >+ if (qdisc_copy_stats(skb, &sch->stats, &sch->dev->queue_lock) < 0) > goto rtattr_failure; > > return skb->len; > From shemminger@osdl.org Tue Aug 3 13:40:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:40: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 i73KeYWs020274 for ; Tue, 3 Aug 2004 13:40:35 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73KeE130603; Tue, 3 Aug 2004 13:40:14 -0700 Date: Tue, 3 Aug 2004 13:40:14 -0700 From: Stephen Hemminger To: Ben Greear , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (2/3) vlan propogate carrier and hotplug state Message-Id: <20040803134014.7164280c@dell_ss3.pdx.osdl.net> In-Reply-To: <410FD348.9040301@candelatech.com> References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> <410FD348.9040301@candelatech.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7470 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: 1561 Lines: 53 The bridge STP code now wants to handle device's getting connected/disconnected and this includes vlan devices. This patch makes the VLAN pseudo device state mirror the state of the real device. Only bothered with carrier and hotplug. Signed-off-by: Stephen Hemminger diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-08-03 13:35:48 -07:00 +++ b/net/8021q/vlan.c 2004-08-03 13:35:48 -07:00 @@ -69,6 +69,10 @@ .func = vlan_skb_recv, /* VLAN receive method */ }; +/* Bits of netdev state that are propogated from real device to virtual */ +#define VLAN_LINK_STATE_MASK \ + ((1<<__LINK_STATE_PRESENT)|(1<<__LINK_STATE_NOCARRIER)) + /* End of global variables definitions. */ /* @@ -472,6 +476,8 @@ new_dev->flags = real_dev->flags; new_dev->flags &= ~IFF_UP; + new_dev->state = real_dev->state & VLAN_LINK_STATE_MASK; + /* need 4 bytes for extra VLAN header info, * hope the underlying device can handle it. */ @@ -598,9 +604,20 @@ */ switch (event) { - case NETDEV_CHANGEADDR: - case NETDEV_GOING_DOWN: - /* Ignore for now */ + case NETDEV_CHANGE: + /* Propogate real device state to vlan devices */ + flgs = dev->state & VLAN_LINK_STATE_MASK; + for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { + vlandev = grp->vlan_devices[i]; + if (!vlandev) + continue; + + if ((vlandev->state & VLAN_LINK_STATE_MASK) != flgs) { + vlandev->state = (vlandev->state &~ VLAN_LINK_STATE_MASK) + | flgs; + netdev_state_change(vlandev); + } + } break; case NETDEV_DOWN: From shemminger@osdl.org Tue Aug 3 13:44:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:44: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 i73Ki3VC020953 for ; Tue, 3 Aug 2004 13:44:04 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73Khl130972; Tue, 3 Aug 2004 13:43:47 -0700 Date: Tue, 3 Aug 2004 13:43:46 -0700 From: Stephen Hemminger To: Ben Greear , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (3/3) vlan - use RCU Message-Id: <20040803134346.341e5636@dell_ss3.pdx.osdl.net> In-Reply-To: <410FD348.9040301@candelatech.com> References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> <410FD348.9040301@candelatech.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7471 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: 8810 Lines: 302 This patch makes VLAN use RCU for the group lookup and removes the group_lock. Since all operations that are done under group_lock already have the rtnetlink semaphore (RTNL), the group_lock is unnecessary. The result is the vlan code becomes basically lock free in the send/receive path. Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/if_vlan.h b/include/linux/if_vlan.h --- a/include/linux/if_vlan.h 2004-08-03 13:38:50 -07:00 +++ b/include/linux/if_vlan.h 2004-08-03 13:38:50 -07:00 @@ -22,6 +22,7 @@ struct packet_type; struct vlan_collection; struct vlan_dev_info; +struct hlist_node; #include /* for proc_dir_entry */ #include @@ -67,9 +68,9 @@ struct vlan_group { int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */ + struct hlist_node hlist; /* linked list */ struct net_device *vlan_devices[VLAN_GROUP_ARRAY_LEN]; - - struct vlan_group *next; /* the next in the list */ + struct rcu_head rcu; }; struct vlan_priority_tci_mapping { diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-08-03 13:38:50 -07:00 +++ b/net/8021q/vlan.c 2004-08-03 13:38:50 -07:00 @@ -38,8 +38,7 @@ /* Global VLAN variables */ /* Our listing of VLAN group(s) */ -struct vlan_group *vlan_group_hash[VLAN_GRP_HASH_SIZE]; -spinlock_t vlan_group_lock = SPIN_LOCK_UNLOCKED; +struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE]; #define vlan_grp_hashfn(IDX) ((((IDX) >> VLAN_GRP_HASH_SHIFT) ^ (IDX)) & VLAN_GRP_HASH_MASK) static char vlan_fullname[] = "802.1Q VLAN Support"; @@ -150,8 +149,7 @@ * references left. */ for (i = 0; i < VLAN_GRP_HASH_SIZE; i++) { - if (vlan_group_hash[i] != NULL) - BUG(); + BUG_ON(!hlist_empty(&vlan_group_hash[i])); } vlan_proc_cleanup(); @@ -161,48 +159,24 @@ module_init(vlan_proto_init); module_exit(vlan_cleanup_module); -/* Must be invoked with vlan_group_lock held. */ +/* Must be invoked with RCU read lock (no preempt) */ static struct vlan_group *__vlan_find_group(int real_dev_ifindex) { struct vlan_group *grp; + struct hlist_node *n; + int hash = vlan_grp_hashfn(real_dev_ifindex); - for (grp = vlan_group_hash[vlan_grp_hashfn(real_dev_ifindex)]; - grp != NULL; - grp = grp->next) { + hlist_for_each_entry_rcu(grp, n, &vlan_group_hash[hash], hlist) { if (grp->real_dev_ifindex == real_dev_ifindex) - break; + return grp; } - return grp; -} - -/* Must hold vlan_group_lock. */ -static void __grp_hash(struct vlan_group *grp) -{ - struct vlan_group **head; - - head = &vlan_group_hash[vlan_grp_hashfn(grp->real_dev_ifindex)]; - grp->next = *head; - *head = grp; -} - -/* Must hold vlan_group_lock. */ -static void __grp_unhash(struct vlan_group *grp) -{ - struct vlan_group *next, **pprev; - - pprev = &vlan_group_hash[vlan_grp_hashfn(grp->real_dev_ifindex)]; - next = *pprev; - while (next != grp) { - pprev = &next->next; - next = *pprev; - } - *pprev = grp->next; + return NULL; } /* Find the protocol handler. Assumes VID < VLAN_VID_MASK. * - * Must be invoked with vlan_group_lock held. + * Must be invoked with RCU read lock (no preempt) */ struct net_device *__find_vlan_dev(struct net_device *real_dev, unsigned short VID) @@ -215,6 +189,12 @@ return NULL; } +static void vlan_rcu_free(struct rcu_head *rcu) +{ + kfree(container_of(rcu, struct vlan_group, rcu)); +} + + /* This returns 0 if everything went fine. * It will return 1 if the group was killed as a result. * A negative return indicates failure. @@ -237,9 +217,8 @@ if (vlan_id >= VLAN_VID_MASK) return -EINVAL; - spin_lock_bh(&vlan_group_lock); + ASSERT_RTNL(); grp = __vlan_find_group(real_dev_ifindex); - spin_unlock_bh(&vlan_group_lock); ret = 0; @@ -279,16 +258,12 @@ if (real_dev->features & NETIF_F_HW_VLAN_RX) real_dev->vlan_rx_register(real_dev, NULL); - spin_lock_bh(&vlan_group_lock); - __grp_unhash(grp); - spin_unlock_bh(&vlan_group_lock); - - /* Free the group, after we have removed it - * from the hash. - */ - kfree(grp); - grp = NULL; + hlist_del_rcu(&grp->hlist); + /* Free the group, after all cpu's are done. */ + call_rcu(&grp->rcu, vlan_rcu_free); + + grp = NULL; ret = 1; } } @@ -375,7 +350,6 @@ struct vlan_group *grp; struct net_device *new_dev; struct net_device *real_dev; /* the ethernet device */ - int r; char name[IFNAMSIZ]; #ifdef VLAN_DEBUG @@ -424,11 +398,7 @@ if (!(real_dev->flags & IFF_UP)) goto out_unlock; - spin_lock_bh(&vlan_group_lock); - r = (__find_vlan_dev(real_dev, VLAN_ID) != NULL); - spin_unlock_bh(&vlan_group_lock); - - if (r) { + if (__find_vlan_dev(real_dev, VLAN_ID) != NULL) { /* was already registered. */ printk(VLAN_DBG "%s: ALREADY had VLAN registered\n", __FUNCTION__); goto out_unlock; @@ -527,9 +497,7 @@ /* So, got the sucker initialized, now lets place * it into our local structure. */ - spin_lock_bh(&vlan_group_lock); grp = __vlan_find_group(real_dev->ifindex); - spin_unlock_bh(&vlan_group_lock); /* Note, we are running under the RTNL semaphore * so it cannot "appear" on us. @@ -543,9 +511,8 @@ memset(grp, 0, sizeof(struct vlan_group)); grp->real_dev_ifindex = real_dev->ifindex; - spin_lock_bh(&vlan_group_lock); - __grp_hash(grp); - spin_unlock_bh(&vlan_group_lock); + hlist_add_head_rcu(&grp->hlist, + &vlan_group_hash[vlan_grp_hashfn(real_dev->ifindex)]); if (real_dev->features & NETIF_F_HW_VLAN_RX) real_dev->vlan_rx_register(real_dev, grp); @@ -587,14 +554,10 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { - struct net_device *dev = (struct net_device *)(ptr); - struct vlan_group *grp = NULL; + struct net_device *dev = ptr; + struct vlan_group *grp = __vlan_find_group(dev->ifindex); int i, flgs; - struct net_device *vlandev = NULL; - - spin_lock_bh(&vlan_group_lock); - grp = __vlan_find_group(dev->ifindex); - spin_unlock_bh(&vlan_group_lock); + struct net_device *vlandev; if (!grp) goto out; diff -Nru a/net/8021q/vlan.h b/net/8021q/vlan.h --- a/net/8021q/vlan.h 2004-08-03 13:38:50 -07:00 +++ b/net/8021q/vlan.h 2004-08-03 13:38:50 -07:00 @@ -33,8 +33,7 @@ #define VLAN_GRP_HASH_SHIFT 5 #define VLAN_GRP_HASH_SIZE (1 << VLAN_GRP_HASH_SHIFT) #define VLAN_GRP_HASH_MASK (VLAN_GRP_HASH_SIZE - 1) -extern struct vlan_group *vlan_group_hash[VLAN_GRP_HASH_SIZE]; -extern spinlock_t vlan_group_lock; +extern struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE]; /* Find a VLAN device by the MAC address of its Ethernet device, and * it's VLAN ID. The default configuration is to have VLAN's scope @@ -44,10 +43,8 @@ * NOT follow the spec for VLANs, but may be useful for doing very * large quantities of VLAN MUX/DEMUX onto FrameRelay or ATM PVCs. * - * Must be invoked with vlan_group_lock held and that lock MUST NOT - * be dropped until a reference is obtained on the returned device. - * You may drop the lock earlier if you are running under the RTNL - * semaphore, however. + * Must be invoked with rcu_read_lock (ie preempt disabled) + * or with RTNL. */ struct net_device *__find_vlan_dev(struct net_device* real_dev, unsigned short VID); /* vlan.c */ diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c --- a/net/8021q/vlan_dev.c 2004-08-03 13:38:50 -07:00 +++ b/net/8021q/vlan_dev.c 2004-08-03 13:38:50 -07:00 @@ -138,15 +138,15 @@ /* We have 12 bits of vlan ID. * - * We must not drop the vlan_group_lock until we hold a + * We must not drop allow preempt until we hold a * reference to the device (netif_rx does that) or we * fail. */ - spin_lock_bh(&vlan_group_lock); + rcu_read_lock(); skb->dev = __find_vlan_dev(dev, vid); if (!skb->dev) { - spin_unlock_bh(&vlan_group_lock); + rcu_read_unlock(); #ifdef VLAN_DEBUG printk(VLAN_DBG "%s: ERROR: No net_device for VID: %i on dev: %s [%i]\n", @@ -170,7 +170,7 @@ */ if (dev != VLAN_DEV_INFO(skb->dev)->real_dev) { - spin_unlock_bh(&vlan_group_lock); + rcu_read_unlock(); #ifdef VLAN_DEBUG printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n", @@ -244,7 +244,7 @@ /* TODO: Add a more specific counter here. */ stats->rx_errors++; } - spin_unlock_bh(&vlan_group_lock); + rcu_read_lock(); return 0; } @@ -273,7 +273,7 @@ /* TODO: Add a more specific counter here. */ stats->rx_errors++; } - spin_unlock_bh(&vlan_group_lock); + rcu_read_unlock(); return 0; } @@ -296,7 +296,7 @@ /* TODO: Add a more specific counter here. */ stats->rx_errors++; } - spin_unlock_bh(&vlan_group_lock); + rcu_read_unlock(); return 0; } From greearb@candelatech.com Tue Aug 3 13:53:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 13:53:30 -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 i73KrOj1021415 for ; Tue, 3 Aug 2004 13:53:24 -0700 Received: from candelatech.com (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 i73L7tSb014733; Tue, 3 Aug 2004 14:07:55 -0700 Message-ID: <410FFB3D.7070002@candelatech.com> Date: Tue, 03 Aug 2004 13:53:17 -0700 From: Ben Greear Organization: Candela Technologies 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: Stephen Hemminger CC: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (2/3) vlan propogate carrier and hotplug state References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> <410FD348.9040301@candelatech.com> <20040803134014.7164280c@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803134014.7164280c@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7472 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: 380 Lines: 13 Stephen Hemminger wrote: > The bridge STP code now wants to handle device's getting connected/disconnected > and this includes vlan devices. This patch makes the VLAN pseudo device state > mirror the state of the real device. Only bothered with carrier and hotplug. Ok by me. Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb@candelatech.com Tue Aug 3 14:03:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 14:04:02 -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 i73L3te4021923 for ; Tue, 3 Aug 2004 14:03:57 -0700 Received: from candelatech.com (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 i73LIRSb014871; Tue, 3 Aug 2004 14:18:28 -0700 Message-ID: <410FFDB6.8040309@candelatech.com> Date: Tue, 03 Aug 2004 14:03:50 -0700 From: Ben Greear Organization: Candela Technologies 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: Stephen Hemminger CC: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (3/3) vlan - use RCU References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> <410FD348.9040301@candelatech.com> <20040803134346.341e5636@dell_ss3.pdx.osdl.net> In-Reply-To: <20040803134346.341e5636@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7473 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: 537 Lines: 16 Stephen Hemminger wrote: > This patch makes VLAN use RCU for the group lookup and removes > the group_lock. Since all operations that are done under group_lock > already have the rtnetlink semaphore (RTNL), the group_lock is unnecessary. > The result is the vlan code becomes basically lock free in the send/receive > path. Looks good to me, but I'm fairly ignorant of RCU at this point. Will trust Stephen knows what he is doing :) Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From shemminger@osdl.org Tue Aug 3 14:06:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 14:06: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 i73L5wev022289 for ; Tue, 3 Aug 2004 14:05:59 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i73L5c103266; Tue, 3 Aug 2004 14:05:38 -0700 Date: Tue, 3 Aug 2004 14:05:38 -0700 From: Stephen Hemminger To: Patrick McHardy , "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] cache align qdisc data Message-Id: <20040803140538.7c40f961@dell_ss3.pdx.osdl.net> In-Reply-To: <410FF8C4.7010705@trash.net> References: <410FAE42.2050909@trash.net> <20040803083820.711c917c@dell_ss3.pdx.osdl.net> <410FE4DD.5000306@trash.net> <20040803133139.43107fd3@dell_ss3.pdx.osdl.net> <410FF8C4.7010705@trash.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7474 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: 47276 Lines: 1523 Ugh, here it is without the hfsc messup. diff -urN -X dontdiff linux-2.6/include/net/pkt_sched.h qdisc-2.6/include/net/pkt_sched.h --- linux-2.6/include/net/pkt_sched.h 2004-07-30 12:17:02.000000000 -0700 +++ qdisc-2.6/include/net/pkt_sched.h 2004-08-03 12:50:52.324952264 -0700 @@ -77,6 +77,7 @@ #define TCQ_F_BUILTIN 1 #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 + int padded; struct Qdisc_ops *ops; struct Qdisc *next; u32 handle; @@ -93,10 +94,17 @@ * and it will live until better solution will be invented. */ struct Qdisc *__parent; - - char data[0]; }; +#define QDISC_ALIGN 32 +#define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) + +static inline void *qdisc_priv(struct Qdisc *q) +{ + return (char *)q + ((sizeof(struct Qdisc) + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); +} + struct qdisc_rate_table { struct tc_ratespec rate; diff -urN -X dontdiff linux-2.6/net/sched/sch_cbq.c qdisc-2.6/net/sched/sch_cbq.c --- linux-2.6/net/sched/sch_cbq.c 2004-07-07 10:14:26.000000000 -0700 +++ qdisc-2.6/net/sched/sch_cbq.c 2004-07-27 09:17:28.000000000 -0700 @@ -241,7 +241,7 @@ static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *head = &q->link; struct cbq_class **defmap; struct cbq_class *cl = NULL; @@ -344,7 +344,7 @@ static __inline__ void cbq_activate_class(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); int prio = cl->cpriority; struct cbq_class *cl_tail; @@ -368,7 +368,7 @@ static void cbq_deactivate_class(struct cbq_class *this) { - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); int prio = this->cpriority; struct cbq_class *cl; struct cbq_class *cl_prev = q->active[prio]; @@ -419,7 +419,7 @@ static int cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); int len = skb->len; int ret = NET_XMIT_SUCCESS; struct cbq_class *cl = cbq_classify(skb, sch,&ret); @@ -466,7 +466,7 @@ static int cbq_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int ret; @@ -500,7 +500,7 @@ static void cbq_ovl_classic(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { @@ -554,7 +554,7 @@ static void cbq_ovl_rclassic(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *this = cl; do { @@ -573,7 +573,7 @@ static void cbq_ovl_delay(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { @@ -609,7 +609,7 @@ static void cbq_ovl_lowprio(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); cl->penalized = jiffies + cl->penalty; @@ -678,7 +678,7 @@ static void cbq_undelay(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); long delay = 0; unsigned pmask; @@ -715,7 +715,7 @@ { int len = skb->len; struct Qdisc *sch = child->__parent; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = q->rx_class; q->rx_class = NULL; @@ -863,7 +863,7 @@ static __inline__ struct cbq_class * cbq_under_limit(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *this_cl = cl; if (cl->tparent == NULL) @@ -903,7 +903,7 @@ static __inline__ struct sk_buff * cbq_dequeue_prio(struct Qdisc *sch, int prio) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl_tail, *cl_prev, *cl; struct sk_buff *skb; int deficit; @@ -1006,7 +1006,7 @@ static __inline__ struct sk_buff * cbq_dequeue_1(struct Qdisc *sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; unsigned activemask; @@ -1025,7 +1025,7 @@ cbq_dequeue(struct Qdisc *sch) { struct sk_buff *skb; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); psched_time_t now; psched_tdiff_t incr; @@ -1150,7 +1150,7 @@ static void cbq_sync_defmap(struct cbq_class *cl) { - struct cbq_sched_data *q = (struct cbq_sched_data*)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); struct cbq_class *split = cl->split; unsigned h; int i; @@ -1216,7 +1216,7 @@ static void cbq_unlink_class(struct cbq_class *this) { struct cbq_class *cl, **clp; - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); for (clp = &q->classes[cbq_hash(this->classid)]; (cl = *clp) != NULL; clp = &cl->next) { if (cl == this) { @@ -1249,7 +1249,7 @@ static void cbq_link_class(struct cbq_class *this) { - struct cbq_sched_data *q = (struct cbq_sched_data*)this->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(this->qdisc); unsigned h = cbq_hash(this->classid); struct cbq_class *parent = this->tparent; @@ -1270,7 +1270,7 @@ static unsigned int cbq_drop(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl, *cl_head; int prio; unsigned int len; @@ -1293,7 +1293,7 @@ static void cbq_reset(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int prio; unsigned h; @@ -1363,7 +1363,7 @@ static int cbq_set_wrr(struct cbq_class *cl, struct tc_cbq_wrropt *wrr) { - struct cbq_sched_data *q = (struct cbq_sched_data *)cl->qdisc->data; + struct cbq_sched_data *q = qdisc_priv(cl->qdisc); if (wrr->allot) cl->allot = wrr->allot; @@ -1432,7 +1432,7 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_CBQ_MAX]; struct tc_ratespec *r; @@ -1623,7 +1623,7 @@ static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; @@ -1650,7 +1650,7 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { - struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; unsigned char *b = skb->tail; struct rtattr *rta; @@ -1726,7 +1726,7 @@ static unsigned long cbq_get(struct Qdisc *sch, u32 classid) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = cbq_class_lookup(q, classid); if (cl) { @@ -1760,7 +1760,7 @@ static void cbq_destroy(struct Qdisc* sch) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; unsigned h; @@ -1791,7 +1791,7 @@ if (--cl->refcnt == 0) { #ifdef CONFIG_NET_CLS_POLICE - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); spin_lock_bh(&sch->dev->queue_lock); if (q->rx_class == cl) @@ -1808,7 +1808,7 @@ unsigned long *arg) { int err; - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)*arg; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct rtattr *tb[TCA_CBQ_MAX]; @@ -2004,7 +2004,7 @@ static int cbq_delete(struct Qdisc *sch, unsigned long arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; if (cl->filters || cl->children || cl == &q->link) @@ -2042,7 +2042,7 @@ static struct tcf_proto **cbq_find_tcf(struct Qdisc *sch, unsigned long arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class *)arg; if (cl == NULL) @@ -2054,7 +2054,7 @@ static unsigned long cbq_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *p = (struct cbq_class*)parent; struct cbq_class *cl = cbq_class_lookup(q, classid); @@ -2076,7 +2076,7 @@ static void cbq_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + struct cbq_sched_data *q = qdisc_priv(sch); unsigned h; if (arg->stop) diff -urN -X dontdiff linux-2.6/net/sched/sch_dsmark.c qdisc-2.6/net/sched/sch_dsmark.c --- linux-2.6/net/sched/sch_dsmark.c 2004-04-19 10:03:23.000000000 -0700 +++ qdisc-2.6/net/sched/sch_dsmark.c 2004-07-27 09:17:28.000000000 -0700 @@ -30,7 +30,7 @@ #endif -#define PRIV(sch) ((struct dsmark_qdisc_data *) (sch)->data) +#define PRIV(sch) qdisc_priv(sch) /* diff -urN -X dontdiff linux-2.6/net/sched/sch_fifo.c qdisc-2.6/net/sched/sch_fifo.c --- linux-2.6/net/sched/sch_fifo.c 2004-02-19 10:28:27.000000000 -0800 +++ qdisc-2.6/net/sched/sch_fifo.c 2004-07-27 09:17:28.000000000 -0700 @@ -45,7 +45,7 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct fifo_sched_data *q = (struct fifo_sched_data *)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (sch->stats.backlog + skb->len <= q->limit) { __skb_queue_tail(&sch->q, skb); @@ -106,7 +106,7 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct fifo_sched_data *q = (struct fifo_sched_data *)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (sch->q.qlen < q->limit) { __skb_queue_tail(&sch->q, skb); @@ -138,7 +138,7 @@ static int fifo_init(struct Qdisc *sch, struct rtattr *opt) { - struct fifo_sched_data *q = (void*)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); if (opt == NULL) { unsigned int limit = sch->dev->tx_queue_len ? : 1; @@ -158,7 +158,7 @@ static int fifo_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct fifo_sched_data *q = (void*)sch->data; + struct fifo_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_fifo_qopt opt; diff -urN -X dontdiff linux-2.6/net/sched/sch_generic.c qdisc-2.6/net/sched/sch_generic.c --- linux-2.6/net/sched/sch_generic.c 2004-07-30 12:17:03.000000000 -0700 +++ qdisc-2.6/net/sched/sch_generic.c 2004-08-03 12:50:53.071838720 -0700 @@ -283,10 +283,9 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) { - struct sk_buff_head *list; + struct sk_buff_head *list = qdisc_priv(qdisc); - list = ((struct sk_buff_head*)qdisc->data) + - prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[skb->priority&TC_PRIO_MAX]; if (list->qlen < qdisc->dev->tx_queue_len) { __skb_queue_tail(list, skb); @@ -304,7 +303,7 @@ pfifo_fast_dequeue(struct Qdisc* qdisc) { int prio; - struct sk_buff_head *list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); struct sk_buff *skb; for (prio = 0; prio < 3; prio++, list++) { @@ -320,10 +319,9 @@ static int pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc) { - struct sk_buff_head *list; + struct sk_buff_head *list = qdisc_priv(qdisc); - list = ((struct sk_buff_head*)qdisc->data) + - prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[skb->priority&TC_PRIO_MAX]; __skb_queue_head(list, skb); qdisc->q.qlen++; @@ -334,7 +332,7 @@ pfifo_fast_reset(struct Qdisc* qdisc) { int prio; - struct sk_buff_head *list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); for (prio=0; prio < 3; prio++) skb_queue_purge(list+prio); @@ -359,9 +357,7 @@ static int pfifo_fast_init(struct Qdisc *qdisc, struct rtattr *opt) { int i; - struct sk_buff_head *list; - - list = ((struct sk_buff_head*)qdisc->data); + struct sk_buff_head *list = qdisc_priv(qdisc); for (i=0; i<3; i++) skb_queue_head_init(list+i); @@ -385,13 +381,22 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) { + void *p; struct Qdisc *sch; - int size = sizeof(*sch) + ops->priv_size; + int size; + + /* ensure that the Qdisc and the private data are 32-byte aligned */ + size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); + size += ops->priv_size + QDISC_ALIGN_CONST; - sch = kmalloc(size, GFP_KERNEL); - if (!sch) + p = kmalloc(size, GFP_KERNEL); + if (!p) return NULL; - memset(sch, 0, size); + memset(p, 0, size); + + sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); + sch->padded = (char *)sch - (char *)p; skb_queue_head_init(&sch->q); sch->ops = ops; @@ -406,7 +411,7 @@ if (!ops->init || ops->init(sch, NULL) == 0) return sch; - kfree(sch); + kfree(p); return NULL; } @@ -438,7 +443,7 @@ module_put(ops->owner); if (!(qdisc->flags&TCQ_F_BUILTIN)) - kfree(qdisc); + kfree((char *) qdisc - qdisc->padded); } /* Under dev->queue_lock and BH! */ diff -urN -X dontdiff linux-2.6/net/sched/sch_gred.c qdisc-2.6/net/sched/sch_gred.c --- linux-2.6/net/sched/sch_gred.c 2004-06-30 13:42:31.000000000 -0700 +++ qdisc-2.6/net/sched/sch_gred.c 2004-07-27 09:17:28.000000000 -0700 @@ -106,7 +106,7 @@ { psched_time_t now; struct gred_sched_data *q=NULL; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); unsigned long qave=0; int i=0; @@ -215,7 +215,7 @@ gred_requeue(struct sk_buff *skb, struct Qdisc* sch) { struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); q= t->tab[(skb->tc_index&0xf)]; /* error checking here -- probably unnecessary */ PSCHED_SET_PASTPERFECT(q->qidlestart); @@ -231,7 +231,7 @@ { struct sk_buff *skb; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); skb = __skb_dequeue(&sch->q); if (skb) { @@ -264,7 +264,7 @@ struct sk_buff *skb; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); skb = __skb_dequeue_tail(&sch->q); if (skb) { @@ -300,7 +300,7 @@ { int i; struct gred_sched_data *q; - struct gred_sched *t= (struct gred_sched *)sch->data; + struct gred_sched *t= qdisc_priv(sch); __skb_queue_purge(&sch->q); @@ -323,7 +323,7 @@ static int gred_change(struct Qdisc *sch, struct rtattr *opt) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct gred_sched_data *q; struct tc_gred_qopt *ctl; struct tc_gred_sopt *sopt; @@ -469,7 +469,7 @@ static int gred_init(struct Qdisc *sch, struct rtattr *opt) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct tc_gred_sopt *sopt; struct rtattr *tb[TCA_GRED_STAB]; struct rtattr *tb2[TCA_GRED_DPS]; @@ -502,7 +502,7 @@ struct rtattr *rta; struct tc_gred_qopt *opt = NULL ; struct tc_gred_qopt *dst; - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); struct gred_sched_data *q; int i; unsigned char *b = skb->tail; @@ -593,7 +593,7 @@ static void gred_destroy(struct Qdisc *sch) { - struct gred_sched *table = (struct gred_sched *)sch->data; + struct gred_sched *table = qdisc_priv(sch); int i; for (i = 0;i < table->DPs; i++) { diff -urN -X dontdiff linux-2.6/net/sched/sch_hfsc.c qdisc-2.6/net/sched/sch_hfsc.c --- linux-2.6/net/sched/sch_hfsc.c 2004-07-26 09:20:38.000000000 -0700 +++ qdisc-2.6/net/sched/sch_hfsc.c 2004-08-03 13:58:10.829006328 -0700 @@ -1016,7 +1016,7 @@ static inline struct hfsc_class * hfsc_find_class(u32 classid, struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; list_for_each_entry(cl, &q->clhash[hfsc_hash(classid)], hlist) { @@ -1061,7 +1061,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **tca, unsigned long *arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)*arg; struct hfsc_class *parent = NULL; struct rtattr *opt = tca[TCA_OPTIONS-1]; @@ -1204,7 +1204,7 @@ static void hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); hfsc_destroy_filters(&cl->filter_list); qdisc_destroy(cl->qdisc); @@ -1218,7 +1218,7 @@ static int hfsc_delete_class(struct Qdisc *sch, unsigned long arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl->level > 0 || cl->filter_cnt > 0 || cl == &q->root) @@ -1240,7 +1240,7 @@ static struct hfsc_class * hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct tcf_result res; struct tcf_proto *tcf; @@ -1381,7 +1381,7 @@ static struct tcf_proto ** hfsc_tcf_chain(struct Qdisc *sch, unsigned long arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl == NULL) @@ -1489,7 +1489,7 @@ static void hfsc_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int i; @@ -1523,7 +1523,7 @@ static void hfsc_schedule_watchdog(struct Qdisc *sch, u64 cur_time) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; u64 next_time = 0; long delay; @@ -1545,7 +1545,7 @@ static int hfsc_init_qdisc(struct Qdisc *sch, struct rtattr *opt) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct tc_hfsc_qopt *qopt; unsigned int i; @@ -1585,7 +1585,7 @@ static int hfsc_change_qdisc(struct Qdisc *sch, struct rtattr *opt) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct tc_hfsc_qopt *qopt; if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) @@ -1632,7 +1632,7 @@ static void hfsc_reset_qdisc(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int i; @@ -1651,7 +1651,7 @@ static void hfsc_destroy_qdisc(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl, *next; unsigned int i; @@ -1666,7 +1666,7 @@ static int hfsc_dump_qdisc(struct Qdisc *sch, struct sk_buff *skb) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_hfsc_qopt qopt; @@ -1730,7 +1730,7 @@ static struct sk_buff * hfsc_dequeue(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct sk_buff *skb; u64 cur_time; @@ -1799,7 +1799,7 @@ static int hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); __skb_queue_head(&q->requeue, skb); sch->q.qlen++; @@ -1809,7 +1809,7 @@ static unsigned int hfsc_drop(struct Qdisc *sch) { - struct hfsc_sched *q = (struct hfsc_sched *)sch->data; + struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; unsigned int len; diff -urN -X dontdiff linux-2.6/net/sched/sch_htb.c qdisc-2.6/net/sched/sch_htb.c --- linux-2.6/net/sched/sch_htb.c 2004-07-26 09:20:38.000000000 -0700 +++ qdisc-2.6/net/sched/sch_htb.c 2004-07-27 09:17:28.000000000 -0700 @@ -267,7 +267,7 @@ /* find class in global hash table using given handle */ static __inline__ struct htb_class *htb_find(u32 handle, struct Qdisc *sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct list_head *p; if (TC_H_MAJ(handle) != sch->handle) return NULL; @@ -300,7 +300,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; struct tcf_result res; struct tcf_proto *tcf; @@ -712,7 +712,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_classify(skb,sch,&ret); @@ -759,7 +759,7 @@ /* TODO: requeuing packet charges it to policers again !! */ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int ret = NET_XMIT_SUCCESS; struct htb_class *cl = htb_classify(skb,sch, &ret); struct sk_buff *tskb; @@ -800,7 +800,7 @@ static void htb_rate_timer(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct list_head *p; /* lock queue so that we can muck with it */ @@ -1060,7 +1060,7 @@ static void htb_delay_by(struct Qdisc *sch,long delay) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); if (delay <= 0) delay = 1; if (unlikely(delay > 5*HZ)) { if (net_ratelimit()) @@ -1077,7 +1077,7 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch) { struct sk_buff *skb = NULL; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int level; long min_delay; #ifdef HTB_DEBUG @@ -1147,7 +1147,7 @@ /* try to drop from each class (by prio) until one succeed */ static unsigned int htb_drop(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int prio; for (prio = TC_HTB_NUMPRIO - 1; prio >= 0; prio--) { @@ -1172,7 +1172,7 @@ /* always caled under BH & queue lock */ static void htb_reset(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int i; HTB_DBG(0,1,"htb_reset sch=%p, handle=%X\n",sch,sch->handle); @@ -1210,7 +1210,7 @@ static int htb_init(struct Qdisc *sch, struct rtattr *opt) { - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct rtattr *tb[TCA_HTB_INIT]; struct tc_htb_glob *gopt; int i; @@ -1265,7 +1265,7 @@ static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_htb_glob gopt; @@ -1300,7 +1300,7 @@ struct sk_buff *skb, struct tcmsg *tcm) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched*)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = (struct htb_class*)arg; unsigned char *b = skb->tail; @@ -1358,7 +1358,7 @@ sch_tree_lock(sch); if ((*old = xchg(&cl->un.leaf.q, new)) != NULL) { if (cl->prio_activity) - htb_deactivate ((struct htb_sched*)sch->data,cl); + htb_deactivate (qdisc_priv(sch),cl); /* TODO: is it correct ? Why CBQ doesn't do it ? */ sch->q.qlen -= (*old)->q.qlen; @@ -1379,7 +1379,7 @@ static unsigned long htb_get(struct Qdisc *sch, u32 classid) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = htb_find(classid,sch); HTB_DBG(0,1,"htb_get clid=%X q=%p cl=%p ref=%d\n",classid,q,cl,cl?cl->refcnt:0); @@ -1400,7 +1400,7 @@ static void htb_destroy_class(struct Qdisc* sch,struct htb_class *cl) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); HTB_DBG(0,1,"htb_destrycls clid=%X ref=%d\n", cl?cl->classid:0,cl?cl->refcnt:0); if (!cl->level) { BUG_TRAP(cl->un.leaf.q); @@ -1435,7 +1435,7 @@ /* always caled under BH & queue lock */ static void htb_destroy(struct Qdisc* sch) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); HTB_DBG(0,1,"htb_destroy q=%p\n",q); del_timer_sync (&q->timer); @@ -1457,7 +1457,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class*)arg; HTB_DBG(0,1,"htb_delete q=%p cl=%X ref=%d\n",q,cl?cl->classid:0,cl?cl->refcnt:0); @@ -1484,7 +1484,7 @@ static void htb_put(struct Qdisc *sch, unsigned long arg) { #ifdef HTB_DEBUG - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); #endif struct htb_class *cl = (struct htb_class*)arg; HTB_DBG(0,1,"htb_put q=%p cl=%X ref=%d\n",q,cl?cl->classid:0,cl?cl->refcnt:0); @@ -1497,7 +1497,7 @@ u32 parentid, struct rtattr **tca, unsigned long *arg) { int err = -EINVAL; - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class*)*arg,*parent; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct qdisc_rate_table *rtab = NULL, *ctab = NULL; @@ -1623,7 +1623,7 @@ static struct tcf_proto **htb_find_tcf(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; struct tcf_proto **fl = cl ? &cl->filter_list : &q->filter_list; HTB_DBG(0,2,"htb_tcf q=%p clid=%X fref=%d fl=%p\n",q,cl?cl->classid:0,cl?cl->filter_cnt:q->filter_cnt,*fl); @@ -1633,7 +1633,7 @@ static unsigned long htb_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_find (classid,sch); HTB_DBG(0,2,"htb_bind q=%p clid=%X cl=%p fref=%d\n",q,classid,cl,cl?cl->filter_cnt:q->filter_cnt); /*if (cl && !cl->level) return 0; @@ -1654,7 +1654,7 @@ static void htb_unbind_filter(struct Qdisc *sch, unsigned long arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; HTB_DBG(0,2,"htb_unbind q=%p cl=%p fref=%d\n",q,cl,cl?cl->filter_cnt:q->filter_cnt); if (cl) @@ -1665,7 +1665,7 @@ static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct htb_sched *q = (struct htb_sched *)sch->data; + struct htb_sched *q = qdisc_priv(sch); int i; if (arg->stop) diff -urN -X dontdiff linux-2.6/net/sched/sch_ingress.c qdisc-2.6/net/sched/sch_ingress.c --- linux-2.6/net/sched/sch_ingress.c 2004-06-24 08:52:58.000000000 -0700 +++ qdisc-2.6/net/sched/sch_ingress.c 2004-07-27 09:17:28.000000000 -0700 @@ -40,7 +40,7 @@ #endif -#define PRIV(sch) ((struct ingress_qdisc_data *) (sch)->data) +#define PRIV(sch) qdisc_priv(sch) /* Thanks to Doron Oz for this hack diff -urN -X dontdiff linux-2.6/net/sched/sch_netem.c qdisc-2.6/net/sched/sch_netem.c --- linux-2.6/net/sched/sch_netem.c 2004-07-23 09:36:18.000000000 -0700 +++ qdisc-2.6/net/sched/sch_netem.c 2004-07-27 09:17:28.000000000 -0700 @@ -603,7 +603,7 @@ */ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; long delay; @@ -659,7 +659,7 @@ /* Requeue packets but don't change time stamp */ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -670,7 +670,7 @@ static unsigned int netem_drop(struct Qdisc* sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -686,7 +686,7 @@ */ static struct sk_buff *netem_dequeue(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; psched_time_t now; @@ -726,7 +726,7 @@ static void netem_reset(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); skb_queue_purge(&q->delayed); @@ -754,7 +754,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct tc_netem_qopt *qopt = RTA_DATA(opt); struct Qdisc *child; int ret; @@ -791,7 +791,7 @@ static int netem_init(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (!opt) return -EINVAL; @@ -809,7 +809,7 @@ static void netem_destroy(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); del_timer_sync(&q->timer); @@ -819,7 +819,7 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_netem_qopt qopt; @@ -841,7 +841,7 @@ static int netem_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct netem_sched_data *q = (struct netem_sched_data*)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -855,7 +855,7 @@ static int netem_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -871,7 +871,7 @@ static struct Qdisc *netem_leaf(struct Qdisc *sch, unsigned long arg) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); return q->qdisc; } diff -urN -X dontdiff linux-2.6/net/sched/sch_prio.c qdisc-2.6/net/sched/sch_prio.c --- linux-2.6/net/sched/sch_prio.c 2004-07-07 10:14:26.000000000 -0700 +++ qdisc-2.6/net/sched/sch_prio.c 2004-07-27 09:17:28.000000000 -0700 @@ -49,7 +49,7 @@ struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); u32 band = skb->priority; struct tcf_result res; @@ -151,7 +151,7 @@ prio_dequeue(struct Qdisc* sch) { struct sk_buff *skb; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; struct Qdisc *qdisc; @@ -169,7 +169,7 @@ static unsigned int prio_drop(struct Qdisc* sch) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; unsigned int len; struct Qdisc *qdisc; @@ -189,7 +189,7 @@ prio_reset(struct Qdisc* sch) { int prio; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); for (prio=0; priobands; prio++) qdisc_reset(q->queues[prio]); @@ -200,7 +200,7 @@ prio_destroy(struct Qdisc* sch) { int prio; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); struct tcf_proto *tp; while ((tp = q->filter_list) != NULL) { @@ -216,7 +216,7 @@ static int prio_tune(struct Qdisc *sch, struct rtattr *opt) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); struct tc_prio_qopt *qopt = RTA_DATA(opt); int i; @@ -261,7 +261,7 @@ static int prio_init(struct Qdisc *sch, struct rtattr *opt) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int i; for (i=0; idata; + struct prio_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_prio_qopt opt; @@ -297,7 +297,7 @@ static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = arg - 1; if (band >= q->bands) @@ -319,7 +319,7 @@ static struct Qdisc * prio_leaf(struct Qdisc *sch, unsigned long arg) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = arg - 1; if (band >= q->bands) @@ -330,7 +330,7 @@ static unsigned long prio_get(struct Qdisc *sch, u32 classid) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); unsigned long band = TC_H_MIN(classid); if (band - 1 >= q->bands) @@ -352,7 +352,7 @@ static int prio_change(struct Qdisc *sch, u32 handle, u32 parent, struct rtattr **tca, unsigned long *arg) { unsigned long cl = *arg; - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; @@ -361,7 +361,7 @@ static int prio_delete(struct Qdisc *sch, unsigned long cl) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; return 0; @@ -371,7 +371,7 @@ static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl - 1 > q->bands) return -ENOENT; @@ -383,7 +383,7 @@ static void prio_walk(struct Qdisc *sch, struct qdisc_walker *arg) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); int prio; if (arg->stop) @@ -404,7 +404,7 @@ static struct tcf_proto ** prio_find_tcf(struct Qdisc *sch, unsigned long cl) { - struct prio_sched_data *q = (struct prio_sched_data *)sch->data; + struct prio_sched_data *q = qdisc_priv(sch); if (cl) return NULL; diff -urN -X dontdiff linux-2.6/net/sched/sch_red.c qdisc-2.6/net/sched/sch_red.c --- linux-2.6/net/sched/sch_red.c 2004-06-30 13:42:31.000000000 -0700 +++ qdisc-2.6/net/sched/sch_red.c 2004-07-27 09:17:28.000000000 -0700 @@ -180,7 +180,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); psched_time_t now; @@ -303,7 +303,7 @@ static int red_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); PSCHED_SET_PASTPERFECT(q->qidlestart); @@ -316,7 +316,7 @@ red_dequeue(struct Qdisc* sch) { struct sk_buff *skb; - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); skb = __skb_dequeue(&sch->q); if (skb) { @@ -330,7 +330,7 @@ static unsigned int red_drop(struct Qdisc* sch) { struct sk_buff *skb; - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); skb = __skb_dequeue_tail(&sch->q); if (skb) { @@ -347,7 +347,7 @@ static void red_reset(struct Qdisc* sch) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); __skb_queue_purge(&sch->q); sch->stats.backlog = 0; @@ -358,7 +358,7 @@ static int red_change(struct Qdisc *sch, struct rtattr *opt) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_RED_STAB]; struct tc_red_qopt *ctl; @@ -407,7 +407,7 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct red_sched_data *q = (struct red_sched_data *)sch->data; + struct red_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_red_qopt opt; diff -urN -X dontdiff linux-2.6/net/sched/sch_sfq.c qdisc-2.6/net/sched/sch_sfq.c --- linux-2.6/net/sched/sch_sfq.c 2004-02-23 08:31:40.000000000 -0800 +++ qdisc-2.6/net/sched/sch_sfq.c 2004-07-27 09:17:28.000000000 -0700 @@ -211,7 +211,7 @@ static unsigned int sfq_drop(struct Qdisc *sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); sfq_index d = q->max_depth; struct sk_buff *skb; unsigned int len; @@ -253,7 +253,7 @@ static int sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned hash = sfq_hash(q, skb); sfq_index x; @@ -288,7 +288,7 @@ static int sfq_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned hash = sfq_hash(q, skb); sfq_index x; @@ -324,7 +324,7 @@ static struct sk_buff * sfq_dequeue(struct Qdisc* sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; sfq_index a, old_a; @@ -369,7 +369,7 @@ static void sfq_perturbation(unsigned long arg) { struct Qdisc *sch = (struct Qdisc*)arg; - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); q->perturbation = net_random()&0x1F; q->perturb_timer.expires = jiffies + q->perturb_period; @@ -382,7 +382,7 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); struct tc_sfq_qopt *ctl = RTA_DATA(opt); if (opt->rta_len < RTA_LENGTH(sizeof(*ctl))) @@ -408,7 +408,7 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); int i; init_timer(&q->perturb_timer); @@ -440,13 +440,13 @@ static void sfq_destroy(struct Qdisc *sch) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); del_timer(&q->perturb_timer); } static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data; + struct sfq_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_sfq_qopt opt; diff -urN -X dontdiff linux-2.6/net/sched/sch_tbf.c qdisc-2.6/net/sched/sch_tbf.c --- linux-2.6/net/sched/sch_tbf.c 2004-06-30 13:42:31.000000000 -0700 +++ qdisc-2.6/net/sched/sch_tbf.c 2004-07-27 09:17:28.000000000 -0700 @@ -137,7 +137,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); int ret; if (skb->len > q->max_size) { @@ -163,7 +163,7 @@ static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -174,7 +174,7 @@ static unsigned int tbf_drop(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -194,7 +194,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; skb = q->qdisc->dequeue(q->qdisc); @@ -261,7 +261,7 @@ static void tbf_reset(struct Qdisc* sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); sch->q.qlen = 0; @@ -300,7 +300,7 @@ static int tbf_change(struct Qdisc* sch, struct rtattr *opt) { int err = -EINVAL; - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); struct rtattr *tb[TCA_TBF_PTAB]; struct tc_tbf_qopt *qopt; struct qdisc_rate_table *rtab = NULL; @@ -366,7 +366,7 @@ static int tbf_init(struct Qdisc* sch, struct rtattr *opt) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (opt == NULL) return -EINVAL; @@ -383,7 +383,7 @@ static void tbf_destroy(struct Qdisc *sch) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); del_timer(&q->wd_timer); @@ -398,7 +398,7 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct rtattr *rta; struct tc_tbf_qopt opt; @@ -427,7 +427,7 @@ static int tbf_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct tbf_sched_data *q = (struct tbf_sched_data*)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -441,7 +441,7 @@ static int tbf_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -457,7 +457,7 @@ static struct Qdisc *tbf_leaf(struct Qdisc *sch, unsigned long arg) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; + struct tbf_sched_data *q = qdisc_priv(sch); return q->qdisc; } diff -urN -X dontdiff linux-2.6/net/sched/sch_teql.c qdisc-2.6/net/sched/sch_teql.c --- linux-2.6/net/sched/sch_teql.c 2004-02-23 08:31:40.000000000 -0800 +++ qdisc-2.6/net/sched/sch_teql.c 2004-07-27 09:17:28.000000000 -0700 @@ -81,7 +81,7 @@ struct sk_buff_head q; }; -#define NEXT_SLAVE(q) (((struct teql_sched_data*)((q)->data))->next) +#define NEXT_SLAVE(q) (((struct teql_sched_data*)qdisc_priv(q))->next) #define FMASK (IFF_BROADCAST|IFF_POINTOPOINT|IFF_BROADCAST) @@ -91,7 +91,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct net_device *dev = sch->dev; - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_tail(&q->q, skb); if (q->q.qlen <= dev->tx_queue_len) { @@ -109,7 +109,7 @@ static int teql_requeue(struct sk_buff *skb, struct Qdisc* sch) { - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_head(&q->q, skb); return 0; @@ -118,7 +118,7 @@ static struct sk_buff * teql_dequeue(struct Qdisc* sch) { - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); struct sk_buff *skb; skb = __skb_dequeue(&dat->q); @@ -143,7 +143,7 @@ static void teql_reset(struct Qdisc* sch) { - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); skb_queue_purge(&dat->q); sch->q.qlen = 0; @@ -154,7 +154,7 @@ teql_destroy(struct Qdisc* sch) { struct Qdisc *q, *prev; - struct teql_sched_data *dat = (struct teql_sched_data *)sch->data; + struct teql_sched_data *dat = qdisc_priv(sch); struct teql_master *master = dat->m; if ((prev = master->slaves) != NULL) { @@ -184,7 +184,7 @@ { struct net_device *dev = sch->dev; struct teql_master *m = (struct teql_master*)sch->ops; - struct teql_sched_data *q = (struct teql_sched_data *)sch->data; + struct teql_sched_data *q = qdisc_priv(sch); if (dev->hard_header_len > m->dev->hard_header_len) return -EINVAL; @@ -229,7 +229,7 @@ static int __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev) { - struct teql_sched_data *q = (void*)dev->qdisc->data; + struct teql_sched_data *q = qdisc_priv(dev->qdisc); struct neighbour *mn = skb->dst->neighbour; struct neighbour *n = q->ncache; From davem@redhat.com Tue Aug 3 14:23:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 14:23:56 -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 i73LNnZX022936 for ; Tue, 3 Aug 2004 14:23:50 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i73LNZe1015894; Tue, 3 Aug 2004 17:23: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 i73LNZa02600; Tue, 3 Aug 2004 17:23:35 -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 i73LMnu5005174; Tue, 3 Aug 2004 17:22:52 -0400 Date: Tue, 3 Aug 2004 14:21:51 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: shemminger@osdl.org, hadi@znyx.com, netdev@oss.sgi.com Subject: Re: iproute2 and kernel headers Message-Id: <20040803142151.11d130ee.davem@redhat.com> In-Reply-To: <20040803.005542.104434029.yoshfuji@linux-ipv6.org> References: <20040802153805.487f832f@dell_ss3.pdx.osdl.net> <20040802160445.5ef3b251.davem@redhat.com> <20040803.005542.104434029.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 i73LNnZX022936 X-archive-position: 7475 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: 470 Lines: 18 On Tue, 03 Aug 2004 00:55:42 -0700 (PDT) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > In article <20040802160445.5ef3b251.davem@redhat.com> (at Mon, 2 Aug 2004 16:04:45 -0700), "David S. Miller" says: > > > > What headers really seem to change a lot? The obvious ones are: > > > > > > linux/pkt_sched.h > > > linux/tcp_diag.h > > > linux/xfrm.h > > > > I would add linux/rtnetlink.h > > Then, linux/snmp.h. Agreed. From davem@redhat.com Tue Aug 3 14:26:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 14:26:34 -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 i73LQS5X023300 for ; Tue, 3 Aug 2004 14:26:28 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i73LQDe1016594; Tue, 3 Aug 2004 17:26:14 -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 i73LQDa03479; Tue, 3 Aug 2004 17:26:13 -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 i73LPT47007340; Tue, 3 Aug 2004 17:25:30 -0400 Date: Tue, 3 Aug 2004 14:24:31 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] netem limit not returned correctly Message-Id: <20040803142431.0d5d669a.davem@redhat.com> In-Reply-To: <20040803131111.6ce2c36c@dell_ss3.pdx.osdl.net> References: <20040803131111.6ce2c36c@dell_ss3.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: 7476 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: 331 Lines: 11 On Tue, 3 Aug 2004 13:11:11 -0700 Stephen Hemminger wrote: > Minor leftover from earlier code. Netem scheduler is not reporting > correct limit (ie for 'tc qdisc ls') because it is returning devices limit > not it's own. > > Should apply to 2.4 as well (with fuzz) Applied to both trees, thanks Stephen. From herbert@gondor.apana.org.au Tue Aug 3 14:28:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 14:28: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 i73LSAJw023642 for ; Tue, 3 Aug 2004 14:28:11 -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 1Bs6pD-0002x6-00; Wed, 04 Aug 2004 07:27:59 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bs6p7-00005T-00; Wed, 04 Aug 2004 07:27:53 +1000 Date: Wed, 4 Aug 2004 07:27:53 +1000 To: Michael Richardson Cc: netdev , dev@lists.openswan.org Subject: Re: CONFIG_XFRM vs udp.c Message-ID: <20040803212753.GA319@gondor.apana.org.au> References: <22093.1091561579@marajade.sandelman.ottawa.on.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22093.1091561579@marajade.sandelman.ottawa.on.ca> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7477 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: 482 Lines: 13 On Tue, Aug 03, 2004 at 03:32:59PM -0400, Michael Richardson wrote: > > It is it intentional that this part of XFRM can not be a module? As it is XFRM cannot be built as a module at all. This is only one of the places in the IP stack that calls XFRM directly. 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 nakam@linux-ipv6.org Tue Aug 3 16:46:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 16:46:08 -0700 (PDT) Received: from localhost (opene-130-129-129-66.ietf60.ietf.org [130.129.129.66]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73Nk1Ui029681 for ; Tue, 3 Aug 2004 16:46:02 -0700 Received: from localhost ([127.0.0.1]) by localhost with smtp (Exim 3.36 #1 (Debian)) id 1Bs8ye-0000Nx-00; Tue, 03 Aug 2004 16:45:52 -0700 Date: Tue, 3 Aug 2004 16:45:52 -0700 From: Masahide Nakamura To: Stephen Hemminger Cc: netdev@oss.sgi.com, nakam@linux-ipv6.org Subject: [IPROUTE2] purging a directory Message-Id: <20040803164552.4b5cea87@localhost> X-Mailer: Sylpheed-Claws 0.9.12 (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: 7478 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nakam@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 425 Lines: 16 Hi Stephen, I found a ChangeSet which seems to be an erroneous importing in your iproute2 tree. (That is a patch I sent.) It causes directory problem; It creates new sub directory named "iproute2" which should be placed as parent one. It is unnecessary so please remove it or try below (it works fine for me in local testing): bk -r prs -hr+ -nd:ROOTKEY: | grep '|iproute2' | bk csetprune Thanks, -- Masahide NAKAMURA From nakam@linux-ipv6.org Tue Aug 3 16:46:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 16:46:17 -0700 (PDT) Received: from localhost (opene-130-129-129-66.ietf60.ietf.org [130.129.129.66]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i73Nk4n9029686 for ; Tue, 3 Aug 2004 16:46:04 -0700 Received: from localhost ([127.0.0.1]) by localhost with smtp (Exim 3.36 #1 (Debian)) id 1Bs8yS-0000Nu-00; Tue, 03 Aug 2004 16:45:40 -0700 Date: Tue, 3 Aug 2004 16:45:39 -0700 From: Masahide Nakamura To: Stephen Hemminger Cc: Herbert Xu , netdev@oss.sgi.com, nakam@linux-ipv6.org Subject: [PATCH][IPROUTE2] clean xfrm message format Message-Id: <20040803164539.41a0a975@localhost> X-Mailer: Sylpheed-Claws 0.9.12 (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: 7479 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nakam@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 28185 Lines: 1089 Hello, This is a patch for ip xfrm and against for the latest snapshot(iproute2-2.6.8-ss040730.tar.gz). Please apply it. Here is log: fix xfrm command line option and clean its output message format (commented by Herbert Xu ). * fix to specify algorithm key correctly and its output format. * omit some items when they are zero/default. * fix output can be one line. * use "enc/auth/comp" instead of "E/A/C" for altorithm type. * show SPI in hex. * remove "sel" and "upspec" from command. diff -uNr iproute2-2.6.8.orig/ip/ipxfrm.c iproute2-2.6.8/ip/ipxfrm.c --- iproute2-2.6.8.orig/ip/ipxfrm.c 2004-07-30 15:28:47.000000000 -0700 +++ iproute2-2.6.8/ip/ipxfrm.c 2004-08-02 17:27:43.000000000 -0700 @@ -52,6 +52,48 @@ exit(-1); } +struct typeent { + const char *t_name; + int t_type; +}; + +static const struct typeent algo_types[]= { + { "enc", XFRMA_ALG_CRYPT }, { "auth", XFRMA_ALG_AUTH }, + { "comp", XFRMA_ALG_COMP }, { NULL, -1 } +}; + +int xfrm_algotype_getbyname(char *name) +{ + int i; + + for (i = 0; ; i++) { + const struct typeent *t = &algo_types[i]; + if (!t->t_name || t->t_type == -1) + break; + + if (strcmp(t->t_name, name) == 0) + return t->t_type; + } + + return -1; +} + +const char *strxf_algotype(int type) +{ + int i; + + for (i = 0; ; i++) { + const struct typeent *t = &algo_types[i]; + if (!t->t_name || t->t_type == -1) + break; + + if (t->t_type == type) + return t->t_name; + } + + return NULL; +} + const char *strxf_flags(__u8 flags) { static char str[16]; @@ -84,7 +126,7 @@ strcpy(str, "unique"); break; default: - sprintf(str, "unknown-share(%d)", share); + sprintf(str, "%d", share); break; } @@ -114,9 +156,6 @@ { char abuf[256]; __u32 spi; - struct protoent *pp; - char pbuf[32]; - char *p; if (prefix) fprintf(fp, prefix); @@ -125,26 +164,20 @@ fprintf(fp, "src %s ", rt_addr_n2a(family, sizeof(*saddr), saddr, abuf, sizeof(abuf))); memset(abuf, '\0', sizeof(abuf)); - fprintf(fp, "dst %s\n", rt_addr_n2a(family, sizeof(id->daddr), - &id->daddr, abuf, sizeof(abuf))); + fprintf(fp, "dst %s", rt_addr_n2a(family, sizeof(id->daddr), + &id->daddr, abuf, sizeof(abuf))); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); fprintf(fp, "\t"); - pp = getprotobynumber(id->proto); - if (pp) - p = pp->p_name; - else { - sprintf(pbuf, "%d", id->proto); - p = pbuf; - } - fprintf(fp, "proto %s ", p); + fprintf(fp, "proto %s ", strxf_proto(id->proto)); spi = ntohl(id->spi); - fprintf(fp, "spi %u", spi); + fprintf(fp, "spi 0x%08x", spi); if (show_stats > 0) - fprintf(fp, "(0x%08x)", spi); + fprintf(fp, "(%u)", spi); fprintf(fp, " "); fprintf(fp, "reqid %u", reqid); @@ -152,7 +185,19 @@ fprintf(fp, "(0x%08x)", reqid); fprintf(fp, " "); - fprintf(fp, "mode %s\n", (mode ? "tunnel" : "transport")); + fprintf(fp, "mode "); + switch (mode) { + case 0: + fprintf(fp, "transport"); + break; + case 1: + fprintf(fp, "tunnel"); + break; + default: + fprintf(fp, "%u", mode); + break; + } + fprintf(fp, "%s", _SL_); } static const char *strxf_limit(__u64 limit) @@ -170,7 +215,8 @@ { if (prefix) fprintf(fp, prefix); - fprintf(fp, "stats:\n"); + fprintf(fp, "stats:"); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); @@ -178,25 +224,26 @@ fprintf(fp, "replay-window %d ", s->replay_window); fprintf(fp, "replay %d ", s->replay); fprintf(fp, "failed %d", s->integrity_failed); - fprintf(fp, "\n"); + fprintf(fp, "%s", _SL_); } static const char *strxf_time(__u64 time) { static char str[32]; - struct tm *tp; - time_t t; - if (time == 0) { - strcpy(str, "(undefined)"); - } else { - /* XXX: treat time in the same manner of xfrm_{user,state}.c */ + if (time == 0) + strcpy(str, "-"); + else { + time_t t; + struct tm *tp; + + /* XXX: treat time in the same manner of kernel's + * net/xfrm/xfrm_{user,state}.c + */ t = (long)time; tp = localtime(&t); - sprintf(str, "%04d/%02d/%02d %02d:%02d:%02d", - tp->tm_year + 1900, tp->tm_mon + 1, tp->tm_mday, - tp->tm_hour, tp->tm_min, tp->tm_sec); + strftime(str, sizeof(str), "%F %T", tp); } return str; @@ -209,7 +256,8 @@ if (cfg) { if (prefix) fprintf(fp, prefix); - fprintf(fp, "lifetime config:\n"); + fprintf(fp, "lifetime config:"); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); @@ -219,7 +267,8 @@ fprintf(fp, strxf_limit(cfg->soft_byte_limit)); fprintf(fp, "(bytes), hard "); fprintf(fp, strxf_limit(cfg->hard_byte_limit)); - fprintf(fp, "(bytes)\n"); + fprintf(fp, "(bytes)"); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); @@ -229,7 +278,8 @@ fprintf(fp, strxf_limit(cfg->soft_packet_limit)); fprintf(fp, "(packets), hard "); fprintf(fp, strxf_limit(cfg->hard_packet_limit)); - fprintf(fp, "(packets)\n"); + fprintf(fp, "(packets)"); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); @@ -239,7 +289,8 @@ fprintf(fp, "%llu", cfg->soft_add_expires_seconds); fprintf(fp, "(sec), hard "); fprintf(fp, "%llu", cfg->hard_add_expires_seconds); - fprintf(fp, "(sec)\n"); + fprintf(fp, "(sec)"); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); @@ -249,24 +300,28 @@ fprintf(fp, "%llu", cfg->soft_use_expires_seconds); fprintf(fp, "(sec), hard "); fprintf(fp, "%llu", cfg->hard_use_expires_seconds); - fprintf(fp, "(sec)\n"); + fprintf(fp, "(sec)"); + fprintf(fp, "%s", _SL_); } if (cur) { if (prefix) fprintf(fp, prefix); - fprintf(fp, "lifetime current:\n"); + fprintf(fp, "lifetime current:"); + fprintf(fp, "%s", _SL_); if (prefix) fprintf(fp, prefix); fprintf(fp, " "); fprintf(fp, "%llu(bytes), ", cur->bytes); - fprintf(fp, "%llu(packets)\n", cur->packets); + fprintf(fp, "%llu(packets)", cur->packets); + fprintf(fp, "%s", _SL_); + if (prefix) fprintf(fp, prefix); fprintf(fp, " "); fprintf(fp, "add %s ", strxf_time(cur->add_time)); fprintf(fp, "use %s", strxf_time(cur->use_time)); - fprintf(fp, "\n"); + fprintf(fp, "%s", _SL_); } } @@ -291,18 +346,16 @@ sel->prefixlen_s); memset(abuf, '\0', sizeof(abuf)); - fprintf(fp, "dst %s/%d", rt_addr_n2a(f, sizeof(sel->daddr), + fprintf(fp, "dst %s/%d ", rt_addr_n2a(f, sizeof(sel->daddr), &sel->daddr, abuf, sizeof(abuf)), sel->prefixlen_d); - fprintf(fp, "\n"); - - if (prefix) - fprintf(fp, prefix); - fprintf(fp, "\t"); - - fprintf(fp, "upspec proto %u ", sel->proto); - fprintf(fp, "sport %u dport %u ", sel->sport, sel->dport); + if (sel->proto) + fprintf(fp, "proto %s ", strxf_proto(sel->proto)); + if (sel->sport) + fprintf(fp, "sport %u ", ntohs(sel->sport)); + if (sel->dport) + fprintf(fp, "dport %u ", ntohs(sel->dport)); if (sel->ifindex > 0) { char buf[IF_NAMESIZE]; @@ -314,10 +367,11 @@ if (show_stats > 0) fprintf(fp, "uid %u", sel->user); - fprintf(fp, "\n"); + + fprintf(fp, "%s", _SL_); } -static void xfrm_algo_print(struct xfrm_algo *algo, FILE *fp, +static void xfrm_algo_print(struct xfrm_algo *algo, int type, FILE *fp, const char *prefix) { int len; @@ -326,16 +380,18 @@ if (prefix) fprintf(fp, prefix); - fprintf(fp, "%s", algo->alg_name); + fprintf(fp, "%s ", strxf_algotype(type)); + fprintf(fp, "%s ", algo->alg_name); + fprintf(fp, "0x"); len = algo->alg_key_len / 8; - for (i = 0; i < len; i ++) { - if (i % 4 == 0) - fprintf(fp, " "); - fprintf(fp, "%x", algo->alg_key[i]); - } + for (i = 0; i < len; i ++) + fprintf(fp, "%.2x", (unsigned char)algo->alg_key[i]); - fprintf(fp, "\n"); + if (show_stats > 0) + fprintf(fp, " (%d bits)", algo->alg_key_len); + + fprintf(fp, "%s", _SL_); } static const char *strxf_mask(__u32 mask) @@ -384,30 +440,36 @@ xfrm_id_info_print(&tmpl->saddr, &tmpl->id, tmpl->mode, tmpl->reqid, family, fp, prefix); - fprintf(fp, prefix); + if (prefix) + fprintf(fp, prefix); fprintf(fp, "\t"); - fprintf(fp, "level "); switch (tmpl->optional) { case 0: - fprintf(fp, "required"); + if (show_stats > 0) + fprintf(fp, "level required "); break; case 1: - fprintf(fp, "use"); + fprintf(fp, "level use "); break; default: - fprintf(fp, "%d", tmpl->optional); + fprintf(fp, "level %d ", tmpl->optional); break; } - fprintf(fp, " "); if (show_stats > 0) { fprintf(fp, "share %s ", strxf_share(tmpl->share)); fprintf(fp, "algo-mask:"); - fprintf(fp, "E=%s, ", strxf_mask(tmpl->ealgos)); - fprintf(fp, "A=%s, ", strxf_mask(tmpl->aalgos)); - fprintf(fp, "C=%s", strxf_mask(tmpl->calgos)); + fprintf(fp, "%s=%s, ", + strxf_algotype(XFRMA_ALG_CRYPT), + strxf_mask(tmpl->ealgos)); + fprintf(fp, "%s=%s, ", + strxf_algotype(XFRMA_ALG_AUTH), + strxf_mask(tmpl->aalgos)); + fprintf(fp, "%s=%s", + strxf_algotype(XFRMA_ALG_COMP), + strxf_mask(tmpl->calgos)); } - fprintf(fp, "\n"); + fprintf(fp, "%s", _SL_); } } @@ -422,25 +484,17 @@ switch (type) { case XFRMA_ALG_CRYPT: - if (prefix) - fprintf(fp, prefix); - xfrm_algo_print((struct xfrm_algo *)data, fp, "algo E "); - break; case XFRMA_ALG_AUTH: - if (prefix) - fprintf(fp, prefix); - xfrm_algo_print((struct xfrm_algo *)data, fp, "algo A "); - break; case XFRMA_ALG_COMP: - if (prefix) - fprintf(fp, prefix); - xfrm_algo_print((struct xfrm_algo *)data, fp, "algo C "); + xfrm_algo_print((struct xfrm_algo *)data, type, fp, + prefix); break; case XFRMA_ENCAP: if (prefix) fprintf(fp, prefix); /* XXX */ - fprintf(fp, "encap: (not implemented yet!)\n"); + fprintf(fp, "encap (not implemented yet!)"); + fprintf(fp, "%s", _SL_); break; case XFRMA_TMPL: { @@ -454,14 +508,15 @@ default: if (prefix) fprintf(fp, prefix); - fprintf(fp, "unknown rta_type: %u\n", type); + fprintf(fp, "%u (unknown rta_type)", type); + fprintf(fp, "%s", _SL_); break; } } } int xfrm_id_parse(xfrm_address_t *saddr, struct xfrm_id *id, __u16 *family, - int *argcp, char ***argvp) + int loose, int *argcp, char ***argvp) { int argc = *argcp; char **argv = *argvp; @@ -509,7 +564,7 @@ proto = pp->p_proto; else { if (get_u8(&proto, *argv, 0)) - invarg("\"PROTO\" is invalid", *argv); + invarg("\"XFRM_PROTO\" is invalid", *argv); } switch (proto) { @@ -519,7 +574,7 @@ id->proto = proto; break; default: - invarg("\"PROTO\" is unsuppored proto", *argv); + invarg("\"XFRM_PROTO\" is unsuppored proto", *argv); } filter.id_proto_mask = XFRM_FILTER_MASK_FULL; @@ -548,9 +603,9 @@ if (src.family && dst.family && (src.family != dst.family)) invarg("the same address family is required between \"SADDR\" and \"DADDR\"", *argv); - if (proto == 0) - missarg("PROTO"); + if (loose == 0 && proto == 0) + missarg("PROTO"); if (argc == *argcp) missarg("ID"); @@ -598,10 +653,11 @@ { int argc = *argcp; char **argv = *argvp; - __u8 upspec; while (1) { if (strcmp(*argv, "proto") == 0) { + __u8 upspec; + NEXT_ARG(); if (strcmp(*argv, "any") == 0) @@ -613,7 +669,7 @@ upspec = pp->p_proto; else { if (get_u8(&upspec, *argv, 0)) - invarg("\"UPSPEC\" is invalid", *argv); + invarg("\"PROTO\" is invalid", *argv); } } sel->proto = upspec; @@ -666,6 +722,7 @@ char **argv = *argvp; inet_prefix dst; inet_prefix src; + char *upspecp = NULL; memset(&dst, 0, sizeof(dst)); memset(&src, 0, sizeof(src)); @@ -697,11 +754,6 @@ filter.sel_dst_mask = dst.bitlen; - } else if (strcmp(*argv, "upspec") == 0) { - NEXT_ARG(); - - xfrm_selector_upspec_parse(sel, &argc, &argv); - } else if (strcmp(*argv, "dev") == 0) { int ifindex; @@ -719,8 +771,13 @@ filter.sel_dev_mask = XFRM_FILTER_MASK_FULL; } else { - PREV_ARG(); /* back track */ - break; + if (upspecp) { + PREV_ARG(); /* back track */ + break; + } else { + upspecp = *argv; + xfrm_selector_upspec_parse(sel, &argc, &argv); + } } if (!NEXT_ARG_OK()) diff -uNr iproute2-2.6.8.orig/ip/xfrm.h iproute2-2.6.8/ip/xfrm.h --- iproute2-2.6.8.orig/ip/xfrm.h 2004-07-30 15:28:47.000000000 -0700 +++ iproute2-2.6.8/ip/xfrm.h 2004-08-02 17:27:43.000000000 -0700 @@ -78,6 +78,8 @@ int do_xfrm_state(int argc, char **argv); int do_xfrm_policy(int argc, char **argv); +int xfrm_algotype_getbyname(char *name); +const char *strxf_algotype(int type); const char *strxf_flags(__u8 flags); const char *strxf_share(__u8 share); const char *strxf_proto(__u8 proto); @@ -93,7 +95,7 @@ void xfrm_xfrma_print(struct rtattr *tb[], int ntb, __u16 family, FILE *fp, const char *prefix); int xfrm_id_parse(xfrm_address_t *saddr, struct xfrm_id *id, __u16 *family, - int *argcp, char ***argvp); + int loose, int *argcp, char ***argvp); int xfrm_mode_parse(__u8 *mode, int *argcp, char ***argvp); int xfrm_reqid_parse(__u32 *reqid, int *argcp, char ***argvp); int xfrm_selector_parse(struct xfrm_selector *sel, int *argcp, char ***argvp); diff -uNr iproute2-2.6.8.orig/ip/xfrm_policy.c iproute2-2.6.8/ip/xfrm_policy.c --- iproute2-2.6.8.orig/ip/xfrm_policy.c 2004-07-30 15:28:47.000000000 -0700 +++ iproute2-2.6.8/ip/xfrm_policy.c 2004-08-02 17:27:43.000000000 -0700 @@ -53,14 +53,14 @@ static void usage(void) { - fprintf(stderr, "Usage: ip xfrm policy { add | update } dir DIR sel SELECTOR [ index INDEX ] \n"); + fprintf(stderr, "Usage: ip xfrm policy { add | update } dir DIR SELECTOR [ index INDEX ] \n"); fprintf(stderr, " [ action ACTION ] [ priority PRIORITY ] [ LIMIT-LIST ] [ TMPL-LIST ]\n"); - fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ sel SELECTOR | index INDEX ]\n"); - fprintf(stderr, "Usage: ip xfrm policy { flush | list } [ dir DIR ] [ sel SELECTOR ]\n"); + fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ]\n"); + fprintf(stderr, "Usage: ip xfrm policy { flush | list } [ dir DIR ] [ SELECTOR ]\n"); fprintf(stderr, " [ index INDEX ] [ action ACTION ] [ priority PRIORITY ]\n"); fprintf(stderr, "DIR := [ in | out | fwd ]\n"); - fprintf(stderr, "SELECTOR := src ADDR[/PLEN] dst ADDR[/PLEN] [ upspec UPSPEC ] [ dev DEV ]\n"); + fprintf(stderr, "SELECTOR := src ADDR[/PLEN] dst ADDR[/PLEN] [ UPSPEC ] [ dev DEV ]\n"); fprintf(stderr, "UPSPEC := proto PROTO [ sport PORT ] [ dport PORT ]\n"); @@ -134,7 +134,7 @@ else if (strcmp(*argv, "use") == 0) tmpl->optional = 1; else - invarg("\"level\" value is invalid\n", *argv); + invarg("\"LEVEL\" is invalid\n", *argv); } else { if (idp) { @@ -143,7 +143,7 @@ } idp = *argv; xfrm_id_parse(&tmpl->saddr, &tmpl->id, &tmpl->family, - &argc, &argv); + 0, &argc, &argv); if (preferred_family == AF_UNSPEC) preferred_family = tmpl->family; } @@ -171,6 +171,7 @@ char buf[RTA_BUF_SIZE]; } req; char *dirp = NULL; + char *selp = NULL; char tmpls_buf[XFRM_TMPLS_BUF_SIZE]; int tmpls_len = 0; @@ -198,12 +199,6 @@ filter.dir_mask = XFRM_FILTER_MASK_FULL; - } else if (strcmp(*argv, "sel") == 0) { - NEXT_ARG(); - xfrm_selector_parse(&req.xpinfo.sel, &argc, &argv); - if (preferred_family == AF_UNSPEC) - preferred_family = req.xpinfo.sel.family; - } else if (strcmp(*argv, "index") == 0) { NEXT_ARG(); if (get_u32(&req.xpinfo.index, *argv, 0)) @@ -250,8 +245,15 @@ xfrm_tmpl_parse(tmpl, &argc, &argv); tmpls_len += sizeof(*tmpl); - } else - invarg("unknown", *argv); + } else { + if (selp) + duparg("unknown", *argv); + selp = *argv; + + xfrm_selector_parse(&req.xpinfo.sel, &argc, &argv); + if (preferred_family == AF_UNSPEC) + preferred_family = req.xpinfo.sel.family; + } argc--; argv++; } @@ -362,7 +364,6 @@ if (n->nlmsg_type == XFRM_MSG_DELPOLICY) fprintf(fp, "Deleted "); - fprintf(fp, "sel "); xfrm_selector_print(&xpinfo->sel, preferred_family, fp, NULL); fprintf(fp, "\t"); @@ -383,33 +384,36 @@ } fprintf(fp, " "); - fprintf(fp, "action "); switch (xpinfo->action) { case XFRM_POLICY_ALLOW: - fprintf(fp, "allow"); + if (show_stats > 0) + fprintf(fp, "action allow "); break; case XFRM_POLICY_BLOCK: - fprintf(fp, "block"); + fprintf(fp, "action block "); break; default: - fprintf(fp, "%d", xpinfo->action); + fprintf(fp, "action %d ", xpinfo->action); break; } - fprintf(fp, " "); - fprintf(fp, "index %u ", xpinfo->index); + if (show_stats) + fprintf(fp, "index %u ", xpinfo->index); fprintf(fp, "priority %u ", xpinfo->priority); if (show_stats > 0) { fprintf(fp, "share %s ", strxf_share(xpinfo->share)); fprintf(fp, "flags 0x%s", strxf_flags(xpinfo->flags)); } - fprintf(fp, "\n"); + fprintf(fp, "%s", _SL_); if (show_stats > 0) xfrm_lifetime_print(&xpinfo->lft, &xpinfo->curlft, fp, "\t"); xfrm_xfrma_print(tb, ntb, xpinfo->sel.family, fp, "\t"); + if (oneline) + fprintf(fp, "\n"); + return 0; } @@ -440,16 +444,6 @@ NEXT_ARG(); xfrm_policy_dir_parse(&req.xpid.dir, &argc, &argv); - } else if (strcmp(*argv, "sel") == 0) { - if (selp) - duparg("sel", *argv); - selp = *argv; - - NEXT_ARG(); - xfrm_selector_parse(&req.xpid.sel, &argc, &argv); - if (preferred_family == AF_UNSPEC) - preferred_family = req.xpid.sel.family; - } else if (strcmp(*argv, "index") == 0) { if (indexp) duparg("index", *argv); @@ -459,8 +453,16 @@ if (get_u32(&req.xpid.index, *argv, 0)) invarg("\"INDEX\" is invalid", *argv); - } else - invarg("unknown", *argv); + } else { + if (selp) + invarg("unknown", *argv); + selp = *argv; + + xfrm_selector_parse(&req.xpid.sel, &argc, &argv); + if (preferred_family == AF_UNSPEC) + preferred_family = req.xpid.sel.family; + + } argc--; argv++; } @@ -564,6 +566,7 @@ static int xfrm_policy_list_or_flush(int argc, char **argv, int flush) { + char *selp = NULL; struct rtnl_handle rth; if (argc > 0) @@ -577,12 +580,6 @@ filter.dir_mask = XFRM_FILTER_MASK_FULL; - } else if (strcmp(*argv, "sel") == 0) { - NEXT_ARG(); - xfrm_selector_parse(&filter.xpinfo.sel, &argc, &argv); - if (preferred_family == AF_UNSPEC) - preferred_family = filter.xpinfo.sel.family; - } else if (strcmp(*argv, "index") == 0) { NEXT_ARG(); if (get_u32(&filter.xpinfo.index, *argv, 0)) @@ -597,7 +594,7 @@ else if (strcmp(*argv, "block") == 0) filter.xpinfo.action = XFRM_POLICY_BLOCK; else - invarg("\"action\" value is invalid\n", *argv); + invarg("\"ACTION\" is invalid\n", *argv); filter.action_mask = XFRM_FILTER_MASK_FULL; @@ -608,8 +605,16 @@ filter.priority_mask = XFRM_FILTER_MASK_FULL; - } else - invarg("unknown", *argv); + } else { + if (selp) + invarg("unknown", *argv); + selp = *argv; + + xfrm_selector_parse(&filter.xpinfo.sel, &argc, &argv); + if (preferred_family == AF_UNSPEC) + preferred_family = filter.xpinfo.sel.family; + + } argc--; argv++; } diff -uNr iproute2-2.6.8.orig/ip/xfrm_state.c iproute2-2.6.8/ip/xfrm_state.c --- iproute2-2.6.8.orig/ip/xfrm_state.c 2004-07-30 15:28:47.000000000 -0700 +++ iproute2-2.6.8/ip/xfrm_state.c 2004-08-02 17:27:43.000000000 -0700 @@ -67,8 +67,8 @@ fprintf(stderr, "XFRM_PROTO := [ "); fprintf(stderr, "%s | ", strxf_proto(IPPROTO_ESP)); fprintf(stderr, "%s | ", strxf_proto(IPPROTO_AH)); - fprintf(stderr, "%s", strxf_proto(IPPROTO_COMP)); - fprintf(stderr, " ]\n"); + fprintf(stderr, "%s ", strxf_proto(IPPROTO_COMP)); + fprintf(stderr, "]\n"); //fprintf(stderr, "SPI - security parameter index(default=0)\n"); @@ -78,9 +78,14 @@ fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] [ flag FLAG ]\n"); fprintf(stderr, "FLAG := [ noecn ]\n"); - fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] | [ algo ALGO ]\n"); + fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] | [ ALGO ]\n"); fprintf(stderr, "ALGO := ALGO_TYPE ALGO_NAME ALGO_KEY\n"); - fprintf(stderr, "ALGO_TYPE := [ E | A | C ]\n"); + fprintf(stderr, "ALGO_TYPE := [ "); + fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_CRYPT)); + fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_AUTH)); + fprintf(stderr, "%s ", strxf_algotype(XFRMA_ALG_COMP)); + fprintf(stderr, "]\n"); + //fprintf(stderr, "ALGO_NAME - algorithm name\n"); //fprintf(stderr, "ALGO_KEY - algorithm key\n"); @@ -99,6 +104,7 @@ char *name, char *key, int max) { int len; + int slen = strlen(key); #if 1 /* XXX: verifying both name and key is required! */ @@ -107,30 +113,37 @@ strncpy(alg->alg_name, name, sizeof(alg->alg_name)); - if (strncmp(key, "0x", 2) == 0) { + if (slen > 2 && strncmp(key, "0x", 2) == 0) { /* * XXX: fix me!! */ - __u64 val = 0; - char *p = (char *)&val; + union { + __u64 x; + unsigned char p[8]; + } val; + + memset(&val, 0, sizeof(val)); - if (get_u64(&val, key, 16)) + if (get_u64(&val.x, key, 16)) invarg("\"ALGOKEY\" is invalid", key); - len = (strlen(key) - 2) / 2; + len = (slen - 2) / 2; if (len > sizeof(val)) invarg("\"ALGOKEY\" is invalid: too large", key); if (len > 0) { - int index = sizeof(val) - len; + int i; + if (len > max) invarg("\"ALGOKEY\" makes buffer overflow\n", key); - - memcpy(alg->alg_key, &p[index], len); + for (i = sizeof(val.p) - 1; i >= 0; i--) { + int j = sizeof(val.p) - 1 - i; + alg->alg_key[j] = val.p[i]; + } } } else { - len = strlen(key); + len = slen; if (len > 0) { if (len > max) invarg("\"ALGOKEY\" makes buffer overflow\n", key); @@ -197,56 +210,7 @@ req.xsinfo.lft.hard_packet_limit = XFRM_INF; while (argc > 0) { - if (strcmp(*argv, "algo") == 0) { - struct { - struct xfrm_algo alg; - char buf[XFRM_ALGO_KEY_BUF_SIZE]; - } alg; - int len; - enum xfrm_attr_type_t type; - char *name; - char *key; - - NEXT_ARG(); - - if (strcmp(*argv, "E") == 0) { - if (ealgop) - duparg("ALGOTYPE", *argv); - ealgop = *argv; - type = XFRMA_ALG_CRYPT; - } else if (strcmp(*argv, "A") == 0) { - if (aalgop) - duparg("ALGOTYPE", *argv); - aalgop = *argv; - type = XFRMA_ALG_AUTH; - - } else if (strcmp(*argv, "C") == 0) { - if (calgop) - duparg("ALGOTYPE", *argv); - calgop = *argv; - type = XFRMA_ALG_COMP; - } else - invarg("\"ALGOTYPE\" is invalid\n", *argv); - - if (!NEXT_ARG_OK()) - missarg("ALGONAME"); - NEXT_ARG(); - name = *argv; - - if (!NEXT_ARG_OK()) - missarg("ALGOKEY"); - NEXT_ARG(); - key = *argv; - - memset(&alg, 0, sizeof(alg)); - - xfrm_algo_parse((void *)&alg, type, name, key, sizeof(alg.buf)); - len = sizeof(struct xfrm_algo) + alg.alg.alg_key_len; - - addattr_l(&req.n, sizeof(req.buf), type, - (void *)&alg, len); - - } else if (strcmp(*argv, "mode") == 0) { + if (strcmp(*argv, "mode") == 0) { NEXT_ARG(); xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv); } else if (strcmp(*argv, "reqid") == 0) { @@ -258,20 +222,79 @@ } else if (strcmp(*argv, "sel") == 0) { NEXT_ARG(); xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv); - } else if (strcmp(*argv, "limit") == 0) { NEXT_ARG(); xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv); } else { - if (idp) - invarg("unknown", *argv); - idp = *argv; + /* try to assume ALGO */ + int type = xfrm_algotype_getbyname(*argv); + switch (type) { + case XFRMA_ALG_CRYPT: + case XFRMA_ALG_AUTH: + case XFRMA_ALG_COMP: + { + /* ALGO */ + struct { + struct xfrm_algo alg; + char buf[XFRM_ALGO_KEY_BUF_SIZE]; + } alg; + int len; + char *name; + char *key; + + switch (type) { + case XFRMA_ALG_CRYPT: + if (ealgop) + duparg("ALGOTYPE", *argv); + ealgop = *argv; + break; + case XFRMA_ALG_AUTH: + if (aalgop) + duparg("ALGOTYPE", *argv); + aalgop = *argv; + break; + case XFRMA_ALG_COMP: + if (calgop) + duparg("ALGOTYPE", *argv); + calgop = *argv; + break; + default: + /* not reached */ + invarg("\"ALGOTYPE\" is invalid\n", *argv); + } + + if (!NEXT_ARG_OK()) + missarg("ALGONAME"); + NEXT_ARG(); + name = *argv; + + if (!NEXT_ARG_OK()) + missarg("ALGOKEY"); + NEXT_ARG(); + key = *argv; + + memset(&alg, 0, sizeof(alg)); + + xfrm_algo_parse((void *)&alg, type, name, key, + sizeof(alg.buf)); + len = sizeof(struct xfrm_algo) + alg.alg.alg_key_len; - /* ID */ - xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id, - &req.xsinfo.family, &argc, &argv); - if (preferred_family == AF_UNSPEC) - preferred_family = req.xsinfo.family; + addattr_l(&req.n, sizeof(req.buf), type, + (void *)&alg, len); + break; + } + default: + /* try to assume ID */ + if (idp) + invarg("unknown", *argv); + idp = *argv; + + /* ID */ + xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id, + &req.xsinfo.family, 0, &argc, &argv); + if (preferred_family == AF_UNSPEC) + preferred_family = req.xsinfo.family; + } } argc--; argv++; } @@ -285,14 +308,14 @@ if (req.xsinfo.id.proto != IPPROTO_ESP && req.xsinfo.id.proto != IPPROTO_AH && req.xsinfo.id.proto != IPPROTO_COMP) { - fprintf(stderr, "\"ALGO\" is invalid with proto=%d\n", req.xsinfo.id.proto); + fprintf(stderr, "\"ALGO\" is invalid with proto=%s\n", strxf_proto(req.xsinfo.id.proto)); exit(1); } } else { if (req.xsinfo.id.proto == IPPROTO_ESP || req.xsinfo.id.proto == IPPROTO_AH || req.xsinfo.id.proto == IPPROTO_COMP) { - fprintf(stderr, "\"ALGO\" is required with proto=%d\n", req.xsinfo.id.proto); + fprintf(stderr, "\"ALGO\" is required with proto=%s\n", strxf_proto(req.xsinfo.id.proto)); exit (1); } } @@ -339,6 +362,15 @@ return 1; } +static int xfrm_selector_iszero(struct xfrm_selector *s) +{ + struct xfrm_selector s0; + + memset(&s0, 0, sizeof(s0)); + + return (memcmp(&s0, s, sizeof(s0)) == 0); +} + int xfrm_state_print(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) { FILE *fp = (FILE*)arg; @@ -373,33 +405,35 @@ xsinfo->reqid, xsinfo->family, fp, NULL); fprintf(fp, "\t"); - if (show_stats > 0) { + fprintf(fp, "replay-window %d ", xsinfo->replay_window); + if (show_stats > 0) fprintf(fp, "seq 0x%08u ", xsinfo->seq); - fprintf(fp, "replay-window %d ", xsinfo->replay_window); - } - fprintf(fp, "flag 0x%s", strxf_flags(xsinfo->flags)); - if (show_stats > 0) { - if (xsinfo->flags) { - fprintf(fp, "("); - if (xsinfo->flags & XFRM_STATE_NOECN) - fprintf(fp, "noecn"); - fprintf(fp, ")"); + if (xsinfo->flags) { + fprintf(fp, "flag 0x%s", strxf_flags(xsinfo->flags)); + if (show_stats > 0) { + if (xsinfo->flags) { + fprintf(fp, "("); + if (xsinfo->flags & XFRM_STATE_NOECN) + fprintf(fp, "noecn"); + fprintf(fp, ")"); + } } } - fprintf(fp, "\n"); + fprintf(fp, "%s", _SL_); xfrm_xfrma_print(tb, ntb, xsinfo->family, fp, "\t"); - if (show_stats > 0) { - fprintf(fp, "\tsel\n"); - xfrm_selector_print(&xsinfo->sel, xsinfo->family, fp, "\t "); - } + if (!xfrm_selector_iszero(&xsinfo->sel)) + xfrm_selector_print(&xsinfo->sel, xsinfo->family, fp, "\tsel "); if (show_stats > 0) { xfrm_lifetime_print(&xsinfo->lft, &xsinfo->curlft, fp, "\t"); xfrm_stats_print(&xsinfo->stats, fp, "\t"); } + if (oneline) + fprintf(fp, "\n"); + return 0; } @@ -434,7 +468,7 @@ /* ID */ memset(&id, 0, sizeof(id)); - xfrm_id_parse(&ignore_saddr, &id, &req.xsid.family, + xfrm_id_parse(&ignore_saddr, &id, &req.xsid.family, 0, &argc, &argv); memcpy(&req.xsid.daddr, &id.daddr, sizeof(req.xsid.daddr)); @@ -557,9 +591,8 @@ idp = *argv; /* ID */ - xfrm_id_parse(&filter.xsinfo.saddr, - &filter.xsinfo.id, - &filter.xsinfo.family, &argc, &argv); + xfrm_id_parse(&filter.xsinfo.saddr, &filter.xsinfo.id, + &filter.xsinfo.family, 1, &argc, &argv); if (preferred_family == AF_UNSPEC) preferred_family = filter.xsinfo.family; } -- Masahide NAKAMURA From pp@ee.oulu.fi Tue Aug 3 17:31:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 17:31:26 -0700 (PDT) Received: from ee.oulu.fi (ee.oulu.fi [130.231.61.23]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i740VIDW030935 for ; Tue, 3 Aug 2004 17:31:19 -0700 Received: from tk28.oulu.fi (tk28 [130.231.48.68]) by ee.oulu.fi (8.12.11/8.12.11) with ESMTP id i740VEkq006790; Wed, 4 Aug 2004 03:31:14 +0300 (EEST) Received: (from pp@localhost) by tk28.oulu.fi (8.13.0/8.13.0/Submit) id i740V8uc011237; Wed, 4 Aug 2004 03:31:08 +0300 (EEST) Date: Wed, 4 Aug 2004 03:31:08 +0300 From: Pekka Pietikainen To: jgarzik@pobox.com Cc: Florian Schirmer , linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support) Message-ID: <20040804003108.GA10445@ee.oulu.fi> References: <200407232335.37809.jolt@tuxbox.org> <20040726141128.GA5435@ee.oulu.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20040726141128.GA5435@ee.oulu.fi> User-Agent: Mutt/1.4.2i X-archive-position: 7480 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pp@ee.oulu.fi Precedence: bulk X-list: netdev Content-Length: 5022 Lines: 154 On Mon, Jul 26, 2004 at 05:11:28PM +0300, Pekka Pietikainen wrote: > Looks good (well, won't be able to test that it doesn't break 4401 until > next week :-) ). The 47xx patch didn't break anything for 4401 so I'm all for merging. > As for the 1GB patch going in, I sure hope they would (perhaps in a cleaned > up state, it might be more pretty if I just unconditionally enabled the > workaround and had a b44_alloc_skb() that tries a normal dev_alloc_skb and if > that gives something over 1GB retry with GFP_DMA... I just did that, apart from possibly reducing the default ring sizes to reduce GFP_DMA usage from the ~= 1.6MB worst-case it is now, it's just about as good as it'll ever get. Would be nice to get this merged, it seems to be hitting quite a few people out there. Signed-off-by: Pekka Pietikainen --- linux-2.6.7-1.503/drivers/net/b44.h.bb 2004-08-04 00:34:37.850485784 +0300 +++ linux-2.6.7-1.503/drivers/net/b44.h 2004-08-04 00:34:48.711834608 +0300 @@ -493,6 +493,7 @@ struct ring_info *rx_buffers; struct ring_info *tx_buffers; + unsigned char *tx_bufs; u32 dma_offset; u32 flags; @@ -525,7 +526,7 @@ 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; --- linux-2.6.7-1.503/drivers/net/b44.c.bb 2004-08-04 00:34:30.653579880 +0300 +++ linux-2.6.7-1.503/drivers/net/b44.c 2004-08-04 02:54:12.756306576 +0300 @@ -27,8 +27,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 +57,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 +68,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) @@ -631,10 +633,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 *) @@ -912,6 +934,13 @@ 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); + skb->data=bp->tx_bufs+entry*TX_PKT_BUF_SZ; + mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE); + } bp->tx_buffers[entry].skb = skb; pci_unmap_addr_set(&bp->tx_buffers[entry], mapping, mapping); @@ -1059,6 +1088,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; + } } /* @@ -1081,6 +1115,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) @@ -1746,12 +1786,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); From jt@bougret.hpl.hp.com Tue Aug 3 17:40:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 17:40:53 -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 i740ehZx031365 for ; Tue, 3 Aug 2004 17:40:43 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id E05161C004CB; Tue, 3 Aug 2004 17:40:35 -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 RAA09864; Tue, 3 Aug 2004 17:42:05 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1Bs9pb-00073u-00; Tue, 03 Aug 2004 17:40:35 -0700 Date: Tue, 3 Aug 2004 17:40:35 -0700 To: Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: [PATCH 2.6] Wireless drivers update for WE-17 Message-ID: <20040804004035.GA26633@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: 7481 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: 10936 Lines: 283 Hi Jeff, This patch complement the main WE-17 patch I just sent you. It updates a few driver to take advantage of WE-17. You should queue it along with the other patch. o Aironet driver : o iwspy data can be shared between eth0 and wifi0 if needed o allow arbitrarily large scan results (no longer limited) o export wireless event capabilities o Wavelan drivers : o export wireless event capabilities Have fun... Jean ------------------------------------------------------------- diff -u -p -r linux/drivers/net/wireless.we16/airo.c linux/drivers/net/wireless/airo.c --- linux/drivers/net/wireless.we16/airo.c Mon Aug 2 14:35:54 2004 +++ linux/drivers/net/wireless/airo.c Tue Aug 3 11:33:26 2004 @@ -1188,6 +1188,7 @@ struct airo_info { struct iw_statistics wstats; // wireless stats unsigned long scan_timestamp; /* Time started to scan */ struct iw_spy_data spy_data; + struct iw_public_data wireless_data; #endif /* WIRELESS_EXT */ #ifdef MICSUPPORT /* MIC stuff */ @@ -2626,8 +2627,7 @@ static void wifi_setup(struct net_device dev->set_mac_address = &airo_set_mac_address; dev->do_ioctl = &airo_ioctl; #ifdef WIRELESS_EXT - dev->get_wireless_stats = airo_get_wireless_stats; - dev->wireless_handlers = (struct iw_handler_def *)&airo_handler_def; + dev->wireless_handlers = &airo_handler_def; #endif /* WIRELESS_EXT */ dev->change_mtu = &airo_change_mtu; dev->open = &airo_open; @@ -2654,6 +2654,9 @@ static struct net_device *init_wifidev(s dev->priv = ethdev->priv; dev->irq = ethdev->irq; dev->base_addr = ethdev->base_addr; +#ifdef WIRELESS_EXT + dev->wireless_data = ethdev->wireless_data; +#endif /* WIRELESS_EXT */ memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); err = register_netdev(dev); if (err<0) { @@ -2733,8 +2736,9 @@ struct net_device *_init_airo_card( unsi dev->set_mac_address = &airo_set_mac_address; dev->do_ioctl = &airo_ioctl; #ifdef WIRELESS_EXT - dev->get_wireless_stats = airo_get_wireless_stats; - dev->wireless_handlers = (struct iw_handler_def *)&airo_handler_def; + dev->wireless_handlers = &airo_handler_def; + ai->wireless_data.spy_data = &ai->spy_data; + dev->wireless_data = &ai->wireless_data; #endif /* WIRELESS_EXT */ dev->change_mtu = &airo_change_mtu; dev->open = &airo_open; @@ -3217,7 +3221,7 @@ badrx: goto exitrx; } } -#ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */ +#ifdef WIRELESS_SPY if (apriv->spy_data.spy_number > 0) { char *sa; struct iw_quality wstats; @@ -3237,7 +3241,7 @@ badrx: /* Update spy records */ wireless_spy_update(dev, sa, &wstats); } -#endif /* IW_WIRELESS_SPY */ +#endif /* WIRELESS_SPY */ OUT4500( apriv, EVACK, EV_RX); if (test_bit(FLAG_802_11, &apriv->flags)) { @@ -3467,7 +3471,7 @@ badmic: #else memcpy(buffer, ai->rxfids[0].virtual_host_addr, len); #endif -#ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */ +#ifdef WIRELESS_SPY if (ai->spy_data.spy_number > 0) { char *sa; struct iw_quality wstats; @@ -3479,7 +3483,7 @@ badmic: /* Update spy records */ wireless_spy_update(ai->dev, sa, &wstats); } -#endif /* IW_WIRELESS_SPY */ +#endif /* WIRELESS_SPY */ skb->dev = ai->dev; skb->ip_summed = CHECKSUM_NONE; @@ -6505,6 +6509,13 @@ static int airo_get_range(struct net_dev range->avg_qual.level = 176; /* -80 dBm */ range->avg_qual.noise = 0; + /* Event capability (kernel + driver) */ + range->event_capa[0] = (IW_EVENT_CAPA_K_0 | + IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | + IW_EVENT_CAPA_MASK(SIOCGIWAP) | + IW_EVENT_CAPA_MASK(SIOCGIWSCAN)); + range->event_capa[1] = IW_EVENT_CAPA_K_1; + range->event_capa[4] = IW_EVENT_CAPA_MASK(IWEVTXDROP); return 0; } @@ -6872,9 +6883,15 @@ static int airo_get_scan(struct net_devi while((!rc) && (BSSList.index != 0xffff)) { /* Translate to WE format this entry */ current_ev = airo_translate_scan(dev, current_ev, - extra + IW_SCAN_MAX_DATA, + extra + dwrq->length, &BSSList); + /* 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 */ + return -E2BIG; + } + /* Read next entry */ rc = PC4500_readrid(ai, RID_BSSLISTNEXT, &BSSList, sizeof(BSSList), 1); @@ -7010,12 +7027,10 @@ static const struct iw_handler_def airo_ .num_standard = sizeof(airo_handler)/sizeof(iw_handler), .num_private = sizeof(airo_private_handler)/sizeof(iw_handler), .num_private_args = sizeof(airo_private_args)/sizeof(struct iw_priv_args), - .standard = (iw_handler *) airo_handler, - .private = (iw_handler *) airo_private_handler, - .private_args = (struct iw_priv_args *) airo_private_args, - .spy_offset = ((void *) (&((struct airo_info *) NULL)->spy_data) - - (void *) NULL), - + .standard = airo_handler, + .private = airo_private_handler, + .private_args = airo_private_args, + .get_wireless_stats = airo_get_wireless_stats, }; #endif /* WIRELESS_EXT */ diff -u -p -r linux/drivers/net/wireless.we16/wavelan.c linux/drivers/net/wireless/wavelan.c --- linux/drivers/net/wireless.we16/wavelan.c Mon Aug 2 14:23:02 2004 +++ linux/drivers/net/wireless/wavelan.c Tue Aug 3 11:35:52 2004 @@ -2172,6 +2172,11 @@ static int wavelan_get_range(struct net_ range->num_bitrates = 1; range->bitrate[0] = 2000000; /* 2 Mb/s */ + /* Event capability (kernel + driver) */ + range->event_capa[0] = (IW_EVENT_CAPA_MASK(0x8B02) | + IW_EVENT_CAPA_MASK(0x8B04)); + range->event_capa[1] = IW_EVENT_CAPA_K_1; + /* Disable interrupts and save flags. */ spin_lock_irqsave(&lp->spinlock, flags); @@ -2403,11 +2408,10 @@ static const struct iw_handler_def wavel .num_standard = sizeof(wavelan_handler)/sizeof(iw_handler), .num_private = sizeof(wavelan_private_handler)/sizeof(iw_handler), .num_private_args = sizeof(wavelan_private_args)/sizeof(struct iw_priv_args), - .standard = (iw_handler *) wavelan_handler, - .private = (iw_handler *) wavelan_private_handler, - .private_args = (struct iw_priv_args *) wavelan_private_args, - .spy_offset = ((void *) (&((net_local *) NULL)->spy_data) - - (void *) NULL), + .standard = wavelan_handler, + .private = wavelan_private_handler, + .private_args = wavelan_private_args, + .get_wireless_stats = wavelan_get_wireless_stats, }; /*------------------------------------------------------------------*/ @@ -4190,8 +4194,9 @@ static int __init wavelan_config(struct #endif /* SET_MAC_ADDRESS */ #ifdef WIRELESS_EXT /* if wireless extension exists in the kernel */ - dev->get_wireless_stats = wavelan_get_wireless_stats; - dev->wireless_handlers = (struct iw_handler_def *)&wavelan_handler_def; + dev->wireless_handlers = &wavelan_handler_def; + lp->wireless_data.spy_data = &lp->spy_data; + dev->wireless_data = &lp->wireless_data; #endif dev->mtu = WAVELAN_MTU; diff -u -p -r linux/drivers/net/wireless.we16/wavelan.p.h linux/drivers/net/wireless/wavelan.p.h --- linux/drivers/net/wireless.we16/wavelan.p.h Mon Aug 2 14:23:02 2004 +++ linux/drivers/net/wireless/wavelan.p.h Tue Aug 3 11:32:06 2004 @@ -510,6 +510,7 @@ struct net_local iw_stats wstats; /* Wireless-specific statistics */ struct iw_spy_data spy_data; + struct iw_public_data wireless_data; #endif #ifdef HISTOGRAM @@ -614,6 +615,8 @@ static inline void /* ------------------- IOCTL, STATS & RECONFIG ------------------- */ static en_stats * wavelan_get_stats(struct net_device *); /* Give stats /proc/net/dev */ +static iw_stats * + wavelan_get_wireless_stats(struct net_device *); static void wavelan_set_multicast_list(struct net_device *); /* ----------------------- PACKET RECEPTION ----------------------- */ diff -u -p -r linux/drivers/net/wireless.we16/wavelan_cs.c linux/drivers/net/wireless/wavelan_cs.c --- linux/drivers/net/wireless.we16/wavelan_cs.c Mon Aug 2 14:28:32 2004 +++ linux/drivers/net/wireless/wavelan_cs.c Tue Aug 3 11:37:31 2004 @@ -1550,7 +1550,6 @@ wavelan_set_mac_address(struct net_devic /* * Frequency setting (for hardware able of it) * It's a bit complicated and you don't really want to look into it... - * (called in wavelan_ioctl) */ static inline int wv_set_frequency(u_long base, /* i/o port of the card */ @@ -2438,6 +2437,12 @@ static int wavelan_get_range(struct net_ range->num_bitrates = 1; range->bitrate[0] = 2000000; /* 2 Mb/s */ + /* Event capability (kernel + driver) */ + range->event_capa[0] = (IW_EVENT_CAPA_MASK(0x8B02) | + IW_EVENT_CAPA_MASK(0x8B04) | + IW_EVENT_CAPA_MASK(0x8B06)); + range->event_capa[1] = IW_EVENT_CAPA_K_1; + /* Disable interrupts and save flags. */ spin_lock_irqsave(&lp->spinlock, flags); @@ -2737,11 +2742,10 @@ static const struct iw_handler_def wavel .num_standard = sizeof(wavelan_handler)/sizeof(iw_handler), .num_private = sizeof(wavelan_private_handler)/sizeof(iw_handler), .num_private_args = sizeof(wavelan_private_args)/sizeof(struct iw_priv_args), - .standard = (iw_handler *) wavelan_handler, - .private = (iw_handler *) wavelan_private_handler, - .private_args = (struct iw_priv_args *) wavelan_private_args, - .spy_offset = ((void *) (&((net_local *) NULL)->spy_data) - - (void *) NULL), + .standard = wavelan_handler, + .private = wavelan_private_handler, + .private_args = wavelan_private_args, + .get_wireless_stats = wavelan_get_wireless_stats, }; /*------------------------------------------------------------------*/ @@ -4720,9 +4724,10 @@ wavelan_attach(void) dev->watchdog_timeo = WATCHDOG_JIFFIES; #ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */ - dev->wireless_handlers = (struct iw_handler_def *)&wavelan_handler_def; - dev->do_ioctl = wavelan_ioctl; /* old wireless extensions */ - dev->get_wireless_stats = wavelan_get_wireless_stats; + dev->wireless_handlers = &wavelan_handler_def; + dev->do_ioctl = wavelan_ioctl; /* ethtool */ + lp->wireless_data.spy_data = &lp->spy_data; + dev->wireless_data = &lp->wireless_data; #endif /* Other specific data */ diff -u -p -r linux/drivers/net/wireless.we16/wavelan_cs.p.h linux/drivers/net/wireless/wavelan_cs.p.h --- linux/drivers/net/wireless.we16/wavelan_cs.p.h Mon Aug 2 14:23:02 2004 +++ linux/drivers/net/wireless/wavelan_cs.p.h Tue Aug 3 11:32:06 2004 @@ -629,6 +629,7 @@ struct net_local iw_stats wstats; /* Wireless specific stats */ struct iw_spy_data spy_data; + struct iw_public_data wireless_data; #endif #ifdef HISTOGRAM @@ -725,6 +726,8 @@ static inline void /* ------------------- IOCTL, STATS & RECONFIG ------------------- */ static en_stats * wavelan_get_stats(struct net_device *); /* Give stats /proc/net/dev */ +static iw_stats * + wavelan_get_wireless_stats(struct net_device *); /* ----------------------- PACKET RECEPTION ----------------------- */ static inline int wv_start_of_frame(struct net_device *, /* Seek beggining of current frame */ From jt@bougret.hpl.hp.com Tue Aug 3 17:40:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 17:40:55 -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 i740ehvo031364 for ; Tue, 3 Aug 2004 17:40:43 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 8C4631C002F8; Tue, 3 Aug 2004 17:40:33 -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 RAA09860; Tue, 3 Aug 2004 17:42:02 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1Bs9pY-00073k-00; Tue, 03 Aug 2004 17:40:32 -0700 Date: Tue, 3 Aug 2004 17:40:32 -0700 To: Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: [PATCH 2.6] Wireless Extension v17 for Linus Message-ID: <20040804004032.GA26091@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: 7482 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: 30353 Lines: 840 Hi Jeff, This is the patch to migrate Wireless Extension from WE-16 to WE-17 for kernel 2.6.X. I would like you to queue that patch and submit it to Linus as soon as 2.6.8 is released (so it can be fully tested during 2.6.9). If you want, I can resend that as soon as 2.6.8 is released. The patch is basically unchanged compared to the version posted to the netdev list and my web page one month ago, I just re-diff to the latest kernel (2.6.8-rc2-bk12). The patch already included feedback from various driver maintainers, and nobody else complained, so I guess it's ready. The patch for some drivers inside the kernel will follow (airo.c, wavelan.c, wavelan_cs). Patch for various other drivers (orinoco, hostap, prism54) have been sent already to their maintainers (one month ago) and basically waiting for this patch. Changelog : * - Add flags to frequency -> auto/fixed * - Document (struct iw_quality *)->updated, add new flags (INVALID) * - Wireless Event capability in struct iw_range * - Add support for relative TxPower (yick !) * - Change the way we get to spy_data method for added safety and hostap * - Remove spy #ifdef, they are always on -> cleaner code * - Allow any size GET request if user specifies length > max * - Start migrating get_wireless_stats to struct iw_handler_def * Based on patch from Pavel Roskin : * - Fix kernel data leak to user space in private handler handling I also added on my page a version of Wireless Tools that use RtNetlink instead of ioctls. This is not as clean as I would like, but is fully functional (if you have WE-19). I know that you were interested, so feel free to send feedback on that... Have fun... Jean -------------------------------------------------------------------- diff -u -p linux/include/linux/netdevice.we16.h linux/include/linux/netdevice.h --- linux/include/linux/netdevice.we16.h Tue Aug 3 11:13:59 2004 +++ linux/include/linux/netdevice.h Tue Aug 3 11:16:30 2004 @@ -304,7 +304,9 @@ struct net_device /* List of functions to handle Wireless Extensions (instead of ioctl). * See for details. Jean II */ - struct iw_handler_def * wireless_handlers; + const struct iw_handler_def * wireless_handlers; + /* Instance data managed by the core of Wireless Extensions. */ + struct iw_public_data * wireless_data; struct ethtool_ops *ethtool_ops; diff -u -p linux/include/linux/wireless.we16.h linux/include/linux/wireless.h --- linux/include/linux/wireless.we16.h Tue Aug 3 11:14:07 2004 +++ linux/include/linux/wireless.h Tue Aug 3 11:23:15 2004 @@ -1,10 +1,10 @@ /* * This file define a set of standard wireless extensions * - * Version : 16 2.4.03 + * Version : 17 21.6.04 * * Authors : Jean Tourrilhes - HPL - - * Copyright (c) 1997-2002 Jean Tourrilhes, All Rights Reserved. + * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. */ #ifndef _LINUX_WIRELESS_H @@ -47,12 +47,12 @@ * # include/net/iw_handler.h * * Note as well that /proc/net/wireless implementation has now moved in : - * # include/linux/wireless.c + * # net/core/wireless.c * * Wireless Events (2002 -> onward) : * -------------------------------- * Events are defined at the end of this file, and implemented in : - * # include/linux/wireless.c + * # net/core/wireless.c * * Other comments : * -------------- @@ -82,7 +82,7 @@ * (there is some stuff that will be added in the future...) * I just plan to increment with each new version. */ -#define WIRELESS_EXT 16 +#define WIRELESS_EXT 17 /* * Changes : @@ -175,6 +175,13 @@ * - Remove IW_MAX_GET_SPY because conflict with enhanced spy support * - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy" * - Add IW_ENCODE_TEMP and iw_range->encoding_login_index + * + * V16 to V17 + * ---------- + * - Add flags to frequency -> auto/fixed + * - Document (struct iw_quality *)->updated, add new flags (INVALID) + * - Wireless Event capability in struct iw_range + * - Add support for relative TxPower (yick !) */ /**************************** CONSTANTS ****************************/ @@ -251,7 +258,7 @@ /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ -/* These 16 ioctl are wireless device private. +/* These 32 ioctl are wireless device private, for 16 commands. * Each driver is free to use them for whatever purpose it chooses, * however the driver *must* export the description of those ioctls * with SIOCGIWPRIV and *must* use arguments as defined below. @@ -266,8 +273,8 @@ * We now have 32 commands, so a bit more space ;-). * Also, all 'odd' commands are only usable by root and don't return the * content of ifr/iwr to user (but you are not obliged to use the set/get - * convention, just use every other two command). - * And I repeat : you are not obliged to use them with iwspy, but you + * convention, just use every other two command). More details in iwpriv.c. + * And I repeat : you are not forced to use them with iwpriv, but you * must be compliant with it. */ @@ -352,6 +359,18 @@ #define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */ #define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */ +/* Statistics flags (bitmask in updated) */ +#define IW_QUAL_QUAL_UPDATED 0x1 /* Value was updated since last read */ +#define IW_QUAL_LEVEL_UPDATED 0x2 +#define IW_QUAL_NOISE_UPDATED 0x4 +#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */ +#define IW_QUAL_LEVEL_INVALID 0x20 +#define IW_QUAL_NOISE_INVALID 0x40 + +/* Frequency flags */ +#define IW_FREQ_AUTO 0x00 /* Let the driver decides */ +#define IW_FREQ_FIXED 0x01 /* Force a specific value */ + /* Maximum number of size of encoding token available * they are listed in the range structure */ #define IW_MAX_ENCODING_SIZES 8 @@ -390,6 +409,7 @@ #define IW_TXPOW_TYPE 0x00FF /* Type of value */ #define IW_TXPOW_DBM 0x0000 /* Value is in dBm */ #define IW_TXPOW_MWATT 0x0001 /* Value is in mW */ +#define IW_TXPOW_RELATIVE 0x0002 /* Value is in arbitrary units */ #define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */ /* Retry limits and lifetime flags available */ @@ -418,6 +438,25 @@ /* Max number of char in custom event - use multiple of them if needed */ #define IW_CUSTOM_MAX 256 /* In bytes */ +/* Event capability macros - in (struct iw_range *)->event_capa + * Because we have more than 32 possible events, we use an array of + * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ +#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ + (cmd - SIOCIWFIRSTPRIV + 0x60) : \ + (cmd - SIOCSIWCOMMIT)) +#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) +#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) +/* Event capability constants - event autogenerated by the kernel + * This list is valid for most 802.11 devices, customise as needed... */ +#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \ + IW_EVENT_CAPA_MASK(0x8B06) | \ + IW_EVENT_CAPA_MASK(0x8B1A)) +#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A)) +/* "Easy" macro to set events in iw_range (less efficient) */ +#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd)) +#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; } + + /****************************** TYPES ******************************/ /* --------------------------- SUBTYPES --------------------------- */ @@ -456,7 +495,7 @@ struct iw_freq __s32 m; /* Mantissa */ __s16 e; /* Exponent */ __u8 i; /* List index (when in range struct) */ - __u8 pad; /* Unused - just for alignement */ + __u8 flags; /* Flags (fixed/auto) */ }; /* @@ -610,11 +649,12 @@ struct iw_range /* Old Frequency (backward compat - moved lower ) */ __u16 old_num_channels; __u8 old_num_frequency; - /* Filler to keep "version" at the same offset */ - __s32 old_freq[6]; + + /* Wireless event capability bitmasks */ + __u32 event_capa[6]; /* signal level threshold range */ - __s32 sensitivity; + __s32 sensitivity; /* Quality of link & SNR stuff */ /* Quality range (link, level, noise) diff -u -p linux/include/net/iw_handler.we16.h linux/include/net/iw_handler.h --- linux/include/net/iw_handler.we16.h Tue Aug 3 11:14:22 2004 +++ linux/include/net/iw_handler.h Tue Aug 3 11:18:46 2004 @@ -1,10 +1,10 @@ /* * This file define the new driver API for Wireless Extensions * - * Version : 5 4.12.02 + * Version : 6 21.6.04 * * Authors : Jean Tourrilhes - HPL - - * Copyright (c) 2001-2002 Jean Tourrilhes, All Rights Reserved. + * Copyright (c) 2001-2004 Jean Tourrilhes, All Rights Reserved. */ #ifndef _IW_HANDLER_H @@ -206,7 +206,7 @@ * will be needed... * I just plan to increment with each new version. */ -#define IW_HANDLER_VERSION 5 +#define IW_HANDLER_VERSION 6 /* * Changes : @@ -224,11 +224,18 @@ * V4 to V5 * -------- * - Add new spy support : struct iw_spy_data & prototypes + * + * V5 to V6 + * -------- + * - Change the way we get to spy_data method for added safety + * - Remove spy #ifdef, they are always on -> cleaner code + * - Add IW_DESCR_FLAG_NOMAX flag for very large requests + * - Start migrating get_wireless_stats to struct iw_handler_def */ /**************************** CONSTANTS ****************************/ -/* Enable enhanced spy support. Disable to reduce footprint */ +/* Enhanced spy support available */ #define IW_WIRELESS_SPY #define IW_WIRELESS_THRSPY @@ -258,6 +265,7 @@ #define IW_DESCR_FLAG_EVENT 0x0002 /* Generate an event on SET */ #define IW_DESCR_FLAG_RESTRICT 0x0004 /* GET : request is ROOT only */ /* SET : Omit payload from generated iwevent */ +#define IW_DESCR_FLAG_NOMAX 0x0008 /* GET : no limit on request size */ /* Driver level flags */ #define IW_DESCR_FLAG_WAIT 0x0100 /* Wait for driver event */ @@ -303,31 +311,33 @@ struct iw_handler_def { /* Number of handlers defined (more precisely, index of the * last defined handler + 1) */ - __u16 num_standard; - __u16 num_private; + const __u16 num_standard; + const __u16 num_private; /* Number of private arg description */ - __u16 num_private_args; + const __u16 num_private_args; /* Array of handlers for standard ioctls * We will call dev->wireless_handlers->standard[ioctl - SIOCSIWNAME] */ - iw_handler * standard; + const iw_handler * standard; /* Array of handlers for private ioctls * Will call dev->wireless_handlers->private[ioctl - SIOCIWFIRSTPRIV] */ - iw_handler * private; + const iw_handler * private; /* Arguments of private handler. This one is just a list, so you * can put it in any order you want and should not leave holes... * We will automatically export that to user space... */ - struct iw_priv_args * private_args; + const struct iw_priv_args * private_args; - /* Driver enhanced spy support */ - long spy_offset; /* Spy data offset */ + /* This field will be *removed* in the next version of WE */ + const long spy_offset; /* DO NOT USE */ - /* In the long term, get_wireless_stats will move from - * 'struct net_device' to here, to minimise bloat. */ + /* New location of get_wireless_stats, to de-bloat struct net_device. + * The old pointer in struct net_device will be gradually phased + * out, and drivers are encouraged to use this one... */ + struct iw_statistics* (*get_wireless_stats)(struct net_device *dev); }; /* ---------------------- IOCTL DESCRIPTION ---------------------- */ @@ -374,18 +384,29 @@ struct iw_ioctl_description */ struct iw_spy_data { -#ifdef IW_WIRELESS_SPY /* --- Standard spy support --- */ int spy_number; u_char spy_address[IW_MAX_SPY][ETH_ALEN]; struct iw_quality spy_stat[IW_MAX_SPY]; -#ifdef IW_WIRELESS_THRSPY /* --- Enhanced spy support (event) */ struct iw_quality spy_thr_low; /* Low threshold */ struct iw_quality spy_thr_high; /* High threshold */ u_char spy_thr_under[IW_MAX_SPY]; -#endif /* IW_WIRELESS_THRSPY */ -#endif /* IW_WIRELESS_SPY */ +}; + +/* --------------------- DEVICE WIRELESS DATA --------------------- */ +/* + * This is all the wireless data specific to a device instance that + * is managed by the core of Wireless Extensions. + * We only keep pointer to those structures, so that a driver is free + * to share them between instances. + * This structure should be initialised before registering the device. + * Access to this data follow the same rules as any other struct net_device + * data (i.e. valid as long as struct net_device exist, same locking rules). + */ +struct iw_public_data { + /* Driver enhanced spy support */ + struct iw_spy_data * spy_data; }; /**************************** PROTOTYPES ****************************/ @@ -393,6 +414,9 @@ struct iw_spy_data * Functions part of the Wireless Extensions (defined in net/core/wireless.c). * Those may be called only within the kernel. */ + +/* Data needed by fs/compat_ioctl.c for 32->64 bit conversion */ +extern const char iw_priv_type_size[]; /* First : function strictly used inside the kernel */ diff -u -p linux/net/core/dev.we16.c linux/net/core/dev.c --- linux/net/core/dev.we16.c Tue Aug 3 11:14:45 2004 +++ linux/net/core/dev.c Tue Aug 3 11:15:09 2004 @@ -2787,7 +2787,7 @@ int dev_ioctl(unsigned int cmd, void __u /* Follow me in net/core/wireless.c */ ret = wireless_process_ioctl(&ifr, cmd); rtnl_unlock(); - if (!ret && IW_IS_GET(cmd) && + if (IW_IS_GET(cmd) && copy_to_user(arg, &ifr, sizeof(struct ifreq))) ret = -EFAULT; diff -u -p linux/net/core/wireless.we16.c linux/net/core/wireless.c --- linux/net/core/wireless.we16.c Tue Aug 3 11:14:54 2004 +++ linux/net/core/wireless.c Tue Aug 3 11:20:39 2004 @@ -2,7 +2,7 @@ * This file implement the Wireless Extensions APIs. * * Authors : Jean Tourrilhes - HPL - - * Copyright (c) 1997-2003 Jean Tourrilhes, All Rights Reserved. + * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. * * (As all part of the Linux kernel, this file is GPL) */ @@ -48,6 +48,15 @@ * o Add common spy support : iw_handler_set_spy(), wireless_spy_update() * o Add enhanced spy support : iw_handler_set_thrspy() and event. * o Add WIRELESS_EXT version display in /proc/net/wireless + * + * v6 - 18.06.04 - Jean II + * o Change get_spydata() method for added safety + * o Remove spy #ifdef, they are always on -> cleaner code + * o Allow any size GET request is user specifies length > max + * o Start migrating get_wireless_stats to struct iw_handler_def + * o Add wmb() in iw_handler_set_spy() for non-coherent archs/cpus + * Based on patch from Pavel Roskin : + * o Fix kernel data leak to user space in private handler handling */ /***************************** INCLUDES *****************************/ @@ -69,10 +78,6 @@ /**************************** CONSTANTS ****************************/ -/* Enough lenience, let's make sure things are proper... */ -#define WE_STRICT_WRITE /* Check write buffer size */ -/* I'll probably drop both the define and kernel message in the next version */ - /* Debugging stuff */ #undef WE_IOCTL_DEBUG /* Debug IOCTL API */ #undef WE_EVENT_DEBUG /* Debug Event dispatcher */ @@ -186,6 +191,7 @@ static const struct iw_ioctl_description .token_size = sizeof(struct sockaddr) + sizeof(struct iw_quality), .max_tokens = IW_MAX_AP, + .flags = IW_DESCR_FLAG_NOMAX, }, [SIOCSIWSCAN - SIOCIWFIRST] = { .header_type = IW_HEADER_TYPE_PARAM, @@ -194,6 +200,7 @@ static const struct iw_ioctl_description .header_type = IW_HEADER_TYPE_POINT, .token_size = 1, .max_tokens = IW_SCAN_MAX_DATA, + .flags = IW_DESCR_FLAG_NOMAX, }, [SIOCSIWESSID - SIOCIWFIRST] = { .header_type = IW_HEADER_TYPE_POINT, @@ -296,7 +303,7 @@ static const int standard_event_num = (s sizeof(struct iw_ioctl_description)); /* Size (in bytes) of the various private data types */ -static const char priv_type_size[] = { +const char iw_priv_type_size[] = { 0, /* IW_PRIV_TYPE_NONE */ 1, /* IW_PRIV_TYPE_BYTE */ 1, /* IW_PRIV_TYPE_CHAR */ @@ -363,12 +370,15 @@ static inline iw_handler get_handler(str */ static inline struct iw_statistics *get_wireless_stats(struct net_device *dev) { + /* New location */ + if((dev->wireless_handlers != NULL) && + (dev->wireless_handlers->get_wireless_stats != NULL)) + return dev->wireless_handlers->get_wireless_stats(dev); + + /* Old location, will be phased out in next WE */ return (dev->get_wireless_stats ? dev->get_wireless_stats(dev) : (struct iw_statistics *) NULL); - /* In the future, get_wireless_stats may move from 'struct net_device' - * to 'struct iw_handler_def', to de-bloat struct net_device. - * Definitely worse a thought... */ } /* ---------------------------------------------------------------- */ @@ -403,14 +413,32 @@ static inline int call_commit_handler(st /* ---------------------------------------------------------------- */ /* - * Number of private arguments + * Calculate size of private arguments */ static inline int get_priv_size(__u16 args) { int num = args & IW_PRIV_SIZE_MASK; int type = (args & IW_PRIV_TYPE_MASK) >> 12; - return num * priv_type_size[type]; + return num * iw_priv_type_size[type]; +} + +/* ---------------------------------------------------------------- */ +/* + * Re-calculate the size of private arguments + */ +static inline int adjust_priv_size(__u16 args, + union iwreq_data * wrqu) +{ + int num = wrqu->data.length; + int max = args & IW_PRIV_SIZE_MASK; + int type = (args & IW_PRIV_TYPE_MASK) >> 12; + + /* Make sure the driver doesn't goof up */ + if (max < num) + num = max; + + return num * iw_priv_type_size[type]; } @@ -440,11 +468,14 @@ static __inline__ void wireless_seq_prin seq_printf(seq, "%6s: %04x %3d%c %3d%c %3d%c %6d %6d %6d " "%6d %6d %6d\n", dev->name, stats->status, stats->qual.qual, - stats->qual.updated & 1 ? '.' : ' ', + stats->qual.updated & IW_QUAL_QUAL_UPDATED + ? '.' : ' ', ((__u8) stats->qual.level), - stats->qual.updated & 2 ? '.' : ' ', + stats->qual.updated & IW_QUAL_LEVEL_UPDATED + ? '.' : ' ', ((__u8) stats->qual.noise), - stats->qual.updated & 4 ? '.' : ' ', + stats->qual.updated & IW_QUAL_NOISE_UPDATED + ? '.' : ' ', stats->discard.nwid, stats->discard.code, stats->discard.fragment, stats->discard.retries, stats->discard.misc, stats->miss.beacon); @@ -555,13 +586,15 @@ static inline int ioctl_export_private(s /* Check NULL pointer */ if(iwr->u.data.pointer == NULL) return -EFAULT; -#ifdef WE_STRICT_WRITE + /* Check if there is enough buffer up there */ if(iwr->u.data.length < dev->wireless_handlers->num_private_args) { - printk(KERN_ERR "%s (WE) : Buffer for request SIOCGIWPRIV too small (%d<%d)\n", dev->name, iwr->u.data.length, dev->wireless_handlers->num_private_args); + /* User space can't know in advance how large the buffer + * needs to be. Give it a hint, so that we can support + * any size buffer we want somewhat efficiently... */ + iwr->u.data.length = dev->wireless_handlers->num_private_args; return -E2BIG; } -#endif /* WE_STRICT_WRITE */ /* Set the number of available ioctls. */ iwr->u.data.length = dev->wireless_handlers->num_private_args; @@ -590,7 +623,6 @@ static inline int ioctl_standard_call(st const struct iw_ioctl_description * descr; struct iw_request_info info; int ret = -EINVAL; - int user_size = 0; /* Get the description of the IOCTL */ if((cmd - SIOCIWFIRST) >= standard_ioctl_num) @@ -621,8 +653,14 @@ static inline int ioctl_standard_call(st #endif /* WE_SET_EVENT */ } else { char * extra; + int extra_size; + int user_length = 0; int err; + /* Calculate space needed by arguments. Always allocate + * for max space. Easier, and won't last long... */ + extra_size = descr->max_tokens * descr->token_size; + /* Check what user space is giving us */ if(IW_IS_SET(cmd)) { /* Check NULL pointer */ @@ -639,18 +677,29 @@ static inline int ioctl_standard_call(st if(iwr->u.data.pointer == NULL) return -EFAULT; /* Save user space buffer size for checking */ - user_size = iwr->u.data.length; + user_length = iwr->u.data.length; + + /* Don't check if user_length > max to allow forward + * compatibility. The test user_length < min is + * implied by the test at the end. */ + + /* Support for very large requests */ + if((descr->flags & IW_DESCR_FLAG_NOMAX) && + (user_length > descr->max_tokens)) { + /* Allow userspace to GET more than max so + * we can support any size GET requests. + * There is still a limit : -ENOMEM. */ + extra_size = user_length * descr->token_size; + } } #ifdef WE_IOCTL_DEBUG printk(KERN_DEBUG "%s (WE) : Malloc %d bytes\n", - dev->name, descr->max_tokens * descr->token_size); + dev->name, extra_size); #endif /* WE_IOCTL_DEBUG */ - /* Always allocate for max space. Easier, and won't last - * long... */ - extra = kmalloc(descr->max_tokens * descr->token_size, - GFP_KERNEL); + /* Create the kernel buffer */ + extra = kmalloc(extra_size, GFP_KERNEL); if (extra == NULL) { return -ENOMEM; } @@ -676,14 +725,11 @@ static inline int ioctl_standard_call(st /* If we have something to return to the user */ if (!ret && IW_IS_GET(cmd)) { -#ifdef WE_STRICT_WRITE /* Check if there is enough buffer up there */ - if(user_size < iwr->u.data.length) { - printk(KERN_ERR "%s (WE) : Buffer for request %04X too small (%d<%d)\n", dev->name, cmd, user_size, iwr->u.data.length); + if(user_length < iwr->u.data.length) { kfree(extra); return -E2BIG; } -#endif /* WE_STRICT_WRITE */ err = copy_to_user(iwr->u.data.pointer, extra, iwr->u.data.length * @@ -746,7 +792,7 @@ static inline int ioctl_private_call(str iw_handler handler) { struct iwreq * iwr = (struct iwreq *) ifr; - struct iw_priv_args * descr = NULL; + const struct iw_priv_args * descr = NULL; struct iw_request_info info; int extra_size = 0; int i; @@ -786,7 +832,7 @@ static inline int ioctl_private_call(str ((extra_size + offset) <= IFNAMSIZ)) extra_size = 0; } else { - /* Size of set arguments */ + /* Size of get arguments */ extra_size = get_priv_size(descr->get_args); /* Does it fits in iwr ? */ @@ -816,7 +862,7 @@ static inline int ioctl_private_call(str return -EFAULT; /* Does it fits within bounds ? */ - if(iwr->u.data.length > (descr->set_args & + if(iwr->u.data.length > (descr->get_args & IW_PRIV_SIZE_MASK)) return -E2BIG; } else { @@ -856,6 +902,14 @@ static inline int ioctl_private_call(str /* If we have something to return to the user */ if (!ret && IW_IS_GET(cmd)) { + + /* Adjust for the actual length if it's variable, + * avoid leaking kernel bits outside. */ + if (!(descr->get_args & IW_PRIV_SIZE_FIXED)) { + extra_size = adjust_priv_size(descr->get_args, + &(iwr->u)); + } + err = copy_to_user(iwr->u.data.pointer, extra, extra_size); if (err) @@ -1127,9 +1181,25 @@ void wireless_send_event(struct net_devi * One of the main advantage of centralising spy support here is that * it becomes much easier to improve and extend it without having to touch * the drivers. One example is the addition of the Spy-Threshold events. - * Note : IW_WIRELESS_SPY is defined in iw_handler.h */ +/* ---------------------------------------------------------------- */ +/* + * Return the pointer to the spy data in the driver. + * Because this is called on the Rx path via wireless_spy_update(), + * we want it to be efficient... + */ +static inline struct iw_spy_data * get_spydata(struct net_device *dev) +{ + /* This is the new way */ + if(dev->wireless_data) + return(dev->wireless_data->spy_data); + + /* This is the old way. Doesn't work for multi-headed drivers. + * It will be removed in the next version of WE. */ + return (dev->priv + dev->wireless_handlers->spy_offset); +} + /*------------------------------------------------------------------*/ /* * Standard Wireless Handler : set Spy List @@ -1139,16 +1209,30 @@ int iw_handler_set_spy(struct net_device union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_SPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct sockaddr * address = (struct sockaddr *) extra; + if(!dev->wireless_data) + /* Help user know that driver needs updating */ + printk(KERN_DEBUG "%s (WE) : Driver using old/buggy spy support, please fix driver !\n", + dev->name); + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + /* Disable spy collection while we copy the addresses. - * As we don't disable interrupts, we need to do this to avoid races. - * As we are the only writer, this is good enough. */ + * While we copy addresses, any call to wireless_spy_update() + * will NOP. This is OK, as anyway the addresses are changing. */ spydata->spy_number = 0; + /* We want to operate without locking, because wireless_spy_update() + * most likely will happen in the interrupt handler, and therefore + * have it own locking constraints and needs performance. + * The rtnl_lock() make sure we don't race with the other iw_handlers. + * This make sure wireless_spy_update() "see" that the spy list + * is temporarily disabled. */ + wmb(); + /* Are there are addresses to copy? */ if(wrqu->data.length > 0) { int i; @@ -1174,13 +1258,14 @@ int iw_handler_set_spy(struct net_device spydata->spy_address[i][5]); #endif /* WE_SPY_DEBUG */ } + + /* Make sure above is updated before re-enabling */ + wmb(); + /* Enable addresses */ spydata->spy_number = wrqu->data.length; return 0; -#else /* IW_WIRELESS_SPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_SPY */ } /*------------------------------------------------------------------*/ @@ -1192,12 +1277,14 @@ int iw_handler_get_spy(struct net_device union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_SPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct sockaddr * address = (struct sockaddr *) extra; int i; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + wrqu->data.length = spydata->spy_number; /* Copy addresses. */ @@ -1214,9 +1301,6 @@ int iw_handler_get_spy(struct net_device for(i = 0; i < spydata->spy_number; i++) spydata->spy_stat[i].updated = 0; return 0; -#else /* IW_WIRELESS_SPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_SPY */ } /*------------------------------------------------------------------*/ @@ -1228,11 +1312,13 @@ int iw_handler_set_thrspy(struct net_dev union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_THRSPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct iw_thrspy * threshold = (struct iw_thrspy *) extra; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + /* Just do it */ memcpy(&(spydata->spy_thr_low), &(threshold->low), 2 * sizeof(struct iw_quality)); @@ -1245,9 +1331,6 @@ int iw_handler_set_thrspy(struct net_dev #endif /* WE_SPY_DEBUG */ return 0; -#else /* IW_WIRELESS_THRSPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_THRSPY */ } /*------------------------------------------------------------------*/ @@ -1259,22 +1342,20 @@ int iw_handler_get_thrspy(struct net_dev union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_THRSPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct iw_thrspy * threshold = (struct iw_thrspy *) extra; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + /* Just do it */ memcpy(&(threshold->low), &(spydata->spy_thr_low), 2 * sizeof(struct iw_quality)); return 0; -#else /* IW_WIRELESS_THRSPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_THRSPY */ } -#ifdef IW_WIRELESS_THRSPY /*------------------------------------------------------------------*/ /* * Prepare and send a Spy Threshold event @@ -1312,7 +1393,6 @@ static void iw_send_thrspy_event(struct /* Send event to user space */ wireless_send_event(dev, SIOCGIWTHRSPY, &wrqu, (char *) &threshold); } -#endif /* IW_WIRELESS_THRSPY */ /* ---------------------------------------------------------------- */ /* @@ -1325,12 +1405,14 @@ void wireless_spy_update(struct net_devi unsigned char * address, struct iw_quality * wstats) { -#ifdef IW_WIRELESS_SPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); int i; int match = -1; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return; + #ifdef WE_SPY_DEBUG printk(KERN_DEBUG "wireless_spy_update() : offset %ld, spydata %p, address %02X:%02X:%02X:%02X:%02X:%02X\n", dev->wireless_handlers->spy_offset, spydata, address[0], address[1], address[2], address[3], address[4], address[5]); #endif /* WE_SPY_DEBUG */ @@ -1342,7 +1424,7 @@ void wireless_spy_update(struct net_devi sizeof(struct iw_quality)); match = i; } -#ifdef IW_WIRELESS_THRSPY + /* Generate an event if we cross the spy threshold. * To avoid event storms, we have a simple hysteresis : we generate * event only when we go under the low threshold or above the @@ -1362,8 +1444,6 @@ void wireless_spy_update(struct net_devi } } } -#endif /* IW_WIRELESS_THRSPY */ -#endif /* IW_WIRELESS_SPY */ } EXPORT_SYMBOL(iw_handler_get_spy); From davem@redhat.com Tue Aug 3 18:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 18:41:25 -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 i741fITG000699 for ; Tue, 3 Aug 2004 18:41:18 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i741f7e1001987; Tue, 3 Aug 2004 21:41:07 -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 i741f7a31657; Tue, 3 Aug 2004 21:41:07 -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 i741eMxm021793; Tue, 3 Aug 2004 21:40:22 -0400 Date: Tue, 3 Aug 2004 18:39:19 -0700 From: "David S. Miller" To: Pekka Pietikainen Cc: jgarzik@pobox.com, jolt@tuxbox.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support) Message-Id: <20040803183919.2990d045.davem@redhat.com> In-Reply-To: <20040804003108.GA10445@ee.oulu.fi> References: <200407232335.37809.jolt@tuxbox.org> <20040726141128.GA5435@ee.oulu.fi> <20040804003108.GA10445@ee.oulu.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: 7483 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: 867 Lines: 20 On Wed, 4 Aug 2004 03:31:08 +0300 Pekka Pietikainen wrote: > + 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); > + skb->data=bp->tx_bufs+entry*TX_PKT_BUF_SZ; > + mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE); > + } Changing skb->data is not legal. Please implement this in such a way that skb->data does not get modified. By modifying skb->data you will break things such as packet sniffers and netfilter, and that's just the tip of the iceberg. :-) I would suggest merely freeing up this TX skb, and marking the entry in the b44 software state with some dummy skb pointer such as (void *) 0x1UL or something like that to indicate this case. From herbert@gondor.apana.org.au Tue Aug 3 20:28:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 20:28:20 -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 i743SA4t006658 for ; Tue, 3 Aug 2004 20:28:11 -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 1BsCRc-0005aK-00; Wed, 04 Aug 2004 13:28:00 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BsCRY-0000di-00; Wed, 04 Aug 2004 13:27:56 +1000 Date: Wed, 4 Aug 2004 13:27:56 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: Transparent Proxying Message-ID: <20040804032756.GA2388@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7484 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: 1359 Lines: 31 Hi Dave: I need to implement a semi-transparent TCP proxy for work. The requirement is that it'll intercept all TCP connections passing through and redirect them to a local port. Once there the connection will be forwarded through a non-TCP protocol (that's why it's only semi-transparent, in fact it's only a half-TCP proxy :) Redirecting is easy through the REDIRECT netfilter target. But the tricky bit is getting the original destination address so that we can forward this information to our peer who will turn the connection back into TCP. Since this proxy has to be completely generic it cannot rely on ULP-specific information to deduce the destination address. I looked around and found the TPROXY patch which is part of pom-ng. It is capable of providing the information I need via a getsockopt() call. The only catch is that you seem to have some objections to it :) So I'd like to know your objections against the patch and how they might be overcome. If you know another way of getting the destination information then that would be good to (apart from the obvious one of parsing /proc/net/ip_conntrack :) Thanks in advance, -- 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 Aug 3 22:07:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 22:07:59 -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 i7457lkS009081 for ; Tue, 3 Aug 2004 22:07:50 -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 1BsDzw-000611-00; Wed, 04 Aug 2004 15:07:32 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BsDzs-0000m6-00; Wed, 04 Aug 2004 15:07:28 +1000 Date: Wed, 4 Aug 2004 15:07:28 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: Re: Transparent Proxying Message-ID: <20040804050728.GA2968@gondor.apana.org.au> References: <20040804032756.GA2388@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040804032756.GA2388@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7485 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: 555 Lines: 15 On Wed, Aug 04, 2004 at 01:27:56PM +1000, herbert wrote: > > might be overcome. If you know another way of getting the destination > information then that would be good to (apart from the obvious one > of parsing /proc/net/ip_conntrack :) Never mind, I somehow missed getorigdst in ip_conntrack_core.c which does exactly what I want. 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 akpm@osdl.org Tue Aug 3 22:45:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 03 Aug 2004 22:45:13 -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 i745iwhK010025 for ; Tue, 3 Aug 2004 22:45:01 -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 i745im116293 for ; Tue, 3 Aug 2004 22:44:49 -0700 Date: Tue, 3 Aug 2004 22:43:19 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [Bugme-new] [Bug 3151] New: IPSEC triggers "bad: scheduling while atomic!" errors. Message-Id: <20040803224319.50363100.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: 7486 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: 57768 Lines: 1066 Looks like a lock/unlock imbalance somewhere in the 2.6.7 ipsec code. Begin forwarded message: Date: Tue, 3 Aug 2004 13:43:57 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3151] New: IPSEC triggers "bad: scheduling while atomic!" errors. http://bugme.osdl.org/show_bug.cgi?id=3151 Summary: IPSEC triggers "bad: scheduling while atomic!" errors. Kernel Version: 2.6.6 & 2.6.7, earlier kernels untested. Status: NEW Severity: normal Owner: niv@us.ibm.com Submitter: johan.karlberg@gmail.com Distribution: Debian unstable and testing. Hardware Environment: K6-2 400, K6 233 Linux version 2.6.7 (root@scooby) (gcc version 3.3.4 (Debian 1:3.3.4-6)) #2 Sun Aug 1 21:13:50 CEST 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 00000000000a0000 (usable) BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000000fffc000 (usable) BIOS-e820: 000000000fffc000 - 000000000ffff000 (ACPI data) BIOS-e820: 000000000ffff000 - 0000000010000000 (ACPI NVS) BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) 255MB LOWMEM available. On node 0 totalpages: 65532 DMA zone: 4096 pages, LIFO batch:1 Normal zone: 61436 pages, LIFO batch:14 HighMem zone: 0 pages, LIFO batch:1 DMI 2.0 present. Built 1 zonelists Kernel command line: auto BOOT_IMAGE=Linux ro root=302 acpi=off No local APIC present or hardware disabled Initializing CPU#0 PID hash table entries: 1024 (order 10: 8192 bytes) Detected 400.859 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Memory: 256672k/262128k available (1446k kernel code, 4732k reserved, 757k data, 208k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay loop... 792.57 BogoMIPS Security Scaffold v1.0.0 initialized Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: After generic identify, caps: 008021bf 808029bf 00000000 00000000 CPU: After vendor identify, caps: 008021bf 808029bf 00000000 00000000 CPU: L1 I Cache: 32K (32 bytes/line), D cache 32K (32 bytes/line) CPU: After all inits, caps: 008021bf 808029bf 00000000 00000002 CPU: AMD-K6(tm) 3D processor stepping 0c Checking 'hlt' instruction... OK. Checking for popad bug... OK. NET: Registered protocol family 16 EISA bus registered PCI: PCI BIOS revision 2.10 entry at 0xf0720, last bus=1 PCI: Using configuration type 1 mtrr: v2.0 (20020519) ACPI: Subsystem revision 20040326 ACPI: Interpreter disabled. Linux Plug and Play Support v0.97 (c) Adam Belay PnPBIOS: Scanning system for PnP BIOS support... PnPBIOS: Found PnP BIOS installation structure at 0xc00fd220 PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0xd250, dseg 0xf0000 PnPBIOS: Resource structure does not contain an end tag. PnPBIOS: build_devlist: Node number 0x0 is out of sequence following node 0x0. Aborting. PnPBIOS: 1 node reported by PnP BIOS; 1 recorded by driver PCI: Probing PCI hardware PCI: Probing PCI hardware (bus 00) PCI: Using ALI IRQ Router PCI: Using IRQ router ALI [10b9/1533] at 0000:00:07.0 VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x0 Initializing Cryptographic API Activating ISA DMA hang workarounds. isapnp: Scanning for PnP cards... isapnp: No Plug & Play device found Serial: 8250/16550 driver $Revision: 1.90 $ 54 ports, IRQ sharing enabled RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx ALI15X3: IDE controller at PCI slot 0000:00:0f.0 ALI15X3: chipset revision 193 ALI15X3: not 100% native mode: will probe irqs later ide0: BM-DMA at 0xd400-0xd407, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0xd408-0xd40f, BIOS settings: hdc:pio, hdd:pio hda: ST360021A, ATA DISK drive hdb: ST380021A, ATA DISK drive Using anticipatory io scheduler ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 hdc: ST3120023A, ATA DISK drive hdd: ST3120024A, ATA DISK drive ide1 at 0x170-0x177,0x376 on irq 15 hda: max request size: 128KiB hda: 117231408 sectors (60022 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(33) /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 hdb: max request size: 128KiB hdb: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(33) /dev/ide/host0/bus0/target1/lun0: p1 hdc: max request size: 128KiB hdc: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(33) /dev/ide/host0/bus1/target0/lun0: p1 hdd: max request size: 128KiB hdd: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(33) /dev/ide/host0/bus1/target1/lun0: p1 serio: i8042 AUX port at 0x60,0x64 irq 12 serio: i8042 KBD port at 0x60,0x64 irq 1 input: AT Translated Set 2 keyboard on isa0060/serio0 EISA: Probing bus 0 at eisa0 NET: Registered protocol family 2 IP: routing cache hash table of 2048 buckets, 16Kbytes TCP: Hash tables configured (established 16384 bind 32768) NET: Registered protocol family 8 NET: Registered protocol family 20 kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Freeing unused kernel memory: 208k freed NET: Registered protocol family 1 Adding 996020k swap on /dev/hda4. Priority:-1 extents:1 EXT3 FS on hda2, internal journal Real Time Clock Driver v1.12 device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com kjournald starting. Commit interval 5 seconds EXT3 FS on hda1, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hda3, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hdb1, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hdc1, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hdd1, internal journal EXT3-fs: mounted filesystem with ordered data mode. Linux agpgart interface v0.100 (c) Dave Jones agpgart: Detected ALi M1541 chipset agpgart: Maximum main memory to use for agp memory: 203M agpgart: AGP aperture is 64M @ 0xe0000000 cpci_hotplug: CompactPCI Hot Plug Core version: 0.2 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 pciehp: acpi_pciehprm:get_device PCI ROOT HID fail=0x1001 shpchp: acpi_shpchprm:get_device PCI ROOT HID fail=0x1001 PCI: Found IRQ 10 for device 0000:00:0d.0 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html 0000:00:0d.0: 3Com PCI 3c905 Boomerang 100baseTx at 0xd800. Vers LK1.1.19 PCI: Setting latency timer of device 0000:00:0d.0 to 64 eth0: Dropping NETIF_F_SG since no checksum feature. usbcore: registered new driver usbfs usbcore: registered new driver hub ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI) ohci_hcd: block sizes: ed 64 td 64 USB Universal Host Controller Interface driver v2.2 ttyS0: LSR safety check engaged! ttyS0: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS1: LSR safety check engaged! NET: Registered protocol family 10 Disabled Privacy Extensions on device c02f0580(lo) IPv6 over IPv4 tunneling driver processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 8 model name : AMD-K6(tm) 3D processor stepping : 12 cpu MHz : 400.859 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr bogomips : 792.57 Software Environment: options.l2tp.lns: ipcp-accept-local ipcp-accept-remote ms-dns 192.168.0.1 #ms-wins 10.1.96.3 auth crtscts idle 1800 mtu 1400 mru 1400 defaultroute nodetach debug lock proxyarp connect-delay 5000 racoon.conf: # # Simple racoon.conf # # # Please look in /usr/share/doc/racoon/examples for # the example that comes with the source. # # Please read racoon.conf(5) for details, and also # read setkey(8). # # Also read the Linux IPSEC Howto up at # http://www.ipsec-howto.org/t1.html # path pre_shared_key "/etc/racoon/psk.txt"; path certificate "/etc/racoon/certs"; log debug2; listen { isakmp 192.168.0.2; strict_address; } remote anonymous { exchange_mode main; doi ipsec_doi; situation identity_only; generate_policy on; verify_cert off; my_identifier asn1dn; peers_identifier asn1dn; verify_identifier on; certificate_type x509 "scooby_cert.pem" "scooby_key.pem"; proposal { encryption_algorithm 3des; hash_algorithm sha1; authentication_method rsasig; dh_group modp1024; } } sainfo anonymous { lifetime time 28800 sec; encryption_algorithm 3des ; authentication_algorithm hmac_md5; compression_algorithm deflate ; } portion of syslog preceeding the problem, and including the first of the error message. messages and trace seems to be identical and repeating indefinitly.: Aug 3 21:55:43 scooby pppd[3975]: sent [LCP EchoReq id=0x70 magic=0x3e763ee9] Aug 3 21:55:43 scooby pppd[3975]: rcvd [LCP EchoRep id=0x70 magic=0x8da75c9] Aug 3 21:56:13 scooby pppd[3975]: sent [LCP EchoReq id=0x71 magic=0x3e763ee9] Aug 3 21:56:13 scooby pppd[3975]: rcvd [LCP EchoRep id=0x71 magic=0x8da75c9] Aug 3 21:56:41 scooby l2tpd[1194]: check_control: control, cid = 0, Ns = 4, Nr = 59 Aug 3 21:56:43 scooby pppd[3975]: sent [LCP EchoReq id=0x72 magic=0x3e763ee9] Aug 3 21:56:43 scooby pppd[3975]: rcvd [LCP EchoRep id=0x72 magic=0x8da75c9] Aug 3 21:57:13 scooby pppd[3975]: sent [LCP EchoReq id=0x73 magic=0x3e763ee9] Aug 3 21:57:13 scooby pppd[3975]: rcvd [LCP EchoRep id=0x73 magic=0x8da75c9] Aug 3 21:57:41 scooby l2tpd[1194]: check_control: control, cid = 0, Ns = 4, Nr = 60 Aug 3 21:57:43 scooby pppd[3975]: sent [LCP EchoReq id=0x74 magic=0x3e763ee9] Aug 3 21:57:43 scooby pppd[3975]: rcvd [LCP EchoRep id=0x74 magic=0x8da75c9] Aug 3 21:58:13 scooby pppd[3975]: sent [LCP EchoReq id=0x75 magic=0x3e763ee9] Aug 3 21:58:13 scooby pppd[3975]: rcvd [LCP EchoRep id=0x75 magic=0x8da75c9] Aug 3 21:58:41 scooby l2tpd[1194]: check_control: control, cid = 0, Ns = 4, Nr = 61 Aug 3 21:58:43 scooby pppd[3975]: sent [LCP EchoReq id=0x76 magic=0x3e763ee9] Aug 3 21:58:43 scooby pppd[3975]: rcvd [LCP EchoRep id=0x76 magic=0x8da75c9] Aug 3 21:59:13 scooby pppd[3975]: sent [LCP EchoReq id=0x77 magic=0x3e763ee9] Aug 3 21:59:13 scooby racoon: DEBUG: === Aug 3 21:59:13 scooby racoon: DEBUG: 1116 bytes message received from 192.168.0.100[500] to 192.168.0.2[500] Aug 3 21:59:13 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08102001 d48272e2 0000045c 7bbec0a2 280a7f91 c7d45818 29e7efa1 f5edb562 25e2d94d 035809d3 531a5dc4 a5788256 1fa9bd30 4caa0e06 4da593f9 b8cfa9f4 571ee579 40682f9c fd676bbf 694c63a1 16e55cb6 64d6d491 1080f6fd 7ac0103f ce9dd9c1 27838b58 4a77ee04 e1ebd209 b386c792 9f5a405c 324ade2f ea9361b5 5e59c63b 7a835a2a 3e43860d 905d6c7e f59bbb9b 3926967b d153ffc2 e8f44a48 60dc16fa f1082e22 2f8f1e84 027a387d 16657978 147f3e76 e3c7cf5e 23265899 d7f7d43b 8f44ca43 7e451d4c 4f7f81fe 26aa518f 7f60b88f 2aecd19a 24fd9724 1a88c259 0497c0a7 bbf50cd5 1608ae47 fcdfe38e eb80c706 271664fc 07e43e47 2efde0d2 231359bf 7a924935 c0022be9 90824d55 fea279bc 14957031 db26a92e bfe71395 59ce5d44 37c13bbb dbec384d 06cb9741 3eed1116 ce582060 48360835 5ff9b961 a1db5978 bbc0649a 62241d36 f53ba9b9 23217d0f 6f4aea50 b4fccec2 da4da175 b75dbd8f f5dd5ba3 700869be a8c49a5d dc7452c6 9952c1d4 7605a19b 940ecd50 d217d398 4673a9af 7e70f403 90c743bc ee2754b2 2a6cc5b4 fd809cb1 ab569fce 14fe1 Aug 3 21:59:13 scooby racoon: DEBUG: compute IV for phase2 Aug 3 21:59:13 scooby racoon: DEBUG: phase1 last IV: Aug 3 21:59:13 scooby racoon: DEBUG: d589b86f 956f2b07 d48272e2 Aug 3 21:59:13 scooby racoon: DEBUG: hash(sha1) Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: phase2 IV computed: Aug 3 21:59:13 scooby racoon: DEBUG: c975fe48 1f39bbb6 Aug 3 21:59:13 scooby racoon: DEBUG: === Aug 3 21:59:13 scooby racoon: INFO: respond new phase 2 negotiation: 192.168.0.2[0]<=>192.168.0.100[0] Aug 3 21:59:13 scooby racoon: DEBUG: begin decryption. Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: IV was saved for next processing: Aug 3 21:59:13 scooby racoon: DEBUG: fb5332b8 6d9c5cbf Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: with key: Aug 3 21:59:13 scooby racoon: DEBUG: e0814bd6 704b9d63 54bf6496 64f8abdb b5e41d57 e08d61d9 Aug 3 21:59:13 scooby racoon: DEBUG: decrypted payload by IV: Aug 3 21:59:13 scooby racoon: DEBUG: fb5332b8 6d9c5cbf Aug 3 21:59:13 scooby racoon: DEBUG: decrypted payload, but not trimed. Aug 3 21:59:13 scooby racoon: DEBUG: 01000018 416fc129 f6e56e35 38696b7f 077c02b3 99fb3621 0a0003f4 00000001 00000001 0200005c 01030402 c072ec18 03000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 00000028 02030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 02020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000030 02030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 03020401 c072ec18 00000028 01020000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 02000030 03030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 04020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 04030401 7fc0da59 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 05020 Aug 3 21:59:13 scooby racoon: DEBUG: padding len=1 Aug 3 21:59:13 scooby racoon: DEBUG: skip to trim padding. Aug 3 21:59:13 scooby racoon: DEBUG: decrypted. Aug 3 21:59:13 scooby pppd[3975]: rcvd [LCP EchoRep id=0x77 magic=0x8da75c9] Aug 3 21:59:13 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08102001 d48272e2 0000045c 01000018 416fc129 f6e56e35 38696b7f 077c02b3 99fb3621 0a0003f4 00000001 00000001 0200005c 01030402 c072ec18 03000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 00000028 02030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 02020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000030 02030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 03020401 c072ec18 00000028 01020000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 02000030 03030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 04020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 04030401 7fc0da59 00000028 01030000 80010001 00020004 00000 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=8(hash) Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=1(sa) Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=10(nonce) Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=5(id) Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=5(id) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: received IDci2: Aug 3 21:59:13 scooby racoon: DEBUG: 011106a5 c0a80064 Aug 3 21:59:13 scooby racoon: DEBUG: received IDcr2: Aug 3 21:59:13 scooby racoon: DEBUG: 01110000 c0a80002 Aug 3 21:59:13 scooby racoon: DEBUG: HASH(1) validate: Aug 3 21:59:13 scooby racoon: DEBUG: 416fc129 f6e56e35 38696b7f 077c02b3 99fb3621 Aug 3 21:59:13 scooby racoon: DEBUG: HASH with: Aug 3 21:59:13 scooby racoon: DEBUG: d48272e2 0a0003f4 00000001 00000001 0200005c 01030402 c072ec18 03000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 00000028 02030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 02020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000030 02030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 03020401 c072ec18 00000028 01020000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 02000030 03030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 04020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 04030401 7fc0da59 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 05020401 c072ec18 00000028 01020000 80010001 00020 Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby racoon: DEBUG: HASH computed: Aug 3 21:59:13 scooby racoon: DEBUG: 416fc129 f6e56e35 38696b7f 077c02b3 99fb3621 Aug 3 21:59:13 scooby racoon: DEBUG: anonymous sainfo selected. Aug 3 21:59:13 scooby racoon: DEBUG: get sa info: anonymous Aug 3 21:59:13 scooby racoon: DEBUG: get a src address from ID payload 192.168.0.100[1701] prefixlen=32 ul_proto=17 Aug 3 21:59:13 scooby racoon: DEBUG: get dst address from ID payload 192.168.0.2[0] prefixlen=32 ul_proto=17 Aug 3 21:59:13 scooby racoon: DEBUG: sub:0xbffff8e0: 192.168.0.100/32[1701] 192.168.0.2/32[0] proto=udp dir=in Aug 3 21:59:13 scooby racoon: DEBUG: db: 0x80aa020: 192.168.0.100/32[1701] 192.168.0.2/32[0] proto=udp dir=in Aug 3 21:59:13 scooby racoon: DEBUG: 0xbffff8e0 masked with /32: 192.168.0.100[1701] Aug 3 21:59:13 scooby racoon: DEBUG: 0x80aa020 masked with /32: 192.168.0.100[1701] Aug 3 21:59:13 scooby racoon: DEBUG: 0xbffff8e0 masked with /32: 192.168.0.2[0] Aug 3 21:59:13 scooby racoon: DEBUG: 0x80aa020 masked with /32: 192.168.0.2[0] Aug 3 21:59:13 scooby racoon: DEBUG: sub:0xbffff8e0: 192.168.0.2/32[0] 192.168.0.100/32[1701] proto=udp dir=out Aug 3 21:59:13 scooby racoon: DEBUG: db: 0x80aa020: 192.168.0.100/32[1701] 192.168.0.2/32[0] proto=udp dir=in Aug 3 21:59:13 scooby racoon: DEBUG: sub:0xbffff8e0: 192.168.0.2/32[0] 192.168.0.100/32[1701] proto=udp dir=out Aug 3 21:59:13 scooby racoon: DEBUG: db: 0x80aa258: 192.168.0.2/32[0] 192.168.0.100/32[1701] proto=udp dir=out Aug 3 21:59:13 scooby racoon: DEBUG: 0xbffff8e0 masked with /32: 192.168.0.2[0] Aug 3 21:59:13 scooby racoon: DEBUG: 0x80aa258 masked with /32: 192.168.0.2[0] Aug 3 21:59:13 scooby racoon: DEBUG: 0xbffff8e0 masked with /32: 192.168.0.100[1701] Aug 3 21:59:13 scooby racoon: DEBUG: 0x80aa258 masked with /32: 192.168.0.100[1701] Aug 3 21:59:13 scooby racoon: DEBUG: suitable SP found:192.168.0.2/32[0] 192.168.0.100/32[1701] proto=udp dir=out Aug 3 21:59:13 scooby racoon: DEBUG: (proto_id=ESP spisize=4 spi=00000000 spi_p=00000000 encmode=Transport reqid=0:0) Aug 3 21:59:13 scooby racoon: DEBUG: (trns_id=3DES encklen=0 authtype=hmac-md5) Aug 3 21:59:13 scooby racoon: DEBUG: total SA len=1008 Aug 3 21:59:13 scooby racoon: DEBUG: 00000001 00000001 0200005c 01030402 c072ec18 03000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 00000028 02030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 02020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000030 02030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 03020401 c072ec18 00000028 01020000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 02000030 03030401 7fc0da59 00000024 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 02000034 04020401 c072ec18 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 04030401 7fc0da59 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050002 02000034 05020401 c072ec18 00000028 01020000 80010001 00020004 00000e10 80010 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=2(prop) Aug 3 21:59:13 scooby last message repeated 17 times Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: proposal #1 len=92 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: transform #2 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #2 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #2 len=48 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=36 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: proposal #3 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: proposal #3 len=48 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=36 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: proposal #4 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #4 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #5 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: proposal #5 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: proposal #6 len=92 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: transform #2 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #7 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #7 len=48 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=36 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: proposal #8 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: proposal #8 len=48 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=36 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: proposal #9 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #9 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: proposal #10 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: proposal #10 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: pair 1: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80abf18: next=(nil) tnext=0x80a9858 Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a9858: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #1: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 2: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a77e0: next=0x80a5bd0 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a5bd0: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #2: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 3: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a8688: next=0x80a8478 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a8478: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #3: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 4: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a8490: next=0x80a63d0 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a63d0: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #4: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 5: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a63e8: next=0x80a8f50 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a8f50: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #5: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 6: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a8f68: next=(nil) tnext=0x80a9890 Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a9890: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #6: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 7: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a98a8: next=0x80a98c0 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a98c0: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #7: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 8: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80ac080: next=0x80ac098 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80ac098: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #8: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 9: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80ac0b0: next=0x80abf70 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80abf70: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #9: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: pair 10: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80abf88: next=0x80abfa0 tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: 0x80abfa0: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #10: 2 transform Aug 3 21:59:13 scooby racoon: DEBUG: begin compare proposals. Aug 3 21:59:13 scooby racoon: DEBUG: pair[1]: 0x80abf18 Aug 3 21:59:13 scooby racoon: DEBUG: 0x80abf18: next=(nil) tnext=0x80a9858 Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a9858: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: prop#=1 prot-id=ESP spi-size=4 #trns=2 trns#=1 trns-id=3DES Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: prop#=1 prot-id=ESP spi-size=4 #trns=2 trns#=2 trns-id=3DES Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-sha Aug 3 21:59:13 scooby racoon: DEBUG: peer's single bundle: Aug 3 21:59:13 scooby racoon: DEBUG: (proto_id=ESP spisize=4 spi=c072ec18 spi_p=00000000 encmode=Transport reqid=0:0) Aug 3 21:59:13 scooby racoon: DEBUG: (trns_id=3DES encklen=0 authtype=hmac-md5) Aug 3 21:59:13 scooby racoon: DEBUG: (trns_id=3DES encklen=0 authtype=hmac-sha) Aug 3 21:59:13 scooby racoon: DEBUG: my single bundle: Aug 3 21:59:13 scooby racoon: DEBUG: (proto_id=ESP spisize=4 spi=00000000 spi_p=00000000 encmode=Transport reqid=0:0) Aug 3 21:59:13 scooby racoon: DEBUG: (trns_id=3DES encklen=0 authtype=hmac-md5) Aug 3 21:59:13 scooby racoon: DEBUG: matched Aug 3 21:59:13 scooby racoon: DEBUG: === Aug 3 21:59:13 scooby racoon: DEBUG: call pfkey_send_getspi Aug 3 21:59:13 scooby racoon: DEBUG: pfkey GETSPI sent: ESP/Transport 192.168.0.100->192.168.0.2 Aug 3 21:59:13 scooby racoon: DEBUG: pfkey getspi sent. Aug 3 21:59:13 scooby racoon: DEBUG: get pfkey GETSPI message Aug 3 21:59:13 scooby racoon: DEBUG2: 02010003 18000000 57032238 6e0f0000 02000100 0e66db7c 00000000 00000000 04000300 00000000 00000000 00000000 1e000000 00000000 00000000 00000000 04000400 00000000 00000000 00000000 00000000 00000000 00000000 00000000 04000200 00000000 00000000 00000000 91ee0f41 00000000 00000000 00000000 03000500 00200000 02000000 c0a80064 00000000 00000000 03000600 00200000 02000000 c0a80002 00000000 00000000 02001300 01000000 00000000 00000000 Aug 3 21:59:13 scooby racoon: DEBUG: pfkey GETSPI succeeded: ESP/Transport 192.168.0.100->192.168.0.2 spi=241621884(0xe66db7c) Aug 3 21:59:13 scooby racoon: DEBUG: total SA len=60 Aug 3 21:59:13 scooby racoon: DEBUG: 00000001 00000001 00000034 01030401 00000000 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=2(prop) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: proposal #1 len=52 Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=3(trns) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: transform #1 len=40 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=seconds Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Type, flag=0x8000, lorv=kilobytes Aug 3 21:59:13 scooby racoon: DEBUG: type=SA Life Duration, flag=0x0000, lorv=4 Aug 3 21:59:13 scooby racoon: DEBUG: type=Encryption Mode, flag=0x8000, lorv=Transport Aug 3 21:59:13 scooby racoon: DEBUG: type=Authentication Algorithm, flag=0x8000, lorv=hmac-md5 Aug 3 21:59:13 scooby racoon: DEBUG: pair 1: Aug 3 21:59:13 scooby racoon: DEBUG: 0x80a77e0: next=(nil) tnext=(nil) Aug 3 21:59:13 scooby racoon: DEBUG: proposal #1: 1 transform Aug 3 21:59:13 scooby racoon: DEBUG: add payload of len 60, next type 10 Aug 3 21:59:13 scooby racoon: DEBUG: add payload of len 16, next type 5 Aug 3 21:59:13 scooby racoon: DEBUG: add payload of len 8, next type 5 Aug 3 21:59:13 scooby racoon: DEBUG: add payload of len 8, next type 0 Aug 3 21:59:13 scooby racoon: DEBUG: HASH with: Aug 3 21:59:13 scooby racoon: DEBUG: d48272e2 3ea5d7bf 02b62d71 b37efd97 30013a15 020cfc8c 0a000040 00000001 00000001 00000034 01030401 0e66db7c 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 05000014 d26aff15 3d0b02f5 67c81d7f a4fc003e 0500000c 011106a5 c0a80064 0000000c 01110000 c0a80002 Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby racoon: DEBUG: HASH computed: Aug 3 21:59:13 scooby racoon: DEBUG: 05a385f9 7d0d36c4 e5b74449 7fed7dfa 70415905 Aug 3 21:59:13 scooby racoon: DEBUG: add payload of len 20, next type 1 Aug 3 21:59:13 scooby racoon: DEBUG: begin encryption. Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: pad length = 4 Aug 3 21:59:13 scooby racoon: DEBUG: 01000018 05a385f9 7d0d36c4 e5b74449 7fed7dfa 70415905 0a000040 00000001 00000001 00000034 01030401 0e66db7c 00000028 01030000 80010001 00020004 00000e10 80010002 00020004 0003d090 80040002 80050001 05000014 d26aff15 3d0b02f5 67c81d7f a4fc003e 0500000c 011106a5 c0a80064 0000000c 01110000 c0a80002 62c4d403 Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: with key: Aug 3 21:59:13 scooby racoon: DEBUG: e0814bd6 704b9d63 54bf6496 64f8abdb b5e41d57 e08d61d9 Aug 3 21:59:13 scooby racoon: DEBUG: encrypted payload by IV: Aug 3 21:59:13 scooby racoon: DEBUG: 02132a91 a14258ce Aug 3 21:59:13 scooby racoon: DEBUG: save IV for next: Aug 3 21:59:13 scooby racoon: DEBUG: 02132a91 a14258ce Aug 3 21:59:13 scooby racoon: DEBUG: encrypted. Aug 3 21:59:13 scooby racoon: DEBUG: 164 bytes from 192.168.0.2[500] to 192.168.0.100[500] Aug 3 21:59:13 scooby racoon: DEBUG: sockname 192.168.0.2[500] Aug 3 21:59:13 scooby racoon: DEBUG: send packet from 192.168.0.2[500] Aug 3 21:59:13 scooby racoon: DEBUG: send packet to 192.168.0.100[500] Aug 3 21:59:13 scooby racoon: DEBUG: src4 192.168.0.2[500] Aug 3 21:59:13 scooby racoon: DEBUG: dst4 192.168.0.100[500] Aug 3 21:59:13 scooby racoon: DEBUG: 1 times of 164 bytes message will be sent to 192.168.0.2[500] Aug 3 21:59:13 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08102001 d48272e2 000000a4 bb97981a 572e0599 8d18a65f 8436564b 4288fad8 c46126d3 f31eae1f f152d8d4 99b888cb c4bc1cdb 0601e679 cb4c5007 949b0461 106b3000 1b64661f cb7fd72f 8e1c6628 4b79ab0e 2dc7f80f 8ac126b4 4af20066 fcd13a14 29461c26 757feb7d 0c4712ee f45d2415 4d4b870b 5f22cd4c 11badbb0 0250889e b0cdb938 9517caad 02132a91 a14258ce Aug 3 21:59:13 scooby racoon: DEBUG: resend phase2 packet e439faa2df4fcd2d:6f7069be243c45c7:0000d482 Aug 3 21:59:13 scooby racoon: DEBUG: === Aug 3 21:59:13 scooby racoon: DEBUG: 52 bytes message received from 192.168.0.100[500] to 192.168.0.2[500] Aug 3 21:59:13 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08102001 d48272e2 00000034 b1c1d0ee 3169ba37 fbfbaed2 6f47f81a a507e835 fb9bffb6 Aug 3 21:59:13 scooby racoon: DEBUG: begin decryption. Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: IV was saved for next processing: Aug 3 21:59:13 scooby racoon: DEBUG: a507e835 fb9bffb6 Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: with key: Aug 3 21:59:13 scooby racoon: DEBUG: e0814bd6 704b9d63 54bf6496 64f8abdb b5e41d57 e08d61d9 Aug 3 21:59:13 scooby racoon: DEBUG: decrypted payload by IV: Aug 3 21:59:13 scooby racoon: DEBUG: a507e835 fb9bffb6 Aug 3 21:59:13 scooby racoon: DEBUG: decrypted payload, but not trimed. Aug 3 21:59:13 scooby racoon: DEBUG: 00000018 b33064f9 a01ad7f1 d06a8614 7b1f4381 95af180f Aug 3 21:59:13 scooby racoon: DEBUG: padding len=16 Aug 3 21:59:13 scooby racoon: DEBUG: skip to trim padding. Aug 3 21:59:13 scooby racoon: DEBUG: decrypted. Aug 3 21:59:13 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08102001 d48272e2 00000034 00000018 b33064f9 a01ad7f1 d06a8614 7b1f4381 95af180f Aug 3 21:59:13 scooby racoon: DEBUG: begin. Aug 3 21:59:13 scooby racoon: DEBUG: seen nptype=8(hash) Aug 3 21:59:13 scooby racoon: DEBUG: succeed. Aug 3 21:59:13 scooby racoon: DEBUG: HASH(3) validate: Aug 3 21:59:13 scooby racoon: DEBUG: b33064f9 a01ad7f1 d06a8614 7b1f4381 95af180f Aug 3 21:59:13 scooby racoon: DEBUG: HASH with: Aug 3 21:59:13 scooby racoon: DEBUG: 00d48272 e23ea5d7 bf02b62d 71b37efd 9730013a 15020cfc 8cd26aff 153d0b02 f567c81d 7fa4fc00 3e Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby racoon: DEBUG: HASH computed: Aug 3 21:59:13 scooby racoon: DEBUG: b33064f9 a01ad7f1 d06a8614 7b1f4381 95af180f Aug 3 21:59:13 scooby racoon: DEBUG: === Aug 3 21:59:13 scooby racoon: DEBUG: KEYMAT compute with Aug 3 21:59:13 scooby racoon: DEBUG: 030e66db 7c3ea5d7 bf02b62d 71b37efd 9730013a 15020cfc 8cd26aff 153d0b02 f567c81d 7fa4fc00 3e Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_md5) Aug 3 21:59:13 scooby racoon: DEBUG: encklen=192 authklen=128 Aug 3 21:59:13 scooby racoon: DEBUG: generating 640 bits of key (dupkeymat=4) Aug 3 21:59:13 scooby racoon: DEBUG: generating K1...K4 for KEYMAT. Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby last message repeated 2 times Aug 3 21:59:13 scooby racoon: DEBUG: 44fe759a 613f2253 f07f473f b69bd9a0 636e32e3 7bab6b95 05d2e75c 32fc8f2a 079f2ee2 7dfd1a97 409c333b 53295a34 2b0cfb11 d987fbac caddcd52 9025d3b5 3fe17e0c 8b3218ff 19e83f37 a10feb81 Aug 3 21:59:13 scooby racoon: DEBUG: KEYMAT compute with Aug 3 21:59:13 scooby racoon: DEBUG: 03c072ec 183ea5d7 bf02b62d 71b37efd 9730013a 15020cfc 8cd26aff 153d0b02 f567c81d 7fa4fc00 3e Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_md5) Aug 3 21:59:13 scooby racoon: DEBUG: encklen=192 authklen=128 Aug 3 21:59:13 scooby racoon: DEBUG: generating 640 bits of key (dupkeymat=4) Aug 3 21:59:13 scooby racoon: DEBUG: generating K1...K4 for KEYMAT. Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:13 scooby last message repeated 2 times Aug 3 21:59:13 scooby racoon: DEBUG: 0c152d12 073ffb51 cad0263b b1153c91 37785e6a c2284721 f1f131d7 b2623e0e 779628b7 cef91303 e384cded 03335cce 8d198749 07acb210 d98810ed 7266b191 4dbbe9aa f5be72f1 6e5f6e3b 10cd8f41 Aug 3 21:59:13 scooby racoon: DEBUG: KEYMAT computed. Aug 3 21:59:13 scooby racoon: DEBUG: call pk_sendupdate Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_md5) Aug 3 21:59:13 scooby racoon: DEBUG: call pfkey_send_update_nat Aug 3 21:59:13 scooby racoon: DEBUG: pfkey update sent. Aug 3 21:59:13 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:13 scooby racoon: DEBUG: hmac(hmac_md5) Aug 3 21:59:13 scooby racoon: DEBUG: call pfkey_send_add_nat Aug 3 21:59:14 scooby racoon: DEBUG: pfkey add sent. Aug 3 21:59:14 scooby racoon: DEBUG: === Aug 3 21:59:14 scooby racoon: DEBUG: 68 bytes message received from 192.168.0.100[500] to 192.168.0.2[500] Aug 3 21:59:14 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08100501 524480bd 00000044 204abdb1 76d81c76 cef865ed e4062372 2b7a6678 76e6a3e7 5f1db06a 5605f5e8 4d0baf02 1c67fefc Aug 3 21:59:14 scooby racoon: DEBUG: receive Information. Aug 3 21:59:14 scooby racoon: DEBUG: compute IV for phase2 Aug 3 21:59:14 scooby racoon: DEBUG: phase1 last IV: Aug 3 21:59:14 scooby racoon: DEBUG: d589b86f 956f2b07 524480bd Aug 3 21:59:14 scooby racoon: DEBUG: hash(sha1) Aug 3 21:59:14 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:14 scooby racoon: DEBUG: phase2 IV computed: Aug 3 21:59:14 scooby racoon: DEBUG: e26970dd b85e38d4 Aug 3 21:59:14 scooby racoon: DEBUG: begin decryption. Aug 3 21:59:14 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:14 scooby racoon: DEBUG: IV was saved for next processing: Aug 3 21:59:14 scooby racoon: DEBUG: 4d0baf02 1c67fefc Aug 3 21:59:14 scooby racoon: DEBUG: encription(3des) Aug 3 21:59:14 scooby racoon: DEBUG: with key: Aug 3 21:59:14 scooby racoon: DEBUG: e0814bd6 704b9d63 54bf6496 64f8abdb b5e41d57 e08d61d9 Aug 3 21:59:14 scooby racoon: DEBUG: decrypted payload by IV: Aug 3 21:59:14 scooby racoon: DEBUG: 4d0baf02 1c67fefc Aug 3 21:59:14 scooby racoon: DEBUG: decrypted payload, but not trimed. Aug 3 21:59:14 scooby racoon: DEBUG: 0c000018 25e0d47f 66545c70 ef1396c8 a53f2dbd 79b5364b 00000010 00000001 03040001 55b1fcde Aug 3 21:59:14 scooby racoon: DEBUG: padding len=223 Aug 3 21:59:14 scooby racoon: DEBUG: skip to trim padding. Aug 3 21:59:14 scooby racoon: DEBUG: decrypted. Aug 3 21:59:14 scooby racoon: DEBUG: e439faa2 df4fcd2d 6f7069be 243c45c7 08100501 524480bd 00000044 0c000018 25e0d47f 66545c70 ef1396c8 a53f2dbd 79b5364b 00000010 00000001 03040001 55b1fcde Aug 3 21:59:14 scooby racoon: DEBUG: HASH with: Aug 3 21:59:14 scooby racoon: DEBUG: 524480bd 00000010 00000001 03040001 55b1fcde Aug 3 21:59:14 scooby racoon: DEBUG: hmac(hmac_sha1) Aug 3 21:59:14 scooby racoon: DEBUG: HASH computed: Aug 3 21:59:14 scooby racoon: DEBUG: 25e0d47f 66545c70 ef1396c8 a53f2dbd 79b5364b Aug 3 21:59:14 scooby racoon: DEBUG: hash validated. Aug 3 21:59:14 scooby racoon: DEBUG: begin. Aug 3 21:59:14 scooby racoon: DEBUG: seen nptype=8(hash) Aug 3 21:59:14 scooby racoon: DEBUG: seen nptype=12(delete) Aug 3 21:59:14 scooby racoon: DEBUG: succeed. Aug 3 21:59:14 scooby racoon: DEBUG: call pfkey_send_dump Aug 3 21:59:14 scooby racoon: DEBUG: check spi(packet)=1437727966 spi(db)=3228757016. Aug 3 21:59:14 scooby racoon: DEBUG: check spi(packet)=1437727966 spi(db)=1437727966. Aug 3 21:59:14 scooby racoon: INFO: purged IPsec-SA proto_id=ESP spi=1437727966. Aug 3 21:59:14 scooby racoon: DEBUG: purged SAs. Aug 3 21:59:14 scooby racoon: DEBUG: get pfkey UPDATE message Aug 3 21:59:14 scooby racoon: DEBUG2: 02020003 1b000000 57032238 6e0f0000 02000100 0e66db7c 04010203 00000000 04000300 00000000 00000000 00000000 100e0000 00000000 00000000 00000000 04000400 00000000 00000000 00000000 400b0000 00000000 00000000 00000000 04000200 00000000 00000000 00000000 91ee0f41 00000000 00000000 00000000 03000500 00200000 02000000 c0a80064 00000000 00000000 03000600 00200000 02000000 c0a80002 00000000 00000000 03000700 ff000000 02000000 00000000 00000000 00000000 02001300 01000000 00000000 00000000 Aug 3 21:59:14 scooby racoon: DEBUG: pfkey UPDATE succeeded: ESP/Transport 192.168.0.100->192.168.0.2 spi=241621884(0xe66db7c) Aug 3 21:59:14 scooby racoon: INFO: IPsec-SA established: ESP/Transport 192.168.0.100->192.168.0.2 spi=241621884(0xe66db7c) Aug 3 21:59:14 scooby racoon: DEBUG: === Aug 3 21:59:14 scooby racoon: DEBUG: get pfkey ADD message Aug 3 21:59:14 scooby racoon: DEBUG2: 02030003 1b000000 57032238 6e0f0000 02000100 c072ec18 04010203 00000000 04000300 00000000 00000000 00000000 100e0000 00000000 00000000 00000000 04000400 00000000 00000000 00000000 400b0000 00000000 00000000 00000000 04000200 00000000 00000000 00000000 92ee0f41 00000000 00000000 00000000 03000500 00200000 02000000 c0a80002 00000000 00000000 03000600 00200000 02000000 c0a80064 00000000 00000000 03000700 ff000000 02000000 00000000 00000000 00000000 02001300 01000000 00000000 00000000 Aug 3 21:59:14 scooby racoon: INFO: IPsec-SA established: ESP/Transport 192.168.0.2->192.168.0.100 spi=3228757016(0xc072ec18) Aug 3 21:59:14 scooby racoon: DEBUG: === Aug 3 21:59:14 scooby racoon: DEBUG: get pfkey DELETE message Aug 3 21:59:14 scooby racoon: DEBUG2: 02040003 0a000000 00000000 6e0f0000 02000100 55b1fcde 00000000 00000000 03000500 ff200000 02000000 c0a80002 00000000 00000000 03000600 ff200000 02000000 c0a80064 00000000 00000000 Aug 3 21:59:14 scooby racoon: DEBUG: DELETE message is not interesting because the message was originated by me. Aug 3 21:59:40 scooby racoon: DEBUG: get pfkey EXPIRE message Aug 3 21:59:40 scooby racoon: DEBUG2: 02080003 17000000 00000000 00000000 02000100 081bb4e6 04030203 00000000 04000300 00000000 00000000 00000000 100e0000 00000000 00000000 00000000 04000200 e9010000 2a880100 00000000 9ce00f41 00000000 9de00f41 00000000 03000500 00200000 02000000 c0a80064 00000000 00000000 03000600 00200000 02000000 c0a80002 00000000 00000000 03000700 ff000000 02000000 00000000 00000000 00000000 02001300 01000000 00000000 00000000 Aug 3 21:59:40 scooby racoon: INFO: IPsec-SA expired: ESP/Transport 192.168.0.100->192.168.0.2 spi=136033510(0x81bb4e6) Aug 3 21:59:40 scooby racoon: DEBUG: no such a SA found: ESP/Transport 192.168.0.100->192.168.0.2 spi=136033510(0x81bb4e6) Aug 3 21:59:41 scooby l2tpd[1194]: check_control: control, cid = 0, Ns = 4, Nr = 62 Aug 3 21:59:41 scooby kernel: bad: scheduling while atomic! Aug 3 21:59:41 scooby kernel: [schedule+60/1002] schedule+0x3c/0x3ea Aug 3 21:59:41 scooby kernel: [default_idle+0/38] default_idle+0x0/0x26 Aug 3 21:59:41 scooby kernel: [cpu_idle+48/50] cpu_idle+0x30/0x32 Aug 3 21:59:41 scooby kernel: [start_kernel+388/392] start_kernel+0x184/0x188 Aug 3 21:59:41 scooby kernel: Aug 3 21:59:41 scooby kernel: bad: scheduling while atomic! Aug 3 21:59:41 scooby kernel: [schedule+60/1002] schedule+0x3c/0x3ea Aug 3 21:59:41 scooby kernel: [default_idle+0/38] default_idle+0x0/0x26 Aug 3 21:59:41 scooby kernel: [cpu_idle+48/50] cpu_idle+0x30/0x32 Aug 3 21:59:41 scooby kernel: [start_kernel+388/392] start_kernel+0x184/0x188 Aug 3 21:59:41 scooby kernel: Problem Description: If I connect one of my l2tp over ipsec (ipsec in transport mode) clients (Up to date Windows XP, using x509 auth), connection works, but after some time passes (anything from minutes to hours, doesn't appear to be affected by traffic amount through the tunnel) Steps to reproduce: Simply start the XP vpn connection and wait. Feel free to contact me for additional information. ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From acid@krezus.e-wro.net Wed Aug 4 02:14:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 02:14:26 -0700 (PDT) Received: from krezus.e-wro.net (krezus.e-wro.net [82.143.159.250]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i749EKWA019030 for ; Wed, 4 Aug 2004 02:14:21 -0700 Received: from krezus.e-wro.net (localhost [127.0.0.1]) by krezus.e-wro.net (8.12.10/8.12.10) with ESMTP id i749E4OC000414; Wed, 4 Aug 2004 11:14:04 +0200 Received: (from acid@localhost) by krezus.e-wro.net (8.12.10/8.12.10/Submit) id i749E261000413; Wed, 4 Aug 2004 11:14:02 +0200 Date: Wed, 4 Aug 2004 11:14:02 +0200 From: Tomasz Paszkowski To: Patrick McHardy Cc: "David S. Miller" , hadi@cyberus.ca, devik@cdi.cz, netdev@oss.sgi.com Subject: Re: Fw: hfsc and huge set of rules Message-ID: <20040804091402.GB30364@krezus.e-wro.net> References: <20040729211844.61e8d328.davem@redhat.com> <410A2449.3020701@trash.net> <20040730110815.GA7812@krezus.e-wro.net> <410D2E30.2050104@trash.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xXmbgvnjoT4axfJE" Content-Disposition: inline In-Reply-To: <410D2E30.2050104@trash.net> User-Agent: Mutt/1.4i X-NCC-RegID: pl.e-wro X-Scanned-By: MIMEDefang 2.42 X-archive-position: 7487 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tomasz.paszkowski@e-wro.pl Precedence: bulk X-list: netdev Content-Length: 1063 Lines: 43 --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 01, 2004 at 07:53:52PM +0200, Patrick McHardy wrote: > I've done some profiles with your script (on an old kernel without > the lockless loopback patch), qdisc_destroy takes up 89% of the time > when destroying the qdiscs. >=20 > These are the exact results: >=20 > - execute the script on kernel using double-linked lists for=20 > dev->qdisc_list: >=20 > time: > real 0m51.804s > user 0m2.286s > sys 0m48.795s The results are great ! Thanks ! I'am using hfsc with 2.4.x kernel so there= will be no problem with lockless loopback patch ;] So could you please send me a patch ? --=20 Tomasz Paszkowski --xXmbgvnjoT4axfJE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBEKjacNXOL98XeysRAsD+AJ9N8kuFRVVGPhwcmOX3zzoIc7PcBwCePN4Y KtoRRqExgx+zRZrwtwcD51o= =0LUN -----END PGP SIGNATURE----- --xXmbgvnjoT4axfJE-- From herbert@gondor.apana.org.au Wed Aug 4 02:56:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 02:56: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 i749uK0M026268 for ; Wed, 4 Aug 2004 02:56: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 1BsIV1-0007it-00; Wed, 04 Aug 2004 19:55:55 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BsIUx-0001As-00; Wed, 04 Aug 2004 19:55:51 +1000 From: Herbert Xu To: akpm@osdl.org (Andrew Morton) Subject: Re: Fw: [Bugme-new] [Bug 3151] New: IPSEC triggers "bad: scheduling while atomic!" errors. Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20040803224319.50363100.akpm@osdl.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Wed, 04 Aug 2004 19:55:51 +1000 X-archive-position: 7488 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: 639 Lines: 18 Andrew Morton wrote: > > Looks like a lock/unlock imbalance somewhere in the 2.6.7 ipsec code. Yes this is most likely the missing unlock in xfrm_policy_timer() that was fixed not so long ago. However, that bug was only introduced in 2.6.7 and the submitter says that he saw this with 2.6.6. So this might be something else. So the submitter should test 2.6.8-rc3 to see if it's still there or not. 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 Wed Aug 4 03:12:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 03:12: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 i74ACDZK027392 for ; Wed, 4 Aug 2004 03:12: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 1BsIkV-0007uF-00; Wed, 04 Aug 2004 20:11:55 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BsIkR-0001Hu-00; Wed, 04 Aug 2004 20:11:51 +1000 Date: Wed, 4 Aug 2004 20:11:51 +1000 To: Masahide Nakamura Cc: Stephen Hemminger , netdev@oss.sgi.com Subject: Re: [PATCH][IPROUTE2] clean xfrm message format Message-ID: <20040804101151.GA4940@gondor.apana.org.au> References: <20040803164539.41a0a975@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040803164539.41a0a975@localhost> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7489 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: 459 Lines: 15 On Tue, Aug 03, 2004 at 04:45:39PM -0700, Masahide Nakamura wrote: > > This is a patch for ip xfrm and against for the latest > snapshot(iproute2-2.6.8-ss040730.tar.gz). Please apply it. Yes this looks great. Thanks a lot for your work. 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 jmorris@redhat.com Wed Aug 4 06:00:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 06:00:25 -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 i74D0ILW005973 for ; Wed, 4 Aug 2004 06:00:19 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74D0Ae1014906; Wed, 4 Aug 2004 09:00:10 -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 i74D0Aa20598; Wed, 4 Aug 2004 09:00: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 i74D0BtM018547; Wed, 4 Aug 2004 09:00:11 -0400 Date: Wed, 4 Aug 2004 09:00:09 -0400 (EDT) From: James Morris X-X-Sender: jmorris@dhcp83-76.boston.redhat.com To: Andrew Morton cc: netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3151] New: IPSEC triggers "bad: scheduling while atomic!" errors. In-Reply-To: <20040803224319.50363100.akpm@osdl.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7491 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: 258 Lines: 15 On Tue, 3 Aug 2004, Andrew Morton wrote: > > Looks like a lock/unlock imbalance somewhere in the 2.6.7 ipsec code. This could also be ppp related, oops related to this code seem to be reported regularly. - James -- James Morris From acid@krezus.e-wro.net Wed Aug 4 05:59:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 05:59:41 -0700 (PDT) Received: from krezus.e-wro.net (krezus.e-wro.net [82.143.159.250]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74CxZjG005879 for ; Wed, 4 Aug 2004 05:59:36 -0700 Received: from krezus.e-wro.net (localhost [127.0.0.1]) by krezus.e-wro.net (8.12.10/8.12.10) with ESMTP id i74CxQOC015450; Wed, 4 Aug 2004 14:59:26 +0200 Received: (from acid@localhost) by krezus.e-wro.net (8.12.10/8.12.10/Submit) id i74CxQHD015449; Wed, 4 Aug 2004 14:59:26 +0200 Date: Wed, 4 Aug 2004 14:59:26 +0200 From: Tomasz Paszkowski To: davem@redhat.com Cc: kaber@trash.net, netdev@oss.sgi.com Subject: [PATCH 2.4] Use double-linked list for dev->qdisc_list Message-ID: <20040804125926.GA15324@krezus.e-wro.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline User-Agent: Mutt/1.4i X-NCC-RegID: pl.e-wro X-Scanned-By: MIMEDefang 2.42 X-archive-position: 7490 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tomasz.paszkowski@e-wro.pl Precedence: bulk X-list: netdev Content-Length: 6582 Lines: 248 --ftEhullJWpWg/VHq Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This patch changes dev->qdisc_list to a double-linked list. This solves the performance problems when destroying qdiscs with large number of inner qdiscs. This is backported version of Patrick McHardy patch (03-qdisc_list-list_h.d= iff) for 2.6 kernels. --=20 Tomasz Paszkowski --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="03-qdisc_list-list_h_2.4.27-rc5.diff" Content-Transfer-Encoding: quoted-printable diff -Nru linux-2.4.27-rc5_van/include/linux/netdevice.h linux-2.4.27-rc5/i= nclude/linux/netdevice.h --- linux-2.4.27-rc5_van/include/linux/netdevice.h 2004-08-04 16:37:39.0000= 00000 +0200 +++ linux-2.4.27-rc5/include/linux/netdevice.h 2004-08-04 16:22:08.00000000= 0 +0200 @@ -352,8 +352,8 @@ =20 struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; - struct Qdisc *qdisc_list; struct Qdisc *qdisc_ingress; + struct list_head qdisc_list; unsigned long tx_queue_len; /* Max frames per queue allowed */ =20 /* hard_start_xmit synchronizer */ diff -Nru linux-2.4.27-rc5_van/include/net/pkt_sched.h linux-2.4.27-rc5/inc= lude/net/pkt_sched.h --- linux-2.4.27-rc5_van/include/net/pkt_sched.h 2004-02-18 14:36:32.000000= 000 +0100 +++ linux-2.4.27-rc5/include/net/pkt_sched.h 2004-08-04 16:22:08.000000000 = +0200 @@ -80,11 +80,11 @@ #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 struct Qdisc_ops *ops; - struct Qdisc *next; u32 handle; atomic_t refcnt; struct sk_buff_head q; struct net_device *dev; + struct list_head list; =20 struct tc_stats stats; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); diff -Nru linux-2.4.27-rc5_van/net/sched/sch_api.c linux-2.4.27-rc5/net/sch= ed/sch_api.c --- linux-2.4.27-rc5_van/net/sched/sch_api.c 2002-11-29 00:53:16.000000000 = +0100 +++ linux-2.4.27-rc5/net/sched/sch_api.c 2004-08-04 16:26:55.000000000 +0200 @@ -32,6 +32,7 @@ #include #include #include +#include =20 #include #include @@ -193,7 +194,7 @@ { struct Qdisc *q; =20 - for (q =3D dev->qdisc_list; q; q =3D q->next) { + list_for_each_entry(q, &dev->qdisc_list, list) { if (q->handle =3D=3D handle) return q; } @@ -424,6 +425,7 @@ =20 memset(sch, 0, size); =20 + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); =20 if (handle =3D=3D TC_H_INGRESS) @@ -449,8 +451,7 @@ =20 if (!ops->init || (err =3D ops->init(sch, tca[TCA_OPTIONS-1])) =3D=3D 0) { write_lock(&qdisc_tree_lock); - sch->next =3D dev->qdisc_list; - dev->qdisc_list =3D sch; + list_add_tail(&sch->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) @@ -805,9 +806,9 @@ if (idx > s_idx) s_q_idx =3D 0; read_lock(&qdisc_tree_lock); - for (q =3D dev->qdisc_list, q_idx =3D 0; q; - q =3D q->next, q_idx++) { - if (q_idx < s_q_idx) + q_idx =3D 0; + list_for_each_entry(q, &dev->qdisc_list, list) { + if (q_idx++ < s_q_idx) continue; if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <=3D 0) { @@ -822,7 +823,7 @@ read_unlock(&dev_base_lock); =20 cb->args[0] =3D idx; - cb->args[1] =3D q_idx; + cb->args[1] =3D q_idx - 1; =20 return skb->len; } @@ -1024,13 +1025,16 @@ return 0; =20 s_t =3D cb->args[0]; + t =3D 0; =20 read_lock(&qdisc_tree_lock); - for (q=3Ddev->qdisc_list, t=3D0; q; q =3D q->next, t++) { - if (t < s_t) continue; - if (!q->ops->cl_ops) continue; - if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) !=3D q->handle) + list_for_each_entry(q, &dev->qdisc_list, list) { + if (t < s_t || !q->ops->cl_ops || + (tcm->tcm_parent && + TC_H_MAJ(tcm->tcm_parent) !=3D q->handle)) { + t++; continue; + } if (t > s_t) memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); arg.w.fn =3D qdisc_class_dump; @@ -1043,6 +1047,7 @@ cb->args[1] =3D arg.w.count; if (arg.w.stop) break; + t++; } read_unlock(&qdisc_tree_lock); =20 diff -Nru linux-2.4.27-rc5_van/net/sched/sch_generic.c linux-2.4.27-rc5/net= /sched/sch_generic.c --- linux-2.4.27-rc5_van/net/sched/sch_generic.c 2004-02-18 14:36:32.000000= 000 +0100 +++ linux-2.4.27-rc5/net/sched/sch_generic.c 2004-08-04 16:30:16.000000000 = +0200 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include =20 @@ -391,6 +392,7 @@ return NULL; memset(sch, 0, size); =20 + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); sch->ops =3D ops; sch->enqueue =3D ops->enqueue; @@ -420,22 +422,10 @@ void qdisc_destroy(struct Qdisc *qdisc) { struct Qdisc_ops *ops =3D qdisc->ops; - struct net_device *dev; =20 if (!atomic_dec_and_test(&qdisc->refcnt)) return; - - dev =3D qdisc->dev; - - if (dev) { - struct Qdisc *q, **qp; - for (qp =3D &qdisc->dev->qdisc_list; (q=3D*qp) !=3D NULL; qp =3D &q->nex= t) { - if (q =3D=3D qdisc) { - *qp =3D q->next; - break; - } - } - } + list_del(&qdisc->list); #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&qdisc->stats); #endif @@ -464,10 +454,8 @@ printk(KERN_INFO "%s: activation failed\n", dev->name); return; } - write_lock(&qdisc_tree_lock); - qdisc->next =3D dev->qdisc_list; - dev->qdisc_list =3D qdisc; + list_add_tail(&qdisc->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); =20 } else { @@ -513,7 +501,7 @@ dev->qdisc =3D &noop_qdisc; spin_unlock_bh(&dev->queue_lock); dev->qdisc_sleeping =3D &noop_qdisc; - dev->qdisc_list =3D NULL; + INIT_LIST_HEAD(&dev->qdisc_list); write_unlock(&qdisc_tree_lock); =20 dev_watchdog_init(dev); @@ -535,9 +523,7 @@ qdisc_destroy(qdisc); } #endif - BUG_TRAP(dev->qdisc_list =3D=3D NULL); BUG_TRAP(!timer_pending(&dev->watchdog_timer)); - dev->qdisc_list =3D NULL; spin_unlock_bh(&dev->queue_lock); write_unlock(&qdisc_tree_lock); } --KsGdsel6WgEHnImy-- --ftEhullJWpWg/VHq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBEN2tcNXOL98XeysRAh8RAJwNnKyt6wC/GhimrDWBDlPSnJzBvACfQ4Uk c2lzDxLg6/T9Ecx61r4SSWo= =JCaa -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq-- From mtk-lists@gmx.net Wed Aug 4 06:22:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 06:22:44 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i74DMaTd007506 for ; Wed, 4 Aug 2004 06:22:37 -0700 Received: (qmail 13980 invoked by uid 0); 4 Aug 2004 13:22:27 -0000 Received: from 62.245.207.82 by www2.gmx.net with HTTP; Wed, 4 Aug 2004 15:22:27 +0200 (MEST) Date: Wed, 4 Aug 2004 15:22:27 +0200 (MEST) From: "Michael T Kerrisk" To: netdev@oss.sgi.com MIME-Version: 1.0 Subject: Assassination of TIME_WAIT state (RESEND) X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <16217.1091625747@www2.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-archive-position: 7492 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 2667 Lines: 80 Gidday, I did try posting this many weeks back, but got response. I'll take another shot -- does anyone have thoughts on the questions below? == In the scenario below, one achieves assassination of the TIME_WAIT state on Linux 2.6.5 and 2.4.x. From a conversation I had a while ago with Andi Kleen (see below), it appears that this is expected behavior. I have two (closely linked) questions: -- what is the rationale for this behavior (i.e., why assassinate in this scenario)? -- why does Linux behave differently from FreeBSD and Solaris in this scenario? Assume in the following scenario that SO_RESUSEADDR is set on the server socket(s): Server Client 1. Create listening socket bound to INADDR_ANY/port=9999 2. Accept a connection on the listening socket 3. Create a socket bound to INADDR_ANY/port=50000 4. Connect to server socket (on port 9999) 5. Close listening and connected sockets 6. Close the socket At this point, there is TCP on the server side in the TIME_WAIT state: { local=localhost:9999, peer=XXX:50000 } (re-run server) 7. Create listening socket bound to INADDR_ANY/port=9999 8. Accept a connection on the listening socket (re-run client while TIME_WAIT TCP still exists) 9. Create a socket bound to INADDR_ANY/port=50000 10.Connect to server socket (on port 9999) On Linux the connect() in step 10 succeeds; the reason that it does is that the TIME_WAIT TCP is immediately assassinated. A while back I asked Andi Kleen about this scenario, and he commented that this behavious was: > a (dubious) BSD extension, also implemented > in linux (after all sockets is about being bug to bug coompatible). > the kernel sees the TIME-WAIT and choses a sequence number with > a large offset to avoid conflicts. When you don't have PAWS > but still had a big window it is rather risky though. However, when I try the above on FreeBSD 5.1 and Solaris 8, we see different behavior: the TIME_WAIT TCP is NOT assassinated and the connect() at step 10 fails with EADDRINUSE (which makes sense because we can't create a duplicate 4-tuple...). Cheers, Michael -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From kaber@trash.net Wed Aug 4 06:28:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 06:28:35 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74DSOXS008179 for ; Wed, 4 Aug 2004 06:28:30 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 74D3519F356; Wed, 4 Aug 2004 15:28:15 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id B2488394133; Wed, 4 Aug 2004 15:28:14 +0200 (CEST) Message-ID: <4110E505.1010205@trash.net> Date: Wed, 04 Aug 2004 15:30:45 +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: Tomasz Paszkowski Cc: davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4] Use double-linked list for dev->qdisc_list References: <20040804125926.GA15324@krezus.e-wro.net> In-Reply-To: <20040804125926.GA15324@krezus.e-wro.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7493 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: 729 Lines: 27 Tomasz Paszkowski wrote: >This patch changes dev->qdisc_list to a double-linked list. This solves >the performance problems when destroying qdiscs with large number of inner >qdiscs. > >This is backported version of Patrick McHardy patch (03-qdisc_list-list_h.diff) >or 2.6 kernels. > > Looks good, except for the last hunk, the BUG_TRAP is valid in 2.4 because it doesn't use RCU. Change it to BUG_TRAP(list_empty(&dev->qdisc_list)). > > >------------------------------------------------------------------------ > > #endif >- BUG_TRAP(dev->qdisc_list == NULL); > BUG_TRAP(!timer_pending(&dev->watchdog_timer)); >- dev->qdisc_list = NULL; > spin_unlock_bh(&dev->queue_lock); > write_unlock(&qdisc_tree_lock); > } > > From mtk-lists@gmx.net Wed Aug 4 07:25:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 07:25:43 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i74EPagd010795 for ; Wed, 4 Aug 2004 07:25:37 -0700 Received: (qmail 24367 invoked by uid 0); 4 Aug 2004 14:25:27 -0000 Received: from 62.245.207.82 by www2.gmx.net with HTTP; Wed, 4 Aug 2004 16:25:27 +0200 (MEST) Date: Wed, 4 Aug 2004 16:25:27 +0200 (MEST) From: "Michael T Kerrisk" To: netdev@oss.sgi.com MIME-Version: 1.0 Subject: SO_REUSEADDR behavior different from BSD X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <16224.1091629527@www2.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-archive-position: 7494 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 2123 Lines: 70 Gidday, In the classical BSD sockets implementation, the SO_REUSEADDR socket option serves two purposes: (a) to permit a socket to be bound to a port that currently has a bound endpoint in the TIME_WAIT state, and (b) to allow a terminated server to be restarted (and once again be bound to it's well-known port), even if there is a child of the previous server still serving a connection. On Linux SO_REUSEADDR does serve this purpose. However, other second scenario is mot permitted by SO_REUSEADDR. To make it clear what I mean, I’ll detail the scenario. Suppose we have the following: Server (host Y) Create listening socket -- fd 4 bind() to INADDR_ANY:9999 listen() accept() Client (host X) Create socket connect() to Y:9999 server forks --------+ \ server terminates closes fd 4 At this point, netstat on host Y shows the tuple [local=Y-IP-addr:9999, remote=X-IP-addr:ephem-port] ESTABLISHED New Server started Create listening socket -- fd 4 set SO_REUSEADDR to 1 for fd 4 bind() fd 4 to port INADDR_ANY:9999 WHAT HAPPENS? On FreeBSD, the bind() succeeds, and then using "netstat –an" on host Y shows: [local=Y-IP-addr:9999, remote=X-IP-addr:ephem-port] ESTABLISHED and [local=*:9999, remote=*.*] CLOSED But on Linux (2.6), the bind() fails with EADDRINUSE. Why does Linux behave differently in this scenario? Cheers, Michael -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From acid@krezus.e-wro.net Wed Aug 4 07:56:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 07:56:29 -0700 (PDT) Received: from krezus.e-wro.net (krezus.e-wro.net [82.143.159.250]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74EuLZ4012208 for ; Wed, 4 Aug 2004 07:56:22 -0700 Received: from krezus.e-wro.net (localhost [127.0.0.1]) by krezus.e-wro.net (8.12.10/8.12.10) with ESMTP id i74EuCOC023699; Wed, 4 Aug 2004 16:56:12 +0200 Received: (from acid@localhost) by krezus.e-wro.net (8.12.10/8.12.10/Submit) id i74EuA9f023698; Wed, 4 Aug 2004 16:56:10 +0200 Date: Wed, 4 Aug 2004 16:56:10 +0200 From: Tomasz Paszkowski To: Patrick McHardy Cc: davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4] Use double-linked list for dev->qdisc_list Message-ID: <20040804145610.GA21339@krezus.e-wro.net> References: <20040804125926.GA15324@krezus.e-wro.net> <4110E505.1010205@trash.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zx4FCpZtqtKETZ7O" Content-Disposition: inline In-Reply-To: <4110E505.1010205@trash.net> User-Agent: Mutt/1.4i X-NCC-RegID: pl.e-wro X-Scanned-By: MIMEDefang 2.42 X-archive-position: 7495 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tomasz.paszkowski@e-wro.pl Precedence: bulk X-list: netdev Content-Length: 6720 Lines: 249 --zx4FCpZtqtKETZ7O Content-Type: multipart/mixed; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 04, 2004 at 03:30:45PM +0200, Patrick McHardy wrote: > Looks good, except for the last hunk, the BUG_TRAP is valid in 2.4 because > it doesn't use RCU. Change it to BUG_TRAP(list_empty(&dev->qdisc_list)). Thanks. In attachment there's a corrected version of this patch. --=20 Tomasz Paszkowski Administrator Miejskie Sieci Informatyczne e-wro http://www.e-wro.pl --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="03-qdisc_list-list_h_2.4.27-rc5.diff" Content-Transfer-Encoding: quoted-printable diff -Nru linux-2.4.27-rc5_van/include/linux/netdevice.h linux-2.4.27-rc5/i= nclude/linux/netdevice.h --- linux-2.4.27-rc5_van/include/linux/netdevice.h 2004-08-04 17:34:49.0000= 00000 +0200 +++ linux-2.4.27-rc5/include/linux/netdevice.h 2004-08-04 17:36:28.00000000= 0 +0200 @@ -352,8 +352,8 @@ =20 struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; - struct Qdisc *qdisc_list; struct Qdisc *qdisc_ingress; + struct list_head qdisc_list; unsigned long tx_queue_len; /* Max frames per queue allowed */ =20 /* hard_start_xmit synchronizer */ diff -Nru linux-2.4.27-rc5_van/include/net/pkt_sched.h linux-2.4.27-rc5/inc= lude/net/pkt_sched.h --- linux-2.4.27-rc5_van/include/net/pkt_sched.h 2004-02-18 14:36:32.000000= 000 +0100 +++ linux-2.4.27-rc5/include/net/pkt_sched.h 2004-08-04 17:36:28.000000000 = +0200 @@ -80,11 +80,11 @@ #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 struct Qdisc_ops *ops; - struct Qdisc *next; u32 handle; atomic_t refcnt; struct sk_buff_head q; struct net_device *dev; + struct list_head list; =20 struct tc_stats stats; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); diff -Nru linux-2.4.27-rc5_van/net/sched/sch_api.c linux-2.4.27-rc5/net/sch= ed/sch_api.c --- linux-2.4.27-rc5_van/net/sched/sch_api.c 2002-11-29 00:53:16.000000000 = +0100 +++ linux-2.4.27-rc5/net/sched/sch_api.c 2004-08-04 17:36:28.000000000 +0200 @@ -32,6 +32,7 @@ #include #include #include +#include =20 #include #include @@ -193,7 +194,7 @@ { struct Qdisc *q; =20 - for (q =3D dev->qdisc_list; q; q =3D q->next) { + list_for_each_entry(q, &dev->qdisc_list, list) { if (q->handle =3D=3D handle) return q; } @@ -424,6 +425,7 @@ =20 memset(sch, 0, size); =20 + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); =20 if (handle =3D=3D TC_H_INGRESS) @@ -449,8 +451,7 @@ =20 if (!ops->init || (err =3D ops->init(sch, tca[TCA_OPTIONS-1])) =3D=3D 0) { write_lock(&qdisc_tree_lock); - sch->next =3D dev->qdisc_list; - dev->qdisc_list =3D sch; + list_add_tail(&sch->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) @@ -805,9 +806,9 @@ if (idx > s_idx) s_q_idx =3D 0; read_lock(&qdisc_tree_lock); - for (q =3D dev->qdisc_list, q_idx =3D 0; q; - q =3D q->next, q_idx++) { - if (q_idx < s_q_idx) + q_idx =3D 0; + list_for_each_entry(q, &dev->qdisc_list, list) { + if (q_idx++ < s_q_idx) continue; if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <=3D 0) { @@ -822,7 +823,7 @@ read_unlock(&dev_base_lock); =20 cb->args[0] =3D idx; - cb->args[1] =3D q_idx; + cb->args[1] =3D q_idx - 1; =20 return skb->len; } @@ -1024,13 +1025,16 @@ return 0; =20 s_t =3D cb->args[0]; + t =3D 0; =20 read_lock(&qdisc_tree_lock); - for (q=3Ddev->qdisc_list, t=3D0; q; q =3D q->next, t++) { - if (t < s_t) continue; - if (!q->ops->cl_ops) continue; - if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) !=3D q->handle) + list_for_each_entry(q, &dev->qdisc_list, list) { + if (t < s_t || !q->ops->cl_ops || + (tcm->tcm_parent && + TC_H_MAJ(tcm->tcm_parent) !=3D q->handle)) { + t++; continue; + } if (t > s_t) memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); arg.w.fn =3D qdisc_class_dump; @@ -1043,6 +1047,7 @@ cb->args[1] =3D arg.w.count; if (arg.w.stop) break; + t++; } read_unlock(&qdisc_tree_lock); =20 diff -Nru linux-2.4.27-rc5_van/net/sched/sch_generic.c linux-2.4.27-rc5/net= /sched/sch_generic.c --- linux-2.4.27-rc5_van/net/sched/sch_generic.c 2004-02-18 14:36:32.000000= 000 +0100 +++ linux-2.4.27-rc5/net/sched/sch_generic.c 2004-08-04 17:38:43.000000000 = +0200 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include =20 @@ -391,6 +392,7 @@ return NULL; memset(sch, 0, size); =20 + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); sch->ops =3D ops; sch->enqueue =3D ops->enqueue; @@ -420,22 +422,10 @@ void qdisc_destroy(struct Qdisc *qdisc) { struct Qdisc_ops *ops =3D qdisc->ops; - struct net_device *dev; =20 if (!atomic_dec_and_test(&qdisc->refcnt)) return; - - dev =3D qdisc->dev; - - if (dev) { - struct Qdisc *q, **qp; - for (qp =3D &qdisc->dev->qdisc_list; (q=3D*qp) !=3D NULL; qp =3D &q->nex= t) { - if (q =3D=3D qdisc) { - *qp =3D q->next; - break; - } - } - } + list_del(&qdisc->list); #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&qdisc->stats); #endif @@ -464,10 +454,8 @@ printk(KERN_INFO "%s: activation failed\n", dev->name); return; } - write_lock(&qdisc_tree_lock); - qdisc->next =3D dev->qdisc_list; - dev->qdisc_list =3D qdisc; + list_add_tail(&qdisc->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); =20 } else { @@ -513,7 +501,7 @@ dev->qdisc =3D &noop_qdisc; spin_unlock_bh(&dev->queue_lock); dev->qdisc_sleeping =3D &noop_qdisc; - dev->qdisc_list =3D NULL; + INIT_LIST_HEAD(&dev->qdisc_list); write_unlock(&qdisc_tree_lock); =20 dev_watchdog_init(dev); @@ -535,9 +523,8 @@ qdisc_destroy(qdisc); } #endif - BUG_TRAP(dev->qdisc_list =3D=3D NULL); + BUG_TRAP(list_empty(&dev->qdisc_list)); BUG_TRAP(!timer_pending(&dev->watchdog_timer)); - dev->qdisc_list =3D NULL; spin_unlock_bh(&dev->queue_lock); write_unlock(&qdisc_tree_lock); } --ew6BAiZeqk4r7MaW-- --zx4FCpZtqtKETZ7O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBEPkKcNXOL98XeysRApODAJ9NIX5kEocbs7qXUwu72NcvzP2xsgCfQ7tP qMZ1efoKSELfZHlJh3nvFrQ= =icYm -----END PGP SIGNATURE----- --zx4FCpZtqtKETZ7O-- From ptsjohol@cc.jyu.fi Wed Aug 4 09:26:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:26:37 -0700 (PDT) Received: from posti6.jyu.fi (posti6.jyu.fi [130.234.4.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74GQVCn029702 for ; Wed, 4 Aug 2004 09:26:32 -0700 Received: from silmu.st.jyu.fi (IDENT:YpIl8zWwJy8GidOHbDMXOhURX0rORj6S@silmu.st.jyu.fi [130.234.4.64]) by posti6.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i74GQ6ob024861; Wed, 4 Aug 2004 19:26:07 +0300 Date: Wed, 4 Aug 2004 19:26:03 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Robert Olsson , H?ctor Mart?n , Linux-Kernel , , , , Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti6.jyu.fi; Wed, 04 Aug 2004 19:26:08 +0300 X-archive-position: 7496 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev Content-Length: 1377 Lines: 33 On Tue, 3 Aug 2004, Pasi Sjoholm wrote: > > If you remove the "if (received > 0) {" test in r8139-10.patch and keep > > both patches applied, I assume you are back to a crash within 15min (instead > > of within 2min as suggested by the log), right ? > I removed "if (received > 0) {" and tested it something like 3 hours and > wasn't able to crash the driver. I will test it for couple more hours > tomorrow and if I'm not still able the crash it, we may have find some > sort of a solution. > I'm not sure yet if it's a good one because of that earlier crash I had. > I guess I will also test if > "- read the interruption status word that the driver will ack before the > actual processing is done;" has something to do with it. Ok, now I have tested it for 6 hours without crashing the driver. The system's load has been something like 5-6 the whole time. I also made some network load with ~90Mbps-incoming and ~90Mbps-outgoing traffic. I haven't had time to test anything else but I'm quite sure that there is no need for that anymore because the stability we have reached. I'll let you know if there's any problems within next few days but I would recommend that those patches would be included in 2.6.8. (without that "if (received > 0) {"). Many thanks for your help to resolve this problem. Hector, have you tested these patches? -- Pasi Sjöholm From davem@redhat.com Wed Aug 4 09:35:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:35:38 -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 i74GZV0l030355 for ; Wed, 4 Aug 2004 09:35:31 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74GZRe1009186; Wed, 4 Aug 2004 12:35:27 -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 i74GZRa02227; Wed, 4 Aug 2004 12:35:27 -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 i74GYglC001927; Wed, 4 Aug 2004 12:34:43 -0400 Date: Wed, 4 Aug 2004 09:33:28 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 1/5]: Fix locking in __qdisc_destroy rcu-callback Message-Id: <20040804093328.4ee56d30.davem@redhat.com> In-Reply-To: <410FAD44.7020503@trash.net> References: <410FAD44.7020503@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: 7497 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: 766 Lines: 17 On Tue, 03 Aug 2004 17:20:36 +0200 Patrick McHardy wrote: > The __qdisc_destroy rcu-callback doesn't do any locking when calling > ops->reset and ops->destroy. qdisc_destroy is often called from both > of these functions and it changes dev->qdisc_list. This patch adds proper > locking to __qdisc_destroy. Unfortunately when using qdisc_tree_lock in > process context we now also need to disable local bh's to avoid beeing > interrupted by the rcu-callback. I'm not sure if RCU callback can be > scheduled while the kernel is running in process context, so this may > be unneccessary. RCU callbacks run via tasklets, and thus in softirq context, thus your locking changes to _bh() are indeed necessary. I will apply this patch, thanks Patrick. From davem@redhat.com Wed Aug 4 09:38:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:38:18 -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 i74GcCwl030836 for ; Wed, 4 Aug 2004 09:38:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Gc8e1009900; Wed, 4 Aug 2004 12:38:08 -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 i74Gc3a03160; Wed, 4 Aug 2004 12:38:03 -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 i74GbJAm003807; Wed, 4 Aug 2004 12:37:19 -0400 Date: Wed, 4 Aug 2004 09:36:04 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 2/5]: refcount qdisc->dev Message-Id: <20040804093604.65748762.davem@redhat.com> In-Reply-To: <410FADBC.6000904@trash.net> References: <410FADBC.6000904@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: 7498 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: 373 Lines: 11 On Tue, 03 Aug 2004 17:22:36 +0200 Patrick McHardy wrote: > This patch adds refcounting for qdisc->dev to avoid accessing freed memory > from the __qdisc_destroy rcu-callback when the device is unregistered. > Without > refcounting netdev_wait_allrefs could free the device before __qdisc_destroy > is done. We do need this. Applied, thanks Patrick. From shemminger@osdl.org Wed Aug 4 09:43:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:43: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 i74GhOCu031508 for ; Wed, 4 Aug 2004 09:43:24 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i74GhB116953; Wed, 4 Aug 2004 09:43:11 -0700 Date: Wed, 4 Aug 2004 09:43:10 -0700 From: Stephen Hemminger To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Inaccuracies with SCH_CLK_CPU Message-Id: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7499 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: 829 Lines: 28 I noticed that the netem delay values are off if using CONFIG_NET_SCH_CKL_CPU. For example, if the latency is set to 500ms a ping reports the time as much less (343ms). Requested JIFFIES GETTIMEODAY CPU 0 .1 .1 .1 1 2 2 1 5 5 6 4 10 10 11 7 100 98 101 69 500 489 500 343 1000 976 1000 685 The 1ms value is affected by the clock granularity. Larger jiffie values are inaccurate due to the optimization of using shift to do divide (ie 1024 > 1000). With CLK_CPU /proc/net/psched is: 000005d9 00000400 000f4240 000003e8 Instead of computing own values of psched_us_per_tick and psched_clock_per_hz, couldn't the values already done in timers code be used? Also doesn't PSCHED_US2JIFFIE need to be doing a do_div() in order to correctly do u64 divided by u32. Otherwise it ends up just doing an u32 divide. From davem@redhat.com Wed Aug 4 09:45:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:45:26 -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 i74GjGae031829 for ; Wed, 4 Aug 2004 09:45:21 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Gj7e1011717; Wed, 4 Aug 2004 12:45:07 -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 i74Gj7a06358; Wed, 4 Aug 2004 12:45:07 -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 i74GiMMf009794; Wed, 4 Aug 2004 12:44:23 -0400 Date: Wed, 4 Aug 2004 09:43:08 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list Message-Id: <20040804094308.606f79bd.davem@redhat.com> In-Reply-To: <410FAE42.2050909@trash.net> References: <410FAE42.2050909@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: 7500 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: 692 Lines: 25 On Tue, 03 Aug 2004 17:24:50 +0200 Patrick McHardy wrote: > This patch changes dev->qdisc_list to a double-linked list. This solves > the performance problems when destroying qdiscs with large number of inner > qdiscs. I don't see how this bit is correct: @@ -831,7 +832,7 @@ read_unlock(&dev_base_lock); cb->args[0] = idx; - cb->args[1] = q_idx; + cb->args[1] = q_idx - 1; return skb->len; } The changes to the qdisc_list traversal loop above this hunk does not change what the final q_idx value is going to be. The simplest example is if the list is empty, for which q_idx will end up being zero both before and after your changes. Please enlighten me :) From davem@redhat.com Wed Aug 4 09:46:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:46:52 -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 i74GkkaI032250 for ; Wed, 4 Aug 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.10/8.12.10) with ESMTP id i74Gkge1012145; Wed, 4 Aug 2004 12:46:42 -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 i74Gkba07047; Wed, 4 Aug 2004 12:46: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 i74GjrYt011360; Wed, 4 Aug 2004 12:45:53 -0400 Date: Wed, 4 Aug 2004 09:44:38 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 4/5]: remove unneccessary checks for qdisc->dev Message-Id: <20040804094438.687d4234.davem@redhat.com> In-Reply-To: <410FAE65.6010802@trash.net> References: <410FAE65.6010802@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: 7501 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: 185 Lines: 8 On Tue, 03 Aug 2004 17:25:25 +0200 Patrick McHardy wrote: > qdisc->dev is always valid, this patch removes a couple of unneccessary > checks. Looks good, applied. From davem@redhat.com Wed Aug 4 09:49:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:49:10 -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 i74Gn5OU032590 for ; Wed, 4 Aug 2004 09:49:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Gn1e1012900; Wed, 4 Aug 2004 12:49:01 -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 i74Gn1a08084; Wed, 4 Aug 2004 12:49:01 -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 i74GmGY3013221; Wed, 4 Aug 2004 12:48:17 -0400 Date: Wed, 4 Aug 2004 09:47:02 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 5/5]: remove noop_qdisc assignments in destroy functions Message-Id: <20040804094702.6aa191a4.davem@redhat.com> In-Reply-To: <410FAE82.7070604@trash.net> References: <410FAE82.7070604@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: 7502 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 268 Lines: 9 On Tue, 03 Aug 2004 17:25:54 +0200 Patrick McHardy wrote: > This patch removes useless noop_qdisc assignments in multiple qdiscs destroy > functions, the memory where the pointer is stored is freed directly > after the destroy function. Applied. From SRS0+649f54f8a37ca4d41e25+346+infradead.org+hch@phoenix-174856.srs.infradead.org Wed Aug 4 09:49:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:49:32 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74GnO0V032686 for ; Wed, 4 Aug 2004 09:49:26 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1BsOwi-0006Oh-3f; Wed, 04 Aug 2004 17:48:56 +0100 Date: Wed, 4 Aug 2004 17:48:56 +0100 From: Christoph Hellwig To: Herbert Xu Cc: Christoph Hellwig , ganesh.venkatesan@intel.com, jgarzik@pobox.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/12 2.4] e1000 - use vmalloc for data structures not shared with h/w Message-ID: <20040804174856.B24545@infradead.org> Mail-Followup-To: Christoph Hellwig , Herbert Xu , ganesh.venkatesan@intel.com, jgarzik@pobox.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org References: <20040729192519.A6235@infradead.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: ; from herbert@gondor.apana.org.au on Sat, Jul 31, 2004 at 05:38:11PM +1000 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7503 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: 560 Lines: 11 On Sat, Jul 31, 2004 at 05:38:11PM +1000, Herbert Xu wrote: > > No, it's not. vmalloc needs virtual space that's rather limited (e.g. 64MB > > on PAE x86) in addition to physical memory. Unless you do really big > > allocations stay away from vmalloc. > > How big is really big? 64K? 256K? 1M? Well, the VM deals with big-order (aka bigger than page size) allocations rather bad, so for allocation during any I/O I'd stick to allocation smaller than that (and certainly no vmalloc!), for init-time allocations order 1 is fine, maybe even order 2 or three. From davem@redhat.com Wed Aug 4 09:54:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:54: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 i74Gs45x000875 for ; Wed, 4 Aug 2004 09:54:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Grwe1014235; Wed, 4 Aug 2004 12:53:58 -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 i74Grra09775; Wed, 4 Aug 2004 12:53:53 -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 i74Gr8Zt016234; Wed, 4 Aug 2004 12:53:09 -0400 Date: Wed, 4 Aug 2004 09:51:53 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: kaber@trash.net, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] cache align qdisc data Message-Id: <20040804095153.3bd696a3.davem@redhat.com> In-Reply-To: <20040803140538.7c40f961@dell_ss3.pdx.osdl.net> References: <410FAE42.2050909@trash.net> <20040803083820.711c917c@dell_ss3.pdx.osdl.net> <410FE4DD.5000306@trash.net> <20040803133139.43107fd3@dell_ss3.pdx.osdl.net> <410FF8C4.7010705@trash.net> <20040803140538.7c40f961@dell_ss3.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: 7504 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: 246 Lines: 8 On Tue, 3 Aug 2004 14:05:38 -0700 Stephen Hemminger wrote: > Ugh, here it is without the hfsc messup. Stephen, I'll apply this after Patrick's qdisc_list patch 'q_idx' issue is better understood so I can apply that first. From davem@redhat.com Wed Aug 4 09:59:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 09:59: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 i74Gx8v9001294 for ; Wed, 4 Aug 2004 09:59:08 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Gwje1015529; Wed, 4 Aug 2004 12:58:45 -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 i74Gwea11780; Wed, 4 Aug 2004 12:58:40 -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 i74GvtYF020654; Wed, 4 Aug 2004 12:57:56 -0400 Date: Wed, 4 Aug 2004 09:56:40 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: greearb@candelatech.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (1/3) add ethtool ioctl forwarding to vlan Message-Id: <20040804095640.20fd1822.davem@redhat.com> In-Reply-To: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> References: <20040803105017.0774e1db@dell_ss3.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: 7505 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: 562 Lines: 14 On Tue, 3 Aug 2004 10:50:17 -0700 Stephen Hemminger wrote: > When network devices are used in bridges, the bridge does an ethtool > ioctl to pick up the speed; this doesn't work with vlans. > This patch makes any ethtool gets forwarded to the under lying > real device. It seemed to make sense to do MII as well. By changing the ifr.ifr_name field, you are going to corrupt the return value the user will see if ':' "colon" processing is done by dev_ioctl(). An ifreq isn't too large, just use a local copy on vlan_dev_ioctl()'s stack. From rddunlap@osdl.org Wed Aug 4 10:10:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 10:10:17 -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 i74HABGv001826 for ; Wed, 4 Aug 2004 10:10:11 -0700 Received: from dragon.pdx.osdl.net (dragon.pdx.osdl.net [172.20.1.27]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i74HA1121885; Wed, 4 Aug 2004 10:10:01 -0700 Date: Wed, 4 Aug 2004 09:49:05 -0700 From: "Randy.Dunlap" To: netdev Cc: jgarzik Subject: [PATCH] ibmtr: fix init (devinit) section usage Message-Id: <20040804094905.667b3954.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: +5V?h'hZQPB9kW Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7506 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: 1733 Lines: 44 (resend from 2.6.4 days) Use __devinit on 2 functions so that section usage is valid. Removes these problems when CONFIG_HOTPLUG=n: Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000b7 R_386_PC32 .init.text Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000c8 R_386_32 .init.data Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000cf R_386_PC32 .init.text Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000d5 R_386_32 .init.data Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000df R_386_32 .init.data Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000e6 R_386_PC32 .init.text Error: ./drivers/net/tokenring/ibmtr.o .text refers to 000000f4 R_386_32 .init.data Signed-off-by: Randy Dunlap diffstat:= drivers/net/tokenring/ibmtr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -Naurp ./drivers/net/tokenring/ibmtr.c~ibmtr_init ./drivers/net/tokenring/ibmtr.c --- ./drivers/net/tokenring/ibmtr.c~ibmtr_init 2004-03-06 20:57:06.000000000 -0800 +++ ./drivers/net/tokenring/ibmtr.c 2004-03-07 18:31:11.000000000 -0800 @@ -334,7 +334,7 @@ static void ibmtr_cleanup_card(struct ne #endif } -int ibmtr_probe_card(struct net_device *dev) +int __devinit ibmtr_probe_card(struct net_device *dev) { int err = ibmtr_probe(dev); if (!err) { @@ -357,7 +357,7 @@ int ibmtr_probe_card(struct net_device * * which references it. ****************************************************************************/ -static int ibmtr_probe(struct net_device *dev) +static int __devinit ibmtr_probe(struct net_device *dev) { int i; int base_addr = dev->base_addr; -- From Mike_Phillips@URSCorp.com Wed Aug 4 11:21:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 11:21:07 -0700 (PDT) Received: from smtp102.urscorp.com (urs-smtp-01.nks.net [24.73.112.33]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74IKxKV031731; Wed, 4 Aug 2004 11:21:03 -0700 In-Reply-To: <20040804094905.667b3954.rddunlap@osdl.org> To: "Randy.Dunlap" Cc: jgarzik , netdev , netdev-bounce@oss.sgi.com Subject: Re: [PATCH] ibmtr: fix init (devinit) section usage MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5 September 18, 2003 From: Mike_Phillips@URSCorp.com Message-ID: Date: Wed, 4 Aug 2004 14:20:31 -0400 X-MIMETrack: Serialize by Router on SMTP102/URSCorp(Release 5.0.11 |July 24, 2002) at 08/04/2004 02:21:30 PM, Serialize complete at 08/04/2004 02:21:30 PM Content-Type: multipart/alternative; boundary="=_alternative 0064BDAF85256EE6_=" X-archive-position: 7507 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Mike_Phillips@URSCorp.com Precedence: bulk X-list: netdev Content-Length: 602 Lines: 23 This is a multipart message in MIME format. --=_alternative 0064BDAF85256EE6_= Content-Type: text/plain; charset="US-ASCII" Randy: Does ibmtr_cs still compile with those changes ? It links in ibmtr.c and the probe functions. Mike --=_alternative 0064BDAF85256EE6_= Content-Type: text/html; charset="US-ASCII"
Randy:

Does ibmtr_cs still compile with those changes ? It links in ibmtr.c and the probe functions.

Mike
--=_alternative 0064BDAF85256EE6_=-- From rddunlap@osdl.org Wed Aug 4 12:43:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 12: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 i74JhegY013045; Wed, 4 Aug 2004 12:43:40 -0700 Received: from dragon.pdx.osdl.net (dragon.pdx.osdl.net [172.20.1.27]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i74Jgs119576; Wed, 4 Aug 2004 12:42:55 -0700 Date: Wed, 4 Aug 2004 12:21:57 -0700 From: "Randy.Dunlap" To: Mike_Phillips@URSCorp.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com Subject: Re: [PATCH] ibmtr: fix init (devinit) section usage Message-Id: <20040804122157.67389b90.rddunlap@osdl.org> In-Reply-To: References: <20040804094905.667b3954.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: +5V?h'hZQPB9kW Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7509 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: 228 Lines: 11 On Wed, 4 Aug 2004 14:20:31 -0400 Mike_Phillips@URSCorp.com wrote: | Randy: | | Does ibmtr_cs still compile with those changes ? It links in ibmtr.c and | the probe functions. Oh. I'll check and let you know... -- ~Randy From kaber@trash.net Wed Aug 4 12:51:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 12:51:15 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74Jp9Ou014533 for ; Wed, 4 Aug 2004 12:51:09 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 6228B19F356; Wed, 4 Aug 2004 21:50:59 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id A4995394133; Wed, 4 Aug 2004 21:50:58 +0200 (CEST) Message-ID: <41113EB8.6000809@trash.net> Date: Wed, 04 Aug 2004 21:53:28 +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 1/5]: Fix locking in __qdisc_destroy rcu-callback References: <410FAD44.7020503@trash.net> <20040804093328.4ee56d30.davem@redhat.com> In-Reply-To: <20040804093328.4ee56d30.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7510 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: 647 Lines: 23 David S. Miller wrote: >On Tue, 03 Aug 2004 17:20:36 +0200 >Patrick McHardy wrote: > > >>I'm not sure if RCU callback can be scheduled while the kernel is >> >>running in process context, so this may be unneccessary. >> >> > >RCU callbacks run via tasklets, and thus in softirq context, >thus your locking changes to _bh() are indeed necessary. > > I meant because in my understanding of RCU the quintescent state is not reached while the CPU is running kernel code, so the callback can't be scheduled. A previously scheduled callback should finish before further kernel code is run in process context. Regards Patrick From kaber@trash.net Wed Aug 4 12:53:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 12:53:21 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74JrDKN014860 for ; Wed, 4 Aug 2004 12:53:14 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id A49F519F356; Wed, 4 Aug 2004 21:53:04 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id E5586394133; Wed, 4 Aug 2004 21:53:03 +0200 (CEST) Message-ID: <41113F36.8050204@trash.net> Date: Wed, 04 Aug 2004 21:55:34 +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 3/5]: Use double-linked list for dev->qdisc_list References: <410FAE42.2050909@trash.net> <20040804094308.606f79bd.davem@redhat.com> In-Reply-To: <20040804094308.606f79bd.davem@redhat.com> Content-Type: multipart/mixed; boundary="------------030100070902050203020709" X-archive-position: 7511 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: 1881 Lines: 75 This is a multi-part message in MIME format. --------------030100070902050203020709 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David S. Miller wrote: >On Tue, 03 Aug 2004 17:24:50 +0200 >Patrick McHardy wrote: > > > >>This patch changes dev->qdisc_list to a double-linked list. This solves >>the performance problems when destroying qdiscs with large number of inner >>qdiscs. >> >> > >I don't see how this bit is correct: > > You're right. This patch on top fixes the problem. --------------030100070902050203020709 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/08/04 21:51:04+02:00 kaber@coreworks.de # [PKT_SCHED]: Fix q_idx calculation in tc_dump_qdisc # # Signed-off-by: Patrick McHardy # # net/sched/sch_api.c # 2004/08/04 21:50:44+02:00 kaber@coreworks.de +5 -2 # [PKT_SCHED]: Fix q_idx calculation in tc_dump_qdisc # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-04 21:55:13 +02:00 +++ b/net/sched/sch_api.c 2004-08-04 21:55:13 +02:00 @@ -817,13 +817,16 @@ read_lock_bh(&qdisc_tree_lock); q_idx = 0; list_for_each_entry(q, &dev->qdisc_list, list) { - if (q_idx++ < s_q_idx) + if (q_idx < s_q_idx) { + q_idx++; continue; + } if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { read_unlock_bh(&qdisc_tree_lock); goto done; } + q_idx++; } read_unlock_bh(&qdisc_tree_lock); } @@ -832,7 +835,7 @@ read_unlock(&dev_base_lock); cb->args[0] = idx; - cb->args[1] = q_idx - 1; + cb->args[1] = q_idx; return skb->len; } --------------030100070902050203020709-- From kaber@trash.net Wed Aug 4 13:08:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 13:08:38 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74K8MKo015371 for ; Wed, 4 Aug 2004 13:08:33 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id AE8A819F356; Wed, 4 Aug 2004 22:08:13 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 03E7A394133; Wed, 4 Aug 2004 22:08:12 +0200 (CEST) Message-ID: <411142C3.7070501@trash.net> Date: Wed, 04 Aug 2004 22:10:43 +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: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: Inaccuracies with SCH_CLK_CPU References: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> In-Reply-To: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7512 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: 1257 Lines: 44 Stephen Hemminger wrote: >I noticed that the netem delay values are off if using >CONFIG_NET_SCH_CKL_CPU. For example, if the latency is set to 500ms > a ping reports the time as much less (343ms). > >Requested JIFFIES GETTIMEODAY CPU >0 .1 .1 .1 >1 2 2 1 >5 5 6 4 >10 10 11 7 >100 98 101 69 >500 489 500 343 >1000 976 1000 685 > >The 1ms value is affected by the clock granularity. Larger jiffie values >are inaccurate due to the optimization of using shift to do divide (ie 1024 > 1000). > I need to look at this some more. > >With CLK_CPU /proc/net/psched is: >000005d9 00000400 000f4240 000003e8 > > >Instead of computing own values of psched_us_per_tick >and psched_clock_per_hz, couldn't the values already done >in timers code be used? > Can we do this in a uniform way on all architectures supported by NET_SCH_CLK_CPU ? I think it's easier to fix up the PSCHED_* macros. > >Also doesn't PSCHED_US2JIFFIE need to be doing a do_div() >in order to correctly do u64 divided by u32. Otherwise >it ends up just doing an u32 divide. > No, PSCHED_US2JIFFIE is intended to be used with psched_tdiff_t, using psched_time_t doesn't work with NET_SCH_CLK_GETTIMEOFDAY. psched_tdiff_t is 32-bit on all 32-bit architectures. Regards Patrick From davem@redhat.com Wed Aug 4 13:45:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 13:45:34 -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 i74KjP5n020315 for ; Wed, 4 Aug 2004 13:45:28 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74KjLe1011645; Wed, 4 Aug 2004 16:45:21 -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 i74KjLa30726; Wed, 4 Aug 2004 16:45:21 -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 i74KiaUo026410; Wed, 4 Aug 2004 16:44:37 -0400 Date: Wed, 4 Aug 2004 13:43:18 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list Message-Id: <20040804134318.34d1fabe.davem@redhat.com> In-Reply-To: <41113F36.8050204@trash.net> References: <410FAE42.2050909@trash.net> <20040804094308.606f79bd.davem@redhat.com> <41113F36.8050204@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: 7513 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: 208 Lines: 8 On Wed, 04 Aug 2004 21:55:34 +0200 Patrick McHardy wrote: > >I don't see how this bit is correct: > > > You're right. This patch on top fixes the problem. Thanks a lot Patrick, applied. From davem@redhat.com Wed Aug 4 13:46:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 13:47: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 i74KkpYU020579 for ; Wed, 4 Aug 2004 13:46:51 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Kkae1012139; Wed, 4 Aug 2004 16:46:41 -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 i74KkZa31397; Wed, 4 Aug 2004 16:46:35 -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 i74KjoYB027757; Wed, 4 Aug 2004 16:45:51 -0400 Date: Wed, 4 Aug 2004 13:44:32 -0700 From: "David S. Miller" To: Tomasz Paszkowski Cc: kaber@trash.net, netdev@oss.sgi.com Subject: Re: [PATCH 2.4] Use double-linked list for dev->qdisc_list Message-Id: <20040804134432.40500c15.davem@redhat.com> In-Reply-To: <20040804145610.GA21339@krezus.e-wro.net> References: <20040804125926.GA15324@krezus.e-wro.net> <4110E505.1010205@trash.net> <20040804145610.GA21339@krezus.e-wro.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: 7514 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: 478 Lines: 13 On Wed, 4 Aug 2004 16:56:10 +0200 Tomasz Paszkowski wrote: > On Wed, Aug 04, 2004 at 03:30:45PM +0200, Patrick McHardy wrote: > > Looks good, except for the last hunk, the BUG_TRAP is valid in 2.4 because > > it doesn't use RCU. Change it to BUG_TRAP(list_empty(&dev->qdisc_list)). > > Thanks. In attachment there's a corrected version of this patch. Can someone regenerate this patch with the q_idx fix Patrick just posted added to it? Thanks. From rddunlap@osdl.org Wed Aug 4 14:37:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 14:37: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 i74LbIjG000788; Wed, 4 Aug 2004 14:37:20 -0700 Received: from dragon.pdx.osdl.net (dragon.pdx.osdl.net [172.20.1.27]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i74LXJ106617; Wed, 4 Aug 2004 14:33:19 -0700 Date: Wed, 4 Aug 2004 14:12:21 -0700 From: "Randy.Dunlap" To: Mike_Phillips@URSCorp.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com Subject: Re: [PATCH] ibmtr: fix init (devinit) section usage Message-Id: <20040804141221.5a230b77.rddunlap@osdl.org> In-Reply-To: References: <20040804094905.667b3954.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: +5V?h'hZQPB9kW Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7515 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: 347 Lines: 14 On Wed, 4 Aug 2004 14:20:31 -0400 Mike_Phillips@URSCorp.com wrote: | Randy: | | Does ibmtr_cs still compile with those changes ? It links in ibmtr.c and | the probe functions. Yes, it builds fine. If HOTPLUG=y, __devinit means . If HOTPLUG=n, it means __init. Also note that ibmtr_probe1() is already marked as __devinit. -- ~Randy From kaber@trash.net Wed Aug 4 14:48:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 14:48:36 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74LmS7A001258 for ; Wed, 4 Aug 2004 14:48:29 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id BECD619F356; Wed, 4 Aug 2004 23:48:19 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 0E1F6394133; Wed, 4 Aug 2004 23:48:17 +0200 (CEST) Message-ID: <41115A37.30806@trash.net> Date: Wed, 04 Aug 2004 23:50:47 +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: Tomasz Paszkowski , netdev@oss.sgi.com Subject: Re: [PATCH 2.4] Use double-linked list for dev->qdisc_list References: <20040804125926.GA15324@krezus.e-wro.net> <4110E505.1010205@trash.net> <20040804145610.GA21339@krezus.e-wro.net> <20040804134432.40500c15.davem@redhat.com> In-Reply-To: <20040804134432.40500c15.davem@redhat.com> Content-Type: multipart/mixed; boundary="------------000901050801010602050607" X-archive-position: 7516 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: 6411 Lines: 240 This is a multi-part message in MIME format. --------------000901050801010602050607 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David S. Miller wrote: >Can someone regenerate this patch with the q_idx fix Patrick >just posted added to it? > > Updated patch for 2.4 attached. --------------000901050801010602050607 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/08/04 23:46:47+02:00 kaber@coreworks.de # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +6 -19 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # net/sched/sch_api.c # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +18 -10 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # include/net/pkt_sched.h # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +1 -1 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # include/linux/netdevice.h # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +1 -1 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-08-04 23:49:06 +02:00 +++ b/include/linux/netdevice.h 2004-08-04 23:49:06 +02:00 @@ -352,8 +352,8 @@ struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; - struct Qdisc *qdisc_list; struct Qdisc *qdisc_ingress; + struct list_head qdisc_list; unsigned long tx_queue_len; /* Max frames per queue allowed */ /* hard_start_xmit synchronizer */ diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h --- a/include/net/pkt_sched.h 2004-08-04 23:49:06 +02:00 +++ b/include/net/pkt_sched.h 2004-08-04 23:49:06 +02:00 @@ -80,11 +80,11 @@ #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 struct Qdisc_ops *ops; - struct Qdisc *next; u32 handle; atomic_t refcnt; struct sk_buff_head q; struct net_device *dev; + struct list_head list; struct tc_stats stats; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-04 23:49:06 +02:00 +++ b/net/sched/sch_api.c 2004-08-04 23:49:06 +02:00 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -193,7 +194,7 @@ { struct Qdisc *q; - for (q = dev->qdisc_list; q; q = q->next) { + list_for_each_entry(q, &dev->qdisc_list, list) { if (q->handle == handle) return q; } @@ -424,6 +425,7 @@ memset(sch, 0, size); + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); if (handle == TC_H_INGRESS) @@ -449,8 +451,7 @@ if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { write_lock(&qdisc_tree_lock); - sch->next = dev->qdisc_list; - dev->qdisc_list = sch; + list_add_tail(&sch->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) @@ -805,15 +806,18 @@ if (idx > s_idx) s_q_idx = 0; read_lock(&qdisc_tree_lock); - for (q = dev->qdisc_list, q_idx = 0; q; - q = q->next, q_idx++) { - if (q_idx < s_q_idx) + q_idx = 0; + list_for_each_entry(q, &dev->qdisc_list, list) { + if (q_idx < s_q_idx) { + q_idx++; continue; + } if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { read_unlock(&qdisc_tree_lock); goto done; } + q_idx++; } read_unlock(&qdisc_tree_lock); } @@ -1024,13 +1028,16 @@ return 0; s_t = cb->args[0]; + t = 0; read_lock(&qdisc_tree_lock); - for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { - if (t < s_t) continue; - if (!q->ops->cl_ops) continue; - if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle) + list_for_each_entry(q, &dev->qdisc_list, list) { + if (t < s_t || !q->ops->cl_ops || + (tcm->tcm_parent && + TC_H_MAJ(tcm->tcm_parent) != q->handle)) { + t++; continue; + } if (t > s_t) memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); arg.w.fn = qdisc_class_dump; @@ -1043,6 +1050,7 @@ cb->args[1] = arg.w.count; if (arg.w.stop) break; + t++; } read_unlock(&qdisc_tree_lock); diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-04 23:49:06 +02:00 +++ b/net/sched/sch_generic.c 2004-08-04 23:49:06 +02:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -391,6 +392,7 @@ return NULL; memset(sch, 0, size); + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); sch->ops = ops; sch->enqueue = ops->enqueue; @@ -420,22 +422,10 @@ void qdisc_destroy(struct Qdisc *qdisc) { struct Qdisc_ops *ops = qdisc->ops; - struct net_device *dev; if (!atomic_dec_and_test(&qdisc->refcnt)) return; - - dev = qdisc->dev; - - if (dev) { - struct Qdisc *q, **qp; - for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) { - if (q == qdisc) { - *qp = q->next; - break; - } - } - } + list_del(&qdisc->list); #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&qdisc->stats); #endif @@ -464,10 +454,8 @@ printk(KERN_INFO "%s: activation failed\n", dev->name); return; } - write_lock(&qdisc_tree_lock); - qdisc->next = dev->qdisc_list; - dev->qdisc_list = qdisc; + list_add_tail(&qdisc->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); } else { @@ -513,7 +501,7 @@ dev->qdisc = &noop_qdisc; spin_unlock_bh(&dev->queue_lock); dev->qdisc_sleeping = &noop_qdisc; - dev->qdisc_list = NULL; + INIT_LIST_HEAD(&dev->qdisc_list); write_unlock(&qdisc_tree_lock); dev_watchdog_init(dev); @@ -535,9 +523,8 @@ qdisc_destroy(qdisc); } #endif - BUG_TRAP(dev->qdisc_list == NULL); + BUG_TRAP(list_empty(&dev->qdisc_list)); BUG_TRAP(!timer_pending(&dev->watchdog_timer)); - dev->qdisc_list = NULL; spin_unlock_bh(&dev->queue_lock); write_unlock(&qdisc_tree_lock); } --------------000901050801010602050607-- From afleming@freescale.com Wed Aug 4 16:27:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 16:27:34 -0700 (PDT) Received: from motgate8.mot.com (motgate8.mot.com [129.188.136.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i74NRPFW006384 for ; Wed, 4 Aug 2004 16:27:27 -0700 Received: from il06exr04.mot.com (il06exr04.mot.com [129.188.137.134]) by motgate8.mot.com (Motorola/Motgate8) with ESMTP id i74N3B3a010419; Wed, 4 Aug 2004 16:03:11 -0700 (MST) Received: from [10.82.17.240] ([10.82.17.240]) by il06exr04.mot.com (Motorola/il06exr04) with ESMTP id i74N11i8021625; Wed, 4 Aug 2004 18:01:01 -0500 In-Reply-To: <4819CC65-E4DB-11D8-999F-000393C30512@freescale.com> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <1089170282.1038.80.camel@jzny.localdomain> <20040707032913.GA1822@havoc.gtf.org> <20040802231112.GA890@havoc.gtf.org> <4819CC65-E4DB-11D8-999F-000393C30512@freescale.com> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: multipart/mixed; boundary=Apple-Mail-1--463304085 Message-Id: <5016F2DB-E66A-11D8-B1F6-000393C30512@freescale.com> Cc: Andy Fleming , Kumar Gala , "" , jamal , "" , Christoph Hellwig From: Andy Fleming Subject: Re: [RFR] gianfar ethernet driver Date: Wed, 4 Aug 2004 18:02:09 -0500 To: Jeff Garzik X-Mailer: Apple Mail (2.618) X-archive-position: 7517 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: afleming@freescale.com Precedence: bulk X-list: netdev Content-Length: 81272 Lines: 2769 --Apple-Mail-1--463304085 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Ok, while we're still waiting, I found a couple of bugs, so here's another patch: same as before, only correct (I hope) Andy On Aug 2, 2004, at 18:25, Andy Fleming wrote: > D'oh! > > On Aug 2, 2004, at 18:11, Jeff Garzik wrote: >> On Mon, Aug 02, 2004 at 05:19:13PM -0500, Andy Fleming wrote: >>> Here's an updated patch which fixes module support which does this: >>> >>> * More cleanup/minor bug fixes >>> * Added locking to PHY read/write wrappers >>> * Fixed module support >>> * Removed fastroute code >>> >>> As before, this patch replaces the previous ones I have submitted. >> >> the patch? :) >> >> Jeff --Apple-Mail-1--463304085 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="patch_2004_8_4" Content-Disposition: attachment; filename=patch_2004_8_4 diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile --- a/drivers/net/Makefile Wed Aug 4 17:48:23 2004 +++ b/drivers/net/Makefile Wed Aug 4 17:48:23 2004 @@ -10,7 +10,9 @@ obj-$(CONFIG_IBM_EMAC) += ibm_emac/ obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_BONDING) += bonding/ -obj-$(CONFIG_GIANFAR) += gianfar.o gianfar_ethtool.o gianfar_phy.o +obj-$(CONFIG_GIANFAR) += gianfar_driver.o + +gianfar_driver-objs := gianfar.o gianfar_ethtool.o gianfar_phy.o # # link order important here diff -Nru a/drivers/net/gianfar.c b/drivers/net/gianfar.c --- a/drivers/net/gianfar.c Wed Aug 4 17:48:23 2004 +++ b/drivers/net/gianfar.c Wed Aug 4 17:48:23 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -96,15 +96,6 @@ #include "gianfar.h" #include "gianfar_phy.h" -#ifdef CONFIG_NET_FASTROUTE -#include -#include -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41) -#define irqreturn_t void -#define IRQ_HANDLED -#endif #define TX_TIMEOUT (1*HZ) #define SKB_ALLOC_TIMEOUT 1000000 @@ -117,9 +108,8 @@ #define RECEIVE(x) netif_rx(x) #endif -#define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.0, " -char gfar_driver_name[] = "Gianfar Ethernet"; -char gfar_driver_version[] = "1.0"; +const char gfar_driver_name[] = "Gianfar Ethernet"; +const char gfar_driver_version[] = "1.1"; int startup_gfar(struct net_device *dev); static int gfar_enet_open(struct net_device *dev); @@ -148,24 +138,11 @@ #ifdef CONFIG_GFAR_NAPI static int gfar_poll(struct net_device *dev, int *budget); #endif -#ifdef CONFIG_NET_FASTROUTE -static int gfar_accept_fastpath(struct net_device *dev, struct dst_entry *dst); -#endif -static inline int try_fastroute(struct sk_buff *skb, struct net_device *dev, int length); -#ifdef CONFIG_GFAR_NAPI static int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit); -#else -static int gfar_clean_rx_ring(struct net_device *dev); -#endif static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length); +static void gfar_phy_startup_timer(unsigned long data); extern struct ethtool_ops gfar_ethtool_ops; -extern void gfar_gstrings_normon(struct net_device *dev, u32 stringset, - u8 * buf); -extern void gfar_fill_stats_normon(struct net_device *dev, - struct ethtool_stats *dummy, u64 * buf); -extern int gfar_stats_count_normon(struct net_device *dev); - MODULE_AUTHOR("Freescale Semiconductor, Inc"); MODULE_DESCRIPTION("Gianfar Ethernet Driver"); @@ -183,7 +160,7 @@ struct ocp_gfar_data *einfo; int idx; int err = 0; - struct ethtool_ops *dev_ethtool_ops; + int dev_ethtool_ops = 0; einfo = (struct ocp_gfar_data *) ocpdev->def->additions; @@ -197,7 +174,8 @@ /* get a pointer to the register memory which can * configure the PHYs. If it's different from this set, * get the device which has those regs */ - if ((einfo->phyregidx >= 0) && (einfo->phyregidx != ocpdev->def->index)) { + if ((einfo->phyregidx >= 0) && + (einfo->phyregidx != ocpdev->def->index)) { mdiodev = ocp_find_device(OCP_ANY_ID, OCP_FUNC_GFAR, einfo->phyregidx); @@ -222,7 +200,7 @@ /* get a pointer to the register memory */ priv->regs = (struct gfar *) - ioremap(ocpdev->def->paddr, sizeof (struct gfar)); + ioremap(ocpdev->def->paddr, sizeof (struct gfar)); if (priv->regs == NULL) { err = -ENOMEM; @@ -238,6 +216,8 @@ goto phy_regs_fail; } + spin_lock_init(&priv->lock); + ocp_set_drvdata(ocpdev, dev); /* Stop the DMA engine now, in case it was running before */ @@ -269,15 +249,13 @@ gfar_write(&priv->regs->ecntrl, ECNTRL_INIT_SETTINGS); /* Copy the station address into the dev structure, */ - /* and into the address registers MAC_STNADDR1,2. */ - /* Backwards, because little endian MACs are dumb. */ - /* Don't set the regs if the firmware already did */ memcpy(dev->dev_addr, einfo->mac_addr, MAC_ADDR_LEN); /* Set the dev->base_addr to the gfar reg region */ dev->base_addr = (unsigned long) (priv->regs); SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &ocpdev->dev); /* Fill in the dev structure */ dev->open = gfar_enet_open; @@ -293,37 +271,16 @@ dev->change_mtu = gfar_change_mtu; dev->mtu = 1500; dev->set_multicast_list = gfar_set_multi; - dev->flags |= IFF_MULTICAST; - - dev_ethtool_ops = - (struct ethtool_ops *)kmalloc(sizeof(struct ethtool_ops), - GFP_KERNEL); - - if(dev_ethtool_ops == NULL) { - err = -ENOMEM; - goto ethtool_fail; - } - - memcpy(dev_ethtool_ops, &gfar_ethtool_ops, sizeof(gfar_ethtool_ops)); - /* If there is no RMON support in this device, we don't - * want to expose non-existant statistics */ - if((priv->einfo->flags & GFAR_HAS_RMON) == 0) { - dev_ethtool_ops->get_strings = gfar_gstrings_normon; - dev_ethtool_ops->get_stats_count = gfar_stats_count_normon; - dev_ethtool_ops->get_ethtool_stats = gfar_fill_stats_normon; - } - - if((priv->einfo->flags & GFAR_HAS_COALESCE) == 0) { - dev_ethtool_ops->set_coalesce = NULL; - dev_ethtool_ops->get_coalesce = NULL; - } + /* Index into the array of possible ethtool + * ops to catch all 4 possibilities */ + if((priv->einfo->flags & GFAR_HAS_RMON) == 0) + dev_ethtool_ops += 1; - dev->ethtool_ops = dev_ethtool_ops; + if((priv->einfo->flags & GFAR_HAS_COALESCE) == 0) + dev_ethtool_ops += 2; -#ifdef CONFIG_NET_FASTROUTE - dev->accept_fastpath = gfar_accept_fastpath; -#endif + dev->ethtool_ops = gfar_op_array[dev_ethtool_ops]; priv->rx_buffer_size = DEFAULT_RX_BUFFER_SIZE; #ifdef CONFIG_GFAR_BUFSTASH @@ -332,27 +289,26 @@ priv->tx_ring_size = DEFAULT_TX_RING_SIZE; priv->rx_ring_size = DEFAULT_RX_RING_SIZE; - /* Initially, coalescing is disabled */ - priv->txcoalescing = 0; - priv->txcount = 0; - priv->txtime = 0; - priv->rxcoalescing = 0; - priv->rxcount = 0; - priv->rxtime = 0; + priv->txcoalescing = DEFAULT_TX_COALESCE; + priv->txcount = DEFAULT_TXCOUNT; + priv->txtime = DEFAULT_TXTIME; + priv->rxcoalescing = DEFAULT_RX_COALESCE; + priv->rxcount = DEFAULT_RXCOUNT; + priv->rxtime = DEFAULT_RXTIME; err = register_netdev(dev); if (err) { printk(KERN_ERR "%s: Cannot register net device, aborting.\n", - dev->name); + dev->name); goto register_fail; } /* Print out the device info */ - printk(DEVICE_NAME, dev->name); + printk(KERN_INFO DEVICE_NAME, dev->name); for (idx = 0; idx < 6; idx++) - printk("%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); - printk("\n"); + printk(KERN_INFO "%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); + printk(KERN_INFO "\n"); /* Even more device info helps when determining which kernel */ /* provided which set of benchmarks. Since this is global for all */ @@ -367,10 +323,7 @@ return 0; - register_fail: - kfree(dev_ethtool_ops); -ethtool_fail: iounmap((void *) priv->phyregs); phy_regs_fail: iounmap((void *) priv->regs); @@ -386,7 +339,6 @@ ocp_set_drvdata(ocpdev, NULL); - kfree(dev->ethtool_ops); iounmap((void *) priv->regs); iounmap((void *) priv->phyregs); free_netdev(dev); @@ -399,26 +351,90 @@ { struct gfar_private *priv = netdev_priv(dev); struct phy_info *curphy; + unsigned int timeout = PHY_INIT_TIMEOUT; + struct gfar *phyregs = priv->phyregs; + struct gfar_mii_info *mii_info; + int err; - priv->link = 1; priv->oldlink = 0; priv->oldspeed = 0; - priv->olddplx = -1; + priv->oldduplex = -1; + + mii_info = kmalloc(sizeof(struct gfar_mii_info), + GFP_KERNEL); + + if(NULL == mii_info) { + printk(KERN_ERR "%s: Could not allocate mii_info\n", + dev->name); + return -ENOMEM; + } + + mii_info->speed = SPEED_1000; + mii_info->duplex = DUPLEX_FULL; + mii_info->pause = 0; + mii_info->link = 1; + + mii_info->advertising = (ADVERTISED_10baseT_Half | + ADVERTISED_10baseT_Full | + ADVERTISED_100baseT_Half | + ADVERTISED_100baseT_Full | + ADVERTISED_1000baseT_Full); + mii_info->autoneg = 1; + + mii_info->mii_id = priv->einfo->phyid; + + mii_info->dev = dev; + + mii_info->mdio_read = &read_phy_reg; + mii_info->mdio_write = &write_phy_reg; + + priv->mii_info = mii_info; + + /* Reset the management interface */ + gfar_write(&phyregs->miimcfg, MIIMCFG_RESET); + + /* Setup the MII Mgmt clock speed */ + gfar_write(&phyregs->miimcfg, MIIMCFG_INIT_VALUE); + + /* Wait until the bus is free */ + while ((gfar_read(&phyregs->miimind) & MIIMIND_BUSY) && + timeout--) + cpu_relax(); + + if(timeout <= 0) { + printk(KERN_ERR "%s: The MII Bus is stuck!\n", + dev->name); + err = -1; + goto bus_fail; + } /* get info for this PHY */ - curphy = get_phy_info(dev); + curphy = get_phy_info(priv->mii_info); if (curphy == NULL) { printk(KERN_ERR "%s: No PHY found\n", dev->name); - return -1; + err = -1; + goto no_phy; } - priv->phyinfo = curphy; + mii_info->phyinfo = curphy; + + /* Run the commands which initialize the PHY */ + if(curphy->init) { + err = curphy->init(priv->mii_info); - /* Run the commands which configure the PHY */ - phy_run_commands(dev, curphy->config); + if (err) + goto phy_init_fail; + } return 0; + +phy_init_fail: +no_phy: +bus_fail: + kfree(mii_info); + + return err; } static void init_registers(struct net_device *dev) @@ -494,7 +510,7 @@ spin_lock_irqsave(&priv->lock, flags); /* Tell the kernel the link is down */ - priv->link = 0; + priv->mii_info->link = 0; adjust_link(dev); /* Mask all interrupts */ @@ -521,7 +537,12 @@ gfar_write(®s->maccfg1, tempval); if (priv->einfo->flags & GFAR_HAS_PHY_INTR) { - phy_run_commands(dev, priv->phyinfo->shutdown); + /* Clear any pending interrupts */ + mii_clear_phy_interrupt(priv->mii_info); + + /* Disable PHY Interrupts */ + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_DISABLED); } spin_unlock_irqrestore(&priv->lock, flags); @@ -543,15 +564,11 @@ free_skb_resources(priv); - dma_unmap_single(NULL, gfar_read(®s->tbase), - sizeof(struct txbd)*priv->tx_ring_size, - DMA_BIDIRECTIONAL); - dma_unmap_single(NULL, gfar_read(®s->rbase), - sizeof(struct rxbd)*priv->rx_ring_size, - DMA_BIDIRECTIONAL); - - /* Free the buffer descriptors */ - kfree(priv->tx_bd_base); + dma_free_coherent(NULL, + sizeof(struct txbd8)*priv->tx_ring_size + + sizeof(struct rxbd8)*priv->rx_ring_size, + priv->tx_bd_base, + gfar_read(®s->tbase)); } /* If there are any tx skbs or rx skbs still around, free them. @@ -610,7 +627,8 @@ { struct txbd8 *txbdp; struct rxbd8 *rxbdp; - unsigned long addr; + dma_addr_t addr; + unsigned long vaddr; int i; struct gfar_private *priv = netdev_priv(dev); struct gfar *regs = priv->regs; @@ -620,32 +638,27 @@ gfar_write(®s->imask, IMASK_INIT_CLEAR); /* Allocate memory for the buffer descriptors */ - addr = - (unsigned int) kmalloc(sizeof (struct txbd8) * priv->tx_ring_size + - sizeof (struct rxbd8) * priv->rx_ring_size, - GFP_KERNEL); + vaddr = (unsigned long) dma_alloc_coherent(NULL, + sizeof (struct txbd8) * priv->tx_ring_size + + sizeof (struct rxbd8) * priv->rx_ring_size, + &addr, GFP_KERNEL); - if (addr == 0) { + if (vaddr == 0) { printk(KERN_ERR "%s: Could not allocate buffer descriptors!\n", dev->name); return -ENOMEM; } - priv->tx_bd_base = (struct txbd8 *) addr; + priv->tx_bd_base = (struct txbd8 *) vaddr; /* enet DMA only understands physical addresses */ - gfar_write(®s->tbase, - dma_map_single(NULL, (void *)addr, - sizeof(struct txbd8) * priv->tx_ring_size, - DMA_BIDIRECTIONAL)); + gfar_write(®s->tbase, addr); /* Start the rx descriptor ring where the tx ring leaves off */ addr = addr + sizeof (struct txbd8) * priv->tx_ring_size; - priv->rx_bd_base = (struct rxbd8 *) addr; - gfar_write(®s->rbase, - dma_map_single(NULL, (void *)addr, - sizeof(struct rxbd8) * priv->rx_ring_size, - DMA_BIDIRECTIONAL)); + vaddr = vaddr + sizeof (struct txbd8) * priv->tx_ring_size; + priv->rx_bd_base = (struct rxbd8 *) vaddr; + gfar_write(®s->rbase, addr); /* Setup the skbuff rings */ priv->tx_skbuff = @@ -755,39 +768,13 @@ } } - /* Grab the PHY interrupt */ - if (priv->einfo->flags & GFAR_HAS_PHY_INTR) { - if (request_irq(priv->einfo->interruptPHY, phy_interrupt, - SA_SHIRQ, "phy_interrupt", dev) < 0) { - printk(KERN_ERR "%s: Can't get IRQ %d (PHY)\n", - dev->name, priv->einfo->interruptPHY); - - err = -1; - - if (priv->einfo->flags & GFAR_HAS_MULTI_INTR) - goto phy_irq_fail; - else - goto tx_irq_fail; - } - } else { - init_timer(&priv->phy_info_timer); - priv->phy_info_timer.function = &gfar_phy_timer; - priv->phy_info_timer.data = (unsigned long) dev; - mod_timer(&priv->phy_info_timer, jiffies + 2 * HZ); - } - - /* Set up the bottom half queue */ - INIT_WORK(&priv->tq, (void (*)(void *))gfar_phy_change, dev); + /* Set up the PHY change work queue */ + INIT_WORK(&priv->tq, gfar_phy_change, dev); - /* Configure the PHY interrupt */ - phy_run_commands(dev, priv->phyinfo->startup); - - /* Tell the kernel the link is up, and determine the - * negotiated features (speed, duplex) */ - adjust_link(dev); - - if (priv->link == 0) - printk(KERN_INFO "%s: No link detected\n", dev->name); + init_timer(&priv->phy_info_timer); + priv->phy_info_timer.function = &gfar_phy_startup_timer; + priv->phy_info_timer.data = (unsigned long) priv->mii_info; + mod_timer(&priv->phy_info_timer, jiffies + HZ); /* Configure the coalescing support */ if (priv->txcoalescing) @@ -827,8 +814,6 @@ return 0; -phy_irq_fail: - free_irq(priv->einfo->interruptReceive, dev); rx_irq_fail: free_irq(priv->einfo->interruptTransmit, dev); tx_irq_fail: @@ -837,7 +822,17 @@ rx_skb_fail: free_skb_resources(priv); tx_skb_fail: - kfree(priv->tx_bd_base); + dma_free_coherent(NULL, + sizeof(struct txbd8)*priv->tx_ring_size + + sizeof(struct rxbd8)*priv->rx_ring_size, + priv->tx_bd_base, + gfar_read(®s->tbase)); + + if (priv->mii_info->phyinfo->close) + priv->mii_info->phyinfo->close(priv->mii_info); + + kfree(priv->mii_info); + return err; } @@ -854,7 +849,7 @@ err = init_phy(dev); - if (err) + if(err) return err; err = startup_gfar(dev); @@ -934,8 +929,15 @@ /* Stops the kernel queue, and halts the controller */ static int gfar_close(struct net_device *dev) { + struct gfar_private *priv = netdev_priv(dev); stop_gfar(dev); + /* Shutdown the PHY */ + if (priv->mii_info->phyinfo->close) + priv->mii_info->phyinfo->close(priv->mii_info); + + kfree(priv->mii_info); + netif_stop_queue(dev); return 0; @@ -971,121 +973,6 @@ return 0; } -/********************************************************************** - * gfar_accept_fastpath - * - * Used to authenticate to the kernel that a fast path entry can be - * added to device's routing table cache - * - * Input : pointer to ethernet interface network device structure and - * a pointer to the designated entry to be added to the cache. - * Output : zero upon success, negative upon failure - **********************************************************************/ -#ifdef CONFIG_NET_FASTROUTE -static int gfar_accept_fastpath(struct net_device *dev, struct dst_entry *dst) -{ - struct net_device *odev = dst->dev; - - if ((dst->ops->protocol != __constant_htons(ETH_P_IP)) - || (odev->type != ARPHRD_ETHER) - || (odev->accept_fastpath == NULL)) { - return -1; - } - - return 0; -} -#endif - -/* try_fastroute() -- Checks the fastroute cache to see if a given packet - * can be routed immediately to another device. If it can, we send it. - * If we used a fastroute, we return 1. Otherwise, we return 0. - * Returns 0 if CONFIG_NET_FASTROUTE is not on - */ -static inline int try_fastroute(struct sk_buff *skb, struct net_device *dev, int length) -{ -#ifdef CONFIG_NET_FASTROUTE - struct ethhdr *eth; - struct iphdr *iph; - unsigned int hash; - struct rtable *rt; - struct net_device *odev; - struct gfar_private *priv = netdev_priv(dev); - unsigned int CPU_ID = smp_processor_id(); - - eth = (struct ethhdr *) (skb->data); - - /* Only route ethernet IP packets */ - if (eth->h_proto == __constant_htons(ETH_P_IP)) { - iph = (struct iphdr *) (skb->data + ETH_HLEN); - - /* Generate the hash value */ - hash = ((*(u8 *) &iph->daddr) ^ (*(u8 *) & iph->saddr)) & NETDEV_FASTROUTE_HMASK; - - rt = (struct rtable *) (dev->fastpath[hash]); - if (rt != NULL - && ((*(u32 *) &iph->daddr) == (*(u32 *) &rt->key.dst)) - && ((*(u32 *) &iph->saddr) == (*(u32 *) &rt->key.src)) - && !(rt->u.dst.obsolete)) { - odev = rt->u.dst.dev; - netdev_rx_stat[CPU_ID].fastroute_hit++; - - /* Make sure the packet is: - * 1) IPv4 - * 2) without any options (header length of 5) - * 3) Not a multicast packet - * 4) going to a valid destination - * 5) Not out of time-to-live - */ - if (iph->version == 4 - && iph->ihl == 5 - && (!(eth->h_dest[0] & 0x01)) - && neigh_is_valid(rt->u.dst.neighbour) - && iph->ttl > 1) { - - /* Fast Route Path: Taken if the outgoing device is ready to transmit the packet now */ - if ((!netif_queue_stopped(odev)) - && (!spin_is_locked(odev->xmit_lock)) - && (skb->len <= (odev->mtu + ETH_HLEN + 2 + 4))) { - - skb->pkt_type = PACKET_FASTROUTE; - skb->protocol = __constant_htons(ETH_P_IP); - ip_decrease_ttl(iph); - memcpy(eth->h_source, odev->dev_addr, MAC_ADDR_LEN); - memcpy(eth->h_dest, rt->u.dst.neighbour->ha, MAC_ADDR_LEN); - skb->dev = odev; - - /* Prep the skb for the packet */ - skb_put(skb, length); - - if (odev->hard_start_xmit(skb, odev) != 0) { - panic("%s: FastRoute path corrupted", dev->name); - } - netdev_rx_stat[CPU_ID].fastroute_success++; - } - - /* Semi Fast Route Path: Mark the packet as needing fast routing, but let the - * stack handle getting it to the device */ - else { - skb->pkt_type = PACKET_FASTROUTE; - skb->nh.raw = skb->data + ETH_HLEN; - skb->protocol = __constant_htons(ETH_P_IP); - netdev_rx_stat[CPU_ID].fastroute_defer++; - - /* Prep the skb for the packet */ - skb_put(skb, length); - - if(RECEIVE(skb) == NET_RX_DROP) { - priv->extra_stats.kernel_dropped++; - } - } - - return 1; - } - } - } -#endif /* CONFIG_NET_FASTROUTE */ - return 0; -} static int gfar_change_mtu(struct net_device *dev, int new_mtu) { @@ -1148,8 +1035,7 @@ startup_gfar(dev); } - if (!netif_queue_stopped(dev)) - netif_schedule(dev); + netif_schedule(dev); } /* Interrupt Handler for Transmit complete */ @@ -1315,7 +1201,7 @@ #else spin_lock(&priv->lock); - gfar_clean_rx_ring(dev); + gfar_clean_rx_ring(dev, priv->rx_ring_size); /* If we are coalescing interrupts, update the timer */ /* Otherwise, clear it */ @@ -1336,7 +1222,7 @@ /* gfar_process_frame() -- handle one incoming packet if skb - * isn't NULL. Try the fastroute before using the stack */ + * isn't NULL. */ static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length) { @@ -1350,17 +1236,15 @@ priv->stats.rx_dropped++; priv->extra_stats.rx_skbmissing++; } else { - if(try_fastroute(skb, dev, length) == 0) { - /* Prep the skb for the packet */ - skb_put(skb, length); - - /* Tell the skb what kind of packet this is */ - skb->protocol = eth_type_trans(skb, dev); - - /* Send the packet up the stack */ - if (RECEIVE(skb) == NET_RX_DROP) { - priv->extra_stats.kernel_dropped++; - } + /* Prep the skb for the packet */ + skb_put(skb, length); + + /* Tell the skb what kind of packet this is */ + skb->protocol = eth_type_trans(skb, dev); + + /* Send the packet up the stack */ + if (RECEIVE(skb) == NET_RX_DROP) { + priv->extra_stats.kernel_dropped++; } } @@ -1368,14 +1252,10 @@ } /* gfar_clean_rx_ring() -- Processes each frame in the rx ring - * until all are gone (or, in the case of NAPI, the budget/quota - * has been reached). Returns the number of frames handled + * until the budget/quota has been reached. Returns the number + * of frames handled */ -#ifdef CONFIG_GFAR_NAPI static int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) -#else -static int gfar_clean_rx_ring(struct net_device *dev) -#endif { struct rxbd8 *bdp; struct sk_buff *skb; @@ -1386,12 +1266,7 @@ /* Get the first full descriptor */ bdp = priv->cur_rx; -#ifdef CONFIG_GFAR_NAPI -#define GFAR_RXDONE() ((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0)) -#else -#define GFAR_RXDONE() (bdp->status & RXBD_EMPTY) -#endif - while (!GFAR_RXDONE()) { + while (!((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0))) { skb = priv->rx_skbuff[priv->skb_currx]; if (!(bdp->status & @@ -1407,7 +1282,6 @@ gfar_process_frame(dev, skb, pkt_len); priv->stats.rx_bytes += pkt_len; - } else { count_errors(bdp->status, priv); @@ -1462,7 +1336,6 @@ if (rx_work_limit > dev->quota) rx_work_limit = dev->quota; - spin_lock(&priv->lock); howmany = gfar_clean_rx_ring(dev, rx_work_limit); dev->quota -= howmany; @@ -1489,8 +1362,6 @@ priv->rxclean = 1; } - spin_unlock(priv->lock); - return (rx_work_limit < 0) ? 1 : 0; } #endif @@ -1586,10 +1457,14 @@ struct net_device *dev = (struct net_device *) dev_id; struct gfar_private *priv = netdev_priv(dev); - /* Run the commands which acknowledge the interrupt */ - phy_run_commands(dev, priv->phyinfo->ack_int); + /* Clear the interrupt */ + mii_clear_phy_interrupt(priv->mii_info); - /* Schedule the bottom half */ + /* Disable PHY interrupts */ + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_DISABLED); + + /* Schedule the phy change */ schedule_work(&priv->tq); return IRQ_HANDLED; @@ -1600,18 +1475,24 @@ { struct net_device *dev = (struct net_device *) data; struct gfar_private *priv = netdev_priv(dev); - int timeout = HZ / 1000 + 1; + int result = 0; /* Delay to give the PHY a chance to change the * register state */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(timeout); + msleep(1); - /* Run the commands which check the link state */ - phy_run_commands(dev, priv->phyinfo->handle_int); + /* Update the link, speed, duplex */ + result = priv->mii_info->phyinfo->read_status(priv->mii_info); - /* React to the change in state */ - adjust_link(dev); + /* Adjust the known status as long as the link + * isn't still coming up */ + if((0 == result) || (priv->mii_info->link == 0)) + adjust_link(dev); + + /* Reenable interrupts, if needed */ + if (priv->einfo->flags & GFAR_HAS_PHY_INTR) + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_ENABLED); } /* Called every so often on systems that don't interrupt @@ -1623,7 +1504,72 @@ schedule_work(&priv->tq); - mod_timer(&priv->phy_info_timer, jiffies + 2 * HZ); + mod_timer(&priv->phy_info_timer, jiffies + + GFAR_PHY_CHANGE_TIME * HZ); +} + +/* Keep trying aneg for some time + * If, after GFAR_AN_TIMEOUT seconds, it has not + * finished, we switch to forced. + * Either way, once the process has completed, we either + * request the interrupt, or switch the timer over to + * using gfar_phy_timer to check status */ +static void gfar_phy_startup_timer(unsigned long data) +{ + int result; + static int secondary = GFAR_AN_TIMEOUT; + struct gfar_mii_info *mii_info = (struct gfar_mii_info *)data; + struct gfar_private *priv = netdev_priv(mii_info->dev); + + /* Configure the Auto-negotiation */ + result = mii_info->phyinfo->config_aneg(mii_info); + + /* If autonegotiation failed to start, and + * we haven't timed out, reset the timer, and return */ + if (result && secondary--) { + mod_timer(&priv->phy_info_timer, jiffies + HZ); + return; + } else if (result) { + /* Couldn't start autonegotiation. + * Try switching to forced */ + mii_info->autoneg = 0; + result = mii_info->phyinfo->config_aneg(mii_info); + + /* Forcing failed! Give up */ + if(result) { + printk(KERN_ERR "%s: Forcing failed!\n", + mii_info->dev->name); + return; + } + } + + /* Kill the timer so it can be restarted */ + del_timer_sync(&priv->phy_info_timer); + + /* Grab the PHY interrupt, if necessary/possible */ + if (priv->einfo->flags & GFAR_HAS_PHY_INTR) { + if (request_irq(priv->einfo->interruptPHY, + phy_interrupt, + SA_SHIRQ, + "phy_interrupt", + mii_info->dev) < 0) { + printk(KERN_ERR "%s: Can't get IRQ %d (PHY)\n", + mii_info->dev->name, + priv->einfo->interruptPHY); + } else { + mii_configure_phy_interrupt(priv->mii_info, + MII_INTERRUPT_ENABLED); + return; + } + } + + /* Start the timer again, this time in order to + * handle a change in status */ + init_timer(&priv->phy_info_timer); + priv->phy_info_timer.function = &gfar_phy_timer; + priv->phy_info_timer.data = (unsigned long) mii_info->dev; + mod_timer(&priv->phy_info_timer, jiffies + + GFAR_PHY_CHANGE_TIME * HZ); } /* Called every time the controller might need to be made @@ -1637,12 +1583,13 @@ struct gfar_private *priv = netdev_priv(dev); struct gfar *regs = priv->regs; u32 tempval; + struct gfar_mii_info *mii_info = priv->mii_info; - if (priv->link) { + if (mii_info->link) { /* Now we make sure that we can be in full duplex mode. * If not, we operate in half-duplex mode. */ - if (priv->duplexity != priv->olddplx) { - if (!(priv->duplexity)) { + if (mii_info->duplex != priv->oldduplex) { + if (!(mii_info->duplex)) { tempval = gfar_read(®s->maccfg2); tempval &= ~(MACCFG2_FULL_DUPLEX); gfar_write(®s->maccfg2, tempval); @@ -1658,11 +1605,11 @@ dev->name); } - priv->olddplx = priv->duplexity; + priv->oldduplex = mii_info->duplex; } - if (priv->speed != priv->oldspeed) { - switch (priv->speed) { + if (mii_info->speed != priv->oldspeed) { + switch (mii_info->speed) { case 1000: tempval = gfar_read(®s->maccfg2); tempval = @@ -1679,14 +1626,14 @@ default: printk(KERN_WARNING "%s: Ack! Speed (%d) is not 10/100/1000!\n", - dev->name, priv->speed); + dev->name, mii_info->speed); break; } printk(KERN_INFO "%s: Speed %dBT\n", dev->name, - priv->speed); + mii_info->speed); - priv->oldspeed = priv->speed; + priv->oldspeed = mii_info->speed; } if (!priv->oldlink) { @@ -1700,7 +1647,7 @@ printk(KERN_INFO "%s: Link is down\n", dev->name); priv->oldlink = 0; priv->oldspeed = 0; - priv->olddplx = -1; + priv->oldduplex = -1; netif_carrier_off(dev); } } @@ -1900,11 +1847,7 @@ int rc; rc = ocp_register_driver(&gfar_driver); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41) if (rc != 0) { -#else - if (rc == 0) { -#endif ocp_unregister_driver(&gfar_driver); return -ENODEV; } diff -Nru a/drivers/net/gianfar.h b/drivers/net/gianfar.h --- a/drivers/net/gianfar.h Wed Aug 4 17:48:23 2004 +++ b/drivers/net/gianfar.h Wed Aug 4 17:48:23 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -17,6 +17,8 @@ * * Still left to do: * -Add support for module parameters + * -Add support for ethtool -s + * -Add patch for ethtool phys id */ #ifndef __GIANFAR_H #define __GIANFAR_H @@ -42,15 +44,7 @@ #include #include #include - -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41) #include -#else -#include -#define work_struct tq_struct -#define schedule_work schedule_task -#endif - #include #include #include @@ -70,8 +64,13 @@ #define MAC_ADDR_LEN 6 -extern char gfar_driver_name[]; -extern char gfar_driver_version[]; +#define PHY_INIT_TIMEOUT 100000 +#define GFAR_PHY_CHANGE_TIME 2 + +#define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.1, " +#define DRV_NAME "gfar-enet" +extern const char gfar_driver_name[]; +extern const char gfar_driver_version[]; /* These need to be powers of 2 for this driver */ #ifdef CONFIG_GFAR_NAPI @@ -105,11 +104,13 @@ #define GFAR_100_TIME 2560 #define GFAR_10_TIME 25600 +#define DEFAULT_TX_COALESCE 1 #define DEFAULT_TXCOUNT 16 -#define DEFAULT_TXTIME 32768 +#define DEFAULT_TXTIME 400 +#define DEFAULT_RX_COALESCE 1 #define DEFAULT_RXCOUNT 16 -#define DEFAULT_RXTIME 32768 +#define DEFAULT_RXTIME 400 #define TBIPA_VALUE 0x1f #define MIIMCFG_INIT_VALUE 0x00000007 @@ -467,8 +468,7 @@ * empty and completely full conditions. The empty/ready indicator in * the buffer descriptor determines the actual condition. */ -struct gfar_private -{ +struct gfar_private { /* pointers to arrays of skbuffs for tx and rx */ struct sk_buff ** tx_skbuff; struct sk_buff ** rx_skbuff; @@ -496,7 +496,6 @@ struct txbd8 *cur_tx; /* Next free ring entry */ struct txbd8 *dirty_tx; /* The Ring entry to be freed. */ struct gfar *regs; /* Pointer to the GFAR memory mapped Registers */ - struct phy_info *phyinfo; struct gfar *phyregs; struct work_struct tq; struct timer_list phy_info_timer; @@ -509,15 +508,14 @@ unsigned int rx_ring_size; wait_queue_head_t rxcleanupq; unsigned int rxclean; - int link; /* current link state */ - int oldlink; - int duplexity; /* Indicates negotiated duplex state */ - int olddplx; - int speed; /* Indicates negotiated speed */ - int oldspeed; - + /* Info structure initialized by board setup code */ struct ocp_gfar_data *einfo; + + struct gfar_mii_info *mii_info; + int oldspeed; + int oldduplex; + int oldlink; }; extern inline u32 gfar_read(volatile unsigned *addr) @@ -532,6 +530,6 @@ out_be32(addr, val); } - +extern struct ethtool_ops *gfar_op_array[]; #endif /* __GIANFAR_H */ diff -Nru a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c --- a/drivers/net/gianfar_ethtool.c Wed Aug 4 17:48:23 2004 +++ b/drivers/net/gianfar_ethtool.c Wed Aug 4 17:48:23 2004 @@ -1,18 +1,18 @@ /* - * drivers/net/gianfar_ethtool.c + * drivers/net/gianfar_ethtool.c * - * Gianfar Ethernet Driver - * Ethtool support for Gianfar Enet - * Based on e1000 ethtool support + * Gianfar Ethernet Driver + * Ethtool support for Gianfar Enet + * Based on e1000 ethtool support * - * Author: Andy Fleming - * Maintainer: Kumar Gala (kumar.gala@freescale.com) + * Author: Andy Fleming + * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2003,2004 Freescale Semiconductor, Inc. * - * This software may be used and distributed according to - * the terms of the GNU Public License, Version 2, incorporated herein - * by reference. + * This software may be used and distributed according to + * the terms of the GNU Public License, Version 2, incorporated herein + * by reference. */ #include @@ -58,64 +58,64 @@ void gfar_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo); static char stat_gstrings[][ETH_GSTRING_LEN] = { - "RX Dropped by Kernel", - "RX Large Frame Errors", - "RX Short Frame Errors", - "RX Non-Octet Errors", - "RX CRC Errors", - "RX Overrun Errors", - "RX Busy Errors", - "RX Babbling Errors", - "RX Truncated Frames", - "Ethernet Bus Error", - "TX Babbling Errors", - "TX Underrun Errors", - "RX SKB Missing Errors", - "TX Timeout Errors", - "tx&rx 64B frames", - "tx&rx 65-127B frames", - "tx&rx 128-255B frames", - "tx&rx 256-511B frames", - "tx&rx 512-1023B frames", - "tx&rx 1024-1518B frames", - "tx&rx 1519-1522B Good VLAN", - "RX bytes", - "RX Packets", - "RX FCS Errors", - "Receive Multicast Packet", - "Receive Broadcast Packet", - "RX Control Frame Packets", - "RX Pause Frame Packets", - "RX Unknown OP Code", - "RX Alignment Error", - "RX Frame Length Error", - "RX Code Error", - "RX Carrier Sense Error", - "RX Undersize Packets", - "RX Oversize Packets", - "RX Fragmented Frames", - "RX Jabber Frames", - "RX Dropped Frames", - "TX Byte Counter", - "TX Packets", - "TX Multicast Packets", - "TX Broadcast Packets", - "TX Pause Control Frames", - "TX Deferral Packets", - "TX Excessive Deferral Packets", - "TX Single Collision Packets", - "TX Multiple Collision Packets", - "TX Late Collision Packets", - "TX Excessive Collision Packets", - "TX Total Collision", - "RESERVED", - "TX Dropped Frames", - "TX Jabber Frames", - "TX FCS Errors", - "TX Control Frames", - "TX Oversize Frames", - "TX Undersize Frames", - "TX Fragmented Frames", + "rx-dropped-by-kernel", + "rx-large-frame-errors", + "rx-short-frame-errors", + "rx-non-octet-errors", + "rx-crc-errors", + "rx-overrun-errors", + "rx-busy-errors", + "rx-babbling-errors", + "rx-truncated-frames", + "ethernet-bus-error", + "tx-babbling-errors", + "tx-underrun-errors", + "rx-skb-missing-errors", + "tx-timeout-errors", + "tx-rx-64-frames", + "tx-rx-65-127-frames", + "tx-rx-128-255-frames", + "tx-rx-256-511-frames", + "tx-rx-512-1023-frames", + "tx-rx-1024-1518-frames", + "tx-rx-1519-1522-good-vlan", + "rx-bytes", + "rx-packets", + "rx-fcs-errors", + "receive-multicast-packet", + "receive-broadcast-packet", + "rx-control-frame-packets", + "rx-pause-frame-packets", + "rx-unknown-op-code", + "rx-alignment-error", + "rx-frame-length-error", + "rx-code-error", + "rx-carrier-sense-error", + "rx-undersize-packets", + "rx-oversize-packets", + "rx-fragmented-frames", + "rx-jabber-frames", + "rx-dropped-frames", + "tx-byte-counter", + "tx-packets", + "tx-multicast-packets", + "tx-broadcast-packets", + "tx-pause-control-frames", + "tx-deferral-packets", + "tx-excessive-deferral-packets", + "tx-single-collision-packets", + "tx-multiple-collision-packets", + "tx-late-collision-packets", + "tx-excessive-collision-packets", + "tx-total-collision", + "reserved", + "tx-dropped-frames", + "tx-jabber-frames", + "tx-fcs-errors", + "tx-control-frames", + "tx-oversize-frames", + "tx-undersize-frames", + "tx-fragmented-frames", }; /* Fill in an array of 64-bit statistics from various sources. @@ -125,7 +125,7 @@ void gfar_fill_stats(struct net_device *dev, struct ethtool_stats *dummy, u64 * buf) { int i; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); u32 *rmon = (u32 *) & priv->regs->rmon; u64 *extra = (u64 *) & priv->extra_stats; struct gfar_stats *stats = (struct gfar_stats *) buf; @@ -154,7 +154,7 @@ struct ethtool_stats *dummy, u64 * buf) { int i; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); u64 *extra = (u64 *) & priv->extra_stats; for (i = 0; i < GFAR_EXTRA_STATS_LEN; i++) { @@ -171,7 +171,7 @@ void gfar_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo) { - strncpy(drvinfo->driver, gfar_driver_name, GFAR_INFOSTR_LEN); + strncpy(drvinfo->driver, DRV_NAME, GFAR_INFOSTR_LEN); strncpy(drvinfo->version, gfar_driver_version, GFAR_INFOSTR_LEN); strncpy(drvinfo->fw_version, "N/A", GFAR_INFOSTR_LEN); strncpy(drvinfo->bus_info, "N/A", GFAR_INFOSTR_LEN); @@ -184,7 +184,7 @@ /* Return the current settings in the ethtool_cmd structure */ int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); uint gigabit_support = priv->einfo->flags & GFAR_HAS_GIGABIT ? SUPPORTED_1000baseT_Full : 0; uint gigabit_advert = @@ -201,10 +201,10 @@ | ADVERTISED_100baseT_Full | gigabit_advert | ADVERTISED_Autoneg); - cmd->speed = priv->speed; - cmd->duplex = priv->duplexity; + cmd->speed = priv->mii_info->speed; + cmd->duplex = priv->mii_info->duplex; cmd->port = PORT_MII; - cmd->phy_address = priv->einfo->phyid; + cmd->phy_address = priv->mii_info->mii_id; cmd->transceiver = XCVR_EXTERNAL; cmd->autoneg = AUTONEG_ENABLE; cmd->maxtxpkt = priv->txcount; @@ -223,7 +223,7 @@ void gfar_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) { int i; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); u32 *theregs = (u32 *) priv->regs; u32 *buf = (u32 *) regbuf; @@ -231,13 +231,6 @@ buf[i] = theregs[i]; } -/* Return the link state 1 is up, 0 is down */ -u32 gfar_get_link(struct net_device *dev) -{ - struct gfar_private *priv = (struct gfar_private *) dev->priv; - return (u32) priv->link; -} - /* Fill in a buffer with the strings which correspond to the * stats */ void gfar_gstrings(struct net_device *dev, u32 stringset, u8 * buf) @@ -252,7 +245,7 @@ unsigned int count; /* The timer is different, depending on the interface speed */ - switch (priv->speed) { + switch (priv->mii_info->speed) { case 1000: count = GFAR_GBIT_TIME; break; @@ -276,7 +269,7 @@ unsigned int count; /* The timer is different, depending on the interface speed */ - switch (priv->speed) { + switch (priv->mii_info->speed) { case 1000: count = GFAR_GBIT_TIME; break; @@ -298,7 +291,7 @@ * structure. */ int gfar_gcoalesce(struct net_device *dev, struct ethtool_coalesce *cvals) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); cvals->rx_coalesce_usecs = gfar_ticks2usecs(priv, priv->rxtime); cvals->rx_max_coalesced_frames = priv->rxcount; @@ -344,7 +337,7 @@ */ int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); /* Set up rx coalescing */ if ((cvals->rx_coalesce_usecs == 0) || @@ -386,7 +379,7 @@ * jumbo are ignored by the driver */ void gfar_gringparam(struct net_device *dev, struct ethtool_ringparam *rvals) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); rvals->rx_max_pending = GFAR_RX_MAX_RING_SIZE; rvals->rx_mini_max_pending = GFAR_RX_MAX_RING_SIZE; @@ -409,7 +402,7 @@ int gfar_sringparam(struct net_device *dev, struct ethtool_ringparam *rvals) { u32 tempval; - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); int err = 0; if (rvals->rx_pending > GFAR_RX_MAX_RING_SIZE) @@ -473,7 +466,7 @@ .get_drvinfo = gfar_gdrvinfo, .get_regs_len = gfar_reglen, .get_regs = gfar_get_regs, - .get_link = gfar_get_link, + .get_link = ethtool_op_get_link, .get_coalesce = gfar_gcoalesce, .set_coalesce = gfar_scoalesce, .get_ringparam = gfar_gringparam, @@ -481,4 +474,52 @@ .get_strings = gfar_gstrings, .get_stats_count = gfar_stats_count, .get_ethtool_stats = gfar_fill_stats, +}; + +struct ethtool_ops gfar_normon_nocoalesce_ethtool_ops = { + .get_settings = gfar_gsettings, + .get_drvinfo = gfar_gdrvinfo, + .get_regs_len = gfar_reglen, + .get_regs = gfar_get_regs, + .get_link = ethtool_op_get_link, + .get_ringparam = gfar_gringparam, + .set_ringparam = gfar_sringparam, + .get_strings = gfar_gstrings_normon, + .get_stats_count = gfar_stats_count_normon, + .get_ethtool_stats = gfar_fill_stats_normon, +}; + +struct ethtool_ops gfar_nocoalesce_ethtool_ops = { + .get_settings = gfar_gsettings, + .get_drvinfo = gfar_gdrvinfo, + .get_regs_len = gfar_reglen, + .get_regs = gfar_get_regs, + .get_link = ethtool_op_get_link, + .get_ringparam = gfar_gringparam, + .set_ringparam = gfar_sringparam, + .get_strings = gfar_gstrings, + .get_stats_count = gfar_stats_count, + .get_ethtool_stats = gfar_fill_stats, +}; + +struct ethtool_ops gfar_normon_ethtool_ops = { + .get_settings = gfar_gsettings, + .get_drvinfo = gfar_gdrvinfo, + .get_regs_len = gfar_reglen, + .get_regs = gfar_get_regs, + .get_link = ethtool_op_get_link, + .get_coalesce = gfar_gcoalesce, + .set_coalesce = gfar_scoalesce, + .get_ringparam = gfar_gringparam, + .set_ringparam = gfar_sringparam, + .get_strings = gfar_gstrings_normon, + .get_stats_count = gfar_stats_count_normon, + .get_ethtool_stats = gfar_fill_stats_normon, +}; + +struct ethtool_ops *gfar_op_array[] = { + &gfar_ethtool_ops, + &gfar_normon_ethtool_ops, + &gfar_nocoalesce_ethtool_ops, + &gfar_normon_nocoalesce_ethtool_ops }; diff -Nru a/drivers/net/gianfar_phy.c b/drivers/net/gianfar_phy.c --- a/drivers/net/gianfar_phy.c Wed Aug 4 17:48:23 2004 +++ b/drivers/net/gianfar_phy.c Wed Aug 4 17:48:23 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -38,21 +38,31 @@ #include #include #include +#include #include "gianfar.h" #include "gianfar_phy.h" +static void config_genmii_advert(struct gfar_mii_info *mii_info); +static void genmii_setup_forced(struct gfar_mii_info *mii_info); +static void genmii_restart_aneg(struct gfar_mii_info *mii_info); +static int gbit_config_aneg(struct gfar_mii_info *mii_info); +static int genmii_config_aneg(struct gfar_mii_info *mii_info); +static int genmii_update_link(struct gfar_mii_info *mii_info); +static int genmii_read_status(struct gfar_mii_info *mii_info); +u16 phy_read(struct gfar_mii_info *mii_info, u16 regnum); +void phy_write(struct gfar_mii_info *mii_info, u16 regnum, u16 val); + /* Write value to the PHY for this device to the register at regnum, */ /* waiting until the write is done before it returns. All PHY */ /* configuration has to be done through the TSEC1 MIIM regs */ -void write_phy_reg(struct net_device *dev, u16 regnum, u16 value) +void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); struct gfar *regbase = priv->phyregs; - struct ocp_gfar_data *einfo = priv->einfo; /* Set the PHY address and the register address we want to write */ - gfar_write(®base->miimadd, ((einfo->phyid) << 8) | regnum); + gfar_write(®base->miimadd, (mii_id << 8) | regnum); /* Write out the value we want */ gfar_write(®base->miimcon, value); @@ -65,19 +75,18 @@ /* Reads from register regnum in the PHY for device dev, */ /* returning the value. Clears miimcom first. All PHY */ /* configuration has to be done through the TSEC1 MIIM regs */ -u16 read_phy_reg(struct net_device *dev, u16 regnum) +int read_phy_reg(struct net_device *dev, int mii_id, int regnum) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + struct gfar_private *priv = netdev_priv(dev); struct gfar *regbase = priv->phyregs; - struct ocp_gfar_data *einfo = priv->einfo; u16 value; /* Set the PHY address and the register address we want to read */ - gfar_write(®base->miimadd, ((einfo->phyid) << 8) | regnum); + gfar_write(®base->miimadd, (mii_id << 8) | regnum); /* Clear miimcom, and then initiate a read */ gfar_write(®base->miimcom, 0); - gfar_write(®base->miimcom, MIIM_READ_COMMAND); + gfar_write(®base->miimcom, MII_READ_COMMAND); /* Wait for the transaction to finish */ while (gfar_read(®base->miimind) & (MIIMIND_NOTVALID | MIIMIND_BUSY)) @@ -89,362 +98,557 @@ return value; } -/* returns which value to write to the control register. */ -/* For 10/100 the value is slightly different. */ -u16 mii_cr_init(u16 mii_reg, struct net_device * dev) +void mii_clear_phy_interrupt(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; - struct ocp_gfar_data *einfo = priv->einfo; + if(mii_info->phyinfo->ack_interrupt) + mii_info->phyinfo->ack_interrupt(mii_info); +} - if (einfo->flags & GFAR_HAS_GIGABIT) - return MIIM_CONTROL_INIT; - else - return MIIM_CR_INIT; + +void mii_configure_phy_interrupt(struct gfar_mii_info *mii_info, u32 interrupts) +{ + mii_info->interrupts = interrupts; + if(mii_info->phyinfo->config_intr) + mii_info->phyinfo->config_intr(mii_info); +} + + +/* Writes MII_ADVERTISE with the appropriate values, after + * sanitizing advertise to make sure only supported features + * are advertised + */ +static void config_genmii_advert(struct gfar_mii_info *mii_info) +{ + u32 advertise; + u16 adv; + + /* Only allow advertising what this PHY supports */ + mii_info->advertising &= mii_info->phyinfo->features; + advertise = mii_info->advertising; + + /* Setup standard advertisement */ + adv = phy_read(mii_info, MII_ADVERTISE); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); + if (advertise & ADVERTISED_10baseT_Half) + adv |= ADVERTISE_10HALF; + if (advertise & ADVERTISED_10baseT_Full) + adv |= ADVERTISE_10FULL; + if (advertise & ADVERTISED_100baseT_Half) + adv |= ADVERTISE_100HALF; + if (advertise & ADVERTISED_100baseT_Full) + adv |= ADVERTISE_100FULL; + phy_write(mii_info, MII_ADVERTISE, adv); +} + +static void genmii_setup_forced(struct gfar_mii_info *mii_info) +{ + u16 ctrl; + u32 features = mii_info->phyinfo->features; + + ctrl = phy_read(mii_info, MII_BMCR); + + ctrl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_SPEED1000|BMCR_ANENABLE); + ctrl |= BMCR_RESET; + + switch(mii_info->speed) { + case SPEED_1000: + if(features & (SUPPORTED_1000baseT_Half + | SUPPORTED_1000baseT_Full)) { + ctrl |= BMCR_SPEED1000; + break; + } + mii_info->speed = SPEED_100; + case SPEED_100: + if (features & (SUPPORTED_100baseT_Half + | SUPPORTED_100baseT_Full)) { + ctrl |= BMCR_SPEED100; + break; + } + mii_info->speed = SPEED_10; + case SPEED_10: + if (features & (SUPPORTED_10baseT_Half + | SUPPORTED_10baseT_Full)) + break; + default: /* Unsupported speed! */ + printk(KERN_ERR "%s: Bad speed!\n", + mii_info->dev->name); + break; + } + + phy_write(mii_info, MII_BMCR, ctrl); +} + + +/* Enable and Restart Autonegotiation */ +static void genmii_restart_aneg(struct gfar_mii_info *mii_info) +{ + u16 ctl; + + ctl = phy_read(mii_info, MII_BMCR); + ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); + phy_write(mii_info, MII_BMCR, ctl); +} + + +static int gbit_config_aneg(struct gfar_mii_info *mii_info) +{ + u16 adv; + u32 advertise; + + if(mii_info->autoneg) { + /* Configure the ADVERTISE register */ + config_genmii_advert(mii_info); + advertise = mii_info->advertising; + + adv = phy_read(mii_info, MII_1000BASETCONTROL); + adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP | + MII_1000BASETCONTROL_HALFDUPLEXCAP); + if (advertise & SUPPORTED_1000baseT_Half) + adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP; + if (advertise & SUPPORTED_1000baseT_Full) + adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP; + phy_write(mii_info, MII_1000BASETCONTROL, adv); + + /* Start/Restart aneg */ + genmii_restart_aneg(mii_info); + } else + genmii_setup_forced(mii_info); + + return 0; +} + +static int marvell_config_aneg(struct gfar_mii_info *mii_info) +{ + /* The Marvell PHY has an errata which requires + * that certain registers get written in order + * to restart autonegotiation */ + phy_write(mii_info, MII_BMCR, BMCR_RESET); + + phy_write(mii_info, 0x1d, 0x1f); + phy_write(mii_info, 0x1e, 0x200c); + phy_write(mii_info, 0x1d, 0x5); + phy_write(mii_info, 0x1e, 0); + phy_write(mii_info, 0x1e, 0x100); + + gbit_config_aneg(mii_info); + + return 0; +} +static int genmii_config_aneg(struct gfar_mii_info *mii_info) +{ + if (mii_info->autoneg) { + config_genmii_advert(mii_info); + genmii_restart_aneg(mii_info); + } else + genmii_setup_forced(mii_info); + + return 0; } -#define BRIEF_GFAR_ERRORS -/* Wait for auto-negotiation to complete */ -u16 mii_parse_sr(u16 mii_reg, struct net_device * dev) + +static int genmii_update_link(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + u16 status; - unsigned int timeout = GFAR_AN_TIMEOUT; + /* Do a fake read */ + phy_read(mii_info, MII_BMSR); - if (mii_reg & MIIM_STATUS_LINK) - priv->link = 1; + /* Read link and autonegotiation status */ + status = phy_read(mii_info, MII_BMSR); + if ((status & BMSR_LSTATUS) == 0) + mii_info->link = 0; else - priv->link = 0; + mii_info->link = 1; - /* Only auto-negotiate if the link has just gone up */ - if (priv->link && !priv->oldlink) { - while ((!(mii_reg & MIIM_STATUS_AN_DONE)) && timeout--) - mii_reg = read_phy_reg(dev, MIIM_STATUS); - -#if defined(BRIEF_GFAR_ERRORS) - if (mii_reg & MIIM_STATUS_AN_DONE) - printk(KERN_INFO "%s: Auto-negotiation done\n", - dev->name); - else - printk(KERN_INFO "%s: Auto-negotiation timed out\n", - dev->name); -#endif - } + /* If we are autonegotiating, and not done, + * return an error */ + if (mii_info->autoneg && !(status & BMSR_ANEGCOMPLETE)) + return -EAGAIN; return 0; } -/* Determine the speed and duplex which was negotiated */ -u16 mii_parse_88E1011_psr(u16 mii_reg, struct net_device * dev) +static int genmii_read_status(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; - unsigned int speed; + u16 status; + int err; - if (priv->link) { - if (mii_reg & MIIM_88E1011_PHYSTAT_DUPLEX) - priv->duplexity = 1; + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + if (mii_info->autoneg) { + status = phy_read(mii_info, MII_LPA); + + if (status & (LPA_10FULL | LPA_100FULL)) + mii_info->duplex = DUPLEX_FULL; + else + mii_info->duplex = DUPLEX_HALF; + if (status & (LPA_100FULL | LPA_100HALF)) + mii_info->speed = SPEED_100; else - priv->duplexity = 0; + mii_info->speed = SPEED_10; + mii_info->pause = 0; + } + /* On non-aneg, we assume what we put in BMCR is the speed, + * though magic-aneg shouldn't prevent this case from occurring + */ - speed = (mii_reg & MIIM_88E1011_PHYSTAT_SPEED); + return 0; +} +static int marvell_read_status(struct gfar_mii_info *mii_info) +{ + u16 status; + int err; - switch (speed) { - case MIIM_88E1011_PHYSTAT_GBIT: - priv->speed = 1000; - break; - case MIIM_88E1011_PHYSTAT_100: - priv->speed = 100; - break; - default: - priv->speed = 10; - break; + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + /* If the link is up, read the speed and duplex */ + /* If we aren't autonegotiating, assume speeds + * are as set */ + if (mii_info->autoneg && mii_info->link) { + int speed; + status = phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS); + +#if 0 + /* If speed and duplex aren't resolved, + * return an error. Isn't this handled + * by checking aneg? + */ + if ((status & MII_M1011_PHY_SPEC_STATUS_RESOLVED) == 0) + return -EAGAIN; +#endif + + /* Get the duplexity */ + if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX) + mii_info->duplex = DUPLEX_FULL; + else + mii_info->duplex = DUPLEX_HALF; + + /* Get the speed */ + speed = status & MII_M1011_PHY_SPEC_STATUS_SPD_MASK; + switch(speed) { + case MII_M1011_PHY_SPEC_STATUS_1000: + mii_info->speed = SPEED_1000; + break; + case MII_M1011_PHY_SPEC_STATUS_100: + mii_info->speed = SPEED_100; + break; + default: + mii_info->speed = SPEED_10; + break; } - } else { - priv->speed = 0; - priv->duplexity = 0; + mii_info->pause = 0; } return 0; } -u16 mii_parse_cis8201(u16 mii_reg, struct net_device * dev) + +static int cis820x_read_status(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; - unsigned int speed; + u16 status; + int err; - if (priv->link) { - if (mii_reg & MIIM_CIS8201_AUXCONSTAT_DUPLEX) - priv->duplexity = 1; + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + /* If the link is up, read the speed and duplex */ + /* If we aren't autonegotiating, assume speeds + * are as set */ + if (mii_info->autoneg && mii_info->link) { + int speed; + + status = phy_read(mii_info, MII_CIS8201_AUX_CONSTAT); + if (status & MII_CIS8201_AUXCONSTAT_DUPLEX) + mii_info->duplex = DUPLEX_FULL; else - priv->duplexity = 0; + mii_info->duplex = DUPLEX_HALF; - speed = mii_reg & MIIM_CIS8201_AUXCONSTAT_SPEED; + speed = status & MII_CIS8201_AUXCONSTAT_SPEED; switch (speed) { - case MIIM_CIS8201_AUXCONSTAT_GBIT: - priv->speed = 1000; + case MII_CIS8201_AUXCONSTAT_GBIT: + mii_info->speed = SPEED_1000; break; - case MIIM_CIS8201_AUXCONSTAT_100: - priv->speed = 100; + case MII_CIS8201_AUXCONSTAT_100: + mii_info->speed = SPEED_100; break; default: - priv->speed = 10; + mii_info->speed = SPEED_10; break; } - } else { - priv->speed = 0; - priv->duplexity = 0; } return 0; } -u16 mii_parse_dm9161_scsr(u16 mii_reg, struct net_device * dev) +static int marvell_ack_interrupt(struct gfar_mii_info *mii_info) { - struct gfar_private *priv = (struct gfar_private *) dev->priv; + /* Clear the interrupts by reading the reg */ + phy_read(mii_info, MII_M1011_IEVENT); - if (mii_reg & (MIIM_DM9161_SCSR_100F | MIIM_DM9161_SCSR_100H)) - priv->speed = 100; + return 0; +} + +static int marvell_config_intr(struct gfar_mii_info *mii_info) +{ + if(mii_info->interrupts == MII_INTERRUPT_ENABLED) + phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT); else - priv->speed = 10; + phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); + + return 0; +} + +static int cis820x_init(struct gfar_mii_info *mii_info) +{ + phy_write(mii_info, MII_CIS8201_AUX_CONSTAT, + MII_CIS8201_AUXCONSTAT_INIT); + phy_write(mii_info, MII_CIS8201_EXT_CON1, + MII_CIS8201_EXTCON1_INIT); + + return 0; +} + +static int cis820x_ack_interrupt(struct gfar_mii_info *mii_info) +{ + phy_read(mii_info, MII_CIS8201_ISTAT); - if (mii_reg & (MIIM_DM9161_SCSR_100F | MIIM_DM9161_SCSR_10F)) - priv->duplexity = 1; + return 0; +} + +static int cis820x_config_intr(struct gfar_mii_info *mii_info) +{ + if(mii_info->interrupts == MII_INTERRUPT_ENABLED) + phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK); else - priv->duplexity = 0; + phy_write(mii_info, MII_CIS8201_IMASK, 0); return 0; } -u16 dm9161_wait(u16 mii_reg, struct net_device *dev) +#define DM9161_DELAY 10 + +static int dm9161_read_status(struct gfar_mii_info *mii_info) { - int timeout = HZ; - int secondary = 10; - u16 temp; - - do { - - /* Davicom takes a bit to come up after a reset, - * so wait here for a bit */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(timeout); - - temp = read_phy_reg(dev, MIIM_STATUS); - - secondary--; - } while ((!(temp & MIIM_STATUS_AN_DONE)) && secondary); - - return 0; -} - -static struct phy_info phy_info_M88E1011S = { - 0x01410c6, - "Marvell 88E1011S", - 4, - (const struct phy_cmd[]) { /* config */ - /* Reset and configure the PHY */ - {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Status is read once to clear old link state */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_88E1011_PHY_STATUS, miim_read, mii_parse_88E1011_psr}, - /* Clear the IEVENT register */ - {MIIM_88E1011_IEVENT, miim_read, NULL}, - /* Set up the mask */ - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_INIT, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - /* Clear the interrupt */ - {MIIM_88E1011_IEVENT, miim_read, NULL}, - /* Disable interrupts */ - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_CLEAR, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Check the status */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - {MIIM_88E1011_PHY_STATUS, miim_read, mii_parse_88E1011_psr}, - /* Enable Interrupts */ - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_INIT, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - {MIIM_88E1011_IEVENT, miim_read, NULL}, - {MIIM_88E1011_IMASK, MIIM_88E1011_IMASK_CLEAR, NULL}, - {miim_end,} - }, -}; + u16 status; + int err; + + /* Update the link, but return if there + * was an error */ + err = genmii_update_link(mii_info); + if (err) + return err; + + /* If the link is up, read the speed and duplex */ + /* If we aren't autonegotiating, assume speeds + * are as set */ + if (mii_info->autoneg && mii_info->link) { + status = phy_read(mii_info, MII_DM9161_SCSR); + if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_100H)) + mii_info->speed = SPEED_100; + else + mii_info->speed = SPEED_10; + + if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_10F)) + mii_info->duplex = DUPLEX_FULL; + else + mii_info->duplex = DUPLEX_HALF; + } + + return 0; +} + + +static int dm9161_config_aneg(struct gfar_mii_info *mii_info) +{ + struct dm9161_private *priv = mii_info->priv; + + if(0 == priv->resetdone) + return -EAGAIN; + + return 0; +} + +static void dm9161_timer(unsigned long data) +{ + struct gfar_mii_info *mii_info = (struct gfar_mii_info *)data; + struct dm9161_private *priv = mii_info->priv; + u16 status = phy_read(mii_info, MII_BMSR); + + if (status & BMSR_ANEGCOMPLETE) { + priv->resetdone = 1; + } else + mod_timer(&priv->timer, jiffies + DM9161_DELAY * HZ); +} + +static int dm9161_init(struct gfar_mii_info *mii_info) +{ + struct dm9161_private *priv; + + /* Allocate the private data structure */ + priv = kmalloc(sizeof(struct dm9161_private), GFP_KERNEL); + + if (NULL == priv) + return -ENOMEM; + + mii_info->priv = priv; + + /* Reset is not done yet */ + priv->resetdone = 0; + + /* Isolate the PHY */ + phy_write(mii_info, MII_BMCR, BMCR_ISOLATE); + + /* Do not bypass the scrambler/descrambler */ + phy_write(mii_info, MII_DM9161_SCR, MII_DM9161_SCR_INIT); + + /* Clear 10BTCSR to default */ + phy_write(mii_info, MII_DM9161_10BTCSR, MII_DM9161_10BTCSR_INIT); + + /* Reconnect the PHY, and enable Autonegotiation */ + phy_write(mii_info, MII_BMCR, BMCR_ANENABLE); + + /* Start a timer for DM9161_DELAY seconds to wait + * for the PHY to be ready */ + init_timer(&priv->timer); + priv->timer.function = &dm9161_timer; + priv->timer.data = (unsigned long) mii_info; + mod_timer(&priv->timer, jiffies + DM9161_DELAY * HZ); + + return 0; +} -/* Cicada 8204 */ -static struct phy_info phy_info_cis8204 = { - 0x3f11, +static void dm9161_close(struct gfar_mii_info *mii_info) +{ + struct dm9161_private *priv = mii_info->priv; + + del_timer_sync(&priv->timer); + kfree(priv); +} + +#if 0 +static int dm9161_ack_interrupt(struct gfar_mii_info *mii_info) +{ + phy_read(mii_info, MII_DM9161_INTR); + + return 0; +} +#endif + +/* Cicada 820x */ +static struct phy_info phy_info_cis820x = { + 0x000fc440, "Cicada Cis8204", - 6, - (const struct phy_cmd[]) { /* config */ - /* Override PHY config settings */ - {MIIM_CIS8201_AUX_CONSTAT, MIIM_CIS8201_AUXCONSTAT_INIT, NULL}, - /* Set up the interface mode */ - {MIIM_CIS8201_EXT_CON1, MIIM_CIS8201_EXTCON1_INIT, NULL}, - /* Configure some basic stuff */ - {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_CIS8201_AUX_CONSTAT, miim_read, mii_parse_cis8201}, - /* Clear the status register */ - {MIIM_CIS8204_ISTAT, miim_read, NULL}, - /* Enable interrupts */ - {MIIM_CIS8204_IMASK, MIIM_CIS8204_IMASK_MASK, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - /* Clear the status register */ - {MIIM_CIS8204_ISTAT, miim_read, NULL}, - /* Disable interrupts */ - {MIIM_CIS8204_IMASK, 0x0, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_CIS8201_AUX_CONSTAT, miim_read, mii_parse_cis8201}, - /* Enable interrupts */ - {MIIM_CIS8204_IMASK, MIIM_CIS8204_IMASK_MASK, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - /* Clear the status register */ - {MIIM_CIS8204_ISTAT, miim_read, NULL}, - /* Disable interrupts */ - {MIIM_CIS8204_IMASK, 0x0, NULL}, - {miim_end,} - }, + 0x000fffc0, + .features = MII_GBIT_FEATURES, + .init = &cis820x_init, + .config_aneg = &gbit_config_aneg, + .read_status = &cis820x_read_status, + .ack_interrupt = &cis820x_ack_interrupt, + .config_intr = &cis820x_config_intr, }; -/* Cicada 8201 */ -static struct phy_info phy_info_cis8201 = { - 0xfc41, - "CIS8201", - 4, - (const struct phy_cmd[]) { /* config */ - /* Override PHY config settings */ - {MIIM_CIS8201_AUX_CONSTAT, MIIM_CIS8201_AUXCONSTAT_INIT, NULL}, - /* Set up the interface mode */ - {MIIM_CIS8201_EXT_CON1, MIIM_CIS8201_EXTCON1_INIT, NULL}, - /* Configure some basic stuff */ - {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Read the Status (2x to make sure link is right) */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_CIS8201_AUX_CONSTAT, miim_read, mii_parse_cis8201}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - {miim_end,} - }, +static struct phy_info phy_info_dm9161 = { + .phy_id = 0x0181b880, + .name = "Davicom DM9161E", + .phy_id_mask = 0x0ffffff0, + .init = dm9161_init, + .config_aneg = dm9161_config_aneg, + .read_status = dm9161_read_status, + .close = dm9161_close, }; -static struct phy_info phy_info_dm9161 = { - 0x0181b88, - "Davicom DM9161E", - 4, - (const struct phy_cmd[]) { /* config */ - {MIIM_CONTROL, MIIM_DM9161_CR_STOP, NULL}, - /* Do not bypass the scrambler/descrambler */ - {MIIM_DM9161_SCR, MIIM_DM9161_SCR_INIT, NULL}, - /* Clear 10BTCSR to default */ - {MIIM_DM9161_10BTCSR, MIIM_DM9161_10BTCSR_INIT, NULL}, - /* Configure some basic stuff */ - {MIIM_CONTROL, MIIM_CR_INIT, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* startup */ - /* Restart Auto Negotiation */ - {MIIM_CONTROL, MIIM_DM9161_CR_RSTAN, NULL}, - /* Status is read once to clear old link state */ - {MIIM_STATUS, miim_read, dm9161_wait}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, mii_parse_sr}, - /* Read the status */ - {MIIM_DM9161_SCSR, miim_read, mii_parse_dm9161_scsr}, - /* Clear any pending interrupts */ - {MIIM_DM9161_INTR, miim_read, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* ack_int */ - {MIIM_DM9161_INTR, miim_read, NULL}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* handle_int */ - {MIIM_STATUS, miim_read, NULL}, - {MIIM_STATUS, miim_read, mii_parse_sr}, - {MIIM_DM9161_SCSR, miim_read, mii_parse_dm9161_scsr}, - {miim_end,} - }, - (const struct phy_cmd[]) { /* shutdown */ - {MIIM_DM9161_INTR, miim_read, NULL}, - {miim_end,} - }, +static struct phy_info phy_info_marvell = { + .phy_id = 0x01410c00, + .phy_id_mask = 0xffffff00, + .name = "Marvell 88E1101", + .features = MII_GBIT_FEATURES, + .config_aneg = &marvell_config_aneg, + .read_status = &marvell_read_status, + .ack_interrupt = &marvell_ack_interrupt, + .config_intr = &marvell_config_intr, +}; + +static struct phy_info phy_info_genmii= { + .phy_id = 0x00000000, + .phy_id_mask = 0x00000000, + .name = "Generic MII", + .features = MII_BASIC_FEATURES, + .config_aneg = genmii_config_aneg, + .read_status = genmii_read_status, }; static struct phy_info *phy_info[] = { - &phy_info_cis8201, - &phy_info_cis8204, - &phy_info_M88E1011S, + &phy_info_cis820x, + &phy_info_marvell, &phy_info_dm9161, + &phy_info_genmii, NULL }; +u16 phy_read(struct gfar_mii_info *mii_info, u16 regnum) +{ + u16 retval; + unsigned long flags; + + spin_lock_irqsave(&mii_info->mdio_lock, flags); + retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum); + spin_unlock_irqrestore(&mii_info->mdio_lock, flags); + + return retval; +} + +void phy_write(struct gfar_mii_info *mii_info, u16 regnum, u16 val) +{ + unsigned long flags; + + spin_lock_irqsave(&mii_info->mdio_lock, flags); + mii_info->mdio_write(mii_info->dev, + mii_info->mii_id, + regnum, val); + spin_unlock_irqrestore(&mii_info->mdio_lock, flags); +} + /* Use the PHY ID registers to determine what type of PHY is attached * to device dev. return a struct phy_info structure describing that PHY */ -struct phy_info * get_phy_info(struct net_device *dev) +struct phy_info * get_phy_info(struct gfar_mii_info *mii_info) { u16 phy_reg; u32 phy_ID; int i; struct phy_info *theInfo = NULL; + struct net_device *dev = mii_info->dev; /* Grab the bits from PHYIR1, and put them in the upper half */ - phy_reg = read_phy_reg(dev, MIIM_PHYIR1); + phy_reg = phy_read(mii_info, MII_PHYSID1); phy_ID = (phy_reg & 0xffff) << 16; /* Grab the bits from PHYIR2, and put them in the lower half */ - phy_reg = read_phy_reg(dev, MIIM_PHYIR2); + phy_reg = phy_read(mii_info, MII_PHYSID2); phy_ID |= (phy_reg & 0xffff); /* loop through all the known PHY types, and find one that */ /* matches the ID we read from the PHY. */ for (i = 0; phy_info[i]; i++) - if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) + if (phy_info[i]->phy_id == + (phy_ID & phy_info[i]->phy_id_mask)) { theInfo = phy_info[i]; + break; + } + /* This shouldn't happen, as we have generic PHY support */ if (theInfo == NULL) { printk("%s: PHY id %x is not supported!\n", dev->name, phy_ID); return NULL; @@ -454,51 +658,4 @@ } return theInfo; -} - -/* Take a list of struct phy_cmd, and, depending on the values, either */ -/* read or write, using a helper function if provided */ -/* It is assumed that all lists of struct phy_cmd will be terminated by */ -/* mii_end. */ -void phy_run_commands(struct net_device *dev, const struct phy_cmd *cmd) -{ - int i; - u16 result; - struct gfar_private *priv = (struct gfar_private *) dev->priv; - struct gfar *phyregs = priv->phyregs; - - /* Reset the management interface */ - gfar_write(&phyregs->miimcfg, MIIMCFG_RESET); - - /* Setup the MII Mgmt clock speed */ - gfar_write(&phyregs->miimcfg, MIIMCFG_INIT_VALUE); - - /* Wait until the bus is free */ - while (gfar_read(&phyregs->miimind) & MIIMIND_BUSY) - cpu_relax(); - - for (i = 0; cmd->mii_reg != miim_end; i++) { - /* The command is a read if mii_data is miim_read */ - if (cmd->mii_data == miim_read) { - /* Read the value of the PHY reg */ - result = read_phy_reg(dev, cmd->mii_reg); - - /* If a function was supplied, we need to let it process */ - /* the result. */ - if (cmd->funct != NULL) - (*(cmd->funct)) (result, dev); - } else { /* Otherwise, it's a write */ - /* If a function was supplied, it will provide - * the value to write */ - /* Otherwise, the value was supplied in cmd->mii_data */ - if (cmd->funct != NULL) - result = (*(cmd->funct)) (0, dev); - else - result = cmd->mii_data; - - /* Write the appropriate value to the PHY reg */ - write_phy_reg(dev, cmd->mii_reg, result); - } - cmd++; - } } diff -Nru a/drivers/net/gianfar_phy.h b/drivers/net/gianfar_phy.h --- a/drivers/net/gianfar_phy.h Wed Aug 4 17:48:23 2004 +++ b/drivers/net/gianfar_phy.h Wed Aug 4 17:48:23 2004 @@ -8,7 +8,7 @@ * Author: Andy Fleming * Maintainer: Kumar Gala (kumar.gala@freescale.com) * - * Copyright 2004 Freescale Semiconductor, Inc + * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. * * 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 @@ -19,135 +19,144 @@ #ifndef __GIANFAR_PHY_H #define __GIANFAR_PHY_H -#define miim_end ((u32)-2) -#define miim_read ((u32)-1) +#define MII_end ((u32)-2) +#define MII_read ((u32)-1) #define MIIMIND_BUSY 0x00000001 #define MIIMIND_NOTVALID 0x00000004 -#define MIIM_CONTROL 0x00 -#define MIIM_CONTROL_RESET 0x00008000 -#define MIIM_CONTROL_INIT 0x00001140 -#define MIIM_ANEN 0x00001000 - -#define MIIM_CR 0x00 -#define MIIM_CR_RST 0x00008000 -#define MIIM_CR_INIT 0x00001000 - -#define MIIM_STATUS 0x1 -#define MIIM_STATUS_AN_DONE 0x00000020 -#define MIIM_STATUS_LINK 0x0004 - -#define MIIM_PHYIR1 0x2 -#define MIIM_PHYIR2 0x3 - -#define GFAR_AN_TIMEOUT 0x000fffff - -#define MIIM_ANLPBPA 0x5 -#define MIIM_ANLPBPA_HALF 0x00000040 -#define MIIM_ANLPBPA_FULL 0x00000020 - -#define MIIM_ANEX 0x6 -#define MIIM_ANEX_NP 0x00000004 -#define MIIM_ANEX_PRX 0x00000002 +#define GFAR_AN_TIMEOUT 2000 +/* 1000BT control (Marvell & BCM54xx at least) */ +#define MII_1000BASETCONTROL 0x09 +#define MII_1000BASETCONTROL_FULLDUPLEXCAP 0x0200 +#define MII_1000BASETCONTROL_HALFDUPLEXCAP 0x0100 /* Cicada Extended Control Register 1 */ -#define MIIM_CIS8201_EXT_CON1 0x17 -#define MIIM_CIS8201_EXTCON1_INIT 0x0000 +#define MII_CIS8201_EXT_CON1 0x17 +#define MII_CIS8201_EXTCON1_INIT 0x0000 /* Cicada Interrupt Mask Register */ -#define MIIM_CIS8204_IMASK 0x19 -#define MIIM_CIS8204_IMASK_IEN 0x8000 -#define MIIM_CIS8204_IMASK_SPEED 0x4000 -#define MIIM_CIS8204_IMASK_LINK 0x2000 -#define MIIM_CIS8204_IMASK_DUPLEX 0x1000 -#define MIIM_CIS8204_IMASK_MASK 0xf000 +#define MII_CIS8201_IMASK 0x19 +#define MII_CIS8201_IMASK_IEN 0x8000 +#define MII_CIS8201_IMASK_SPEED 0x4000 +#define MII_CIS8201_IMASK_LINK 0x2000 +#define MII_CIS8201_IMASK_DUPLEX 0x1000 +#define MII_CIS8201_IMASK_MASK 0xf000 /* Cicada Interrupt Status Register */ -#define MIIM_CIS8204_ISTAT 0x1a -#define MIIM_CIS8204_ISTAT_STATUS 0x8000 -#define MIIM_CIS8204_ISTAT_SPEED 0x4000 -#define MIIM_CIS8204_ISTAT_LINK 0x2000 -#define MIIM_CIS8204_ISTAT_DUPLEX 0x1000 +#define MII_CIS8201_ISTAT 0x1a +#define MII_CIS8201_ISTAT_STATUS 0x8000 +#define MII_CIS8201_ISTAT_SPEED 0x4000 +#define MII_CIS8201_ISTAT_LINK 0x2000 +#define MII_CIS8201_ISTAT_DUPLEX 0x1000 /* Cicada Auxiliary Control/Status Register */ -#define MIIM_CIS8201_AUX_CONSTAT 0x1c -#define MIIM_CIS8201_AUXCONSTAT_INIT 0x0004 -#define MIIM_CIS8201_AUXCONSTAT_DUPLEX 0x0020 -#define MIIM_CIS8201_AUXCONSTAT_SPEED 0x0018 -#define MIIM_CIS8201_AUXCONSTAT_GBIT 0x0010 -#define MIIM_CIS8201_AUXCONSTAT_100 0x0008 +#define MII_CIS8201_AUX_CONSTAT 0x1c +#define MII_CIS8201_AUXCONSTAT_INIT 0x0004 +#define MII_CIS8201_AUXCONSTAT_DUPLEX 0x0020 +#define MII_CIS8201_AUXCONSTAT_SPEED 0x0018 +#define MII_CIS8201_AUXCONSTAT_GBIT 0x0010 +#define MII_CIS8201_AUXCONSTAT_100 0x0008 /* 88E1011 PHY Status Register */ -#define MIIM_88E1011_PHY_STATUS 0x11 -#define MIIM_88E1011_PHYSTAT_SPEED 0xc000 -#define MIIM_88E1011_PHYSTAT_GBIT 0x8000 -#define MIIM_88E1011_PHYSTAT_100 0x4000 -#define MIIM_88E1011_PHYSTAT_DUPLEX 0x2000 -#define MIIM_88E1011_PHYSTAT_LINK 0x0400 - -#define MIIM_88E1011_IEVENT 0x13 -#define MIIM_88E1011_IEVENT_CLEAR 0x0000 - -#define MIIM_88E1011_IMASK 0x12 -#define MIIM_88E1011_IMASK_INIT 0x6400 -#define MIIM_88E1011_IMASK_CLEAR 0x0000 - -/* DM9161 Control register values */ -#define MIIM_DM9161_CR_STOP 0x0400 -#define MIIM_DM9161_CR_RSTAN 0x1200 +#define MII_M1011_PHY_SPEC_STATUS 0x11 +#define MII_M1011_PHY_SPEC_STATUS_1000 0x8000 +#define MII_M1011_PHY_SPEC_STATUS_100 0x4000 +#define MII_M1011_PHY_SPEC_STATUS_SPD_MASK 0xc000 +#define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX 0x2000 +#define MII_M1011_PHY_SPEC_STATUS_RESOLVED 0x0800 +#define MII_M1011_PHY_SPEC_STATUS_LINK 0x0400 + +#define MII_M1011_IEVENT 0x13 +#define MII_M1011_IEVENT_CLEAR 0x0000 + +#define MII_M1011_IMASK 0x12 +#define MII_M1011_IMASK_INIT 0x6400 +#define MII_M1011_IMASK_CLEAR 0x0000 -#define MIIM_DM9161_SCR 0x10 -#define MIIM_DM9161_SCR_INIT 0x0610 +#define MII_DM9161_SCR 0x10 +#define MII_DM9161_SCR_INIT 0x0610 /* DM9161 Specified Configuration and Status Register */ -#define MIIM_DM9161_SCSR 0x11 -#define MIIM_DM9161_SCSR_100F 0x8000 -#define MIIM_DM9161_SCSR_100H 0x4000 -#define MIIM_DM9161_SCSR_10F 0x2000 -#define MIIM_DM9161_SCSR_10H 0x1000 +#define MII_DM9161_SCSR 0x11 +#define MII_DM9161_SCSR_100F 0x8000 +#define MII_DM9161_SCSR_100H 0x4000 +#define MII_DM9161_SCSR_10F 0x2000 +#define MII_DM9161_SCSR_10H 0x1000 /* DM9161 Interrupt Register */ -#define MIIM_DM9161_INTR 0x15 -#define MIIM_DM9161_INTR_PEND 0x8000 -#define MIIM_DM9161_INTR_DPLX_MASK 0x0800 -#define MIIM_DM9161_INTR_SPD_MASK 0x0400 -#define MIIM_DM9161_INTR_LINK_MASK 0x0200 -#define MIIM_DM9161_INTR_MASK 0x0100 -#define MIIM_DM9161_INTR_DPLX_CHANGE 0x0010 -#define MIIM_DM9161_INTR_SPD_CHANGE 0x0008 -#define MIIM_DM9161_INTR_LINK_CHANGE 0x0004 -#define MIIM_DM9161_INTR_INIT 0x0000 -#define MIIM_DM9161_INTR_STOP \ -(MIIM_DM9161_INTR_DPLX_MASK | MIIM_DM9161_INTR_SPD_MASK \ - | MIIM_DM9161_INTR_LINK_MASK | MIIM_DM9161_INTR_MASK) +#define MII_DM9161_INTR 0x15 +#define MII_DM9161_INTR_PEND 0x8000 +#define MII_DM9161_INTR_DPLX_MASK 0x0800 +#define MII_DM9161_INTR_SPD_MASK 0x0400 +#define MII_DM9161_INTR_LINK_MASK 0x0200 +#define MII_DM9161_INTR_MASK 0x0100 +#define MII_DM9161_INTR_DPLX_CHANGE 0x0010 +#define MII_DM9161_INTR_SPD_CHANGE 0x0008 +#define MII_DM9161_INTR_LINK_CHANGE 0x0004 +#define MII_DM9161_INTR_INIT 0x0000 +#define MII_DM9161_INTR_STOP \ +(MII_DM9161_INTR_DPLX_MASK | MII_DM9161_INTR_SPD_MASK \ + | MII_DM9161_INTR_LINK_MASK | MII_DM9161_INTR_MASK) /* DM9161 10BT Configuration/Status */ -#define MIIM_DM9161_10BTCSR 0x12 -#define MIIM_DM9161_10BTCSR_INIT 0x7800 +#define MII_DM9161_10BTCSR 0x12 +#define MII_DM9161_10BTCSR_INIT 0x7800 - -#define MIIM_READ_COMMAND 0x00000001 - -/* - * struct phy_cmd: A command for reading or writing a PHY register - * - * mii_reg: The register to read or write - * - * mii_data: For writes, the value to put in the register. - * A value of -1 indicates this is a read. - * - * funct: A function pointer which is invoked for each command. - * For reads, this function will be passed the value read - * from the PHY, and process it. - * For writes, the result of this function will be written - * to the PHY register - */ -struct phy_cmd { - u32 mii_reg; - u32 mii_data; - u16 (*funct) (u16 mii_reg, struct net_device * dev); +#define MII_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ + SUPPORTED_10baseT_Full | \ + SUPPORTED_100baseT_Half | \ + SUPPORTED_100baseT_Full | \ + SUPPORTED_Autoneg | \ + SUPPORTED_TP | \ + SUPPORTED_MII) + +#define MII_GBIT_FEATURES (MII_BASIC_FEATURES | \ + SUPPORTED_1000baseT_Half | \ + SUPPORTED_1000baseT_Full) + +#define MII_READ_COMMAND 0x00000001 + +#define MII_INTERRUPT_DISABLED 0x0 +#define MII_INTERRUPT_ENABLED 0x1 +/* Taken from mii_if_info and sungem_phy.h */ +struct gfar_mii_info { + /* Information about the PHY type */ + /* And management functions */ + struct phy_info *phyinfo; + + /* forced speed & duplex (no autoneg) + * partner speed & duplex & pause (autoneg) + */ + int speed; + int duplex; + int pause; + + /* The most recently read link state */ + int link; + + /* Enabled Interrupts */ + u32 interrupts; + + u32 advertising; + int autoneg; + int mii_id; + + /* private data pointer */ + /* For use by PHYs to maintain extra state */ + void *priv; + + /* Provided by host chip */ + struct net_device *dev; + + /* A lock to ensure that only one thing can read/write + * the MDIO bus at a time */ + spinlock_t mdio_lock; + + /* Provided by ethernet driver */ + int (*mdio_read) (struct net_device *dev, int mii_id, int reg); + void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val); }; /* struct phy_info: a structure which defines attributes for a PHY @@ -155,38 +164,50 @@ * id will contain a number which represents the PHY. During * startup, the driver will poll the PHY to find out what its * UID--as defined by registers 2 and 3--is. The 32-bit result - * gotten from the PHY will be shifted right by "shift" bits to + * gotten from the PHY will be ANDed with phy_id_mask to * discard any bits which may change based on revision numbers * unimportant to functionality * - * The struct phy_cmd entries represent pointers to an arrays of - * commands which tell the driver what to do to the PHY. + * There are 6 commands which take a gfar_mii_info structure. + * Each PHY must declare config_aneg, and read_status. */ struct phy_info { - u32 id; - char *name; - unsigned int shift; - /* Called to configure the PHY, and modify the controller - * based on the results */ - const struct phy_cmd *config; - - /* Called when starting up the controller. Usually sets - * up the interrupt for state changes */ - const struct phy_cmd *startup; - - /* Called inside the interrupt handler to acknowledge - * the interrupt */ - const struct phy_cmd *ack_int; - - /* Called in the bottom half to handle the interrupt */ - const struct phy_cmd *handle_int; - - /* Called when bringing down the controller. Usually stops - * the interrupts from being generated */ - const struct phy_cmd *shutdown; + u32 phy_id; + char *name; + unsigned int phy_id_mask; + u32 features; + + /* Called to initialize the PHY */ + int (*init)(struct gfar_mii_info *mii_info); + + /* Called to suspend the PHY for power */ + int (*suspend)(struct gfar_mii_info *mii_info); + + /* Reconfigures autonegotiation (or disables it) */ + int (*config_aneg)(struct gfar_mii_info *mii_info); + + /* Determines the negotiated speed and duplex */ + int (*read_status)(struct gfar_mii_info *mii_info); + + /* Clears any pending interrupts */ + int (*ack_interrupt)(struct gfar_mii_info *mii_info); + + /* Enables or disables interrupts */ + int (*config_intr)(struct gfar_mii_info *mii_info); + + /* Clears up any memory if needed */ + void (*close)(struct gfar_mii_info *mii_info); }; -struct phy_info *get_phy_info(struct net_device *dev); -void phy_run_commands(struct net_device *dev, const struct phy_cmd *cmd); +struct phy_info *get_phy_info(struct gfar_mii_info *mii_info); +int read_phy_reg(struct net_device *dev, int mii_id, int regnum); +void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value); +void mii_clear_phy_interrupt(struct gfar_mii_info *mii_info); +void mii_configure_phy_interrupt(struct gfar_mii_info *mii_info, u32 interrupts); + +struct dm9161_private { + struct timer_list timer; + int resetdone; +}; #endif /* GIANFAR_PHY_H */ diff -Nru a/include/linux/mii.h b/include/linux/mii.h --- a/include/linux/mii.h Wed Aug 4 17:48:23 2004 +++ b/include/linux/mii.h Wed Aug 4 17:48:23 2004 @@ -33,7 +33,8 @@ #define MII_NCONFIG 0x1c /* Network interface config */ /* Basic mode control register. */ -#define BMCR_RESV 0x007f /* Unused... */ +#define BMCR_RESV 0x003f /* Unused... */ +#define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */ #define BMCR_CTST 0x0080 /* Collision test */ #define BMCR_FULLDPLX 0x0100 /* Full duplex */ #define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ --Apple-Mail-1--463304085-- From jt@bougret.hpl.hp.com Wed Aug 4 17:50:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 04 Aug 2004 17:50:35 -0700 (PDT) Received: from palrel11.hp.com (palrel11.hp.com [156.153.255.246]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i750oRci007832 for ; Wed, 4 Aug 2004 17:50:28 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel11.hp.com (Postfix) with ESMTP id 5B2218089; Wed, 4 Aug 2004 17:50:23 -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 RAA19743; Wed, 4 Aug 2004 17:51:51 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1BsWSZ-0003Ge-00; Wed, 04 Aug 2004 17:50:19 -0700 Date: Wed, 4 Aug 2004 17:50:19 -0700 To: Stephen Hemminger , "David S. Miller" , netdev@oss.sgi.com Cc: Mariusz Mazur Subject: Re: iproute2 and kernel headers Message-ID: <20040805005019.GA11538@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: 7518 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: 7586 Lines: 153 Stephen Hemminger wrote : > > On Tue, 3 Aug 2004 02:14:59 +0200 Tomasz Torcz wrote: > > > On Mon, Aug 02, 2004 at 03:38:05PM -0700, Stephen Hemminger wrote: > > > I am willing to put some headers (not all) in with the user level > > > code, provided they are copies since they I can easily update. I don't want > > > to get into keeping an edited set of headers in sync. > > > > Aren't linux-libc-headers (*) sufficient? > > > > * - http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ > > The theory of that is good, but in practice it would make the problem > worse. What iproute2 wants is to have the same kernel data structures > as the latest kernel. It is awkward enough making sure to get them > from the correct kernel sources, but doing it from a different package > would make updating and keeping everything current worse. Hi Stephen, Sorry to bring bad news, but I wanted to share my experience on the subject with you. This e-mail might not give you solution, but I hope it will at least entertain you ;-) I have the same problem with Wireless Extensions. My thinking was similar to yours a while back, and since then I've tried various solutions. My personal opinion on the subject is that you have just opened a big can of worms, and you will quickly realise that it's worse than you initally though... Back when I started with Wireless Extensions, the kernel headers in /usr/include/linux where a symbolic link to the actual kernel headers. I was just building Wireless Tools against /usr/include/linux/wireless.h, and magically both the tools and the kernel were using the same defintions of various data structures. Then, people started to upgrade their kernel and forgot to recompile the tools. Personally, the first thing I do when I install a Debian stable to to wipe out the obsolete kernel and install the latest. The end result was that the tools were crashing in all kind of mysterious ways, because the data structs were not the same size in the tools and the kernel. I learned pretty quickly that version number on the tools were not much help. If kernel version X recommend tools version A, but tools version A were compiled for kernel version Y, the tools will still malfunction. And the user won't understand because he has the "right" version. I tried to educate users, with notices in README and on my web page, but after answering the same question for hundreds of time, I felt I was wasting my time. I don't think it's possible to expect standard users to always recompile those system tools when they upgrade the kernel. This is when I introduced version number in the API. This allows the tools to verify that they use the same version of the API as the kernel, and complain if they are not with an explicit error message. Things were somewhat better, at least the errors were no longer mysterious and a significant number of users figured out how to fix it by themselves. However, many users got very confused by the two version numbers and their relationship. Around this time, /usr/include/linux was no longer a symlink and became independant of the kernel version (what we have today). That was another additional annoyance. There are some ways to get around this. One way is to poke directly in /usr/src/linux for the header. Another is to have local copies of all the versions of the header, and poke the current running kernel for the API version number to select the proper version of the header. Or you can let the user decide which version to use at configure time. I implemented all three for wireless tools. Your proposal would fix this precise issue, but in the grand scheme of things, I believe this is only one annoyance, not the main issue. You still have data structure mismatches if the kernel and the tools are not compiled with the same version of the kernel headers. By the way, one of the consequence of versioning the API is that I tend to do most API changes in batches. The idea is that I want to minimise the number of API versions, because I have to test the tools and drivers with each of them, and I have finite time. The kernel people hate me, because I submit changes as big batches, which is contrary to the "small patch" philosophy. The driver/tools people hate me because the changes they depend upon are queued up until next batch *and* they have to test for multiple versions of the API and #define all over the place in their code. You can't win... Soon after that, the distribution people started to hate me. Many of their users were seeing my message about API mismatche and rep[orting it as a bug. Distro only offer one prepackaged version of the tools ; Some distro offer multiple kernel options (Debian), or offer prepackaged kernel updates (Red-Hat). Of course, the tools would match only one version of the kernel, and not the other ones. Distro went as far as just disable my error message, because it was confusing their users too much, and live with the broken functionality. Let's also not forget people like me having multiple kernels on the same system (like one 2.4.X and one 2.6.X kernels in my case). You don't want to recompile your tools each time you boot the other kernel. I tried to have a system where I would compile the tools with different versions of the API (i.e. create multiple binaries), and have a small dispatcher that would call the right version of the tools depending on the running kernel. That was working, but just ugly and fragile. The current solution is that I implemented a layer that translate those data structures from one version to another. I read the version of the API and translate the structure to whatever the tool is expecting. Basically, a single binary dynamically support multiple versions of the API and multiple kernels. This works for me because the number of API versions and data structures is limited. I'm not sure if it would work for everybody... Now, that's my story. Other people have their own stories, and for example I would ask the netfilter people how they deal with this problem. Now, my sick brain would like to suggest a few other crazy solutions totally out of the box : 1) Get it right the first time, so no change is ever needed. If things are standardised (POSIX, IEEE), this can work, if you are called Linus, most likely, otherwise, good luck... 2) Migrate all those kernel APIs to XML. XML is the future, you can validate the output, and you can add/remove nodes/attributes between versions without the full thing falling apart. And we already have a web server in the kernel. 3) Every time you need to change the API, migrate it to another delivery mechanism and create a totally different set of tools. If you were using ioctl, migrate to netlink. If you were using netlink, migrate to a pseudo filesystem. Obviously the holy grail is to make it a system call. Also, make sure to kill the old APIs and old tools, otherwise some other folks my continue to maintain it. 4) Distribute all those system utilities as part of the kernel, compile them as part of the kernel, and install them in a kernel specific directory. Basically, treat system utilities exactly the same way as kernel modules. That actually would go a long way toward solving the issue of distribution of system utils (where is module-init-tools ?) and push more people to implement their pet project in user space rather than in the kernel. I wish you a lot of luck exploring those issues, and if one of those long nights you have a Eureka moment, please share with us ;-) Have fun... Jean From ebs@ebshome.net Thu Aug 5 00:15:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 00:15:22 -0700 (PDT) Received: from gate.ebshome.net (gate.ebshome.net [66.92.248.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i757F9r1017576 for ; Thu, 5 Aug 2004 00:15:09 -0700 Received: (qmail 31583 invoked by uid 1000); 5 Aug 2004 00:14:59 -0700 Date: Thu, 5 Aug 2004 00:14:59 -0700 From: Eugene Surovegin To: netdev@oss.sgi.com Subject: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete() Message-ID: <20040805071459.GA31551@gate.ebshome.net> Mail-Followup-To: netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1i X-archive-position: 7519 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 Content-Length: 1570 Lines: 45 Hi! I think there is a missing atomic_inc(&flow_cache_genid) in xfrm_policy.c::xfrm_policy_delete(). We were experiencing system lockups I think I tracked down to the stale xfrm policy in the flow cache. Here is our scenario: policy timer expired -> xfrm_policy_timer() -> xfrm_policy_delete() -> xfrm_policy_kill() (here policy->dead is set to 1). Note that none of these calls increment flow_cache_genid. Some time later xfrm_lookup() is called (in my case it happened in softirq context). flow_cache_lookup() returns policy from the flow cache (i.e. resolver xfrm_policy_lookup() is NOT called) and this policy happens to be the one previously killed (i.e. dead == 1). This will cause infinite loop in xfrm_lookup(). Attached patch is against recent 2.6 BK, although I debugged this problem on 2.4 + IPSec backport. From quick look 2.6 still needs this fix (but I couldn't test 2.6 on our hw). Also, I think xfrm_sk_policy_insert() doesn't require similar change, but I'm not 100% sure. Could IPSec gurus confirm this? Signed-off-by: Eugene Surovegin ===== net/xfrm/xfrm_policy.c 1.52 vs edited ===== --- 1.52/net/xfrm/xfrm_policy.c 2004-07-23 13:23:33 -07:00 +++ edited/net/xfrm/xfrm_policy.c 2004-08-04 18:18:45 -07:00 @@ -536,8 +536,10 @@ write_lock_bh(&xfrm_policy_lock); pol = __xfrm_policy_unlink(pol, dir); write_unlock_bh(&xfrm_policy_lock); - if (pol) + if (pol){ + atomic_inc(&flow_cache_genid); xfrm_policy_kill(pol); + } } int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) From hector@marcansoft.com Thu Aug 5 03:14:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 03:14:59 -0700 (PDT) Received: from secure.landhost.net (ns1.landhost.net [66.98.188.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75AEsTU031449 for ; Thu, 5 Aug 2004 03:14:54 -0700 Received: from [80.26.156.247] (helo=marcansoft.com) by secure.landhost.net with esmtp (Exim 4.34) id 1BsfGa-00055q-M1; Thu, 05 Aug 2004 05:14:33 -0500 Message-ID: <41120882.40302@marcansoft.com> Date: Thu, 05 Aug 2004 12:14:26 +0200 From: Hector Martin User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040409 X-Accept-Language: es-es, es, en-us, en MIME-Version: 1.0 To: Pasi Sjoholm CC: Francois Romieu , Robert Olsson , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) References: In-Reply-To: X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - secure.landhost.net X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marcansoft.com X-Source: X-Source-Args: X-Source-Dir: X-archive-position: 7520 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hector@marcansoft.com Precedence: bulk X-list: netdev Content-Length: 1210 Lines: 29 Pasi Sjoholm wrote: >Ok, now I have tested it for 6 hours without crashing the driver. The >system's load has been something like 5-6 the whole time. I also made some >network load with ~90Mbps-incoming and ~90Mbps-outgoing traffic. > >I haven't had time to test anything else but I'm quite sure that there is >no need for that anymore because the stability we have reached. > >I'll let you know if there's any problems within next few days but I would >recommend that those patches would be included in 2.6.8. (without that "if >(received > 0) {"). > >Many thanks for your help to resolve this problem. > >Hector, have you tested these patches? > > > Wow.. I gotta learn some more about kernel hacking someday.. lol I applied both (new) -10 and -20 patches and removed the test. I doubled the debug-messages that get sent to the PC (the UDP traffic) but it froze (the sender) and stopped sending them after 5 minutes. I guess that's because of the crappy TCP/IP stack on the other side (this is a PlayStation2 application i'm developing, and the homebrew PS2 TCP/IP stack doesn't have a good reputation.) I'm back to normal debugging, I'll test it for a couple of hours. So far, no problem. From hector@marcansoft.com Thu Aug 5 03:56:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 03:56:25 -0700 (PDT) Received: from secure.landhost.net (ns1.landhost.net [66.98.188.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75AuCHL032561 for ; Thu, 5 Aug 2004 03:56:12 -0700 Received: from [80.26.156.247] (helo=marcansoft.com) by secure.landhost.net with esmtp (Exim 4.34) id 1Bsfuf-0002Po-U2; Thu, 05 Aug 2004 05:55:58 -0500 Message-ID: <41121237.4050305@marcansoft.com> Date: Thu, 05 Aug 2004 12:55:51 +0200 From: Hector Martin User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040409 X-Accept-Language: es-es, es, en-us, en MIME-Version: 1.0 To: Hector Martin CC: Pasi Sjoholm , Francois Romieu , Robert Olsson , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) References: <41120882.40302@marcansoft.com> In-Reply-To: <41120882.40302@marcansoft.com> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - secure.landhost.net X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - marcansoft.com X-Source: X-Source-Args: X-Source-Dir: X-archive-position: 7521 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hector@marcansoft.com Precedence: bulk X-list: netdev Content-Length: 1946 Lines: 45 Hector Martin escribió: > Pasi Sjoholm wrote: > >> Ok, now I have tested it for 6 hours without crashing the driver. The >> system's load has been something like 5-6 the whole time. I also made >> some network load with ~90Mbps-incoming and ~90Mbps-outgoing traffic. >> I haven't had time to test anything else but I'm quite sure that >> there is no need for that anymore because the stability we have reached. >> I'll let you know if there's any problems within next few days but I >> would recommend that those patches would be included in 2.6.8. >> (without that "if (received > 0) {"). >> >> Many thanks for your help to resolve this problem. >> Hector, have you tested these patches? >> >> >> > Wow.. I gotta learn some more about kernel hacking someday.. lol > > I applied both (new) -10 and -20 patches and removed the test. > > I doubled the debug-messages that get sent to the PC (the UDP traffic) > but it froze (the sender) and stopped sending them after 5 minutes. I > guess that's because of the crappy TCP/IP stack on the other side > (this is a PlayStation2 application i'm developing, and the homebrew > PS2 TCP/IP stack doesn't have a good reputation.) I'm back to normal > debugging, I'll test it for a couple of hours. So far, no problem. > - > 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/ > > > Ugh.. it stopped sending them again. Now I doubled them again and I'm using a stabler TCP/IP stack. This one works OK. No problem so far... anyway, even though it stopped and I had to restart the PS2 some times, the PC has been receiving packets with no reboot whatsoever. I think it's fixed :) Now I have to tackle a completely different problem with TCP connections on linux, but that's another story :) From romieu@fr.zoreil.com Thu Aug 5 04:24:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 04:24: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 i75BOCZL004523 for ; Thu, 5 Aug 2004 04:24:13 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i75BMYh9007609; Thu, 5 Aug 2004 13:22:34 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i75BMX2v007608; Thu, 5 Aug 2004 13:22:33 +0200 Date: Thu, 5 Aug 2004 13:22:33 +0200 From: Francois Romieu To: Hector Martin Cc: Pasi Sjoholm , Robert Olsson , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) Message-ID: <20040805132233.A7430@electric-eye.fr.zoreil.com> References: <41120882.40302@marcansoft.com> <41121237.4050305@marcansoft.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: <41121237.4050305@marcansoft.com>; from hector@marcansoft.com on Thu, Aug 05, 2004 at 12:55:51PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 7522 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: 426 Lines: 12 Hector Martin : [...] > using a stabler TCP/IP stack. This one works OK. No problem so far... > anyway, even though it stopped and I had to restart the PS2 some times, > the PC has been receiving packets with no reboot whatsoever. I think > it's fixed :) Ok, I'll send the final version of the patches for inclusion in -netdev and/or -mm this evening. It will provide a broader testing. -- Ueimor From herbert@gondor.apana.org.au Thu Aug 5 05:01:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 05:02: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 i75C1v3B005432 for ; Thu, 5 Aug 2004 05:01: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 1BsgwL-0001n8-00; Thu, 05 Aug 2004 22:01:45 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BsgwG-0000O6-00; Thu, 05 Aug 2004 22:01:40 +1000 From: Herbert Xu To: ebs@ebshome.net (Eugene Surovegin) Subject: Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete() Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20040805071459.GA31551@gate.ebshome.net> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Thu, 05 Aug 2004 22:01:40 +1000 X-archive-position: 7523 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: 1352 Lines: 35 Eugene Surovegin wrote: > > Attached patch is against recent 2.6 BK, although I debugged this problem > on 2.4 + IPSec backport. From quick look 2.6 still needs this fix (but I > couldn't test 2.6 on our hw). Thanks for the diagnosis and patch. Looks like I had created yet another policy timer bug :) > Also, I think xfrm_sk_policy_insert() doesn't require similar change, but > I'm not 100% sure. Could IPSec gurus confirm this? Correct. sk policies are not stored in the flow cache so they don't and shouldn't cause genid to be incremented. > ===== net/xfrm/xfrm_policy.c 1.52 vs edited ===== > --- 1.52/net/xfrm/xfrm_policy.c 2004-07-23 13:23:33 -07:00 > +++ edited/net/xfrm/xfrm_policy.c 2004-08-04 18:18:45 -07:00 > @@ -536,8 +536,10 @@ > write_lock_bh(&xfrm_policy_lock); > pol = __xfrm_policy_unlink(pol, dir); > write_unlock_bh(&xfrm_policy_lock); > - if (pol) > + if (pol){ > + atomic_inc(&flow_cache_genid); Please add a dir < XFRM_POLICY_MAX check before the atomic_inc so that dying sockets with policies don't blow away the flow cache. 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 ahu@outpost.ds9a.nl Thu Aug 5 07:14:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 07:14:59 -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 i75EEpBU012671 for ; Thu, 5 Aug 2004 07:14:53 -0700 Received: by outpost.ds9a.nl (Postfix, from userid 1000) id C7DE64458; Thu, 5 Aug 2004 16:14:44 +0200 (CEST) Date: Thu, 5 Aug 2004 16:14:44 +0200 From: bert hubert To: Michael T Kerrisk Cc: netdev@oss.sgi.com Subject: Re: SO_REUSEADDR behavior different from BSD Message-ID: <20040805141444.GA2292@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Michael T Kerrisk , netdev@oss.sgi.com References: <16224.1091629527@www2.gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16224.1091629527@www2.gmx.net> User-Agent: Mutt/1.3.28i X-archive-position: 7524 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: 379 Lines: 10 On Wed, Aug 04, 2004 at 04:25:27PM +0200, Michael T Kerrisk wrote: > But on Linux (2.6), the bind() fails with EADDRINUSE. This scenario has previously worked for me. Can you show the exact source which exhibits this problem? -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From hirofumi@mail.parknet.co.jp Thu Aug 5 08:30:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 08:30:18 -0700 (PDT) Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75FUASs017320 for ; Thu, 5 Aug 2004 08:30:11 -0700 Received: from ibmpc.myhome.or.jp [210.171.164.65] by mail.parknet.co.jp with ESMTP (SMTPD32-4.10) id A35420620152; Fri, 06 Aug 2004 00:29:24 +0900 Received: from devron.myhome.or.jp (root@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.12.11/8.12.11/Debian-5) with ESMTP id i75FSlJl030316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 6 Aug 2004 00:28:48 +0900 Received: from devron.myhome.or.jp (hirofumi@localhost [127.0.0.1]) by devron.myhome.or.jp (8.12.11/8.12.11/Debian-5) with ESMTP id i75FSlc1017235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 6 Aug 2004 00:28:47 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.12.11/8.12.11/Debian-5) id i75FSfpc017232; Fri, 6 Aug 2004 00:28:41 +0900 To: Francois Romieu Cc: Hector Martin , Pasi Sjoholm , Robert Olsson , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) References: <41120882.40302@marcansoft.com> <41121237.4050305@marcansoft.com> <20040805132233.A7430@electric-eye.fr.zoreil.com> From: OGAWA Hirofumi Date: Fri, 06 Aug 2004 00:28:40 +0900 In-Reply-To: <20040805132233.A7430@electric-eye.fr.zoreil.com> Message-ID: <871xiltxhz.fsf@devron.myhome.or.jp> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 7525 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hirofumi@mail.parknet.co.jp Precedence: bulk X-list: netdev Content-Length: 1359 Lines: 37 Francois Romieu writes: > Hector Martin : > [...] > > using a stabler TCP/IP stack. This one works OK. No problem so far... > > anyway, even though it stopped and I had to restart the PS2 some times, > > the PC has been receiving packets with no reboot whatsoever. I think > > it's fixed :) > > Ok, I'll send the final version of the patches for inclusion in -netdev > and/or -mm this evening. It will provide a broader testing. Bit interesting. On the final analysis, what was the cause of this problem? I found the following in progguide-8100(100).pdf. Does this help something? 2.5 Software Issues This section covers the handling of various data reception topics. 1. Handling a Receive Buffer Overflow: The Rx DMA (FIFO to buffer) is stopped. The CAPR must be updated first to dismiss the ISR (RxBufferOverflow) event. The correct actions to process RxBufOvw are: a. Update CAPR. b. Write a 1 to ISR (ROK). The Rx DMA resumes after step b. 2. Handling RxFIFOOvw: When RxFIFOOvw occurs, all incoming packets are discarded. Clearing ISR (RxFIFOOvw) doesn t dismiss the RxFIFOOvw event. To dismiss the RxFIFOOvw event, the ISR (RxBufOvw) must be written with a 1. -- OGAWA Hirofumi From ebs@ebshome.net Thu Aug 5 09:01:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 09:01:59 -0700 (PDT) Received: from gate.ebshome.net (gate.ebshome.net [66.92.248.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75G1rQY018383 for ; Thu, 5 Aug 2004 09:01:54 -0700 Received: (qmail 7527 invoked by uid 1000); 5 Aug 2004 09:01:44 -0700 Date: Thu, 5 Aug 2004 09:01:44 -0700 From: Eugene Surovegin To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete() Message-ID: <20040805160144.GA28597@gate.ebshome.net> Mail-Followup-To: Herbert Xu , netdev@oss.sgi.com References: <20040805071459.GA31551@gate.ebshome.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 7526 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 Content-Length: 799 Lines: 24 On Thu, Aug 05, 2004 at 10:01:40PM +1000, Herbert Xu wrote: > Please add a dir < XFRM_POLICY_MAX check before the atomic_inc so that > dying sockets with policies don't blow away the flow cache. Ohh, you're right :). Updated patch follows. Signed-off-by: Eugene Surovegin ===== net/xfrm/xfrm_policy.c 1.52 vs edited ===== --- 1.52/net/xfrm/xfrm_policy.c 2004-07-23 13:23:33 -07:00 +++ edited/net/xfrm/xfrm_policy.c 2004-08-05 08:58:22 -07:00 @@ -536,8 +536,11 @@ write_lock_bh(&xfrm_policy_lock); pol = __xfrm_policy_unlink(pol, dir); write_unlock_bh(&xfrm_policy_lock); - if (pol) + if (pol){ + if (dir < XFRM_POLICY_MAX) + atomic_inc(&flow_cache_genid); xfrm_policy_kill(pol); + } } int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) From mtk-lists@gmx.net Thu Aug 5 09:36:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 09:36:34 -0700 (PDT) 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 i75GaQMr019285 for ; Thu, 5 Aug 2004 09:36:27 -0700 Received: (qmail 14239 invoked by uid 0); 5 Aug 2004 16:36:16 -0000 Received: from 62.245.207.82 by www48.gmx.net with HTTP; Thu, 5 Aug 2004 18:36:17 +0200 (MEST) Date: Thu, 5 Aug 2004 18:36:17 +0200 (MEST) From: "Michael T Kerrisk" To: bert hubert Cc: netdev@oss.sgi.com MIME-Version: 1.0 References: <20040805141444.GA2292@outpost.ds9a.nl> Subject: Re: SO_REUSEADDR behavior different from BSD X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <19686.1091723777@www48.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-archive-position: 7527 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 6831 Lines: 257 > On Wed, Aug 04, 2004 at 04:25:27PM +0200, Michael T Kerrisk wrote: > > > But on Linux (2.6), the bind() fails with EADDRINUSE. > > This scenario has previously worked for me. Can you show the exact source > which exhibits this problem? Okay, sorry for the delay. I had to hack together a simpler program to demonstrate this. I've attached the program below (it is both server and client, depending on command line options). Do note that in my original description, on the first time through, the server did NOT use SO_REUSEADDR. In other words, using my program, we do the following: SERVER HOST CLIENT HOST ./reuseaddr_test -s -n (The above does NOT use SO_REUSEADDR) ./reuseaddr_test -c (At this point the server parent exists, but the server client and child are connected) ./reuseaddr_test -s (The above DOES use SO_REUSEADDR) Now, on Linux, at this point, the second instance of the server fails with EADDRINUSE, even though it did use SO_REUSEADDR. On FreeBSD 5.1, the second server instance does successfully bind. On Linux, if the *first* instance also used SO_REUSEADDR, then the second instance can bind. FreeBSD does not require this. I realise that the scenario that delivers EADDRINUSE above is slightly unusual, because normally a server always specifies SO_REUSEADDR, but my question is why the scenario I'm describing does differ from FreeBSD, which I'm assuming conforms to the canonical BSD behaviour. Cheers, Michael == /* reuseaddr_test.c Michael Kerrisk, Aug 2004 IPv4 for simplicity... */ #include #include #include #include #include #include #include #include #include #include #define DEF_PORT "55555" #define DEF_SLEEP_TIME 60 #define errMsg(msg) { perror(msg); } #define errExit(msg) { perror(msg); exit(EXIT_FAILURE); } #define fatalErr(msg) { fprintf(stderr, "%s\n", msg); \ exit(EXIT_FAILURE); } static void usageError(char *progName, char *msg) { if (msg != NULL) printf("%s", msg); fprintf(stderr, "Usage: %s [options] -s \n" " or: %s [options] -c host\n", progName, progName); fprintf(stderr, "Options are:\n"); fprintf(stderr, "\t-c host Run as client, connecting to 'host'\n"); fprintf(stderr, "\t-s Run as server\n"); fprintf(stderr, "\t-p port Use given 'port' number (def=%s)\n", DEF_PORT); fprintf(stderr, "\t-n *Don't* use SO_REUSEADDR in server\n"); fprintf(stderr, "\t-w nsecs Child sleep interval (def=%d)\n", DEF_SLEEP_TIME); exit(EXIT_FAILURE); } /* usageError */ /* Return Internet address as string: "(host, port#)" */ static char * inet4AddressString(const struct sockaddr_in *addr) { static char buf[1024]; struct hostent *hent; char *host; hent = gethostbyaddr((char *) &addr->sin_addr, sizeof(addr->sin_addr), addr->sin_family); /* Return host name, or dotted address if not found */ host = (hent != NULL) ? hent->h_name : inet_ntoa(addr->sin_addr); snprintf(buf, sizeof(buf), "(%s, %u)", host, ntohs(addr->sin_port)); return buf; } /* inet4AddressString */ int main(int argc, char *argv[]) { int opt, sfd, cfd; int client, server, reuse; char *pstr = DEF_PORT; char *host; struct sockaddr_in svaddr, claddr; struct hostent *h; struct in_addr **addrpp; char buf[1]; socklen_t s; int optval; int stime; #define CMD_SIZE 1024 char cmd[CMD_SIZE]; server = 0; client = 0; reuse = 1; stime = DEF_SLEEP_TIME; while ((opt = getopt(argc, argv, "c:sp:nw:")) != -1) { switch (opt) { case 'c': client = 1; host = optarg; break; case 's': server = 1; break; case 'p': pstr = optarg; break; case 'w': stime = atoi(optarg); break; case 'n': reuse = 0; break; default: usageError(argv[0], NULL); break; } /* switch */ } /* while */ if ((server && client) || (!server && !client)) usageError(argv[0], NULL); sfd = socket(AF_INET, SOCK_STREAM, 0); if (sfd == -1) errExit("socket"); memset(&svaddr, 0, sizeof(struct sockaddr_in)); svaddr.sin_family = AF_INET; svaddr.sin_port = htons(atoi(pstr)); if (server) { svaddr.sin_addr.s_addr = htonl(INADDR_ANY); } else { /* client */ h = gethostbyname(host); if (h == NULL) fatalErr("host lookup failed (gethostbyname())"); addrpp = (struct in_addr **) h->h_addr_list; svaddr.sin_addr.s_addr = (*addrpp)->s_addr; } if (server) { if (reuse) { optval = 1; if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) == -1) errExit("setsockopt"); } if (bind(sfd, (struct sockaddr *) &svaddr, sizeof(struct sockaddr_in)) == -1) errExit("bind"); if (listen(sfd, 5) == -1) errExit("listen"); printf("Server listen() completed; about to accept()\n"); s = sizeof(struct sockaddr_in); cfd = accept(sfd, (struct sockaddr *) &claddr, &s); if (cfd == -1) errExit("accept"); printf("Server received connection from: %s\n", inet4AddressString(&claddr)); snprintf(cmd, CMD_SIZE, "netstat -an | grep %s", pstr); printf("cmd: %s\n", cmd); //system(cmd); switch(fork()) { case -1: errExit("fork"); case 0: close(sfd); /* Close listening socket */ sleep(2); /* Give parent a moment to exit */ printf("Server child started\n"); system(cmd); printf("Server child about to sleep %d seconds\n", stime); sleep(stime); printf("Server child exiting\n"); exit(EXIT_FAILURE); default: printf("Server parent exiting\n"); exit(EXIT_FAILURE); } } else { /* client */ if (connect(sfd, (struct sockaddr *) &svaddr, sizeof(struct sockaddr_in)) == -1) errExit("connect"); printf("Client connected, now about to read\n"); read(sfd, buf, 1); printf("Client exiting\n"); } exit(EXIT_SUCCESS); } /* main */ -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From romieu@fr.zoreil.com Thu Aug 5 10:24:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 10:24: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 i75HOEqB020436 for ; Thu, 5 Aug 2004 10:24:15 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i75HM0h9012380; Thu, 5 Aug 2004 19:22:00 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i75HLxbx012379; Thu, 5 Aug 2004 19:21:59 +0200 Date: Thu, 5 Aug 2004 19:21:59 +0200 From: Francois Romieu To: OGAWA Hirofumi Cc: Hector Martin , Pasi Sjoholm , Robert Olsson , Linux-Kernel , akpm@osdl.org, netdev@oss.sgi.com, brad@brad-x.com, shemminger@osdl.org Subject: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) Message-ID: <20040805192159.A12203@electric-eye.fr.zoreil.com> References: <41120882.40302@marcansoft.com> <41121237.4050305@marcansoft.com> <20040805132233.A7430@electric-eye.fr.zoreil.com> <871xiltxhz.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <871xiltxhz.fsf@devron.myhome.or.jp>; from hirofumi@mail.parknet.co.jp on Fri, Aug 06, 2004 at 12:28:40AM +0900 X-Organisation: Land of Sunshine Inc. X-archive-position: 7528 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: 314 Lines: 13 OGAWA Hirofumi : [...] > On the final analysis, what was the cause of this problem? See answer 42 > I found the following in progguide-8100(100).pdf. Does this help something? It makes sense. The previous code did not allow the ISR to be written under any circumstance. -- Ueimor From dlstevens@us.ibm.com Thu Aug 5 11:20:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 11:21:01 -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 i75IKnFT022314 for ; Thu, 5 Aug 2004 11:20:56 -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 i75IKGmL472818; Thu, 5 Aug 2004 14:20:16 -0400 Received: from d03nm121.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 i75IKFW3152406; Thu, 5 Aug 2004 12:20:15 -0600 In-Reply-To: <19686.1091723777@www48.gmx.net> To: "Michael T Kerrisk" Cc: bert hubert , netdev@oss.sgi.com MIME-Version: 1.0 Subject: Re: SO_REUSEADDR behavior different from BSD X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Thu, 5 Aug 2004 11:20:12 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.0.2CF2HF259 | March 11, 2004) at 08/05/2004 12:20:16, Serialize complete at 08/05/2004 12:20:16 Content-Type: text/plain; charset="US-ASCII" X-archive-position: 7529 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dlstevens@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 298 Lines: 8 Michael, Linux does not have SO_REUSEPORT, which post-Net/3 BSD systems do. I believe SO_REUSEADDR on Linux behaves the same as 4.3BSD, but will differ with 4.4BSD and later because of the addition of SO_REUSEPORT (unless there's a bug :-)). +-DLS From yoshfuji@wide.ad.jp Thu Aug 5 11:34:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 11:34:19 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75IYDLT022806 for ; Thu, 5 Aug 2004 11:34:13 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 5ACCA33CE5; Fri, 6 Aug 2004 03:34:37 +0900 (JST) Date: Thu, 05 Aug 2004 11:34:37 -0700 (PDT) Message-Id: <20040805.113437.91348248.yoshfuji@wide.ad.jp> To: mtk-lists@gmx.net Cc: ahu@ds9a.nl, netdev@oss.sgi.com Subject: Re: SO_REUSEADDR behavior different from BSD From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <19686.1091723777@www48.gmx.net> References: <20040805141444.GA2292@outpost.ds9a.nl> <19686.1091723777@www48.gmx.net> X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 90 22 65 EB 1E CF 3A D1 0B DF 80 D8 48 07 F8 94 E0 62 0E EA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc 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: 7530 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@wide.ad.jp Precedence: bulk X-list: netdev Content-Length: 635 Lines: 15 In article <19686.1091723777@www48.gmx.net> (at Thu, 5 Aug 2004 18:36:17 +0200 (MEST)), "Michael T Kerrisk" says: > Now, on Linux, at this point, the second instance of the > server fails with EADDRINUSE, even though it did use > SO_REUSEADDR. On FreeBSD 5.1, the second server instance > does successfully bind. This behavior is intended. First socket is REQUIRED to set SO_REUSEADDR I hate BSD's behavior because it is asynmetry. (Both sockets are required to agree on "REUSEADDR.") -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From herbert@gondor.apana.org.au Thu Aug 5 14:24:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 14:24:42 -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 i75LOWQ3029522 for ; Thu, 5 Aug 2004 14:24: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 1Bspir-0007E3-00; Fri, 06 Aug 2004 07:24:25 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bspin-0001Gb-00; Fri, 06 Aug 2004 07:24:21 +1000 Date: Fri, 6 Aug 2004 07:24:21 +1000 To: netdev@oss.sgi.com Cc: "David S. Miller" , Eugene Surovegin Subject: Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete() Message-ID: <20040805212421.GA4689@gondor.apana.org.au> References: <20040805071459.GA31551@gate.ebshome.net> <20040805160144.GA28597@gate.ebshome.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <20040805160144.GA28597@gate.ebshome.net> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7531 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: 1438 Lines: 46 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Aug 05, 2004 at 09:01:44AM -0700, Eugene Surovegin wrote: > On Thu, Aug 05, 2004 at 10:01:40PM +1000, Herbert Xu wrote: > > Please add a dir < XFRM_POLICY_MAX check before the atomic_inc so that > > dying sockets with policies don't blow away the flow cache. > > Ohh, you're right :). Updated patch follows. Thanks. Dave, please apply Eugene's patch to fix hard policy expiration. Signed-off-by: Eugene Surovegin Signed-off-by: Herbert Xu -- 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.52 vs edited ===== --- 1.52/net/xfrm/xfrm_policy.c 2004-07-23 13:23:33 -07:00 +++ edited/net/xfrm/xfrm_policy.c 2004-08-05 08:58:22 -07:00 @@ -536,8 +536,11 @@ write_lock_bh(&xfrm_policy_lock); pol = __xfrm_policy_unlink(pol, dir); write_unlock_bh(&xfrm_policy_lock); - if (pol) + if (pol) { + if (dir < XFRM_POLICY_MAX) + atomic_inc(&flow_cache_genid); xfrm_policy_kill(pol); + } } int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) --gKMricLos+KVdGMg-- From romieu@fr.zoreil.com Thu Aug 5 14:44:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 14:44:14 -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 i75Li7Un030308 for ; Thu, 5 Aug 2004 14:44:08 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i75Lhch9016113; Thu, 5 Aug 2004 23:43:38 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i75LhaIm016112; Thu, 5 Aug 2004 23:43:36 +0200 Date: Thu, 5 Aug 2004 23:43:36 +0200 From: Francois Romieu To: Jeff Garzik Cc: Andrew Morton , Pasi Sjoholm , Hector Martin , OGAWA Hirofumi , netdev@oss.sgi.com Subject: [PATCH 2.6.8-rc3-mm1 1/2] 8139too: Rx fifo/overflow recovery Message-ID: <20040805234336.A15407@electric-eye.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-Organisation: Land of Sunshine Inc. X-archive-position: 7532 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: 2833 Lines: 93 This patch allows to update the interrupt status register after an Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. As a side effect it saves a few heavy (i.e. flushed) pci ops per received packet when several packets are received at the same time. Signed-off-by: Francois Romieu diff -puN drivers/net/8139too.c~r8139-10 drivers/net/8139too.c --- linux-2.6.8-rc3/drivers/net/8139too.c~r8139-10 2004-08-05 23:09:26.000000000 +0200 +++ linux-2.6.8-rc3-romieu/drivers/net/8139too.c 2004-08-05 23:14:31.000000000 +0200 @@ -1934,12 +1934,15 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); + status = RTL_R16 (IntrStatus) & RxAckBits; + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; @@ -1947,7 +1950,6 @@ static int rtl8139_rx(struct net_device unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1979,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +1991,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2024,21 +2027,18 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); + } - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; } + RTL_W16_F (IntrStatus, RxAckBits); } - done: - #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, @@ -2047,6 +2047,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ From romieu@fr.zoreil.com Thu Aug 5 14:48:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 14:48: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 i75Lm2FV030772 for ; Thu, 5 Aug 2004 14:48:03 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i75Ljbh9016242; Thu, 5 Aug 2004 23:45:37 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i75LjbDA016241; Thu, 5 Aug 2004 23:45:37 +0200 Date: Thu, 5 Aug 2004 23:45:37 +0200 From: Francois Romieu To: Jeff Garzik Cc: Andrew Morton , Pasi Sjoholm , Hector Martin , OGAWA Hirofumi , netdev@oss.sgi.com Subject: [PATCH 2.6.8-rc3-mm1 2/2] 8139too: be sure to progress durin rtl8139_rx() Message-ID: <20040805234537.A16153@electric-eye.fr.zoreil.com> References: <20040805234336.A15407@electric-eye.fr.zoreil.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: <20040805234336.A15407@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Thu, Aug 05, 2004 at 11:43:36PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 7533 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: 2010 Lines: 68 If the Rx buffer gets corrupted or the FIFO hangs in new interesting ways, this code prevents the driver from looping in ksoftirqd context without making any progress. Signed-off-by: Francois Romieu diff -puN drivers/net/8139too.c~r8139-20 drivers/net/8139too.c --- linux-2.6.8-rc3/drivers/net/8139too.c~r8139-20 2004-08-05 23:24:47.000000000 +0200 +++ linux-2.6.8-rc3-romieu/drivers/net/8139too.c 2004-08-05 23:24:47.000000000 +0200 @@ -593,6 +593,7 @@ struct rtl8139_private { int time_to_die; struct mii_if_info mii; unsigned int regs_len; + unsigned long fifo_copy_timeout; }; MODULE_AUTHOR ("Jeff Garzik "); @@ -1937,7 +1938,7 @@ static int rtl8139_rx(struct net_device u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," - " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, + " free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); @@ -1978,10 +1979,24 @@ static int rtl8139_rx(struct net_device * since EarlyRx is disabled. */ if (unlikely(rx_size == 0xfff0)) { + if (!tp->fifo_copy_timeout) + tp->fifo_copy_timeout = jiffies + 2; + else if (time_after(jiffies, tp->fifo_copy_timeout)) { + DPRINTK ("%s: hung FIFO. Reset.", dev->name); + rx_size = 0; + goto no_early_rx; + } + if (netif_msg_intr(tp)) { + printk(KERN_DEBUG "%s: fifo copy in progress.", + dev->name); + } tp->xstats.early_rx++; break; } +no_early_rx: + tp->fifo_copy_timeout = 0; + /* If Rx err or invalid rx_size/rx_status received * (which happens if we get lost in the ring), * Rx process gets reset, so we abort any further @@ -2047,6 +2062,14 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; + + /* + * The receive buffer should be mostly empty. + * Tell NAPI to reenable the Rx irq. + */ + if (tp->fifo_copy_timeout) + received = budget; + out: return received; } _ From romieu@fr.zoreil.com Thu Aug 5 15:05:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 15:05: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 i75M503L031992 for ; Thu, 5 Aug 2004 15:05:01 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id i75M1fh9016505; Fri, 6 Aug 2004 00:01:41 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i75M1bYo016504; Fri, 6 Aug 2004 00:01:37 +0200 Date: Fri, 6 Aug 2004 00:01:37 +0200 From: Francois Romieu To: Alan Cox Cc: Jeff Garzik , Andrew Morton , Ferenc Kubinszky , Kazutoshi Morioka , netdev@oss.sgi.com Subject: [PATCH 2.6.8-rc3-mm1 1/1] via-velocity: more inetaddr_notifier fix Message-ID: <20040806000137.B16153@electric-eye.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-Organisation: Land of Sunshine Inc. X-archive-position: 7534 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: 4825 Lines: 160 There is no guarantee that the event which gets passed is associated to a via-velocity device, thus preventing to dereference dev->priv as if it always was a struct velocity_info *. The via-velocity devices are kept in a module private list for comparison. Signed-off-by: Francois Romieu diff -puN drivers/net/via-velocity.c~via-velocity-wol-strangeness drivers/net/via-velocity.c --- linux-2.6.8-rc3/drivers/net/via-velocity.c~via-velocity-wol-strangeness 2004-08-05 23:47:54.000000000 +0200 +++ linux-2.6.8-rc3-romieu/drivers/net/via-velocity.c 2004-08-05 23:47:54.000000000 +0200 @@ -262,6 +262,7 @@ static u32 check_connection_type(struct static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status); #ifdef CONFIG_PM + static int velocity_suspend(struct pci_dev *pdev, u32 state); static int velocity_resume(struct pci_dev *pdev); @@ -270,9 +271,26 @@ static int velocity_netdev_event(struct static struct notifier_block velocity_inetaddr_notifier = { .notifier_call = velocity_netdev_event, }; -static int velocity_notifier_registered; -#endif /* CONFIG_PM */ +static spinlock_t velocity_dev_list_lock = SPIN_LOCK_UNLOCKED; +static LIST_HEAD(velocity_dev_list); + +static void velocity_register_notifier(void) +{ + register_inetaddr_notifier(&velocity_inetaddr_notifier); +} + +static void velocity_unregister_notifier(void) +{ + unregister_inetaddr_notifier(&velocity_inetaddr_notifier); +} + +#else /* CONFIG_PM */ + +#define velocity_register_notifier() do {} while (0) +#define velocity_unregister_notifier() do {} while (0) + +#endif /* !CONFIG_PM */ /* * Internal board variants. At the moment we have only one @@ -327,6 +345,14 @@ static void __devexit velocity_remove1(s struct net_device *dev = pci_get_drvdata(pdev); struct velocity_info *vptr = dev->priv; +#ifdef CONFIG_PM + unsigned long flags; + + spin_lock_irqsave(&velocity_dev_list_lock, flags); + if (!list_empty(&velocity_dev_list)) + list_del(&vptr->list); + spin_unlock_irqrestore(&velocity_dev_list_lock, flags); +#endif unregister_netdev(dev); iounmap(vptr->mac_regs); pci_release_regions(pdev); @@ -782,13 +808,16 @@ static int __devinit velocity_found1(str /* and leave the chip powered down */ pci_set_power_state(pdev, 3); -out: #ifdef CONFIG_PM - if (ret == 0 && !velocity_notifier_registered) { - velocity_notifier_registered = 1; - register_inetaddr_notifier(&velocity_inetaddr_notifier); + { + unsigned long flags; + + spin_lock_irqsave(&velocity_dev_list_lock, flags); + list_add(&vptr->list, &velocity_dev_list); + spin_unlock_irqrestore(&velocity_dev_list_lock, flags); } #endif +out: return ret; err_iounmap: @@ -843,6 +872,8 @@ static void __devinit velocity_init_info spin_lock_init(&vptr->lock); spin_lock_init(&vptr->xmit_lock); + + INIT_LIST_HEAD(&vptr->list); } /** @@ -2211,8 +2242,11 @@ static struct pci_driver velocity_driver static int __init velocity_init_module(void) { int ret; - ret = pci_module_init(&velocity_driver); + velocity_register_notifier(); + ret = pci_module_init(&velocity_driver); + if (ret < 0) + velocity_unregister_notifier(); return ret; } @@ -2227,12 +2261,7 @@ static int __init velocity_init_module(v static void __exit velocity_cleanup_module(void) { -#ifdef CONFIG_PM - if (velocity_notifier_registered) { - unregister_inetaddr_notifier(&velocity_inetaddr_notifier); - velocity_notifier_registered = 0; - } -#endif + velocity_unregister_notifier(); pci_unregister_driver(&velocity_driver); } @@ -3252,13 +3281,20 @@ static int velocity_resume(struct pci_de static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; - struct net_device *dev; - struct velocity_info *vptr; if (ifa) { - dev = ifa->ifa_dev->dev; - vptr = dev->priv; - velocity_get_ip(vptr); + struct net_device *dev = ifa->ifa_dev->dev; + struct velocity_info *vptr; + unsigned long flags; + + spin_lock_irqsave(&velocity_dev_list_lock, flags); + list_for_each_entry(vptr, &velocity_dev_list, list) { + if (vptr->dev == dev) { + velocity_get_ip(vptr); + break; + } + } + spin_unlock_irqrestore(&velocity_dev_list_lock, flags); } return NOTIFY_DONE; } diff -puN drivers/net/via-velocity.h~via-velocity-wol-strangeness drivers/net/via-velocity.h --- linux-2.6.8-rc3/drivers/net/via-velocity.h~via-velocity-wol-strangeness 2004-08-05 23:47:54.000000000 +0200 +++ linux-2.6.8-rc3-romieu/drivers/net/via-velocity.h 2004-08-05 23:47:54.000000000 +0200 @@ -1733,8 +1733,7 @@ struct velocity_opt { }; struct velocity_info { - struct velocity_info *next; - struct velocity_info *prev; + struct list_head list; struct pci_dev *pdev; struct net_device *dev; _ From mtk-lists@gmx.net Thu Aug 5 15:25:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 05 Aug 2004 15:25:41 -0700 (PDT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i75MPSSa032634 for ; Thu, 5 Aug 2004 15:25:29 -0700 Received: (qmail 25836 invoked by uid 0); 5 Aug 2004 22:25:19 -0000 Received: from 80.184.62.147 by www51.gmx.net with HTTP; Fri, 6 Aug 2004 00:25:19 +0200 (MEST) Date: Fri, 6 Aug 2004 00:25:19 +0200 (MEST) From: "Michael T Kerrisk" To: YOSHIFUJI.Hideaki/$B5HF#1QL@.sgi.com (B ) Cc: ahu@ds9a.nl, netdev@oss.sgi.com, David Stevens MIME-Version: 1.0 Subject: Re: SO_REUSEADDR behavior different from BSD X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <20734.1091744719@www51.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-archive-position: 7535 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 883 Lines: 30 > In article <19686.1091723777@www48.gmx.net> (at Thu, 5 Aug 2004 18:36:17 > +0200 (MEST)), "Michael T Kerrisk" says: > > > Now, on Linux, at this point, the second instance of the > > server fails with EADDRINUSE, even though it did use > > SO_REUSEADDR. On FreeBSD 5.1, the second server instance > > does successfully bind. > > This behavior is intended. > First socket is REQUIRED to set SO_REUSEADDR > I hate BSD's behavior because it is asynmetry. > (Both sockets are required to agree on "REUSEADDR.") Hideaki, David, Thank you for the information / confirmation that this is intended behavior. I'll try to see that something on this point makes it into the man pages. Cheers, Michael -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From margitsw@t-online.de Fri Aug 6 04:32:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 04:32:26 -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 i76BWJ6s005009 for ; Fri, 6 Aug 2004 04:32:19 -0700 Received: from fwd08.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1Bt2xI-0002kB-00; Fri, 06 Aug 2004 13:32:12 +0200 Received: from roglap.local (V8cfTBZf8eKpAqnRehZKD31EBtbHAe2YkJspj5nWYwK6Tq-vBo53wb@[217.255.116.66]) by fwd08.sul.t-online.com with esmtp id 1Bt2xB-2K6j680; Fri, 6 Aug 2004 13:32:05 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH Linux-2.6.8-rc2] prism54 Fix memory leaks Date: Fri, 6 Aug 2004 13:24:01 +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=_Rp2EBG9hsa+OUU0" Message-Id: <200408061324.01557.margitsw@t-online.de> X-ID: V8cfTBZf8eKpAqnRehZKD31EBtbHAe2YkJspj5nWYwK6Tq-vBo53wb X-archive-position: 7537 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: 3063 Lines: 107 --Boundary-00=_Rp2EBG9hsa+OUU0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-08-06 Margit Schubert-While * Change the "version" OID to what it should be. * * Fix memory leaks - mgt_get_request always returns * allocated memory for non-int OIDS (with an exception - * keep reading). If the caller checks the return and itself * returns, then it must free memory. * However, it is possible to return from mgt_get_request * early (!priv->mib). In this case, weird things can happen * in isl_ioctl. Quick fix, at least to force an oops, is * to set the union value to NULL. The real fix is to * recode all mgt_get_request calls in isl_ioctl. Jeff, have had no response to patch "Fix IRQ handling" from 2004-07-30. Margit Margit --Boundary-00=_Rp2EBG9hsa+OUU0 Content-Type: text/x-diff; charset="us-ascii"; name="memleak.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="memleak.patch" diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c 2004-07-27 19:42:33.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-06 11:42:40.000000000 +0200 @@ -820,9 +820,11 @@ return mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile); } - if ((ret = - mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r))) + ret = mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r); + if (ret) { + kfree(r.ptr); return ret; + } rate = (u32) (vwrq->value / 500000); data = r.ptr; @@ -840,6 +842,7 @@ } if (!data[i]) { + kfree(r.ptr); return -EINVAL; } @@ -888,8 +891,11 @@ vwrq->value = r.u * 500000; /* request the device for the enabled rates */ - if ((rvalue = mgt_get_request(priv, DOT11_OID_RATES, 0, NULL, &r))) + rvalue = mgt_get_request(priv, DOT11_OID_RATES, 0, NULL, &r); + if (rvalue) { + kfree(r.ptr); return rvalue; + } data = r.ptr; vwrq->fixed = (data[0] != 0) && (data[1] == 0); kfree(r.ptr); diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.8-04/drivers/net/wireless/prism54/oid_mgt.c --- linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c 2004-07-27 19:42:33.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/oid_mgt.c 2004-08-06 11:42:50.000000000 +0200 @@ -219,7 +219,7 @@ OID_UNKNOWN(OID_INL_MEMORY, 0xFF020002), OID_U32_C(OID_INL_MODE, 0xFF020003), OID_UNKNOWN(OID_INL_COMPONENT_NR, 0xFF020004), - OID_UNKNOWN(OID_INL_VERSION, 0xFF020005), + OID_STRUCT(OID_INL_VERSION, 0xFF020005, u8[8], OID_TYPE_RAW), OID_UNKNOWN(OID_INL_INTERFACE_ID, 0xFF020006), OID_UNKNOWN(OID_INL_COMPONENT_ID, 0xFF020007), OID_U32_C(OID_INL_CONFIG, 0xFF020008), @@ -481,6 +481,8 @@ BUG_ON(OID_NUM_LAST <= n); BUG_ON(extra > isl_oid[n].range); + res->ptr = NULL; + if (!priv->mib) /* memory has been freed */ return -1; --Boundary-00=_Rp2EBG9hsa+OUU0-- From tobias.lorenz@gmx.net Fri Aug 6 08:07:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 08:07:28 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i76F7K8l009287 for ; Fri, 6 Aug 2004 08:07:21 -0700 Received: (qmail 16081 invoked by uid 65534); 6 Aug 2004 15:07:10 -0000 Received: from pD9E6D8B9.dip.t-dialin.net (EHLO pD9E6D8B9.dip.t-dialin.net) (217.230.216.185) by mail.gmx.net (mp017) with SMTP; 06 Aug 2004 17:07:10 +0200 X-Authenticated: #2283611 Subject: linux starfire.c network driver problem under kernel 2.6.x From: Tobias Lorenz To: netdev@oss.sgi.com Content-Type: text/plain Message-Id: <1091804213.2981.2.camel@server.lorenz.priv> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 06 Aug 2004 16:56:53 +0200 Content-Transfer-Encoding: 7bit X-archive-position: 7538 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tobias.lorenz@gmx.net Precedence: bulk X-list: netdev Content-Length: 2126 Lines: 60 Hi, first a compile fix, which is needed to compile with HAS_FIRMWARE: <<< snip @@ -1409,7 +1409,7 @@ } if (has_bad_length) - skb_checksum_help(skb); + skb_checksum_help(skb, 0); } #endif /* ZEROCOPY && HAS_BROKEN_FIRMWARE */ <<< snap Explanation: There was a change in the "skb_checksum_help" function. It now has the additional argument "inward", which must be 0 when called in function "start_tx". The patch above, makes the driver compile again. More problematic is that there are no network connections possible with the card running under a 2.6 kernel. That card runs okay under linux 2.4.26. I tried with kernel 2.6.7 and 2.6.8-rc2. I also tried with acpi=off, noapic, pci=noacpi, pci=biosirq. Nothing worked. And yes: Routing is configured correctly, Firewall is down. Ifconfig shows running interfaces, /proc/interrupts shows the interfaces. I tried to compile the module with the following options enabled/disabled: - HAS_FIRMWARE - VLAN_SUPPORT (CONFIG_VLAN_8021Q, CONFIG_VLAN_8021Q_MODULE) - HAVE_NETDEV_POLL (CONFIG_ADAPTEC_STARFIRE_NAPI) A friend of mine with a complete different system and kernel config (board, SMP) tried a while ago with kernels 2.6.0 and 2.6.5 independently of me and had the same problem too. I saw no significant changes between the versions from 2.4.26 to 2.6.7. So I don't think the problem comes directly from the driver. The following could let to a clew: lsmod shows that the starfire module depends on mii, but the starfire module itself shows no module usage! Last time I tried, I got the following errors: Something wicked happened! 0x02018101. Something wicked happened! 0x02010001. What else information can I give you ? The LEDs on my switch blink when running a ping. So at least one direction does something. I have not checked, if that's sending or receiving and if packets are corrupted. Could be difficult to test. That system is my NFS server for all my diskless clients... I found a similar thread, that's maybe related: http://lkml.org/lkml/2004/1/5/225 Thanks, Toby From shemminger@osdl.org Fri Aug 6 09:40:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 09:41:00 -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 i76GemN5014692 for ; Fri, 6 Aug 2004 09:40:48 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i76GdK130681; Fri, 6 Aug 2004 09:39:21 -0700 Date: Fri, 6 Aug 2004 09:39:20 -0700 From: Stephen Hemminger To: jt@hpl.hp.com Cc: jt@bougret.hpl.hp.com, "David S. Miller" , netdev@oss.sgi.com, Mariusz Mazur Subject: Re: iproute2 and kernel headers Message-Id: <20040806093920.045b379e@dell_ss3.pdx.osdl.net> In-Reply-To: <20040805005019.GA11538@bougret.hpl.hp.com> References: <20040805005019.GA11538@bougret.hpl.hp.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7539 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 Wed, 4 Aug 2004 17:50:19 -0700 Jean Tourrilhes wrote: > Stephen Hemminger wrote : > > > > On Tue, 3 Aug 2004 02:14:59 +0200 Tomasz Torcz wrote: > > > > > On Mon, Aug 02, 2004 at 03:38:05PM -0700, Stephen Hemminger wrote: > > > > I am willing to put some headers (not all) in with the user level > > > > code, provided they are copies since they I can easily update. I don't want > > > > to get into keeping an edited set of headers in sync. > > > > > > Aren't linux-libc-headers (*) sufficient? > > > > > > * - http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ > > > > The theory of that is good, but in practice it would make the problem > > worse. What iproute2 wants is to have the same kernel data structures > > as the latest kernel. It is awkward enough making sure to get them > > from the correct kernel sources, but doing it from a different package > > would make updating and keeping everything current worse. > > Hi Stephen, > > Sorry to bring bad news, but I wanted to share my experience > on the subject with you. This e-mail might not give you solution, but > I hope it will at least entertain you ;-) > > > I have the same problem with Wireless Extensions. My thinking > was similar to yours a while back, and since then I've tried various > solutions. My personal opinion on the subject is that you have just > opened a big can of worms, and you will quickly realise that it's > worse than you initally though... > > Back when I started with Wireless Extensions, the kernel > headers in /usr/include/linux where a symbolic link to the actual > kernel headers. I was just building Wireless Tools against > /usr/include/linux/wireless.h, and magically both the tools and the > kernel were using the same defintions of various data structures. > > Then, people started to upgrade their kernel and forgot to > recompile the tools. Personally, the first thing I do when I install a > Debian stable to to wipe out the obsolete kernel and install the > latest. The end result was that the tools were crashing in all kind of > mysterious ways, because the data structs were not the same size in > the tools and the kernel. > I learned pretty quickly that version number on the tools were > not much help. If kernel version X recommend tools version A, but > tools version A were compiled for kernel version Y, the tools will > still malfunction. And the user won't understand because he has the > "right" version. > I tried to educate users, with notices in README and on my web > page, but after answering the same question for hundreds of time, I > felt I was wasting my time. I don't think it's possible to expect > standard users to always recompile those system tools when they > upgrade the kernel. > > This is when I introduced version number in the API. This > allows the tools to verify that they use the same version of the API > as the kernel, and complain if they are not with an explicit error > message. > Things were somewhat better, at least the errors were no > longer mysterious and a significant number of users figured out how to > fix it by themselves. > However, many users got very confused by the two version > numbers and their relationship. > > Around this time, /usr/include/linux was no longer a symlink > and became independant of the kernel version (what we have > today). That was another additional annoyance. > There are some ways to get around this. One way is to poke > directly in /usr/src/linux for the header. Another is to have local > copies of all the versions of the header, and poke the current running > kernel for the API version number to select the proper version of the > header. Or you can let the user decide which version to use at > configure time. I implemented all three for wireless tools. > Your proposal would fix this precise issue, but in the grand > scheme of things, I believe this is only one annoyance, not the main > issue. You still have data structure mismatches if the kernel and the > tools are not compiled with the same version of the kernel headers. > > By the way, one of the consequence of versioning the API is > that I tend to do most API changes in batches. The idea is that I want > to minimise the number of API versions, because I have to test the > tools and drivers with each of them, and I have finite time. > The kernel people hate me, because I submit changes as big > batches, which is contrary to the "small patch" philosophy. The > driver/tools people hate me because the changes they depend upon are > queued up until next batch *and* they have to test for multiple > versions of the API and #define all over the place in their code. You > can't win... > > Soon after that, the distribution people started to hate > me. Many of their users were seeing my message about API mismatche and > rep[orting it as a bug. Distro only offer one prepackaged version of > the tools ; Some distro offer multiple kernel options (Debian), or > offer prepackaged kernel updates (Red-Hat). Of course, the tools would > match only one version of the kernel, and not the other ones. Distro > went as far as just disable my error message, because it was confusing > their users too much, and live with the broken functionality. > Let's also not forget people like me having multiple kernels > on the same system (like one 2.4.X and one 2.6.X kernels in my > case). You don't want to recompile your tools each time you boot the > other kernel. > > I tried to have a system where I would compile the tools with > different versions of the API (i.e. create multiple binaries), and > have a small dispatcher that would call the right version of the tools > depending on the running kernel. That was working, but just ugly and > fragile. > The current solution is that I implemented a layer that > translate those data structures from one version to another. I read > the version of the API and translate the structure to whatever the > tool is expecting. Basically, a single binary dynamically support > multiple versions of the API and multiple kernels. > This works for me because the number of API versions and data > structures is limited. I'm not sure if it would work for everybody... > > Now, that's my story. Other people have their own stories, and > for example I would ask the netfilter people how they deal with this > problem. > > Now, my sick brain would like to suggest a few other crazy > solutions totally out of the box : > > 1) Get it right the first time, so no change is ever > needed. If things are standardised (POSIX, IEEE), this can work, if > you are called Linus, most likely, otherwise, good luck... The management API's are what seemed to get changed the most. The only relevant standard's seem to be SNMP, but it doesn't match the kernel API needs. > 2) Migrate all those kernel APIs to XML. XML is the future, > you can validate the output, and you can add/remove nodes/attributes > between versions without the full thing falling apart. And we already > have a web server in the kernel. No, don't reinvent SOAP for kernel API's. > 3) Every time you need to change the API, migrate it to > another delivery mechanism and create a totally different set of > tools. If you were using ioctl, migrate to netlink. If you were using > netlink, migrate to a pseudo filesystem. Obviously the holy grail is > to make it a system call. Also, make sure to kill the old APIs and old > tools, otherwise some other folks my continue to maintain it. Doesn't make sense unless the new interface is better. Just use different ioctl's or message types. > 4) Distribute all those system utilities as part of the > kernel, compile them as part of the kernel, and install them in a > kernel specific directory. Basically, treat system utilities exactly > the same way as kernel modules. > That actually would go a long way toward solving the issue of > distribution of system utils (where is module-init-tools ?) and push > more people to implement their pet project in user space rather than > in the kernel. Too old school, unix. It might have worked in the past, and we might end up back there, but it ain't going to happen now. > I wish you a lot of luck exploring those issues, and if one of > those long nights you have a Eureka moment, please share with us ;-) > Have fun... You ignored the advantage of using simple string interfaces (a.l.a Plan 9) or simple name:value pairs. Also, it turns out that some simple things like increasing the size of the structure or adding a new rtnetlink message type are not too hard to deal with. From dipankar@in.ibm.com Fri Aug 6 12:18:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 12:18:21 -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 i76JI8Fe017942 for ; Fri, 6 Aug 2004 12:18:08 -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 i76JHhDD565758; Fri, 6 Aug 2004 15:17:43 -0400 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with SMTP id i76JHWNm134898; Fri, 6 Aug 2004 13:17:37 -0600 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 821CD7C7CB; Sun, 8 Aug 2004 00:45:37 +0530 (IST) Date: Sun, 8 Aug 2004 00:45:37 +0530 From: Dipankar Sarma To: Andrew Morton Cc: Rusty Russell , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Robert Olsson , netdev@oss.sgi.com Subject: RCU : various patches [0/5] Message-ID: <20040807191536.GA3936@in.ibm.com> Reply-To: dipankar@in.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: 7540 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dipankar@in.ibm.com Precedence: bulk X-list: netdev This is a series of patches that are currently in my tree. These apply on 2.6.8-rc3-mm1 (on top the earlier 3 patches in -mm). Of these, the first one is a cleanup to avoid percpu data address calculations and also prepration for call_rcu_bh(). The call-rcu-bh patches introduce a separate RCU mechanism for softirq handlers with handler completion as another quiescent state and use it in route cache. This avoids the dst cache overflow problems Robert Olsson was seeing during his router DoS testing. All this work happened after a long private email discussion some months ago involving Alexey, Robert, Dave Miller and some of us. I am publishing the work so that people can test it. It would be nice to give the entire stack a spin in -mm. The remaining two patches are from Paul that documents RCU apis and hides smp_read_barrier_depends() using a simple macro - rcu_dereference(). I have tested the call-rcu-bh stuff with pktgen and saw no route cache overflows. The complete stack is also sanity tested. Thanks Dipankar From dipankar@in.ibm.com Fri Aug 6 12:20:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 12:20:09 -0700 (PDT) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i76JJxdR021271 for ; Fri, 6 Aug 2004 12:19:59 -0700 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e4.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i76JJWvL823942; Fri, 6 Aug 2004 15:19:32 -0400 Received: from soprano.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with SMTP id i76JKZD4105658; Fri, 6 Aug 2004 15:20:37 -0400 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 73C8A7C7CB; Sun, 8 Aug 2004 00:47:29 +0530 (IST) Date: Sun, 8 Aug 2004 00:47:29 +0530 From: Dipankar Sarma To: Andrew Morton Cc: Rusty Russell , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Robert Olsson , netdev@oss.sgi.com Subject: Re: RCU : clean up code [1/5] Message-ID: <20040807191729.GB3936@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040807191536.GA3936@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040807191536.GA3936@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 7541 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dipankar@in.ibm.com Precedence: bulk X-list: netdev Avoids per_cpu calculations and also prepares for call_rcu_bh(). Thanks Dipankar At OLS, Rusty had suggested getting rid of many per_cpu() calculations in RCU code and making the code simpler. I had already done that for the rcu-softirq patch earlier, so I am splitting that into two patch. This first patch cleans up the macros and uses pointers to the rcu per-cpu data directly to manipulate the callback queues. This is useful for the call-rcu-bh patch (to follow) which introduces a new RCU mechanism - call_rcu_bh(). Both generic and softirq rcu can then use the same code, they work different global and percpu data. Signed-off-by: Dipankar Sarma include/linux/rcupdate.h | 38 ++++--- kernel/rcupdate.c | 229 ++++++++++++++++++++++++----------------------- kernel/sched.c | 2 3 files changed, 143 insertions(+), 126 deletions(-) diff -puN include/linux/rcupdate.h~rcu-code-cleanup include/linux/rcupdate.h --- linux-2.6.8-rc3-mm1/include/linux/rcupdate.h~rcu-code-cleanup 2004-08-07 15:28:30.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/include/linux/rcupdate.h 2004-08-07 15:28:30.000000000 +0530 @@ -101,47 +101,51 @@ struct rcu_data { struct rcu_head **curtail; struct rcu_head *donelist; struct rcu_head **donetail; + int cpu; }; DECLARE_PER_CPU(struct rcu_data, rcu_data); extern struct rcu_ctrlblk rcu_ctrlblk; -#define RCU_quiescbatch(cpu) (per_cpu(rcu_data, (cpu)).quiescbatch) -#define RCU_qsctr(cpu) (per_cpu(rcu_data, (cpu)).qsctr) -#define RCU_last_qsctr(cpu) (per_cpu(rcu_data, (cpu)).last_qsctr) -#define RCU_qs_pending(cpu) (per_cpu(rcu_data, (cpu)).qs_pending) -#define RCU_batch(cpu) (per_cpu(rcu_data, (cpu)).batch) -#define RCU_nxtlist(cpu) (per_cpu(rcu_data, (cpu)).nxtlist) -#define RCU_curlist(cpu) (per_cpu(rcu_data, (cpu)).curlist) -#define RCU_nxttail(cpu) (per_cpu(rcu_data, (cpu)).nxttail) -#define RCU_curtail(cpu) (per_cpu(rcu_data, (cpu)).curtail) -#define RCU_donelist(cpu) (per_cpu(rcu_data, (cpu)).donelist) -#define RCU_donetail(cpu) (per_cpu(rcu_data, (cpu)).donetail) +/* + * Increment the quiscent state counter. + */ +static inline void rcu_qsctr_inc(int cpu) +{ + struct rcu_data *rdp = &per_cpu(rcu_data, cpu); + rdp->qsctr++; +} -static inline int rcu_pending(int cpu) +static inline int __rcu_pending(struct rcu_ctrlblk *rcp, + struct rcu_data *rdp) { /* This cpu has pending rcu entries and the grace period * for them has completed. */ - if (RCU_curlist(cpu) && - !rcu_batch_before(rcu_ctrlblk.completed,RCU_batch(cpu))) + if (rdp->curlist && !rcu_batch_before(rcp->completed, rdp->batch)) return 1; /* This cpu has no pending entries, but there are new entries */ - if (!RCU_curlist(cpu) && RCU_nxtlist(cpu)) + if (!rdp->curlist && rdp->nxtlist) return 1; - if (RCU_donelist(cpu)) + /* This cpu has finished callbacks to invoke */ + if (rdp->donelist) return 1; /* The rcu core waits for a quiescent state from the cpu */ - if (RCU_quiescbatch(cpu) != rcu_ctrlblk.cur || RCU_qs_pending(cpu)) + if (rdp->quiescbatch != rcp->cur || rdp->qs_pending) return 1; /* nothing to do */ return 0; } +static inline int rcu_pending(int cpu) +{ + return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)); +} + #define rcu_read_lock() preempt_disable() #define rcu_read_unlock() preempt_enable() diff -puN kernel/rcupdate.c~rcu-code-cleanup kernel/rcupdate.c --- linux-2.6.8-rc3-mm1/kernel/rcupdate.c~rcu-code-cleanup 2004-08-07 15:28:30.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/kernel/rcupdate.c 2004-08-07 15:28:30.000000000 +0530 @@ -17,9 +17,10 @@ * * Copyright (C) IBM Corporation, 2001 * - * Author: Dipankar Sarma + * Authors: Dipankar Sarma + * Manfred Spraul * - * Based on the original work by Paul McKenney + * Based on the original work by Paul McKenney * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. * Papers: * http://www.rdrop.com/users/paulmck/paper/rclockpdcsproof.pdf @@ -51,19 +52,20 @@ struct rcu_ctrlblk rcu_ctrlblk = { .cur = -300, .completed = -300 , .lock = SEQCNT_ZERO }; /* Bookkeeping of the progress of the grace period */ -struct { - spinlock_t mutex; /* Guard this struct and writes to rcu_ctrlblk */ - cpumask_t rcu_cpu_mask; /* CPUs that need to switch in order */ +struct rcu_state { + spinlock_t lock; /* Guard this struct and writes to rcu_ctrlblk */ + cpumask_t cpumask; /* CPUs that need to switch in order */ /* for current batch to proceed. */ -} rcu_state ____cacheline_maxaligned_in_smp = - {.mutex = SPIN_LOCK_UNLOCKED, .rcu_cpu_mask = CPU_MASK_NONE }; +}; + +struct rcu_state rcu_state ____cacheline_maxaligned_in_smp = + {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L }; /* Fake initialization required by compiler */ static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; -#define RCU_tasklet(cpu) (per_cpu(rcu_tasklet, cpu)) static int maxbatch = 10; /** @@ -79,15 +81,15 @@ static int maxbatch = 10; void fastcall call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) { - int cpu; unsigned long flags; + struct rcu_data *rdp; head->func = func; head->next = NULL; local_irq_save(flags); - cpu = smp_processor_id(); - *RCU_nxttail(cpu) = head; - RCU_nxttail(cpu) = &head->next; + rdp = &__get_cpu_var(rcu_data); + *rdp->nxttail = head; + rdp->nxttail = &head->next; local_irq_restore(flags); } @@ -95,23 +97,23 @@ void fastcall call_rcu(struct rcu_head * * Invoke the completed RCU callbacks. They are expected to be in * a per-cpu list. */ -static void rcu_do_batch(int cpu) +static void rcu_do_batch(struct rcu_data *rdp) { struct rcu_head *next, *list; int count = 0; - list = RCU_donelist(cpu); + list = rdp->donelist; while (list) { - next = RCU_donelist(cpu) = list->next; + next = rdp->donelist = list->next; list->func(list); list = next; if (++count >= maxbatch) break; } - if (!RCU_donelist(cpu)) - RCU_donetail(cpu) = &RCU_donelist(cpu); + if (!rdp->donelist) + rdp->donetail = &rdp->donelist; else - tasklet_schedule(&RCU_tasklet(cpu)); + tasklet_schedule(&per_cpu(rcu_tasklet, rdp->cpu)); } /* @@ -119,15 +121,15 @@ static void rcu_do_batch(int cpu) * The grace period handling consists out of two steps: * - A new grace period is started. * This is done by rcu_start_batch. The start is not broadcasted to - * all cpus, they must pick this up by comparing rcu_ctrlblk.cur with - * RCU_quiescbatch(cpu). All cpus are recorded in the - * rcu_state.rcu_cpu_mask bitmap. + * all cpus, they must pick this up by comparing rcp->cur with + * rdp->quiescbatch. All cpus are recorded in the + * rcu_state.cpumask bitmap. * - All cpus must go through a quiescent state. * Since the start of the grace period is not broadcasted, at least two * calls to rcu_check_quiescent_state are required: * The first call just notices that a new grace period is running. The * following calls check if there was a quiescent state since the beginning - * of the grace period. If so, it updates rcu_state.rcu_cpu_mask. If + * of the grace period. If so, it updates rcu_state.cpumask. If * the bitmap is empty, then the grace period is completed. * rcu_check_quiescent_state calls rcu_start_batch(0) to start the next grace * period (if necessary). @@ -135,22 +137,22 @@ static void rcu_do_batch(int cpu) /* * Register a new batch of callbacks, and start it up if there is currently no * active batch and the batch to be registered has not already occurred. - * Caller must hold rcu_state.mutex. + * Caller must hold rcu_state.lock. */ -static void rcu_start_batch(int next_pending) +static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp, + int next_pending) { if (next_pending) - rcu_ctrlblk.next_pending = 1; + rcp->next_pending = 1; - if (rcu_ctrlblk.next_pending && - rcu_ctrlblk.completed == rcu_ctrlblk.cur) { + if (rcp->next_pending && + rcp->completed == rcp->cur) { /* Can't change, since spin lock held. */ - cpus_andnot(rcu_state.rcu_cpu_mask, cpu_online_map, - nohz_cpu_mask); - write_seqcount_begin(&rcu_ctrlblk.lock); - rcu_ctrlblk.next_pending = 0; - rcu_ctrlblk.cur++; - write_seqcount_end(&rcu_ctrlblk.lock); + cpus_andnot(rsp->cpumask, cpu_online_map, nohz_cpu_mask); + write_seqcount_begin(&rcp->lock); + rcp->next_pending = 0; + rcp->cur++; + write_seqcount_end(&rcp->lock); } } @@ -159,13 +161,13 @@ static void rcu_start_batch(int next_pen * Clear it from the cpu mask and complete the grace period if it was the last * cpu. Start another grace period if someone has further entries pending */ -static void cpu_quiet(int cpu) +static void cpu_quiet(int cpu, struct rcu_ctrlblk *rcp, struct rcu_state *rsp) { - cpu_clear(cpu, rcu_state.rcu_cpu_mask); - if (cpus_empty(rcu_state.rcu_cpu_mask)) { + cpu_clear(cpu, rsp->cpumask); + if (cpus_empty(rsp->cpumask)) { /* batch completed ! */ - rcu_ctrlblk.completed = rcu_ctrlblk.cur; - rcu_start_batch(0); + rcp->completed = rcp->cur; + rcu_start_batch(rcp, rsp, 0); } } @@ -174,15 +176,14 @@ static void cpu_quiet(int cpu) * switch). If so and if it already hasn't done so in this RCU * quiescent cycle, then indicate that it has done so. */ -static void rcu_check_quiescent_state(void) +static void rcu_check_quiescent_state(struct rcu_ctrlblk *rcp, + struct rcu_state *rsp, struct rcu_data *rdp) { - int cpu = smp_processor_id(); - - if (RCU_quiescbatch(cpu) != rcu_ctrlblk.cur) { + if (rdp->quiescbatch != rcp->cur) { /* new grace period: record qsctr value. */ - RCU_qs_pending(cpu) = 1; - RCU_last_qsctr(cpu) = RCU_qsctr(cpu); - RCU_quiescbatch(cpu) = rcu_ctrlblk.cur; + rdp->qs_pending = 1; + rdp->last_qsctr = rdp->qsctr; + rdp->quiescbatch = rcp->cur; return; } @@ -190,7 +191,7 @@ static void rcu_check_quiescent_state(vo * qs_pending is checked instead of the actual bitmap to avoid * cacheline trashing. */ - if (!RCU_qs_pending(cpu)) + if (!rdp->qs_pending) return; /* @@ -198,19 +199,19 @@ static void rcu_check_quiescent_state(vo * we may miss one quiescent state of that CPU. That is * tolerable. So no need to disable interrupts. */ - if (RCU_qsctr(cpu) == RCU_last_qsctr(cpu)) + if (rdp->qsctr == rdp->last_qsctr) return; - RCU_qs_pending(cpu) = 0; + rdp->qs_pending = 0; - spin_lock(&rcu_state.mutex); + spin_lock(&rsp->lock); /* - * RCU_quiescbatch/batch.cur and the cpu bitmap can come out of sync + * rdp->quiescbatch/rcp->cur and the cpu bitmap can come out of sync * during cpu startup. Ignore the quiescent state. */ - if (likely(RCU_quiescbatch(cpu) == rcu_ctrlblk.cur)) - cpu_quiet(cpu); + if (likely(rdp->quiescbatch == rcp->cur)) + cpu_quiet(rdp->cpu, rcp, rsp); - spin_unlock(&rcu_state.mutex); + spin_unlock(&rsp->lock); } @@ -220,33 +221,39 @@ static void rcu_check_quiescent_state(vo * locking requirements, the list it's pulling from has to belong to a cpu * which is dead and hence not processing interrupts. */ -static void rcu_move_batch(struct rcu_head *list, struct rcu_head **tail) +static void rcu_move_batch(struct rcu_data *this_rdp, struct rcu_head *list, + struct rcu_head **tail) { - int cpu; - local_irq_disable(); - cpu = smp_processor_id(); - *RCU_nxttail(cpu) = list; + *this_rdp->nxttail = list; if (list) - RCU_nxttail(cpu) = tail; + this_rdp->nxttail = tail; local_irq_enable(); } -static void rcu_offline_cpu(int cpu) +static void __rcu_offline_cpu(struct rcu_data *this_rdp, + struct rcu_ctrlblk *rcp, struct rcu_state *rsp, struct rcu_data *rdp) { /* if the cpu going offline owns the grace period * we can block indefinitely waiting for it, so flush * it here */ - spin_lock_bh(&rcu_state.mutex); - if (rcu_ctrlblk.cur != rcu_ctrlblk.completed) - cpu_quiet(cpu); - spin_unlock_bh(&rcu_state.mutex); + spin_lock_bh(&rsp->lock); + if (rcp->cur != rcp->completed) + cpu_quiet(rdp->cpu, rcp, rsp); + spin_unlock_bh(&rsp->lock); + rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail); + rcu_move_batch(this_rdp, rdp->nxtlist, rdp->nxttail); - rcu_move_batch(RCU_curlist(cpu), RCU_curtail(cpu)); - rcu_move_batch(RCU_nxtlist(cpu), RCU_nxttail(cpu)); +} +static void rcu_offline_cpu(int cpu) +{ + struct rcu_data *this_rdp = &get_cpu_var(rcu_data); - tasklet_kill_immediate(&RCU_tasklet(cpu), cpu); + __rcu_offline_cpu(this_rdp, &rcu_ctrlblk, &rcu_state, + &per_cpu(rcu_data, cpu)); + put_cpu_var(rcu_data); + tasklet_kill_immediate(&per_cpu(rcu_tasklet, cpu), cpu); } #else @@ -257,81 +264,87 @@ static void rcu_offline_cpu(int cpu) #endif -void rcu_restart_cpu(int cpu) -{ - spin_lock_bh(&rcu_state.mutex); - RCU_quiescbatch(cpu) = rcu_ctrlblk.completed; - RCU_qs_pending(cpu) = 0; - spin_unlock_bh(&rcu_state.mutex); -} - /* * This does the RCU processing work from tasklet context. */ -static void rcu_process_callbacks(unsigned long unused) +static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp, + struct rcu_state *rsp, struct rcu_data *rdp) { - int cpu = smp_processor_id(); - - if (RCU_curlist(cpu) && - !rcu_batch_before(rcu_ctrlblk.completed, RCU_batch(cpu))) { - *RCU_donetail(cpu) = RCU_curlist(cpu); - RCU_donetail(cpu) = RCU_curtail(cpu); - RCU_curlist(cpu) = NULL; - RCU_curtail(cpu) = &RCU_curlist(cpu); + if (rdp->curlist && !rcu_batch_before(rcp->completed, rdp->batch)) { + *rdp->donetail = rdp->curlist; + rdp->donetail = rdp->curtail; + rdp->curlist = NULL; + rdp->curtail = &rdp->curlist; } local_irq_disable(); - if (RCU_nxtlist(cpu) && !RCU_curlist(cpu)) { + if (rdp->nxtlist && !rdp->curlist) { int next_pending, seq; - RCU_curlist(cpu) = RCU_nxtlist(cpu); - RCU_curtail(cpu) = RCU_nxttail(cpu); - RCU_nxtlist(cpu) = NULL; - RCU_nxttail(cpu) = &RCU_nxtlist(cpu); + rdp->curlist = rdp->nxtlist; + rdp->curtail = rdp->nxttail; + rdp->nxtlist = NULL; + rdp->nxttail = &rdp->nxtlist; local_irq_enable(); /* * start the next batch of callbacks */ do { - seq = read_seqcount_begin(&rcu_ctrlblk.lock); + seq = read_seqcount_begin(&rcp->lock); /* determine batch number */ - RCU_batch(cpu) = rcu_ctrlblk.cur + 1; - next_pending = rcu_ctrlblk.next_pending; - } while (read_seqcount_retry(&rcu_ctrlblk.lock, seq)); + rdp->batch = rcp->cur + 1; + next_pending = rcp->next_pending; + } while (read_seqcount_retry(&rcp->lock, seq)); if (!next_pending) { /* and start it/schedule start if it's a new batch */ - spin_lock(&rcu_state.mutex); - rcu_start_batch(1); - spin_unlock(&rcu_state.mutex); + spin_lock(&rsp->lock); + rcu_start_batch(rcp, rsp, 1); + spin_unlock(&rsp->lock); } } else { local_irq_enable(); } - rcu_check_quiescent_state(); - if (RCU_donelist(cpu)) - rcu_do_batch(cpu); + rcu_check_quiescent_state(rcp, rsp, rdp); + if (rdp->donelist) + rcu_do_batch(rdp); +} + +static void rcu_process_callbacks(unsigned long unused) +{ + __rcu_process_callbacks(&rcu_ctrlblk, &rcu_state, + &__get_cpu_var(rcu_data)); } void rcu_check_callbacks(int cpu, int user) { + struct rcu_data *rdp = &__get_cpu_var(rcu_data); if (user || (idle_cpu(cpu) && !in_softirq() && hardirq_count() <= (1 << HARDIRQ_SHIFT))) - RCU_qsctr(cpu)++; - tasklet_schedule(&RCU_tasklet(cpu)); + rdp->qsctr++; + tasklet_schedule(&per_cpu(rcu_tasklet, rdp->cpu)); +} + +static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp, + struct rcu_data *rdp) +{ + memset(rdp, 0, sizeof(*rdp)); + rdp->curtail = &rdp->curlist; + rdp->nxttail = &rdp->nxtlist; + rdp->donetail = &rdp->donelist; + rdp->quiescbatch = rcp->completed; + rdp->qs_pending = 0; + rdp->cpu = cpu; } static void __devinit rcu_online_cpu(int cpu) { - memset(&per_cpu(rcu_data, cpu), 0, sizeof(struct rcu_data)); - tasklet_init(&RCU_tasklet(cpu), rcu_process_callbacks, 0UL); - RCU_curtail(cpu) = &RCU_curlist(cpu); - RCU_nxttail(cpu) = &RCU_nxtlist(cpu); - RCU_donetail(cpu) = &RCU_donelist(cpu); - RCU_quiescbatch(cpu) = rcu_ctrlblk.completed; - RCU_qs_pending(cpu) = 0; + struct rcu_data *rdp = &per_cpu(rcu_data, cpu); + + rcu_init_percpu_data(cpu, &rcu_ctrlblk, rdp); + tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); } static int __devinit rcu_cpu_notify(struct notifier_block *self, diff -puN kernel/sched.c~rcu-code-cleanup kernel/sched.c --- linux-2.6.8-rc3-mm1/kernel/sched.c~rcu-code-cleanup 2004-08-07 15:28:30.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/kernel/sched.c 2004-08-07 15:28:30.000000000 +0530 @@ -2548,7 +2548,7 @@ need_resched: switch_tasks: prefetch(next); clear_tsk_need_resched(prev); - RCU_qsctr(task_cpu(prev))++; + rcu_qsctr_inc(task_cpu(prev)); prev->sleep_avg -= run_time; if ((long)prev->sleep_avg <= 0) { _ From dipankar@in.ibm.com Fri Aug 6 12:21:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 12:21:14 -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 i76JL7pr021539 for ; Fri, 6 Aug 2004 12:21:08 -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 i76JKiDD287878; Fri, 6 Aug 2004 15:20:44 -0400 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with SMTP id i76JKaNm208460; Fri, 6 Aug 2004 13:20:38 -0600 Received: by soprano.in.ibm.com (Postfix, from userid 500) id A96B37C7CB; Sun, 8 Aug 2004 00:48:41 +0530 (IST) Date: Sun, 8 Aug 2004 00:48:41 +0530 From: Dipankar Sarma To: Andrew Morton Cc: Rusty Russell , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Robert Olsson , netdev@oss.sgi.com Subject: Re: RCU : Introduce call_rcu_bh() [2/5] Message-ID: <20040807191841.GC3936@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040807191536.GA3936@in.ibm.com> <20040807191729.GB3936@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040807191729.GB3936@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 7542 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dipankar@in.ibm.com Precedence: bulk X-list: netdev Introduces call_rcu_bh() to be used when critical sections are mostly in softirq context. Thanks Dipankar This patch introduces a new api - call_rcu_bh(). This is to be used for RCU callbacks for whom the critical sections are mostly in softirq context. These callbacks consider completion of a softirq handler to be a quiescent state. So, in order to make reader critical sections safe in process context, rcu_read_lock_bh() and rcu_read_unlock_bh() must be used. Use of softirq handler completion as a quiescent state speeds up RCU grace periods and prevents too many callbacks getting queued up in softirq-heavy workloads like network stack. Signed-off-by: Dipankar Sarma include/linux/rcupdate.h | 14 +++++++++++- kernel/rcupdate.c | 52 ++++++++++++++++++++++++++++++++++++++++++----- kernel/softirq.c | 7 +++++- 3 files changed, 66 insertions(+), 7 deletions(-) diff -puN include/linux/rcupdate.h~rcu-call-rcu-bh include/linux/rcupdate.h --- linux-2.6.8-rc3-mm1/include/linux/rcupdate.h~rcu-call-rcu-bh 2004-08-07 15:28:51.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/include/linux/rcupdate.h 2004-08-07 15:28:51.000000000 +0530 @@ -105,7 +105,9 @@ struct rcu_data { }; DECLARE_PER_CPU(struct rcu_data, rcu_data); +DECLARE_PER_CPU(struct rcu_data, rcu_bh_data); extern struct rcu_ctrlblk rcu_ctrlblk; +extern struct rcu_ctrlblk rcu_bh_ctrlblk; /* * Increment the quiscent state counter. @@ -115,6 +117,11 @@ static inline void rcu_qsctr_inc(int cpu struct rcu_data *rdp = &per_cpu(rcu_data, cpu); rdp->qsctr++; } +static inline void rcu_bh_qsctr_inc(int cpu) +{ + struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu); + rdp->qsctr++; +} static inline int __rcu_pending(struct rcu_ctrlblk *rcp, struct rcu_data *rdp) @@ -143,11 +150,14 @@ static inline int __rcu_pending(struct r static inline int rcu_pending(int cpu) { - return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)); + return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) || + __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); } #define rcu_read_lock() preempt_disable() #define rcu_read_unlock() preempt_enable() +#define rcu_read_lock_bh() local_bh_disable() +#define rcu_read_unlock_bh() local_bh_enable() extern void rcu_init(void); extern void rcu_check_callbacks(int cpu, int user); @@ -156,6 +166,8 @@ extern void rcu_restart_cpu(int cpu); /* Exported interfaces */ extern void FASTCALL(call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head))); +extern void FASTCALL(call_rcu_bh(struct rcu_head *head, + void (*func)(struct rcu_head *head))); extern void synchronize_kernel(void); #endif /* __KERNEL__ */ diff -puN kernel/rcupdate.c~rcu-call-rcu-bh kernel/rcupdate.c --- linux-2.6.8-rc3-mm1/kernel/rcupdate.c~rcu-call-rcu-bh 2004-08-07 15:28:51.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/kernel/rcupdate.c 2004-08-07 15:28:51.000000000 +0530 @@ -50,6 +50,8 @@ /* Definition for rcupdate control block. */ struct rcu_ctrlblk rcu_ctrlblk = { .cur = -300, .completed = -300 , .lock = SEQCNT_ZERO }; +struct rcu_ctrlblk rcu_bh_ctrlblk = + { .cur = -300, .completed = -300 , .lock = SEQCNT_ZERO }; /* Bookkeeping of the progress of the grace period */ struct rcu_state { @@ -60,9 +62,11 @@ struct rcu_state { struct rcu_state rcu_state ____cacheline_maxaligned_in_smp = {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; - +struct rcu_state rcu_bh_state ____cacheline_maxaligned_in_smp = + {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L }; +DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L }; /* Fake initialization required by compiler */ static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; @@ -93,6 +97,34 @@ void fastcall call_rcu(struct rcu_head * local_irq_restore(flags); } +/** + * call_rcu_bh - Queue an RCU update request for which softirq handler + * completion is a quiescent state. + * @head: structure to be used for queueing the RCU updates. + * @func: actual update function to be invoked after the grace period + * + * The update function will be invoked as soon as all CPUs have performed + * a context switch or been seen in the idle loop or in a user process + * or has exited a softirq handler that it may have been executing. + * The read-side of critical section that use call_rcu_bh() for updation must + * be protected by rcu_read_lock_bh()/rcu_read_unlock_bh() if it is + * in process context. + */ +void fastcall call_rcu_bh(struct rcu_head *head, + void (*func)(struct rcu_head *rcu)) +{ + unsigned long flags; + struct rcu_data *rdp; + + head->func = func; + head->next = NULL; + local_irq_save(flags); + rdp = &__get_cpu_var(rcu_bh_data); + *rdp->nxttail = head; + rdp->nxttail = &head->next; + local_irq_restore(flags); +} + /* * Invoke the completed RCU callbacks. They are expected to be in * a per-cpu list. @@ -249,10 +281,14 @@ static void __rcu_offline_cpu(struct rcu static void rcu_offline_cpu(int cpu) { struct rcu_data *this_rdp = &get_cpu_var(rcu_data); + struct rcu_data *this_bh_rdp = &get_cpu_var(rcu_bh_data); __rcu_offline_cpu(this_rdp, &rcu_ctrlblk, &rcu_state, &per_cpu(rcu_data, cpu)); + __rcu_offline_cpu(this_rdp, &rcu_bh_ctrlblk, &rcu_bh_state, + &per_cpu(rcu_bh_data, cpu)); put_cpu_var(rcu_data); + put_cpu_var(rcu_bh_data); tasklet_kill_immediate(&per_cpu(rcu_tasklet, cpu), cpu); } @@ -315,16 +351,20 @@ static void rcu_process_callbacks(unsign { __rcu_process_callbacks(&rcu_ctrlblk, &rcu_state, &__get_cpu_var(rcu_data)); + __rcu_process_callbacks(&rcu_bh_ctrlblk, &rcu_bh_state, + &__get_cpu_var(rcu_bh_data)); } void rcu_check_callbacks(int cpu, int user) { - struct rcu_data *rdp = &__get_cpu_var(rcu_data); if (user || (idle_cpu(cpu) && !in_softirq() && - hardirq_count() <= (1 << HARDIRQ_SHIFT))) - rdp->qsctr++; - tasklet_schedule(&per_cpu(rcu_tasklet, rdp->cpu)); + hardirq_count() <= (1 << HARDIRQ_SHIFT))) { + rcu_qsctr_inc(cpu); + rcu_bh_qsctr_inc(cpu); + } else if (!in_softirq()) + rcu_bh_qsctr_inc(cpu); + tasklet_schedule(&per_cpu(rcu_tasklet, cpu)); } static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp, @@ -342,8 +382,10 @@ static void rcu_init_percpu_data(int cpu static void __devinit rcu_online_cpu(int cpu) { struct rcu_data *rdp = &per_cpu(rcu_data, cpu); + struct rcu_data *bh_rdp = &per_cpu(rcu_bh_data, cpu); rcu_init_percpu_data(cpu, &rcu_ctrlblk, rdp); + rcu_init_percpu_data(cpu, &rcu_bh_ctrlblk, bh_rdp); tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); } diff -puN kernel/softirq.c~rcu-call-rcu-bh kernel/softirq.c --- linux-2.6.8-rc3-mm1/kernel/softirq.c~rcu-call-rcu-bh 2004-08-07 15:28:51.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/kernel/softirq.c 2004-08-07 15:28:51.000000000 +0530 @@ -15,6 +15,7 @@ #include #include #include +#include #include /* @@ -75,10 +76,12 @@ asmlinkage void __do_softirq(void) struct softirq_action *h; __u32 pending; int max_restart = MAX_SOFTIRQ_RESTART; + int cpu; pending = local_softirq_pending(); local_bh_disable(); + cpu = smp_processor_id(); restart: /* Reset the pending bitmask before enabling irqs */ local_softirq_pending() = 0; @@ -88,8 +91,10 @@ restart: h = softirq_vec; do { - if (pending & 1) + if (pending & 1) { h->action(h); + rcu_bh_qsctr_inc(cpu); + } h++; pending >>= 1; } while (pending); _ From dipankar@in.ibm.com Fri Aug 6 12:22:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 12:23:01 -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 i76JMmR9022038 for ; Fri, 6 Aug 2004 12:22:48 -0700 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e6.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i76JMOnt394320; Fri, 6 Aug 2004 15:22:24 -0400 Received: from soprano.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with SMTP id i76JNSD4117000; Fri, 6 Aug 2004 15:23:31 -0400 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 149057C7CB; Sun, 8 Aug 2004 00:50:23 +0530 (IST) Date: Sun, 8 Aug 2004 00:50:23 +0530 From: Dipankar Sarma To: Andrew Morton Cc: Rusty Russell , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Robert Olsson , netdev@oss.sgi.com Subject: Re: RCU : Use call_rcu_bh() in route cache [3/5] Message-ID: <20040807192023.GD3936@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040807191536.GA3936@in.ibm.com> <20040807191729.GB3936@in.ibm.com> <20040807191841.GC3936@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040807191841.GC3936@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 7543 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dipankar@in.ibm.com Precedence: bulk X-list: netdev Use call_rcu_bh() in route cache. This allows faster grace periods and avoids dst cache overflows during DoS testing. Thanks Dipankar This patch uses the call_rcu_bh() api in route cache code to facilitate quicker RCU grace periods. Quicker grace periods avoid overflow of dst cache in heavily loaded routers as seen in Robert Olsson's testing. Signed-off-by: Dipankar Sarma net/decnet/dn_route.c | 28 ++++++++++++++-------------- net/ipv4/route.c | 26 +++++++++++++------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff -puN net/decnet/dn_route.c~rcu-use-call-rcu-bh net/decnet/dn_route.c --- linux-2.6.8-rc3-mm1/net/decnet/dn_route.c~rcu-use-call-rcu-bh 2004-08-07 15:29:16.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/decnet/dn_route.c 2004-08-07 15:29:16.000000000 +0530 @@ -146,14 +146,14 @@ static __inline__ unsigned dn_hash(unsig static inline void dnrt_free(struct dn_route *rt) { - call_rcu(&rt->u.dst.rcu_head, dst_rcu_free); + call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); } static inline void dnrt_drop(struct dn_route *rt) { if (rt) dst_release(&rt->u.dst); - call_rcu(&rt->u.dst.rcu_head, dst_rcu_free); + call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); } static void dn_dst_check_expire(unsigned long dummy) @@ -1174,9 +1174,9 @@ static int __dn_route_output_key(struct struct dn_route *rt = NULL; if (!(flags & MSG_TRYHARD)) { - rcu_read_lock(); + rcu_read_lock_bh(); for(rt = dn_rt_hash_table[hash].chain; rt; rt = rt->u.rt_next) { - read_barrier_depends(); + smp_read_barrier_depends(); if ((flp->fld_dst == rt->fl.fld_dst) && (flp->fld_src == rt->fl.fld_src) && #ifdef CONFIG_DECNET_ROUTE_FWMARK @@ -1187,12 +1187,12 @@ static int __dn_route_output_key(struct rt->u.dst.lastuse = jiffies; dst_hold(&rt->u.dst); rt->u.dst.__use++; - rcu_read_unlock(); + rcu_read_unlock_bh(); *pprt = &rt->u.dst; return 0; } } - rcu_read_unlock(); + rcu_read_unlock_bh(); } return dn_route_output_slow(pprt, flp, flags); @@ -1647,21 +1647,21 @@ int dn_cache_dump(struct sk_buff *skb, s continue; if (h > s_h) s_idx = 0; - rcu_read_lock(); + rcu_read_lock_bh(); for(rt = dn_rt_hash_table[h].chain, idx = 0; rt; rt = rt->u.rt_next, idx++) { - read_barrier_depends(); + smp_read_barrier_depends(); if (idx < s_idx) continue; skb->dst = dst_clone(&rt->u.dst); if (dn_rt_fill_info(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, RTM_NEWROUTE, 1) <= 0) { dst_release(xchg(&skb->dst, NULL)); - rcu_read_unlock(); + rcu_read_unlock_bh(); goto done; } dst_release(xchg(&skb->dst, NULL)); } - rcu_read_unlock(); + rcu_read_unlock_bh(); } done: @@ -1681,7 +1681,7 @@ static struct dn_route *dn_rt_cache_get_ struct dn_rt_cache_iter_state *s = seq->private; for(s->bucket = dn_rt_hash_mask; s->bucket >= 0; --s->bucket) { - rcu_read_lock(); + rcu_read_lock_bh(); rt = dn_rt_hash_table[s->bucket].chain; if (rt) break; @@ -1697,10 +1697,10 @@ static struct dn_route *dn_rt_cache_get_ smp_read_barrier_depends(); rt = rt->u.rt_next; while(!rt) { - rcu_read_unlock(); + rcu_read_unlock_bh(); if (--s->bucket < 0) break; - rcu_read_lock(); + rcu_read_lock_bh(); rt = dn_rt_hash_table[s->bucket].chain; } return rt; @@ -1727,7 +1727,7 @@ static void *dn_rt_cache_seq_next(struct static void dn_rt_cache_seq_stop(struct seq_file *seq, void *v) { if (v) - rcu_read_unlock(); + rcu_read_unlock_bh(); } static int dn_rt_cache_seq_show(struct seq_file *seq, void *v) diff -puN net/ipv4/route.c~rcu-use-call-rcu-bh net/ipv4/route.c --- linux-2.6.8-rc3-mm1/net/ipv4/route.c~rcu-use-call-rcu-bh 2004-08-07 15:29:16.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/ipv4/route.c 2004-08-07 15:29:16.000000000 +0530 @@ -226,11 +226,11 @@ static struct rtable *rt_cache_get_first struct rt_cache_iter_state *st = seq->private; for (st->bucket = rt_hash_mask; st->bucket >= 0; --st->bucket) { - rcu_read_lock(); + rcu_read_lock_bh(); r = rt_hash_table[st->bucket].chain; if (r) break; - rcu_read_unlock(); + rcu_read_unlock_bh(); } return r; } @@ -242,10 +242,10 @@ static struct rtable *rt_cache_get_next( smp_read_barrier_depends(); r = r->u.rt_next; while (!r) { - rcu_read_unlock(); + rcu_read_unlock_bh(); if (--st->bucket < 0) break; - rcu_read_lock(); + rcu_read_lock_bh(); r = rt_hash_table[st->bucket].chain; } return r; @@ -281,7 +281,7 @@ static void *rt_cache_seq_next(struct se static void rt_cache_seq_stop(struct seq_file *seq, void *v) { if (v && v != SEQ_START_TOKEN) - rcu_read_unlock(); + rcu_read_unlock_bh(); } static int rt_cache_seq_show(struct seq_file *seq, void *v) @@ -439,13 +439,13 @@ static struct file_operations rt_cpu_seq static __inline__ void rt_free(struct rtable *rt) { - call_rcu(&rt->u.dst.rcu_head, dst_rcu_free); + call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); } static __inline__ void rt_drop(struct rtable *rt) { ip_rt_put(rt); - call_rcu(&rt->u.dst.rcu_head, dst_rcu_free); + call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); } static __inline__ int rt_fast_clean(struct rtable *rth) @@ -2231,7 +2231,7 @@ int __ip_route_output_key(struct rtable hash = rt_hash_code(flp->fl4_dst, flp->fl4_src ^ (flp->oif << 5), flp->fl4_tos); - rcu_read_lock(); + rcu_read_lock_bh(); for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) { smp_read_barrier_depends(); if (rth->fl.fl4_dst == flp->fl4_dst && @@ -2247,13 +2247,13 @@ int __ip_route_output_key(struct rtable dst_hold(&rth->u.dst); rth->u.dst.__use++; RT_CACHE_STAT_INC(out_hit); - rcu_read_unlock(); + rcu_read_unlock_bh(); *rp = rth; return 0; } RT_CACHE_STAT_INC(out_hlist_search); } - rcu_read_unlock(); + rcu_read_unlock_bh(); return ip_route_output_slow(rp, flp); } @@ -2463,7 +2463,7 @@ int ip_rt_dump(struct sk_buff *skb, str if (h < s_h) continue; if (h > s_h) s_idx = 0; - rcu_read_lock(); + rcu_read_lock_bh(); for (rt = rt_hash_table[h].chain, idx = 0; rt; rt = rt->u.rt_next, idx++) { smp_read_barrier_depends(); @@ -2474,12 +2474,12 @@ int ip_rt_dump(struct sk_buff *skb, str cb->nlh->nlmsg_seq, RTM_NEWROUTE, 1) <= 0) { dst_release(xchg(&skb->dst, NULL)); - rcu_read_unlock(); + rcu_read_unlock_bh(); goto done; } dst_release(xchg(&skb->dst, NULL)); } - rcu_read_unlock(); + rcu_read_unlock_bh(); } done: _ From dipankar@in.ibm.com Fri Aug 6 12:24:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 12:24:11 -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 i76JO5F1022268 for ; Fri, 6 Aug 2004 12:24:05 -0700 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e5.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i76JNfjw627784; Fri, 6 Aug 2004 15:23:41 -0400 Received: from soprano.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay04.pok.ibm.com (8.12.10/NCO/VER6.6) with SMTP id i76JObti090924; Fri, 6 Aug 2004 15:24:40 -0400 Received: by soprano.in.ibm.com (Postfix, from userid 500) id D2E667C7CB; Sun, 8 Aug 2004 00:51:39 +0530 (IST) Date: Sun, 8 Aug 2004 00:51:39 +0530 From: Dipankar Sarma To: Andrew Morton Cc: Rusty Russell , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Robert Olsson , netdev@oss.sgi.com Subject: Re: RCU : Document RCU api [4/5] Message-ID: <20040807192139.GE3936@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040807191536.GA3936@in.ibm.com> <20040807191729.GB3936@in.ibm.com> <20040807191841.GC3936@in.ibm.com> <20040807192023.GD3936@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040807192023.GD3936@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 7544 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dipankar@in.ibm.com Precedence: bulk X-list: netdev Patch from Paul for additional documentation of api. Thanks Dipankar Updated based on feedback, and to apply to 2.6.8-rc3. I will be adding more detailed documentation to the Documentation directory in a separate patch. Signed-off-by: Paul McKenney include/linux/rcupdate.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++- kernel/rcupdate.c | 39 +++++++++++++++++----------- 2 files changed, 88 insertions(+), 16 deletions(-) diff -puN include/linux/rcupdate.h~rcu-api-doc include/linux/rcupdate.h --- linux-2.6.8-rc3-mm1/include/linux/rcupdate.h~rcu-api-doc 2004-08-07 15:29:49.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/include/linux/rcupdate.h 2004-08-07 15:29:49.000000000 +0530 @@ -154,11 +154,74 @@ static inline int rcu_pending(int cpu) __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); } +/** + * rcu_read_lock - mark the beginning of an RCU read-side critical section. + * + * When synchronize_kernel() is invoked on one CPU while other CPUs + * are within RCU read-side critical sections, then the + * synchronize_kernel() is guaranteed to block until after all the other + * CPUs exit their critical sections. Similarly, if call_rcu() is invoked + * on one CPU while other CPUs are within RCU read-side critical + * sections, invocation of the corresponding RCU callback is deferred + * until after the all the other CPUs exit their critical sections. + * + * Note, however, that RCU callbacks are permitted to run concurrently + * with RCU read-side critical sections. One way that this can happen + * is via the following sequence of events: (1) CPU 0 enters an RCU + * read-side critical section, (2) CPU 1 invokes call_rcu() to register + * an RCU callback, (3) CPU 0 exits the RCU read-side critical section, + * (4) CPU 2 enters a RCU read-side critical section, (5) the RCU + * callback is invoked. This is legal, because the RCU read-side critical + * section that was running concurrently with the call_rcu() (and which + * therefore might be referencing something that the corresponding RCU + * callback would free up) has completed before the corresponding + * RCU callback is invoked. + * + * RCU read-side critical sections may be nested. Any deferred actions + * will be deferred until the outermost RCU read-side critical section + * completes. + * + * It is illegal to block while in an RCU read-side critical section. + */ #define rcu_read_lock() preempt_disable() + +/** + * rcu_read_unlock - marks the end of an RCU read-side critical section. + * + * See rcu_read_lock() for more information. + */ #define rcu_read_unlock() preempt_enable() + +/* + * So where is rcu_write_lock()? It does not exist, as there is no + * way for writers to lock out RCU readers. This is a feature, not + * a bug -- this property is what provides RCU's performance benefits. + * Of course, writers must coordinate with each other. The normal + * spinlock primitives work well for this, but any other technique may be + * used as well. RCU does not care how the writers keep out of each + * others' way, as long as they do so. + */ + +/** + * rcu_read_lock_bh - mark the beginning of a softirq-only RCU critical section + * + * This is equivalent of rcu_read_lock(), but to be used when updates + * are being done using call_rcu_bh(). Since call_rcu_bh() callbacks + * consider completion of a softirq handler to be a quiescent state, + * a process in RCU read-side critical section must be protected by + * disabling softirqs. Read-side critical sections in interrupt context + * can use just rcu_read_lock(). + * + */ #define rcu_read_lock_bh() local_bh_disable() -#define rcu_read_unlock_bh() local_bh_enable() +/* + * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section + * + * See rcu_read_lock_bh() for more information. + */ +#define rcu_read_unlock_bh() local_bh_enable() + extern void rcu_init(void); extern void rcu_check_callbacks(int cpu, int user); extern void rcu_restart_cpu(int cpu); diff -puN kernel/rcupdate.c~rcu-api-doc kernel/rcupdate.c --- linux-2.6.8-rc3-mm1/kernel/rcupdate.c~rcu-api-doc 2004-08-07 15:29:49.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/kernel/rcupdate.c 2004-08-07 15:29:49.000000000 +0530 @@ -73,14 +73,15 @@ static DEFINE_PER_CPU(struct tasklet_str static int maxbatch = 10; /** - * call_rcu - Queue an RCU update request. + * call_rcu - Queue an RCU callback for invocation after a grace period. * @head: structure to be used for queueing the RCU updates. * @func: actual update function to be invoked after the grace period * - * The update function will be invoked as soon as all CPUs have performed - * a context switch or been seen in the idle loop or in a user process. - * The read-side of critical section that use call_rcu() for updation must - * be protected by rcu_read_lock()/rcu_read_unlock(). + * The update function will be invoked some time after a full grace + * period elapses, in other words after all currently executing RCU + * read-side critical sections have completed. RCU read-side critical + * sections are delimited by rcu_read_lock() and rcu_read_unlock(), + * and may be nested. */ void fastcall call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) @@ -98,17 +99,20 @@ void fastcall call_rcu(struct rcu_head * } /** - * call_rcu_bh - Queue an RCU update request for which softirq handler - * completion is a quiescent state. + * call_rcu_bh - Queue an RCU for invocation after a quicker grace period. * @head: structure to be used for queueing the RCU updates. * @func: actual update function to be invoked after the grace period * - * The update function will be invoked as soon as all CPUs have performed - * a context switch or been seen in the idle loop or in a user process - * or has exited a softirq handler that it may have been executing. - * The read-side of critical section that use call_rcu_bh() for updation must - * be protected by rcu_read_lock_bh()/rcu_read_unlock_bh() if it is - * in process context. + * The update function will be invoked some time after a full grace + * period elapses, in other words after all currently executing RCU + * read-side critical sections have completed. call_rcu_bh() assumes + * that the read-side critical sections end on completion of a softirq + * handler. This means that read-side critical sections in process + * context must not be interrupted by softirqs. This interface is to be + * used when most of the read-side critical sections are in softirq context. + * RCU read-side critical sections are delimited by rcu_read_lock() and + * rcu_read_unlock(), * if in interrupt context or rcu_read_lock_bh() + * and rcu_read_unlock_bh(), if in process context. These may be nested. */ void fastcall call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) @@ -439,8 +443,13 @@ static void wakeme_after_rcu(struct rcu_ } /** - * synchronize-kernel - wait until all the CPUs have gone - * through a "quiescent" state. It may sleep. + * synchronize_kernel - wait until a grace period has elapsed. + * + * Control will return to the caller some time after a full grace + * period has elapsed, in other words after all currently executing RCU + * read-side critical sections have completed. RCU read-side critical + * sections are delimited by rcu_read_lock() and rcu_read_unlock(), + * and may be nested. */ void synchronize_kernel(void) { _ From dipankar@in.ibm.com Fri Aug 6 12:32:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 12:32:37 -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 i76JWTJO023146 for ; Fri, 6 Aug 2004 12:32:30 -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 i76JW4dn380718; Fri, 6 Aug 2004 15:32:04 -0400 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with SMTP id i76JVs2Q188294; Fri, 6 Aug 2004 13:31:57 -0600 Received: by soprano.in.ibm.com (Postfix, from userid 500) id F32A07C7CB; Sun, 8 Aug 2004 00:54:24 +0530 (IST) Date: Sun, 8 Aug 2004 00:54:24 +0530 From: Dipankar Sarma To: Andrew Morton Cc: Rusty Russell , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Robert Olsson , netdev@oss.sgi.com Subject: Re: RCU : Abstracted RCU dereferencing [5/5] Message-ID: <20040807192424.GF3936@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040807191536.GA3936@in.ibm.com> <20040807191729.GB3936@in.ibm.com> <20040807191841.GC3936@in.ibm.com> <20040807192023.GD3936@in.ibm.com> <20040807192139.GE3936@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040807192139.GE3936@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 7545 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dipankar@in.ibm.com Precedence: bulk X-list: netdev Use abstracted RCU API to dereference RCU protected data. Hides barrier details. Patch from Paul McKenney. Thanks Dipankar This patch introduced an rcu_dereference() macro that replaces most uses of smp_read_barrier_depends(). The new macro has the advantage of explicitly documenting which pointers are protected by RCU -- in contrast, it is sometimes difficult to figure out which pointer is being protected by a given smp_read_barrier_depends() call. Signed-off-by: Paul McKenney arch/x86_64/kernel/mce.c | 8 +++----- fs/dcache.c | 10 ++++------ include/linux/list.h | 27 ++++++++++++++------------- include/linux/rcupdate.h | 16 ++++++++++++++++ ipc/util.c | 11 +++++------ net/bridge/br_input.c | 3 +-- net/core/dev.c | 3 +-- net/core/netfilter.c | 3 +-- net/decnet/dn_route.c | 17 ++++++++--------- net/ipv4/icmp.c | 3 +-- net/ipv4/ip_input.c | 3 +-- net/ipv4/route.c | 24 ++++++++++-------------- net/ipv6/icmp.c | 3 +-- net/ipv6/ip6_input.c | 3 +-- 14 files changed, 67 insertions(+), 67 deletions(-) diff -puN arch/x86_64/kernel/mce.c~rcu-use-deref-macro arch/x86_64/kernel/mce.c --- linux-2.6.8-rc3-mm1/arch/x86_64/kernel/mce.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/arch/x86_64/kernel/mce.c 2004-08-07 15:30:07.000000000 +0530 @@ -49,8 +49,7 @@ static void mce_log(struct mce *mce) mce->finished = 0; smp_wmb(); for (;;) { - entry = mcelog.next; - read_barrier_depends(); + entry = rcu_dereference(mcelog.next); /* When the buffer fills up discard new entries. Assume that the earlier errors are the more interesting. */ if (entry >= MCE_LOG_LEN) { @@ -340,9 +339,8 @@ static ssize_t mce_read(struct file *fil int i, err; down(&mce_read_sem); - next = mcelog.next; - read_barrier_depends(); - + next = rcu_dereference(mcelog.next); + /* Only supports full reads right now */ if (*off != 0 || usize < MCE_LOG_LEN*sizeof(struct mce)) { up(&mce_read_sem); diff -puN fs/dcache.c~rcu-use-deref-macro fs/dcache.c --- linux-2.6.8-rc3-mm1/fs/dcache.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/fs/dcache.c 2004-08-07 15:30:07.000000000 +0530 @@ -620,7 +620,7 @@ void shrink_dcache_parent(struct dentry * * Prune the dentries that are anonymous * - * parsing d_hash list does not read_barrier_depends() as it + * parsing d_hash list does not hlist_for_each_rcu() as it * done under dcache_lock. * */ @@ -977,11 +977,10 @@ struct dentry * __d_lookup(struct dentry rcu_read_lock(); - hlist_for_each (node, head) { + hlist_for_each_rcu(node, head) { struct dentry *dentry; struct qstr *qstr; - smp_read_barrier_depends(); dentry = hlist_entry(node, struct dentry, d_hash); smp_rmb(); @@ -1008,8 +1007,7 @@ struct dentry * __d_lookup(struct dentry if (dentry->d_parent != parent) goto next; - qstr = &dentry->d_name; - smp_read_barrier_depends(); + qstr = rcu_dereference(&dentry->d_name); if (parent->d_op && parent->d_op->d_compare) { if (parent->d_op->d_compare(parent, qstr, name)) goto next; @@ -1062,7 +1060,7 @@ int d_validate(struct dentry *dentry, st spin_lock(&dcache_lock); base = d_hash(dparent, dentry->d_name.hash); hlist_for_each(lhp,base) { - /* read_barrier_depends() not required for d_hash list + /* hlist_for_each_rcu() not required for d_hash list * as it is parsed under dcache_lock */ if (dentry == hlist_entry(lhp, struct dentry, d_hash)) { diff -puN include/linux/list.h~rcu-use-deref-macro include/linux/list.h --- linux-2.6.8-rc3-mm1/include/linux/list.h~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/include/linux/list.h 2004-08-07 16:36:41.000000000 +0530 @@ -423,11 +423,11 @@ static inline void list_splice_init(stru */ #define list_for_each_rcu(pos, head) \ for (pos = (head)->next, prefetch(pos->next); pos != (head); \ - pos = pos->next, ({ smp_read_barrier_depends(); 0;}), prefetch(pos->next)) + pos = rcu_dereference(pos->next), prefetch(pos->next)) #define __list_for_each_rcu(pos, head) \ for (pos = (head)->next; pos != (head); \ - pos = pos->next, ({ smp_read_barrier_depends(); 0;})) + pos = rcu_dereference(pos->next)) /** * list_for_each_safe_rcu - iterate over an rcu-protected list safe @@ -442,7 +442,7 @@ static inline void list_splice_init(stru */ #define list_for_each_safe_rcu(pos, n, head) \ for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, ({ smp_read_barrier_depends(); 0;}), n = pos->next) + pos = rcu_dereference(n), n = pos->next) /** * list_for_each_entry_rcu - iterate over rcu list of given type @@ -458,8 +458,8 @@ static inline void list_splice_init(stru for (pos = list_entry((head)->next, typeof(*pos), member), \ prefetch(pos->member.next); \ &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member), \ - ({ smp_read_barrier_depends(); 0;}), \ + pos = rcu_dereference(list_entry(pos->member.next, \ + typeof(*pos), member)), \ prefetch(pos->member.next)) @@ -475,7 +475,7 @@ static inline void list_splice_init(stru */ #define list_for_each_continue_rcu(pos, head) \ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \ - (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next)) + (pos) = rcu_dereference((pos)->next), prefetch((pos)->next)) /* * Double linked lists with a single pointer list head. @@ -581,12 +581,9 @@ static inline void hlist_add_head(struct * or hlist_del_rcu(), running on this same list. * However, it is perfectly legal to run concurrently with * the _rcu list-traversal primitives, such as - * hlist_for_each_entry(), but only if smp_read_barrier_depends() - * is used to prevent memory-consistency problems on Alpha CPUs. - * Regardless of the type of CPU, the list-traversal primitive - * must be guarded by rcu_read_lock(). - * - * OK, so why don't we have an hlist_for_each_entry_rcu()??? + * hlist_for_each_rcu(), used to prevent memory-consistency + * problems on Alpha CPUs. Regardless of the type of CPU, the + * list-traversal primitive must be guarded by rcu_read_lock(). */ static inline void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h) @@ -631,6 +628,10 @@ static inline void hlist_add_after(struc for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \ pos = n) +#define hlist_for_each_rcu(pos, head) \ + for ((pos) = (head)->first; pos && ({ prefetch((pos)->next); 1; }); \ + (pos) = rcu_dereference((pos)->next)) + /** * hlist_for_each_entry - iterate over list of given type * @tpos: the type * to use as a loop counter. @@ -696,7 +697,7 @@ static inline void hlist_add_after(struc for (pos = (head)->first; \ pos && ({ prefetch(pos->next); 1;}) && \ ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos = pos->next, ({ smp_read_barrier_depends(); 0; }) ) + pos = rcu_dereference(pos->next)) #else #warning "don't include kernel headers in userspace" diff -puN include/linux/rcupdate.h~rcu-use-deref-macro include/linux/rcupdate.h --- linux-2.6.8-rc3-mm1/include/linux/rcupdate.h~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/include/linux/rcupdate.h 2004-08-07 15:30:07.000000000 +0530 @@ -221,6 +221,22 @@ static inline int rcu_pending(int cpu) * See rcu_read_lock_bh() for more information. */ #define rcu_read_unlock_bh() local_bh_enable() + +/** + * rcu_dereference - fetch an RCU-protected pointer in an + * RCU read-side critical section. This pointer may later + * be safely dereferenced. + * + * Inserts memory barriers on architectures that require them + * (currently only the Alpha), and, more importantly, documents + * exactly which pointers are protected by RCU. + */ + +#define rcu_dereference(p) ({ \ + typeof(p) _________p1 = p; \ + smp_read_barrier_depends(); \ + (_________p1); \ + }) extern void rcu_init(void); extern void rcu_check_callbacks(int cpu, int user); diff -puN ipc/util.c~rcu-use-deref-macro ipc/util.c --- linux-2.6.8-rc3-mm1/ipc/util.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/ipc/util.c 2004-08-07 15:30:07.000000000 +0530 @@ -100,7 +100,7 @@ int ipc_findkey(struct ipc_ids* ids, key int max_id = ids->max_id; /* - * read_barrier_depends is not needed here + * rcu_dereference() is not needed here * since ipc_ids.sem is held */ for (id = 0; id <= max_id; id++) { @@ -171,7 +171,7 @@ int ipc_addid(struct ipc_ids* ids, struc size = grow_ary(ids,size); /* - * read_barrier_depends() is not needed here since + * rcu_dereference()() is not needed here since * ipc_ids.sem is held */ for (id = 0; id < size; id++) { @@ -220,7 +220,7 @@ struct kern_ipc_perm* ipc_rmid(struct ip BUG(); /* - * do not need a read_barrier_depends() here to force ordering + * do not need a rcu_dereference()() here to force ordering * on Alpha, since the ipc_ids.sem is held. */ p = ids->entries[lid].p; @@ -515,13 +515,12 @@ struct kern_ipc_perm* ipc_lock(struct ip * Note: The following two read barriers are corresponding * to the two write barriers in grow_ary(). They guarantee * the writes are seen in the same order on the read side. - * smp_rmb() has effect on all CPUs. read_barrier_depends() + * smp_rmb() has effect on all CPUs. rcu_dereference() * is used if there are data dependency between two reads, and * has effect only on Alpha. */ smp_rmb(); /* prevent indexing old array with new size */ - entries = ids->entries; - read_barrier_depends(); /*prevent seeing new array unitialized */ + entries = rcu_dereference(ids->entries); out = entries[lid].p; if(out == NULL) { rcu_read_unlock(); diff -puN net/bridge/br_input.c~rcu-use-deref-macro net/bridge/br_input.c --- linux-2.6.8-rc3-mm1/net/bridge/br_input.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/bridge/br_input.c 2004-08-07 15:30:07.000000000 +0530 @@ -56,8 +56,7 @@ int br_handle_frame_finish(struct sk_buf dest = skb->mac.ethernet->h_dest; rcu_read_lock(); - p = skb->dev->br_port; - smp_read_barrier_depends(); + p = rcu_dereference(skb->dev->br_port); if (p == NULL || p->state == BR_STATE_DISABLED) { kfree_skb(skb); diff -puN net/core/dev.c~rcu-use-deref-macro net/core/dev.c --- linux-2.6.8-rc3-mm1/net/core/dev.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/core/dev.c 2004-08-07 15:30:07.000000000 +0530 @@ -1332,8 +1332,7 @@ int dev_queue_xmit(struct sk_buff *skb) * also serializes access to the device queue. */ - q = dev->qdisc; - smp_read_barrier_depends(); + q = rcu_dereference(dev->qdisc); #ifdef CONFIG_NET_CLS_ACT skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS); #endif diff -puN net/core/netfilter.c~rcu-use-deref-macro net/core/netfilter.c --- linux-2.6.8-rc3-mm1/net/core/netfilter.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/core/netfilter.c 2004-08-07 15:30:07.000000000 +0530 @@ -783,13 +783,12 @@ void nf_log_packet(int pf, nf_logfn *logfn; rcu_read_lock(); - logfn = nf_logging[pf]; + logfn = rcu_dereference(nf_logging[pf]); if (logfn) { va_start(args, fmt); vsnprintf(prefix, sizeof(prefix), fmt, args); va_end(args); /* We must read logging before nf_logfn[pf] */ - smp_read_barrier_depends(); logfn(hooknum, skb, in, out, prefix); } else if (!reported) { printk(KERN_WARNING "nf_log_packet: can\'t log yet, " diff -puN net/decnet/dn_route.c~rcu-use-deref-macro net/decnet/dn_route.c --- linux-2.6.8-rc3-mm1/net/decnet/dn_route.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/decnet/dn_route.c 2004-08-07 15:30:07.000000000 +0530 @@ -1,4 +1,3 @@ - /* * DECnet An implementation of the DECnet protocol suite for the LINUX * operating system. DECnet is implemented using the BSD Socket @@ -1175,8 +1174,8 @@ static int __dn_route_output_key(struct if (!(flags & MSG_TRYHARD)) { rcu_read_lock_bh(); - for(rt = dn_rt_hash_table[hash].chain; rt; rt = rt->u.rt_next) { - smp_read_barrier_depends(); + for(rt = rcu_dereference(dn_rt_hash_table[hash].chain); rt; + rt = rcu_dereference(rt->u.rt_next)) { if ((flp->fld_dst == rt->fl.fld_dst) && (flp->fld_src == rt->fl.fld_src) && #ifdef CONFIG_DECNET_ROUTE_FWMARK @@ -1454,8 +1453,8 @@ int dn_route_input(struct sk_buff *skb) return 0; rcu_read_lock(); - for(rt = dn_rt_hash_table[hash].chain; rt != NULL; rt = rt->u.rt_next) { - read_barrier_depends(); + for(rt = rcu_dereference(dn_rt_hash_table[hash].chain); rt != NULL; + rt = rcu_dereference(rt->u.rt_next)) { if ((rt->fl.fld_src == cb->src) && (rt->fl.fld_dst == cb->dst) && (rt->fl.oif == 0) && @@ -1648,8 +1647,9 @@ int dn_cache_dump(struct sk_buff *skb, s if (h > s_h) s_idx = 0; rcu_read_lock_bh(); - for(rt = dn_rt_hash_table[h].chain, idx = 0; rt; rt = rt->u.rt_next, idx++) { - smp_read_barrier_depends(); + for(rt = rcu_dereference(dn_rt_hash_table[h].chain), idx = 0; + rt; + rt = rcu_dereference(rt->u.rt_next), idx++) { if (idx < s_idx) continue; skb->dst = dst_clone(&rt->u.dst); @@ -1692,9 +1692,8 @@ static struct dn_route *dn_rt_cache_get_ static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_route *rt) { - struct dn_rt_cache_iter_state *s = seq->private; + struct dn_rt_cache_iter_state *s = rcu_dereference(seq->private); - smp_read_barrier_depends(); rt = rt->u.rt_next; while(!rt) { rcu_read_unlock_bh(); diff -puN net/ipv4/icmp.c~rcu-use-deref-macro net/ipv4/icmp.c --- linux-2.6.8-rc3-mm1/net/ipv4/icmp.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/ipv4/icmp.c 2004-08-07 15:30:07.000000000 +0530 @@ -705,8 +705,7 @@ static void icmp_unreach(struct sk_buff read_unlock(&raw_v4_lock); rcu_read_lock(); - ipprot = inet_protos[hash]; - smp_read_barrier_depends(); + ipprot = rcu_dereference(inet_protos[hash]); if (ipprot && ipprot->err_handler) ipprot->err_handler(skb, info); rcu_read_unlock(); diff -puN net/ipv4/ip_input.c~rcu-use-deref-macro net/ipv4/ip_input.c --- linux-2.6.8-rc3-mm1/net/ipv4/ip_input.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/ipv4/ip_input.c 2004-08-07 15:30:07.000000000 +0530 @@ -231,10 +231,9 @@ static inline int ip_local_deliver_finis if (raw_sk) raw_v4_input(skb, skb->nh.iph, hash); - if ((ipprot = inet_protos[hash]) != NULL) { + if ((ipprot = rcu_dereference(inet_protos[hash])) != NULL) { int ret; - smp_read_barrier_depends(); if (!ipprot->no_policy && !xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { kfree_skb(skb); diff -puN net/ipv4/route.c~rcu-use-deref-macro net/ipv4/route.c --- linux-2.6.8-rc3-mm1/net/ipv4/route.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/ipv4/route.c 2004-08-07 15:30:07.000000000 +0530 @@ -237,9 +237,8 @@ static struct rtable *rt_cache_get_first static struct rtable *rt_cache_get_next(struct seq_file *seq, struct rtable *r) { - struct rt_cache_iter_state *st = seq->private; + struct rt_cache_iter_state *st = rcu_dereference(seq->private); - smp_read_barrier_depends(); r = r->u.rt_next; while (!r) { rcu_read_unlock_bh(); @@ -1004,10 +1003,9 @@ void ip_rt_redirect(u32 old_gw, u32 dadd rthp=&rt_hash_table[hash].chain; rcu_read_lock(); - while ((rth = *rthp) != NULL) { + while ((rth = rcu_dereference(*rthp)) != NULL) { struct rtable *rt; - smp_read_barrier_depends(); if (rth->fl.fl4_dst != daddr || rth->fl.fl4_src != skeys[i] || rth->fl.fl4_tos != tos || @@ -1259,9 +1257,8 @@ unsigned short ip_rt_frag_needed(struct unsigned hash = rt_hash_code(daddr, skeys[i], tos); rcu_read_lock(); - for (rth = rt_hash_table[hash].chain; rth; - rth = rth->u.rt_next) { - smp_read_barrier_depends(); + for (rth = rcu_dereference(rt_hash_table[hash].chain); rth; + rth = rcu_dereference(rth->u.rt_next)) { if (rth->fl.fl4_dst == daddr && rth->fl.fl4_src == skeys[i] && rth->rt_dst == daddr && @@ -1864,8 +1861,8 @@ int ip_route_input(struct sk_buff *skb, hash = rt_hash_code(daddr, saddr ^ (iif << 5), tos); rcu_read_lock(); - for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) { - smp_read_barrier_depends(); + for (rth = rcu_dereference(rt_hash_table[hash].chain); rth; + rth = rcu_dereference(rth->u.rt_next)) { if (rth->fl.fl4_dst == daddr && rth->fl.fl4_src == saddr && rth->fl.iif == iif && @@ -2232,8 +2229,8 @@ int __ip_route_output_key(struct rtable hash = rt_hash_code(flp->fl4_dst, flp->fl4_src ^ (flp->oif << 5), flp->fl4_tos); rcu_read_lock_bh(); - for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) { - smp_read_barrier_depends(); + for (rth = rcu_dereference(rt_hash_table[hash].chain); rth; + rth = rcu_dereference(rth->u.rt_next)) { if (rth->fl.fl4_dst == flp->fl4_dst && rth->fl.fl4_src == flp->fl4_src && rth->fl.iif == 0 && @@ -2464,9 +2461,8 @@ int ip_rt_dump(struct sk_buff *skb, str if (h > s_h) s_idx = 0; rcu_read_lock_bh(); - for (rt = rt_hash_table[h].chain, idx = 0; rt; - rt = rt->u.rt_next, idx++) { - smp_read_barrier_depends(); + for (rt = rcu_dereference(rt_hash_table[h].chain), idx = 0; rt; + rt = rcu_dereference(rt->u.rt_next), idx++) { if (idx < s_idx) continue; skb->dst = dst_clone(&rt->u.dst); diff -puN net/ipv6/icmp.c~rcu-use-deref-macro net/ipv6/icmp.c --- linux-2.6.8-rc3-mm1/net/ipv6/icmp.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/ipv6/icmp.c 2004-08-07 15:30:07.000000000 +0530 @@ -530,8 +530,7 @@ static void icmpv6_notify(struct sk_buff hash = nexthdr & (MAX_INET_PROTOS - 1); rcu_read_lock(); - ipprot = inet6_protos[hash]; - smp_read_barrier_depends(); + ipprot = rcu_dereference(inet6_protos[hash]); if (ipprot && ipprot->err_handler) ipprot->err_handler(skb, NULL, type, code, inner_offset, info); rcu_read_unlock(); diff -puN net/ipv6/ip6_input.c~rcu-use-deref-macro net/ipv6/ip6_input.c --- linux-2.6.8-rc3-mm1/net/ipv6/ip6_input.c~rcu-use-deref-macro 2004-08-07 15:30:07.000000000 +0530 +++ linux-2.6.8-rc3-mm1-dipankar/net/ipv6/ip6_input.c 2004-08-07 15:30:07.000000000 +0530 @@ -167,10 +167,9 @@ resubmit: ipv6_raw_deliver(skb, nexthdr); hash = nexthdr & (MAX_INET_PROTOS - 1); - if ((ipprot = inet6_protos[hash]) != NULL) { + if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { int ret; - smp_read_barrier_depends(); if (ipprot->flags & INET6_PROTO_FINAL) { struct ipv6hdr *hdr; _ From shemminger@osdl.org Fri Aug 6 14:39:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 14:40: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 i76LduUx001815 for ; Fri, 6 Aug 2004 14:39:56 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i76LdS131675; Fri, 6 Aug 2004 14:39:28 -0700 Date: Fri, 6 Aug 2004 14:39:28 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] vlan ioctl propagation (rev.2) Message-Id: <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> In-Reply-To: <20040806132145.675fd17d.davem@redhat.com> References: <20040806091305.4d405664@dell_ss3.pdx.osdl.net> <20040806132145.675fd17d.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7546 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 a redo of the patch to propagate ethtool and mii ioctl's on vlan's to the underlying real device. This time the request is copied to a new buffer, to avoid the colon name rewrite issues. Signed-off-by: Stephen Hemminger diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-08-06 11:09:08 -07:00 +++ b/net/8021q/vlan.c 2004-08-06 11:09:08 -07:00 @@ -358,6 +358,7 @@ new_dev->set_mac_address = vlan_dev_set_mac_address; new_dev->set_multicast_list = vlan_dev_set_multicast_list; new_dev->destructor = free_netdev; + new_dev->do_ioctl = vlan_dev_ioctl; } /* Attach a VLAN device to a mac address (ie Ethernet Card). diff -Nru a/net/8021q/vlan.h b/net/8021q/vlan.h --- a/net/8021q/vlan.h 2004-08-06 11:09:08 -07:00 +++ b/net/8021q/vlan.h 2004-08-06 11:09:08 -07:00 @@ -65,6 +65,7 @@ int vlan_dev_set_mac_address(struct net_device *dev, void* addr); int vlan_dev_open(struct net_device* dev); int vlan_dev_stop(struct net_device* dev); +int vlan_dev_ioctl(struct net_device* dev, struct ifreq *ifr, int cmd); 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); diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c --- a/net/8021q/vlan_dev.c 2004-08-06 11:09:08 -07:00 +++ b/net/8021q/vlan_dev.c 2004-08-06 11:09:08 -07:00 @@ -757,6 +757,34 @@ vlan_flush_mc_list(dev); return 0; } + +int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +{ + struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; + struct ifreq ifrr; + int err = -EOPNOTSUPP; + + strncpy(ifrr.ifr_name, real_dev->name, IFNAMSIZ); + ifrr.ifr_ifru = ifr->ifr_ifru; + + switch(cmd) { + case SIOCGMIIPHY: + case SIOCGMIIREG: + case SIOCSMIIREG: + if (real_dev->do_ioctl && netif_device_present(real_dev)) + err = real_dev->do_ioctl(dev, &ifrr, cmd); + break; + + case SIOCETHTOOL: + err = dev_ethtool(&ifrr); + } + + if (!err) + ifr->ifr_ifru = ifrr.ifr_ifru; + + return err; +} + /** Taken from Gleb + Lennert's VLAN code, and modified... */ void vlan_dev_set_multicast_list(struct net_device *vlan_dev) { From shemminger@osdl.org Fri Aug 6 15:25:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 15:25: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 i76MPhMB002626 for ; Fri, 6 Aug 2004 15:25:43 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i76MPW107809; Fri, 6 Aug 2004 15:25:32 -0700 Date: Fri, 6 Aug 2004 15:25:32 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH] eepro100 - module_param and cleanup Message-Id: <20040806152532.25cdebeb@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7547 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shemminger@osdl.org Precedence: bulk X-list: netdev Convert old eepro100 driver from MODULE_PARAM to module_param and get rid of old 2.2 compatibility ifdef Signed-off-by: Stephen Hemminger --- linux-2.6/drivers/net/eepro100.c 2004-08-06 15:05:16.445630112 -0700 +++ tcp-2.6/drivers/net/eepro100.c 2004-08-06 15:08:09.761282128 -0700 @@ -88,8 +88,8 @@ #define PKT_BUF_SZ 1536 #include -#include #include +#include #include #include @@ -131,17 +131,21 @@ MODULE_AUTHOR("Maintainer: Andrey V. Savochkin "); MODULE_DESCRIPTION("Intel i82557/i82558/i82559 PCI EtherExpressPro driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(congenb, "i"); -MODULE_PARM(txfifo, "i"); -MODULE_PARM(rxfifo, "i"); -MODULE_PARM(txdmacount, "i"); -MODULE_PARM(rxdmacount, "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(multicast_filter_limit, "i"); + +static int num_params; + +module_param(debug, int, 0); +module_param(congenb, int, 0); +module_param(txfifo, int, 0); +module_param(rxfifo, int, 0); +module_param(txdmacount, int, 0); +module_param(rxdmacount, int, 0); +module_param(rx_copybreak, int, 0); +module_param(max_interrupt_work, int, 0); +module_param(multicast_filter_limit, int, 0); +module_param_array(options, int, num_params, 0); +module_param_array(full_duplex, int, num_params, 0); + MODULE_PARM_DESC(debug, "debug level (0-6)"); MODULE_PARM_DESC(options, "Bits 0-3: transceiver type, bit 4: full duplex, bit 5: 100Mbps"); MODULE_PARM_DESC(full_duplex, "full duplex setting(s) (1)"); @@ -2447,22 +2451,6 @@ #endif /* CONFIG_PM */ }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,48) -static int pci_module_init(struct pci_driver *pdev) -{ - int rc; - - rc = pci_register_driver(pdev); - if (rc <= 0) { - printk(KERN_INFO "%s: No cards found, driver not installed.\n", - pdev->name); - pci_unregister_driver(pdev); - return -ENODEV; - } - return 0; -} -#endif - static int __init eepro100_init_module(void) { #ifdef MODULE From ramalhais@serrado.net Fri Aug 6 15:59:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 15:59:45 -0700 (PDT) Received: from asterix.uninova.pt (asterix.uninova.pt [193.137.127.65]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i76MxbZ8003673 for ; Fri, 6 Aug 2004 15:59:40 -0700 Received: (qmail 23805 invoked from network); 6 Aug 2004 22:59:30 -0000 Received: from d160156.lra.net.kpnqwest.pt (193.126.160.156) by asterix.uninova.pt with SMTP; 6 Aug 2004 22:59:30 -0000 Subject: wireless mailing list From: Pedro Ramalhais To: hostap@shmoo.com, netdev@oss.sgi.com, ipw2100-devel List Content-Type: text/plain Message-Id: <1091833167.2353.4.camel@rootix> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 06 Aug 2004 23:59:27 +0100 Content-Transfer-Encoding: 7bit X-archive-position: 7548 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ramalhais@serrado.net Precedence: bulk X-list: netdev Hi everybody! I know this has been asked before, but can someone please create a linux-wireless-dev mailing list (name is not very important). I think this would help with development of wireless drivers, API, etc in linux. Comments appreciated. -- Pedro Ramalhais From jt@bougret.hpl.hp.com Fri Aug 6 17:07:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 06 Aug 2004 17:07:19 -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 i7707CNp008614 for ; Fri, 6 Aug 2004 17:07:12 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id D0FE440022A; Fri, 6 Aug 2004 17:07:07 -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 RAA02589; Fri, 6 Aug 2004 17:08:43 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1BtEjr-0003b1-00; Fri, 06 Aug 2004 17:07:07 -0700 Date: Fri, 6 Aug 2004 17:07:07 -0700 To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: iproute2 and kernel headers Message-ID: <20040807000707.GB11761@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040805005019.GA11538@bougret.hpl.hp.com> <20040806093920.045b379e@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040806093920.045b379e@dell_ss3.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: 7549 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 On Fri, Aug 06, 2004 at 09:39:20AM -0700, Stephen Hemminger wrote: > On Wed, 4 Aug 2004 17:50:19 -0700 > Jean Tourrilhes wrote: > > > > Now, my sick brain would like to suggest a few other crazy > > solutions totally out of the box : > > > > 1) Get it right the first time, so no change is ever > > needed. If things are standardised (POSIX, IEEE), this can work, if > > you are called Linus, most likely, otherwise, good luck... > > The management API's are what seemed to get changed the most. > The only relevant standard's seem to be SNMP, but it doesn't match > the kernel API needs. And SNMP standardisation usually is late to the party. > > 2) Migrate all those kernel APIs to XML. XML is the future, > > you can validate the output, and you can add/remove nodes/attributes > > between versions without the full thing falling apart. And we already > > have a web server in the kernel. > > No, don't reinvent SOAP for kernel API's. I feel honored that you are taking my braindamage so seriously. Maybe I should have suggested to have a Lisp command line to configure the kernel (angle brackets or parenthesis, all the same to me). The beauty of XML is that you can use any gramar you want and still be compliant. Obviously, we have to define our own gramar, named LKXML : i386 StrongARM i386 StrongARM > > 3) Every time you need to change the API, migrate it to > > another delivery mechanism and create a totally different set of > > tools. If you were using ioctl, migrate to netlink. If you were using > > netlink, migrate to a pseudo filesystem. Obviously the holy grail is > > to make it a system call. Also, make sure to kill the old APIs and old > > tools, otherwise some other folks my continue to maintain it. > > Doesn't make sense unless the new interface is better. > Just use different ioctl's or message types. Hum... Every time I will change the data struct (add a field, change a field type), I will move to a new ioctl number. Maybe we want to migrate ioctl numbers from 32 bits to 64 bits to avoid quickly exhausting the ioctl space. > > 4) Distribute all those system utilities as part of the > > kernel, compile them as part of the kernel, and install them in a > > kernel specific directory. Basically, treat system utilities exactly > > the same way as kernel modules. > > That actually would go a long way toward solving the issue of > > distribution of system utils (where is module-init-tools ?) and push > > more people to implement their pet project in user space rather than > > in the kernel. > > Too old school, unix. It might have worked in the past, and we might > end up back there, but it ain't going to happen now. I pretty much test every kernel release, and every month I need to go in /lib/modules and remove obsolete modules directories to free some disk space. The idea of having a new version of ifconfig/iwconfig/iproute/cardmgr/... on my hard disk every time I upgrade my kernel doesn't appeal to me. Note : this is why I kill the wireless redirector stuff. > > I wish you a lot of luck exploring those issues, and if one of > > those long nights you have a Eureka moment, please share with us ;-) > > Have fun... > > You ignored the advantage of using simple string interfaces (a.l.a Plan 9) > or simple name:value pairs. Yep, you can do everything with strings, even introduces parsing bugs in the kernel (been there...). It's also fun dealing with fields that contain spaces or fancy character in them, fortunately it only happen when the API is specified by non-Unix standards. And there is so many formating of simple name:value pairs (with ':', '=' or ' ' as separator). By the way, as far as I am concerned, XML is just a fancy name:value pairs format with angle brackets (see above). Also, it depends if you care about kernel bloat. Maybe we should make kernel memory swapable. Note : I have some kernel APIs that are ASCII based. It's worth it because you don't need user tools at all. But unfortunately it's not always applicable, otherwise stuff like RtNetlink that don't require backward compatibility would have been designed ASCII based. > Also, it turns out that some simple things like > increasing the size of the structure or adding a new rtnetlink message type > are not too hard to deal with. Actually, reading a struct that increased in size will make your read buffer overflow if you are not careful. Note that this is the solution I adopted in the end, but as I say, you need to be careful. Note that with respect to your *original* problem (yeah, we are so slightly off-topic), if this is the case you only need to include the very latest version of the header, and don't really care what is the actual header in the kernel. Have fun... Jean From manfred@colorfullife.com Sat Aug 7 02:59:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 02:59:09 -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 i779x1Kg008407 for ; Sat, 7 Aug 2004 02:59:02 -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 i779wruG021032; Sat, 7 Aug 2004 11:58:54 +0200 Message-ID: <4114A873.7050007@colorfullife.com> Date: Sat, 07 Aug 2004 12:01:23 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Netdev CC: Tim Waugh Subject: [CFT, PATCH] media detection updates for 100 MBit nForce nics Content-Type: multipart/mixed; boundary="------------080406060307080703000902" X-archive-position: 7550 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 This is a multi-part message in MIME format. --------------080406060307080703000902 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, the media detection seems to be broken for the non-gige nForce nics: The driver doesn't receive interupts for link changes and thus a link change means a dead network interface. This is fatal, because the driver doesn't wait for autonegotiation completion in _probe() or _open(). The attached patch adds a periodic timer that polls the phy - that should fix the problem. Could you test it? I don't have an 100 MBit nForce board, my 250-Gb doesn't show the problem. Thanks, Manfred P.S.: The patch is against the 0.29 jumbo frame version I posted last week, but the rejects against stock 2.6.8-rc3-mm1 are trivial: just the changelog and the version number. You can ignore the merge errors. --------------080406060307080703000902 Content-Type: text/plain; name="patch-forcedeth-timer" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-forcedeth-timer" // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 8 // EXTRAVERSION =-rc3-mm1 --- 2.6/drivers/net/forcedeth.c 2004-08-07 11:52:47.563501472 +0200 +++ build-2.6/drivers/net/forcedeth.c 2004-08-07 11:40:34.000000000 +0200 @@ -77,6 +77,7 @@ * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe * 0.29: 28 Jul 2004: Add jumbo frame support. Add reset into nv_close, * previous code clobbered kfree'd memory. + * 0.30: 07 Aug 2004: Add backup timer for link change notification. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -88,7 +89,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 @@ -126,6 +127,7 @@ #define DEV_IRQMASK_1 0x0002 #define DEV_IRQMASK_2 0x0004 #define DEV_NEED_TIMERIRQ 0x0008 +#define DEV_NEED_LINKTIMER 0x0010 enum { NvRegIrqStatus = 0x000, @@ -373,6 +375,7 @@ struct ring_desc { #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 @@ -453,6 +456,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. */ @@ -1470,6 +1478,25 @@ set_speed: 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); + } + nv_start_rx(dev); + } else { + if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); + printk(KERN_INFO "%s: link down.\n", dev->name); + nv_stop_rx(dev); + } + } +} + static void nv_link_irq(struct net_device *dev) { u8 *base = get_hwbase(dev); @@ -1477,25 +1504,10 @@ static void nv_link_irq(struct net_devic miistat = readl(base + NvRegMIIStatus); writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - dprintk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); + dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat); - if (miistat & (NVREG_MIISTAT_LINKCHANGE)) { - 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); - } - nv_start_rx(dev); - } else { - if (netif_carrier_ok(dev)) { - netif_carrier_off(dev); - printk(KERN_INFO "%s: link down.\n", dev->name); - nv_stop_rx(dev); - } - } - } + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) + nv_linkchange(dev); dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); } @@ -1538,6 +1550,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); @@ -1907,6 +1925,14 @@ static int __devinit nv_probe(struct pci 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++) { @@ -2000,21 +2026,21 @@ static struct pci_device_id pci_tbl[] = .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 = 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, + .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, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, --------------080406060307080703000902-- From rmk+netdev=oss.sgi.com@arm.linux.org.uk Sat Aug 7 04:10:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 04:10:18 -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 i77BA13c010253 for ; Sat, 7 Aug 2004 04:10:02 -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.33) id 1BtP57-0000na-1y; Sat, 07 Aug 2004 12:09:45 +0100 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.33) id 1BtP56-0000tg-3l; Sat, 07 Aug 2004 12:09:44 +0100 Date: Sat, 7 Aug 2004 12:09:43 +0100 From: Russell King To: "David S. Miller" Cc: jgarzik@pobox.com, shemminger@osdl.org, netdev@oss.sgi.com, greg@kroah.com Subject: Re: [Fwd: pcmcia ether drivers can't be unloaded] Message-ID: <20040807120943.A2805@flint.arm.linux.org.uk> References: <41068BEF.7010200@pobox.com> <20040727233614.B30782@flint.arm.linux.org.uk> <20040727171929.17858c7b.davem@redhat.com> <20040728165024.A8475@flint.arm.linux.org.uk> <20040728085419.773c4d94.davem@redhat.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: <20040728085419.773c4d94.davem@redhat.com>; from davem@redhat.com on Wed, Jul 28, 2004 at 08:54:19AM -0700 X-archive-position: 7551 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk@arm.linux.org.uk Precedence: bulk X-list: netdev On Wed, Jul 28, 2004 at 08:54:19AM -0700, David S. Miller wrote: > On Wed, 28 Jul 2004 16:50:24 +0100 > Russell King wrote: > > > On Tue, Jul 27, 2004 at 05:19:29PM -0700, David S. Miller wrote: > > > I totally disagree. This is a bogus argument for two reasons: > > > > You may disagree, that is your option. However, facts are facts - > > this is how the PCMCIA layer currently works, and short of rewriting > > the whole damned thing it isn't going to change. Sorry. > > Stephen offered a solution, moving this stray refcount into a toplevel > pcmcia bus type object. We are not constrained by how the PCMCIA layer > currently works, just as we were not constrained a year ago by how the > generic network device handling worked when it was totally broken in > this area. We just fixed it instead of whining. Right, I now have sufficient time to investigate and provide a proper response. The reason PCMCIA modules _as a whole_ (ie, not limited to just PCMCIA network drivers) are not unloadable while in use is that: (1) the PCMCIA subsystem keeps references to structures inside the PCMCIA card driver module while the driver is bound (by the userspace daemon) to the PCMCIA card. (2) the userspace daemon, cardmgr, keeps track of which PCMCIA card driver modules are loaded, and loads and unloads them as necessary. Short of rearchitecting the way the PCMCIA userspace daemon works, I don't see an easy fix for this. Therefore, as I've already said, the current behaviour stands for 2.6. PCMCIA is _far_ too fragile to risk doing a rewrite to get the locking and structure refcounting rules correct overnight. -- 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 manfred@colorfullife.com Sat Aug 7 04:20:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 04:20:39 -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 i77BKQ9V013972 for ; Sat, 7 Aug 2004 04:20:27 -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 i77BKKuG021762 for ; Sat, 7 Aug 2004 13:20:21 +0200 Message-ID: <4114BB8A.3090205@colorfullife.com> Date: Sat, 07 Aug 2004 13:22:50 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Netdev Subject: [PATCH] rx checksum support for gige nForce ethernet Content-Type: multipart/mixed; boundary="------------080903090006010804060905" X-archive-position: 7552 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 This is a multi-part message in MIME format. --------------080903090006010804060905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, With help from nVidia I have added rx checksumming to the forcedeth driver. It's only supported by the gigabit version of the chipset. Please test it - it works for me. Depends on the previous patches to 2.6.8-rc3-mm1, but rejects against 2.6.8-rc3-mm1 should be trivial. -- Manfred --------------080903090006010804060905 Content-Type: text/plain; name="patch-forcedeth-rxcheck" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-forcedeth-rxcheck" // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 8 // EXTRAVERSION =-rc3-mm1 --- 2.6/drivers/net/forcedeth.c 2004-08-07 13:09:21.512115128 +0200 +++ build-2.6/drivers/net/forcedeth.c 2004-08-07 13:15:37.308985320 +0200 @@ -78,6 +78,7 @@ * 0.29: 28 Jul 2004: Add jumbo frame support. Add reset into nv_close, * previous code clobbered kfree'd memory. * 0.30: 07 Aug 2004: Add backup timer for link change notification. + * 0.31: 07 Aug 2004: rx checksum support * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -89,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.30" +#define FORCEDETH_VERSION "0.31" #define DRV_NAME "forcedeth" #include @@ -219,6 +220,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 @@ -315,6 +317,10 @@ struct ring_desc { #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) @@ -377,8 +383,15 @@ struct ring_desc { #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 @@ -1200,6 +1213,15 @@ static void nv_rx_process(struct net_dev 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]; --------------080903090006010804060905-- From hadi@cyberus.ca Sat Aug 7 07:04:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 07:05:05 -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 i77E4wYQ016906 for ; Sat, 7 Aug 2004 07:04:59 -0700 Received: from localhost ([208.2.156.2]) by lotus.znyx.com (Lotus Domino Release 5.0.11) with ESMTP id 2004080707045527:59333 ; Sat, 7 Aug 2004 07:04:55 -0700 Subject: Re: iproute2 and kernel headers From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: jt@hpl.hp.com, jt@bougret.hpl.hp.com, "David S. Miller" , netdev@oss.sgi.com, Mariusz Mazur In-Reply-To: <20040806093920.045b379e@dell_ss3.pdx.osdl.net> References: <20040805005019.GA11538@bougret.hpl.hp.com> <20040806093920.045b379e@dell_ss3.pdx.osdl.net> Organization: jamalopolis Message-Id: <1091847950.1800.6.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 07 Aug 2004 10:04:48 -0400 X-MIMETrack: Itemize by SMTP Server on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 08/07/2004 07:04:55 AM, Serialize by Router on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 08/07/2004 07:04:59 AM, Serialize complete at 08/07/2004 07:04:59 AM Content-Transfer-Encoding: 7bit Content-Type: text/plain X-archive-position: 7553 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-08-06 at 12:39, Stephen Hemminger wrote: > On Wed, 4 Aug 2004 17:50:19 -0700 > Jean Tourrilhes wrote: [..] > > This is when I introduced version number in the API. This > > allows the tools to verify that they use the same version of the API > > as the kernel, and complain if they are not with an explicit error > > message. Yes, this is useful. Unfortunately this gives you control only on your API. If for example someone fscks something you are using, such as the netlink header you are screwed. So for consistency versioning needs to exist everywhere. > > By the way, one of the consequence of versioning the API is > > that I tend to do most API changes in batches. The idea is that I want > > to minimise the number of API versions, because I have to test the > > tools and drivers with each of them, and I have finite time. There should really be no reason you have to change versions. It should be the last resort. You can use tricks like data structure augmentation and and new TLV types to go for a long time and still be backward (as well as forward) compatible. When you are no longer capable of doing these tricks, then it would make sense upping the version. There also should be rules for evolution reasons against having data structures which cross kernel/userspace from having things like lookatme[0] elements. > > 1) Get it right the first time, so no change is ever > > needed. If things are standardised (POSIX, IEEE), this can work, if > > you are called Linus, most likely, otherwise, good luck... > > The management API's are what seemed to get changed the most. > The only relevant standard's seem to be SNMP, but it doesn't match > the kernel API needs. I think we could establish certain rules that will make things live for a long period of time. Some which have been pointed to here already are: a) use TLVs b) When you really wanna transport new things, create new Types leaving old ones intact so older versions of tools dont break. c) Use data structure augmentation i.e add things at the end of a data structure. In combination with sizeof operations old tools should work while new ones can make use of new features. d) avoid like the plague things like lookatme[0] elements within a structure that gets transfered between kernel/userspace > > 2) Migrate all those kernel APIs to XML. XML is the future, > > you can validate the output, and you can add/remove nodes/attributes > > between versions without the full thing falling apart. And we already > > have a web server in the kernel. > > No, don't reinvent SOAP for kernel API's. We already have value=attribute in TLVs approach (which could be nested). Your userspace app should be able to use XML and use some DTD to translate into binary TLV repreasentations. > > 3) Every time you need to change the API, migrate it to > > another delivery mechanism and create a totally different set of > > tools. If you were using ioctl, migrate to netlink. If you were using > > netlink, migrate to a pseudo filesystem. Obviously the holy grail is > > to make it a system call. Also, make sure to kill the old APIs and old > > tools, otherwise some other folks my continue to maintain it. > > Doesn't make sense unless the new interface is better. > Just use different ioctl's or message types. Refer to the rules above. > > 4) Distribute all those system utilities as part of the > > kernel, compile them as part of the kernel, and install them in a > > kernel specific directory. Basically, treat system utilities exactly > > the same way as kernel modules. > > That actually would go a long way toward solving the issue of > > distribution of system utils (where is module-init-tools ?) and push > > more people to implement their pet project in user space rather than > > in the kernel. > > Too old school, unix. It might have worked in the past, and we might > end up back there, but it ain't going to happen now. My thought (i have proposed this a few times, probably not eloquently) is to build discovery. User space should be able to discover at runtime what the kernel can do. X for example does this in a stupid way: it attempts featuress and on failure it takes them off its list . My approach is to explicitly tell the kernel or ask the kernel "tell me what you can do" - this should bring up things like capabilities and revisions of different things in the kernel. User space should then adapt accordingly. > > I wish you a lot of luck exploring those issues, and if one of > > those long nights you have a Eureka moment, please share with us ;-) > > Have fun... > > You ignored the advantage of using simple string interfaces (a.l.a Plan 9) > or simple name:value pairs. Also, it turns out that some simple things like > increasing the size of the structure or adding a new rtnetlink message type > are not too hard to deal with. Perhaps we need to start accumulating the rules. Ive listed a few - some of which you list above. cheers, jamal From kaber@trash.net Sat Aug 7 11:41:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 11:42:03 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i77Ifv2x025464 for ; Sat, 7 Aug 2004 11:41:58 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 3B92119F33C; Sat, 7 Aug 2004 20:41:47 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 7251F3941F6; Sat, 7 Aug 2004 20:41:46 +0200 (CEST) Message-ID: <41152301.5090405@trash.net> Date: Sat, 07 Aug 2004 20:44:17 +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: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: Inaccuracies with SCH_CLK_CPU References: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> In-Reply-To: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> Content-Type: multipart/mixed; boundary="------------000302010802040806010405" X-archive-position: 7554 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 This is a multi-part message in MIME format. --------------000302010802040806010405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Stephen Hemminger wrote: >I noticed that the netem delay values are off if using >CONFIG_NET_SCH_CKL_CPU. For example, if the latency is set to 500ms > a ping reports the time as much less (343ms). > >Requested JIFFIES GETTIMEODAY CPU >0 .1 .1 .1 >1 2 2 1 >5 5 6 4 >10 10 11 7 >100 98 101 69 >500 489 500 343 >1000 976 1000 685 > >The 1ms value is affected by the clock granularity. Larger jiffie values >are inaccurate due to the optimization of using shift to do divide (ie 1024 > 1000). > >With CLK_CPU /proc/net/psched is: >000005d9 00000400 000f4240 000003e8 > > sch_netem's interface is in us, but it doesn't convert the values to psched_us. psched_us differ from us with CLK_CPU or CLK_JIFFIES for most values of HZ. This patch fixes the problem, but the best solution is to change the interface and pass the time values as psched_us from userspace, as done with rate-tables and I think CBQ. I should have done this for HFSC too, but unlike for sch_netem, I think it's too late to change the interface. Regards Patrick --------------000302010802040806010405 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/08/07 20:32:26+02:00 kaber@coreworks.de # [PKT_SCHED]: convert us values to psched_us in sch_netem # # Signed-off-by: Patrick McHardy # # net/sched/sch_netem.c # 2004/08/07 20:32:06+02:00 kaber@coreworks.de +23 -4 # [PKT_SCHED]: convert us values to psched_us in sch_netem # diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-07 20:40:30 +02:00 +++ b/net/sched/sch_netem.c 2004-08-07 20:40:30 +02:00 @@ -752,6 +752,25 @@ return ret; } +static inline u_int32_t us2psched_us(u_int32_t us) +{ + u64 t; + + t = ((u64)us * PSCHED_JIFFIE2US(HZ)); + t += 1000000 - 1; + do_div(t, 1000000); + return t; +} + +static inline u_int32_t psched_us2us(u_int32_t psched_us) +{ + u64 t; + + t = ((u64)psched_us * 1000000); + do_div(t, PSCHED_JIFFIE2US(HZ)); + return t; +} + static int netem_change(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = (struct netem_sched_data *)sch->data; @@ -778,8 +797,8 @@ if (child != &noop_qdisc) qdisc_destroy(child); - q->latency = qopt->latency; - q->jitter = qopt->jitter; + q->latency = us2psched_us(qopt->latency); + q->jitter = us2psched_us(qopt->jitter); q->limit = qopt->limit; q->gap = qopt->gap; q->loss = qopt->loss; @@ -821,8 +840,8 @@ unsigned char *b = skb->tail; struct tc_netem_qopt qopt; - qopt.latency = q->latency; - qopt.jitter = q->jitter; + qopt.latency = psched_us2us(q->latency); + qopt.jitter = psched_us2us(q->jitter); qopt.limit = sch->dev->tx_queue_len; qopt.loss = q->loss; qopt.gap = q->gap; --------------000302010802040806010405-- From hadi@cyberus.ca Sat Aug 7 11:54:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 11:55:01 -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 i77IsuW3025929 for ; Sat, 7 Aug 2004 11:54:57 -0700 Received: from localhost ([208.2.156.2]) by lotus.znyx.com (Lotus Domino Release 5.0.11) with ESMTP id 2004080711545553:59559 ; Sat, 7 Aug 2004 11:54:55 -0700 Subject: Re: Inaccuracies with SCH_CLK_CPU From: jamal Reply-To: hadi@cyberus.ca To: Patrick McHardy Cc: Stephen Hemminger , netdev@oss.sgi.com In-Reply-To: <41152301.5090405@trash.net> References: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> <41152301.5090405@trash.net> Organization: jamalopolis Message-Id: <1091904889.1041.21.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 07 Aug 2004 14:54:49 -0400 X-MIMETrack: Itemize by SMTP Server on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 08/07/2004 11:54:55 AM, Serialize by Router on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 08/07/2004 11:54:57 AM, Serialize complete at 08/07/2004 11:54:57 AM Content-Transfer-Encoding: 7bit Content-Type: text/plain X-archive-position: 7555 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-08-07 at 14:44, Patrick McHardy wrote: > sch_netem's interface is in us, but it doesn't convert the values to > psched_us. > psched_us differ from us with CLK_CPU or CLK_JIFFIES for most values of HZ. > This patch fixes the problem, but the best solution is to change the > interface and pass the time values as psched_us from userspace, as done with > rate-tables and I think CBQ. Nice catch Patrick. While you are doing that Stephen, can you also compute the probability tables in user space? This allows me to take advantage of the schem later on when i convert gact action which has randomness built in. > I should have done this for HFSC too, but unlike for > sch_netem, I think it's too late to change the interface. Maybe post 2.6? cheers, jamal From ahu@outpost.ds9a.nl Sat Aug 7 14:10:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 14:10:53 -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 i77LAi0D031571 for ; Sat, 7 Aug 2004 14:10:47 -0700 Received: by outpost.ds9a.nl (Postfix, from userid 1000) id D3CC04015; Sat, 7 Aug 2004 23:10:37 +0200 (CEST) Date: Sat, 7 Aug 2004 23:10:37 +0200 From: bert hubert To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan ioctl propagation (rev.2) Message-ID: <20040807211036.GA7970@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Stephen Hemminger , "David S. Miller" , netdev@oss.sgi.com References: <20040806091305.4d405664@dell_ss3.pdx.osdl.net> <20040806132145.675fd17d.davem@redhat.com> <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> User-Agent: Mutt/1.3.28i X-archive-position: 7556 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 On Fri, Aug 06, 2004 at 02:39:28PM -0700, Stephen Hemminger wrote: > Here is a redo of the patch to propagate ethtool and mii ioctl's > on vlan's to the underlying real device. This time the request > is copied to a new buffer, to avoid the colon name rewrite issues. Is this really what we want? We also don't make virtual IPs appear as real interfaces anymore. Virtual devices are just that - virtual. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From pp@ee.oulu.fi Sat Aug 7 15:40:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 15:40:36 -0700 (PDT) Received: from ee.oulu.fi (ee.oulu.fi [130.231.61.23]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i77MeUYP001336 for ; Sat, 7 Aug 2004 15:40:31 -0700 Received: from tk28.oulu.fi (tk28 [130.231.48.68]) by ee.oulu.fi (8.12.11/8.12.11) with ESMTP id i77MeOXZ013188; Sun, 8 Aug 2004 01:40:25 +0300 (EEST) Received: (from pp@localhost) by tk28.oulu.fi (8.13.0/8.13.0/Submit) id i77MeJUs025180; Sun, 8 Aug 2004 01:40:19 +0300 (EEST) Date: Sun, 8 Aug 2004 01:40:19 +0300 From: Pekka Pietikainen To: "David S. Miller" Cc: jgarzik@pobox.com, jolt@tuxbox.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support) Message-ID: <20040807224019.GA24817@ee.oulu.fi> References: <200407232335.37809.jolt@tuxbox.org> <20040726141128.GA5435@ee.oulu.fi> <20040804003108.GA10445@ee.oulu.fi> <20040803183919.2990d045.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20040803183919.2990d045.davem@redhat.com> User-Agent: Mutt/1.4.2i X-archive-position: 7558 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pp@ee.oulu.fi Precedence: bulk X-list: netdev Content-Length: 1154 Lines: 27 On Tue, Aug 03, 2004 at 06:39:19PM -0700, David S. Miller wrote: > Changing skb->data is not legal. Please implement this in > such a way that skb->data does not get modified. By modifying > skb->data you will break things such as packet sniffers and > netfilter, and that's just the tip of the iceberg. :-) > Haven't noticed any breakage (tm) but I'm just a x86 weenie :-) Current approach is: if(1 (just for testing ;) ) || 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); } Which also works (tm). Setting the skb to a special value seems a bit tricky as skb->len is used in b44_tx for that nop^H^H^Hpci_unmap_single. It looks to me as the right things when the code gets changed as above (even for archs where the unmapping is not a nop) get done, but I could easily be missing something. -- Pekka Pietikainen From davem@redhat.com Sat Aug 7 17:06:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 17:06: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 i780613d005931 for ; Sat, 7 Aug 2004 17:06:02 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7805te1022645; Sat, 7 Aug 2004 20:05:55 -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 i7805na31917; Sat, 7 Aug 2004 20:05:50 -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 i78053Iu001986; Sat, 7 Aug 2004 20:05:03 -0400 Date: Sat, 7 Aug 2004 17:05:03 -0700 From: "David S. Miller" To: Pekka Pietikainen Cc: jgarzik@pobox.com, jolt@tuxbox.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support) Message-Id: <20040807170503.3b05255a.davem@redhat.com> In-Reply-To: <20040807224019.GA24817@ee.oulu.fi> References: <200407232335.37809.jolt@tuxbox.org> <20040726141128.GA5435@ee.oulu.fi> <20040804003108.GA10445@ee.oulu.fi> <20040803183919.2990d045.davem@redhat.com> <20040807224019.GA24817@ee.oulu.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: 7559 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: 1123 Lines: 25 On Sun, 8 Aug 2004 01:40:19 +0300 Pekka Pietikainen wrote: > On Tue, Aug 03, 2004 at 06:39:19PM -0700, David S. Miller wrote: > > Changing skb->data is not legal. Please implement this in > > such a way that skb->data does not get modified. By modifying > > skb->data you will break things such as packet sniffers and > > netfilter, and that's just the tip of the iceberg. :-) > > > Haven't noticed any breakage (tm) but I'm just a x86 weenie :-) Not an x86 specific problem :-) Just run tcpdump in a shell when one of these TX bounce cases happen, your skb->data modification could will make tcpdump see a corrupt packet. > Current approach is: > > if(1 (just for testing ;) ) || 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); > } This looks a bit better. From ramalhais@serrado.net Sat Aug 7 18:36:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 18:36:55 -0700 (PDT) Received: from asterix.uninova.pt (asterix.uninova.pt [193.137.127.65]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i781anbK007700 for ; Sat, 7 Aug 2004 18:36:50 -0700 Received: (qmail 25871 invoked from network); 8 Aug 2004 01:36:44 -0000 Received: from d160033.lra.net.kpnqwest.pt (193.126.160.33) by asterix.uninova.pt with SMTP; 8 Aug 2004 01:36:44 -0000 Subject: Wireless Extensions WE-18 questions From: Pedro Ramalhais To: Jouni Malinen Cc: hostap@shmoo.com, jt@hpl.hp.com, netdev@oss.sgi.com In-Reply-To: <20040803070843.GB7153@jm.kir.nu> References: <1091444633.2767.8.camel@rootix> <20040803070843.GB7153@jm.kir.nu> Content-Type: text/plain Message-Id: <1091929000.2800.12.camel@rootix> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 08 Aug 2004 02:36:40 +0100 Content-Transfer-Encoding: 7bit X-archive-position: 7560 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ramalhais@serrado.net Precedence: bulk X-list: netdev Content-Length: 1634 Lines: 36 Hi Jouni! Since you're the author of the WE-18 patch proposal i have a few questions about it: - what kind of information should be used in set_genie/get_genie requests? I know it's a pointer, but what is the information it points to? ipw2100 firmware expects: capabilities, listening interval, current_ap, var_ie_len and var_ie for setting IEs. - How should IW_AUTH_CIPHER_PAIRWISE and IW_AUTH_CIPHER_GROUP be used with crypt_tkip/crypt_ccmp ? This one is more oriented to the design of the wireless extensions and should probably go to Jean Tourrilhes: - the switch/case logic (for set_auth/get_auth at least) should really be in the wireless extensions. The driver should only need to set function pointers to the required actions, otherwise, every driver will have to code the whole logic around the multiplexing of the IOCTL, requiring more work amongst drivers, and the code will get less readable. Maybe this could be done also to the rest of the wireless extensions. I simply cannot understand the reason why the IOCTL interface is exposed to the driver. The driver shouldn't even know that some functionality is being called from an IOCTL. From the wireless extensions point of view the driver should only provide the methods to do certain tasks, not the logics around the passing of information from userspace(ex: wireless tools) to kernel space(wireless extensions) this just duplicates driver work. Thanks! PS: I was hoping someone had already answer my e-mail about the creation of a linux wireless mailing list, and this message would be sent to the new list... oh well -- Pedro Ramalhais From fernando@gont.com.ar Sat Aug 7 19:50:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 19:50:42 -0700 (PDT) Received: from libertad.frh.utn.edu.ar ([170.210.17.130]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i782oYhS008975 for ; Sat, 7 Aug 2004 19:50:35 -0700 Received: from fernando.gont.com.ar ([200.68.222.15]) by libertad.frh.utn.edu.ar (8.9.3/8.8.7) with ESMTP id AAA19038; Sun, 8 Aug 2004 00:18:34 -0400 Message-Id: <4.3.2.7.2.20040807232436.00d6da60@pop.gmx.net> X-Sender: fgont@mail.daleclick.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Sat, 07 Aug 2004 23:25:13 -0300 To: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= , mtk-lists@gmx.net From: Fernando Gont Subject: Re: SO_REUSEADDR behavior different from BSD Cc: ahu@ds9a.nl, netdev@oss.sgi.com In-Reply-To: <20040805.113437.91348248.yoshfuji@wide.ad.jp> References: <19686.1091723777@www48.gmx.net> <20040805141444.GA2292@outpost.ds9a.nl> <19686.1091723777@www48.gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-archive-position: 7561 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: fernando@gont.com.ar Precedence: bulk X-list: netdev Content-Length: 545 Lines: 20 At 11:34 05/08/2004 -0700, YOSHIFUJI Hideaki wrote: > > Now, on Linux, at this point, the second instance of the > > server fails with EADDRINUSE, even though it did use > > SO_REUSEADDR. On FreeBSD 5.1, the second server instance > > does successfully bind. > >This behavior is intended. >First socket is REQUIRED to set SO_REUSEADDR >I hate BSD's behavior because it is asynmetry. >(Both sockets are required to agree on "REUSEADDR.") Not sure what you mean by "asymetry". -- Fernando Gont e-mail: fernando@gont.com.ar || fgont@acm.org From glen.turner@aarnet.edu.au Sat Aug 7 21:40:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 07 Aug 2004 21:40:34 -0700 (PDT) Received: from clix.aarnet.edu.au ([192.94.63.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i784eQuE014271 for ; Sat, 7 Aug 2004 21:40:27 -0700 Received: from [150.101.246.230] (eth8935.sa.adsl.internode.on.net [150.101.246.230]) (authenticated bits=0) by clix.aarnet.edu.au (8.12.8/8.12.8) with ESMTP id i784ccWn024314 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 8 Aug 2004 14:38:39 +1000 Message-ID: <4115AE4C.2060608@aarnet.edu.au> Date: Sun, 08 Aug 2004 14:08:36 +0930 From: Glen Turner Organization: Australian Academic and Research Network User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: bert hubert CC: Stephen Hemminger , "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan ioctl propagation (rev.2) References: <20040806091305.4d405664@dell_ss3.pdx.osdl.net> <20040806132145.675fd17d.davem@redhat.com> <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> <20040807211036.GA7970@outpost.ds9a.nl> In-Reply-To: <20040807211036.GA7970@outpost.ds9a.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MDSA: Yes X-Scanned-By: MIMEDefang 2.39 X-archive-position: 7562 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: glen.turner@aarnet.edu.au Precedence: bulk X-list: netdev Content-Length: 1012 Lines: 30 bert hubert wrote: > On Fri, Aug 06, 2004 at 02:39:28PM -0700, Stephen Hemminger wrote: > >>Here is a redo of the patch to propagate ethtool and mii ioctl's >>on vlan's to the underlying real device. This time the request >>is copied to a new buffer, to avoid the colon name rewrite issues. > > > Is this really what we want? We also don't make virtual IPs appear as real > interfaces anymore. Virtual devices are just that - virtual. Hi Bert, Please don't be so absolute. For example, if the virtual device "link" status doesn't reflect that of the real device then routing software needs to parse the virtual->real device mappings (a parsing for which Linux provides only limited support). Worse still, we now need to special-case virtual interfaces in application code: while (virtual_interface(interface_name)) { virtual_to_real(interface_name, &interface_name); } This is the sort of nasty detail than operating systems are meant to abstract away from application code. Thanks, Glen From pp@ee.oulu.fi Sun Aug 8 02:31:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 02:31:18 -0700 (PDT) Received: from ee.oulu.fi (ee.oulu.fi [130.231.61.23]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i789V9Tn022923 for ; Sun, 8 Aug 2004 02:31:12 -0700 Received: from tk28.oulu.fi (tk28 [130.231.48.68]) by ee.oulu.fi (8.12.11/8.12.11) with ESMTP id i789V3Q8021650; Sun, 8 Aug 2004 12:31:03 +0300 (EEST) Received: (from pp@localhost) by tk28.oulu.fi (8.13.0/8.13.0/Submit) id i789V23r005561; Sun, 8 Aug 2004 12:31:02 +0300 (EEST) Date: Sun, 8 Aug 2004 12:31:02 +0300 From: Pekka Pietikainen To: "David S. Miller" Cc: jgarzik@pobox.com, jolt@tuxbox.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] b44 1GB DMA workaround Message-ID: <20040808093102.GA3807@ee.oulu.fi> References: <200407232335.37809.jolt@tuxbox.org> <20040726141128.GA5435@ee.oulu.fi> <20040804003108.GA10445@ee.oulu.fi> <20040803183919.2990d045.davem@redhat.com> <20040807224019.GA24817@ee.oulu.fi> <20040807170503.3b05255a.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20040807170503.3b05255a.davem@redhat.com> User-Agent: Mutt/1.4.2i X-archive-position: 7563 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pp@ee.oulu.fi Precedence: bulk X-list: netdev Content-Length: 4781 Lines: 152 On Sat, Aug 07, 2004 at 05:05:03PM -0700, David S. Miller wrote: > > if(1 (just for testing ;) ) || 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); > > } > > This looks a bit better. Excellent, here's the full patch: Signed-off-by: Pekka Pietikainen --- linux-2.6.8-rc3/drivers/net/b44.h.4g4g 2004-08-08 10:54:03.979353080 +0300 +++ linux-2.6.8-rc3/drivers/net/b44.h 2004-08-08 10:54:17.928232528 +0300 @@ -493,6 +493,7 @@ struct ring_info *rx_buffers; struct ring_info *tx_buffers; + unsigned char *tx_bufs; u32 dma_offset; u32 flags; @@ -525,7 +526,7 @@ 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; --- linux-2.6.8-rc3/drivers/net/b44.c.4g4g 2004-08-08 10:53:58.724151992 +0300 +++ linux-2.6.8-rc3/drivers/net/b44.c 2004-08-08 10:54:17.657273720 +0300 @@ -27,8 +27,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 8, 2004" #define B44_DEF_MSG_ENABLE \ (NETIF_MSG_DRV | \ @@ -57,6 +57,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 +68,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) @@ -631,10 +633,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 *) @@ -912,6 +934,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); @@ -1059,6 +1087,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; + } } /* @@ -1081,6 +1114,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) @@ -1746,12 +1785,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); From mmazur@kernel.pl Sun Aug 8 02:38:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 02:38:28 -0700 (PDT) Received: from box.punkt.pl (box.punkt.pl [217.8.180.66]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i789cKF5023636 for ; Sun, 8 Aug 2004 02:38:21 -0700 Received: (qmail 4929 invoked by uid 0); 8 Aug 2004 09:38:07 -0000 Received: from do-box-z.zwm.punkt.pl (HELO home) (zwm?305-xf.pl@217.197.78.33) by box.punkt.pl with SMTP; 8 Aug 2004 09:38:07 -0000 From: Mariusz Mazur To: hadi@cyberus.ca Subject: Re: iproute2 and kernel headers Date: Sun, 8 Aug 2004 11:38:08 +0200 User-Agent: KMail/1.6.2 Cc: Stephen Hemminger , jt@hpl.hp.com, jt@bougret.hpl.hp.com, "David S. Miller" , netdev@oss.sgi.com References: <20040805005019.GA11538@bougret.hpl.hp.com> <20040806093920.045b379e@dell_ss3.pdx.osdl.net> <1091847950.1800.6.camel@jzny.localdomain> In-Reply-To: <1091847950.1800.6.camel@jzny.localdomain> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit Message-Id: <200408081138.09082.mmazur@kernel.pl> X-archive-position: 7565 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mmazur@kernel.pl Precedence: bulk X-list: netdev Content-Length: 1191 Lines: 26 On sobota 07 sierpieñ 2004 16:04, jamal wrote: > > > By the way, one of the consequence of versioning the API is > > > that I tend to do most API changes in batches. The idea is that I want > > > to minimise the number of API versions, because I have to test the > > > tools and drivers with each of them, and I have finite time. > > There should really be no reason you have to change versions. It should > be the last resort. You can use tricks like data structure augmentation > and and new TLV types to go for a long time and still be backward (as > well as forward) compatible. When you are no longer capable of doing > these tricks, then it would make sense upping the version. > There also should be rules for evolution reasons against having data > structures which cross kernel/userspace from having things like > lookatme[0] elements. If I understand correctly how the new linux-abi headers are supposed to work - this is the way to go (meaning - new versions of linux-abi should not break old stuff if they don't have to). -- In the year eighty five ten God is gonna shake his mighty head He'll either say, "I'm pleased where man has been" Or tear it down, and start again From ahu@outpost.ds9a.nl Sun Aug 8 03:14:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 03:14:34 -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 i78AERA0026525 for ; Sun, 8 Aug 2004 03:14:27 -0700 Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 054AE3FDC; Sun, 8 Aug 2004 12:14:22 +0200 (CEST) Date: Sun, 8 Aug 2004 12:14:21 +0200 From: bert hubert To: Glen Turner Cc: Stephen Hemminger , "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan ioctl propagation (rev.2) Message-ID: <20040808101421.GA22507@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Glen Turner , Stephen Hemminger , "David S. Miller" , netdev@oss.sgi.com References: <20040806091305.4d405664@dell_ss3.pdx.osdl.net> <20040806132145.675fd17d.davem@redhat.com> <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> <20040807211036.GA7970@outpost.ds9a.nl> <4115AE4C.2060608@aarnet.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4115AE4C.2060608@aarnet.edu.au> User-Agent: Mutt/1.3.28i X-archive-position: 7566 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: 701 Lines: 22 On Sun, Aug 08, 2004 at 02:08:36PM +0930, Glen Turner wrote: > while (virtual_interface(interface_name)) { > virtual_to_real(interface_name, &interface_name); > } > > This is the sort of nasty detail than operating systems are meant to > abstract away from application code. What I'm saying is that even userspace should not offer this abstraction. Remember the past confusion over "ifconfig eth0:1 down" ? But I'm more than prepared to follow DaveM's lead here, I just want to be sure people think about this change. Regards, bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From kaber@trash.net Sun Aug 8 07:51:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 07:51:14 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78EowxK006980 for ; Sun, 8 Aug 2004 07:51:01 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 4181E19F33C; Sun, 8 Aug 2004 16:50:49 +0200 (CEST) Received: from trash.net (unknown [172.16.0.123]) by eru.coreworks.de (Postfix) with ESMTP id 8AF183941F7; Sun, 8 Aug 2004 16:50:48 +0200 (CEST) Message-ID: <41163E5E.8060004@trash.net> Date: Sun, 08 Aug 2004 16:53:18 +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]: Disable local bh's when grabing qdisc_tree_lock in tc_dump_tfilter Content-Type: multipart/mixed; boundary="------------050805040004020103010103" X-archive-position: 7567 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: 1462 Lines: 50 This is a multi-part message in MIME format. --------------050805040004020103010103 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I missed this one when fixing locking in __qdisc_destroy. --------------050805040004020103010103 Content-Type: text/x-patch; name="tc_dump_tfilter-bh.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tc_dump_tfilter-bh.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/08 14:15:49+02:00 kaber@kaber.coreworks.de # [PKT_SCHED]: Disable local bh's when grabing qdisc_tree_lock in tc_dump_tfilter # # Signed-off-by: Patrick McHardy # # net/sched/cls_api.c # 2004/08/08 14:15:30+02:00 kaber@kaber.coreworks.de +2 -2 # [PKT_SCHED]: Disable local bh's when grabing qdisc_tree_lock in tc_dump_tfilter # diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c --- a/net/sched/cls_api.c 2004-08-08 14:17:46 +02:00 +++ b/net/sched/cls_api.c 2004-08-08 14:17:46 +02:00 @@ -387,7 +387,7 @@ if ((dev = dev_get_by_index(tcm->tcm_ifindex)) == NULL) return skb->len; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); if (!tcm->tcm_parent) q = dev->qdisc_sleeping; else @@ -444,7 +444,7 @@ if (cl) cops->put(q, cl); out: - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); dev_put(dev); return skb->len; } --------------050805040004020103010103-- From jm@jm.kir.nu Sun Aug 8 08:50:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 08:50:05 -0700 (PDT) Received: from jm.kir.nu (a80-186-123-252.elisa-laajakaista.fi [80.186.123.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78Fo0mb011324 for ; Sun, 8 Aug 2004 08:50:01 -0700 Received: from jm by jm.kir.nu with local (Exim 4.34) id 1BtpsR-0001z1-5I; Sun, 08 Aug 2004 18:46:27 +0300 Date: Sun, 8 Aug 2004 18:46:27 +0300 From: Jouni Malinen To: Pedro Ramalhais Cc: hostap@shmoo.com, jt@hpl.hp.com, netdev@oss.sgi.com Subject: Re: Wireless Extensions WE-18 questions Message-ID: <20040808154627.GC7138@jm.kir.nu> Mail-Followup-To: Pedro Ramalhais , hostap@shmoo.com, jt@hpl.hp.com, netdev@oss.sgi.com References: <1091444633.2767.8.camel@rootix> <20040803070843.GB7153@jm.kir.nu> <1091929000.2800.12.camel@rootix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1091929000.2800.12.camel@rootix> User-Agent: Mutt/1.5.6i X-archive-position: 7568 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkmaline@cc.hut.fi Precedence: bulk X-list: netdev Content-Length: 1706 Lines: 35 On Sun, Aug 08, 2004 at 02:36:40AM +0100, Pedro Ramalhais wrote: > - what kind of information should be used in set_genie/get_genie > requests? I know it's a pointer, but what is the information it points > to? ipw2100 firmware expects: capabilities, listening interval, > current_ap, var_ie_len and var_ie for setting IEs. There are additional IEEE 802.11 information elements, including identification and length bytes. The data area can include one more multiple IEs (e.g., WPA, RSN, WME). Capabilities, listen interval, and current AP would be from other ioctls. > - How should IW_AUTH_CIPHER_PAIRWISE and IW_AUTH_CIPHER_GROUP be used > with crypt_tkip/crypt_ccmp ? I'm not sure what you mean with this. Cipher configuration is an optional mechanism that some drivers can use for WPA configuration. This is especially to make it easier to use drivers that were originally designed for NDIS since they generate WPA IE based on the cipher configuration whereas some of the (non-NDIS) drivers that I have worked with get WPA IE from the Supplicant (i.e., they can share the same code for this) and can ignore these values. > PS: I was hoping someone had already answer my e-mail about the creation > of a linux wireless mailing list, and this message would be sent to the > new list... oh well What's wrong with using netdev for this? I think this was the result from the last time the topic of adding a new list came up and I don't think anything have changed since then. As long as people don't complain about getting too much messages about wireless development on netdev, I don't see much point in adding a new list. -- Jouni Malinen PGP id EFC895FA From rl@hellgate.ch Sun Aug 8 09:17:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 09:17:22 -0700 (PDT) Received: from mail1.bluewin.ch ([195.186.1.74]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78GHFxQ012072 for ; Sun, 8 Aug 2004 09:17:15 -0700 Received: from k3.hellgate.ch (83.78.19.117) by mail1.bluewin.ch (Bluewin AG 7.0.030.2) id 410F406500089D56; Sun, 8 Aug 2004 16:16:44 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id C654482BD17; Sun, 8 Aug 2004 16:02:16 +0200 (CEST) Date: Sun, 8 Aug 2004 16:02:16 +0200 From: Roger Luethi To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [0/3] via-rhine: experimental patches Message-ID: <20040808140216.GA8181@k3.hellgate.ch> Mail-Followup-To: Jeff Garzik , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7569 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 159 Lines: 5 The following batch needs testing. I don't expect any notable regressions, but I could do with some reports on WOL (already in -mm) and suspend/resume. Roger From rl@hellgate.ch Sun Aug 8 09:17:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 09:17:30 -0700 (PDT) Received: from mail5.bluewin.ch ([195.186.1.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78GHKPN012075 for ; Sun, 8 Aug 2004 09:17:21 -0700 Received: from k3.hellgate.ch (83.78.19.117) by mail5.bluewin.ch (Bluewin AG 7.0.030.2) id 40ED9EB800349B6A; Sun, 8 Aug 2004 16:16:46 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id DB2AF3D42C; Sun, 8 Aug 2004 16:02:47 +0200 (CEST) Date: Sun, 8 Aug 2004 16:02:47 +0200 From: Roger Luethi To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [1/3] via-rhine: suspend/resume support Message-ID: <20040808140247.GA8542@k3.hellgate.ch> Mail-Followup-To: Jeff Garzik , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040808140216.GA8181@k3.hellgate.ch> X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7571 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 2278 Lines: 98 From: Arkadiusz Miskiewicz Signed-off-by: Arkadiusz Miskiewicz Signed-off-by: Roger Luethi --- linux-2.6.8-rc2-mm1/drivers/net/via-rhine.c 2004-07-30 19:19:19.000000000 +0200 +++ linux-2.6.8-rc2/drivers/net/via-rhine.c 2004-08-06 19:19:07.931310552 +0200 @@ -485,6 +485,9 @@ dma_addr_t tx_bufs_dma; struct pci_dev *pdev; +#ifdef CONFIG_PM + long pioaddr; +#endif struct net_device_stats stats; spinlock_t lock; @@ -825,6 +828,9 @@ dev->base_addr = ioaddr; rp = netdev_priv(dev); rp->quirks = quirks; +#ifdef CONFIG_PM + rp->pioaddr = pioaddr; +#endif /* Get chip registers into a sane state */ rhine_power_init(dev); @@ -1951,11 +1957,70 @@ } +#ifdef CONFIG_PM +static int rhine_suspend(struct pci_dev *pdev, u32 state) +{ + struct net_device *dev = pci_get_drvdata(pdev); + struct rhine_private *rp = netdev_priv(dev); + unsigned long flags; + + if (!netif_running(dev)) + return 0; + + netif_device_detach(dev); + pci_save_state(pdev, pdev->saved_config_space); + + spin_lock_irqsave(&rp->lock, flags); + rhine_shutdown(&pdev->dev); + spin_unlock_irqrestore(&rp->lock, flags); + + return 0; +} + +static int rhine_resume(struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata(pdev); + struct rhine_private *rp = netdev_priv(dev); + unsigned long flags; + int ret; + + if (!netif_running(dev)) + return 0; + + ret = pci_set_power_state(pdev, 0); + if (debug > 1) + printk(KERN_INFO "%s: Entering power state D0 %s (%d).\n", + dev->name, ret ? "failed" : "succeeded", ret); + + pci_restore_state(pdev, pdev->saved_config_space); + + spin_lock_irqsave(&rp->lock, flags); +#ifdef USE_MMIO + enable_mmio(rp->pioaddr, rp->quirks); +#endif + rhine_power_init(dev); + free_tbufs(dev); + free_rbufs(dev); + alloc_tbufs(dev); + alloc_rbufs(dev); + init_registers(dev); + spin_unlock_irqrestore(&rp->lock, flags); + + netif_device_attach(dev); + + return 0; +} +#endif /* CONFIG_PM */ + static struct pci_driver rhine_driver = { .name = DRV_NAME, .id_table = rhine_pci_tbl, .probe = rhine_init_one, .remove = __devexit_p(rhine_remove_one), +#ifdef CONFIG_PM + .suspend = rhine_suspend, + .resume = rhine_resume, +#endif /* CONFIG_PM */ .driver = { .shutdown = rhine_shutdown, } From rl@hellgate.ch Sun Aug 8 09:17:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 09:17:30 -0700 (PDT) Received: from mail4.bluewin.ch ([195.186.4.74]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78GHMBJ012076 for ; Sun, 8 Aug 2004 09:17:23 -0700 Received: from k3.hellgate.ch (83.78.19.117) by mail4.bluewin.ch (Bluewin AG 7.0.030.2) id 410F7F61000C5893; Sun, 8 Aug 2004 16:16:47 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id 00A0317B751; Sun, 8 Aug 2004 16:02:59 +0200 (CEST) Date: Sun, 8 Aug 2004 16:02:59 +0200 From: Roger Luethi To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2/3] via-rhine: de-isolate PHY Message-ID: <20040808140259.GA8575@k3.hellgate.ch> Mail-Followup-To: Jeff Garzik , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040808140216.GA8181@k3.hellgate.ch> X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7572 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 849 Lines: 20 PHYs may come up isolated. Make sure we can send data to them. This code section needs a clean-up, but I prefer to merge this fix in isolation. Report and suggested fix by Tam, Ming Dat (Tommy). Signed-off-by: Roger Luethi --- linux-2.6.8-rc3-mm1/drivers/net/via-rhine.c.01 2004-08-08 12:36:03.440855262 +0200 +++ linux-2.6.8-rc3-mm1/drivers/net/via-rhine.c 2004-08-08 13:15:24.527527919 +0200 @@ -896,7 +896,10 @@ static int __devinit rhine_init_one(stru pci_set_drvdata(pdev, dev); { + u16 mii_cmd; int mii_status = mdio_read(dev, phy_id, 1); + mii_cmd = mdio_read(dev, phy_id, MII_BMCR) & ~BMCR_ISOLATE; + mdio_write(dev, phy_id, MII_BMCR, mii_cmd); if (mii_status != 0xffff && mii_status != 0x0000) { rp->mii_if.advertising = mdio_read(dev, phy_id, 4); printk(KERN_INFO "%s: MII PHY found at address " From rl@hellgate.ch Sun Aug 8 09:17:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 09:17:27 -0700 (PDT) Received: from mail3.bluewin.ch ([195.186.1.75]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78GHJkM012074 for ; Sun, 8 Aug 2004 09:17:20 -0700 Received: from k3.hellgate.ch (83.78.19.117) by mail3.bluewin.ch (Bluewin AG 7.0.030.2) id 40ED9D270033D4A7; Sun, 8 Aug 2004 16:16:45 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id B54862ED19; Sun, 8 Aug 2004 16:03:12 +0200 (CEST) Date: Sun, 8 Aug 2004 16:03:12 +0200 From: Roger Luethi To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [3/3] via-rhine: small fixes Message-ID: <20040808140312.GA8608@k3.hellgate.ch> Mail-Followup-To: Jeff Garzik , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040808140216.GA8181@k3.hellgate.ch> X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7570 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 4144 Lines: 152 - remove Rhine model names (per Jeff's request) - remove redundant calls to clear MII cmd - fill some rhine_private fields earlier Signed-off-by: Roger Luethi --- linux-2.6.8-rc3-mm1/drivers/net/via-rhine.c.02 2004-08-08 13:16:11.009654178 +0200 +++ linux-2.6.8-rc3-mm1/drivers/net/via-rhine.c 2004-08-08 13:19:59.350890566 +0200 @@ -346,7 +346,7 @@ enum rhine_revs { VT6105L = 0x8A, VT6107 = 0x8C, VTunknown2 = 0x8E, - VT6105M = 0x90, + VT6105M = 0x90, /* Management adapter */ }; enum rhine_quirks { @@ -485,9 +485,7 @@ struct rhine_private { dma_addr_t tx_bufs_dma; struct pci_dev *pdev; -#ifdef CONFIG_PM long pioaddr; -#endif struct net_device_stats stats; spinlock_t lock; @@ -596,7 +594,7 @@ static void rhine_power_init(struct net_ default: reason = "Unknown"; } - printk("%s: Woke system up. Reason: %s.\n", + printk(KERN_INFO "%s: Woke system up. Reason: %s.\n", DRV_NAME, reason); } } @@ -706,7 +704,7 @@ static int __devinit rhine_init_one(stru long memaddr; long ioaddr; int io_size, phy_id; - const char *name, *mname; + const char *name; /* when built into the kernel, we only print version if device is found */ #ifndef MODULE @@ -721,41 +719,24 @@ static int __devinit rhine_init_one(stru phy_id = 0; quirks = 0; name = "Rhine"; - mname = "unknown"; if (pci_rev < VTunknown0) { quirks = rqRhineI; io_size = 128; - mname = "VT86C100A"; } else if (pci_rev >= VT6102) { quirks = rqWOL | rqForceReset; if (pci_rev < VT6105) { name = "Rhine II"; quirks |= rqStatusWBRace; /* Rhine-II exclusive */ - if (pci_rev < VT8231) - mname = "VT6102"; - else if (pci_rev < VT8233) - mname = "VT8231"; - else if (pci_rev < VT8235) - mname = "VT8233"; - else if (pci_rev < VT8237) - mname = "VT8235"; - else if (pci_rev < VTunknown1) - mname = "VT8237"; } else { - name = "Rhine III"; phy_id = 1; /* Integrated PHY, phy_id fixed to 1 */ if (pci_rev >= VT6105_B0) quirks |= rq6patterns; - if (pci_rev < VT6105L) - mname = "VT6105"; - else if (pci_rev < VT6107) - mname = "VT6105L"; - else if (pci_rev < VT6105M) - mname = "VT6107"; - else if (pci_rev >= VT6105M) - mname = "Management Adapter VT6105M"; + if (pci_rev < VT6105M) + name = "Rhine III"; + else + name = "Rhine III (Management Adapter)"; } } @@ -793,6 +774,11 @@ static int __devinit rhine_init_one(stru SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); + rp = netdev_priv(dev); + rp->quirks = quirks; + rp->pioaddr = pioaddr; + rp->pdev = pdev; + rc = pci_request_regions(pdev, DRV_NAME); if (rc) goto err_out_free_netdev; @@ -826,11 +812,6 @@ static int __devinit rhine_init_one(stru #endif /* USE_MMIO */ dev->base_addr = ioaddr; - rp = netdev_priv(dev); - rp->quirks = quirks; -#ifdef CONFIG_PM - rp->pioaddr = pioaddr; -#endif /* Get chip registers into a sane state */ rhine_power_init(dev); @@ -852,7 +833,6 @@ static int __devinit rhine_init_one(stru dev->irq = pdev->irq; spin_lock_init(&rp->lock); - rp->pdev = pdev; rp->mii_if.dev = dev; rp->mii_if.mdio_read = mdio_read; rp->mii_if.mdio_write = mdio_write; @@ -880,8 +860,8 @@ static int __devinit rhine_init_one(stru if (rc) goto err_out_unmap; - printk(KERN_INFO "%s: VIA %s (%s) at 0x%lx, ", - dev->name, name, mname, + printk(KERN_INFO "%s: VIA %s at 0x%lx, ", + dev->name, name, #ifdef USE_MMIO memaddr #else @@ -1181,7 +1161,7 @@ static int mdio_read(struct net_device * rhine_disable_linkmon(ioaddr, rp->quirks); - writeb(0, ioaddr + MIICmd); + /* rhine_disable_linkmon already cleared MIICmd */ writeb(phy_id, ioaddr + MIIPhyAddr); writeb(regnum, ioaddr + MIIRegAddr); writeb(0x40, ioaddr + MIICmd); /* Trigger read */ @@ -1199,7 +1179,7 @@ static void mdio_write(struct net_device rhine_disable_linkmon(ioaddr, rp->quirks); - writeb(0, ioaddr + MIICmd); + /* rhine_disable_linkmon already cleared MIICmd */ writeb(phy_id, ioaddr + MIIPhyAddr); writeb(regnum, ioaddr + MIIRegAddr); writew(value, ioaddr + MIIData); From manfred@colorfullife.com Sun Aug 8 12:51:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 12:51:39 -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 i78JpWkO020806 for ; Sun, 8 Aug 2004 12:51:34 -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 i78JpKuG027457; Sun, 8 Aug 2004 21:51:21 +0200 Message-ID: <411684D5.8020302@colorfullife.com> Date: Sun, 08 Aug 2004 21:53:57 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Roger Luethi CC: linux-kernel@vger.kernel.org, Netdev Subject: Re: [2/3] via-rhine: de-isolate PHY Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7573 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: 446 Lines: 14 Roger wrote: > PHYs may come up isolated. Make sure we can send data to them. This code > section needs a clean-up, but I prefer to merge this fix in isolation. > What was the phyid value for the isolated PHYs? I know that PHYs go into isolate mode if the startup id is wired to 0, but I haven't figured out what's necessary to initialize them: Just clear the isolate bit or is it necessary to set the id to a nonzero value. -- Manfred From rl@hellgate.ch Sun Aug 8 13:05:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 13:05:57 -0700 (PDT) Received: from mail5.bluewin.ch (mail5.bluewin.ch [195.186.1.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78K5ntW021528 for ; Sun, 8 Aug 2004 13:05:52 -0700 Received: from k3.hellgate.ch (83.78.19.117) by mail5.bluewin.ch (Bluewin AG 7.0.030.2) id 40ED9EB80034E84B; Sun, 8 Aug 2004 20:05:32 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id 5C9F7A005A6; Sun, 8 Aug 2004 22:05:32 +0200 (CEST) Date: Sun, 8 Aug 2004 22:05:32 +0200 From: Roger Luethi To: Manfred Spraul Cc: linux-kernel@vger.kernel.org, Netdev Subject: Re: [2/3] via-rhine: de-isolate PHY Message-ID: <20040808200532.GA19170@k3.hellgate.ch> Mail-Followup-To: Manfred Spraul , linux-kernel@vger.kernel.org, Netdev References: <411684D5.8020302@colorfullife.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411684D5.8020302@colorfullife.com> X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7574 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 834 Lines: 24 [ BCCed reporter in case he wants to weigh in on the issue ] On Sun, 08 Aug 2004 21:53:57 +0200, Manfred Spraul wrote: > Roger wrote: > > >PHYs may come up isolated. Make sure we can send data to them. This code > >section needs a clean-up, but I prefer to merge this fix in isolation. > > > What was the phyid value for the isolated PHYs? I suspect it was 0, because another suggestion in the same message was to start scanning at 0 rather than 1 (obsolete with current via-rhine code). > I know that PHYs go into isolate mode if the startup id is wired to 0, Wouldn't that be s/go/can go/ ? > but I haven't figured out what's necessary to initialize them: Just > clear the isolate bit or is it necessary to set the id to a nonzero value. The proposed fix apparently worked for the PHY in question (LSI Logic 80225). Roger From manfred@colorfullife.com Sun Aug 8 14:01:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 14:01:44 -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 i78L1b5C022548 for ; Sun, 8 Aug 2004 14:01:38 -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 i78L1SuG027956; Sun, 8 Aug 2004 23:01:29 +0200 Message-ID: <41169546.5000308@colorfullife.com> Date: Sun, 08 Aug 2004 23:04:06 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Roger Luethi CC: linux-kernel@vger.kernel.org, Netdev Subject: Re: [2/3] via-rhine: de-isolate PHY References: <411684D5.8020302@colorfullife.com> <20040808200532.GA19170@k3.hellgate.ch> In-Reply-To: <20040808200532.GA19170@k3.hellgate.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7575 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: 996 Lines: 31 Roger Luethi wrote: > > >>I know that PHYs go into isolate mode if the startup id is wired to 0, >> >> > >Wouldn't that be s/go/can go/ ? > > > I don't have the MII standard, my knowledge is from the DP83840A specs: The pin description contains a section about the phy ids: During power up five pins are latched to determine the initial phy address. Then the following sentence in bold: "An address selection of all zeros (00000) will result in a PHY isolation condition". I've reread the DP specs and I now think that your current patch is sufficient: The isolate state is independant from the phy address - a non-zero phy can be in isolate mode and the phy zero can be non-isolated. The phy id just sets the power-up value of the isolate bit: 0 means start isolated, non-zero means start non-isolated. If this is really true then handling phy 0 is trivial: First scan 1-31. If nothing found: try 0. If a phy is found: clear the isolate bit and then use phy 0. -- Manfred From rl@hellgate.ch Sun Aug 8 14:55:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 14:55:21 -0700 (PDT) Received: from mail4.bluewin.ch (mail4.bluewin.ch [195.186.4.74]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i78LtGrs023880 for ; Sun, 8 Aug 2004 14:55:16 -0700 Received: from k3.hellgate.ch (83.78.19.117) by mail4.bluewin.ch (Bluewin AG 7.0.030.2) id 410F7F61000CF64B; Sun, 8 Aug 2004 21:54:58 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id 5A6321F90E2; Sun, 8 Aug 2004 23:54:58 +0200 (CEST) Date: Sun, 8 Aug 2004 23:54:58 +0200 From: Roger Luethi To: Manfred Spraul Cc: linux-kernel@vger.kernel.org, Netdev Subject: Re: [2/3] via-rhine: de-isolate PHY Message-ID: <20040808215458.GA21994@k3.hellgate.ch> Mail-Followup-To: Manfred Spraul , linux-kernel@vger.kernel.org, Netdev References: <411684D5.8020302@colorfullife.com> <20040808200532.GA19170@k3.hellgate.ch> <41169546.5000308@colorfullife.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41169546.5000308@colorfullife.com> X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7576 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 1293 Lines: 32 On Sun, 08 Aug 2004 23:04:06 +0200, Manfred Spraul wrote: > Roger Luethi wrote: > >>I know that PHYs go into isolate mode if the startup id is wired to 0, > > > >Wouldn't that be s/go/can go/ ? > > > I don't have the MII standard, my knowledge is from the DP83840A specs: > The pin description contains a section about the phy ids: > During power up five pins are latched to determine the initial phy address. > Then the following sentence in bold: "An address selection of all zeros > (00000) will result in a PHY isolation condition". I suppose all PHYs do that. Even if they don't, though, I should be safe as long as I de-isolate unconditionally (instead of testing for phy_id==0). > I've reread the DP specs and I now think that your current patch is > sufficient: > The isolate state is independant from the phy address - a non-zero phy > can be in isolate mode and the phy zero can be non-isolated. The phy id Stands to reason. A PHY that can't get out of isolation wouldn't be very useful. > If this is really true then handling phy 0 is trivial: > First scan 1-31. If nothing found: try 0. If a phy is found: clear the > isolate bit and then use phy 0. Makes sense. The Rhine is actually pretty neat in that regard, I've been able to drop the PHY scanning entirely. Roger From rusty@rustcorp.com.au Sun Aug 8 18:18:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 18:18:40 -0700 (PDT) Received: from ausmtp02.au.ibm.com (ausmtp02.au.ibm.com [202.81.18.187]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i791IQU8031471 for ; Sun, 8 Aug 2004 18:18:29 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp02.au.ibm.com (8.12.10/8.12.10) with ESMTP id i791GvqT050792; Mon, 9 Aug 2004 11:16:57 +1000 Received: from ozlabs.au.ibm.com (haven.au.ibm.com [9.190.164.82]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i791J2nf062906; Mon, 9 Aug 2004 11:19:04 +1000 Received: from bach.ozlabs.ibm.com (bach.ozlabs.ibm.com [10.61.2.150]) by ozlabs.au.ibm.com (Postfix) with ESMTP id 9141317DE1; Mon, 9 Aug 2004 11:17:53 +1000 (EST) Subject: Re: RCU : various patches [0/5] From: Rusty Russell To: Dipankar Sarma Cc: Andrew Morton , "Paul E. McKenney" , Robert Olsson , netdev@oss.sgi.com In-Reply-To: <20040807191536.GA3936@in.ibm.com> References: <20040807191536.GA3936@in.ibm.com> Content-Type: text/plain Message-Id: <1091964481.28542.20.camel@bach> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 09 Aug 2004 11:17:51 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 7577 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: 255 Lines: 10 On Sun, 2004-08-08 at 05:15, Dipankar Sarma wrote: > This is a series of patches that are currently in my tree. Like the cleanup. The call_rcu_bh looks solid too. Thanks, Rusty. -- Anyone who quotes me in their signature is an idiot -- Rusty Russell From bunk@fs.tum.de Sun Aug 8 19:23:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 19:23:51 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i792Nh0x000698 for ; Sun, 8 Aug 2004 19:23:45 -0700 Received: (qmail 3659 invoked from network); 9 Aug 2004 02:16:00 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 9 Aug 2004 02:16:00 -0000 Date: Mon, 9 Aug 2004 04:23:35 +0200 From: Adrian Bunk To: Jeff Garzik , Andrew Morton Cc: linux-net@vger.kernel.org, Netdev , linux-kernel@vger.kernel.org Subject: [2.6 patch] fix net/hamradio/dmascc with gcc 3.4 (fwd) Message-ID: <20040809022335.GM26174@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7578 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev Content-Length: 12923 Lines: 387 FYI: The patch forwarded below is still required in 2.6.8-rc3-mm2. ----- Forwarded message from Adrian Bunk ----- Date: Tue, 3 Aug 2004 00:33:32 +0200 From: Adrian Bunk To: Jeff Garzik Cc: linux-net@vger.kernel.org, Netdev , linux-kernel@vger.kernel.org Subject: [2.6 patch] fix net/hamradio/dmascc with gcc 3.4 Trying to compile net/hamradio/dmascc.c in 2.6.8-rc2-mm2 with gcc 3.4 results in compile errors starting with the following: <-- snip --> ... CC drivers/net/hamradio/dmascc.o drivers/net/hamradio/dmascc.c: In function `scc_isr': drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining failed in call to 'z8530_isr': function body not available drivers/net/hamradio/dmascc.c:969: sorry, unimplemented: called from here drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining failed in call to 'z8530_isr': function body not available drivers/net/hamradio/dmascc.c:978: sorry, unimplemented: called from here make[3]: *** [drivers/net/hamradio/dmascc.o] Error 1 <-- snip --> The patch below moves all inline functions above their first caller. diffstat output: drivers/net/hamradio/dmascc.c | 290 ++++++++++++++++------------------ 1 files changed, 144 insertions(+), 146 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.7-mm7-full-gcc3.4/drivers/net/hamradio/dmascc.c.old 2004-07-13 00:55:54.000000000 +0200 +++ linux-2.6.7-mm7-full-gcc3.4/drivers/net/hamradio/dmascc.c 2004-07-13 01:01:06.000000000 +0200 @@ -246,8 +246,14 @@ static struct net_device_stats *scc_get_stats(struct net_device *dev); static int scc_set_mac_address(struct net_device *dev, void *sa); -static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); +static inline void tx_on(struct scc_priv *priv); +static inline void rx_on(struct scc_priv *priv); +static inline void rx_off(struct scc_priv *priv); +static void start_timer(struct scc_priv *priv, int t, int r15); +static inline unsigned char random(void); + static inline void z8530_isr(struct scc_info *info); +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); static void rx_isr(struct scc_priv *priv); static void special_condition(struct scc_priv *priv, int rc); static void rx_bh(void *arg); @@ -255,12 +261,6 @@ static void es_isr(struct scc_priv *priv); static void tm_isr(struct scc_priv *priv); -static inline void tx_on(struct scc_priv *priv); -static inline void rx_on(struct scc_priv *priv); -static inline void rx_off(struct scc_priv *priv); -static void start_timer(struct scc_priv *priv, int t, int r15); -static inline unsigned char random(void); - /* Initialization variables */ @@ -945,42 +945,115 @@ } -static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { - struct scc_info *info = dev_id; +static inline void tx_on(struct scc_priv *priv) { + int i, n; + unsigned long flags; - spin_lock(info->priv[0].register_lock); - /* At this point interrupts are enabled, and the interrupt under service - is already acknowledged, but masked off. + if (priv->param.dma >= 0) { + n = (priv->chip == Z85230) ? 3 : 1; + /* Program DMA controller */ + flags = claim_dma_lock(); + set_dma_mode(priv->param.dma, DMA_MODE_WRITE); + set_dma_addr(priv->param.dma, (int) priv->tx_buf[priv->tx_tail]+n); + set_dma_count(priv->param.dma, priv->tx_len[priv->tx_tail]-n); + release_dma_lock(flags); + /* Enable TX underrun interrupt */ + write_scc(priv, R15, TxUIE); + /* Configure DREQ */ + if (priv->type == TYPE_TWIN) + outb((priv->param.dma == 1) ? TWIN_DMA_HDX_T1 : TWIN_DMA_HDX_T3, + priv->card_base + TWIN_DMA_CFG); + else + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | WT_RDY_ENAB); + /* Write first byte(s) */ + spin_lock_irqsave(priv->register_lock, flags); + for (i = 0; i < n; i++) + write_scc_data(priv, priv->tx_buf[priv->tx_tail][i], 1); + enable_dma(priv->param.dma); + spin_unlock_irqrestore(priv->register_lock, flags); + } else { + write_scc(priv, R15, TxUIE); + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | TxINT_ENAB); + tx_isr(priv); + } + /* Reset EOM latch if we do not have the AUTOEOM feature */ + if (priv->chip == Z8530) write_scc(priv, R0, RES_EOM_L); +} - Interrupt processing: We loop until we know that the IRQ line is - low. If another positive edge occurs afterwards during the ISR, - another interrupt will be triggered by the interrupt controller - as soon as the IRQ level is enabled again (see asm/irq.h). - Bottom-half handlers will be processed after scc_isr(). This is - important, since we only have small ringbuffers and want new data - to be fetched/delivered immediately. */ +static inline void rx_on(struct scc_priv *priv) { + unsigned long flags; - if (info->priv[0].type == TYPE_TWIN) { - int is, card_base = info->priv[0].card_base; - while ((is = ~inb(card_base + TWIN_INT_REG)) & - TWIN_INT_MSK) { - if (is & TWIN_SCC_MSK) { - z8530_isr(info); - } else if (is & TWIN_TMR1_MSK) { - inb(card_base + TWIN_CLR_TMR1); - tm_isr(&info->priv[0]); - } else { - inb(card_base + TWIN_CLR_TMR2); - tm_isr(&info->priv[1]); - } + /* Clear RX FIFO */ + while (read_scc(priv, R0) & Rx_CH_AV) read_scc_data(priv); + priv->rx_over = 0; + if (priv->param.dma >= 0) { + /* Program DMA controller */ + flags = claim_dma_lock(); + set_dma_mode(priv->param.dma, DMA_MODE_READ); + set_dma_addr(priv->param.dma, (int) priv->rx_buf[priv->rx_head]); + set_dma_count(priv->param.dma, BUF_SIZE); + release_dma_lock(flags); + enable_dma(priv->param.dma); + /* Configure PackeTwin DMA */ + if (priv->type == TYPE_TWIN) { + outb((priv->param.dma == 1) ? TWIN_DMA_HDX_R1 : TWIN_DMA_HDX_R3, + priv->card_base + TWIN_DMA_CFG); } - } else z8530_isr(info); - spin_unlock(info->priv[0].register_lock); - return IRQ_HANDLED; + /* Sp. cond. intr. only, ext int enable, RX DMA enable */ + write_scc(priv, R1, EXT_INT_ENAB | INT_ERR_Rx | + WT_RDY_RT | WT_FN_RDYFN | WT_RDY_ENAB); + } else { + /* Reset current frame */ + priv->rx_ptr = 0; + /* Intr. on all Rx characters and Sp. cond., ext int enable */ + write_scc(priv, R1, EXT_INT_ENAB | INT_ALL_Rx | WT_RDY_RT | + WT_FN_RDYFN); + } + write_scc(priv, R0, ERR_RES); + write_scc(priv, R3, RxENABLE | Rx8 | RxCRC_ENAB); +} + + +static inline void rx_off(struct scc_priv *priv) { + /* Disable receiver */ + write_scc(priv, R3, Rx8); + /* Disable DREQ / RX interrupt */ + if (priv->param.dma >= 0 && priv->type == TYPE_TWIN) + outb(0, priv->card_base + TWIN_DMA_CFG); + else + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN); + /* Disable DMA */ + if (priv->param.dma >= 0) disable_dma(priv->param.dma); +} + + +static void start_timer(struct scc_priv *priv, int t, int r15) { + unsigned long flags; + + outb(priv->tmr_mode, priv->tmr_ctrl); + if (t == 0) { + tm_isr(priv); + } else if (t > 0) { + save_flags(flags); + cli(); + outb(t & 0xFF, priv->tmr_cnt); + outb((t >> 8) & 0xFF, priv->tmr_cnt); + if (priv->type != TYPE_TWIN) { + write_scc(priv, R15, r15 | CTSIE); + priv->rr0 |= CTS; + } + restore_flags(flags); + } } +static inline unsigned char random(void) { + /* See "Numerical Recipes in C", second edition, p. 284 */ + rand = rand * 1664525L + 1013904223L; + return (unsigned char) (rand >> 24); +} + static inline void z8530_isr(struct scc_info *info) { int is, i = 100; @@ -1009,6 +1082,42 @@ } +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { + struct scc_info *info = dev_id; + + spin_lock(info->priv[0].register_lock); + /* At this point interrupts are enabled, and the interrupt under service + is already acknowledged, but masked off. + + Interrupt processing: We loop until we know that the IRQ line is + low. If another positive edge occurs afterwards during the ISR, + another interrupt will be triggered by the interrupt controller + as soon as the IRQ level is enabled again (see asm/irq.h). + + Bottom-half handlers will be processed after scc_isr(). This is + important, since we only have small ringbuffers and want new data + to be fetched/delivered immediately. */ + + if (info->priv[0].type == TYPE_TWIN) { + int is, card_base = info->priv[0].card_base; + while ((is = ~inb(card_base + TWIN_INT_REG)) & + TWIN_INT_MSK) { + if (is & TWIN_SCC_MSK) { + z8530_isr(info); + } else if (is & TWIN_TMR1_MSK) { + inb(card_base + TWIN_CLR_TMR1); + tm_isr(&info->priv[0]); + } else { + inb(card_base + TWIN_CLR_TMR2); + tm_isr(&info->priv[1]); + } + } + } else z8530_isr(info); + spin_unlock(info->priv[0].register_lock); + return IRQ_HANDLED; +} + + static void rx_isr(struct scc_priv *priv) { if (priv->param.dma >= 0) { /* Check special condition and perform error reset. See 2.4.7.5. */ @@ -1292,114 +1401,3 @@ break; } } - - -static inline void tx_on(struct scc_priv *priv) { - int i, n; - unsigned long flags; - - if (priv->param.dma >= 0) { - n = (priv->chip == Z85230) ? 3 : 1; - /* Program DMA controller */ - flags = claim_dma_lock(); - set_dma_mode(priv->param.dma, DMA_MODE_WRITE); - set_dma_addr(priv->param.dma, (int) priv->tx_buf[priv->tx_tail]+n); - set_dma_count(priv->param.dma, priv->tx_len[priv->tx_tail]-n); - release_dma_lock(flags); - /* Enable TX underrun interrupt */ - write_scc(priv, R15, TxUIE); - /* Configure DREQ */ - if (priv->type == TYPE_TWIN) - outb((priv->param.dma == 1) ? TWIN_DMA_HDX_T1 : TWIN_DMA_HDX_T3, - priv->card_base + TWIN_DMA_CFG); - else - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | WT_RDY_ENAB); - /* Write first byte(s) */ - spin_lock_irqsave(priv->register_lock, flags); - for (i = 0; i < n; i++) - write_scc_data(priv, priv->tx_buf[priv->tx_tail][i], 1); - enable_dma(priv->param.dma); - spin_unlock_irqrestore(priv->register_lock, flags); - } else { - write_scc(priv, R15, TxUIE); - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | TxINT_ENAB); - tx_isr(priv); - } - /* Reset EOM latch if we do not have the AUTOEOM feature */ - if (priv->chip == Z8530) write_scc(priv, R0, RES_EOM_L); -} - - -static inline void rx_on(struct scc_priv *priv) { - unsigned long flags; - - /* Clear RX FIFO */ - while (read_scc(priv, R0) & Rx_CH_AV) read_scc_data(priv); - priv->rx_over = 0; - if (priv->param.dma >= 0) { - /* Program DMA controller */ - flags = claim_dma_lock(); - set_dma_mode(priv->param.dma, DMA_MODE_READ); - set_dma_addr(priv->param.dma, (int) priv->rx_buf[priv->rx_head]); - set_dma_count(priv->param.dma, BUF_SIZE); - release_dma_lock(flags); - enable_dma(priv->param.dma); - /* Configure PackeTwin DMA */ - if (priv->type == TYPE_TWIN) { - outb((priv->param.dma == 1) ? TWIN_DMA_HDX_R1 : TWIN_DMA_HDX_R3, - priv->card_base + TWIN_DMA_CFG); - } - /* Sp. cond. intr. only, ext int enable, RX DMA enable */ - write_scc(priv, R1, EXT_INT_ENAB | INT_ERR_Rx | - WT_RDY_RT | WT_FN_RDYFN | WT_RDY_ENAB); - } else { - /* Reset current frame */ - priv->rx_ptr = 0; - /* Intr. on all Rx characters and Sp. cond., ext int enable */ - write_scc(priv, R1, EXT_INT_ENAB | INT_ALL_Rx | WT_RDY_RT | - WT_FN_RDYFN); - } - write_scc(priv, R0, ERR_RES); - write_scc(priv, R3, RxENABLE | Rx8 | RxCRC_ENAB); -} - - -static inline void rx_off(struct scc_priv *priv) { - /* Disable receiver */ - write_scc(priv, R3, Rx8); - /* Disable DREQ / RX interrupt */ - if (priv->param.dma >= 0 && priv->type == TYPE_TWIN) - outb(0, priv->card_base + TWIN_DMA_CFG); - else - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN); - /* Disable DMA */ - if (priv->param.dma >= 0) disable_dma(priv->param.dma); -} - - -static void start_timer(struct scc_priv *priv, int t, int r15) { - unsigned long flags; - - outb(priv->tmr_mode, priv->tmr_ctrl); - if (t == 0) { - tm_isr(priv); - } else if (t > 0) { - save_flags(flags); - cli(); - outb(t & 0xFF, priv->tmr_cnt); - outb((t >> 8) & 0xFF, priv->tmr_cnt); - if (priv->type != TYPE_TWIN) { - write_scc(priv, R15, r15 | CTSIE); - priv->rr0 |= CTS; - } - restore_flags(flags); - } -} - - -static inline unsigned char random(void) { - /* See "Numerical Recipes in C", second edition, p. 284 */ - rand = rand * 1664525L + 1013904223L; - return (unsigned char) (rand >> 24); -} - - 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/ ----- End forwarded message ----- From mcgrof@studorgs.rutgers.edu Sun Aug 8 21:31:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 21:31:06 -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 i794V1hn009959 for ; Sun, 8 Aug 2004 21:31:01 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 3EA28F99BC; Mon, 9 Aug 2004 00:30:56 -0400 (EDT) Date: Mon, 9 Aug 2004 00:30:56 -0400 To: Jeff Garzik Cc: "Luis R. Rodriguez" , Marcelo Tosatti , Netdev , prism54-devel@prism54.org Subject: Re: [PATCH 2.4.26] add prism54 to 2.4 tree Message-ID: <20040809043056.GU26262@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , "Luis R. Rodriguez" , Marcelo Tosatti , Netdev , prism54-devel@prism54.org References: <20040715005140.GH14482@ruslug.rutgers.edu> <20040720132453.GA2348@dmt.cyclades> <20040721093406.GB9141@ruslug.rutgers.edu> <41068C49.9070406@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41068C49.9070406@pobox.com> 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: 7579 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: 387 Lines: 20 Marcelo/Jeff, 2.4.27 is out now and I did not see prism54 go in. What happened? Luis On Tue, Jul 27, 2004 at 01:09:29PM -0400, Jeff Garzik wrote: > Sure, it is now queued for Marcelo. > > Note that it won't be sent to him until the current Release Candidate > cycle is completed. > > Jeff > > > -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From jgarzik@pobox.com Sun Aug 8 21:59:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 08 Aug 2004 21:59: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 i794xNMK011323 for ; Sun, 8 Aug 2004 21:59:24 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Bu2E5-0005FX-LA; Mon, 09 Aug 2004 05:57:37 +0100 Message-ID: <41170430.60307@pobox.com> Date: Mon, 09 Aug 2004 00:57:20 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Luis R. Rodriguez" CC: "Luis R. Rodriguez" , Marcelo Tosatti , Netdev , prism54-devel@prism54.org Subject: Re: [PATCH 2.4.26] add prism54 to 2.4 tree References: <20040715005140.GH14482@ruslug.rutgers.edu> <20040720132453.GA2348@dmt.cyclades> <20040721093406.GB9141@ruslug.rutgers.edu> <41068C49.9070406@pobox.com> <20040809043056.GU26262@ruslug.rutgers.edu> In-Reply-To: <20040809043056.GU26262@ruslug.rutgers.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7580 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: 485 Lines: 21 Luis R. Rodriguez wrote: > Marcelo/Jeff, > > 2.4.27 is out now and I did not see prism54 go in. What happened? > > Luis > > On Tue, Jul 27, 2004 at 01:09:29PM -0400, Jeff Garzik wrote: > >>Sure, it is now queued for Marcelo. >> >>Note that it won't be sent to him until the current Release Candidate >>cycle is completed. The release candidate cycle is now complete, and 2.4.27 is released, which means _now_ it is OK to submit non-bug-fix items such as new drivers. Jeff From nakam@linux-ipv6.org Mon Aug 9 01:54:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 01:54:32 -0700 (PDT) Received: from localhost (galaxy.linux-ipv6.org [203.178.140.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i798sNDj022289 for ; Mon, 9 Aug 2004 01:54:23 -0700 Received: from localhost ([127.0.0.1]) by localhost with smtp (Exim 3.36 #1 (Debian)) id 1Bu5uv-0000W3-00; Mon, 09 Aug 2004 17:54:05 +0900 Date: Mon, 9 Aug 2004 17:54:04 +0900 From: Masahide Nakamura To: Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code Message-Id: <20040809175404.301bd60a@localhost> X-Mailer: Sylpheed-Claws 0.9.12 (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: 7581 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nakam@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 9054 Lines: 317 Hello, This patch makes that IPsec policy can be matched by ICMP type and code. Actually setkey(ipsec-tools) already has their interface so it follows setkey's manner where type/code are stored in selector. I added shortcuts for them as a trial. Please read the patch and its log below first. Thinking of raw socket (in outbound case), the patch supports only ICMP; it is out of scope such packet as user-land builds non-ICMP data (e.g. TCP/UDP) and sends through raw socket. IMO this behavior is enough, however does anybody have comments? The patch is against 2.6.8-rc3. Can you check it? Regards, -- Masahide NAKAMURA Log: IPsec ICMP type and code support. * inbound: - add entry of ICMP[46] to decode_session[46]() to update flowi. - add xfrm_selector_icmp_match(). * outbound: - store type/code to flowi when it seems to be ICMP[46] data in raw socket. Signed-off-by: Masahide NAKAMURA Index: include/linux/xfrm.h =================================================================== RCS file: /cvsroot/usagi/usagi/kernel/linux26/include/linux/xfrm.h,v retrieving revision 1.1.1.14 diff -u -r1.1.1.14 xfrm.h --- include/linux/xfrm.h 19 Jul 2004 16:53:28 -0000 1.1.1.14 +++ include/linux/xfrm.h 9 Aug 2004 08:31:12 -0000 @@ -43,6 +43,15 @@ __u8 proto; int ifindex; uid_t user; + /* + * XXX: ICMP values defined like a manner which setkey does: + * XXX: ICMP-type is "sport" area and ICMP-code is stored "dport" area. + * XXX: Should it be formed union like struct flowi? --nakam + */ +#define xfrmsel_icmp_type sport +#define xfrmsel_icmp_type_mask sport_mask +#define xfrmsel_icmp_code dport +#define xfrmsel_icmp_code_mask dport_mask }; #define XFRM_INF (~(__u64)0) Index: include/net/xfrm.h =================================================================== RCS file: /cvsroot/usagi/usagi/kernel/linux26/include/net/xfrm.h,v retrieving revision 1.1.1.28 diff -u -r1.1.1.28 xfrm.h --- include/net/xfrm.h 3 Aug 2004 23:00:04 -0000 1.1.1.28 +++ include/net/xfrm.h 9 Aug 2004 08:31:13 -0000 @@ -463,25 +463,54 @@ } static inline int +__xfrm_selector_icmp_match(struct xfrm_selector *sel, struct flowi *fl) +{ + /* In selector, type/code are stored 16-bit area and + * should be network byte-order. + */ + __u8 *xtype = (__u8 *)&sel->xfrmsel_icmp_type; + __u8 *xcode = (__u8 *)&sel->xfrmsel_icmp_code; + __u8 *xtypemask = (__u8 *)&sel->xfrmsel_icmp_type_mask; + __u8 *xcodemask = (__u8 *)&sel->xfrmsel_icmp_code_mask; + + return (!(xtype[0]&xtypemask[0]) && + !((fl->fl_icmp_type^xtype[1])&xtypemask[1])) && + (!(xcode[0]&xcodemask[0]) && + !((fl->fl_icmp_code^xcode[1])&xcodemask[1])); +} + +static inline int __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl) { - return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) && - addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) && - !((fl->fl_ip_dport^sel->dport)&sel->dport_mask) && - !((fl->fl_ip_sport^sel->sport)&sel->sport_mask) && - (fl->proto == sel->proto || !sel->proto) && - (fl->oif == sel->ifindex || !sel->ifindex); + if (!(addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) && + addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) && + (fl->proto == sel->proto || !sel->proto) && + (fl->oif == sel->ifindex || !sel->ifindex))) + return 0; + + if (fl->proto == IPPROTO_ICMP) + return __xfrm_selector_icmp_match(sel, fl); + else { + return !((fl->fl_ip_dport^sel->dport)&sel->dport_mask) && + !((fl->fl_ip_sport^sel->sport)&sel->sport_mask); + } } static inline int __xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl) { - return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) && - addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) && - !((fl->fl_ip_dport^sel->dport)&sel->dport_mask) && - !((fl->fl_ip_sport^sel->sport)&sel->sport_mask) && - (fl->proto == sel->proto || !sel->proto) && - (fl->oif == sel->ifindex || !sel->ifindex); + if (!(addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) && + addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) && + (fl->oif == sel->ifindex || !sel->ifindex) && + (fl->proto == sel->proto || !sel->proto))) + return 0; + + if (fl->proto == IPPROTO_ICMPV6) + return __xfrm_selector_icmp_match(sel, fl); + else { + return !((fl->fl_ip_dport^sel->dport)&sel->dport_mask) && + !((fl->fl_ip_sport^sel->sport)&sel->sport_mask); + } } static inline int Index: net/ipv4/raw.c =================================================================== RCS file: /cvsroot/usagi/usagi/kernel/linux26/net/ipv4/raw.c,v retrieving revision 1.1.1.29 diff -u -r1.1.1.29 raw.c --- net/ipv4/raw.c 3 Aug 2004 23:01:54 -0000 1.1.1.29 +++ net/ipv4/raw.c 9 Aug 2004 08:31:15 -0000 @@ -323,6 +323,51 @@ return err; } +static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) +{ + struct iovec *iov; + u8 *type = NULL; + u8 *code = NULL; + int probed = 0; + int i; + + if (!msg->msg_iov) + return; + + for (i = 0; i < msg->msg_iovlen; i++) { + iov = &msg->msg_iov[i]; + if (!iov) + continue; + + switch (fl->proto) { + case IPPROTO_ICMP: + /* check if one-byte field is readable or not. */ + if (iov->iov_base && iov->iov_len < 1) + break; + + if (!type) { + type = iov->iov_base; + /* check if code field is readable or not. */ + if (iov->iov_len > 1) + code = type + 1; + } else if (!code) + code = iov->iov_base; + + if (type && code) { + fl->fl_icmp_type = *type; + fl->fl_icmp_code = *code; + probed = 1; + } + break; + default: + probed = 1; + break; + } + if (probed) + break; + } +} + static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { @@ -429,6 +474,8 @@ .proto = inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol, }; + raw_probe_proto_opt(&fl, msg); + err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); } if (err) Index: net/ipv4/xfrm4_policy.c =================================================================== RCS file: /cvsroot/usagi/usagi/kernel/linux26/net/ipv4/xfrm4_policy.c,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 xfrm4_policy.c --- net/ipv4/xfrm4_policy.c 19 Jul 2004 16:55:14 -0000 1.1.1.7 +++ net/ipv4/xfrm4_policy.c 9 Aug 2004 08:31:15 -0000 @@ -183,6 +183,15 @@ } break; + case IPPROTO_ICMP: + if (pskb_may_pull(skb, xprth + 2 - skb->data)) { + u8 *icmp = xprth; + + fl->fl_icmp_type = icmp[0]; + fl->fl_icmp_code = icmp[1]; + } + break; + case IPPROTO_ESP: if (pskb_may_pull(skb, xprth + 4 - skb->data)) { u32 *ehdr = (u32 *)xprth; Index: net/ipv6/raw.c =================================================================== RCS file: /cvsroot/usagi/usagi/kernel/linux26/net/ipv6/raw.c,v retrieving revision 1.1.1.35 diff -u -r1.1.1.35 raw.c --- net/ipv6/raw.c 3 Aug 2004 23:01:59 -0000 1.1.1.35 +++ net/ipv6/raw.c 9 Aug 2004 08:31:15 -0000 @@ -555,6 +555,52 @@ IP6_INC_STATS(IPSTATS_MIB_OUTDISCARDS); return err; } + +static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) +{ + struct iovec *iov; + u8 *type = NULL; + u8 *code = NULL; + int probed = 0; + int i; + + if (!msg->msg_iov) + return; + + for (i = 0; i < msg->msg_iovlen; i++) { + iov = &msg->msg_iov[i]; + if (!iov) + continue; + + switch (fl->proto) { + case IPPROTO_ICMPV6: + /* check if one-byte field is readable or not. */ + if (iov->iov_base && iov->iov_len < 1) + break; + + if (!type) { + type = iov->iov_base; + /* check if code field is readable or not. */ + if (iov->iov_len > 1) + code = type + 1; + } else if (!code) + code = iov->iov_base; + + if (type && code) { + fl->fl_icmp_type = *type; + fl->fl_icmp_code = *code; + probed = 1; + } + break; + default: + probed = 1; + break; + } + if (probed) + break; + } +} + static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { @@ -674,6 +720,8 @@ opt = fl6_merge_options(&opt_space, flowlabel, opt); fl.proto = proto; + rawv6_probe_proto_opt(&fl, msg); + ipv6_addr_copy(&fl.fl6_dst, daddr); if (ipv6_addr_any(&fl.fl6_src) && !ipv6_addr_any(&np->saddr)) ipv6_addr_copy(&fl.fl6_src, &np->saddr); Index: net/ipv6/xfrm6_policy.c =================================================================== RCS file: /cvsroot/usagi/usagi/kernel/linux26/net/ipv6/xfrm6_policy.c,v retrieving revision 1.1.1.15 diff -u -r1.1.1.15 xfrm6_policy.c --- net/ipv6/xfrm6_policy.c 3 Aug 2004 23:01:59 -0000 1.1.1.15 +++ net/ipv6/xfrm6_policy.c 9 Aug 2004 08:31:15 -0000 @@ -213,6 +213,16 @@ fl->proto = nexthdr; return; + case IPPROTO_ICMPV6: + if (pskb_may_pull(skb, skb->nh.raw + offset + 2 - skb->data)) { + u8 *icmp = (u8 *)exthdr; + + fl->fl_icmp_type = icmp[0]; + fl->fl_icmp_code = icmp[1]; + } + fl->proto = nexthdr; + return; + /* XXX Why are there these headers? */ case IPPROTO_AH: case IPPROTO_ESP: From yoshfuji@linux-ipv6.org Mon Aug 9 02:02:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 02:02:57 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7992owF023241 for ; Mon, 9 Aug 2004 02:02:51 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 20B7E33CE5; Mon, 9 Aug 2004 18:03:18 +0900 (JST) Date: Mon, 09 Aug 2004 18:03:17 +0900 (JST) Message-Id: <20040809.180317.110200874.yoshfuji@linux-ipv6.org> To: usagi-core@linux-ipv6.org, nakam@linux-ipv6.org Cc: davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040809175404.301bd60a@localhost> References: <20040809175404.301bd60a@localhost> 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: 7582 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: 536 Lines: 12 In article <20040809175404.301bd60a@localhost> (at Mon, 9 Aug 2004 17:54:04 +0900), Masahide Nakamura says: > This patch makes that IPsec policy can be matched by ICMP type and > code. Actually setkey(ipsec-tools) already has their interface so it > follows setkey's manner where type/code are stored in selector. I > added shortcuts for them as a trial. Please read the patch and its log > below first. Sorry, please do not apply this. I notice that this does not seem to work on big-endian archs. --yoshfuji From P@draigBrady.com Mon Aug 9 03:55:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 03:55:26 -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 i79AtKwi028466 for ; Mon, 9 Aug 2004 03:55:21 -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 i79As2wS030148; Mon, 9 Aug 2004 11:54:03 +0100 (IST) (envelope-from P@draigBrady.com) Message-ID: <411757CA.4010401@draigBrady.com> Date: Mon, 09 Aug 2004 11:54:02 +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: e1000-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: strange e1000 interface freeze Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 7583 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: 2613 Lines: 62 I've been able to reproduce an situation here where the interface freezes on a platform where a continuous stream of about 8000 packets per second are being received. It usually takes about 2 days to reproduce, but I've a system in this state now if you have anything you want me to look at. I've reproduced the problem in both 100 and 1000 Mb/s mode, but it seems easier to reproduce in 100 mode? Also usually one but sometimes both interfaces lock up. By lock up I mean that the interface records all packets as fifo errors, and it receives only 1 interrupt every 2 seconds. Note the other NAPI interface works fine (at about 7.5K interrupts/s). The system is E7501 based with an 82546EB running kernel 2.4.20 with the 5.2.52 e1000 driver in NAPI mode. Here are the ethernet settings from one of the dual ports (the other is identical): Intel(R) PRO/1000 Network Driver - version 5.2.52 Copyright (c) 1999-2004 Intel Corporation. e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection e1000: eth1: e1000_validate_option: Transmit Descriptors set to 4096 e1000: eth1: e1000_validate_option: Receive Descriptors set to 4096 e1000: eth1: e1000_validate_option: Checksum Offload Enabled e1000: eth1: e1000_validate_option: Flow Control Disabled e1000: eth1: e1000_validate_option: Transmit Interrupt Delay set to 0 e1000: eth1: e1000_validate_option: Transmit Absolute Interrupt Delay set to 0 e1000: eth1: e1000_validate_option: Receive Interrupt Delay set to 0 e1000: eth1: e1000_validate_option: Receive Absolute Interrupt Delay set to 0 Here is the lspci output for the locked interface. NOTE the pci master abort is set! 05:0c.1 Class 0200: 8086:1010 (rev 01) Subsystem: 8086:1011 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- ; Mon, 9 Aug 2004 06:29:41 -0700 Received: (qmail 9192 invoked by uid 0); 9 Aug 2004 13:29:30 -0000 Received: from 62.245.207.82 by www25.gmx.net with HTTP; Mon, 9 Aug 2004 15:29:30 +0200 (MEST) Date: Mon, 9 Aug 2004 15:29:30 +0200 (MEST) From: "Michael T Kerrisk" To: Fernando Gont Cc: netdev@oss.sgi.com MIME-Version: 1.0 References: <4.3.2.7.2.20040807232436.00d6da60@pop.gmx.net> Subject: Re: SO_REUSEADDR behavior different from BSD X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <16837.1092058170@www25.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-archive-position: 7584 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 968 Lines: 33 > At 11:34 05/08/2004 -0700, YOSHIFUJI Hideaki wrote: > > > > Now, on Linux, at this point, the second instance of the > > > server fails with EADDRINUSE, even though it did use > > > SO_REUSEADDR. On FreeBSD 5.1, the second server instance > > > does successfully bind. > > > >This behavior is intended. > >First socket is REQUIRED to set SO_REUSEADDR > >I hate BSD's behavior because it is asynmetry. > >(Both sockets are required to agree on "REUSEADDR.") > > Not sure what you mean by "asymetry". Ferando, By asymmetry, I understand Hideaki to mean that BSD requires SO_REUSEADDR in the second server bind(), but not the first. the Linux philosophy then appears to be symmetry: both server instances must agree that the socket port is reusable (i.e., both must set SO_REUSEADDR). Cheers, Michael -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From mtk-lists@gmx.net Mon Aug 9 07:38:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 07:38:31 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i79EcN8j016161 for ; Mon, 9 Aug 2004 07:38:24 -0700 Received: (qmail 2819 invoked by uid 0); 9 Aug 2004 14:38:13 -0000 Received: from 62.245.207.82 by www39.gmx.net with HTTP; Mon, 9 Aug 2004 16:38:13 +0200 (MEST) Date: Mon, 9 Aug 2004 16:38:13 +0200 (MEST) From: "Michael T Kerrisk" To: netdev@oss.sgi.com MIME-Version: 1.0 Subject: Strangeness when write()-ing zero-length datagrams X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <19357.1092062293@www39.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-archive-position: 7585 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 1158 Lines: 41 Godday, On Linux 2.4.26 and 2.6.7, if we connect a datagram socket and then use write() to send 0 bytes, a datagram is NOT generated (this happens in both the Unix and Internet domains). Datagrams are generated in this case for send() and sendto() though. As far as I can work out, this occurs because of the following code in net/socket.c::sock_write/sock_aio_write(): if(size==0) /* Match SYS5 behaviour */ return 0; Is the Linux behaviour intended? It seems counterintuitive, and it does not match what I see on other systems: Solaris 8 does not behave like Linux in this case -– a zero length datagram is sent and read by the receiver (tested for Internet and Unix domain sockets). Tru64 5.1 is the same as Solaris 8 (tested for Internet and Unix domain sockets) HP-UX 11 is the same as Solaris 8 (tested for Internet and Unix domain sockets) FreeBSD 4.9 and 5.1 are the same as Solaris 8 (tested for Internet and Unix domain sockets) Cheers, Michael -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From ahu@outpost.ds9a.nl Mon Aug 9 08:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 08:41:32 -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 i79FfIBB022589 for ; Mon, 9 Aug 2004 08:41:18 -0700 Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 655A63FD2; Mon, 9 Aug 2004 17:40:57 +0200 (CEST) Date: Mon, 9 Aug 2004 17:40:57 +0200 From: bert hubert To: Michael T Kerrisk Cc: netdev@oss.sgi.com Subject: Re: Strangeness when write()-ing zero-length datagrams Message-ID: <20040809154057.GA30659@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Michael T Kerrisk , netdev@oss.sgi.com References: <19357.1092062293@www39.gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19357.1092062293@www39.gmx.net> User-Agent: Mutt/1.3.28i X-archive-position: 7586 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: 1236 Lines: 32 On Mon, Aug 09, 2004 at 04:38:13PM +0200, Michael T Kerrisk wrote: > Godday, > > On Linux 2.4.26 and 2.6.7, if we connect a datagram socket and > then use write() to send 0 bytes, a datagram is NOT generated > (this happens in both the Unix and Internet domains). > Datagrams are generated in this case for send() and sendto() > though. Some postings were made about this some time ago, it appears SUS has an opinion on zero byte writes: If nbyte is 0, write() will return 0 and have no other results if the file is a regular file; otherwise, the results are unspecified. http://www.opengroup.org/onlinepubs/007908799/xsh/write.html The send(2) manpage states: The send() function is identical to sendto() with a null pointer dest_len argument, and to write() if no flags are used. Which means that a zero byte send() without flags is unspecified. Also note that it is hard if impossible to usefully inform userspace of the reception of a zery byte packet - returning 0 from recvfrom may also mean an 'orderly shutdown'. Do you actually have a need for zero byte packets? -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From shemminger@osdl.org Mon Aug 9 08:54:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 08:54:13 -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 i79Fs6Tl023108 for ; Mon, 9 Aug 2004 08:54:07 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i79Frm116954; Mon, 9 Aug 2004 08:53:48 -0700 Date: Mon, 9 Aug 2004 08:53:48 -0700 From: Stephen Hemminger To: bert hubert Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan ioctl propagation (rev.2) Message-Id: <20040809085348.11eaa869@dell_ss3.pdx.osdl.net> In-Reply-To: <20040807211036.GA7970@outpost.ds9a.nl> References: <20040806091305.4d405664@dell_ss3.pdx.osdl.net> <20040806132145.675fd17d.davem@redhat.com> <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> <20040807211036.GA7970@outpost.ds9a.nl> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7587 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: 898 Lines: 19 On Sat, 7 Aug 2004 23:10:37 +0200 bert hubert wrote: > On Fri, Aug 06, 2004 at 02:39:28PM -0700, Stephen Hemminger wrote: > > Here is a redo of the patch to propagate ethtool and mii ioctl's > > on vlan's to the underlying real device. This time the request > > is copied to a new buffer, to avoid the colon name rewrite issues. > > Is this really what we want? We also don't make virtual IPs appear as real > interfaces anymore. Virtual devices are just that - virtual. > > -- > http://www.PowerDNS.com Open source, database driven DNS Software > http://lartc.org Linux Advanced Routing & Traffic Control HOWTO The problem is that the bridge code (and bonding) want to be able to send ethtool ioctl's to the device. The bridge wants it to find out the speed of the device to set the spanning tree values appropriately. I would rather not special case VLAN's. From mtk-lists@gmx.net Mon Aug 9 08:59:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 08:59:17 -0700 (PDT) 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 i79Fx97K023505 for ; Mon, 9 Aug 2004 08:59:10 -0700 Received: (qmail 30942 invoked by uid 0); 9 Aug 2004 15:59:00 -0000 Received: from 62.245.207.82 by www39.gmx.net with HTTP; Mon, 9 Aug 2004 17:59:00 +0200 (MEST) Date: Mon, 9 Aug 2004 17:59:00 +0200 (MEST) From: "Michael T Kerrisk" To: bert hubert Cc: netdev@oss.sgi.com MIME-Version: 1.0 References: <20040809154057.GA30659@outpost.ds9a.nl> Subject: Re: Strangeness when write()-ing zero-length datagrams X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <10578.1092067140@www39.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-archive-position: 7588 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 2557 Lines: 83 Bert, > > On Linux 2.4.26 and 2.6.7, if we connect a datagram socket and > > then use write() to send 0 bytes, a datagram is NOT generated > > (this happens in both the Unix and Internet domains). > > Datagrams are generated in this case for send() and sendto() > > though. > > Some postings were made about this some time ago, I didn't find anything with google or archive seach -- do you have any more specific reference on this thread? > it appears SUS has an > opinion on zero byte writes: > > If nbyte is 0, write() will return 0 and have no other results if the > file is a regular file; otherwise, the results are unspecified. > http://www.opengroup.org/onlinepubs/007908799/xsh/write.html > > The send(2) manpage states: > > The send() function is identical to sendto() with a null pointer dest_len > argument, and to write() if no flags are used. > > Which means that a zero byte send() without flags is unspecified. Yes, but on Linux write(fd, buf, 0) != send(fd, buf, 0, 0), which does seem inconsistent. And as I noted, all the other implementations I tested behave differently from Linux. (Just so I'm sure we have our scenarios clear, I'm referring to the following: HOST-A HOST-B create datagram socket bind socket to INADDR_ANY:port-x create datagram socket connect socket to HOST-B:port-x Now the following behave differently: write(fd, buf, 0); send(fd, buf, 0, 0); ) > Also note that it is hard if impossible to usefully inform userspace of > the reception of a zery byte packet - returning 0 from recvfrom may > also mean an 'orderly shutdown'. Am I missing something? There isn't the notion of a true connection with datagram sockets, and so no notion of an orderly shutdown (I am assuming you are meaning some scenario where the peer calls shutdown() or close()). It is straightforward to detect a zero-length datagram: recvfrom() returns 0. > Do you actually have a need for zero byte packets? No, but I discovered this difference during some testing that I was doing, and then observed that it seems different from most (all?) other implementations. It seemed worth documenting this fact. Cheers, Michael -- Michael Kerrisk mtk-lists@gmx.net NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From jt@bougret.hpl.hp.com Mon Aug 9 09:41:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 09:41:50 -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 i79Gfjne025191 for ; Mon, 9 Aug 2004 09:41:45 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id 9EF37400316; Mon, 9 Aug 2004 09:41:37 -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 JAA12164; Mon, 9 Aug 2004 09:43:18 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1BuDDM-0004Yh-00; Mon, 09 Aug 2004 09:41:36 -0700 Date: Mon, 9 Aug 2004 09:41:36 -0700 To: Pedro Ramalhais Cc: Jouni Malinen , hostap@shmoo.com, netdev@oss.sgi.com Subject: Re: Wireless Extensions WE-18 questions Message-ID: <20040809164136.GA17028@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <1091444633.2767.8.camel@rootix> <20040803070843.GB7153@jm.kir.nu> <1091929000.2800.12.camel@rootix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1091929000.2800.12.camel@rootix> 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: 7589 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: 848 Lines: 23 On Sun, Aug 08, 2004 at 02:36:40AM +0100, Pedro Ramalhais wrote: > > This one is more oriented to the design of the wireless extensions and > should probably go to Jean Tourrilhes: > - the switch/case logic (for set_auth/get_auth at least) should really > be in the wireless extensions. Not everybody is using a wireless card, and of those using wireless cards, not all of them are using WPA. Therefore, my goal is to minimise kernel bloat. If you don't like the current situation, there are two avenues : o use different ioctls o use a separate common module to demultiplex the ioctl > PS: I was hoping someone had already answer my e-mail about the creation > of a linux wireless mailing list, and this message would be sent to the > new list... oh well Check the archive of netdev mailing list a few months back. Have fun... Jean From shemminger@osdl.org Mon Aug 9 10:11:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 10:11:42 -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 i79HBbx1026284 for ; Mon, 9 Aug 2004 10:11:37 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i79HBL102639; Mon, 9 Aug 2004 10:11:21 -0700 Date: Mon, 9 Aug 2004 10:11:21 -0700 From: Stephen Hemminger To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: Inaccuracies with SCH_CLK_CPU Message-Id: <20040809101121.5a93a1e2@dell_ss3.pdx.osdl.net> In-Reply-To: <41152301.5090405@trash.net> References: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net> <41152301.5090405@trash.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7590 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: 81 Lines: 1 Thanks, I decided easier and more consistent to handle this in the command line. From kala@pinerecords.com Mon Aug 9 13:16:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 13:16:21 -0700 (PDT) Received: from louise.pinerecords.com (louise.pinerecords.com [213.168.176.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79KGCok001299 for ; Mon, 9 Aug 2004 13:16:14 -0700 Received: from louise.pinerecords.com (localhost [127.0.0.1]) by louise.pinerecords.com with ESMTP id i79KFw3I012458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Aug 2004 22:15:58 +0200 Received: (from kala@localhost) by louise.pinerecords.com (submit) id i79KFuPU012451; Mon, 9 Aug 2004 22:15:56 +0200 Date: Mon, 9 Aug 2004 22:15:56 +0200 From: Tomas Szepe To: Pavel Machek Cc: Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040809201556.GB9677@louise.pinerecords.com> References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040714115523.GC2269@elf.ucw.cz> User-Agent: Mutt/1.4.2.1i X-archive-position: 7591 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: szepe@pinerecords.com Precedence: bulk X-list: netdev Content-Length: 2039 Lines: 73 On Jul-14 2004, Wed, 13:55 +0200 Pavel Machek wrote: > > >What is the status of ipw2100? Is there chance that it would be pushed > > >into mainline? > > > > > >I have few problems with that: > > > > > >* it will not compile with gcc-2.95. Attached patch fixes one problem > > >but more remain. > > > > I've given up hope on that. Don't think it'll ever compile on 2.95. I'm > > using ndiswrapper and it works nicely. > > No, I think that can be fixed... I'll rather fix ipw2100 than use > ndiswrapper. ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." Also make sure to use the attached patch for 2.6.8pre. -- Tomas Szepe diff -urN linux-2.6.7/drivers/net/wireless/ipw2100/ipw2100_fw.c linux-2.6.7.x/drivers/net/wireless/ipw2100/ipw2100_fw.c --- linux-2.6.7/drivers/net/wireless/ipw2100/ipw2100_fw.c 2004-08-09 21:37:11.000000000 +0200 +++ linux-2.6.7.x/drivers/net/wireless/ipw2100/ipw2100_fw.c 2004-08-09 21:36:15.000000000 +0200 @@ -200,7 +200,7 @@ goto fail; } - if (read(fd, c->buf, c->len) != c->len) { + if (sys_read(fd, c->buf, c->len) != c->len) { printk(KERN_INFO "Failed to read chunk firmware " "chunk %d.\n", i); goto fail; @@ -231,17 +231,17 @@ INIT_LIST_HEAD(&fw->fw.chunk_list); INIT_LIST_HEAD(&fw->uc.chunk_list); - fd = open(fn, 0, 0); + fd = sys_open(fn, 0, 0); if (fd == -1) { printk(KERN_INFO "Unable to load '%s'.\n", fn); return 1; } - l = lseek(fd, 0L, 2); - lseek(fd, 0L, 0); + l = sys_lseek(fd, 0L, 2); + sys_lseek(fd, 0L, 0); IPW2100_DEBUG_FW("Loading %ld bytes for firmware '%s'\n", l, fn); - if (read(fd, (char *)&h, sizeof(h)) != sizeof(h)) { + if (sys_read(fd, (char *)&h, sizeof(h)) != sizeof(h)) { printk(KERN_INFO "Failed to read '%s'.\n", fn); goto fail; } @@ -262,12 +262,12 @@ if (ipw2100_fw_load(fd, &fw->uc, h.uc_size)) goto fail; - close(fd); + sys_close(fd); return 0; fail: ipw2100_fw_free(fw); - close(fd); + sys_close(fd); return 1; } From brazilnut@us.ibm.com Mon Aug 9 16:14:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:15:03 -0700 (PDT) Received: from beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79NEmoj007632 for ; Mon, 9 Aug 2004 16:14:57 -0700 Received: by beaverton.ibm.com (Postfix, from userid 1000) id 0739D1F88AC; Mon, 9 Aug 2004 16:12:48 -0700 (PDT) Date: Mon, 9 Aug 2004 16:12:47 -0700 From: Don Fry To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 0/5 2.4.27] pending pcnet32 changes Message-ID: <20040809231247.GA13717@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7592 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brazilnut@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 302 Lines: 12 Please apply these five patches to bring the 2.4 version of pcnet32.c up to date with 2.6. 1 - discard oversize received frames 2 - fix receive hang after tx fifo underruns 3 - cleanup IRQ limitation 4 - add HomePNA parameter for 79C978 5 - correctly program bcr32 -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Aug 9 16:16:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:16:52 -0700 (PDT) Received: from beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79NGjfZ007841 for ; Mon, 9 Aug 2004 16:16:47 -0700 Received: by beaverton.ibm.com (Postfix, from userid 1000) id E4D481F88AC; Mon, 9 Aug 2004 16:14:44 -0700 (PDT) Date: Mon, 9 Aug 2004 16:14:44 -0700 From: Don Fry To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 1 2.4.27] pcnet32: discard oversize rx packets Message-ID: <20040809231444.GB13717@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7593 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brazilnut@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1503 Lines: 44 This patch will discard received frames that are larger than one buffer. Signed-off-by: Don Fry --- linux-2.4.27/drivers/net/orig.pcnet32.c Mon Aug 9 15:41:19 2004 +++ linux-2.4.27/drivers/net/pcnet32.c Mon Aug 9 15:41:31 2004 @@ -22,8 +22,8 @@ *************************************************************************/ #define DRV_NAME "pcnet32" -#define DRV_VERSION "1.30c" -#define DRV_RELDATE "05.25.2004" +#define DRV_VERSION "1.30d" +#define DRV_RELDATE "06.01.2004" #define PFX DRV_NAME ": " static const char *version = @@ -245,6 +245,7 @@ static int full_duplex[MAX_UNITS]; * v1.30b 24 May 2004 Don Fry fix bogus tx carrier errors with 79c973, * assisted by Bruce Penrod . * v1.30c 25 May 2004 Don Fry added netif_wake_queue after pcnet32_restart. + * v1.30d 01 Jun 2004 Don Fry discard oversize rx packets. */ @@ -1904,7 +1905,13 @@ pcnet32_rx(struct net_device *dev) short pkt_len = (le32_to_cpu(lp->rx_ring[entry].msg_length) & 0xfff)-4; struct sk_buff *skb; - if (pkt_len < 60) { + /* Discard oversize frames. */ + if (unlikely(pkt_len > PKT_BUF_SZ - 2)) { + if (netif_msg_drv(lp)) + printk(KERN_ERR "%s: Impossible packet size %d!\n", + dev->name, pkt_len); + lp->stats.rx_errors++; + } else if (pkt_len < 60) { if (netif_msg_rx_err(lp)) printk(KERN_ERR "%s: Runt packet!\n", dev->name); lp->stats.rx_errors++; -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Aug 9 16:17:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:17:46 -0700 (PDT) Received: from beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79NHeVf008154 for ; Mon, 9 Aug 2004 16:17:40 -0700 Received: by beaverton.ibm.com (Postfix, from userid 1000) id ED3D01F88AC; Mon, 9 Aug 2004 16:15:39 -0700 (PDT) Date: Mon, 9 Aug 2004 16:15:39 -0700 From: Don Fry To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 2 2.4.27] pcnet32: recover after rx hang. Message-ID: <20040809231539.GC13717@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7594 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brazilnut@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 5026 Lines: 143 This patch fixes a receive hang that occasionally occurs after a Tx FIFO underrun. The receive dma remains in a hung state sometimes. The transmit operations continue to occur, but no receive activity. This was reproduced on several ppc64 systems and the fix has been verified there. The patch has been tested as well on an ia32 system, which did not experience the hang because it did not have fifo underruns, which is a preqrequisite for the hang. The memory barriers decreased the frequency of occurrence. The final change to reset the chip instead of just stopping it eliminated the last hangs. Signed-off by: brazilnut@us.ibm.com --- linux-2.4.27/drivers/net/large.pcnet32.c Mon Aug 9 15:41:31 2004 +++ linux-2.4.27/drivers/net/pcnet32.c Mon Aug 9 15:41:42 2004 @@ -22,8 +22,8 @@ *************************************************************************/ #define DRV_NAME "pcnet32" -#define DRV_VERSION "1.30d" -#define DRV_RELDATE "06.01.2004" +#define DRV_VERSION "1.30e" +#define DRV_RELDATE "06.11.2004" #define PFX DRV_NAME ": " static const char *version = @@ -246,6 +246,7 @@ static int full_duplex[MAX_UNITS]; * assisted by Bruce Penrod . * v1.30c 25 May 2004 Don Fry added netif_wake_queue after pcnet32_restart. * v1.30d 01 Jun 2004 Don Fry discard oversize rx packets. + * v1.30e 11 Jun 2004 Don Fry recover after fifo error and rx hang. */ @@ -1531,13 +1532,15 @@ pcnet32_purge_tx_ring(struct net_device int i; for (i = 0; i < TX_RING_SIZE; i++) { + lp->tx_ring[i].status = 0; /* CPU owns buffer */ + wmb(); /* Make sure adapter sees owner change */ if (lp->tx_skbuff[i]) { pci_unmap_single(lp->pci_dev, lp->tx_dma_addr[i], lp->tx_skbuff[i]->len, PCI_DMA_TODEVICE); dev_kfree_skb_any(lp->tx_skbuff[i]); - lp->tx_skbuff[i] = NULL; - lp->tx_dma_addr[i] = 0; } + lp->tx_skbuff[i] = NULL; + lp->tx_dma_addr[i] = 0; } } @@ -1566,21 +1569,23 @@ pcnet32_init_ring(struct net_device *dev skb_reserve (rx_skbuff, 2); } + rmb(); if (lp->rx_dma_addr[i] == 0) lp->rx_dma_addr[i] = pci_map_single(lp->pci_dev, rx_skbuff->tail, PKT_BUF_SZ-2, PCI_DMA_FROMDEVICE); lp->rx_ring[i].base = (u32)le32_to_cpu(lp->rx_dma_addr[i]); lp->rx_ring[i].buf_length = le16_to_cpu(2-PKT_BUF_SZ); + wmb(); /* Make sure owner changes after all others are visible */ lp->rx_ring[i].status = le16_to_cpu(0x8000); } /* The Tx buffer address is filled in as needed, but we do need to clear * the upper ownership bit. */ for (i = 0; i < TX_RING_SIZE; i++) { + lp->tx_ring[i].status = 0; /* CPU owns buffer */ + wmb(); /* Make sure adapter sees owner change */ lp->tx_ring[i].base = 0; - lp->tx_ring[i].status = 0; lp->tx_dma_addr[i] = 0; } - wmb(); /* Make sure all changes are visible */ lp->init_block.tlen_rlen = le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); for (i = 0; i < 6; i++) @@ -1589,9 +1594,14 @@ pcnet32_init_ring(struct net_device *dev offsetof(struct pcnet32_private, rx_ring)); lp->init_block.tx_ring = (u32)le32_to_cpu(lp->dma_addr + offsetof(struct pcnet32_private, tx_ring)); + wmb(); /* Make sure all changes are visible */ return 0; } +/* the pcnet32 has been issued a stop or reset. Wait for the stop bit + * then flush the pending transmit operations, re-initialize the ring, + * and tell the chip to initialize. + */ static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits) { @@ -1599,6 +1609,15 @@ pcnet32_restart(struct net_device *dev, unsigned long ioaddr = dev->base_addr; int i; + /* wait for stop */ + for (i=0; i<100; i++) + if (lp->a.read_csr(ioaddr, 0) & 0x0004) + break; + + if (i >= 100 && netif_msg_drv(lp)) + printk(KERN_ERR "%s: pcnet32_restart timed out waiting for stop.\n", + dev->name); + pcnet32_purge_tx_ring(dev); if (pcnet32_init_ring(dev)) return; @@ -1735,7 +1754,7 @@ pcnet32_interrupt(int irq, void *dev_id, spin_lock(&lp->lock); rap = lp->a.read_rap(ioaddr); - while ((csr0 = lp->a.read_csr (ioaddr, 0)) & 0x8600 && --boguscnt >= 0) { + while ((csr0 = lp->a.read_csr (ioaddr, 0)) & 0x8f00 && --boguscnt >= 0) { if (csr0 == 0xffff) { break; /* PCMCIA remove happened */ } @@ -1857,15 +1876,16 @@ pcnet32_interrupt(int irq, void *dev_id, } if (must_restart) { - /* stop the chip to clear the error condition, then restart */ - lp->a.write_csr (ioaddr, 0, 0x0004); + /* reset the chip to clear the error condition, then restart */ + lp->a.reset(ioaddr); + lp->a.write_csr(ioaddr, 4, 0x0915); pcnet32_restart(dev, 0x0002); netif_wake_queue(dev); } } - /* Clear any other interrupt, and set interrupt enable. */ - lp->a.write_csr (ioaddr, 0, 0x7940); + /* Set interrupt enable. */ + lp->a.write_csr (ioaddr, 0, 0x0040); lp->a.write_rap (ioaddr,rap); if (netif_msg_intr(lp)) -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Aug 9 16:18:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:18:41 -0700 (PDT) Received: from beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79NIZHD008482 for ; Mon, 9 Aug 2004 16:18:36 -0700 Received: by beaverton.ibm.com (Postfix, from userid 1000) id E3E0B1F88AC; Mon, 9 Aug 2004 16:16:35 -0700 (PDT) Date: Mon, 9 Aug 2004 16:16:35 -0700 From: Don Fry To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 3 2.4.27] pcnet32: cleanup IRQ limitation Message-ID: <20040809231635.GD13717@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7595 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brazilnut@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 3358 Lines: 95 Cleanup pcnet32 IRQ handling based on suggestions from Ralf Baechle and Brian Murphy Tested by myself and Brian Murphy. Signed-off-by: Don Fry --- linux-2.4.27/drivers/net/hung.pcnet32.c Mon Aug 9 15:41:42 2004 +++ linux-2.4.27/drivers/net/pcnet32.c Mon Aug 9 15:41:52 2004 @@ -22,8 +22,8 @@ *************************************************************************/ #define DRV_NAME "pcnet32" -#define DRV_VERSION "1.30e" -#define DRV_RELDATE "06.11.2004" +#define DRV_VERSION "1.30f" +#define DRV_RELDATE "06.16.2004" #define PFX DRV_NAME ": " static const char *version = @@ -247,6 +247,9 @@ static int full_duplex[MAX_UNITS]; * v1.30c 25 May 2004 Don Fry added netif_wake_queue after pcnet32_restart. * v1.30d 01 Jun 2004 Don Fry discard oversize rx packets. * v1.30e 11 Jun 2004 Don Fry recover after fifo error and rx hang. + * v1.30f 16 Jun 2004 Don Fry cleanup IRQ to allow 0 and 1 for PCI, + * expanding on suggestions from Ralf Baechle , + * and Brian Murphy . */ @@ -362,7 +365,7 @@ struct pcnet32_private { static void pcnet32_probe_vlbus(void); static int pcnet32_probe_pci(struct pci_dev *, const struct pci_device_id *); -static int pcnet32_probe1(unsigned long, unsigned int, int, struct pci_dev *); +static int pcnet32_probe1(unsigned long, int, struct pci_dev *); static int pcnet32_open(struct net_device *); static int pcnet32_init_ring(struct net_device *); static int pcnet32_start_xmit(struct sk_buff *, struct net_device *); @@ -959,7 +962,7 @@ pcnet32_probe_vlbus(void) if (request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_vlbus")) { /* check if there is really a pcnet chip on that ioaddr */ if ((inb(ioaddr + 14) == 0x57) && (inb(ioaddr + 15) == 0x57)) { - pcnet32_probe1(ioaddr, 0, 0, NULL); + pcnet32_probe1(ioaddr, 0, NULL); } else { release_region(ioaddr, PCNET32_TOTAL_SIZE); } @@ -1000,7 +1003,7 @@ pcnet32_probe_pci(struct pci_dev *pdev, return -EBUSY; } - return pcnet32_probe1(ioaddr, pdev->irq, 1, pdev); + return pcnet32_probe1(ioaddr, 1, pdev); } @@ -1009,8 +1012,7 @@ pcnet32_probe_pci(struct pci_dev *pdev, * pdev will be NULL when called from pcnet32_probe_vlbus. */ static int __devinit -pcnet32_probe1(unsigned long ioaddr, unsigned int irq_line, int shared, - struct pci_dev *pdev) +pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) { struct pcnet32_private *lp; dma_addr_t lp_dma_addr; @@ -1271,11 +1273,8 @@ pcnet32_probe1(unsigned long ioaddr, uns a->write_csr(ioaddr, 2, (lp->dma_addr + offsetof(struct pcnet32_private, init_block)) >> 16); - if (irq_line) { - dev->irq = irq_line; - } - - if (dev->irq >= 2) { + if (pdev) { /* use the IRQ provided by PCI */ + dev->irq = pdev->irq; if (pcnet32_debug & NETIF_MSG_PROBE) printk(" assigned IRQ %d.\n", dev->irq); } else { @@ -1363,8 +1362,7 @@ pcnet32_open(struct net_device *dev) int rc; unsigned long flags; - if (dev->irq == 0 || - request_irq(dev->irq, &pcnet32_interrupt, + if (request_irq(dev->irq, &pcnet32_interrupt, lp->shared_irq ? SA_SHIRQ : 0, dev->name, (void *)dev)) { return -EAGAIN; } -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Aug 9 16:19:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:19:39 -0700 (PDT) Received: from beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79NJXhk011944 for ; Mon, 9 Aug 2004 16:19:33 -0700 Received: by beaverton.ibm.com (Postfix, from userid 1000) id 4DDDA1F88AC; Mon, 9 Aug 2004 16:17:33 -0700 (PDT) Date: Mon, 9 Aug 2004 16:17:33 -0700 From: Don Fry To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978. Message-ID: <20040809231733.GE13717@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7596 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brazilnut@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 3058 Lines: 74 This patch adds a module parameter to select HomePNA mode of operation for the 79C978 version of the pcnet32. Tested ia32. signed-off-by: Patrick Simmons signed-off-by: Don Fry --- linux-2.4.27/drivers/net/ints.pcnet32.c Mon Aug 9 15:41:52 2004 +++ linux-2.4.27/drivers/net/pcnet32.c Mon Aug 9 15:42:04 2004 @@ -22,8 +22,8 @@ *************************************************************************/ #define DRV_NAME "pcnet32" -#define DRV_VERSION "1.30f" -#define DRV_RELDATE "06.16.2004" +#define DRV_VERSION "1.30g" +#define DRV_RELDATE "06.22.2004" #define PFX DRV_NAME ": " static const char *version = @@ -137,6 +137,7 @@ static const char pcnet32_gstrings_test[ #define MAX_UNITS 8 /* More are supported, limit only on options */ static int options[MAX_UNITS]; static int full_duplex[MAX_UNITS]; +static int homepna[MAX_UNITS]; /* * Theory of Operation @@ -250,6 +251,8 @@ static int full_duplex[MAX_UNITS]; * v1.30f 16 Jun 2004 Don Fry cleanup IRQ to allow 0 and 1 for PCI, * expanding on suggestions from Ralf Baechle , * and Brian Murphy . + * v1.30g 22 Jun 2004 Patrick Simmons added option + * homepna for selecting HomePNA mode for PCNet/Home 79C978. */ @@ -1083,15 +1086,17 @@ pcnet32_probe1(unsigned long ioaddr, int fdx = 1; /* * This is based on specs published at www.amd.com. This section - * assumes that a card with a 79C978 wants to go into 1Mb HomePNA - * mode. The 79C978 can also go into standard ethernet, and there - * probably should be some sort of module option to select the - * mode by which the card should operate + * assumes that a card with a 79C978 wants to go into standard + * ethernet mode. The 79C978 can also go into 1Mb HomePNA mode, + * and the module option homepna=1 can select this instead. */ - /* switch to home wiring mode */ media = a->read_bcr(ioaddr, 49); + media &= ~3; /* default to 10Mb ethernet */ + if (cards_found < MAX_UNITS && homepna[cards_found]) + media |= 1; /* switch to home wiring mode */ if (pcnet32_debug & NETIF_MSG_PROBE) - printk(KERN_DEBUG PFX "media reset to %#x.\n", media); + printk(KERN_DEBUG PFX "media set to %dMbit mode.\n", + (media & 1) ? 1 : 10); a->write_bcr(ioaddr, 49, media); break; case 0x2627: @@ -2255,6 +2260,9 @@ MODULE_PARM(options, "1-" __MODULE_STRIN MODULE_PARM_DESC(options, DRV_NAME " initial option setting(s) (0-15)"); MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM_DESC(full_duplex, DRV_NAME " full duplex setting(s) (1)"); +/* Module Parameter for HomePNA cards added by Patrick Simmons, 2004 */ +MODULE_PARM(homepna,"1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM_DESC(homepna, DRV_NAME " mode for 79C978 cards (1 for HomePNA, 0 for Ethernet, default Ethernet"); MODULE_AUTHOR("Thomas Bogendoerfer"); MODULE_DESCRIPTION("Driver for PCnet32 and PCnetPCI based ethercards"); -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Aug 9 16:20:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:20:27 -0700 (PDT) Received: from beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79NKMbN012259 for ; Mon, 9 Aug 2004 16:20:22 -0700 Received: by beaverton.ibm.com (Postfix, from userid 1000) id C41461F88AC; Mon, 9 Aug 2004 16:18:21 -0700 (PDT) Date: Mon, 9 Aug 2004 16:18:21 -0700 From: Don Fry To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 5 2.4.27] pcnet32: correctly program bcr32. Message-ID: <20040809231821.GF13717@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7597 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brazilnut@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2079 Lines: 54 The pcnet32 driver was not correctly enabling MII autonegotiation after booting when ppc firmware forced the speed/duplex mode of the chip. After several conversations with AMD this patch corrects the problem. Signed-off-by: Don Fry --- linux-2.4.27/drivers/net/home.pcnet32.c Mon Aug 9 15:42:04 2004 +++ linux-2.4.27/drivers/net/pcnet32.c Mon Aug 9 15:42:09 2004 @@ -22,8 +22,8 @@ *************************************************************************/ #define DRV_NAME "pcnet32" -#define DRV_VERSION "1.30g" -#define DRV_RELDATE "06.22.2004" +#define DRV_VERSION "1.30h" +#define DRV_RELDATE "06.24.2004" #define PFX DRV_NAME ": " static const char *version = @@ -253,6 +253,7 @@ static int homepna[MAX_UNITS]; * and Brian Murphy . * v1.30g 22 Jun 2004 Patrick Simmons added option * homepna for selecting HomePNA mode for PCNet/Home 79C978. + * v1.30h 24 Jun 2004 Don Fry correctly select auto, speed, duplex in bcr32. */ @@ -1421,9 +1422,13 @@ pcnet32_open(struct net_device *dev) val |= 0x10; lp->a.write_csr (ioaddr, 124, val); + /* 24 Jun 2004 according AMD, in order to change the PHY, + * DANAS (or DISPM for 79C976) must be set; then select the speed, + * duplex, and/or enable auto negotiation, and clear DANAS */ if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) { + lp->a.write_bcr(ioaddr, 32, lp->a.read_bcr(ioaddr, 32) | 0x0080); /* disable Auto Negotiation, set 10Mpbs, HD */ - val = lp->a.read_bcr (ioaddr, 32) & ~0x38; + val = lp->a.read_bcr(ioaddr, 32) & ~0xb8; if (lp->options & PCNET32_PORT_FD) val |= 0x10; if (lp->options & PCNET32_PORT_100) @@ -1431,6 +1436,7 @@ pcnet32_open(struct net_device *dev) lp->a.write_bcr (ioaddr, 32, val); } else { if (lp->options & PCNET32_PORT_ASEL) { + lp->a.write_bcr(ioaddr, 32, lp->a.read_bcr(ioaddr, 32) | 0x0080); /* enable auto negotiate, setup, disable fd */ val = lp->a.read_bcr(ioaddr, 32) & ~0x98; val |= 0x20; -- Don Fry brazilnut@us.ibm.com From davem@redhat.com Mon Aug 9 16:37:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:37:16 -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 i79NbAhV012878 for ; Mon, 9 Aug 2004 16:37:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79Name1004427; Mon, 9 Aug 2004 19:36:48 -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 i79Nama32466; Mon, 9 Aug 2004 19:36:48 -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 i79Na0gu011401; Mon, 9 Aug 2004 19:36:01 -0400 Date: Mon, 9 Aug 2004 16:35:20 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: kazunori@miyazawa.org, herbert@gondor.apana.org.au, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, yoshfuji@linux-ipv6.org Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup Message-Id: <20040809163520.2873a3c8.davem@redhat.com> In-Reply-To: <20040803.020015.44364045.yoshfuji@linux-ipv6.org> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040801195135.16734846.davem@redhat.com> <20040803.020015.44364045.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 i79NbAhV012878 X-archive-position: 7598 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: 1169 Lines: 38 On Tue, 03 Aug 2004 02:00:15 -0700 (PDT) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > In article <20040801195135.16734846.davem@redhat.com> (at Sun, 1 Aug 2004 19:51:35 -0700), "David S. Miller" says: > > > On Fri, 30 Jul 2004 17:12:05 +0900 > > Kazunori Miyazawa wrote: > > > > > I consider copying flowi(fl_rt) uses too much stack at the moment. > > > I'll re-send the fixed patch again. > > > > I agree, and let's defer this patch until we > > resolve that. > > Is the overhead for allocating memory okay? > Or, do we allcoate some per-cpu memory while ipv6.o initalization phase? > (check: lock? preemption?) > Or, will we allocate fl (and fl_rt) per sock{} (ipv6_pinfo{})? > (ditto.) > > We have similar stack usage in other codes, and > I would fix them at the same time. I think memory allocation will make it worse. Instead, I would try to arrange order of events such that single stack copy can be modified. Something like: fl.foo = a; fl.bar = b; x = flow_lookup(&fl); fl.foo = a_2; y = other_lookup(&fl); And I believe this is possible in most if not all of these cases. From davem@redhat.com Mon Aug 9 16:47:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:47:09 -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 i79Nl4IP013302 for ; Mon, 9 Aug 2004 16:47:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79Nkte1006402; Mon, 9 Aug 2004 19:46:55 -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 i79Nksa02261; Mon, 9 Aug 2004 19:46:54 -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 i79Nk7ke016610; Mon, 9 Aug 2004 19:46:07 -0400 Date: Mon, 9 Aug 2004 16:45:27 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan ioctl propagation (rev.2) Message-Id: <20040809164527.66c2bf82.davem@redhat.com> In-Reply-To: <20040806143928.711d92eb@dell_ss3.pdx.osdl.net> References: <20040806091305.4d405664@dell_ss3.pdx.osdl.net> <20040806132145.675fd17d.davem@redhat.com> <20040806143928.711d92eb@dell_ss3.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: 7599 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: 294 Lines: 8 On Fri, 6 Aug 2004 14:39:28 -0700 Stephen Hemminger wrote: > Here is a redo of the patch to propagate ethtool and mii ioctl's > on vlan's to the underlying real device. This time the request > is copied to a new buffer, to avoid the colon name rewrite issues. Applied. From davem@redhat.com Mon Aug 9 16:48:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:48:40 -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 i79NmZv6013527 for ; Mon, 9 Aug 2004 16:48:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79NmRe1006731; Mon, 9 Aug 2004 19:48:27 -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 i79NmMa02694; Mon, 9 Aug 2004 19:48:22 -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 i79NlZql017316; Mon, 9 Aug 2004 19:47:35 -0400 Date: Mon, 9 Aug 2004 16:46:54 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: greearb@candelatech.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (2/3) vlan propogate carrier and hotplug state Message-Id: <20040809164654.4b012dc1.davem@redhat.com> In-Reply-To: <20040803134014.7164280c@dell_ss3.pdx.osdl.net> References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> <410FD348.9040301@candelatech.com> <20040803134014.7164280c@dell_ss3.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: 7600 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: 335 Lines: 8 On Tue, 3 Aug 2004 13:40:14 -0700 Stephen Hemminger wrote: > The bridge STP code now wants to handle device's getting connected/disconnected > and this includes vlan devices. This patch makes the VLAN pseudo device state > mirror the state of the real device. Only bothered with carrier and hotplug. Applied. From davem@redhat.com Mon Aug 9 16:49:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:49: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 i79Nne2O013783 for ; Mon, 9 Aug 2004 16:49:43 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79NnXe1006945; Mon, 9 Aug 2004 19:49:33 -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 i79NnWa02902; Mon, 9 Aug 2004 19:49:32 -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 i79NmjuR017637; Mon, 9 Aug 2004 19:48:45 -0400 Date: Mon, 9 Aug 2004 16:48:05 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: greearb@candelatech.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (3/3) vlan - use RCU Message-Id: <20040809164805.57f02f81.davem@redhat.com> In-Reply-To: <20040803134346.341e5636@dell_ss3.pdx.osdl.net> References: <20040803105017.0774e1db@dell_ss3.pdx.osdl.net> <410FD348.9040301@candelatech.com> <20040803134346.341e5636@dell_ss3.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: 7601 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: 409 Lines: 11 On Tue, 3 Aug 2004 13:43:46 -0700 Stephen Hemminger wrote: > This patch makes VLAN use RCU for the group lookup and removes > the group_lock. Since all operations that are done under group_lock > already have the rtnetlink semaphore (RTNL), the group_lock is unnecessary. > The result is the vlan code becomes basically lock free in the send/receive > path. Applied, thanks Stephen. From davem@redhat.com Mon Aug 9 16:50:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:50:46 -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 i79NogJd014122 for ; Mon, 9 Aug 2004 16:50:42 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79NoTe1007141; Mon, 9 Aug 2004 19:50:29 -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 i79NoTa03207; Mon, 9 Aug 2004 19:50: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 i79Nngga017960; Mon, 9 Aug 2004 19:49:42 -0400 Date: Mon, 9 Aug 2004 16:49:01 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: greearb@candelatech.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan - device refcount bug. Message-Id: <20040809164901.105a9e95.davem@redhat.com> In-Reply-To: <20040803131425.503f8f45@dell_ss3.pdx.osdl.net> References: <20040803131425.503f8f45@dell_ss3.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: 7602 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: 322 Lines: 8 On Tue, 3 Aug 2004 13:14:25 -0700 Stephen Hemminger wrote: > If you rmmod a network device that is in a vlan, the system hangs waiting > for the refcount to go to zero, because it is -1. The problem is that the > vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier. Applied. From davem@redhat.com Mon Aug 9 16:50:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:51: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 i79Not8g014256 for ; Mon, 9 Aug 2004 16:50:57 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79Nole1007260; Mon, 9 Aug 2004 19:50:47 -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 i79Nola03277; Mon, 9 Aug 2004 19:50:47 -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 i79No0Vl018097; Mon, 9 Aug 2004 19:50:00 -0400 Date: Mon, 9 Aug 2004 16:49:20 -0700 From: "David S. Miller" To: Ben Greear Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] vlan - device refcount bug. Message-Id: <20040809164920.54f68bc2.davem@redhat.com> In-Reply-To: <410FF740.5060903@candelatech.com> References: <20040803131425.503f8f45@dell_ss3.pdx.osdl.net> <410FF740.5060903@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: 7603 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: 532 Lines: 13 On Tue, 03 Aug 2004 13:36:16 -0700 Ben Greear wrote: > Stephen Hemminger wrote: > > If you rmmod a network device that is in a vlan, the system hangs waiting > > for the refcount to go to zero, because it is -1. The problem is that the > > vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier. > > Good catch. It would seem to me that it would be good to have a > BUG() or similar to catch any instance of the reference count going > negative. I'd likely accept such a patch. :-) From davem@redhat.com Mon Aug 9 16:53:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 16:53:10 -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 i79Nr26E014911 for ; Mon, 9 Aug 2004 16:53:03 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79Nqhe1007665; Mon, 9 Aug 2004 19:52:43 -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 i79Nqha03886; Mon, 9 Aug 2004 19:52:43 -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 i79NptET018869; Mon, 9 Aug 2004 19:51:56 -0400 Date: Mon, 9 Aug 2004 16:51:15 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com, ebs@ebshome.net Subject: Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete() Message-Id: <20040809165115.5eff4e98.davem@redhat.com> In-Reply-To: <20040805212421.GA4689@gondor.apana.org.au> References: <20040805071459.GA31551@gate.ebshome.net> <20040805160144.GA28597@gate.ebshome.net> <20040805212421.GA4689@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: 7604 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: 511 Lines: 17 On Fri, 6 Aug 2004 07:24:21 +1000 Herbert Xu wrote: > On Thu, Aug 05, 2004 at 09:01:44AM -0700, Eugene Surovegin wrote: > > On Thu, Aug 05, 2004 at 10:01:40PM +1000, Herbert Xu wrote: > > > Please add a dir < XFRM_POLICY_MAX check before the atomic_inc so that > > > dying sockets with policies don't blow away the flow cache. > > > > Ohh, you're right :). Updated patch follows. > > Thanks. > > Dave, please apply Eugene's patch to fix hard policy expiration. Done. Thanks. From davem@redhat.com Mon Aug 9 17:07:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 17:07:32 -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 i7A07Qd8015428 for ; Mon, 9 Aug 2004 17:07:27 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7A07Le1010279; Mon, 9 Aug 2004 20:07:21 -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 i7A07La06931; Mon, 9 Aug 2004 20:07:21 -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 i7A06YWY025323; Mon, 9 Aug 2004 20:06:34 -0400 Date: Mon, 9 Aug 2004 17:05:53 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH]: Disable local bh's when grabing qdisc_tree_lock in tc_dump_tfilter Message-Id: <20040809170553.5e958dfa.davem@redhat.com> In-Reply-To: <41163E5E.8060004@trash.net> References: <41163E5E.8060004@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: 7605 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: 160 Lines: 6 On Sun, 08 Aug 2004 16:53:18 +0200 Patrick McHardy wrote: > I missed this one when fixing locking in __qdisc_destroy. Ok, applied. Thanks. From davem@redhat.com Mon Aug 9 17:08:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 17:08: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 i7A08ew9015627 for ; Mon, 9 Aug 2004 17:08:42 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7A08Xe1010460; Mon, 9 Aug 2004 20:08:33 -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 i7A08Xa07036; Mon, 9 Aug 2004 20:08:33 -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 i7A07kNv025630; Mon, 9 Aug 2004 20:07:46 -0400 Date: Mon, 9 Aug 2004 17:07:05 -0700 From: "David S. Miller" To: Masahide Nakamura Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code Message-Id: <20040809170705.6ab75c5f.davem@redhat.com> In-Reply-To: <20040809175404.301bd60a@localhost> References: <20040809175404.301bd60a@localhost> 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: 7606 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: 472 Lines: 11 On Mon, 9 Aug 2004 17:54:04 +0900 Masahide Nakamura wrote: > Thinking of raw socket (in outbound case), the patch supports only > ICMP; it is out of scope such packet as user-land builds non-ICMP data > (e.g. TCP/UDP) and sends through raw socket. IMO this behavior is > enough, however does anybody have comments? Truly %100 RAW sockets should have their packets untouched by the kernel. User wants exactly that packet to be sent onto the wire. From yoshfuji@linux-ipv6.org Mon Aug 9 18:32:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 18:32:10 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7A1W22J017348 for ; Mon, 9 Aug 2004 18:32:05 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id C562733CE5; Tue, 10 Aug 2004 10:32:30 +0900 (JST) Date: Tue, 10 Aug 2004 10:32:29 +0900 (JST) Message-Id: <20040810.103229.128092044.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040809170705.6ab75c5f.davem@redhat.com> References: <20040809175404.301bd60a@localhost> <20040809170705.6ab75c5f.davem@redhat.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: 7607 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: 623 Lines: 17 In article <20040809170705.6ab75c5f.davem@redhat.com> (at Mon, 9 Aug 2004 17:07:05 -0700), "David S. Miller" says: > Truly %100 RAW sockets should have their packets untouched by > the kernel. User wants exactly that packet to be sent onto > the wire. Does it make sense to excude IPPPROTO_RAW sockets and/or hdrincl sockets, which would be 100% truly raw socket? Or, do we add some socket option for this? Mip6 is required to exchange ipsec'ed datagrams (!= IPPROTO_RAW). (as I told you at Networking Summit if I remember correctly), so we need some sort of the patch, anyway. Thanks. --yoshfuji From yoshfuji@linux-ipv6.org Mon Aug 9 18:38:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 18:38:09 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7A1c20q017722 for ; Mon, 9 Aug 2004 18:38:03 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id EB9F233CE5; Tue, 10 Aug 2004 10:38:30 +0900 (JST) Date: Tue, 10 Aug 2004 10:38:30 +0900 (JST) Message-Id: <20040810.103830.13065766.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: kazunori@miyazawa.org, herbert@gondor.apana.org.au, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040809163520.2873a3c8.davem@redhat.com> References: <20040801195135.16734846.davem@redhat.com> <20040803.020015.44364045.yoshfuji@linux-ipv6.org> <20040809163520.2873a3c8.davem@redhat.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: 7608 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: 372 Lines: 11 In article <20040809163520.2873a3c8.davem@redhat.com> (at Mon, 9 Aug 2004 16:35:20 -0700), "David S. Miller" says: > Instead, I would try to arrange order of events such that > single stack copy can be modified. Something like: Thanks for clarification. Miyazawa-san will take care of this when he has returned from another conference. --yoshfuji From rlrevell@joe-job.com Mon Aug 9 19:08:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 19:08:12 -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 i7A284rh018449 for ; Mon, 9 Aug 2004 19:08:07 -0700 Received: (qmail 22848 invoked from network); 10 Aug 2004 02:07:59 -0000 Received: from unknown (HELO ?192.168.2.102?) (207.245.115.154) by mustang with SMTP; 10 Aug 2004 02:07:59 -0000 Subject: Re: [0/3] via-rhine: experimental patches From: Lee Revell To: Roger Luethi Cc: Jeff Garzik , netdev@oss.sgi.com, linux-kernel In-Reply-To: <20040808140216.GA8181@k3.hellgate.ch> References: <20040808140216.GA8181@k3.hellgate.ch> Content-Type: text/plain Message-Id: <1092103694.761.5.camel@mindpipe> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 09 Aug 2004 22:08:14 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7609 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: 375 Lines: 12 On Sun, 2004-08-08 at 10:02, Roger Luethi wrote: > The following batch needs testing. I don't expect any notable > regressions, but I could do with some reports on WOL (already in -mm) > and suspend/resume. > Maybe this is a known issue by now, but the via-rhine bug is still not fixed in 2.6.8-rc3. I had to replace it with the via-rhine.c from -mm2 to get online. Lee From jeffchua@silk.corp.fedex.com Mon Aug 9 22:04:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 22:05: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 i7A54wcY030881 for ; Mon, 9 Aug 2004 22:04:58 -0700 Received: from inet03.prod.fedex.com (inet03.prod.fedex.com [199.81.10.43]) by mx13.sac.fedex.com (8.12.9p2/8.12.9) with ESMTP id i7A54ovp021675 for ; Tue, 10 Aug 2004 00:04:51 -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 i7A54mcU028206; Tue, 10 Aug 2004 00:04:49 -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 2004081013044623:6956 ; Tue, 10 Aug 2004 13:04:46 +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 i7A52pf00493; Tue, 10 Aug 2004 13:02:51 +0800 Date: Tue, 10 Aug 2004 13:02:07 +0800 (SGT) From: Jeff Chua X-X-Sender: root@boston.corp.fedex.com To: Tomas Szepe cc: Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver In-Reply-To: <20040809201556.GB9677@louise.pinerecords.com> Message-ID: References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 08/10/2004 01:04:46 PM, Serialize by Router on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 08/10/2004 01:04:49 PM, Serialize complete at 08/10/2004 01:04:49 PM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 7610 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: 318 Lines: 15 On Mon, 9 Aug 2004, Tomas Szepe wrote: > ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." Well, this is really good news! I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. Looks good. Thanks, Jeff From mcgrof@studorgs.rutgers.edu Mon Aug 9 22:26:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 22:26:33 -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 i7A5QRTm031651 for ; Mon, 9 Aug 2004 22:26:27 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 30CADF99BD; Tue, 10 Aug 2004 01:26:22 -0400 (EDT) Date: Tue, 10 Aug 2004 01:26:22 -0400 To: Jeff Garzik Cc: "Luis R. Rodriguez" , Marcelo Tosatti , Netdev , prism54-devel@prism54.org Subject: Re: [PATCH 2.4.26] add prism54 to 2.4 tree Message-ID: <20040810052622.GZ26262@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , "Luis R. Rodriguez" , Marcelo Tosatti , Netdev , prism54-devel@prism54.org References: <20040715005140.GH14482@ruslug.rutgers.edu> <20040720132453.GA2348@dmt.cyclades> <20040721093406.GB9141@ruslug.rutgers.edu> <41068C49.9070406@pobox.com> <20040809043056.GU26262@ruslug.rutgers.edu> <41170430.60307@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41170430.60307@pobox.com> 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: 7611 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: 798 Lines: 28 On Mon, Aug 09, 2004 at 12:57:20AM -0400, Jeff Garzik wrote: > Luis R. Rodriguez wrote: > >Marcelo/Jeff, > > > >2.4.27 is out now and I did not see prism54 go in. What happened? > > > > Luis > > > >On Tue, Jul 27, 2004 at 01:09:29PM -0400, Jeff Garzik wrote: > > > >>Sure, it is now queued for Marcelo. > >> > >>Note that it won't be sent to him until the current Release Candidate > >>cycle is completed. > > > The release candidate cycle is now complete, and 2.4.27 is released, > which means _now_ it is OK to submit non-bug-fix items such as new drivers. > > Jeff Nothing required on our end then right, you've queue'd up the patch for him? Just want to make sure it goes through for 2.4.28. Thanks, Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From SRS0+8d5f2b72f9e602001e8a+352+infradead.org+hch@phoenix-075559.srs.infradead.org Mon Aug 9 23:56:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 09 Aug 2004 23:56:26 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7A6uJmo002309 for ; Mon, 9 Aug 2004 23:56:21 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1BuQYB-0003gY-3k; Tue, 10 Aug 2004 07:55:59 +0100 Date: Tue, 10 Aug 2004 07:55:59 +0100 From: Christoph Hellwig To: Jeff Chua Cc: Tomas Szepe , Pavel Machek , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040810075558.A14154@infradead.org> Mail-Followup-To: Christoph Hellwig , Jeff Chua , Tomas Szepe , Pavel Machek , netdev@oss.sgi.com, kernel list References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.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 jeffchua@silk.corp.fedex.com on Tue, Aug 10, 2004 at 01:02:07PM +0800 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7612 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: 515 Lines: 14 On Tue, Aug 10, 2004 at 01:02:07PM +0800, Jeff Chua wrote: > > On Mon, 9 Aug 2004, Tomas Szepe wrote: > > > ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." > > Well, this is really good news! > > I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my > IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. Btw, any vounteer for merging the hostap-based generic ieee80211_* files from the ipw2100 driver with the hostap driver in the wireless-2.6 tree? From rl@hellgate.ch Tue Aug 10 00:11:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 00:11:20 -0700 (PDT) Received: from mail1.bluewin.ch (mail1.bluewin.ch [195.186.1.74]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7A7B3Io003360 for ; Tue, 10 Aug 2004 00:11:04 -0700 Received: from k3.hellgate.ch (62.202.75.63) by mail1.bluewin.ch (Bluewin AG 7.0.030.2) id 4117D07400009092; Tue, 10 Aug 2004 07:10:50 +0000 Received: by k3.hellgate.ch (Postfix, from userid 1000) id 28274A203DD; Tue, 10 Aug 2004 09:10:50 +0200 (CEST) Date: Tue, 10 Aug 2004 09:10:50 +0200 From: Roger Luethi To: Lee Revell Cc: Jeff Garzik , netdev@oss.sgi.com, linux-kernel Subject: Re: [0/3] via-rhine: experimental patches Message-ID: <20040810071050.GC11224@k3.hellgate.ch> Mail-Followup-To: Lee Revell , Jeff Garzik , netdev@oss.sgi.com, linux-kernel References: <20040808140216.GA8181@k3.hellgate.ch> <1092103694.761.5.camel@mindpipe> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1092103694.761.5.camel@mindpipe> X-Operating-System: Linux 2.6.8-rc3-mm1 on i686 X-GPG-Fingerprint: 92 F4 DC 20 57 46 7B 95 24 4E 9E E7 5A 54 DC 1B X-GPG: 1024/80E744BD wwwkeys.ch.pgp.net User-Agent: Mutt/1.5.6i X-archive-position: 7613 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rl@hellgate.ch Precedence: bulk X-list: netdev Content-Length: 576 Lines: 14 On Mon, 09 Aug 2004 22:08:14 -0400, Lee Revell wrote: > On Sun, 2004-08-08 at 10:02, Roger Luethi wrote: > > The following batch needs testing. I don't expect any notable > > regressions, but I could do with some reports on WOL (already in -mm) > > and suspend/resume. > > Maybe this is a known issue by now, but the via-rhine bug is still not > fixed in 2.6.8-rc3. I had to replace it with the via-rhine.c from -mm2 > to get online. It is known. The fix for that bug is simmering in the pipeline somewhere. The experimental patches OTOH were for -mm and unrelated. Roger From rlrevell@joe-job.com Tue Aug 10 00:15:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 00:16:08 -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 i7A7FuvO003789 for ; Tue, 10 Aug 2004 00:15:56 -0700 Received: (qmail 3529 invoked from network); 10 Aug 2004 07:15:51 -0000 Received: from unknown (HELO ?192.168.2.102?) (207.245.115.154) by mustang with SMTP; 10 Aug 2004 07:15:51 -0000 Subject: Re: [0/3] via-rhine: experimental patches From: Lee Revell To: Roger Luethi Cc: Jeff Garzik , netdev@oss.sgi.com, linux-kernel In-Reply-To: <20040810071050.GC11224@k3.hellgate.ch> References: <20040808140216.GA8181@k3.hellgate.ch> <1092103694.761.5.camel@mindpipe> <20040810071050.GC11224@k3.hellgate.ch> Content-Type: text/plain Message-Id: <1092122167.829.7.camel@mindpipe> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 10 Aug 2004 03:16:08 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7614 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: 739 Lines: 20 On Tue, 2004-08-10 at 03:10, Roger Luethi wrote: > On Mon, 09 Aug 2004 22:08:14 -0400, Lee Revell wrote: > > On Sun, 2004-08-08 at 10:02, Roger Luethi wrote: > > > The following batch needs testing. I don't expect any notable > > > regressions, but I could do with some reports on WOL (already in -mm) > > > and suspend/resume. > > > > Maybe this is a known issue by now, but the via-rhine bug is still not > > fixed in 2.6.8-rc3. I had to replace it with the via-rhine.c from -mm2 > > to get online. > > It is known. The fix for that bug is simmering in the pipeline > somewhere. The experimental patches OTOH were for -mm and unrelated. > OK, just wanted to make sure the fix gets into 2.6.8, because it can be a showstopper. Lee From pavel@atrey.karlin.mff.cuni.cz Tue Aug 10 03:16:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 03:16:53 -0700 (PDT) Received: from atrey.karlin.mff.cuni.cz (postfix@atrey.karlin.mff.cuni.cz [195.113.31.123]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7AAGkFm014790 for ; Tue, 10 Aug 2004 03:16:47 -0700 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 8C4604B46F2; Tue, 10 Aug 2004 12:16:40 +0200 (CEST) Date: Tue, 10 Aug 2004 12:16:40 +0200 From: Pavel Machek To: Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040810075558.A14154@infradead.org> User-Agent: Mutt/1.5.6i X-archive-position: 7615 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavel@suse.cz Precedence: bulk X-list: netdev Content-Length: 728 Lines: 22 Hi! > > > ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." > > > > Well, this is really good news! > > > > I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my > > IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. > > Btw, any vounteer for merging the hostap-based generic ieee80211_* files > from the ipw2100 driver with the hostap driver in the wireless-2.6 tree? I know very little about wireless-2.6 tree (where to get it without bitkeeper?), but... task is to take ipw2100 driver, drop ieee80211_* files from it, and make it work with ieee80211* files from wireless-2.6? Pavel -- Horseback riding is like software... ...vgf orggre jura vgf serr. From SRS0+b9220892b1bdb19f0ae7+352+infradead.org+hch@phoenix-113441.srs.infradead.org Tue Aug 10 03:34:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 03:35:05 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7AAYvwU015604 for ; Tue, 10 Aug 2004 03:34:59 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1BuTxn-000479-TW; Tue, 10 Aug 2004 11:34:39 +0100 Date: Tue, 10 Aug 2004 11:34:39 +0100 From: Christoph Hellwig To: Pavel Machek Cc: Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040810113439.A15100@infradead.org> Mail-Followup-To: Christoph Hellwig , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040810101640.GF9034@atrey.karlin.mff.cuni.cz>; from pavel@suse.cz on Tue, Aug 10, 2004 at 12:16:40PM +0200 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7616 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: 613 Lines: 15 On Tue, Aug 10, 2004 at 12:16:40PM +0200, Pavel Machek wrote: > I know very little about wireless-2.6 tree (where to get it without > bitkeeper?), but... http://gkernel.bkbits.net:8080/wireless-2.6 it the bkweb interface, that's the only thing I've looked at myself so far. > task is to take ipw2100 driver, drop ieee80211_* files from it, and > make it work with ieee80211* files from wireless-2.6? there's no ieee80211_* files in the wireless-2.6 tree, the code is part of hostap_* and btw, I think hostap_* is the wrong name for the prism-specific files, too. I'd rather call those prism2_* or something. From margitsw@t-online.de Tue Aug 10 05:37:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 05:37:57 -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 i7ACboBp025061 for ; Tue, 10 Aug 2004 05:37:51 -0700 Received: from fwd01.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1BuV1V-0005Ew-01; Tue, 10 Aug 2004 13:42:33 +0200 Received: from roglap.local (ZG3EsYZTgeN7ZpAbad6bvfneXu6Lw4RZL6UulxvRH3KYPzTh7L+Pos@[217.226.124.60]) by fwd01.sul.t-online.com with esmtp id 1BuV1K-09SGGm0; Tue, 10 Aug 2004 13:42:22 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH Linux-2.6.8-rcx] prism54 Fix supported rates reporting Date: Tue, 10 Aug 2004 13:34:06 +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=_uKLGBVHJg8OD85r" Message-Id: <200408101334.07020.margitsw@t-online.de> X-ID: ZG3EsYZTgeN7ZpAbad6bvfneXu6Lw4RZL6UulxvRH3KYPzTh7L+Pos X-archive-position: 7617 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: 1337 Lines: 58 --Boundary-00=_uKLGBVHJg8OD85r Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-08-10 Margit Schubert-While * We are not correctly reporting supported bit rates. * Fix it. Margit --Boundary-00=_uKLGBVHJg8OD85r Content-Type: text/x-diff; charset="us-ascii"; name="supprates.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="supprates.patch" diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-10 10:52:08.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-10 13:21:03.000000000 +0200 @@ -436,7 +436,7 @@ { struct iw_range *range = (struct iw_range *) extra; islpci_private *priv = netdev_priv(ndev); - char *data; + u8 *data; int i, m, rvalue; struct obj_frequencies *freq; union oid_res_t r; @@ -513,8 +513,7 @@ i = 0; while ((i < IW_MAX_BITRATES) && (*data != 0)) { /* the result must be in bps. The card gives us 500Kbps */ - range->bitrate[i] = (__s32) (*data >> 1); - range->bitrate[i] *= 1000000; + range->bitrate[i] = *data * 500000; i++; data++; } --Boundary-00=_uKLGBVHJg8OD85r-- From vda@port.imtp.ilyichevsk.odessa.ua Tue Aug 10 08:25:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 08:25:28 -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 i7AFOh51000987 for ; Tue, 10 Aug 2004 08:25:08 -0700 Received: (qmail 18289 invoked by alias); 29 Jan 1992 16:14:41 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 29 Jan 1992 16:14:41 -0000 From: Denis Vlasenko To: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez) Subject: [PATCH] #2: add more reset debug messages Date: Tue, 10 Aug 2004 18:24:28 +0300 User-Agent: KMail/1.5.4 Cc: prism54-devel@prism54.org, netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_siOGB9xPqwDdqgJ" Message-Id: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 7619 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: 5832 Lines: 192 --Boundary-00=_siOGB9xPqwDdqgJ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Luis, On top of previous one: * Some not needed NULL assignments removed * Add some more printks to reset code path * mgt_commit_list(): tell which oid has failed All previous concerns about this patch are addressed (some of removed NULL assignments were indeed needed). Please apply. -- vda --Boundary-00=_siOGB9xPqwDdqgJ Content-Type: text/x-diff; charset="us-ascii"; name="prism54-20040810.2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="prism54-20040810.2.patch" * some not needed NULL assignments removed * add some more printks to reset codepath * mgt_commit_list(): tell which oid has failed diff -urpN prism54-20040810.1/isl_ioctl.c prism54-20040810.2/isl_ioctl.c --- prism54-20040810.1/isl_ioctl.c Tue Aug 10 14:10:58 2004 +++ prism54-20040810.2/isl_ioctl.c Tue Aug 10 17:21:27 2004 @@ -1946,7 +1946,7 @@ prism54_debug_get_oid(struct net_device 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); @@ -1982,7 +1982,7 @@ prism54_debug_set_oid(struct net_device 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, diff -urpN prism54-20040810.1/islpci_dev.c prism54-20040810.2/islpci_dev.c --- prism54-20040810.1/islpci_dev.c Fri Jul 30 12:18:45 2004 +++ prism54-20040810.2/islpci_dev.c Tue Aug 10 17:24:32 2004 @@ -462,8 +462,7 @@ islpci_upload_fw(islpci_private *priv) return rc; } - printk(KERN_DEBUG - "%s: firmware uploaded done, now triggering reset...\n", + printk(KERN_DEBUG "%s: islpci_upload_fw: success\n", priv->ndev->name); islpci_set_state(priv, PRV_STATE_POSTBOOT); @@ -499,16 +498,18 @@ islpci_reset_if(islpci_private *priv) /* 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: reset problem: no 'reset complete' IRQ seen\n", + priv->ndev->name); } finish_wait(&priv->reset_done, &wait); - if(result) + if (result) { + printk(KERN_ERR "%s: islpci_reset_if: failure\n", priv->ndev->name); return result; + } + printk(KERN_DEBUG "%s: got 'reset complete' IRQ\n", priv->ndev->name); islpci_set_state(priv, PRV_STATE_INIT); /* Now that the device is 100% up, let's allow @@ -524,6 +525,7 @@ islpci_reset_if(islpci_private *priv) islpci_set_state(priv, PRV_STATE_READY); + printk(KERN_DEBUG "%s: islpci_reset_if: success\n", priv->ndev->name); return 0; } @@ -584,18 +586,21 @@ islpci_reset(islpci_private *priv, int r /* 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"); + else + printk(KERN_DEBUG "%s: islpci_reset: success\n", + priv->ndev->name); return rc; - } struct net_device_stats * @@ -604,7 +609,7 @@ islpci_statistics(struct net_device *nde 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; diff -urpN prism54-20040810.1/islpci_eth.c prism54-20040810.2/islpci_eth.c --- prism54-20040810.1/islpci_eth.c Thu Jul 1 08:54:35 2004 +++ prism54-20040810.2/islpci_eth.c Tue Aug 10 17:27:42 2004 @@ -508,11 +508,11 @@ islpci_eth_tx_timeout(struct net_device /* 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 -urpN prism54-20040810.1/oid_mgt.c prism54-20040810.2/oid_mgt.c --- prism54-20040810.1/oid_mgt.c Tue Aug 10 17:18:37 2004 +++ prism54-20040810.2/oid_mgt.c Tue Aug 10 17:29:35 2004 @@ -555,15 +555,18 @@ mgt_commit_list(islpci_private *priv, en 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 +627,7 @@ static enum oid_num_t commit_part2[] = { 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, --Boundary-00=_siOGB9xPqwDdqgJ-- From vda@port.imtp.ilyichevsk.odessa.ua Tue Aug 10 08:24:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 08:24: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 i7AFNfcC000904 for ; Tue, 10 Aug 2004 08:23:52 -0700 Received: (qmail 18207 invoked by alias); 29 Jan 1992 16:13:34 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 29 Jan 1992 16:13:34 -0000 From: Denis Vlasenko To: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez) Subject: [PATCH] #1: cleanup, add reset debug message Date: Tue, 10 Aug 2004 18:23:15 +0300 User-Agent: KMail/1.5.4 Cc: prism54-devel@prism54.org, netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_jhOGBNeYz2x2FIT" Message-Id: <200408101823.15792.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 7618 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: 5024 Lines: 147 --Boundary-00=_jhOGBNeYz2x2FIT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Luis, This is a mostly trivial patch on top of today's prism54 CVS. * Move assignment out of if() * Remove trailing space from printk * Eliminate not needed local 'u32 reg' * Add a comment about undoc bits * Add #define VEC_SIZE, use it as appropriate * Add a pair of printks to reset error code path (our current area of trouble) * Make printk text less confusing Please apply. -- vda --Boundary-00=_jhOGBNeYz2x2FIT Content-Type: text/x-diff; charset="us-ascii"; name="prism54-20040810.1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="prism54-20040810.1.patch" * Move assignment out of if() * Remove trailing space from printk * Eliminate not needed local 'u32 reg' * Add a comment about undoc bits * Add #define VEC_SIZE, use it as appropriate * Add a pair of printks to reset error code path (our current area of trouble) * Make printk text less confusing diff -urpN prism54-20040810.orig/isl_38xx.c prism54-20040810.1/isl_38xx.c --- prism54-20040810.orig/isl_38xx.c Sat May 29 18:06:49 2004 +++ prism54-20040810.1/isl_38xx.c Tue Aug 10 17:18:37 2004 @@ -135,8 +135,8 @@ isl38xx_trigger_device(int asleep, void 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, @@ -194,10 +194,8 @@ isl38xx_trigger_device(int asleep, void void isl38xx_interface_reset(void *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 */ @@ -205,8 +203,7 @@ isl38xx_interface_reset(void *device_bas 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 */ @@ -214,9 +211,7 @@ isl38xx_interface_reset(void *device_bas /* 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 -urpN prism54-20040810.orig/isl_38xx.h prism54-20040810.1/isl_38xx.h --- prism54-20040810.orig/isl_38xx.h Sat May 29 18:06:49 2004 +++ prism54-20040810.1/isl_38xx.h Tue Aug 10 17:18:37 2004 @@ -95,6 +95,10 @@ isl38xx_w32_flush(void *base, u32 val, u #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 -urpN prism54-20040810.orig/oid_mgt.c prism54-20040810.1/oid_mgt.c --- prism54-20040810.orig/oid_mgt.c Fri Aug 6 13:50:47 2004 +++ prism54-20040810.1/oid_mgt.c Tue Aug 10 17:18:37 2004 @@ -638,9 +638,13 @@ mgt_update_addr(islpci_private *priv) if (res) islpci_mgt_release(res); + if (ret) + printk(KERN_ERR "%s: mgt_update_addr: failure\n", priv->ndev->name); return ret; } +#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0])) + void mgt_commit(islpci_private *priv) { @@ -650,14 +654,10 @@ mgt_commit(islpci_private *priv) if (islpci_get_state(priv) < PRV_STATE_INIT) return; - 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,8 +666,7 @@ mgt_commit(islpci_private *priv) 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); } } --Boundary-00=_jhOGBNeYz2x2FIT-- From suparna@in.ibm.com Tue Aug 10 08:42:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 08:42:48 -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 i7AFggaY002324 for ; Tue, 10 Aug 2004 08:42:42 -0700 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e6.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7AFgCnt491690; Tue, 10 Aug 2004 11:42:12 -0400 Received: from sparklet2.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7AFhERl091654; Tue, 10 Aug 2004 11:43:23 -0400 Received: by sparklet2.in.ibm.com (Postfix, from userid 500) id 69991192E8; Tue, 10 Aug 2004 21:21:48 +0530 (IST) Date: Tue, 10 Aug 2004 21:21:48 +0530 From: Suparna Bhattacharya To: Werner Almesberger Cc: netdev@oss.sgi.com Subject: Re: net-AIO and real-time TCP (blue sky research) Message-ID: <20040810155148.GA4630@in.ibm.com> Reply-To: suparna@in.ibm.com References: <20040801235102.K1276@almesberger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040801235102.K1276@almesberger.net> User-Agent: Mutt/1.4i X-archive-position: 7621 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: suparna@in.ibm.com Precedence: bulk X-list: netdev Content-Length: 5332 Lines: 125 Hello Werner, I was hoping all this while that someone with deeper knowledge in this area than me would respond, but well, maybe they were all quiet chuckles :) ? Does your proposal require additional semantics on aio TCP socket reads and writes that differ from the synchronous TCP case, besides not blocking and indicating completion through aio_complete ? On Sun, Aug 01, 2004 at 11:51:02PM -0300, Werner Almesberger wrote: > Hi Suparna, > > I'm copying this to netdev, because people there may get a good > chuckle out of this outlandish idea as well :-) > > At OLS we were chatting about using AIO also for networking. > While this concept didn't seem to rank particularly high on the > lunacy scale, it didn't appear overly useful either. About the > only possibly interesting new functionality, besides the > possibility to connect this with some eccentric TCP offloading > and zero-copy scheme, would be - when applied to TCP - to make > unACKed data in the out-of-order buffer available to user > space. > > Now, it occurred to me that this may lead to something a lot > more exciting: a step towards making TCP real-time capable. > I'm using the term "real-time" loosely here, as in "there's a > deadline, but we're flexible". > > I haven't followed what's going on at IETF in that area for a > while, and I'm sure plenty of other people must have thought > of similar schemes before, but since this seems nicer and > maybe even simpler than some, let me describe it anyway. > > First of all, one of the main complaints of the real-time > networking people is that TCP stubbornly insists on > retransmitting every single segment until it is absolutely > certain that the segment has been received, even if the > real-time application has long since moved on. > > Now, with net-AIO, the application could already get all the > data that has arrived after a lost segment. That's a good > start, but TCP will still try to retransmit. So the next step > would be to have a means to indicate that we've lost interest > in the outcome of a pending AIO operation, and - as a side > effect - communicate this also to TCP, so that TCP can stop > trying, and do something more useful instead. > > Let's call this operation aio_forget(). For disk IO, this > may work just like aio_cancel(). The notion of which segment to aio_forget on the Rx path is a little hazy to me (were you were indeed referring to the receive side here ? I can see this more clearly for the send side when coupled with zero copy). > > Now, aio_forget() would be a great tool for making TCP > blissfully ignorant of any losses, actually making it very > TCP-unfriendly. So the next step would be to record the fact > that we've just forgotten some segments, but still need to > make the peer aware of the fact that there (may) have been > losses, and to slow down accordingly. Obviously, if we have > reason to believe that the peer already knows of a loss in > the general vicinity, no action is needed. > > Reliably communicating a loss isn't trivial, but there should > be good background material in the context of ECN. Of course, > if ECN is available, we may just use that. Otherwise, we may > have to force a retransmission, to be sure that the peer has > noticed. (And, if the forgotten segment(s) should arrive while > TCP is trying to indicate a loss, it should stop doing so.) > > Now, assuming we have a solution for indicating losses that is > satisfying both in terms of congestion control and in terms of > efficiency, there are still a few things that would be nice to > have, that this approach doesn't solve: > > - message boundaries and segment-message alignment. Not being > able to use messages just because a few of their bytes > ended up in a lost (and then aio_forgotten) segment would > be just too bad. In some cases, it may be possible to just > set the MSS to a suitable value. Also, recovering message > boundaries after a loss may be tricky. > > - there's no direct provision for allowing adaptive coding. > Of course, this is a fairly orthogonal problem. > > - as time passes, the sender may want to remove or substitute > data it had already enqueued, e.g because there is less > bandwidth than originally anticipated. So there may be a > place for aio_forget() at the sender side too. > > Now, why could this scheme be "nicer" than just inventing some > new protocol that is designed to do all these things ? The > main thing that "looks good" is that this mechanism could use > all of TCP, and may not even need major maintenance if some > minor aspect of TCP congestion control gets changed. > > Anyway, this may be peculiar enough for someone to spin the > idea a little further. In the worst case, I might just have > provided additional evidence that, if you just search long > enough, there's a perfectly plausible problem for every > solution :-) Thanks for bringing in some fresh perspective :) Regards Suparna > > - Werner > > -- > _________________________________________________________________________ > / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / > /_http://www.almesberger.net/____________________________________________/ -- Suparna Bhattacharya (suparna@in.ibm.com) Linux Technology Center IBM Software Lab, India From glen.turner@aarnet.edu.au Tue Aug 10 09:41:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 09:42:06 -0700 (PDT) Received: from clix.aarnet.edu.au (clix.aarnet.edu.au [192.94.63.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7AGfvRV004135 for ; Tue, 10 Aug 2004 09:41:58 -0700 Received: from [150.101.246.227] (eth8932.sa.adsl.internode.on.net [150.101.246.227]) (authenticated bits=0) by clix.aarnet.edu.au (8.12.8/8.12.8) with ESMTP id i7AGfoWo026434 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 11 Aug 2004 02:41:51 +1000 Subject: Re: Question about Cisco's ISL From: Glen Turner To: Joubert Berger Cc: netdev@oss.sgi.com In-Reply-To: <1089121054.22081.31.camel@localhost.localdomain> References: <1089121054.22081.31.camel@localhost.localdomain> Content-Type: text/plain Organization: Australian Academic and Research Network Message-Id: <1092156104.6767.60.camel@andromache> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 11 Aug 2004 02:11:44 +0930 Content-Transfer-Encoding: 7bit X-MDSA: Yes X-Scanned-By: MIMEDefang 2.39 X-archive-position: 7622 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: glen.turner@aarnet.edu.au Precedence: bulk X-list: netdev Content-Length: 2204 Lines: 50 On Tue, 2004-07-06 at 23:07, Joubert Berger wrote: > I am writing some code to decode Cisco ISL frames. I am having a > difficult time figuring out how the FCS is calculated at the end of the > frame. Does anyone have any experience with Cisco ISL frames and > possibly how to calculate the CRC at the end of the frame. There are two FCSs in an ISL frame. Grab Document 17056 from the Cisco web site for the ISL frame format and observe: - the encapsulated frame includes its FCS (and DA, SA, Type and Data). - the transmitted ISL frame uses a format that is capable of being forwarded by a non-ISL switch (MTU willing). So it has a DA, SA, Type and FCS which is acceptable to any ethernet switch. In both cases the FCS is calculated as per 802.3. Your thinking might be a bit clearer if you think about a switch taking a received frame, wrapping it in a ISL encapsulation and forwarding it down the VLAN trunk. The switch at the end of the trunk simply strips the encapsulation and drops the unencapsulated frame directly onto the wire. If you are writing software then you need to manually calculate the FCS of the encapsulated frame (this FCS is usually calculated by the hardware of the ethernet controller). The FCS at the end of the ISL frame will be calculated by the ethernet controller hardware. Have a look at the Ethereal source code, it pulls apart ISL frames. There are also two control protocols: 1) Cisco ISL runs 802.1D spanning tree but does so on every ISL VLAN, whereas 802.1q runs spanning tree only on the default untagged VLAN. 2) Automated configuration uses Cisco's VLAN Trunking Protocol (VTP). I don't know of a spec for this; it looks a bit of a dog's breakfast (they're up to version 3 now); and deploying it could be dangerous (some Cisco switches run only 32 VLANs and announcing more VLANs through VTP can lead to a denial of service on those switches, so why would you extend the trust required by VTP out to hosts?). ISL works fine without VTP, you just need to manually configure the port as "trunk" rather than "auto". -- Glen Turner Tel: (08) 8303 3936 or +61 8 8303 3936 Australian Academic & Research Network www.aarnet.edu.au From mobil@reswi.de Tue Aug 10 12:21:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 12:21:09 -0700 (PDT) Received: from natsmtp00.rzone.de (natsmtp00.rzone.de [81.169.145.165]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7AJL3TK012344 for ; Tue, 10 Aug 2004 12:21:04 -0700 Received: from gleowine (pD951EC22.dip.t-dialin.net [217.81.236.34]) by post.webmailer.de (8.12.10/8.12.10) with SMTP id i7AJKpt1012713; Tue, 10 Aug 2004 21:20:53 +0200 (MEST) From: "Ralf E. Stranzenbach" To: "Francois Romieu" Cc: Subject: AW: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) Date: Tue, 10 Aug 2004 21:24:07 +0200 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.6604 (9.0.2911.0) In-Reply-To: <20040809214548.GA20204@electric-eye.fr.zoreil.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-archive-position: 7623 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mobil@reswi.de Precedence: bulk X-list: netdev Content-Length: 1801 Lines: 60 Hi, i've applied these patches to a fresh linux 2.6.7 source set and moved only the 8139too.c into my own (fresh) 2.6.7 kernel tree. After rebuilding the modules i tried to run my usual test - sending a >1GB file using Z-Modem (over a SSH connection). This test usually fails within 1-2 minutes on my system. Using this patched driver everything works stable. So iA'm not enforced to downgrade my system to a 2.4.x kernel :-) This system is a ASUS A7V266 mainboard with two Realtek based network cards: 0000:00:0d.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10) 0000:00:0e.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10) I tried another (Fiberline) network card but it had the same problems. Many, many, many thanks. Regards, Ralf -----Ursprungliche Nachricht----- Von: Francois Romieu [mailto:romieu@fr.zoreil.com] Gesendet: Montag, 9. August 2004 23:46 An: Ralf E. Stranzenbach Betreff: Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related) Ralf E. Stranzenbach : [...] > i'm cured with the very same problem on my server machine. I tried for help > within the internet and googled this mail thread on the mail archives. But i > have some difficulties to understand, which patch should be applied to a > vanilla 2.6.7 kernel to prevent this freezes. I assume you have the same network adapter (i.e. 8139c). Two patches are required: 1) ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.8-rc3.bz2 2) ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8-rc3/2.6. 8-rc3-mm2/2.6.8-rc3-mm2.bz2 Compile this kernel or extract the drivers/net/8139too.c file from it into your favorite 2.6.x tree and give it a try. Please Cc: your success/failure on netdev@oss.sgi.com. -- Ueimor From jgarzik@pobox.com Tue Aug 10 13:53:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 13:53: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 i7AKrqiI014388 for ; Tue, 10 Aug 2004 13:53:53 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Budcv-0001L2-7n; Tue, 10 Aug 2004 21:53:45 +0100 Message-ID: <411935CB.8080603@pobox.com> Date: Tue, 10 Aug 2004 16:53:31 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 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 Linux-2.6.8-rc1] prism54 Clarification to Viro's patch References: <200407272032.56667.margitsw@t-online.de> In-Reply-To: <200407272032.56667.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7624 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 Tue Aug 10 13:54:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 13:54: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 i7AKrx8N014407 for ; Tue, 10 Aug 2004 13:54:02 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Budd3-0001LE-U6; Tue, 10 Aug 2004 21:53:54 +0100 Message-ID: <411935D6.4060608@pobox.com> Date: Tue, 10 Aug 2004 16:53:42 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 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 Linux-2.6.8-rc2] prism54 Fix memory leaks References: <200408061324.01557.margitsw@t-online.de> In-Reply-To: <200408061324.01557.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7626 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 Tue Aug 10 13:53:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 13:54: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 i7AKruMq014396 for ; Tue, 10 Aug 2004 13:53:57 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Budcy-0001L3-Qj; Tue, 10 Aug 2004 21:53:49 +0100 Message-ID: <411935D1.1000003@pobox.com> Date: Tue, 10 Aug 2004 16:53:37 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 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 Linux-2.6.8-rc2] prism54 URGENT - Fix IRQ handling References: <200407301023.58457.margitsw@t-online.de> In-Reply-To: <200407301023.58457.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7625 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 Tue Aug 10 13:54:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 13:54: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 i7AKs5MC014448 for ; Tue, 10 Aug 2004 13:54:05 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Budd9-0001LM-MV; Tue, 10 Aug 2004 21:53:59 +0100 Message-ID: <411935DB.5050600@pobox.com> Date: Tue, 10 Aug 2004 16:53:47 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 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 Linux-2.6.8-rcx] prism54 Fix supported rates reporting References: <200408101334.07020.margitsw@t-online.de> In-Reply-To: <200408101334.07020.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7627 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 Tue Aug 10 14:24:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 14:24:57 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7ALOn5e016597 for ; Tue, 10 Aug 2004 14:24:50 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 3F1C8755F; Tue, 10 Aug 2004 17:24:36 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7ALOZcK026067; Tue, 10 Aug 2004 17:24:35 -0400 Date: Tue, 10 Aug 2004 17:24:35 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.8-rc net driver fixes Message-ID: <20040810212435.GA26048@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: 7628 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: 17244 Lines: 571 Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: drivers/net/hp-plus.c | 8 - drivers/net/pcmcia/axnet_cs.c | 2 drivers/net/tulip/tulip_core.c | 2 drivers/net/wireless/atmel.c | 4 drivers/net/wireless/prism54/isl_ioctl.c | 17 +- drivers/net/wireless/prism54/islpci_dev.c | 29 ++-- drivers/net/wireless/prism54/islpci_hotplug.c | 172 +------------------------- drivers/net/wireless/prism54/islpci_mgt.h | 15 -- drivers/net/wireless/prism54/oid_mgt.c | 4 9 files changed, 50 insertions(+), 203 deletions(-) through these ChangeSets: (04/08/10 1.1960) [PATCH] bk-netdev-hp-plus-fix Signed-off-by: Andrew Morton (04/08/10 1.1959) [PATCH] wrong mac address with netgear FA311 ethernet card From: Mathieu LESNIAK This patch corrects a problem with Netgear FA311 ethernet card (a cheap one). Without it, the MAC address is byte swapped ie : HWaddr 02:00:07:E3:E9:F5 instead of : HWaddr 00:02:E3:07:F5:E9 (the correct MAC address vendor code for Netgear/LiteOn is 00:02:E3) Signed-off-by: Andrew Morton (04/08/10 1.1958) [PATCH] bk-netdev-axnet_cs-fix Signed-off-by: Andrew Morton (04/08/10 1.1957) [PATCH] Atmel wireless bigendian fix. The following patch adds a couple of missing byteswaps and allows the Atmel wireless driver to work in WEP mode on big-endian CPUs. (tested on powerPC). (04/08/10 1.1956) [PATCH] prism54 Fix supported rates reporting * We are not correctly reporting supported bit rates. * Fix it. (04/08/10 1.1955) [PATCH] prism54 Fix memory leaks * Change the "version" OID to what it should be. * Fix memory leaks - mgt_get_request always returns * allocated memory for non-int OIDS (with an exception - * keep reading). If the caller checks the return and itself * returns, then it must free memory. * However, it is possible to return from mgt_get_request * early (!priv->mib). In this case, weird things can happen * in isl_ioctl. Quick fix, at least to force an oops, is * to set the union value to NULL. The real fix is to * recode all mgt_get_request calls in isl_ioctl. (04/08/10 1.1954) [PATCH] prism54 URGENT - Fix IRQ handling * We are handing back HANDLED even though the IRQ is not for us. We also change device state. This is plainly wrong. AFAICT we also need to take the spin lock early. Tested/running on UP/SMP for about a week now. (Discovered on one of my lappies that had the X driver on the same IRQ) (Proposed on Prism54 Devel with no objections) (04/08/10 1.1953) [PATCH] prism54 Clarification to Viro's patch * It seems that Viro patched prism54 with the following patch set : http://www.kernel.org/pub/linux/kernel/v2.6/testing/cset/ cset-viro@www.linux.org.uk[torvalds]|ChangeSet|20040727040034|54764.txt * I do not see any indication in any mailing list of this. It would be nice if we could be informed of such changes :-) * (Changes committed to our CVS) diff -Nru a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c --- a/drivers/net/hp-plus.c 2004-08-10 17:23:49 -04:00 +++ b/drivers/net/hp-plus.c 2004-08-10 17:23:49 -04:00 @@ -233,7 +233,7 @@ } /* Set the wrap registers for string I/O reads. */ - outw((HP_START_PG + TX_2X_PAGES) | ((HP_STOP_PG - 1) << 8), ioaddr + 14); + outw((HP_START_PG + TX_PAGES/2) | ((HP_STOP_PG - 1) << 8), ioaddr + 14); /* Set the base address to point to the NIC, not the "real" base! */ dev->base_addr = ioaddr + NIC_OFFSET; @@ -247,7 +247,7 @@ ei_status.name = name; ei_status.word16 = 0; /* Agggghhhhh! Debug time: 2 days! */ ei_status.tx_start_page = HP_START_PG; - ei_status.rx_start_page = HP_START_PG + TX_2X_PAGES; + ei_status.rx_start_page = HP_START_PG + TX_PAGES/2; ei_status.stop_page = HP_STOP_PG; ei_status.reset_8390 = &hpp_reset_8390; @@ -261,7 +261,7 @@ ei_status.block_output = &hpp_mem_block_output; ei_status.get_8390_hdr = &hpp_mem_get_8390_hdr; dev->mem_start = mem_start; - ei_status.rmem_start = dev->mem_start + TX_2X_PAGES*256; + ei_status.rmem_start = dev->mem_start + TX_PAGES/2*256; dev->mem_end = ei_status.rmem_end = dev->mem_start + (HP_STOP_PG - HP_START_PG)*256; } @@ -297,7 +297,7 @@ /* Set the wrap registers for programmed-I/O operation. */ outw(HW_Page, ioaddr + HP_PAGING); - outw((HP_START_PG + TX_2X_PAGES) | ((HP_STOP_PG - 1) << 8), ioaddr + 14); + outw((HP_START_PG + TX_PAGES/2) | ((HP_STOP_PG - 1) << 8), ioaddr + 14); /* Select the operational page. */ outw(Perf_Page, ioaddr + HP_PAGING); diff -Nru a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c --- a/drivers/net/pcmcia/axnet_cs.c 2004-08-10 17:23:49 -04:00 +++ b/drivers/net/pcmcia/axnet_cs.c 2004-08-10 17:23:49 -04:00 @@ -1178,7 +1178,7 @@ } else if (ei_local->tx2 == 0) { - output_page = ei_local->tx_start_page + TX_1X_PAGES; + output_page = ei_local->tx_start_page + TX_PAGES/2; ei_local->tx2 = send_length; if (ei_debug && ei_local->tx1 > 0) printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n", diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c --- a/drivers/net/tulip/tulip_core.c 2004-08-10 17:23:49 -04:00 +++ b/drivers/net/tulip/tulip_core.c 2004-08-10 17:23:49 -04:00 @@ -1535,7 +1535,7 @@ } } /* Lite-On boards have the address byte-swapped. */ - if ((dev->dev_addr[0] == 0xA0 || dev->dev_addr[0] == 0xC0) + if ((dev->dev_addr[0] == 0xA0 || dev->dev_addr[0] == 0xC0 || dev->dev_addr[0] == 0x02) && dev->dev_addr[1] == 0x00) for (i = 0; i < 6; i+=2) { char tmp = dev->dev_addr[i]; diff -Nru a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c --- a/drivers/net/wireless/atmel.c 2004-08-10 17:23:49 -04:00 +++ b/drivers/net/wireless/atmel.c 2004-08-10 17:23:49 -04:00 @@ -2647,12 +2647,12 @@ memcpy(header.addr3, priv->CurrentBSSID, 6); if (priv->wep_is_on) { - auth.alg = C80211_MGMT_AAN_SHAREDKEY; + auth.alg = cpu_to_le16(C80211_MGMT_AAN_SHAREDKEY); /* no WEP for authentication frames with TrSeqNo 1 */ if (priv->CurrentAuthentTransactionSeqNum != 1) header.frame_ctl |= cpu_to_le16(IEEE802_11_FCTL_WEP); } else { - auth.alg = C80211_MGMT_AAN_OPENSYSTEM; + auth.alg = cpu_to_le16(C80211_MGMT_AAN_OPENSYSTEM); } auth.status = 0; 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-08-10 17:23:49 -04:00 +++ b/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-10 17:23:49 -04:00 @@ -436,7 +436,7 @@ { struct iw_range *range = (struct iw_range *) extra; islpci_private *priv = netdev_priv(ndev); - char *data; + u8 *data; int i, m, rvalue; struct obj_frequencies *freq; union oid_res_t r; @@ -513,8 +513,7 @@ i = 0; while ((i < IW_MAX_BITRATES) && (*data != 0)) { /* the result must be in bps. The card gives us 500Kbps */ - range->bitrate[i] = (__s32) (*data >> 1); - range->bitrate[i] *= 1000000; + range->bitrate[i] = *data * 500000; i++; data++; } @@ -820,9 +819,11 @@ return mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile); } - if ((ret = - mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r))) + ret = mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r); + if (ret) { + kfree(r.ptr); return ret; + } rate = (u32) (vwrq->value / 500000); data = r.ptr; @@ -840,6 +841,7 @@ } if (!data[i]) { + kfree(r.ptr); return -EINVAL; } @@ -888,8 +890,11 @@ vwrq->value = r.u * 500000; /* request the device for the enabled rates */ - if ((rvalue = mgt_get_request(priv, DOT11_OID_RATES, 0, NULL, &r))) + rvalue = mgt_get_request(priv, DOT11_OID_RATES, 0, NULL, &r); + if (rvalue) { + kfree(r.ptr); return rvalue; + } data = r.ptr; vwrq->fixed = (data[0] != 0) && (data[1] == 0); kfree(r.ptr); 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-08-10 17:23:49 -04:00 +++ b/drivers/net/wireless/prism54/islpci_dev.c 2004-08-10 17:23:49 -04:00 @@ -39,6 +39,7 @@ #include "oid_mgt.h" #define ISL3877_IMAGE_FILE "isl3877" +#define ISL3886_IMAGE_FILE "isl3886" #define ISL3890_IMAGE_FILE "isl3890" static int prism54_bring_down(islpci_private *); @@ -185,6 +186,9 @@ void *device = priv->device_base; int powerstate = ISL38XX_PSM_POWERSAVE_STATE; + /* lock the interrupt handler */ + spin_lock(&priv->slock); + /* received an interrupt request on a shared IRQ line * first check whether the device is in sleep mode */ reg = readl(device + ISL38XX_CTRL_STAT_REG); @@ -194,14 +198,10 @@ #if VERBOSE > SHOW_ERROR_MESSAGES DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n"); #endif + spin_unlock(&priv->slock); return IRQ_NONE; } - if (islpci_get_state(priv) != PRV_STATE_SLEEP) - powerstate = ISL38XX_PSM_ACTIVE_STATE; - - /* lock the interrupt handler */ - spin_lock(&priv->slock); /* check whether there is any source of interrupt on the device */ reg = readl(device + ISL38XX_INT_IDENT_REG); @@ -212,6 +212,9 @@ reg &= ISL38XX_INT_SOURCES; if (reg != 0) { + if (islpci_get_state(priv) != PRV_STATE_SLEEP) + powerstate = ISL38XX_PSM_ACTIVE_STATE; + /* reset the request bits in the Identification register */ isl38xx_w32_flush(device, reg, ISL38XX_INT_ACK_REG); @@ -339,6 +342,12 @@ isl38xx_handle_wakeup(priv->control_block, &powerstate, priv->device_base); } + } else { +#if VERBOSE > SHOW_ERROR_MESSAGES + DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n"); +#endif + spin_unlock(&priv->slock); + return IRQ_NONE; } /* sleep -> ready */ @@ -856,12 +865,12 @@ /* select the firmware file depending on the device id */ switch (pdev->device) { - case PCIDEVICE_ISL3890: - case PCIDEVICE_3COM6001: - strcpy(priv->firmware, ISL3890_IMAGE_FILE); - break; - case PCIDEVICE_ISL3877: + case 0x3877: strcpy(priv->firmware, ISL3877_IMAGE_FILE); + break; + + case 0x3886: + strcpy(priv->firmware, ISL3886_IMAGE_FILE); break; default: 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-08-10 17:23:49 -04:00 +++ b/drivers/net/wireless/prism54/islpci_hotplug.c 2004-08-10 17:23:49 -04:00 @@ -44,102 +44,30 @@ * If you have an update for this please contact prism54-devel@prism54.org * The latest list can be found at http://prism54.org/supported_cards.php */ static const struct pci_device_id prism54_id_tbl[] = { - /* 3COM 3CRWE154G72 Wireless LAN adapter */ - { - PCIVENDOR_3COM, PCIDEVICE_3COM6001, - PCIVENDOR_3COM, PCIDEVICE_3COM6001, - 0, 0, 0 - }, - - /* D-Link Air Plus Xtreme G A1 - DWL-g650 A1 */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_DLINK, 0x3202UL, - 0, 0, 0 - }, - - /* I-O Data WN-G54/CB - WN-G54/CB */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_IODATA, 0xd019UL, - 0, 0, 0 - }, - - /* Netgear WG511 */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_NETGEAR, 0x4800UL, - 0, 0, 0 - }, - - /* Tekram Technology clones, Allnet, Netcomm, Zyxel */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_TTL, 0x1605UL, - 0, 0, 0 - }, - - /* SMC2802W */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_SMC, 0x2802UL, - 0, 0, 0 - }, - - /* SMC2835W */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_SMC, 0x2835UL, - 0, 0, 0 - }, - - /* Corega CG-WLCB54GT */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_ATI, 0xc104UL, - 0, 0, 0 - }, - - /* I4 Z-Com XG-600 */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_I4, 0x0014UL, - 0, 0, 0 - }, - - /* I4 Z-Com XG-900 and clones Macer, Ovislink, Planex, Peabird, */ - /* Sitecom, Xterasys */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_I4, 0x0020UL, - 0, 0, 0 - }, - - /* SMC 2802W V2 */ + /* Intersil PRISM Duette/Prism GT Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_ACCTON, 0xee03UL, + 0x1260, 0x3890, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* SMC 2835W V2 */ + /* 3COM 3CRWE154G72 Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_SMC, 0xa835UL, + 0x10b7, 0x6001, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Intersil PRISM Indigo Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3877, + 0x1260, 0x3877, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* Intersil PRISM Duette/Prism GT Wireless LAN adapter */ - /* Default */ + /* Intersil PRISM Javelin/Xbow Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, + 0x1260, 0x3886, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, @@ -166,85 +94,6 @@ /* .enable_wake ; we don't support this yet */ }; -static void -prism54_get_card_model(struct net_device *ndev) -{ - islpci_private *priv; - char *modelp; - int notwork = 0; - - priv = netdev_priv(ndev); - switch (priv->pdev->subsystem_device) { - case PCIDEVICE_ISL3877: - modelp = "PRISM Indigo"; - break; - case PCIDEVICE_ISL3886: - modelp = "PRISM Javelin / Xbow"; - break; - case PCIDEVICE_3COM6001: - modelp = "3COM 3CRWE154G72"; - break; - case 0x3202UL: - modelp = "D-Link DWL-g650 A1"; - break; - case 0xd019UL: - modelp = "WN-G54/CB"; - break; - case 0x4800UL: - modelp = "Netgear WG511"; - break; - case 0x2802UL: - modelp = "SMC2802W"; - break; - case 0xee03UL: - modelp = "SMC2802W V2"; - notwork = 1; - break; - case 0x2835UL: - modelp = "SMC2835W"; - break; - case 0xa835UL: - modelp = "SMC2835W V2"; - notwork = 1; - break; - case 0xc104UL: - modelp = "CG-WLCB54GT"; - break; - case 0x1605UL: - modelp = "Tekram Technology clone"; - break; - /* Let's leave this one out for now since it seems bogus/wrong - * Even if the manufacturer did use 0x0000UL it may not be correct - * by their part, therefore deserving no name ;) */ - /* case 0x0000UL: - * modelp = "SparkLAN WL-850F"; - * break;*/ - - /* We have two reported for the one below :( */ - case 0x0014UL: - modelp = "I4 Z-Com XG-600 and clones"; - break; - case 0x0020UL: - modelp = "I4 Z-Com XG-900 and clones"; - break; -/* Default it */ -/* - case PCIDEVICE_ISL3890: - modelp = "PRISM Duette/GT"; - break; -*/ - default: - modelp = "PRISM Duette/GT"; - } - printk(KERN_DEBUG "%s: %s driver detected card model: %s\n", - ndev->name, DRV_NAME, modelp); - if ( notwork ) { - printk(KERN_DEBUG "%s: %s Warning - This may not work\n", - ndev->name, DRV_NAME); - } - return; -} - /****************************************************************************** Module initialization functions ******************************************************************************/ @@ -353,9 +202,6 @@ } /* firmware upload is triggered in islpci_open */ - - /* Pretty card model discovery output */ - prism54_get_card_model(ndev); return 0; 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-08-10 17:23:49 -04:00 +++ b/drivers/net/wireless/prism54/islpci_mgt.h 2004-08-10 17:23:49 -04:00 @@ -38,21 +38,6 @@ /* General driver definitions */ -#define PCIVENDOR_INTERSIL 0x1260UL -#define PCIVENDOR_3COM 0x10b7UL -#define PCIVENDOR_DLINK 0x1186UL -#define PCIVENDOR_I4 0x17cfUL -#define PCIVENDOR_IODATA 0x10fcUL -#define PCIVENDOR_NETGEAR 0x1385UL -#define PCIVENDOR_SMC 0x10b8UL -#define PCIVENDOR_ACCTON 0x1113UL -#define PCIVENDOR_ATI 0x1259UL -#define PCIVENDOR_TTL 0x16a5UL - -#define PCIDEVICE_ISL3877 0x3877UL -#define PCIDEVICE_ISL3886 0x3886UL -#define PCIDEVICE_ISL3890 0x3890UL -#define PCIDEVICE_3COM6001 0x6001UL #define PCIDEVICE_LATENCY_TIMER_MIN 0x40 #define PCIDEVICE_LATENCY_TIMER_VAL 0x50 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-08-10 17:23:49 -04:00 +++ b/drivers/net/wireless/prism54/oid_mgt.c 2004-08-10 17:23:49 -04:00 @@ -219,7 +219,7 @@ OID_UNKNOWN(OID_INL_MEMORY, 0xFF020002), OID_U32_C(OID_INL_MODE, 0xFF020003), OID_UNKNOWN(OID_INL_COMPONENT_NR, 0xFF020004), - OID_UNKNOWN(OID_INL_VERSION, 0xFF020005), + OID_STRUCT(OID_INL_VERSION, 0xFF020005, u8[8], OID_TYPE_RAW), OID_UNKNOWN(OID_INL_INTERFACE_ID, 0xFF020006), OID_UNKNOWN(OID_INL_COMPONENT_ID, 0xFF020007), OID_U32_C(OID_INL_CONFIG, 0xFF020008), @@ -480,6 +480,8 @@ BUG_ON(OID_NUM_LAST <= n); BUG_ON(extra > isl_oid[n].range); + + res->ptr = NULL; if (!priv->mib) /* memory has been freed */ From mcgrof@studorgs.rutgers.edu Tue Aug 10 17:18:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 17:18:21 -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 i7B0IFKZ026040 for ; Tue, 10 Aug 2004 17:18:15 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id F05BCF99BD; Tue, 10 Aug 2004 20:18:09 -0400 (EDT) Date: Tue, 10 Aug 2004 20:18:09 -0400 To: Denis Vlasenko Cc: prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: [PATCH] #1: cleanup, add reset debug message Message-ID: <20040811001809.GF26262@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , prism54-devel@prism54.org, netdev@oss.sgi.com References: <200408101823.15792.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408101823.15792.vda@port.imtp.ilyichevsk.odessa.ua> 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: 7629 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: 783 Lines: 32 Denis, this one seems fine to me although for netdev we'll need a patch against linux kernel dirs (linux-2.6.8-rc4/drivers/net/prism54/) instead of cvs tarball. Jeff if you accept I'll apply to our CVS. Luis On Tue, Aug 10, 2004 at 06:23:15PM +0300, Denis Vlasenko wrote: > Hi Luis, > > This is a mostly trivial patch on top of today's prism54 CVS. > > * Move assignment out of if() > * Remove trailing space from printk > * Eliminate not needed local 'u32 reg' > * Add a comment about undoc bits > * Add #define VEC_SIZE, use it as appropriate > * Add a pair of printks to reset error code path (our current area of trouble) > * Make printk text less confusing > > Please apply. > -- > vda -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From mcgrof@studorgs.rutgers.edu Tue Aug 10 17:24:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 17:24:22 -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 i7B0OHmr026467 for ; Tue, 10 Aug 2004 17:24:17 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 68A51F99BD; Tue, 10 Aug 2004 20:24:12 -0400 (EDT) Date: Tue, 10 Aug 2004 20:24:12 -0400 To: Denis Vlasenko Cc: prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: [PATCH] #2: add more reset debug messages Message-ID: <20040811002412.GG26262@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , prism54-devel@prism54.org, netdev@oss.sgi.com References: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> 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: 7630 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: 568 Lines: 26 Same here, looks good we'll just need a patch against the kernel tree too for netdev. Luis On Tue, Aug 10, 2004 at 06:24:28PM +0300, Denis Vlasenko wrote: > Hi Luis, > > On top of previous one: > > * Some not needed NULL assignments removed > * Add some more printks to reset code path > * mgt_commit_list(): tell which oid has failed > > All previous concerns about this patch are addressed > (some of removed NULL assignments were indeed needed). > > Please apply. > -- > vda -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From mcgrof@studorgs.rutgers.edu Tue Aug 10 17:28:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 17:28:54 -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 i7B0SnI8026882 for ; Tue, 10 Aug 2004 17:28:50 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id B1CABF99BD; Tue, 10 Aug 2004 20:28:44 -0400 (EDT) Date: Tue, 10 Aug 2004 20:28:44 -0400 To: Denis Vlasenko , prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: [PATCH] #2: add more reset debug messages Message-ID: <20040811002844.GH26262@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , prism54-devel@prism54.org, netdev@oss.sgi.com References: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> <20040811002412.GG26262@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811002412.GG26262@ruslug.rutgers.edu> 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: 7631 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: 1016 Lines: 40 Oh and I forgot to mention I think Jeff likes subjects in the format like: [PATCH 1/2] prism54: space changes and people also like followups (patch #2) for example, to be a reply to the original thread (for mail thread viewing purposes). Luis On Tue, Aug 10, 2004 at 08:24:12PM -0400, Luis R. Rodriguez wrote: > > Same here, looks good we'll just need a patch against the kernel tree > too for netdev. > > Luis > > On Tue, Aug 10, 2004 at 06:24:28PM +0300, Denis Vlasenko wrote: > > Hi Luis, > > > > On top of previous one: > > > > * Some not needed NULL assignments removed > > * Add some more printks to reset code path > > * mgt_commit_list(): tell which oid has failed > > > > All previous concerns about this patch are addressed > > (some of removed NULL assignments were indeed needed). > > > > Please apply. > > -- > > vda > > > > -- > GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From mcgrof@studorgs.rutgers.edu Tue Aug 10 17:53:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 17:53:56 -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 i7B0rpvY027465 for ; Tue, 10 Aug 2004 17:53:51 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 5A886F99BD; Tue, 10 Aug 2004 20:53:46 -0400 (EDT) Date: Tue, 10 Aug 2004 20:53:46 -0400 To: Denis Vlasenko , prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: [PATCH] #2: add more reset debug messages Message-ID: <20040811005346.GK26262@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , prism54-devel@prism54.org, netdev@oss.sgi.com References: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> <20040811002412.GG26262@ruslug.rutgers.edu> <20040811002844.GH26262@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811002844.GH26262@ruslug.rutgers.edu> 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: 7632 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: 1604 Lines: 58 Denis, Actually you have CVS access to prism54, if no one complains about these patches (and I think no one will as they are trivial), just go ahead and commit these changes yourself. Please remember to update the ChangeLog too. After your changes go through I plan on starting to integrate the wpa work I have (it can't wait any longer). Thanks, Luis On Tue, Aug 10, 2004 at 08:28:44PM -0400, Luis R. Rodriguez wrote: > > Oh and I forgot to mention I think Jeff likes subjects in the format like: > > [PATCH 1/2] prism54: space changes > > and people also like followups (patch #2) for example, to be a reply to > the original thread (for mail thread viewing purposes). > > Luis > > On Tue, Aug 10, 2004 at 08:24:12PM -0400, Luis R. Rodriguez wrote: > > > > Same here, looks good we'll just need a patch against the kernel tree > > too for netdev. > > > > Luis > > > > On Tue, Aug 10, 2004 at 06:24:28PM +0300, Denis Vlasenko wrote: > > > Hi Luis, > > > > > > On top of previous one: > > > > > > * Some not needed NULL assignments removed > > > * Add some more printks to reset code path > > > * mgt_commit_list(): tell which oid has failed > > > > > > All previous concerns about this patch are addressed > > > (some of removed NULL assignments were indeed needed). > > > > > > Please apply. > > > -- > > > vda > > > > > > > > -- > > GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E > > -- > GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From davem@redhat.com Tue Aug 10 23:02:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 10 Aug 2004 23:02:20 -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 i7B62EsO006950 for ; Tue, 10 Aug 2004 23:02:15 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7B627e1032327; Wed, 11 Aug 2004 02:02:07 -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 i7B627a17301; Wed, 11 Aug 2004 02:02:07 -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 i7B61IZs002044; Wed, 11 Aug 2004 02:01:19 -0400 Date: Tue, 10 Aug 2004 23:01:44 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code Message-Id: <20040810230144.2a68914b.davem@redhat.com> In-Reply-To: <20040810.103229.128092044.yoshfuji@linux-ipv6.org> References: <20040809175404.301bd60a@localhost> <20040809170705.6ab75c5f.davem@redhat.com> <20040810.103229.128092044.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 i7B62EsO006950 X-archive-position: 7633 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 Tue, 10 Aug 2004 10:32:29 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > Does it make sense to excude IPPPROTO_RAW sockets and/or hdrincl sockets, > which would be 100% truly raw socket? > Or, do we add some socket option for this? > > Mip6 is required to exchange ipsec'ed datagrams (!= IPPROTO_RAW). > (as I told you at Networking Summit if I remember correctly), > so we need some sort of the patch, anyway. This is what Alexey told me when I last spoke with him about this: Return-Path: Received: from localhost (IDENT:davem@localhost.localdomain [127.0.0.1]) by pizda.ninka.net (8.9.3/8.9.3) with ESMTP id QAA27793 for ; Sat, 17 May 2003 16:28:26 -0700 From: kuznet@ms2.inr.ac.ru Received: from localhost.localdomain [127.0.0.1] by localhost with POP3 (fetchmail-6.2.2) for davem@localhost (single-drop); Sat, 17 May 2003 16:28:26 -0700 (PDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by devserv.devel.redhat.com (8.11.6/8.11.0) with ESMTP id h4HNSr500334 for ; Sat, 17 May 2003 19:28:53 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id h4HNSrI11137 for ; Sat, 17 May 2003 19:28:53 -0400 Received: from dub.inr.ac.ru (dub.inr.ac.ru [193.233.7.105]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id h4HNSqH20272 for ; Sat, 17 May 2003 19:28:52 -0400 Received: (from kuznet@localhost) by dub.inr.ac.ru (8.6.13/ANK) id DAA10631 for davem@redhat.com; Sun, 18 May 2003 03:28:45 +0400 Message-Id: <200305172328.DAA10631@dub.inr.ac.ru> Subject: Re: dst_pmtu() check in ip_output() To: davem@redhat.com (David S. Miller) Date: Sun, 18 May 2003 03:28:45 +0400 (MSD) In-Reply-To: <20030514.184139.55739273.davem@redhat.com> from "David S. Miller" at May 14, 2003 06:41:39 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello! > Let's ask the following question: What is difference between adding > transformation locally, and adding it at some hop on the way to > destination? > > I can already hear answers of the form "It is same difference as > that between tunnel and transport mode." :-) Exactly. Plus one more thing: when you noticed pathology with raw socket you referred to "What does user expect?". Use of raw socket is pathological itself, f.e. IPv6 does not even have such a concept. It is used by (and invented by VJ for) traceroute. And beyond this it is used by various testing and attacker's software. Shortly, the packet which it generates are _tricky_ by user desire, when user wants to test (or attack) someone. So, I would expect the packet is not transformed locally at all. Remember f.e. that it can be an _IPsec_ packet already. Alexey PS. This is the first mail which I send from new account. Please, tell me if it looks unusual. From jketreno@linux.intel.com Wed Aug 11 03:17:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 03:17:11 -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 i7BAH4CW017190 for ; Wed, 11 Aug 2004 03:17:04 -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 i7BAIiDt019393; Wed, 11 Aug 2004 10:18:44 GMT Received: from linux.intel.com (hdlrvguser-125.hd.intel.com [10.127.52.144]) 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 ESMTP id i7BAJ3E9014194; Wed, 11 Aug 2004 10:19:04 GMT Message-ID: <4119F203.1070009@linux.intel.com> Date: Wed, 11 Aug 2004 05:16:35 -0500 From: James Ketrenos User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pavel Machek CC: Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> In-Reply-To: <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 7634 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jketreno@linux.intel.com Precedence: bulk X-list: netdev Pavel Machek wrote: > Hi! > >>>>ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." >>> >>>Well, this is really good news! >>> >>>I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my >>>IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. >> >>Btw, any vounteer for merging the hostap-based generic ieee80211_* files >>from the ipw2100 driver with the hostap driver in the wireless-2.6 tree? > > I know very little about wireless-2.6 tree (where to get it without > bitkeeper?), but... > > task is to take ipw2100 driver, drop ieee80211_* files from it, and > make it work with ieee80211* files from wireless-2.6? The ieee80211_* files in the ipw2100 were partially based on the hostap source, with any HW specific code pulled out. It handles Tx and Rx right now for BSS, IBSS, and MONITOR mode, supporting wep, etc. It doesn't have all the hooks needed for the host based AP mode that Host AP currently has, nor does it support wpa yet. We're also using the stack for the ipw2200 project (which we hope to get another snapshot release out soon) We've been talking about pulling ieee80211 into its own project as others have expressed an interest in using it in their drivers as well. The general goal for the ieee80211 stack has been to be able to take an skb from the xmit handler, fragment and encrypt that skb, and provide that list of those 802.11 fragments to the driver for transmission. On the Rx side, the ieee80211 stack expects a standard 802.11 data frame which it then performs any decrypt / defrag and then passes up to the kernel. Additional frame code is slowly being added to ieee80211 to support handling of probe response / beacons to manage scan results, etc. and provide default WE handlers for exposing that information. ieee80211_wx provides some generic implementation for the WE handlers that every driver has to implement the same way. We're currently working to clean up ipw2100 and ieee80211 code for submission to netdev for discussion and hopefully inclusion in the future. The ieee80211 code is still being heavily developed, but its usable. If anyone wants to help out, or if folks feel its ready as-is to get pulled into wireless-2.6, let me know. Thanks, James From margitsw@t-online.de Wed Aug 11 03:34:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 03:34:16 -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 i7BAY9rw018016 for ; Wed, 11 Aug 2004 03:34:09 -0700 Received: from fwd00.aul.t-online.de by mailout09.sul.t-online.com with smtp id 1BuqQj-00070l-01; Wed, 11 Aug 2004 12:34:01 +0200 Received: from roglap.local (SyJMOkZaoeQ69AeIApeTBjruwecNYVOv2nDwKzELnKuwUelwmAJEES@[217.255.115.222]) by fwd00.sul.t-online.com with esmtp id 1BuqQa-1MPBku0; Wed, 11 Aug 2004 12:33:52 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH Linux-2.6.8-rcx] prism54 Bug - Fix frequency reporting Date: Wed, 11 Aug 2004 12:25:24 +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=_UQfGBXIA8cfDmWa" Message-Id: <200408111225.24892.margitsw@t-online.de> X-ID: SyJMOkZaoeQ69AeIApeTBjruwecNYVOv2nDwKzELnKuwUelwmAJEES X-archive-position: 7635 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=_UQfGBXIA8cfDmWa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-08-11 Margit Schubert-While * prism54_get_freq is incorrectly returning channel * and not frequency. Wireless tools detect this, but * other programs do not, leading to insane reported * values. (As Jean documents, drivers should really be * reporting the frequency). * An example is wavemon. Margit --Boundary-00=_UQfGBXIA8cfDmWa Content-Type: text/x-diff; charset="us-ascii"; name="frequency.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="frequency.patch" diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-11 12:05:55.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-11 12:06:21.000000000 +0200 @@ -334,9 +334,10 @@ int rvalue; rvalue = mgt_get_request(priv, DOT11_OID_CHANNEL, 0, NULL, &r); - + fwrq->i = r.u; + rvalue |= mgt_get_request(priv, DOT11_OID_FREQUENCY, 0, NULL, &r); fwrq->m = r.u; - fwrq->e = 0; + fwrq->e = 3; return rvalue; } --Boundary-00=_UQfGBXIA8cfDmWa-- From mcgrof@studorgs.rutgers.edu Wed Aug 11 03:38:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 03:38:28 -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 i7BAcNPH019099 for ; Wed, 11 Aug 2004 03:38:23 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 0DD76F99BD; Wed, 11 Aug 2004 06:38:17 -0400 (EDT) Date: Wed, 11 Aug 2004 06:38:17 -0400 To: Margit Schubert-While Cc: jgarzik@pobox.com, netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH Linux-2.6.8-rcx] prism54 Bug - Fix frequency reporting Message-ID: <20040811103817.GA26262@ruslug.rutgers.edu> Mail-Followup-To: Margit Schubert-While , jgarzik@pobox.com, netdev@oss.sgi.com, prism54-devel@prism54.org References: <200408111225.24892.margitsw@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408111225.24892.margitsw@t-online.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: 7636 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 Wed, Aug 11, 2004 at 12:25:24PM +0200, Margit Schubert-While wrote: > 2004-08-11 Margit Schubert-While > > * prism54_get_freq is incorrectly returning channel > * and not frequency. Wireless tools detect this, but > * other programs do not, leading to insane reported > * values. (As Jean documents, drivers should really be > * reporting the frequency). > * An example is wavemon. > > Margit This fixes capturing frequency for wpa_supplicant as well. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From SRS0+41b359bb7598fb1c7a3a+353+infradead.org+hch@phoenix-114437.srs.infradead.org Wed Aug 11 03:45:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 03:45:09 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BAj0Z4019471 for ; Wed, 11 Aug 2004 03:45:04 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1Buqaz-00078s-Mt; Wed, 11 Aug 2004 11:44:37 +0100 Date: Wed, 11 Aug 2004 11:44:37 +0100 From: Christoph Hellwig To: James Ketrenos Cc: Pavel Machek , Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811114437.A27439@infradead.org> Mail-Followup-To: Christoph Hellwig , James Ketrenos , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.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: <4119F203.1070009@linux.intel.com>; from jketreno@linux.intel.com on Wed, Aug 11, 2004 at 05:16:35AM -0500 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7637 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 Wed, Aug 11, 2004 at 05:16:35AM -0500, James Ketrenos wrote: > We're currently working to clean up ipw2100 and ieee80211 code for submission to > netdev for discussion and hopefully inclusion in the future. The ieee80211 code > is still being heavily developed, but its usable. If anyone wants to help out, > or if folks feel its ready as-is to get pulled into wireless-2.6, let me know. Maybe we should switch to your ieee802.11 for a generic wireless stack then instead of the original hostap code. At least it seems more actively maintained right now and supports two drivers already. Btw, I've looked at the ipw2100 and have to concerns regarding the firmware, a) yo'ure not using the proper firmware loader but some horrible handcrafted code using sys_open/sys_read & co that's not namespace safe at all b) the firmware has an extremly complicated and hard to comply with license, I'm not sure we want a driver that can't work without a so strangely licensed blob in the kernel. Can you talk to intel lawyers and put it on simple redristribution and binary modification for allowed for all purposes license please? > Thanks, > James > > > ---end quoted text--- From wichert@levante.wiggy.net Wed Aug 11 03:53:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 03:53:56 -0700 (PDT) Received: from mx1.wiggy.net (levante.wiggy.net [195.85.225.139]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BAroor021721 for ; Wed, 11 Aug 2004 03:53:51 -0700 Received: from wichert by mx1.wiggy.net with local (Exim 4.32) id 1Buqji-00005K-5F; Wed, 11 Aug 2004 12:53:38 +0200 Date: Wed, 11 Aug 2004 12:53:38 +0200 From: Wichert Akkerman To: Christoph Hellwig , James Ketrenos , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811105337.GC32420@wiggy.net> Mail-Followup-To: Christoph Hellwig , James Ketrenos , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811114437.A27439@infradead.org> User-Agent: Mutt/1.5.6+20040523i X-SA-Exim-Connect-IP: X-archive-position: 7638 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wichert@wiggy.net Precedence: bulk X-list: netdev Previously Christoph Hellwig wrote: > a) yo'ure not using the proper firmware loader but some horrible > handcrafted code using sys_open/sys_read & co that's not namespace > safe at all It can use standard hotplug firmware load as well. Wichert. -- Wichert Akkerman It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. From SRS0+d2367d389852d7eb7ecb+353+infradead.org+hch@phoenix-115913.srs.infradead.org Wed Aug 11 03:59:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 03:59:33 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BAxRl6022115 for ; Wed, 11 Aug 2004 03:59:28 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1Buqp6-0007BM-Sp; Wed, 11 Aug 2004 11:59:12 +0100 Date: Wed, 11 Aug 2004 11:59:12 +0100 From: Christoph Hellwig To: James Ketrenos , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811115912.A27530@infradead.org> Mail-Followup-To: Christoph Hellwig , James Ketrenos , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <20040811105337.GC32420@wiggy.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040811105337.GC32420@wiggy.net>; from wichert@wiggy.net on Wed, Aug 11, 2004 at 12:53:38PM +0200 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7639 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 Wed, Aug 11, 2004 at 12:53:38PM +0200, Wichert Akkerman wrote: > Previously Christoph Hellwig wrote: > > a) yo'ure not using the proper firmware loader but some horrible > > handcrafted code using sys_open/sys_read & co that's not namespace > > safe at all > > It can use standard hotplug firmware load as well. Okay, I'll take that back. From pavel@ucw.cz Wed Aug 11 05:17:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 05:18:04 -0700 (PDT) Received: from amd.ucw.cz (postfix@gprs214-4.eurotel.cz [160.218.214.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BCHoLW027766 for ; Wed, 11 Aug 2004 05:17:55 -0700 Received: by amd.ucw.cz (Postfix, from userid 8) id 1D11E9AF; Wed, 11 Aug 2004 14:17:35 +0200 (CEST) Date: Wed, 11 Aug 2004 14:17:35 +0200 From: Pavel Machek To: Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811121735.GA31171@elf.ucw.cz> References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <20040810113439.A15100@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040810113439.A15100@infradead.org> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 7640 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavel@ucw.cz Precedence: bulk X-list: netdev Hi! > > I know very little about wireless-2.6 tree (where to get it without > > bitkeeper?), but... > > http://gkernel.bkbits.net:8080/wireless-2.6 it the bkweb interface, that's > the only thing I've looked at myself so far. Hmm, strange, one merge in last 8 weeks. That's not too active project. Are you sure this is the right tree to work against? Are there plain diffs somewhere? Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! From Robert.Olsson@data.slu.se Wed Aug 11 07:26:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 07:26:46 -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 i7BEQcPB031190 for ; Wed, 11 Aug 2004 07:26:39 -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 i7BEQOIR022784; Wed, 11 Aug 2004 16:26:24 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id 74A5BEC33E; Wed, 11 Aug 2004 16:26:24 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16666.11408.446131.763707@robur.slu.se> Date: Wed, 11 Aug 2004 16:26:24 +0200 To: P@draigBrady.com Cc: e1000-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: strange e1000 interface freeze In-Reply-To: <411757CA.4010401@draigBrady.com> References: <411757CA.4010401@draigBrady.com> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 7641 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 P@draigBrady.com writes: > I've been able to reproduce an situation here > where the interface freezes on a platform > where a continuous stream of about 8000 packets > per second are being received. It usually takes > By lock up I mean that the interface records all packets > as fifo errors, and it receives only 1 interrupt every 2 seconds. > Note the other NAPI interface works fine (at about 7.5K interrupts/s). Weird. We had a problem with a e1000 in one particular PCI-slot were the NIC was dropping packets no other clues. Decreasing PCI-bus speed from 133 to 100 MHz solved this problem. There are two chip revs. Anvik I and II. Anvik I had problems in some architectures from what I understood. Cheers. --ro From Robert.Olsson@data.slu.se Wed Aug 11 08:09:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 08:09: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 i7BF91sq032194 for ; Wed, 11 Aug 2004 08:09:01 -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 i7BF8rIR004496; Wed, 11 Aug 2004 17:08:53 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id 48739EC33E; Wed, 11 Aug 2004 17:08:53 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16666.13957.266124.967306@robur.slu.se> Date: Wed, 11 Aug 2004 17:08:53 +0200 To: P@draigBrady.com Cc: Robert Olsson , e1000-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: Re: strange e1000 interface freeze In-Reply-To: <411A3238.6060400@draigBrady.com> References: <411757CA.4010401@draigBrady.com> <16666.11408.446131.763707@robur.slu.se> <411A3238.6060400@draigBrady.com> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 7642 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 P@draigBrady.com writes: > Interesting. > We've noticed the problems on 133MHz but not on 100MHz > We're double checking 100MHz at the moment. I've guess you have seen that the QUAD board which uses 2 * 82546EB plus a PCI-bridge sets the speed between the onboard bridge and 82546 chips to 120 MHz. Cheers. --ro From jketreno@linux.intel.com Wed Aug 11 09:22:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 09:22:07 -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 i7BGM0YG004545 for ; Wed, 11 Aug 2004 09:22:01 -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 i7BGKoFE031212; Wed, 11 Aug 2004 16:20:51 GMT Received: from linux.intel.com (hdlrvguser-125.hd.intel.com [10.127.52.144]) 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 ESMTP id i7BGNsE9029095; Wed, 11 Aug 2004 16:23:56 GMT Message-ID: <411A478E.1080101@linux.intel.com> Date: Wed, 11 Aug 2004 11:21:34 -0500 From: James Ketrenos User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Hellwig CC: Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> In-Reply-To: <20040811114437.A27439@infradead.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 7643 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jketreno@linux.intel.com Precedence: bulk X-list: netdev Christoph Hellwig wrote: > On Wed, Aug 11, 2004 at 05:16:35AM -0500, James Ketrenos wrote: > >>We're currently working to clean up ipw2100 and ieee80211 code for submission to >>netdev for discussion and hopefully inclusion in the future. The ieee80211 code >>is still being heavily developed, but its usable. If anyone wants to help out, >>or if folks feel its ready as-is to get pulled into wireless-2.6, let me know. > > Maybe we should switch to your ieee802.11 for a generic wireless stack then > instead of the original hostap code. At least it seems more actively > maintained right now and supports two drivers already. This would be ideal for those working on the projects using that stack. If others agree I'll put together patches that introduce the ieee80211* module into wireless-2.6 once I get the next driver snapshots out for ipw2100 and ipw2200. > Btw, I've looked at the ipw2100 and have to concerns regarding the firmware, > > a) yo'ure not using the proper firmware loader but some horrible > handcrafted code using sys_open/sys_read & co that's not namespace > safe at all The driver supports (and defaults to) using firmware_class for loading the firmware. The driver also supports a legacy loading approach for folks that have problems with using hotplug to load the firmware (which represents a fair number of users). > b) the firmware has an extremly complicated and hard to comply with license, > I'm not sure we want a driver that can't work without a so strangely > licensed blob in the kernel. Can you talk to intel lawyers and put it on > simple redristribution and binary modification for allowed for all purposes > license please? The firmware license supports redistribution, and complying with the license shouldn't be too hard (I agree it may not be worded the most clearly, but few legal documents are). If you have issues or questions about specific terms please email me offlist and I can try and address them. Just to re-answer some others may be wondering regarding the firmware: 1) the firmware does not use nor is it dependent (at all) on the kernel. no part of the firmware executes on the host CPU. 2) the firmware is loaded from disk vs. having to have non-volatile storage on the NIC and requiring a firmware flashing utility, etc. 3) the firmware, as per its license, can be redistributed by OSDs, ISVs, etc. Thanks, James From shemminger@osdl.org Wed Aug 11 09:31:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 09:31: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 i7BGVLwC005053 for ; Wed, 11 Aug 2004 09:31:22 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7BGUh105445; Wed, 11 Aug 2004 09:30:43 -0700 Date: Wed, 11 Aug 2004 09:30:43 -0700 From: Stephen Hemminger To: James Ketrenos Cc: Christoph Hellwig , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-Id: <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> In-Reply-To: <411A478E.1080101@linux.intel.com> References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7644 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 > The driver supports (and defaults to) using firmware_class for loading the > firmware. The driver also supports a legacy loading approach for folks that > have problems with using hotplug to load the firmware (which represents a fair > number of users). > When and if you submit it into mainline, please remove the legacy loading approach. Let's get to the cause of the problem and fix it, not bandaid around it. From kala@pinerecords.com Wed Aug 11 09:34:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 09:34:54 -0700 (PDT) Received: from louise.pinerecords.com (louise.pinerecords.com [213.168.176.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BGYkVM005475 for ; Wed, 11 Aug 2004 09:34:48 -0700 Received: from louise.pinerecords.com (localhost [127.0.0.1]) by louise.pinerecords.com with ESMTP id i7BGXXSL011327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Aug 2004 18:33:33 +0200 Received: (from kala@localhost) by louise.pinerecords.com (submit) id i7BGXX1b011326; Wed, 11 Aug 2004 18:33:33 +0200 Date: Wed, 11 Aug 2004 18:33:33 +0200 From: Tomas Szepe To: Stephen Hemminger Cc: James Ketrenos , Christoph Hellwig , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811163333.GE10100@louise.pinerecords.com> References: <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> User-Agent: Mutt/1.4.2.1i X-archive-position: 7645 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: szepe@pinerecords.com Precedence: bulk X-list: netdev On Aug-11 2004, Wed, 09:30 -0700 Stephen Hemminger wrote: > > The driver supports (and defaults to) using firmware_class for loading the > > firmware. The driver also supports a legacy loading approach for folks that > > have problems with using hotplug to load the firmware (which represents a fair > > number of users). > When and if you submit it into mainline, please remove the legacy loading > approach. Let's get to the cause of the problem and fix it, not bandaid > around it. Or better yet, let's not! There are many people who don't want to mess around with hotplug just to get a single driver to load. -- Tomas Szepe From SRS0+39dd7e3d793d9e70d45a+353+infradead.org+hch@phoenix-175105.srs.infradead.org Wed Aug 11 09:52:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 09:52:07 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BGq1ql006158 for ; Wed, 11 Aug 2004 09:52:02 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1BuwJd-0007r6-8d; Wed, 11 Aug 2004 17:51:05 +0100 Date: Wed, 11 Aug 2004 17:51:05 +0100 From: Christoph Hellwig To: Tomas Szepe Cc: Stephen Hemminger , James Ketrenos , Christoph Hellwig , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811175105.A30188@infradead.org> Mail-Followup-To: Christoph Hellwig , Tomas Szepe , Stephen Hemminger , James Ketrenos , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list References: <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> <20040811163333.GE10100@louise.pinerecords.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: <20040811163333.GE10100@louise.pinerecords.com>; from szepe@pinerecords.com on Wed, Aug 11, 2004 at 06:33:33PM +0200 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7646 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 Wed, Aug 11, 2004 at 06:33:33PM +0200, Tomas Szepe wrote: > There are many people who don't want to mess around with hotplug just > to get a single driver to load. Then use a distribution that gets it right for you. Having gazillions of diffferent firmware loaders just because people are too lazy to set up the canonical one isn't where we want to go. From kala@pinerecords.com Wed Aug 11 10:02:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 10:02:45 -0700 (PDT) Received: from louise.pinerecords.com (louise.pinerecords.com [213.168.176.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BH2b5x006641 for ; Wed, 11 Aug 2004 10:02:38 -0700 Received: from louise.pinerecords.com (localhost [127.0.0.1]) by louise.pinerecords.com with ESMTP id i7BH28pp011649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Aug 2004 19:02:08 +0200 Received: (from kala@localhost) by louise.pinerecords.com (submit) id i7BH284I011648; Wed, 11 Aug 2004 19:02:08 +0200 Date: Wed, 11 Aug 2004 19:02:08 +0200 From: Tomas Szepe To: Christoph Hellwig , Stephen Hemminger , James Ketrenos , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811170208.GG10100@louise.pinerecords.com> References: <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> <20040811163333.GE10100@louise.pinerecords.com> <20040811175105.A30188@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811175105.A30188@infradead.org> User-Agent: Mutt/1.4.2.1i X-archive-position: 7647 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: szepe@pinerecords.com Precedence: bulk X-list: netdev On Aug-11 2004, Wed, 17:51 +0100 Christoph Hellwig wrote: > On Wed, Aug 11, 2004 at 06:33:33PM +0200, Tomas Szepe wrote: > > There are many people who don't want to mess around with hotplug just > > to get a single driver to load. > > Then use a distribution that gets it right for you. Having gazillions > of diffferent firmware loaders just because people are too lazy to set > up the canonical one isn't where we want to go. Agreed. But the point is, in the actual case of ipw2100, will the removal of 40 or so lines of code justify killing the functionality for those (lots) that use it? I don't think so. A nice /* duplicate this in another driver and die */ comment in the right place will do the job just fine IMHO. -- Tomas Szepe From SRS0+874a25264d981eff1fd7+353+infradead.org+hch@phoenix-181142.srs.infradead.org Wed Aug 11 10:12:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 10:12:14 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BHC82B007202 for ; Wed, 11 Aug 2004 10:12:09 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1Buwda-0007ur-Mf; Wed, 11 Aug 2004 18:11:42 +0100 Date: Wed, 11 Aug 2004 18:11:42 +0100 From: Christoph Hellwig To: Tomas Szepe Cc: Christoph Hellwig , Stephen Hemminger , James Ketrenos , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811181142.A30309@infradead.org> Mail-Followup-To: Christoph Hellwig , Tomas Szepe , Stephen Hemminger , James Ketrenos , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list References: <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> <20040811163333.GE10100@louise.pinerecords.com> <20040811175105.A30188@infradead.org> <20040811170208.GG10100@louise.pinerecords.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: <20040811170208.GG10100@louise.pinerecords.com>; from szepe@pinerecords.com on Wed, Aug 11, 2004 at 07:02:08PM +0200 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7648 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 Wed, Aug 11, 2004 at 07:02:08PM +0200, Tomas Szepe wrote: > Agreed. But the point is, in the actual case of ipw2100, will the removal > of 40 or so lines of code justify killing the functionality for those (lots) > that use it? Yes. From kala@pinerecords.com Wed Aug 11 10:22:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 10:22:56 -0700 (PDT) Received: from louise.pinerecords.com (louise.pinerecords.com [213.168.176.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BHMnWV007734 for ; Wed, 11 Aug 2004 10:22:50 -0700 Received: from louise.pinerecords.com (localhost [127.0.0.1]) by louise.pinerecords.com with ESMTP id i7BHMMhj011820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Aug 2004 19:22:22 +0200 Received: (from kala@localhost) by louise.pinerecords.com (submit) id i7BHMMUl011819; Wed, 11 Aug 2004 19:22:22 +0200 Date: Wed, 11 Aug 2004 19:22:22 +0200 From: Tomas Szepe To: Christoph Hellwig , Stephen Hemminger , James Ketrenos , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040811172222.GI10100@louise.pinerecords.com> References: <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> <20040811163333.GE10100@louise.pinerecords.com> <20040811175105.A30188@infradead.org> <20040811170208.GG10100@louise.pinerecords.com> <20040811181142.A30309@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811181142.A30309@infradead.org> User-Agent: Mutt/1.4.2.1i X-archive-position: 7649 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: szepe@pinerecords.com Precedence: bulk X-list: netdev On Aug-11 2004, Wed, 18:11 +0100 Christoph Hellwig wrote: > On Wed, Aug 11, 2004 at 07:02:08PM +0200, Tomas Szepe wrote: > > Agreed. But the point is, in the actual case of ipw2100, will the removal > > of 40 or so lines of code justify killing the functionality for those (lots) > > that use it? > > Yes. Well, "I'm not young enough to know everything." Too bad. And btw, mails to hch@infradead.org bounce. -- Tomas Szepe From jgarzik@pobox.com Wed Aug 11 10:52:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 10:52:06 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BHpx6B008608 for ; Wed, 11 Aug 2004 10:52:00 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1BuxGP-0001lw-90; Wed, 11 Aug 2004 18:51:49 +0100 Message-ID: <411A5CA5.8060208@pobox.com> Date: Wed, 11 Aug 2004 13:51:33 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Ketrenos CC: Pavel Machek , Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> In-Reply-To: <4119F203.1070009@linux.intel.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7650 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 James Ketrenos wrote: > We're currently working to clean up ipw2100 and ieee80211 code for > submission to netdev for discussion and hopefully inclusion in the > future. The ieee80211 code is still being heavily developed, but its > usable. If anyone wants to help out, or if folks feel its ready as-is > to get pulled into wireless-2.6, let me know. Well, wireless-2.6 is a development tree, so I would rather things land there sooner rather than later. Everybody needs to be developing "on the same page". Jeff From jgarzik@pobox.com Wed Aug 11 10:54:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 10:54: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 i7BHsMhq008906 for ; Wed, 11 Aug 2004 10:54:22 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1BuxIm-0001qt-3w; Wed, 11 Aug 2004 18:54:16 +0100 Message-ID: <411A5D3B.3010808@pobox.com> Date: Wed, 11 Aug 2004 13:54:03 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pavel Machek CC: Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list , Jouni Malinen Subject: Re: ipw2100 wireless driver References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <20040810113439.A15100@infradead.org> <20040811121735.GA31171@elf.ucw.cz> In-Reply-To: <20040811121735.GA31171@elf.ucw.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7651 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 Pavel Machek wrote: > Hmm, strange, one merge in last 8 weeks. That's not too active > project. Are you sure this is the right tree to work against? It's the right tree, but wireless development hasn't coalesced yet on that tree it appears. It sounds like the Intel folks are interested in working on that tree, and others have mentioned they are interested as well. Waiting for people step up, and put their code where their mouth is... Jeff From jt@bougret.hpl.hp.com Wed Aug 11 11:10:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 11:10:45 -0700 (PDT) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BIAa0J009656 for ; Wed, 11 Aug 2004 11:10:38 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id C6C80814C; Wed, 11 Aug 2004 11:10:30 -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 LAA00312; Wed, 11 Aug 2004 11:12:16 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1BuxYU-0006IE-00; Wed, 11 Aug 2004 11:10:30 -0700 Date: Wed, 11 Aug 2004 11:10:30 -0700 To: Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: [PATCH 2.6] Wireless Extension v17 for Linus Message-ID: <20040811181030.GA23701@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: 7652 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 Hi Jeff, New improved version of my previous patch : http://marc.theaimsgroup.com/?l=linux-netdev&m=109158012711737&w=2 When you think it's over, you always end up receiving new feedback. This version only fixes a few comments and remove some useless and potentially confusing consts. No code change to previous version. By the way, I would not mind a ack that you have properly received this patch (and the driver patch) and that they are queued for Linus... Have fun... Jean ---------------------------------------------------------- diff -u -p linux/include/linux/netdevice.we16.h linux/include/linux/netdevice.h --- linux/include/linux/netdevice.we16.h Tue Aug 3 11:13:59 2004 +++ linux/include/linux/netdevice.h Tue Aug 3 11:16:30 2004 @@ -304,7 +304,9 @@ struct net_device /* List of functions to handle Wireless Extensions (instead of ioctl). * See for details. Jean II */ - struct iw_handler_def * wireless_handlers; + const struct iw_handler_def * wireless_handlers; + /* Instance data managed by the core of Wireless Extensions. */ + struct iw_public_data * wireless_data; struct ethtool_ops *ethtool_ops; diff -u -p linux/include/linux/wireless.we16.h linux/include/linux/wireless.h --- linux/include/linux/wireless.we16.h Tue Aug 3 11:14:07 2004 +++ linux/include/linux/wireless.h Tue Aug 3 11:23:15 2004 @@ -1,10 +1,10 @@ /* * This file define a set of standard wireless extensions * - * Version : 16 2.4.03 + * Version : 17 21.6.04 * * Authors : Jean Tourrilhes - HPL - - * Copyright (c) 1997-2002 Jean Tourrilhes, All Rights Reserved. + * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. */ #ifndef _LINUX_WIRELESS_H @@ -47,12 +47,12 @@ * # include/net/iw_handler.h * * Note as well that /proc/net/wireless implementation has now moved in : - * # include/linux/wireless.c + * # net/core/wireless.c * * Wireless Events (2002 -> onward) : * -------------------------------- * Events are defined at the end of this file, and implemented in : - * # include/linux/wireless.c + * # net/core/wireless.c * * Other comments : * -------------- @@ -82,7 +82,7 @@ * (there is some stuff that will be added in the future...) * I just plan to increment with each new version. */ -#define WIRELESS_EXT 16 +#define WIRELESS_EXT 17 /* * Changes : @@ -175,6 +175,13 @@ * - Remove IW_MAX_GET_SPY because conflict with enhanced spy support * - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy" * - Add IW_ENCODE_TEMP and iw_range->encoding_login_index + * + * V16 to V17 + * ---------- + * - Add flags to frequency -> auto/fixed + * - Document (struct iw_quality *)->updated, add new flags (INVALID) + * - Wireless Event capability in struct iw_range + * - Add support for relative TxPower (yick !) */ /**************************** CONSTANTS ****************************/ @@ -251,7 +258,7 @@ /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ -/* These 16 ioctl are wireless device private. +/* These 32 ioctl are wireless device private, for 16 commands. * Each driver is free to use them for whatever purpose it chooses, * however the driver *must* export the description of those ioctls * with SIOCGIWPRIV and *must* use arguments as defined below. @@ -266,8 +273,8 @@ * We now have 32 commands, so a bit more space ;-). * Also, all 'odd' commands are only usable by root and don't return the * content of ifr/iwr to user (but you are not obliged to use the set/get - * convention, just use every other two command). - * And I repeat : you are not obliged to use them with iwspy, but you + * convention, just use every other two command). More details in iwpriv.c. + * And I repeat : you are not forced to use them with iwpriv, but you * must be compliant with it. */ @@ -352,6 +359,18 @@ #define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */ #define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */ +/* Statistics flags (bitmask in updated) */ +#define IW_QUAL_QUAL_UPDATED 0x1 /* Value was updated since last read */ +#define IW_QUAL_LEVEL_UPDATED 0x2 +#define IW_QUAL_NOISE_UPDATED 0x4 +#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */ +#define IW_QUAL_LEVEL_INVALID 0x20 +#define IW_QUAL_NOISE_INVALID 0x40 + +/* Frequency flags */ +#define IW_FREQ_AUTO 0x00 /* Let the driver decides */ +#define IW_FREQ_FIXED 0x01 /* Force a specific value */ + /* Maximum number of size of encoding token available * they are listed in the range structure */ #define IW_MAX_ENCODING_SIZES 8 @@ -390,6 +409,7 @@ #define IW_TXPOW_TYPE 0x00FF /* Type of value */ #define IW_TXPOW_DBM 0x0000 /* Value is in dBm */ #define IW_TXPOW_MWATT 0x0001 /* Value is in mW */ +#define IW_TXPOW_RELATIVE 0x0002 /* Value is in arbitrary units */ #define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */ /* Retry limits and lifetime flags available */ @@ -418,6 +438,25 @@ /* Max number of char in custom event - use multiple of them if needed */ #define IW_CUSTOM_MAX 256 /* In bytes */ +/* Event capability macros - in (struct iw_range *)->event_capa + * Because we have more than 32 possible events, we use an array of + * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ +#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ + (cmd - SIOCIWFIRSTPRIV + 0x60) : \ + (cmd - SIOCSIWCOMMIT)) +#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) +#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) +/* Event capability constants - event autogenerated by the kernel + * This list is valid for most 802.11 devices, customise as needed... */ +#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \ + IW_EVENT_CAPA_MASK(0x8B06) | \ + IW_EVENT_CAPA_MASK(0x8B1A)) +#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A)) +/* "Easy" macro to set events in iw_range (less efficient) */ +#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd)) +#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; } + + /****************************** TYPES ******************************/ /* --------------------------- SUBTYPES --------------------------- */ @@ -456,7 +495,7 @@ struct iw_freq __s32 m; /* Mantissa */ __s16 e; /* Exponent */ __u8 i; /* List index (when in range struct) */ - __u8 pad; /* Unused - just for alignement */ + __u8 flags; /* Flags (fixed/auto) */ }; /* @@ -610,11 +649,12 @@ struct iw_range /* Old Frequency (backward compat - moved lower ) */ __u16 old_num_channels; __u8 old_num_frequency; - /* Filler to keep "version" at the same offset */ - __s32 old_freq[6]; + + /* Wireless event capability bitmasks */ + __u32 event_capa[6]; /* signal level threshold range */ - __s32 sensitivity; + __s32 sensitivity; /* Quality of link & SNR stuff */ /* Quality range (link, level, noise) diff -u -p linux/include/net/iw_handler.we16.h linux/include/net/iw_handler.h --- linux/include/net/iw_handler.we16.h Tue Aug 3 11:14:22 2004 +++ linux/include/net/iw_handler.h Tue Aug 10 17:41:03 2004 @@ -1,10 +1,10 @@ /* * This file define the new driver API for Wireless Extensions * - * Version : 5 4.12.02 + * Version : 6 21.6.04 * * Authors : Jean Tourrilhes - HPL - - * Copyright (c) 2001-2002 Jean Tourrilhes, All Rights Reserved. + * Copyright (c) 2001-2004 Jean Tourrilhes, All Rights Reserved. */ #ifndef _IW_HANDLER_H @@ -206,7 +206,7 @@ * will be needed... * I just plan to increment with each new version. */ -#define IW_HANDLER_VERSION 5 +#define IW_HANDLER_VERSION 6 /* * Changes : @@ -224,11 +224,18 @@ * V4 to V5 * -------- * - Add new spy support : struct iw_spy_data & prototypes + * + * V5 to V6 + * -------- + * - Change the way we get to spy_data method for added safety + * - Remove spy #ifdef, they are always on -> cleaner code + * - Add IW_DESCR_FLAG_NOMAX flag for very large requests + * - Start migrating get_wireless_stats to struct iw_handler_def */ /**************************** CONSTANTS ****************************/ -/* Enable enhanced spy support. Disable to reduce footprint */ +/* Enhanced spy support available */ #define IW_WIRELESS_SPY #define IW_WIRELESS_THRSPY @@ -258,6 +265,7 @@ #define IW_DESCR_FLAG_EVENT 0x0002 /* Generate an event on SET */ #define IW_DESCR_FLAG_RESTRICT 0x0004 /* GET : request is ROOT only */ /* SET : Omit payload from generated iwevent */ +#define IW_DESCR_FLAG_NOMAX 0x0008 /* GET : no limit on request size */ /* Driver level flags */ #define IW_DESCR_FLAG_WAIT 0x0100 /* Wait for driver event */ @@ -311,23 +319,25 @@ struct iw_handler_def /* Array of handlers for standard ioctls * We will call dev->wireless_handlers->standard[ioctl - SIOCSIWNAME] */ - iw_handler * standard; + const iw_handler * standard; /* Array of handlers for private ioctls * Will call dev->wireless_handlers->private[ioctl - SIOCIWFIRSTPRIV] */ - iw_handler * private; + const iw_handler * private; /* Arguments of private handler. This one is just a list, so you * can put it in any order you want and should not leave holes... * We will automatically export that to user space... */ - struct iw_priv_args * private_args; + const struct iw_priv_args * private_args; - /* Driver enhanced spy support */ - long spy_offset; /* Spy data offset */ + /* This field will be *removed* in the next version of WE */ + long spy_offset; /* DO NOT USE */ - /* In the long term, get_wireless_stats will move from - * 'struct net_device' to here, to minimise bloat. */ + /* New location of get_wireless_stats, to de-bloat struct net_device. + * The old pointer in struct net_device will be gradually phased + * out, and drivers are encouraged to use this one... */ + struct iw_statistics* (*get_wireless_stats)(struct net_device *dev); }; /* ---------------------- IOCTL DESCRIPTION ---------------------- */ @@ -374,18 +384,29 @@ struct iw_ioctl_description */ struct iw_spy_data { -#ifdef IW_WIRELESS_SPY /* --- Standard spy support --- */ int spy_number; u_char spy_address[IW_MAX_SPY][ETH_ALEN]; struct iw_quality spy_stat[IW_MAX_SPY]; -#ifdef IW_WIRELESS_THRSPY /* --- Enhanced spy support (event) */ struct iw_quality spy_thr_low; /* Low threshold */ struct iw_quality spy_thr_high; /* High threshold */ u_char spy_thr_under[IW_MAX_SPY]; -#endif /* IW_WIRELESS_THRSPY */ -#endif /* IW_WIRELESS_SPY */ +}; + +/* --------------------- DEVICE WIRELESS DATA --------------------- */ +/* + * This is all the wireless data specific to a device instance that + * is managed by the core of Wireless Extensions. + * We only keep pointer to those structures, so that a driver is free + * to share them between instances. + * This structure should be initialised before registering the device. + * Access to this data follow the same rules as any other struct net_device + * data (i.e. valid as long as struct net_device exist, same locking rules). + */ +struct iw_public_data { + /* Driver enhanced spy support */ + struct iw_spy_data * spy_data; }; /**************************** PROTOTYPES ****************************/ @@ -393,6 +414,9 @@ struct iw_spy_data * Functions part of the Wireless Extensions (defined in net/core/wireless.c). * Those may be called only within the kernel. */ + +/* Data needed by fs/compat_ioctl.c for 32->64 bit conversion */ +extern const char iw_priv_type_size[]; /* First : function strictly used inside the kernel */ diff -u -p linux/net/core/dev.we16.c linux/net/core/dev.c --- linux/net/core/dev.we16.c Tue Aug 3 11:14:45 2004 +++ linux/net/core/dev.c Tue Aug 3 11:15:09 2004 @@ -2787,7 +2787,7 @@ int dev_ioctl(unsigned int cmd, void __u /* Follow me in net/core/wireless.c */ ret = wireless_process_ioctl(&ifr, cmd); rtnl_unlock(); - if (!ret && IW_IS_GET(cmd) && + if (IW_IS_GET(cmd) && copy_to_user(arg, &ifr, sizeof(struct ifreq))) ret = -EFAULT; diff -u -p linux/net/core/wireless.we16.c linux/net/core/wireless.c --- linux/net/core/wireless.we16.c Tue Aug 3 11:14:54 2004 +++ linux/net/core/wireless.c Tue Aug 10 17:42:35 2004 @@ -2,7 +2,7 @@ * This file implement the Wireless Extensions APIs. * * Authors : Jean Tourrilhes - HPL - - * Copyright (c) 1997-2003 Jean Tourrilhes, All Rights Reserved. + * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. * * (As all part of the Linux kernel, this file is GPL) */ @@ -48,6 +48,16 @@ * o Add common spy support : iw_handler_set_spy(), wireless_spy_update() * o Add enhanced spy support : iw_handler_set_thrspy() and event. * o Add WIRELESS_EXT version display in /proc/net/wireless + * + * v6 - 18.06.04 - Jean II + * o Change get_spydata() method for added safety + * o Remove spy #ifdef, they are always on -> cleaner code + * o Allow any size GET request if user specifies length > max + * and if request has IW_DESCR_FLAG_NOMAX flag or is SIOCGIWPRIV + * o Start migrating get_wireless_stats to struct iw_handler_def + * o Add wmb() in iw_handler_set_spy() for non-coherent archs/cpus + * Based on patch from Pavel Roskin : + * o Fix kernel data leak to user space in private handler handling */ /***************************** INCLUDES *****************************/ @@ -69,10 +79,6 @@ /**************************** CONSTANTS ****************************/ -/* Enough lenience, let's make sure things are proper... */ -#define WE_STRICT_WRITE /* Check write buffer size */ -/* I'll probably drop both the define and kernel message in the next version */ - /* Debugging stuff */ #undef WE_IOCTL_DEBUG /* Debug IOCTL API */ #undef WE_EVENT_DEBUG /* Debug Event dispatcher */ @@ -186,6 +192,7 @@ static const struct iw_ioctl_description .token_size = sizeof(struct sockaddr) + sizeof(struct iw_quality), .max_tokens = IW_MAX_AP, + .flags = IW_DESCR_FLAG_NOMAX, }, [SIOCSIWSCAN - SIOCIWFIRST] = { .header_type = IW_HEADER_TYPE_PARAM, @@ -194,6 +201,7 @@ static const struct iw_ioctl_description .header_type = IW_HEADER_TYPE_POINT, .token_size = 1, .max_tokens = IW_SCAN_MAX_DATA, + .flags = IW_DESCR_FLAG_NOMAX, }, [SIOCSIWESSID - SIOCIWFIRST] = { .header_type = IW_HEADER_TYPE_POINT, @@ -296,7 +304,7 @@ static const int standard_event_num = (s sizeof(struct iw_ioctl_description)); /* Size (in bytes) of the various private data types */ -static const char priv_type_size[] = { +const char iw_priv_type_size[] = { 0, /* IW_PRIV_TYPE_NONE */ 1, /* IW_PRIV_TYPE_BYTE */ 1, /* IW_PRIV_TYPE_CHAR */ @@ -363,12 +371,15 @@ static inline iw_handler get_handler(str */ static inline struct iw_statistics *get_wireless_stats(struct net_device *dev) { + /* New location */ + if((dev->wireless_handlers != NULL) && + (dev->wireless_handlers->get_wireless_stats != NULL)) + return dev->wireless_handlers->get_wireless_stats(dev); + + /* Old location, will be phased out in next WE */ return (dev->get_wireless_stats ? dev->get_wireless_stats(dev) : (struct iw_statistics *) NULL); - /* In the future, get_wireless_stats may move from 'struct net_device' - * to 'struct iw_handler_def', to de-bloat struct net_device. - * Definitely worse a thought... */ } /* ---------------------------------------------------------------- */ @@ -403,14 +414,32 @@ static inline int call_commit_handler(st /* ---------------------------------------------------------------- */ /* - * Number of private arguments + * Calculate size of private arguments */ static inline int get_priv_size(__u16 args) { int num = args & IW_PRIV_SIZE_MASK; int type = (args & IW_PRIV_TYPE_MASK) >> 12; - return num * priv_type_size[type]; + return num * iw_priv_type_size[type]; +} + +/* ---------------------------------------------------------------- */ +/* + * Re-calculate the size of private arguments + */ +static inline int adjust_priv_size(__u16 args, + union iwreq_data * wrqu) +{ + int num = wrqu->data.length; + int max = args & IW_PRIV_SIZE_MASK; + int type = (args & IW_PRIV_TYPE_MASK) >> 12; + + /* Make sure the driver doesn't goof up */ + if (max < num) + num = max; + + return num * iw_priv_type_size[type]; } @@ -440,11 +469,14 @@ static __inline__ void wireless_seq_prin seq_printf(seq, "%6s: %04x %3d%c %3d%c %3d%c %6d %6d %6d " "%6d %6d %6d\n", dev->name, stats->status, stats->qual.qual, - stats->qual.updated & 1 ? '.' : ' ', + stats->qual.updated & IW_QUAL_QUAL_UPDATED + ? '.' : ' ', ((__u8) stats->qual.level), - stats->qual.updated & 2 ? '.' : ' ', + stats->qual.updated & IW_QUAL_LEVEL_UPDATED + ? '.' : ' ', ((__u8) stats->qual.noise), - stats->qual.updated & 4 ? '.' : ' ', + stats->qual.updated & IW_QUAL_NOISE_UPDATED + ? '.' : ' ', stats->discard.nwid, stats->discard.code, stats->discard.fragment, stats->discard.retries, stats->discard.misc, stats->miss.beacon); @@ -555,13 +587,15 @@ static inline int ioctl_export_private(s /* Check NULL pointer */ if(iwr->u.data.pointer == NULL) return -EFAULT; -#ifdef WE_STRICT_WRITE + /* Check if there is enough buffer up there */ if(iwr->u.data.length < dev->wireless_handlers->num_private_args) { - printk(KERN_ERR "%s (WE) : Buffer for request SIOCGIWPRIV too small (%d<%d)\n", dev->name, iwr->u.data.length, dev->wireless_handlers->num_private_args); + /* User space can't know in advance how large the buffer + * needs to be. Give it a hint, so that we can support + * any size buffer we want somewhat efficiently... */ + iwr->u.data.length = dev->wireless_handlers->num_private_args; return -E2BIG; } -#endif /* WE_STRICT_WRITE */ /* Set the number of available ioctls. */ iwr->u.data.length = dev->wireless_handlers->num_private_args; @@ -590,7 +624,6 @@ static inline int ioctl_standard_call(st const struct iw_ioctl_description * descr; struct iw_request_info info; int ret = -EINVAL; - int user_size = 0; /* Get the description of the IOCTL */ if((cmd - SIOCIWFIRST) >= standard_ioctl_num) @@ -621,8 +654,14 @@ static inline int ioctl_standard_call(st #endif /* WE_SET_EVENT */ } else { char * extra; + int extra_size; + int user_length = 0; int err; + /* Calculate space needed by arguments. Always allocate + * for max space. Easier, and won't last long... */ + extra_size = descr->max_tokens * descr->token_size; + /* Check what user space is giving us */ if(IW_IS_SET(cmd)) { /* Check NULL pointer */ @@ -639,18 +678,33 @@ static inline int ioctl_standard_call(st if(iwr->u.data.pointer == NULL) return -EFAULT; /* Save user space buffer size for checking */ - user_size = iwr->u.data.length; + user_length = iwr->u.data.length; + + /* Don't check if user_length > max to allow forward + * compatibility. The test user_length < min is + * implied by the test at the end. */ + + /* Support for very large requests */ + if((descr->flags & IW_DESCR_FLAG_NOMAX) && + (user_length > descr->max_tokens)) { + /* Allow userspace to GET more than max so + * we can support any size GET requests. + * There is still a limit : -ENOMEM. */ + extra_size = user_length * descr->token_size; + /* Note : user_length is originally a __u16, + * and token_size is controlled by us, + * so extra_size won't get negative and + * won't overflow... */ + } } #ifdef WE_IOCTL_DEBUG printk(KERN_DEBUG "%s (WE) : Malloc %d bytes\n", - dev->name, descr->max_tokens * descr->token_size); + dev->name, extra_size); #endif /* WE_IOCTL_DEBUG */ - /* Always allocate for max space. Easier, and won't last - * long... */ - extra = kmalloc(descr->max_tokens * descr->token_size, - GFP_KERNEL); + /* Create the kernel buffer */ + extra = kmalloc(extra_size, GFP_KERNEL); if (extra == NULL) { return -ENOMEM; } @@ -676,14 +730,11 @@ static inline int ioctl_standard_call(st /* If we have something to return to the user */ if (!ret && IW_IS_GET(cmd)) { -#ifdef WE_STRICT_WRITE /* Check if there is enough buffer up there */ - if(user_size < iwr->u.data.length) { - printk(KERN_ERR "%s (WE) : Buffer for request %04X too small (%d<%d)\n", dev->name, cmd, user_size, iwr->u.data.length); + if(user_length < iwr->u.data.length) { kfree(extra); return -E2BIG; } -#endif /* WE_STRICT_WRITE */ err = copy_to_user(iwr->u.data.pointer, extra, iwr->u.data.length * @@ -746,7 +797,7 @@ static inline int ioctl_private_call(str iw_handler handler) { struct iwreq * iwr = (struct iwreq *) ifr; - struct iw_priv_args * descr = NULL; + const struct iw_priv_args * descr = NULL; struct iw_request_info info; int extra_size = 0; int i; @@ -786,7 +837,7 @@ static inline int ioctl_private_call(str ((extra_size + offset) <= IFNAMSIZ)) extra_size = 0; } else { - /* Size of set arguments */ + /* Size of get arguments */ extra_size = get_priv_size(descr->get_args); /* Does it fits in iwr ? */ @@ -816,7 +867,7 @@ static inline int ioctl_private_call(str return -EFAULT; /* Does it fits within bounds ? */ - if(iwr->u.data.length > (descr->set_args & + if(iwr->u.data.length > (descr->get_args & IW_PRIV_SIZE_MASK)) return -E2BIG; } else { @@ -856,6 +907,14 @@ static inline int ioctl_private_call(str /* If we have something to return to the user */ if (!ret && IW_IS_GET(cmd)) { + + /* Adjust for the actual length if it's variable, + * avoid leaking kernel bits outside. */ + if (!(descr->get_args & IW_PRIV_SIZE_FIXED)) { + extra_size = adjust_priv_size(descr->get_args, + &(iwr->u)); + } + err = copy_to_user(iwr->u.data.pointer, extra, extra_size); if (err) @@ -1127,9 +1186,25 @@ void wireless_send_event(struct net_devi * One of the main advantage of centralising spy support here is that * it becomes much easier to improve and extend it without having to touch * the drivers. One example is the addition of the Spy-Threshold events. - * Note : IW_WIRELESS_SPY is defined in iw_handler.h */ +/* ---------------------------------------------------------------- */ +/* + * Return the pointer to the spy data in the driver. + * Because this is called on the Rx path via wireless_spy_update(), + * we want it to be efficient... + */ +static inline struct iw_spy_data * get_spydata(struct net_device *dev) +{ + /* This is the new way */ + if(dev->wireless_data) + return(dev->wireless_data->spy_data); + + /* This is the old way. Doesn't work for multi-headed drivers. + * It will be removed in the next version of WE. */ + return (dev->priv + dev->wireless_handlers->spy_offset); +} + /*------------------------------------------------------------------*/ /* * Standard Wireless Handler : set Spy List @@ -1139,16 +1214,30 @@ int iw_handler_set_spy(struct net_device union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_SPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct sockaddr * address = (struct sockaddr *) extra; + if(!dev->wireless_data) + /* Help user know that driver needs updating */ + printk(KERN_DEBUG "%s (WE) : Driver using old/buggy spy support, please fix driver !\n", + dev->name); + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + /* Disable spy collection while we copy the addresses. - * As we don't disable interrupts, we need to do this to avoid races. - * As we are the only writer, this is good enough. */ + * While we copy addresses, any call to wireless_spy_update() + * will NOP. This is OK, as anyway the addresses are changing. */ spydata->spy_number = 0; + /* We want to operate without locking, because wireless_spy_update() + * most likely will happen in the interrupt handler, and therefore + * have its own locking constraints and needs performance. + * The rtnl_lock() make sure we don't race with the other iw_handlers. + * This make sure wireless_spy_update() "see" that the spy list + * is temporarily disabled. */ + wmb(); + /* Are there are addresses to copy? */ if(wrqu->data.length > 0) { int i; @@ -1174,13 +1263,14 @@ int iw_handler_set_spy(struct net_device spydata->spy_address[i][5]); #endif /* WE_SPY_DEBUG */ } + + /* Make sure above is updated before re-enabling */ + wmb(); + /* Enable addresses */ spydata->spy_number = wrqu->data.length; return 0; -#else /* IW_WIRELESS_SPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_SPY */ } /*------------------------------------------------------------------*/ @@ -1192,12 +1282,14 @@ int iw_handler_get_spy(struct net_device union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_SPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct sockaddr * address = (struct sockaddr *) extra; int i; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + wrqu->data.length = spydata->spy_number; /* Copy addresses. */ @@ -1214,9 +1306,6 @@ int iw_handler_get_spy(struct net_device for(i = 0; i < spydata->spy_number; i++) spydata->spy_stat[i].updated = 0; return 0; -#else /* IW_WIRELESS_SPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_SPY */ } /*------------------------------------------------------------------*/ @@ -1228,11 +1317,13 @@ int iw_handler_set_thrspy(struct net_dev union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_THRSPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct iw_thrspy * threshold = (struct iw_thrspy *) extra; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + /* Just do it */ memcpy(&(spydata->spy_thr_low), &(threshold->low), 2 * sizeof(struct iw_quality)); @@ -1245,9 +1336,6 @@ int iw_handler_set_thrspy(struct net_dev #endif /* WE_SPY_DEBUG */ return 0; -#else /* IW_WIRELESS_THRSPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_THRSPY */ } /*------------------------------------------------------------------*/ @@ -1259,22 +1347,20 @@ int iw_handler_get_thrspy(struct net_dev union iwreq_data * wrqu, char * extra) { -#ifdef IW_WIRELESS_THRSPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); struct iw_thrspy * threshold = (struct iw_thrspy *) extra; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return -EOPNOTSUPP; + /* Just do it */ memcpy(&(threshold->low), &(spydata->spy_thr_low), 2 * sizeof(struct iw_quality)); return 0; -#else /* IW_WIRELESS_THRSPY */ - return -EOPNOTSUPP; -#endif /* IW_WIRELESS_THRSPY */ } -#ifdef IW_WIRELESS_THRSPY /*------------------------------------------------------------------*/ /* * Prepare and send a Spy Threshold event @@ -1312,7 +1398,6 @@ static void iw_send_thrspy_event(struct /* Send event to user space */ wireless_send_event(dev, SIOCGIWTHRSPY, &wrqu, (char *) &threshold); } -#endif /* IW_WIRELESS_THRSPY */ /* ---------------------------------------------------------------- */ /* @@ -1325,12 +1410,14 @@ void wireless_spy_update(struct net_devi unsigned char * address, struct iw_quality * wstats) { -#ifdef IW_WIRELESS_SPY - struct iw_spy_data * spydata = (dev->priv + - dev->wireless_handlers->spy_offset); + struct iw_spy_data * spydata = get_spydata(dev); int i; int match = -1; + /* Make sure driver is not buggy or using the old API */ + if(!spydata) + return; + #ifdef WE_SPY_DEBUG printk(KERN_DEBUG "wireless_spy_update() : offset %ld, spydata %p, address %02X:%02X:%02X:%02X:%02X:%02X\n", dev->wireless_handlers->spy_offset, spydata, address[0], address[1], address[2], address[3], address[4], address[5]); #endif /* WE_SPY_DEBUG */ @@ -1342,7 +1429,7 @@ void wireless_spy_update(struct net_devi sizeof(struct iw_quality)); match = i; } -#ifdef IW_WIRELESS_THRSPY + /* Generate an event if we cross the spy threshold. * To avoid event storms, we have a simple hysteresis : we generate * event only when we go under the low threshold or above the @@ -1362,8 +1449,6 @@ void wireless_spy_update(struct net_devi } } } -#endif /* IW_WIRELESS_THRSPY */ -#endif /* IW_WIRELESS_SPY */ } EXPORT_SYMBOL(iw_handler_get_spy); From jgarzik@pobox.com Wed Aug 11 11:14:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 11:15: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 i7BIEsaZ010003 for ; Wed, 11 Aug 2004 11:14:55 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Buxce-0002NL-W1; Wed, 11 Aug 2004 19:14:49 +0100 Message-ID: <411A620C.30504@pobox.com> Date: Wed, 11 Aug 2004 14:14:36 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jt@hpl.hp.com CC: netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Wireless Extension v17 for Linus References: <20040811181030.GA23701@bougret.hpl.hp.com> In-Reply-To: <20040811181030.GA23701@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7653 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 Jean Tourrilhes wrote: > Hi Jeff, > > New improved version of my previous patch : > http://marc.theaimsgroup.com/?l=linux-netdev&m=109158012711737&w=2 > > When you think it's over, you always end up receiving new > feedback. This version only fixes a few comments and remove some > useless and potentially confusing consts. No code change to previous > version. > By the way, I would not mind a ack that you have properly > received this patch (and the driver patch) and that they are queued > for Linus... It looks OK, but I am going to wait to commit it until after 2.6.8 is released. I need that time to recover from a hard drive disaster, which lost some useful details in the netdev-2.6 queue (but the queue itself is still fine, being mirrored in several locations). Jeff From jt@bougret.hpl.hp.com Wed Aug 11 11:24:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 11:24:50 -0700 (PDT) Received: from palrel11.hp.com (palrel11.hp.com [156.153.255.246]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BIOhqp010470 for ; Wed, 11 Aug 2004 11:24:45 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel11.hp.com (Postfix) with ESMTP id 2452EB714; Wed, 11 Aug 2004 11:24:38 -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 LAA00728; Wed, 11 Aug 2004 11:26:23 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1Buxm9-0006R5-00; Wed, 11 Aug 2004 11:24:37 -0700 Date: Wed, 11 Aug 2004 11:24:37 -0700 To: Jeff Garzik Cc: netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Wireless Extension v17 for Linus Message-ID: <20040811182437.GA24286@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040811181030.GA23701@bougret.hpl.hp.com> <411A620C.30504@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411A620C.30504@pobox.com> 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: 7654 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 On Wed, Aug 11, 2004 at 02:14:36PM -0400, Jeff Garzik wrote: > Jean Tourrilhes wrote: > > By the way, I would not mind a ack that you have properly > >received this patch (and the driver patch) and that they are queued > >for Linus... > > > It looks OK, but I am going to wait to commit it until after 2.6.8 is > released. Perfect. That was the original plan (check my previous e-mail). Thanks ! > I need that time to recover from a hard drive disaster, which > lost some useful details in the netdev-2.6 queue (but the queue itself > is still fine, being mirrored in several locations). I did not had one for some time, cross fingers. Good luck... > Jeff Jean From stoffel@lucent.com Wed Aug 11 11:55:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 11:56:05 -0700 (PDT) Received: from hoemail1.lucent.com (hoemail1.lucent.com [192.11.226.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BItxkt011826 for ; Wed, 11 Aug 2004 11:55:59 -0700 Received: from alpo.inse.lucent.com (h152-148-10-6.lucent.com [152.148.10.6]) by hoemail1.lucent.com (8.12.11/8.12.11) with ESMTP id i7BItUoi013431; Wed, 11 Aug 2004 13:55:31 -0500 (CDT) Received: from sekrit.inse.lucent.com (sekrit.inse.lucent.com [152.148.90.85]) by alpo.inse.lucent.com (8.9.1a/8.9.1) with ESMTP id OAA12244; Wed, 11 Aug 2004 14:55:30 -0400 (EDT) Received: (from stoffel@localhost) by sekrit.inse.lucent.com (8.11.7p1+Sun/8.11.7) id i7BItSl16820; Wed, 11 Aug 2004 14:55:28 -0400 (EDT) X-Authentication-Warning: sekrit.inse.lucent.com: stoffel set sender to stoffel@lucent.com using -f MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16666.27552.585978.551609@gargle.gargle.HOWL> Date: Wed, 11 Aug 2004 14:55:28 -0400 From: "John Stoffel" To: Tomas Szepe Cc: Christoph Hellwig , Stephen Hemminger , James Ketrenos , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver In-Reply-To: <20040811170208.GG10100@louise.pinerecords.com> References: <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> <20040811163333.GE10100@louise.pinerecords.com> <20040811175105.A30188@infradead.org> <20040811170208.GG10100@louise.pinerecords.com> X-Mailer: VM 7.14 under Emacs 20.6.1 X-archive-position: 7655 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: stoffel@lucent.com Precedence: bulk X-list: netdev Tomas> On Aug-11 2004, Wed, 17:51 +0100 Tomas> Christoph Hellwig wrote: >> On Wed, Aug 11, 2004 at 06:33:33PM +0200, Tomas Szepe wrote: >> > There are many people who don't want to mess around with hotplug just >> > to get a single driver to load. >> >> Then use a distribution that gets it right for you. Having gazillions >> of diffferent firmware loaders just because people are too lazy to set >> up the canonical one isn't where we want to go. Tomas> Agreed. But the point is, in the actual case of ipw2100, will Tomas> the removal of 40 or so lines of code justify killing the Tomas> functionality for those (lots) that use it? I don't think so. You can't have your cake and eat it too Tomas! You agree that having multiple firmware loaders in the kernel is bad, yet you still want to have your own special one in there? What's so difficult about setting up hotplug for this purpose anyway? John From dlstevens@us.ibm.com Wed Aug 11 12:15:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 12:15:12 -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 i7BJF0J0012853 for ; Wed, 11 Aug 2004 12:15: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 i7BJEPDD715932; Wed, 11 Aug 2004 15:14:25 -0400 Received: from d03nm121.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7BJEGDU207632; Wed, 11 Aug 2004 13:14:21 -0600 In-Reply-To: <20040810230144.2a68914b.davem@redhat.com> To: "David S. Miller" Cc: nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, yoshfuji@linux-ipv6.org MIME-Version: 1.0 Subject: Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Wed, 11 Aug 2004 13:14:19 -0600 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.51HF338 | June 21, 2004) at 08/11/2004 13:14:21, Serialize complete at 08/11/2004 13:14:21 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 i7BJF0J0012853 X-archive-position: 7656 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dlstevens@us.ibm.com Precedence: bulk X-list: netdev I may be catching this out of context, but... raw sockets predate VJ contributions by many years and are typically used by protocols not in the kernel. The original "ping" used raw sockets, as well as routing protocols like BGP and RIP which are directly encapsulated in IP, without a separate transport protocol. The original traceroute I believe used UDP and just set the TTL-- I don't believe it used raw sockets at all. Don't know what the current versions do; haven't looked in a while. And IPv6 does support raw sockets; it just doesn't let you generate bad checksums and some header fields, I expect to make it harder to write attack software. +-DLS "David S. Miller" Sent by: netdev-bounce@oss.sgi.com 08/10/2004 11:01 PM To yoshfuji@linux-ipv6.org cc nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code On Tue, 10 Aug 2004 10:32:29 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > Does it make sense to excude IPPPROTO_RAW sockets and/or hdrincl sockets, > which would be 100% truly raw socket? > Or, do we add some socket option for this? > > Mip6 is required to exchange ipsec'ed datagrams (!= IPPROTO_RAW). > (as I told you at Networking Summit if I remember correctly), > so we need some sort of the patch, anyway. This is what Alexey told me when I last spoke with him about this: Return-Path: Received: from localhost (IDENT:davem@localhost.localdomain [127.0.0.1]) by pizda.ninka.net (8.9.3/8.9.3) with ESMTP id QAA27793 for ; Sat, 17 May 2003 16:28:26 -0700 From: kuznet@ms2.inr.ac.ru Received: from localhost.localdomain [127.0.0.1] by localhost with POP3 (fetchmail-6.2.2) for davem@localhost (single-drop); Sat, 17 May 2003 16:28:26 -0700 (PDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by devserv.devel.redhat.com (8.11.6/8.11.0) with ESMTP id h4HNSr500334 for ; Sat, 17 May 2003 19:28:53 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id h4HNSrI11137 for ; Sat, 17 May 2003 19:28:53 -0400 Received: from dub.inr.ac.ru (dub.inr.ac.ru [193.233.7.105]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id h4HNSqH20272 for ; Sat, 17 May 2003 19:28:52 -0400 Received: (from kuznet@localhost) by dub.inr.ac.ru (8.6.13/ANK) id DAA10631 for davem@redhat.com; Sun, 18 May 2003 03:28:45 +0400 Message-Id: <200305172328.DAA10631@dub.inr.ac.ru> Subject: Re: dst_pmtu() check in ip_output() To: davem@redhat.com (David S. Miller) Date: Sun, 18 May 2003 03:28:45 +0400 (MSD) In-Reply-To: <20030514.184139.55739273.davem@redhat.com> from "David S. Miller" at May 14, 2003 06:41:39 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello! > Let's ask the following question: What is difference between adding > transformation locally, and adding it at some hop on the way to > destination? > > I can already hear answers of the form "It is same difference as > that between tunnel and transport mode." :-) Exactly. Plus one more thing: when you noticed pathology with raw socket you referred to "What does user expect?". Use of raw socket is pathological itself, f.e. IPv6 does not even have such a concept. It is used by (and invented by VJ for) traceroute. And beyond this it is used by various testing and attacker's software. Shortly, the packet which it generates are _tricky_ by user desire, when user wants to test (or attack) someone. So, I would expect the packet is not transformed locally at all. Remember f.e. that it can be an _IPsec_ packet already. Alexey PS. This is the first mail which I send from new account. Please, tell me if it looks unusual. From jgarzik@pobox.com Wed Aug 11 12:17:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 12:18: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 i7BJHsTX013198 for ; Wed, 11 Aug 2004 12:17:55 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1BuybY-0003gb-O2; Wed, 11 Aug 2004 20:17:44 +0100 Message-ID: <411A70CB.8060101@pobox.com> Date: Wed, 11 Aug 2004 15:17:31 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: Andrew Morton , Pasi Sjoholm , Hector Martin , OGAWA Hirofumi , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8-rc3-mm1 1/2] 8139too: Rx fifo/overflow recovery References: <20040805234336.A15407@electric-eye.fr.zoreil.com> In-Reply-To: <20040805234336.A15407@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7657 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 Francois Romieu wrote: > This patch allows to update the interrupt status register after an > Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. > As a side effect it saves a few heavy (i.e. flushed) pci ops per received > packet when several packets are received at the same time. You _want_ to update those registers on every packet. Otherwise the crappy 8139 chip breaks. Jeff From evil@g-house.de Wed Aug 11 12:29:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 12:29:56 -0700 (PDT) Received: from mail.g-house.de (ns1.g-housing.de [62.75.136.201]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BJTmDx017075 for ; Wed, 11 Aug 2004 12:29:49 -0700 Received: from g06a7.g.pppool.de ([80.185.6.167] helo=[192.168.1.11]) by mail.g-house.de with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1BuygA-0001us-Ce; Wed, 11 Aug 2004 21:22:30 +0200 Message-ID: <411A739D.1040000@g-house.de> Date: Wed, 11 Aug 2004 21:29:33 +0200 From: Christian Kujau User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040715) X-Accept-Language: en-us, en MIME-Version: 1.0 To: linux-kernel CC: vortex@scyld.com, netdev@oss.sgi.com, nfs@lists.sourceforge.net, debian-kernel@lists.debian.org Subject: oops with 2.6.8-rc4 (ipv6 / nfs / 3c59x related?) X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 7658 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: evil@g-house.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi list, yesterday i encounterd several oopses with my "server". the subject of this mail is just plain saying that it is all "2.6.8-rc4's fault". the reality however turned out to be much more complex and confusing so i try to recapitulate in a chronologically way: - - the box (debian/unstable, i368 [PentiumIII] ) was running for 28 days with 2.6.7-ck5 (no other patches but the -ck5 [1] ) - - ipv6 transition interface was down again, i had to start the freenet6 client again, to setup sit1. then i tried from a nfs-client to use this interface by issuing "tracepath6" comamnds when i noticed my nfs-server (the pIII-box) was dead. i could not catch the oops, had no digicam at hand / was too lazy to write, i'll tell later on that. - - rebooted same kernel, tried again locally (setup sit1, tracepath6 to some ipv6 host) -> the box oopsed and locked up. (SYSRQ-s|u did not succeed, only SYSRQ-b...rebooting) - - ok, 2.6.8-rc4 is out anyway, time to update. compiled, booted, setup sit1, tracepath6....-> the box oopsed and locked up. - - am i too dumb to boot my self-built kernels? perhaps, so i used kernel-image-2.6.7-1-686 from debian. again: i set up sit1, tracepath6 to some host -> ha! it did not lock up instantly, but tracepath6 gave not results, so i CTRL-C'ed it and received a message: KERNEL: assertion (!atomic_read(&sk->sk_wmem_alloc)) failed at net/ipv4/af_inet.c (155) everytime i CTRL-C'ed i received this message. and 2.6.7-1-686 was still alive....for a few minutes. when i used my nfs-client to issue tracepath6 commands, the box oopsed but this time the oops mad it to the disk [2]. then it locked up, and the screen filled with traces. - - today i got a camera so i was able to catch the oops [3] + [4]. now the confusing part: i rememberd the oopses from the 2.6.8-rc4: they were the same as [3] is showing, so it seemed to be related to the 3c59x module. i even suspected (sudden) harware problems so i changed the NIC to another 3c59x card. hm, the 3c59x oopses were gone indeed (somehow i still doubt the card is damaged), but the nfs related oopses occured with 2.6.7-1-i686 *and* 2.6.8-rc4 [4] + [5]. - - so, the nfs-related oopses were 100% reproducable when i used the nfs-shares on the client (both 2.6.7-1-686 and 2.6.8-rc4) - - somehow ipv6 was always involved, i could not trigger the oops when ipv6 was not loaded/sit1 was not setup. - - vanilla 2.6.7 seems not affected, 2.6.8-rc[1..3] are also ok (2.6.8-rc3 is running atm). i hope i did not mix something up here. yes, maybe this report has to split up into one ipv6 and one nfs report. i hope [3], [4], [5] are helpful to find out what the oops was all about. (the "Tainted" flags in the 2.6.7-1-686 kernels came from loop-aes modules: "loop: no version for "struct_module" found: kernel tainted.") sorry for the crossposting (please delete rcpts if not applicable) Thank you for your commments. Christian. [1] http://ck.kolivas.org/patches/2.6/2.6.7/2.6.7-ck5/patch-2.6.7-ck5.bz2 [2] http://nerdbynature.de/bits/sheep/2.6.8/2.6.7-1-686.oops [3] http://nerdbynature.de/bits/sheep/2.6.8/2.6.7-1-686.oops_3c59x.jpg [4] http://nerdbynature.de/bits/sheep/2.6.8/2.6.7-1-686.oops_nfs.jpg [5] http://nerdbynature.de/bits/sheep/2.6.8/2.6.8-rc4.oops_nfs.jpg everything: http://nerdbynature.de/bits/sheep/2.6.8/ - -- BOFH excuse #78: Yes, yes, its called a design limitation -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBGnOd+A7rjkF8z0wRAqK2AJ96DxaNdgXBRbDJvhZUNChmh9kDugCdFyIa n5wJaT5zXePq7xakS2SuPsA= =SkFV -----END PGP SIGNATURE----- From shemminger@osdl.org Wed Aug 11 12:31:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 12:31:37 -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 i7BJVQbg017289 for ; Wed, 11 Aug 2004 12:31:27 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7BJV3115156; Wed, 11 Aug 2004 12:31:03 -0700 Date: Wed, 11 Aug 2004 12:31:03 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [RFC] netem - enhancement Message-Id: <20040811123103.620c2a36@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7659 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 still needs more testing to go into the mainstream but here is the updated version of netem. It adds: * distribution table (if any) loaded as part of the configuration * random packet duplication * correlated random number's for loss, jitter, duplication * changing netem parameters doesn't wipe out underlying qdisc * better random number generator - simple net_random just isn't good enough Also more complete comments and attribution. diff -urN -X dontdiff linux-2.6/include/linux/pkt_sched.h netem-2.6/include/linux/pkt_sched.h --- linux-2.6/include/linux/pkt_sched.h 2004-07-12 08:05:35.000000000 -0700 +++ netem-2.6/include/linux/pkt_sched.h 2004-08-10 15:16:14.000000000 -0700 @@ -401,7 +401,8 @@ #define TCA_ATM_MAX TCA_ATM_STATE -/* Network emulator */ +/* Network section */ + struct tc_netem_qopt { __u32 latency; /* added delay (us) */ @@ -409,6 +410,14 @@ __u32 loss; /* random packet loss (0=none ~0=100%) */ __u32 gap; /* re-ordering gap (0 for delay all) */ __u32 duplicate; /* random packet dup (0=none ~0=100%) */ - __u32 jitter; /* random jitter in latency (us) */ + __u32 jitter; /* delay sigma (us) */ + + __u32 delay_corr; /* delay correllation (0=none ~0=100%) */ + __u32 loss_corr; /* packet loss correllation (0=none ~0=100%) */ + __u32 dup_corr; /* duplicate correlation (0=none ~0=100%) */ + + __s16 delay_dist[0]; /* delay distribution table (optional) */ +#define TCA_NETEM_TABLEFACTOR 8192 }; + #endif diff -urN -X dontdiff linux-2.6/net/sched/sch_netem.c netem-2.6/net/sched/sch_netem.c --- linux-2.6/net/sched/sch_netem.c 2004-08-09 08:51:37.000000000 -0700 +++ netem-2.6/net/sched/sch_netem.c 2004-08-11 12:26:18.182684040 -0700 @@ -6,6 +6,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Many of the algorithms and ideas for this came from + * NIST Net which is not copyrighted. + * * Authors: Stephen Hemminger * Catalin(ux aka Dino) BOIE */ @@ -17,16 +20,48 @@ #include #include #include +#include #include #include #include -/* Network emulator - * - * This scheduler can alters spacing and order - * Similar to NISTnet and BSD Dummynet. - */ +/* Network Emulation Queuing algorithm. + ==================================== + + Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based + Network Emulation Tool + [2] Luigi Rizzo, DummyNet for FreeBSD + + ---------------------------------------------------------------- + + This started out as a simple way to delay outgoing packets to test + TCP but has grown to include most of the functionality of a full + blown network emulator like NISTnet. It can delay packets and + add random jitter (and correllation). The random distribution + can be loaded from a table as well to provide normal, pareto, + or experimental curves. Packet loss, duplication, and reordering + can also be emulated. + + This qdisc does not do classification (for example, + delay all packets going to ad.server.ihate.net) + that can be handled in layering other disciplines. + It does not need to do bandwidth control either since that + can be handled by using TBF. + + The simulator is limited by the Linux timer resolution + and will create packet bursts on the HZ boundary (1ms). +*/ + + +#define TT800_N 25 +#define TT800_M 7 +struct crndstate { + unsigned long last; + unsigned long rho; + unsigned long k; + unsigned long seed[TT800_N]; +}; struct netem_sched_data { struct Qdisc *qdisc; @@ -39,6 +74,17 @@ u32 counter; u32 gap; u32 jitter; + u32 duplicate; + + struct dtable { + u32 size; + struct rcu_head rcu; + s16 table[0]; + } *distribution; + + struct crndstate delay_cor; + struct crndstate loss_cor; + struct crndstate dup_cor; }; /* Time stamp put into socket buffer control block */ @@ -46,556 +92,115 @@ psched_time_t time_to_send; }; -/* This is the distribution table for the normal distribution produced - * with NISTnet tools. - * The entries represent a scaled inverse of the cumulative distribution - * function. +/* + * TT800 a TFSR pseudo-random number generator with a long period. + * + * July 8th 1996 Version + * by M. Matsumoto, email: matumoto@math.keio.ac.jp + * + * See: ACM Transactions on Modelling and Computer Simulation, + * Vol. 4, No. 3, 1994, pages 254-266. */ -#define TABLESIZE 2048 -#define TABLEFACTOR 8192 +static unsigned long get_urandom(struct crndstate *s) +{ + unsigned long y; + static const unsigned long mag01[2]={ 0x0, 0x8ebfd028 }; -static const short disttable[TABLESIZE] = { - -31473, -26739, -25226, -24269, - -23560, -22993, -22518, -22109, - -21749, -21426, -21133, -20865, - -20618, -20389, -20174, -19972, - -19782, -19601, -19430, -19267, - -19112, -18962, -18819, -18681, - -18549, -18421, -18298, -18178, - -18062, -17950, -17841, -17735, - -17632, -17532, -17434, -17339, - -17245, -17155, -17066, -16979, - -16894, -16811, -16729, -16649, - -16571, -16494, -16419, -16345, - -16272, -16201, -16130, -16061, - -15993, -15926, -15861, -15796, - -15732, -15669, -15607, -15546, - -15486, -15426, -15368, -15310, - -15253, -15196, -15140, -15086, - -15031, -14977, -14925, -14872, - -14821, -14769, -14719, -14669, - -14619, -14570, -14522, -14473, - -14426, -14379, -14332, -14286, - -14241, -14196, -14150, -14106, - -14062, -14019, -13976, -13933, - -13890, -13848, -13807, -13765, - -13724, -13684, -13643, -13604, - -13564, -13525, -13486, -13447, - -13408, -13370, -13332, -13295, - -13258, -13221, -13184, -13147, - -13111, -13075, -13040, -13004, - -12969, -12934, -12899, -12865, - -12830, -12796, -12762, -12729, - -12695, -12662, -12629, -12596, - -12564, -12531, -12499, -12467, - -12435, -12404, -12372, -12341, - -12310, -12279, -12248, -12218, - -12187, -12157, -12127, -12097, - -12067, -12038, -12008, -11979, - -11950, -11921, -11892, -11863, - -11835, -11806, -11778, -11750, - -11722, -11694, -11666, -11639, - -11611, -11584, -11557, -11530, - -11503, -11476, -11450, -11423, - -11396, -11370, -11344, -11318, - -11292, -11266, -11240, -11214, - -11189, -11164, -11138, -11113, - -11088, -11063, -11038, -11013, - -10988, -10964, -10939, -10915, - -10891, -10866, -10843, -10818, - -10794, -10770, -10747, -10723, - -10700, -10676, -10652, -10630, - -10606, -10583, -10560, -10537, - -10514, -10491, -10469, -10446, - -10424, -10401, -10378, -10356, - -10334, -10312, -10290, -10267, - -10246, -10224, -10202, -10180, - -10158, -10137, -10115, -10094, - -10072, -10051, -10030, -10009, - -9988, -9967, -9945, -9925, - -9904, -9883, -9862, -9842, - -9821, -9800, -9780, -9760, - -9739, -9719, -9699, -9678, - -9658, -9638, -9618, -9599, - -9578, -9559, -9539, -9519, - -9499, -9480, -9461, -9441, - -9422, -9402, -9383, -9363, - -9344, -9325, -9306, -9287, - -9268, -9249, -9230, -9211, - -9192, -9173, -9155, -9136, - -9117, -9098, -9080, -9062, - -9043, -9025, -9006, -8988, - -8970, -8951, -8933, -8915, - -8897, -8879, -8861, -8843, - -8825, -8807, -8789, -8772, - -8754, -8736, -8718, -8701, - -8683, -8665, -8648, -8630, - -8613, -8595, -8578, -8561, - -8543, -8526, -8509, -8492, - -8475, -8458, -8441, -8423, - -8407, -8390, -8373, -8356, - -8339, -8322, -8305, -8289, - -8272, -8255, -8239, -8222, - -8206, -8189, -8172, -8156, - -8140, -8123, -8107, -8090, - -8074, -8058, -8042, -8025, - -8009, -7993, -7977, -7961, - -7945, -7929, -7913, -7897, - -7881, -7865, -7849, -7833, - -7817, -7802, -7786, -7770, - -7754, -7739, -7723, -7707, - -7692, -7676, -7661, -7645, - -7630, -7614, -7599, -7583, - -7568, -7553, -7537, -7522, - -7507, -7492, -7476, -7461, - -7446, -7431, -7416, -7401, - -7385, -7370, -7356, -7340, - -7325, -7311, -7296, -7281, - -7266, -7251, -7236, -7221, - -7207, -7192, -7177, -7162, - -7148, -7133, -7118, -7104, - -7089, -7075, -7060, -7046, - -7031, -7016, -7002, -6988, - -6973, -6959, -6944, -6930, - -6916, -6901, -6887, -6873, - -6859, -6844, -6830, -6816, - -6802, -6788, -6774, -6760, - -6746, -6731, -6717, -6704, - -6690, -6675, -6661, -6647, - -6633, -6620, -6606, -6592, - -6578, -6564, -6550, -6537, - -6523, -6509, -6495, -6482, - -6468, -6454, -6441, -6427, - -6413, -6400, -6386, -6373, - -6359, -6346, -6332, -6318, - -6305, -6291, -6278, -6264, - -6251, -6238, -6224, -6211, - -6198, -6184, -6171, -6158, - -6144, -6131, -6118, -6105, - -6091, -6078, -6065, -6052, - -6039, -6025, -6012, -5999, - -5986, -5973, -5960, -5947, - -5934, -5921, -5908, -5895, - -5882, -5869, -5856, -5843, - -5830, -5817, -5804, -5791, - -5779, -5766, -5753, -5740, - -5727, -5714, -5702, -5689, - -5676, -5663, -5650, -5638, - -5625, -5612, -5600, -5587, - -5575, -5562, -5549, -5537, - -5524, -5512, -5499, -5486, - -5474, -5461, -5449, -5436, - -5424, -5411, -5399, -5386, - -5374, -5362, -5349, -5337, - -5324, -5312, -5299, -5287, - -5275, -5263, -5250, -5238, - -5226, -5213, -5201, -5189, - -5177, -5164, -5152, -5140, - -5128, -5115, -5103, -5091, - -5079, -5067, -5055, -5043, - -5030, -5018, -5006, -4994, - -4982, -4970, -4958, -4946, - -4934, -4922, -4910, -4898, - -4886, -4874, -4862, -4850, - -4838, -4826, -4814, -4803, - -4791, -4778, -4767, -4755, - -4743, -4731, -4719, -4708, - -4696, -4684, -4672, -4660, - -4649, -4637, -4625, -4613, - -4601, -4590, -4578, -4566, - -4554, -4543, -4531, -4520, - -4508, -4496, -4484, -4473, - -4461, -4449, -4438, -4427, - -4415, -4403, -4392, -4380, - -4368, -4357, -4345, -4334, - -4322, -4311, -4299, -4288, - -4276, -4265, -4253, -4242, - -4230, -4219, -4207, -4196, - -4184, -4173, -4162, -4150, - -4139, -4128, -4116, -4105, - -4094, -4082, -4071, -4060, - -4048, -4037, -4026, -4014, - -4003, -3992, -3980, -3969, - -3958, -3946, -3935, -3924, - -3913, -3901, -3890, -3879, - -3868, -3857, -3845, -3834, - -3823, -3812, -3801, -3790, - -3779, -3767, -3756, -3745, - -3734, -3723, -3712, -3700, - -3689, -3678, -3667, -3656, - -3645, -3634, -3623, -3612, - -3601, -3590, -3579, -3568, - -3557, -3545, -3535, -3524, - -3513, -3502, -3491, -3480, - -3469, -3458, -3447, -3436, - -3425, -3414, -3403, -3392, - -3381, -3370, -3360, -3348, - -3337, -3327, -3316, -3305, - -3294, -3283, -3272, -3262, - -3251, -3240, -3229, -3218, - -3207, -3197, -3185, -3175, - -3164, -3153, -3142, -3132, - -3121, -3110, -3099, -3088, - -3078, -3067, -3056, -3045, - -3035, -3024, -3013, -3003, - -2992, -2981, -2970, -2960, - -2949, -2938, -2928, -2917, - -2906, -2895, -2885, -2874, - -2864, -2853, -2842, -2832, - -2821, -2810, -2800, -2789, - -2778, -2768, -2757, -2747, - -2736, -2725, -2715, -2704, - -2694, -2683, -2673, -2662, - -2651, -2641, -2630, -2620, - -2609, -2599, -2588, -2578, - -2567, -2556, -2546, -2535, - -2525, -2515, -2504, -2493, - -2483, -2472, -2462, -2451, - -2441, -2431, -2420, -2410, - -2399, -2389, -2378, -2367, - -2357, -2347, -2336, -2326, - -2315, -2305, -2295, -2284, - -2274, -2263, -2253, -2243, - -2232, -2222, -2211, -2201, - -2191, -2180, -2170, -2159, - -2149, -2139, -2128, -2118, - -2107, -2097, -2087, -2076, - -2066, -2056, -2046, -2035, - -2025, -2014, -2004, -1994, - -1983, -1973, -1963, -1953, - -1942, -1932, -1921, -1911, - -1901, -1891, -1880, -1870, - -1860, -1849, -1839, -1829, - -1819, -1808, -1798, -1788, - -1778, -1767, -1757, -1747, - -1736, -1726, -1716, -1706, - -1695, -1685, -1675, -1665, - -1654, -1644, -1634, -1624, - -1613, -1603, -1593, -1583, - -1573, -1563, -1552, -1542, - -1532, -1522, -1511, -1501, - -1491, -1481, -1471, -1461, - -1450, -1440, -1430, -1420, - -1409, -1400, -1389, -1379, - -1369, -1359, -1348, -1339, - -1328, -1318, -1308, -1298, - -1288, -1278, -1267, -1257, - -1247, -1237, -1227, -1217, - -1207, -1196, -1186, -1176, - -1166, -1156, -1146, -1135, - -1126, -1115, -1105, -1095, - -1085, -1075, -1065, -1055, - -1044, -1034, -1024, -1014, - -1004, -994, -984, -974, - -964, -954, -944, -933, - -923, -913, -903, -893, - -883, -873, -863, -853, - -843, -833, -822, -812, - -802, -792, -782, -772, - -762, -752, -742, -732, - -722, -712, -702, -691, - -682, -671, -662, -651, - -641, -631, -621, -611, - -601, -591, -581, -571, - -561, -551, -541, -531, - -521, -511, -501, -491, - -480, -471, -460, -451, - -440, -430, -420, -410, - -400, -390, -380, -370, - -360, -350, -340, -330, - -320, -310, -300, -290, - -280, -270, -260, -250, - -240, -230, -220, -210, - -199, -190, -179, -170, - -159, -150, -139, -129, - -119, -109, -99, -89, - -79, -69, -59, -49, - -39, -29, -19, -9, - 1, 11, 21, 31, - 41, 51, 61, 71, - 81, 91, 101, 111, - 121, 131, 141, 152, - 161, 172, 181, 192, - 202, 212, 222, 232, - 242, 252, 262, 272, - 282, 292, 302, 312, - 322, 332, 342, 352, - 362, 372, 382, 392, - 402, 412, 422, 433, - 442, 453, 462, 473, - 483, 493, 503, 513, - 523, 533, 543, 553, - 563, 573, 583, 593, - 603, 613, 623, 633, - 643, 653, 664, 673, - 684, 694, 704, 714, - 724, 734, 744, 754, - 764, 774, 784, 794, - 804, 815, 825, 835, - 845, 855, 865, 875, - 885, 895, 905, 915, - 925, 936, 946, 956, - 966, 976, 986, 996, - 1006, 1016, 1026, 1037, - 1047, 1057, 1067, 1077, - 1087, 1097, 1107, 1117, - 1128, 1138, 1148, 1158, - 1168, 1178, 1188, 1198, - 1209, 1219, 1229, 1239, - 1249, 1259, 1269, 1280, - 1290, 1300, 1310, 1320, - 1330, 1341, 1351, 1361, - 1371, 1381, 1391, 1402, - 1412, 1422, 1432, 1442, - 1452, 1463, 1473, 1483, - 1493, 1503, 1513, 1524, - 1534, 1544, 1554, 1565, - 1575, 1585, 1595, 1606, - 1616, 1626, 1636, 1647, - 1656, 1667, 1677, 1687, - 1697, 1708, 1718, 1729, - 1739, 1749, 1759, 1769, - 1780, 1790, 1800, 1810, - 1821, 1831, 1841, 1851, - 1862, 1872, 1883, 1893, - 1903, 1913, 1923, 1934, - 1944, 1955, 1965, 1975, - 1985, 1996, 2006, 2016, - 2027, 2037, 2048, 2058, - 2068, 2079, 2089, 2099, - 2110, 2120, 2130, 2141, - 2151, 2161, 2172, 2182, - 2193, 2203, 2213, 2224, - 2234, 2245, 2255, 2265, - 2276, 2286, 2297, 2307, - 2318, 2328, 2338, 2349, - 2359, 2370, 2380, 2391, - 2401, 2412, 2422, 2433, - 2443, 2454, 2464, 2475, - 2485, 2496, 2506, 2517, - 2527, 2537, 2548, 2559, - 2569, 2580, 2590, 2601, - 2612, 2622, 2632, 2643, - 2654, 2664, 2675, 2685, - 2696, 2707, 2717, 2728, - 2738, 2749, 2759, 2770, - 2781, 2791, 2802, 2813, - 2823, 2834, 2845, 2855, - 2866, 2877, 2887, 2898, - 2909, 2919, 2930, 2941, - 2951, 2962, 2973, 2984, - 2994, 3005, 3015, 3027, - 3037, 3048, 3058, 3069, - 3080, 3091, 3101, 3113, - 3123, 3134, 3145, 3156, - 3166, 3177, 3188, 3199, - 3210, 3220, 3231, 3242, - 3253, 3264, 3275, 3285, - 3296, 3307, 3318, 3329, - 3340, 3351, 3362, 3373, - 3384, 3394, 3405, 3416, - 3427, 3438, 3449, 3460, - 3471, 3482, 3493, 3504, - 3515, 3526, 3537, 3548, - 3559, 3570, 3581, 3592, - 3603, 3614, 3625, 3636, - 3647, 3659, 3670, 3681, - 3692, 3703, 3714, 3725, - 3736, 3747, 3758, 3770, - 3781, 3792, 3803, 3814, - 3825, 3837, 3848, 3859, - 3870, 3881, 3893, 3904, - 3915, 3926, 3937, 3949, - 3960, 3971, 3983, 3994, - 4005, 4017, 4028, 4039, - 4051, 4062, 4073, 4085, - 4096, 4107, 4119, 4130, - 4141, 4153, 4164, 4175, - 4187, 4198, 4210, 4221, - 4233, 4244, 4256, 4267, - 4279, 4290, 4302, 4313, - 4325, 4336, 4348, 4359, - 4371, 4382, 4394, 4406, - 4417, 4429, 4440, 4452, - 4464, 4475, 4487, 4499, - 4510, 4522, 4533, 4545, - 4557, 4569, 4581, 4592, - 4604, 4616, 4627, 4639, - 4651, 4663, 4674, 4686, - 4698, 4710, 4722, 4734, - 4746, 4758, 4769, 4781, - 4793, 4805, 4817, 4829, - 4841, 4853, 4865, 4877, - 4889, 4900, 4913, 4925, - 4936, 4949, 4961, 4973, - 4985, 4997, 5009, 5021, - 5033, 5045, 5057, 5070, - 5081, 5094, 5106, 5118, - 5130, 5143, 5155, 5167, - 5179, 5191, 5204, 5216, - 5228, 5240, 5253, 5265, - 5278, 5290, 5302, 5315, - 5327, 5340, 5352, 5364, - 5377, 5389, 5401, 5414, - 5426, 5439, 5451, 5464, - 5476, 5489, 5502, 5514, - 5527, 5539, 5552, 5564, - 5577, 5590, 5603, 5615, - 5628, 5641, 5653, 5666, - 5679, 5691, 5704, 5717, - 5730, 5743, 5756, 5768, - 5781, 5794, 5807, 5820, - 5833, 5846, 5859, 5872, - 5885, 5897, 5911, 5924, - 5937, 5950, 5963, 5976, - 5989, 6002, 6015, 6028, - 6042, 6055, 6068, 6081, - 6094, 6108, 6121, 6134, - 6147, 6160, 6174, 6187, - 6201, 6214, 6227, 6241, - 6254, 6267, 6281, 6294, - 6308, 6321, 6335, 6348, - 6362, 6375, 6389, 6403, - 6416, 6430, 6443, 6457, - 6471, 6485, 6498, 6512, - 6526, 6540, 6554, 6567, - 6581, 6595, 6609, 6623, - 6637, 6651, 6665, 6679, - 6692, 6706, 6721, 6735, - 6749, 6763, 6777, 6791, - 6805, 6819, 6833, 6848, - 6862, 6876, 6890, 6905, - 6919, 6933, 6948, 6962, - 6976, 6991, 7005, 7020, - 7034, 7049, 7064, 7078, - 7093, 7107, 7122, 7136, - 7151, 7166, 7180, 7195, - 7210, 7225, 7240, 7254, - 7269, 7284, 7299, 7314, - 7329, 7344, 7359, 7374, - 7389, 7404, 7419, 7434, - 7449, 7465, 7480, 7495, - 7510, 7526, 7541, 7556, - 7571, 7587, 7602, 7618, - 7633, 7648, 7664, 7680, - 7695, 7711, 7726, 7742, - 7758, 7773, 7789, 7805, - 7821, 7836, 7852, 7868, - 7884, 7900, 7916, 7932, - 7948, 7964, 7981, 7997, - 8013, 8029, 8045, 8061, - 8078, 8094, 8110, 8127, - 8143, 8160, 8176, 8193, - 8209, 8226, 8242, 8259, - 8276, 8292, 8309, 8326, - 8343, 8360, 8377, 8394, - 8410, 8428, 8444, 8462, - 8479, 8496, 8513, 8530, - 8548, 8565, 8582, 8600, - 8617, 8634, 8652, 8670, - 8687, 8704, 8722, 8740, - 8758, 8775, 8793, 8811, - 8829, 8847, 8865, 8883, - 8901, 8919, 8937, 8955, - 8974, 8992, 9010, 9029, - 9047, 9066, 9084, 9103, - 9121, 9140, 9159, 9177, - 9196, 9215, 9234, 9253, - 9272, 9291, 9310, 9329, - 9349, 9368, 9387, 9406, - 9426, 9445, 9465, 9484, - 9504, 9524, 9544, 9563, - 9583, 9603, 9623, 9643, - 9663, 9683, 9703, 9723, - 9744, 9764, 9785, 9805, - 9826, 9846, 9867, 9888, - 9909, 9930, 9950, 9971, - 9993, 10013, 10035, 10056, - 10077, 10099, 10120, 10142, - 10163, 10185, 10207, 10229, - 10251, 10273, 10294, 10317, - 10339, 10361, 10384, 10406, - 10428, 10451, 10474, 10496, - 10519, 10542, 10565, 10588, - 10612, 10635, 10658, 10682, - 10705, 10729, 10752, 10776, - 10800, 10824, 10848, 10872, - 10896, 10921, 10945, 10969, - 10994, 11019, 11044, 11069, - 11094, 11119, 11144, 11169, - 11195, 11221, 11246, 11272, - 11298, 11324, 11350, 11376, - 11402, 11429, 11456, 11482, - 11509, 11536, 11563, 11590, - 11618, 11645, 11673, 11701, - 11728, 11756, 11785, 11813, - 11842, 11870, 11899, 11928, - 11957, 11986, 12015, 12045, - 12074, 12104, 12134, 12164, - 12194, 12225, 12255, 12286, - 12317, 12348, 12380, 12411, - 12443, 12475, 12507, 12539, - 12571, 12604, 12637, 12670, - 12703, 12737, 12771, 12804, - 12839, 12873, 12907, 12942, - 12977, 13013, 13048, 13084, - 13120, 13156, 13192, 13229, - 13267, 13304, 13341, 13379, - 13418, 13456, 13495, 13534, - 13573, 13613, 13653, 13693, - 13734, 13775, 13817, 13858, - 13901, 13943, 13986, 14029, - 14073, 14117, 14162, 14206, - 14252, 14297, 14343, 14390, - 14437, 14485, 14533, 14582, - 14631, 14680, 14731, 14782, - 14833, 14885, 14937, 14991, - 15044, 15099, 15154, 15210, - 15266, 15324, 15382, 15441, - 15500, 15561, 15622, 15684, - 15747, 15811, 15877, 15943, - 16010, 16078, 16148, 16218, - 16290, 16363, 16437, 16513, - 16590, 16669, 16749, 16831, - 16915, 17000, 17088, 17177, - 17268, 17362, 17458, 17556, - 17657, 17761, 17868, 17977, - 18090, 18207, 18328, 18452, - 18581, 18715, 18854, 18998, - 19149, 19307, 19472, 19645, - 19828, 20021, 20226, 20444, - 20678, 20930, 21204, 21503, - 21835, 22206, 22630, 23124, - 23721, 24478, 25529, 27316, -}; + /* generate N words at one time */ + if (s->k == TT800_N) { + int kk; + for (kk=0; kk< TT800_N - TT800_M; kk++) { + s->seed[kk] = s->seed[kk+TT800_M] + ^ (s->seed[kk] >> 1) + ^ mag01[s->seed[kk] % 2]; + } -/* tabledist - return a pseudo-randomly distributed value with mean mu and + for (; kk < TT800_N; kk++) { + s->seed[kk] = s->seed[kk+(TT800_M-TT800_N)] + ^ (s->seed[kk] >> 1) + ^ mag01[s->seed[kk] % 2]; + } + s->k = 0; + } + + y = s->seed[s->k]; + y ^= (y << 7) & 0x2b5b2500; /* s and b, magic vectors */ + y ^= (y << 15) & 0xdb8b0000; /* t and c, magic vectors */ + + /* + * the following line was added by Makoto Matsumoto in the 1996 version + * to improve lower bit's corellation. + * Delete this line to o use the code published in 1994. + */ + y ^= (y >> 16); /* added to the 1994 version */ + s->k++; + + return y; +} + +/* get_crandom - correlated random number generator + * Next number depends on last value. + * rho is scaled to avoid floating point. + */ +static unsigned long get_crandom(struct crndstate *state) +{ + u64 value, rho; + unsigned long answer; + + if (state->rho == 0) /* no correllation */ + return get_urandom(state); + + value = get_urandom(state); + rho = (u64)state->rho + 1; + answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; + + pr_debug("get_crandom: value %llu last %lu rho %llu = %lu\n", + value, (unsigned long) state->last, rho, + (unsigned long) answer); + state->last = answer; + return answer; +} + +/* get_drandom - return a pseudo-randomly distributed value with mean mu and * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static inline int tabledist(int mu, int sigma) +static int get_drandom(const struct dtable *dist, + struct crndstate *state, + int mu, int sigma) { - int x; - int index; - int sigmamod, sigmadiv; + int t, x; + unsigned long rnd; if (sigma == 0) return mu; + + rnd = get_crandom(state); - index = (net_random() & (TABLESIZE-1)); - sigmamod = sigma%TABLEFACTOR; - sigmadiv = sigma/TABLEFACTOR; - x = sigmamod*disttable[index]; + /* uniform distribution */ + if (!dist) + return (rnd % (2*sigma)) - sigma + mu; + + t = dist->table[rnd % dist->size]; + x = (sigma % TCA_NETEM_TABLEFACTOR) * t; if (x >= 0) - x += TABLEFACTOR/2; + x += TCA_NETEM_TABLEFACTOR/2; else - x -= TABLEFACTOR/2; + x -= TCA_NETEM_TABLEFACTOR/2; + + return (x + sigma * t)/TCA_NETEM_TABLEFACTOR + mu; +} + - x /= TABLEFACTOR; - x += sigmadiv*disttable[index]; - x += mu; - return x; +/* init_crandom - initialize correlated random number generator + * Use entropy source for initial seed. + */ +static void init_crandom(struct crndstate *state, unsigned long rho) +{ + state->rho = rho; + get_random_bytes(&state->seed, sizeof(state->seed)); + state->last = get_urandom(state); } /* Enqueue packets with underlying discipline (fifo) @@ -605,17 +210,29 @@ { struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; + struct sk_buff *nskb; psched_time_t now; long delay; + int ret; pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { + if (q->loss && q->loss >= get_crandom(&q->loss_cor)) { + pr_debug("netem_enqueue random packet dropped\n"); sch->stats.drops++; return 0; /* lie about loss so TCP doesn't know */ } + /* Random duplication */ + if (q->duplicate + && q->duplicate >= get_crandom(&q->dup_cor) + && (nskb = skb_clone(skb, GFP_ATOMIC)) != NULL) { + pr_debug("netem_enqueue random packet duplicated\n"); + ret = q->qdisc->enqueue(nskb, q->qdisc); + if (ret) + sch->stats.drops++; + } /* If doing simple delay then gap == 0 so all packets * go into the delayed holding queue @@ -623,8 +240,6 @@ * packets will be delayed. */ if (q->counter < q->gap) { - int ret; - ++q->counter; ret = q->qdisc->enqueue(skb, q->qdisc); if (ret) @@ -635,10 +250,12 @@ q->counter = 0; PSCHED_GET_TIME(now); - if (q->jitter) - delay = tabledist(q->latency, q->jitter); - else - delay = q->latency; + + delay = get_drandom(q->distribution, &q->delay_cor, + q->latency, q->jitter); + + pr_debug("netem_enqueue: delay %ld (mu=%u sigma=%u)\n", + delay, q->latency, q->jitter); PSCHED_TADD2(now, delay, cb->time_to_send); @@ -752,39 +369,65 @@ return ret; } +static struct dtable *new_dtable(int size, const __s16 *data) +{ + struct dtable *d; + int i; + + d = kmalloc(sizeof(*d) + size*sizeof(d->table[0]), GFP_KERNEL); + if (d) { + d->size = size; + for (i = 0; i < size; i++) + d->table[i] = data[i]; + } + return d; +} + +static void dtable_rcu_free(struct rcu_head *rcu) +{ + kfree(container_of(rcu, struct dtable, rcu)); +} + static int netem_change(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); - struct tc_netem_qopt *qopt = RTA_DATA(opt); - struct Qdisc *child; - int ret; - - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) + const struct tc_netem_qopt *qopt = RTA_DATA(opt); + long data_size = opt->rta_len - RTA_LENGTH(sizeof(*qopt)); + struct dtable *dt; + + if (data_size < 0) { + pr_debug( "netem: requested options < current api\n"); return -EINVAL; + } - child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); - if (!child) + data_size /= sizeof(qopt->delay_dist[0]); + if (data_size > 16384) { + pr_debug("netem: bad distribution data size\n"); return -EINVAL; - - ret = set_fifo_limit(child, qopt->limit); - if (ret) { - qdisc_destroy(child); - return ret; } - sch_tree_lock(sch); - if (child) { - child = xchg(&q->qdisc, child); - if (child != &noop_qdisc) - qdisc_destroy(child); - - q->latency = qopt->latency; - q->jitter = qopt->jitter; - q->limit = qopt->limit; - q->gap = qopt->gap; - q->loss = qopt->loss; - } - sch_tree_unlock(sch); + if (data_size > 0) { + dt = new_dtable(data_size, qopt->delay_dist); + if (!dt) + return -ENOMEM; + } else + dt = NULL; + + + q->latency = qopt->latency; + q->jitter = qopt->jitter; + q->limit = qopt->limit; + q->gap = qopt->gap; + q->loss = qopt->loss; + q->duplicate = qopt->duplicate; + + dt = xchg(&q->distribution, dt); + if (dt) + call_rcu(&dt->rcu, dtable_rcu_free); + + init_crandom(&q->delay_cor, qopt->delay_corr); + init_crandom(&q->loss_cor, qopt->loss_corr); + init_crandom(&q->dup_cor, qopt->dup_corr); return 0; } @@ -792,8 +435,10 @@ static int netem_init(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); + const struct tc_netem_qopt *qopt = RTA_DATA(opt); + int ret; - if (!opt) + if (!opt || opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL; skb_queue_head_init(&q->delayed); @@ -803,8 +448,31 @@ q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; + q->distribution = NULL; + + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (!q->qdisc) { + pr_debug("netem: qdisc create failed\n"); + return -ENOMEM; + } + + ret = set_fifo_limit(q->qdisc, qopt->limit); + if (ret) { + pr_debug("netem: can't set fifo limit\n"); + goto error; + } - return netem_change(sch, opt); + ret = netem_change(sch, opt); + if (ret) { + pr_debug("netem: change failed\n"); + goto error; + } + + return 0; + + error: + qdisc_destroy(q->qdisc); + return ret; } static void netem_destroy(struct Qdisc *sch) @@ -812,21 +480,29 @@ struct netem_sched_data *q = qdisc_priv(sch); del_timer_sync(&q->timer); + + kfree(q->distribution); qdisc_destroy(q->qdisc); } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = qdisc_priv(sch); + const struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_netem_qopt qopt; + memset(&qopt, 0, sizeof(qopt)); qopt.latency = q->latency; qopt.jitter = q->jitter; qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; + qopt.duplicate = q->duplicate; + qopt.delay_corr = q->delay_cor.rho; + qopt.loss_corr = q->loss_cor.rho; + qopt.dup_corr = q->dup_cor.rho; + /* don't dump out distribution table */ RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); return skb->len; From jgarzik@pobox.com Wed Aug 11 12:36:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 12:36: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 i7BJa6Zm017759 for ; Wed, 11 Aug 2004 12:36:07 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1BuytE-00043D-AR; Wed, 11 Aug 2004 20:36:00 +0100 Message-ID: <411A7514.30908@pobox.com> Date: Wed, 11 Aug 2004 15:35:48 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mirko Lindner CC: Christoph Hellwig , netdev@oss.sgi.com, Ralph Roesler Subject: Re: [PATCH] convert skge to pci_driver API (2nd try) References: <20040620112859.GA13794@lst.de> <4100F51C.3030709@syskonnect.de> In-Reply-To: <4100F51C.3030709@syskonnect.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7660 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 Mirko Lindner wrote: > Therefore we would like to keep our driver consistent and it's not > possible for us to merge your changes into our code tree. Please don't Unfortunately it is a requirement of Linux development that you track the upstream tree. In particular, you "fell off the map" for months without a driver update or email, so it seems perfectly reasonable that other patches would get applied in the meantime. Jeff From fork0@users.sourceforge.net Wed Aug 11 12:41:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 12:41:27 -0700 (PDT) Received: from mx2.valuehost.ru (mx2.valuehost.ru [62.118.251.7]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7BJfK69018163 for ; Wed, 11 Aug 2004 12:41:21 -0700 Received: (qmail 47898 invoked by uid 89); 11 Aug 2004 23:40:42 +0400 Received: from unknown (HELO mx4.valuehost.ru) (62.118.251.203) by mx2.valuehost.ru with SMTP; 11 Aug 2004 23:40:41 +0400 Received: (qmail 98456 invoked by uid 89); 11 Aug 2004 23:40:22 +0400 Received: from unknown (HELO tigra.home) (fork0@delphiplus.org@80.140.239.173) by mx4.valuehost.ru with SMTP; 11 Aug 2004 23:40:19 +0400 Received: from steel.home ([192.168.1.2]) by tigra.home with esmtp (Exim 3.36 #1 (Debian)) id 1BuyxO-0005GD-00; Wed, 11 Aug 2004 21:40:18 +0200 Received: from raa by steel.home with local (Exim 4.24 #1 (Debian)) id 1BuyxO-000160-1S; Wed, 11 Aug 2004 21:40:18 +0200 Date: Wed, 11 Aug 2004 21:40:18 +0200 From: Alex Riesen To: linux-kernel Cc: Nick Palmer , netdev@oss.sgi.com Subject: Re: select implementation not POSIX compliant? Message-ID: <20040811194018.GA3971@steel.home> Reply-To: Alex Riesen Mail-Followup-To: Alex Riesen , linux-kernel , Nick Palmer , netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37062.66.93.180.209.1092243659.squirrel@66.93.180.209> User-Agent: Mutt/1.5.6i X-archive-position: 7661 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: fork0@users.sourceforge.net Precedence: bulk X-list: netdev On linux-kernel, Nick Palmer wrote: > I am working on porting some software from Solaris to Linux 2.6.7. I > have run into a problem with the interaction of select and/or > recvmsg and close in our multi-threaded application. The application > expects that a close call on a socket that another thread is > blocking in select and/or recvmsg on will cause select and/or > recvmsg to return with an error. Linux does not seem to do this. (I > also verified that the same issue exists in Linux 2.4.25, just to be > sure it wasn't introduced in 2.6 in case you were wondering.) It works always for stream sockets and does not at all (even with shutdown, even using poll(2) or read(2) instead of select) for dgram sockets. What domain (inet, local) are your sockets in? What type (stream, dgram)? There will probably be a problem anyway with changing the behaviour: there surely is lots of code, which start complaining about select and poll finishing "unexpectedly". I used this to check: #include #include #include #include #include #include #include int main(int argc, char* argv[]) { int status; int fds[2]; fd_set set; #if 0 puts("stream"); if ( socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0 ) #else puts("dgram"); if ( socketpair(PF_LOCAL, SOCK_DGRAM, 0, fds) < 0 ) #endif { perror("socketpair"); exit(1); } fcntl(fds[0], F_SETFL, fcntl(fds[0], F_GETFL) | O_NONBLOCK); fcntl(fds[1], F_SETFL, fcntl(fds[1], F_GETFL) | O_NONBLOCK); switch ( fork() ) { case 0: sleep(1); close(fds[0]); shutdown(fds[1], SHUT_RD); close(fds[1]); exit(0); break; case -1: perror("fork"); exit(1); } close(fds[1]); FD_ZERO(&set); FD_SET(fds[0], &set); select(fds[0] + 1, &set, NULL, NULL, 0); wait(&status); return 0; } From pavel@atrey.karlin.mff.cuni.cz Wed Aug 11 13:29:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 13:29:29 -0700 (PDT) Received: from atrey.karlin.mff.cuni.cz (postfix@atrey.karlin.mff.cuni.cz [195.113.31.123]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BKTOEU019382 for ; Wed, 11 Aug 2004 13:29:25 -0700 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 502034B4949; Wed, 11 Aug 2004 22:29:18 +0200 (CEST) Date: Wed, 11 Aug 2004 22:27:04 +0200 From: Pavel Machek To: Jeff Garzik Cc: Pavel Machek , Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list , Jouni Malinen Subject: Re: ipw2100 wireless driver Message-ID: <20040811202704.GD1550@openzaurus.ucw.cz> References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <20040810113439.A15100@infradead.org> <20040811121735.GA31171@elf.ucw.cz> <411A5D3B.3010808@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411A5D3B.3010808@pobox.com> User-Agent: Mutt/1.3.27i X-archive-position: 7662 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavel@suse.cz Precedence: bulk X-list: netdev Hi! > >Hmm, strange, one merge in last 8 weeks. That's not too active > >project. Are you sure this is the right tree to work against? > > > It's the right tree, but wireless development hasn't coalesced yet on > that tree it appears. It sounds like the Intel folks are interested > in working on that tree, and others have mentioned they are > interested as well. Is there way to access that tree without bk? Daily patches maybe? -- 64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms From davem@redhat.com Wed Aug 11 13:31:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 13:31:46 -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 i7BKVetU019714 for ; Wed, 11 Aug 2004 13:31:41 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7BKVWe1023859; Wed, 11 Aug 2004 16:31:32 -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 i7BKVWa21316; Wed, 11 Aug 2004 16:31:32 -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 i7BKUUwi022074; Wed, 11 Aug 2004 16:30:44 -0400 Date: Wed, 11 Aug 2004 13:30:43 -0700 From: "David S. Miller" To: David Stevens Cc: nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, yoshfuji@linux-ipv6.org Subject: Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code Message-Id: <20040811133043.455c81fa.davem@redhat.com> In-Reply-To: References: <20040810230144.2a68914b.davem@redhat.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: 7663 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 Wed, 11 Aug 2004 13:14:19 -0600 David Stevens wrote: > raw sockets predate VJ contributions by many years and are > typically used by protocols not in the kernel. The original "ping" > used raw sockets, as well as routing protocols like BGP and RIP > which are directly encapsulated in IP, without a separate transport > protocol. The original traceroute I believe used UDP and just set > the TTL-- I don't believe it used raw sockets at all. Don't know what > the current versions do; haven't looked in a while. "ping" does not use the hdrinclude feature. > And IPv6 does support raw sockets; it just doesn't let you > generate bad checksums and some header fields, I expect > to make it harder to write attack software. So like I said, raw without the hdrinclude feature. From khandelw@cs.fsu.edu Wed Aug 11 13:33:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 13:33:36 -0700 (PDT) Received: from mail.cs.fsu.edu (CS2075.cs.fsu.edu [128.186.122.75]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BKXULK020056 for ; Wed, 11 Aug 2004 13:33:31 -0700 Received: from websrv.cs.fsu.edu (websrv.cs.fsu.edu [128.186.120.244]) by mail.cs.fsu.edu (Postfix) with ESMTP id 6E196F2943; Wed, 11 Aug 2004 16:33:30 -0400 (EDT) Received: (from system-vhost@localhost) by websrv.cs.fsu.edu (8.12.6/8.12.6/Submit) id i7BKXHRq000795; Wed, 11 Aug 2004 16:33:17 -0400 X-Authentication-Warning: websrv.cs.fsu.edu: system-vhost set sender to khandelw@cs.fsu.edu using -f Received: from odcimginet.convergys.com (odcimginet.convergys.com [12.151.80.14]) by system.cs.fsu.edu (Horde) with HTTP for ; Wed, 11 Aug 2004 16:33:17 -0400 Message-ID: <1092256397.512046f64c822@system.cs.fsu.edu> Date: Wed, 11 Aug 2004 16:33:17 -0400 From: khandelw@cs.fsu.edu To: Alex Riesen Cc: linux-kernel , Nick Palmer , netdev@oss.sgi.com Subject: Re: select implementation not POSIX compliant? References: <20040811194018.GA3971@steel.home> In-Reply-To: <20040811194018.GA3971@steel.home> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Originating-IP: 12.151.80.14 X-archive-position: 7664 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khandelw@cs.fsu.edu Precedence: bulk X-list: netdev select should work for any type of socket. Its based on the type of file descriptor not whether it is stream/dgram. man recvmsg - recvmsg() may be used to receive data on a socket whether it is in a connected state or not. s is a socket created with socket(3SOCKET). so why should recvmsg return error???? upon closing the socket in other thread? wouldn't the socket linger around for some time... If no messages are available at the socket, the receive call waits for a message to arrive, unless the socket is non- blocking (see fcntl(2)) in which case -1 is returned with the external variable errno set to EWOULDBLOCK. Quoting Alex Riesen : > On linux-kernel, Nick Palmer wrote: > > I am working on porting some software from Solaris to Linux 2.6.7. I > > have run into a problem with the interaction of select and/or > > recvmsg and close in our multi-threaded application. The application > > expects that a close call on a socket that another thread is > > blocking in select and/or recvmsg on will cause select and/or > > recvmsg to return with an error. Linux does not seem to do this. (I > > also verified that the same issue exists in Linux 2.4.25, just to be > > sure it wasn't introduced in 2.6 in case you were wondering.) > > It works always for stream sockets and does not at all (even with > shutdown, even using poll(2) or read(2) instead of select) for dgram > sockets. > > What domain (inet, local) are your sockets in? > What type (stream, dgram)? > > There will probably be a problem anyway with changing the behaviour: > there surely is lots of code, which start complaining about select and > poll finishing "unexpectedly". > > I used this to check: > > #include > #include > #include > #include > #include > #include > #include > > int main(int argc, char* argv[]) > { > int status; > int fds[2]; > fd_set set; > #if 0 > puts("stream"); > if ( socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0 ) > #else > puts("dgram"); > if ( socketpair(PF_LOCAL, SOCK_DGRAM, 0, fds) < 0 ) > #endif > { > perror("socketpair"); > exit(1); > } > fcntl(fds[0], F_SETFL, fcntl(fds[0], F_GETFL) | O_NONBLOCK); > fcntl(fds[1], F_SETFL, fcntl(fds[1], F_GETFL) | O_NONBLOCK); > switch ( fork() ) > { > case 0: > sleep(1); > close(fds[0]); > shutdown(fds[1], SHUT_RD); > close(fds[1]); > exit(0); > break; > case -1: > perror("fork"); > exit(1); > } > close(fds[1]); > FD_ZERO(&set); > FD_SET(fds[0], &set); > select(fds[0] + 1, &set, NULL, NULL, 0); > wait(&status); > return 0; > } > > - > 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 linux-netdev@gmane.org Wed Aug 11 13:40:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 13:40:34 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BKeNEW020502 for ; Wed, 11 Aug 2004 13:40:24 -0700 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BuztR-0000pM-00 for ; Wed, 11 Aug 2004 22:40:17 +0200 Received: from qemfd.net ([216.27.161.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Aug 2004 22:40:17 +0200 Received: from dank by qemfd.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Aug 2004 22:40:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: netdev@oss.sgi.com From: nick black Subject: Re: Transparent Proxying Date: Wed, 11 Aug 2004 20:31:34 +0000 (UTC) Lines: 26 Message-ID: References: <20040804032756.GA2388@gondor.apana.org.au> Reply-To: dank@reflexsecurity.com X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: qemfd.net User-Agent: slrn/0.9.8.0 (Linux) X-archive-position: 7665 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dank@qemfd.net Precedence: bulk X-list: netdev On 2004-08-04, Herbert Xu wrote: > I looked around and found the TPROXY patch which is part of pom-ng. > It is capable of providing the information I need via a getsockopt() > call. I had to do something similar recently. While the entirety of TPROXY has not been accepted from what I could tell (particularly non-local binding supplying a routing context), the SO_ORIGINAL_DST sockopt referenced while searching for it works under at least late 2.4: struct sockaddr_in daddr; socklen_t slen; memset(&daddr,0,sizeof(daddr)); daddr.sin_family = AF_INET; slen = sizeof(daddr); if(getsockopt(accepted_sd,SOL_IP,SO_ORIGINAL_DST,&daddr,&slen)){ close(accepted_sd); return -1; } -- nick black "np: the class of dashed hopes and idle dreams." free hearts, free foreheads -- you and i are old; old age hath yet his honour and his toil; death closes all: but something ere the end, some work of noble note, may yet be done, not unbecoming men that strove with gods. (tennyson) From johnpol@2ka.mipt.ru Wed Aug 11 14:02:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 14:02:55 -0700 (PDT) Received: from ffke-campus-gw.mipt.ru (ffke-campus-gw.mipt.ru [194.85.82.65]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BL2X81021455 for ; Wed, 11 Aug 2004 14:02:42 -0700 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 i7BL280d029183; Thu, 12 Aug 2004 01:02:09 +0400 Date: Thu, 12 Aug 2004 01:15:00 +0400 From: Evgeniy Polyakov To: Manfred Spraul Cc: netdev@oss.sgi.com Subject: [PATCH] poll controller in natsemi Message-Id: <20040812011500.19162388@zanzibar.2ka.mipt.ru> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed version 0.9.11claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Thu__12_Aug_2004_01_15_00_+0400_tgXlCy2XbyvZAHVz" X-archive-position: 7666 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=_Thu__12_Aug_2004_01_15_00_+0400_tgXlCy2XbyvZAHVz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Patch enables poll controller and netconsole for natsemi network driver. Patch is against 2.6.8-rc4 kernel. Tested. Works. Please apply. Evgeniy Polyakov ( s0mbre ) Only failure makes us experts. -- Theo de Raadt --Multipart=_Thu__12_Aug_2004_01_15_00_+0400_tgXlCy2XbyvZAHVz Content-Type: text/plain; name="natsemi.diff" Content-Disposition: attachment; filename="natsemi.diff" Content-Transfer-Encoding: 7bit --- linux-2.6/drivers/net/natsemi.c 2004-08-10 13:35:34.000000000 +0400 +++ linux-2.6/drivers/net/natsemi.c 2004-08-11 23:41:29.000000000 +0400 @@ -765,6 +765,9 @@ static int netdev_close(struct net_device *dev); static int netdev_get_regs(struct net_device *dev, u8 *buf); static int netdev_get_eeprom(struct net_device *dev, u8 *buf); +#ifdef CONFIG_NET_POLL_CONTROLLER +static void natsemi_poll_controller(struct net_device *dev); +#endif static void move_int_phy(struct net_device *dev, int addr) { @@ -920,6 +923,9 @@ dev->do_ioctl = &netdev_ioctl; dev->tx_timeout = &tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = natsemi_poll_controller; +#endif if (mtu) dev->mtu = mtu; @@ -2188,6 +2194,15 @@ return IRQ_RETVAL(handled); } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void natsemi_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + intr_handler(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif + /* This routine is logically part of the interrupt handler, but separated for clarity and better register allocation. */ static void netdev_rx(struct net_device *dev) --Multipart=_Thu__12_Aug_2004_01_15_00_+0400_tgXlCy2XbyvZAHVz-- From demon@pro-linux.de Wed Aug 11 14:13:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 14:14:04 -0700 (PDT) Received: from 4demon.com (4demon.com [217.160.186.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BLDvPH022325 for ; Wed, 11 Aug 2004 14:13:59 -0700 Received: from pro-linux.de (p508B33F4.dip.t-dialin.net [80.139.51.244]) by 4demon.com (Postfix) with ESMTP id 2FB7014004B; Wed, 11 Aug 2004 23:13:51 +0200 (CEST) Message-ID: <411A8D5B.10707@pro-linux.de> Date: Wed, 11 Aug 2004 23:19:23 +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: Jeff Garzik Cc: Mirko Lindner , Christoph Hellwig , netdev@oss.sgi.com, Ralph Roesler Subject: Re: [PATCH] convert skge to pci_driver API (2nd try) References: <20040620112859.GA13794@lst.de> <4100F51C.3030709@syskonnect.de> <411A7514.30908@pobox.com> In-Reply-To: <411A7514.30908@pobox.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7667 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 Hi Jeff, sorry for the absence. I think my last email was wrongly expressed. Yes, I know the procedure of the kernel development and we've applied all the current maintime patches/changes into the sk98lin V7 driver. It's not a problem. Our driver has a similar function as Christoph patch and we can merge Christoph work to our code. The problem is that some people reported us driver crashes with the new patch during the init and/or exit phase. The patch seems to be having some problems (as example ProcFS init) and is not included in the kernel at the moment. In consequence of this we would keep the kernel driver consistent and submit you as soon as possible a tested driver with new init-function and some other changes. It would be difficult to maintain two patchsets and fixing the old driver V6. Mirko Jeff Garzik wrote: > Mirko Lindner wrote: > >> Therefore we would like to keep our driver consistent and it's not >> possible for us to merge your changes into our code tree. Please don't > > > > Unfortunately it is a requirement of Linux development that you track > the upstream tree. > > In particular, you "fell off the map" for months without a driver update > or email, so it seems perfectly reasonable that other patches would get > applied in the meantime. > > Jeff > > > > !DSPAM:411a752655587707918480! > From fork0@users.sourceforge.net Wed Aug 11 14:23:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 14:23:33 -0700 (PDT) Received: from mx1.valuehost.ru (mx1.valuehost.ru [62.118.251.208]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7BLNR7J022927 for ; Wed, 11 Aug 2004 14:23:28 -0700 Received: (qmail 7158 invoked by uid 89); 12 Aug 2004 01:23:20 +0400 Received: from unknown (HELO mx4.valuehost.ru) (62.118.251.203) by mx1.valuehost.ru with SMTP; 12 Aug 2004 01:23:20 +0400 Received: (qmail 55304 invoked by uid 89); 12 Aug 2004 01:23:20 +0400 Received: from unknown (HELO tigra.home) (fork0@delphiplus.org@80.140.239.173) by mx4.valuehost.ru with SMTP; 12 Aug 2004 01:23:18 +0400 Received: from steel.home ([192.168.1.2]) by tigra.home with esmtp (Exim 3.36 #1 (Debian)) id 1Bv0Z2-0005Gd-00; Wed, 11 Aug 2004 23:23:16 +0200 Received: from raa by steel.home with local (Exim 4.24 #1 (Debian)) id 1Bv0Z2-0004Nq-1x; Wed, 11 Aug 2004 23:23:16 +0200 Date: Wed, 11 Aug 2004 23:23:16 +0200 From: Alex Riesen To: khandelw@cs.fsu.edu Cc: linux-kernel , Nick Palmer , netdev@oss.sgi.com Subject: Re: select implementation not POSIX compliant? Message-ID: <20040811212316.GA16028@steel.home> Reply-To: Alex Riesen Mail-Followup-To: Alex Riesen , khandelw@cs.fsu.edu, linux-kernel , Nick Palmer , netdev@oss.sgi.com References: <20040811194018.GA3971@steel.home> <1092256397.512046f64c822@system.cs.fsu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1092256397.512046f64c822@system.cs.fsu.edu> User-Agent: Mutt/1.5.6i X-archive-position: 7668 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: fork0@users.sourceforge.net Precedence: bulk X-list: netdev I missed the point: threads! _Not_ duplicated handles. Ignore me. From sdake@mvista.com Wed Aug 11 14:57:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 14:57:48 -0700 (PDT) Received: from zipcode.az.mvista.com (rav-az.mvista.com [65.200.49.157]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BLvgwf024030 for ; Wed, 11 Aug 2004 14:57:43 -0700 Received: from persist.az.mvista.com (persist.az.mvista.com [10.50.1.87]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id PAA21935; Wed, 11 Aug 2004 15:28:15 -0700 Subject: Re: select implementation not POSIX compliant? From: Steven Dake Reply-To: sdake@mvista.com To: Alex Riesen Cc: linux-kernel , Nick Palmer , netdev@oss.sgi.com In-Reply-To: <20040811194018.GA3971@steel.home> References: <20040811194018.GA3971@steel.home> Content-Type: text/plain Organization: MontaVista Software, Inc. Message-Id: <1092261449.4717.65.camel@persist.az.mvista.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 11 Aug 2004 14:57:29 -0700 Content-Transfer-Encoding: 7bit X-archive-position: 7669 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: netdev You will find poll works as you desire but select does not. I recommend porting to poll anyway; select sucks bad. You might even try out epoll in 2.6. Thanks Good luck On Wed, 2004-08-11 at 12:40, Alex Riesen wrote: > On linux-kernel, Nick Palmer wrote: > > I am working on porting some software from Solaris to Linux 2.6.7. I > > have run into a problem with the interaction of select and/or > > recvmsg and close in our multi-threaded application. The application > > expects that a close call on a socket that another thread is > > blocking in select and/or recvmsg on will cause select and/or > > recvmsg to return with an error. Linux does not seem to do this. (I > > also verified that the same issue exists in Linux 2.4.25, just to be > > sure it wasn't introduced in 2.6 in case you were wondering.) > > It works always for stream sockets and does not at all (even with > shutdown, even using poll(2) or read(2) instead of select) for dgram > sockets. > > What domain (inet, local) are your sockets in? > What type (stream, dgram)? > > There will probably be a problem anyway with changing the behaviour: > there surely is lots of code, which start complaining about select and > poll finishing "unexpectedly". > > I used this to check: > > #include > #include > #include > #include > #include > #include > #include > > int main(int argc, char* argv[]) > { > int status; > int fds[2]; > fd_set set; > #if 0 > puts("stream"); > if ( socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0 ) > #else > puts("dgram"); > if ( socketpair(PF_LOCAL, SOCK_DGRAM, 0, fds) < 0 ) > #endif > { > perror("socketpair"); > exit(1); > } > fcntl(fds[0], F_SETFL, fcntl(fds[0], F_GETFL) | O_NONBLOCK); > fcntl(fds[1], F_SETFL, fcntl(fds[1], F_GETFL) | O_NONBLOCK); > switch ( fork() ) > { > case 0: > sleep(1); > close(fds[0]); > shutdown(fds[1], SHUT_RD); > close(fds[1]); > exit(0); > break; > case -1: > perror("fork"); > exit(1); > } > close(fds[1]); > FD_ZERO(&set); > FD_SET(fds[0], &set); > select(fds[0] + 1, &set, NULL, NULL, 0); > wait(&status); > return 0; > } > > - > 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 jgarzik@pobox.com Wed Aug 11 15:01:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:01: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 i7BM1oji024399 for ; Wed, 11 Aug 2004 15:01:51 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Bv1A9-0000Cz-Q9; Wed, 11 Aug 2004 23:01:37 +0100 Message-ID: <411A9735.5010006@pobox.com> Date: Wed, 11 Aug 2004 18:01:25 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pavel Machek CC: Pavel Machek , Christoph Hellwig , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list , Jouni Malinen Subject: Re: ipw2100 wireless driver References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <20040810113439.A15100@infradead.org> <20040811121735.GA31171@elf.ucw.cz> <411A5D3B.3010808@pobox.com> <20040811202704.GD1550@openzaurus.ucw.cz> In-Reply-To: <20040811202704.GD1550@openzaurus.ucw.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7670 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 Pavel Machek wrote: > Hi! > > >>>Hmm, strange, one merge in last 8 weeks. That's not too active >>>project. Are you sure this is the right tree to work against? >> >> >>It's the right tree, but wireless development hasn't coalesced yet on >>that tree it appears. It sounds like the Intel folks are interested >>in working on that tree, and others have mentioned they are >>interested as well. > > > Is there way to access that tree without bk? Daily patches maybe? Just posted to netdev. No regular snapshots, though. Jeff From garzik@havoc.gtf.org Wed Aug 11 15:02:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:02:28 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BM2MD8024559 for ; Wed, 11 Aug 2004 15:02:22 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id D19837416; Wed, 11 Aug 2004 18:01:07 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7BM175T001975; Wed, 11 Aug 2004 18:01:07 -0400 Date: Wed, 11 Aug 2004 18:01:07 -0400 From: Jeff Garzik To: netdev@oss.sgi.com Subject: wireless-2.6 queue updated Message-ID: <20040811220107.GA1923@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: 7671 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 Just updated to latest kernel. No new changes committed. BK users: bk pull bk://gkernel.bkbits.net/wireless-2.6 Patch: http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/2.6.8-rc4-bk1-wireless1.patch.bz2 This will update the following files: MAINTAINERS | 7 drivers/net/wireless/Kconfig | 2 drivers/net/wireless/Makefile | 2 drivers/net/wireless/hostap/Kconfig | 101 drivers/net/wireless/hostap/Makefile | 8 drivers/net/wireless/hostap/hostap.c | 1178 ++++++++ drivers/net/wireless/hostap/hostap.h | 57 drivers/net/wireless/hostap/hostap_80211.h | 107 drivers/net/wireless/hostap/hostap_80211_rx.c | 1066 +++++++ drivers/net/wireless/hostap/hostap_80211_tx.c | 510 +++ drivers/net/wireless/hostap/hostap_ap.c | 3227 +++++++++++++++++++++ drivers/net/wireless/hostap/hostap_ap.h | 271 + drivers/net/wireless/hostap/hostap_common.h | 556 +++ drivers/net/wireless/hostap/hostap_config.h | 86 drivers/net/wireless/hostap/hostap_crypt.c | 167 + drivers/net/wireless/hostap/hostap_crypt.h | 50 drivers/net/wireless/hostap/hostap_crypt_ccmp.c | 486 +++ drivers/net/wireless/hostap/hostap_crypt_tkip.c | 696 ++++ drivers/net/wireless/hostap/hostap_crypt_wep.c | 281 + drivers/net/wireless/hostap/hostap_cs.c | 771 +++++ drivers/net/wireless/hostap/hostap_download.c | 758 +++++ drivers/net/wireless/hostap/hostap_hw.c | 3525 ++++++++++++++++++++++++ drivers/net/wireless/hostap/hostap_info.c | 469 +++ drivers/net/wireless/hostap/hostap_ioctl.c | 3468 +++++++++++++++++++++++ drivers/net/wireless/hostap/hostap_pci.c | 413 ++ drivers/net/wireless/hostap/hostap_plx.c | 598 ++++ drivers/net/wireless/hostap/hostap_proc.c | 466 +++ drivers/net/wireless/hostap/hostap_wlan.h | 1074 +++++++ 28 files changed, 20400 insertions(+) through these ChangeSets: (04/06/03 1.1722.86.2) [PATCH] fix hostap crypto bugs On Wed, Jun 02, 2004 at 09:36:34PM -0700, David S. Miller wrote: > You cannot invoke virt_to_page() on addresses on the kernel stack, > and that is what the various HostAP crypto modules are doing. > > This happens to work on some platforms, but it is going to explode > on others. Thanks! I have not updated my non-x86 platforms to 2.6 kernels, so I had not yet had a change to explode anything with this.. > Allocate these little header scratch area blobs in the per-crypto-instance > structs you kmalloc instead. This patch (for wireless-2.6) should do this. I used separate buffers for RX and TX because they could be in theory called concurrently. Better to get this first working, but it might be worthwhile to consider the memory use at some point. This version uses 112 bytes of additional scratch buffers per key for CCMP. (04/06/02 1.1722.86.1) Add HostAP wireless driver. From bunk@fs.tum.de Wed Aug 11 15:32:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:32:49 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7BMWfX4025552 for ; Wed, 11 Aug 2004 15:32:44 -0700 Received: (qmail 29725 invoked from network); 11 Aug 2004 22:24:43 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 11 Aug 2004 22:24:43 -0000 Date: Thu, 12 Aug 2004 00:32:25 +0200 From: Adrian Bunk To: David Howells Cc: linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: 2.6: rxrpc compile errors with SYSCTL=n Message-ID: <20040811223225.GN26174@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7672 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev I'm getting tons of the following compile errors in 2.6.8-rc4-mm1 (but it doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: <-- snip --> ... LD .tmp_vmlinux1 net/built-in.o(.text+0x154127): In function `__rxrpc_call_acks_timeout': : undefined reference to `rxrpc_kdebug' net/built-in.o(.text+0x154167): In function `__rxrpc_call_rcv_timeout': : undefined reference to `rxrpc_kdebug' net/built-in.o(.text+0x1541a7): In function `__rxrpc_call_ackr_timeout': : undefined reference to `rxrpc_kdebug' net/built-in.o(.text+0x15421e): In function `rxrpc_create_call': : undefined reference to `rxrpc_ktrace' net/built-in.o(.text+0x154242): In function `rxrpc_create_call': : undefined reference to `rxrpc_ktrace' net/built-in.o(.text+0x154272): In function `rxrpc_create_call': : undefined reference to `rxrpc_ktrace' ... make: *** [.tmp_vmlinux1] Error 1 <-- snip --> 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 romieu@fr.zoreil.com Wed Aug 11 15:36:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:36:33 -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 i7BMaQ1F025934 for ; Wed, 11 Aug 2004 15:36:27 -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 i7BMWhu5008925; Thu, 12 Aug 2004 00:32:43 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7BMWhhF008924; Thu, 12 Aug 2004 00:32:43 +0200 Date: Thu, 12 Aug 2004 00:32:43 +0200 From: Francois Romieu To: Jeff Garzik Cc: Andrew Morton , Pasi Sjoholm , Hector Martin , OGAWA Hirofumi , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8-rc3-mm1 1/2] 8139too: Rx fifo/overflow recovery Message-ID: <20040811223243.GA8584@electric-eye.fr.zoreil.com> References: <20040805234336.A15407@electric-eye.fr.zoreil.com> <411A70CB.8060101@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411A70CB.8060101@pobox.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7673 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: romieu@fr.zoreil.com Precedence: bulk X-list: netdev Jeff Garzik : [...] > You _want_ to update those registers on every packet. Otherwise the > crappy 8139 chip breaks. The affected users noticed a clear difference when the update was in the no-packet branch instead of the packet processing loop. Btw the excerpt of the documentation outlined by Hirofumi san suggests that this update makes sense. Any objection/suggestion regarding a patch which would allow the update in both branches ? -- Ueimor From bunk@fs.tum.de Wed Aug 11 15:40:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:40:34 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7BMeT0o026318 for ; Wed, 11 Aug 2004 15:40:30 -0700 Received: (qmail 519 invoked from network); 11 Aug 2004 22:32:34 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 11 Aug 2004 22:32:33 -0000 Date: Thu, 12 Aug 2004 00:40:15 +0200 From: Adrian Bunk To: Steve Whitehouse , Eduardo Marcelo Serrat Cc: linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: 2.6: DECNET compile errors with SYSCTL=n Message-ID: <20040811224015.GP26174@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7674 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev I'm getting the following compile errors in 2.6.8-rc4-mm1 (but it doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: <-- snip --> ... LD .tmp_vmlinux1 net/built-in.o(.text+0x1685e9): In function `dn_route_output_slow': : undefined reference to `dn_dev_get_default' net/built-in.o(.text+0x16a749): In function `dn_dev_bind_default': : undefined reference to `dn_dev_get_default' net/built-in.o(.text+0x16a85b): In function `dn_send_endnode_hello': : undefined reference to `mtu2blksize' net/built-in.o(.text+0x16a9f2): In function `dn_send_router_hello': : undefined reference to `mtu2blksize' net/built-in.o(.text+0x16aa08): In function `dn_send_router_hello': : undefined reference to `mtu2blksize' net/built-in.o(.text+0x16aaeb): In function `dn_send_router_hello': : undefined reference to `mtu2blksize' net/built-in.o(.text+0x16b1a4): In function `dn_dev_up': : undefined reference to `dn_dev_set_default' net/built-in.o(.text+0x16b1e8): In function `dn_dev_delete': : undefined reference to `dn_dev_check_default' net/built-in.o(.text+0x16b6b8): In function `dn_dev_seq_show': : undefined reference to `mtu2blksize' make: *** [.tmp_vmlinux1] Error 1 <-- snip --> 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 wli@holomorphy.com Wed Aug 11 15:44:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:44:38 -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 i7BMiXWN026767 for ; Wed, 11 Aug 2004 15:44:34 -0700 Received: from wli by holomorphy.com with local (Exim 3.36 #1 (Debian)) id 1Bv1mJ-0008Oz-00; Wed, 11 Aug 2004 15:41:03 -0700 Date: Wed, 11 Aug 2004 15:41:02 -0700 From: William Lee Irwin III To: Adrian Bunk Cc: David Howells , linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: 2.6: rxrpc compile errors with SYSCTL=n Message-ID: <20040811224102.GU11200@holomorphy.com> Mail-Followup-To: William Lee Irwin III , Adrian Bunk , David Howells , linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com References: <20040811223225.GN26174@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811223225.GN26174@fs.tum.de> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7675 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 Thu, Aug 12, 2004 at 12:32:25AM +0200, Adrian Bunk wrote: > I'm getting tons of the following compile errors in 2.6.8-rc4-mm1 (but > it doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: > <-- snip --> > ... > LD .tmp_vmlinux1 > net/built-in.o(.text+0x154127): In function `__rxrpc_call_acks_timeout': > : undefined reference to `rxrpc_kdebug' > net/built-in.o(.text+0x154167): In function `__rxrpc_call_rcv_timeout': > : undefined reference to `rxrpc_kdebug' Does this help? Index: mm1-2.6.8-rc4/include/rxrpc/rxrpc.h =================================================================== --- mm1-2.6.8-rc4.orig/include/rxrpc/rxrpc.h 2004-08-11 15:27:56.589237088 -0700 +++ mm1-2.6.8-rc4/include/rxrpc/rxrpc.h 2004-08-11 15:28:12.496818768 -0700 @@ -16,10 +16,17 @@ extern uint32_t rxrpc_epoch; +#ifdef CONFIG_SYSCTL extern int rxrpc_ktrace; extern int rxrpc_kdebug; extern int rxrpc_kproto; extern int rxrpc_knet; +#else +#define rxrpc_ktrace 0 +#define rxrpc_kdebug 0 +#define rxrpc_kproto 0 +#define rxrpc_knet 0 +#endif extern int rxrpc_sysctl_init(void); extern void rxrpc_sysctl_cleanup(void); From bunk@fs.tum.de Wed Aug 11 15:48:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:48:07 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7BMm0GY027109 for ; Wed, 11 Aug 2004 15:48:01 -0700 Received: (qmail 1083 invoked from network); 11 Aug 2004 22:40:05 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 11 Aug 2004 22:40:05 -0000 Date: Thu, 12 Aug 2004 00:47:47 +0200 From: Adrian Bunk To: acme@conectiva.com.br Cc: linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: [2.6 patch] atalk compile errors with SYSCTL=n Message-ID: <20040811224747.GQ26174@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7676 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev I'm getting the following compile error in 2.6.8-rc4-mm1 (but it doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: <-- snip --> ... LD .tmp_vmlinux1 net/built-in.o(.init.text+0x74db): In function `atalk_init': : undefined reference to `atalk_register_sysctl' make: *** [.tmp_vmlinux1] Error 1 <-- snip --> The following patch fixes this issue: Signed-off-by: Adrian Bunk --- linux-2.6.8-rc4-mm1-full/net/appletalk/ddp.c.old 2004-08-12 00:44:33.000000000 +0200 +++ linux-2.6.8-rc4-mm1-full/net/appletalk/ddp.c 2004-08-12 00:45:08.000000000 +0200 @@ -68,8 +68,10 @@ struct atalk_addr *sa); extern void aarp_proxy_remove(struct net_device *dev, struct atalk_addr *sa); +#ifdef CONFIG_SYSCTL extern void atalk_register_sysctl(void); extern void atalk_unregister_sysctl(void); +#endif struct datalink_proto *ddp_dl, *aarp_dl; static struct proto_ops atalk_dgram_ops; @@ -1905,7 +1907,9 @@ register_netdevice_notifier(&ddp_notifier); aarp_proto_init(); atalk_proc_init(); +#ifdef CONFIG_SYSCTL atalk_register_sysctl(); +#endif return 0; } module_init(atalk_init); From bunk@fs.tum.de Wed Aug 11 15:56:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:56:52 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7BMulD1027795 for ; Wed, 11 Aug 2004 15:56:47 -0700 Received: (qmail 2355 invoked from network); 11 Aug 2004 22:48:52 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 11 Aug 2004 22:48:52 -0000 Date: Thu, 12 Aug 2004 00:56:34 +0200 From: Adrian Bunk To: William Lee Irwin III , David Howells , linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: 2.6: rxrpc compile errors with SYSCTL=n Message-ID: <20040811225634.GR26174@fs.tum.de> References: <20040811223225.GN26174@fs.tum.de> <20040811224102.GU11200@holomorphy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811224102.GU11200@holomorphy.com> User-Agent: Mutt/1.5.6i X-archive-position: 7677 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev On Wed, Aug 11, 2004 at 03:41:02PM -0700, William Lee Irwin III wrote: > On Thu, Aug 12, 2004 at 12:32:25AM +0200, Adrian Bunk wrote: > > I'm getting tons of the following compile errors in 2.6.8-rc4-mm1 (but > > it doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: > > <-- snip --> > > ... > > LD .tmp_vmlinux1 > > net/built-in.o(.text+0x154127): In function `__rxrpc_call_acks_timeout': > > : undefined reference to `rxrpc_kdebug' > > net/built-in.o(.text+0x154167): In function `__rxrpc_call_rcv_timeout': > > : undefined reference to `rxrpc_kdebug' > > Does this help? >... Yes. Thanks for the quick patch! 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 jgarzik@pobox.com Wed Aug 11 15:57:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 15:57: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 i7BMv63S027857 for ; Wed, 11 Aug 2004 15:57:06 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Bv21j-0001lv-WB; Wed, 11 Aug 2004 23:57:00 +0100 Message-ID: <411AA42E.50804@pobox.com> Date: Wed, 11 Aug 2004 18:56:46 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: Andrew Morton , Pasi Sjoholm , Hector Martin , OGAWA Hirofumi , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8-rc3-mm1 1/2] 8139too: Rx fifo/overflow recovery References: <20040805234336.A15407@electric-eye.fr.zoreil.com> <411A70CB.8060101@pobox.com> <20040811223243.GA8584@electric-eye.fr.zoreil.com> In-Reply-To: <20040811223243.GA8584@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7678 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 Francois Romieu wrote: > Jeff Garzik : > [...] > >>You _want_ to update those registers on every packet. Otherwise the >>crappy 8139 chip breaks. > > > The affected users noticed a clear difference when the update was in > the no-packet branch instead of the packet processing loop. Btw the > excerpt of the documentation outlined by Hirofumi san suggests that > this update makes sense. > > Any objection/suggestion regarding a patch which would allow the update > in both branches ? Both branches is fine. You'll quickly hit the RX-error-requiring-reset condition if you don't update on each packet, though. Jeff From werner@almesberger.net Wed Aug 11 16:19:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 16:19:10 -0700 (PDT) Received: from host.almesberger.net (almesberger.net [63.105.73.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7BNJ3ix029698 for ; Wed, 11 Aug 2004 16:19:04 -0700 Received: from almesberger.net (vpnwa-home [10.200.0.2]) by host.almesberger.net (8.11.6/8.9.3) with ESMTP id i7BNIp428031; Wed, 11 Aug 2004 16:18:53 -0700 Received: (from werner@localhost) by almesberger.net (8.11.6/8.11.6) id i7BNIT906968; Wed, 11 Aug 2004 20:18:29 -0300 Date: Wed, 11 Aug 2004 20:18:29 -0300 From: Werner Almesberger To: Suparna Bhattacharya Cc: netdev@oss.sgi.com Subject: Re: net-AIO and real-time TCP (blue sky research) Message-ID: <20040811201829.T28020@almesberger.net> References: <20040801235102.K1276@almesberger.net> <20040810155148.GA4630@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040810155148.GA4630@in.ibm.com>; from suparna@in.ibm.com on Tue, Aug 10, 2004 at 09:21:48PM +0530 X-archive-position: 7679 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: werner@almesberger.net Precedence: bulk X-list: netdev Suparna Bhattacharya wrote: > I was hoping all this while that someone with deeper knowledge > in this area than me would respond, but well, maybe they were > all quiet chuckles :) ? Or they haven't stopped laughing yet ;-) > Does your proposal require additional semantics on aio TCP socket > reads and writes that differ from the synchronous TCP case, besides > not blocking and indicating completion through aio_complete ? Unfortunately, yes. First of all, we'd need a definition of where in the stream the AIO operation is applied. Two possibilities: 1) explicit: apply the concept of a "file position" to the stream, and make it visible to applications (through aio_offset) 2) implicit: follow the existing principle that any read consumes just the next chunk of data, and internally assign positions based on the sequence number. As a consequence, AIOs would be ordered over time (in the case of individual aio_reads) and space (in the case of lio_listio). In any case, it's a departure from existing API properties, i.e. 1) would introduce an application-visible "stream position" for TCP (which doesn't agree with TCP being able to send arbitrarily long streams, but then, a nice 64 bit position is probably close enough to near-infinity), and 2) adds ordering to AIO, which may be undesirable in terms of consistency, and also in terms of lock avoidance. There's also the issue of whether an AIO read should complete after retrieving less than aio_nbytes. Three possibilities: 1) never (probably not a great idea) 2) may always (like "read" does) 3) only on the last AIO read returning data 2) would be the most flexible approach, but requires either application-settable positions (to fetch the missing part) or automatic re-arranging of subsequent AIO reads. 3) avoids the problems of 2), but doesn't work well if the reader didn't correctly predict segment boundaries, and may cause trouble (like in 2) if there are pending requests after the one that was "short", and new data arrives. Last but not least, aio_forget would have to tell TCP that we're not only no longer interested in retrieving a certain piece of data, but that we'll never be. If positions are implicit, aio_cancel would actually have this effect (since there would be no way to request the same range of data again), so we wouldn't even need aio_forget. > The notion of which segment to aio_forget on the Rx path > is a little hazy to me (were you were indeed referring > to the receive side here ? I can see this more clearly for > the send side when coupled with zero copy). Yes, this is mainly about receiving. Similar things could be done for sending, but that's largely a separate issue. Let's say I'm issuing three AIOs: 1: offset = 0, nbytes = 100 2: offset = 100, nbytes = 100 3: offset = 200, nbytes = 100 Now a segment arrives for 0-99, and another for 200-299. Normal TCP will retry (by ACKing sequence 100) until also the segment 100-199 has made it. With AIO-TCP, if our application is happy with getting two out of the three requests, it can now aio_forget the 2nd request. TCP would notice that can now ACK up to sequence 200, for the forgotten read, and even up to sequence 300, because the 200-299 has been received. So it'll ACK sequence 300 now, and happily move on, without caring whether segment 100-199 ever gets through. - Werner -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / /_http://www.almesberger.net/____________________________________________/ From sri@us.ibm.com Wed Aug 11 16:44:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 16:44:50 -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 i7BNiYjI000311 for ; Wed, 11 Aug 2004 16:44:42 -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 i7BNi6Hr774892; Wed, 11 Aug 2004 19:44:06 -0400 Received: from w-sridhar.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 i7BNjAE8099740; Wed, 11 Aug 2004 19:45:11 -0400 Date: Wed, 11 Aug 2004 16:44:04 -0700 (PDT) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: Werner Almesberger cc: Suparna Bhattacharya , netdev@oss.sgi.com Subject: Re: net-AIO and real-time TCP (blue sky research) In-Reply-To: <20040811201829.T28020@almesberger.net> Message-ID: References: <20040801235102.K1276@almesberger.net> <20040810155148.GA4630@in.ibm.com> <20040811201829.T28020@almesberger.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7680 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 Your AIO-TCP looks pretty similar to the partial reliablity extension to SCTP that allows an SCTP endpoint to signal to its peer that it is no longer going to retransmit certain messages and should skip past those messages. http://www.ietf.org/rfc/rfc3758.txt Thanks Sridhar On Wed, 11 Aug 2004, Werner Almesberger wrote: > Suparna Bhattacharya wrote: > > I was hoping all this while that someone with deeper knowledge > > in this area than me would respond, but well, maybe they were > > all quiet chuckles :) ? > > Or they haven't stopped laughing yet ;-) > > > Does your proposal require additional semantics on aio TCP socket > > reads and writes that differ from the synchronous TCP case, besides > > not blocking and indicating completion through aio_complete ? > > Unfortunately, yes. First of all, we'd need a definition of where > in the stream the AIO operation is applied. Two possibilities: > > 1) explicit: apply the concept of a "file position" to the stream, > and make it visible to applications (through aio_offset) > > 2) implicit: follow the existing principle that any read consumes > just the next chunk of data, and internally assign positions > based on the sequence number. As a consequence, AIOs would be > ordered over time (in the case of individual aio_reads) and > space (in the case of lio_listio). > > In any case, it's a departure from existing API properties, i.e. > 1) would introduce an application-visible "stream position" for > TCP (which doesn't agree with TCP being able to send arbitrarily > long streams, but then, a nice 64 bit position is probably close > enough to near-infinity), and 2) adds ordering to AIO, which may > be undesirable in terms of consistency, and also in terms of > lock avoidance. > > There's also the issue of whether an AIO read should complete > after retrieving less than aio_nbytes. Three possibilities: > > 1) never (probably not a great idea) > 2) may always (like "read" does) > 3) only on the last AIO read returning data > > 2) would be the most flexible approach, but requires either > application-settable positions (to fetch the missing part) or > automatic re-arranging of subsequent AIO reads. > > 3) avoids the problems of 2), but doesn't work well if the > reader didn't correctly predict segment boundaries, and may > cause trouble (like in 2) if there are pending requests after > the one that was "short", and new data arrives. > > Last but not least, aio_forget would have to tell TCP that we're > not only no longer interested in retrieving a certain piece of > data, but that we'll never be. > > If positions are implicit, aio_cancel would actually have this > effect (since there would be no way to request the same range of > data again), so we wouldn't even need aio_forget. > > > The notion of which segment to aio_forget on the Rx path > > is a little hazy to me (were you were indeed referring > > to the receive side here ? I can see this more clearly for > > the send side when coupled with zero copy). > > Yes, this is mainly about receiving. Similar things could be > done for sending, but that's largely a separate issue. > > Let's say I'm issuing three AIOs: > > 1: offset = 0, nbytes = 100 > 2: offset = 100, nbytes = 100 > 3: offset = 200, nbytes = 100 > > Now a segment arrives for 0-99, and another for 200-299. > Normal TCP will retry (by ACKing sequence 100) until also the > segment 100-199 has made it. > > With AIO-TCP, if our application is happy with getting two > out of the three requests, it can now aio_forget the 2nd > request. TCP would notice that can now ACK up to sequence 200, > for the forgotten read, and even up to sequence 300, because > the 200-299 has been received. So it'll ACK sequence 300 now, > and happily move on, without caring whether segment 100-199 > ever gets through. > > - Werner > > -- > _________________________________________________________________________ > / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / > /_http://www.almesberger.net/____________________________________________/ > > From jeffchua@silk.corp.fedex.com Wed Aug 11 16:58:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 16:59:01 -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 i7BNwrEa000843 for ; Wed, 11 Aug 2004 16:58:54 -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 i7BNwgvt031590 for ; Wed, 11 Aug 2004 18:58:43 -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 i7BNwenZ023007; Wed, 11 Aug 2004 18:58:41 -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 2004081207583815:16605 ; Thu, 12 Aug 2004 07:58:38 +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 i7BNuin00556; Thu, 12 Aug 2004 07:56:44 +0800 Date: Thu, 12 Aug 2004 07:55:52 +0800 (SGT) From: Jeff Chua X-X-Sender: root@boston.corp.fedex.com To: Tomas Szepe cc: Stephen Hemminger , James Ketrenos , Christoph Hellwig , Pavel Machek , Jeff Chua , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver In-Reply-To: <20040811163333.GE10100@louise.pinerecords.com> Message-ID: References: <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> <20040811093043.522cc5a0@dell_ss3.pdx.osdl.net> <20040811163333.GE10100@louise.pinerecords.com> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 08/12/2004 07:58:38 AM, Serialize by Router on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 08/12/2004 07:58:41 AM, Serialize complete at 08/12/2004 07:58:41 AM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 7681 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 On Wed, 11 Aug 2004, Tomas Szepe wrote: > Or better yet, let's not! > > There are many people who don't want to mess around with hotplug just > to get a single driver to load. Agreed. Please leave the legacy-loader in there. I don't need hotplug scripts just to load a single firmware on my X31. Thanks, Jeff From shemminger@osdl.org Wed Aug 11 17:01:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 17:01: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 i7C01fGh001219 for ; Wed, 11 Aug 2004 17:01:42 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7C011104729; Wed, 11 Aug 2004 17:01:01 -0700 Date: Wed, 11 Aug 2004 17:01:01 -0700 From: Stephen Hemminger To: Adrian Bunk , acme@conectiva.com.br Cc: linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [2.6 patch] atalk compile errors with SYSCTL=n Message-Id: <20040811170101.69c140b6@dell_ss3.pdx.osdl.net> In-Reply-To: <20040811224747.GQ26174@fs.tum.de> References: <20040811224747.GQ26174@fs.tum.de> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7682 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 I prefer to have the CONFIG stuff in the header file. Here is an alternative that rearranges to put all function prototypes in atalk.h and stubs if necessary. It gets all the #ifdef CONFIG_ stuff out of the .c files. diff -Nru a/include/linux/atalk.h b/include/linux/atalk.h --- a/include/linux/atalk.h 2004-08-11 17:00:00 -07:00 +++ b/include/linux/atalk.h 2004-08-11 17:00:00 -07:00 @@ -191,10 +191,13 @@ extern void aarp_send_probe(struct net_device *dev, struct atalk_addr *addr); extern void aarp_device_down(struct net_device *dev); +extern void aarp_probe_network(struct atalk_iface *atif); +extern int aarp_proxy_probe_network(struct atalk_iface *atif, + struct atalk_addr *sa); +extern void aarp_proxy_remove(struct net_device *dev, + struct atalk_addr *sa); -#ifdef MODULE -extern void aarp_cleanup_module(void); -#endif /* MODULE */ +extern void aarp_cleanup_module(void); #define at_sk(__sk) ((struct atalk_sock *)(__sk)->sk_protinfo) @@ -209,8 +212,28 @@ extern struct atalk_route atrtr_default; +extern struct file_operations atalk_seq_arp_fops; + +extern int sysctl_aarp_expiry_time; +extern int sysctl_aarp_tick_time; +extern int sysctl_aarp_retransmit_limit; +extern int sysctl_aarp_resolve_time; + +#ifdef CONFIG_SYSCTL +extern void atalk_register_sysctl(void); +extern void atalk_unregister_sysctl(void); +#else +#define atalk_register_sysctl() do { } while(0) +#define atalk_unregister_sysctl() do { } while(0) +#endif + +#ifdef CONFIG_PROC_FS extern int atalk_proc_init(void); extern void atalk_proc_exit(void); +#else +#define atalk_proc_init() 0 +#define atalk_proc_exit() do { } while(0) +#endif /* CONFIG_PROC_FS */ #endif /* __KERNEL__ */ #endif /* __LINUX_ATALK_H__ */ diff -Nru a/net/appletalk/Makefile b/net/appletalk/Makefile --- a/net/appletalk/Makefile 2004-08-11 17:00:00 -07:00 +++ b/net/appletalk/Makefile 2004-08-11 17:00:00 -07:00 @@ -4,5 +4,6 @@ obj-$(CONFIG_ATALK) += appletalk.o -appletalk-y := aarp.o ddp.o atalk_proc.o +appletalk-y := aarp.o ddp.o +appletalk-$(CONFIG_PROC_FS) += atalk_proc.o appletalk-$(CONFIG_SYSCTL) += sysctl_net_atalk.o diff -Nru a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c --- a/net/appletalk/atalk_proc.c 2004-08-11 17:00:00 -07:00 +++ b/net/appletalk/atalk_proc.c 2004-08-11 17:00:00 -07:00 @@ -15,8 +15,6 @@ #include #include -#ifdef CONFIG_PROC_FS -extern struct file_operations atalk_seq_arp_fops; static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos) { @@ -321,14 +319,3 @@ remove_proc_entry("arp", atalk_proc_dir); remove_proc_entry("atalk", proc_net); } - -#else /* CONFIG_PROC_FS */ -int __init atalk_proc_init(void) -{ - return 0; -} - -void __exit atalk_proc_exit(void) -{ -} -#endif /* CONFIG_PROC_FS */ diff -Nru a/net/appletalk/ddp.c b/net/appletalk/ddp.c --- a/net/appletalk/ddp.c 2004-08-11 17:00:00 -07:00 +++ b/net/appletalk/ddp.c 2004-08-11 17:00:00 -07:00 @@ -61,16 +61,6 @@ #include #include -extern void aarp_cleanup_module(void); - -extern void aarp_probe_network(struct atalk_iface *atif); -extern int aarp_proxy_probe_network(struct atalk_iface *atif, - struct atalk_addr *sa); -extern void aarp_proxy_remove(struct net_device *dev, struct atalk_addr *sa); - -extern void atalk_register_sysctl(void); -extern void atalk_unregister_sysctl(void); - struct datalink_proto *ddp_dl, *aarp_dl; static struct proto_ops atalk_dgram_ops; diff -Nru a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c --- a/net/appletalk/sysctl_net_atalk.c 2004-08-11 17:00:00 -07:00 +++ b/net/appletalk/sysctl_net_atalk.c 2004-08-11 17:00:00 -07:00 @@ -7,13 +7,9 @@ */ #include - -#ifdef CONFIG_SYSCTL #include -extern int sysctl_aarp_expiry_time; -extern int sysctl_aarp_tick_time; -extern int sysctl_aarp_retransmit_limit; -extern int sysctl_aarp_resolve_time; +#include +#include static struct ctl_table atalk_table[] = { { @@ -85,13 +81,3 @@ { unregister_sysctl_table(atalk_table_header); } - -#else /* CONFIG_PROC_FS */ -void atalk_register_sysctl(void) -{ -} - -void atalk_unregister_sysctl(void) -{ -} -#endif /* CONFIG_PROC_FS */ From werner@almesberger.net Wed Aug 11 17:41:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 17:41:27 -0700 (PDT) Received: from host.almesberger.net (almesberger.net [63.105.73.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7C0fGup002187 for ; Wed, 11 Aug 2004 17:41:16 -0700 Received: from almesberger.net (vpnwa-home [10.200.0.2]) by host.almesberger.net (8.11.6/8.9.3) with ESMTP id i7C0f6428561; Wed, 11 Aug 2004 17:41:09 -0700 Received: (from werner@localhost) by almesberger.net (8.11.6/8.11.6) id i7C0eiF09178; Wed, 11 Aug 2004 21:40:44 -0300 Date: Wed, 11 Aug 2004 21:40:44 -0300 From: Werner Almesberger To: Sridhar Samudrala Cc: Suparna Bhattacharya , netdev@oss.sgi.com Subject: Re: net-AIO and real-time TCP (blue sky research) Message-ID: <20040811214044.U28020@almesberger.net> References: <20040801235102.K1276@almesberger.net> <20040810155148.GA4630@in.ibm.com> <20040811201829.T28020@almesberger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from sri@us.ibm.com on Wed, Aug 11, 2004 at 04:44:04PM -0700 X-archive-position: 7683 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: werner@almesberger.net Precedence: bulk X-list: netdev Sridhar Samudrala wrote: > Your AIO-TCP looks pretty similar to the partial reliablity extension to > SCTP that allows an SCTP endpoint to signal to its peer that it is no longer > going to retransmit certain messages and should skip past those messages. Damn, so it's not such a crazy idea after all :-) Something like this would be useful for the sender side, if the receiver can't figure out on its own that it shouldn't wait for the data to arrive. (And, assuming that the sender skips data by leaving a gap, not by filling it with other data, which seems like a reasonable assumption if we use AIO-TCP at both ends. If the receiver may use regular TCP, the sender would have to try to fill the missing part, which can be hairy, particularly if some of the data-to-be-dropped has already be sent.) Clearly, any such thing on the sender side would need to have some means to detect that the receiver can recover from segments that are never sent. Is a concrete API for this functionality described somewhere ? (I only skimmed through the RFC, but the API mentioned there looks more like an abstract one.) I like the term "partial reliability" :) Thanks, - Werner -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / /_http://www.almesberger.net/____________________________________________/ From yoshfuji@linux-ipv6.org Wed Aug 11 17:41:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 17:41:42 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7C0fbgk002235 for ; Wed, 11 Aug 2004 17:41:37 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 6F07933CE5; Thu, 12 Aug 2004 09:42:06 +0900 (JST) Date: Thu, 12 Aug 2004 09:42:06 +0900 (JST) Message-Id: <20040812.094206.42261287.yoshfuji@linux-ipv6.org> To: bunk@fs.tum.de, davem@redhat.com Cc: SteveW@ACM.org, emserrat@geocities.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: 2.6: DECNET compile errors with SYSCTL=n From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040811224015.GP26174@fs.tum.de> References: <20040811224015.GP26174@fs.tum.de> 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: 7684 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. In article <20040811224015.GP26174@fs.tum.de> (at Thu, 12 Aug 2004 00:40:15 +0200), Adrian Bunk says: > I'm getting the following compile errors in 2.6.8-rc4-mm1 (but it > doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: > > <-- snip --> > > ... > LD .tmp_vmlinux1 > net/built-in.o(.text+0x1685e9): In function `dn_route_output_slow': > : undefined reference to `dn_dev_get_default' : Please try this patch. Thanks. Signed-off-by: Hideaki YOSHIFUJI ===== net/decnet/dn_dev.c 1.23 vs edited ===== --- 1.23/net/decnet/dn_dev.c 2004-08-08 15:43:41 +09:00 +++ edited/net/decnet/dn_dev.c 2004-08-12 09:34:56 +09:00 @@ -247,21 +247,6 @@ }, {0}} }; -static inline __u16 mtu2blksize(struct net_device *dev) -{ - u32 blksize = dev->mtu; - if (blksize > 0xffff) - blksize = 0xffff; - - if (dev->type == ARPHRD_ETHER || - dev->type == ARPHRD_PPP || - dev->type == ARPHRD_IPGRE || - dev->type == ARPHRD_LOOPBACK) - blksize -= 2; - - return (__u16)blksize; -} - static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *parms) { struct dn_dev_sysctl_table *t; @@ -314,52 +299,6 @@ } } -struct net_device *dn_dev_get_default(void) -{ - struct net_device *dev; - read_lock(&dndev_lock); - dev = decnet_default_device; - if (dev) { - if (dev->dn_ptr) - dev_hold(dev); - else - dev = NULL; - } - read_unlock(&dndev_lock); - return dev; -} - -int dn_dev_set_default(struct net_device *dev, int force) -{ - struct net_device *old = NULL; - int rv = -EBUSY; - if (!dev->dn_ptr) - return -ENODEV; - write_lock(&dndev_lock); - if (force || decnet_default_device == NULL) { - old = decnet_default_device; - decnet_default_device = dev; - rv = 0; - } - write_unlock(&dndev_lock); - if (old) - dev_put(dev); - return rv; -} - -static void dn_dev_check_default(struct net_device *dev) -{ - write_lock(&dndev_lock); - if (dev == decnet_default_device) { - decnet_default_device = NULL; - } else { - dev = NULL; - } - write_unlock(&dndev_lock); - if (dev) - dev_put(dev); -} - static int dn_forwarding_proc(ctl_table *table, int write, struct file *filep, void __user *buffer, @@ -454,6 +393,21 @@ #endif /* CONFIG_SYSCTL */ +static inline __u16 mtu2blksize(struct net_device *dev) +{ + u32 blksize = dev->mtu; + if (blksize > 0xffff) + blksize = 0xffff; + + if (dev->type == ARPHRD_ETHER || + dev->type == ARPHRD_PPP || + dev->type == ARPHRD_IPGRE || + dev->type == ARPHRD_LOOPBACK) + blksize -= 2; + + return (__u16)blksize; +} + static struct dn_ifaddr *dn_dev_alloc_ifa(void) { struct dn_ifaddr *ifa; @@ -633,6 +587,52 @@ if (copy_to_user(arg, ifr, DN_IFREQ_SIZE)) ret = -EFAULT; goto done; +} + +struct net_device *dn_dev_get_default(void) +{ + struct net_device *dev; + read_lock(&dndev_lock); + dev = decnet_default_device; + if (dev) { + if (dev->dn_ptr) + dev_hold(dev); + else + dev = NULL; + } + read_unlock(&dndev_lock); + return dev; +} + +int dn_dev_set_default(struct net_device *dev, int force) +{ + struct net_device *old = NULL; + int rv = -EBUSY; + if (!dev->dn_ptr) + return -ENODEV; + write_lock(&dndev_lock); + if (force || decnet_default_device == NULL) { + old = decnet_default_device; + decnet_default_device = dev; + rv = 0; + } + write_unlock(&dndev_lock); + if (old) + dev_put(dev); + return rv; +} + +static void dn_dev_check_default(struct net_device *dev) +{ + write_lock(&dndev_lock); + if (dev == decnet_default_device) { + decnet_default_device = NULL; + } else { + dev = NULL; + } + write_unlock(&dndev_lock); + if (dev) + dev_put(dev); } static struct dn_dev *dn_dev_by_index(int ifindex) -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From marado@student.dei.uc.pt Wed Aug 11 19:18:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 19:18:16 -0700 (PDT) Received: from smtp.dei.uc.pt (smtp.dei.uc.pt [193.137.203.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7C2HqwQ004527 for ; Wed, 11 Aug 2004 19:18:10 -0700 Received: from student.dei.uc.pt (student.dei.uc.pt [10.1.0.1]) by smtp.dei.uc.pt (8.12.8/8.12.8) with ESMTP id i7C2Fx0u021850; Thu, 12 Aug 2004 03:15:59 +0100 Received: from student.dei.uc.pt (localhost.localdomain [127.0.0.1]) by student.dei.uc.pt (8.12.8/8.12.8) with ESMTP id i7C2FxQU009548; Thu, 12 Aug 2004 03:15:59 +0100 Received: from localhost (marado@localhost) by student.dei.uc.pt (8.12.8/8.12.8/Submit) with ESMTP id i7C2FskK016595; Thu, 12 Aug 2004 03:15:58 +0100 Date: Thu, 12 Aug 2004 03:15:47 +0100 (WEST) From: "Marcos D. Marado Torres" To: Jeff Garzik cc: netdev@oss.sgi.com Subject: Re: wireless-2.6 queue updated In-Reply-To: <20040811220107.GA1923@havoc.gtf.org> Message-ID: References: <20040811220107.GA1923@havoc.gtf.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-UC-FCTUC-DEI-MailScanner-Information: Please contact helpdesk@dei.uc.pt for more information X-UC-FCTUC-DEI-MailScanner: Found to be clean X-MailScanner-From: marado@student.dei.uc.pt X-archive-position: 7685 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: marado@student.dei.uc.pt Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 11 Aug 2004, Jeff Garzik wrote: > Just updated to latest kernel. No new changes committed. > > BK users: > > bk pull bk://gkernel.bkbits.net/wireless-2.6 > > Patch: > http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/2.6.8-rc4-bk1-wireless1.patch.bz2 Since this is in an high development process yet, shouldn't it be build against - -mm (development) patches instead of Linus's one? Marcos Marado - -- /* *************************************************************** */ Marcos Daniel Marado Torres AKA Mind Booster Noori http://student.dei.uc.pt/~marado - marado@student.dei.uc.pt () Join the ASCII ribbon campaign against html email, Microsoft /\ attachments and Software patents. They endanger the World. Sign a petition against patents: http://petition.eurolinux.org /* *************************************************************** */ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFBGtLamNlq8m+oD34RAjrrAJ9ZRtUgnUk0C2h2XO+MNr/AznawNgCePUgo 9peXhDiNo0yazFeoJXkLyxE= =pdaQ -----END PGP SIGNATURE----- From mcgrof@studorgs.rutgers.edu Wed Aug 11 20:47:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 20:47:49 -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 i7C3liGC009271 for ; Wed, 11 Aug 2004 20:47:44 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 22DBAF99BD; Wed, 11 Aug 2004 23:47:39 -0400 (EDT) Date: Wed, 11 Aug 2004 23:47:39 -0400 To: James Ketrenos Cc: Christoph Hellwig , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list Subject: Re: ipw2100 wireless driver Message-ID: <20040812034739.GD26262@ruslug.rutgers.edu> Mail-Followup-To: James Ketrenos , Christoph Hellwig , Pavel Machek , Jeff Chua , Tomas Szepe , netdev@oss.sgi.com, kernel list References: <20040714114135.GA25175@elf.ucw.cz> <20040714115523.GC2269@elf.ucw.cz> <20040809201556.GB9677@louise.pinerecords.com> <20040810075558.A14154@infradead.org> <20040810101640.GF9034@atrey.karlin.mff.cuni.cz> <4119F203.1070009@linux.intel.com> <20040811114437.A27439@infradead.org> <411A478E.1080101@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411A478E.1080101@linux.intel.com> 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: 7686 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 Wed, Aug 11, 2004 at 11:21:34AM -0500, James Ketrenos wrote: > Just to re-answer some others may be wondering regarding the firmware: <-- 1 and 2 and --> > 3) the firmware, as per its license, can be redistributed by OSDs, ISVs, > etc. Would it be possible to get a better licensing for the firmware, ie one that would allow free redistribution, and be transferable? Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From lyris-admin@members3.emailwow.com Wed Aug 11 22:44:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 22:44:44 -0700 (PDT) Received: from members3.emailwow.com (members3.emailwow.com [209.249.27.60]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7C5iauW011658 for ; Wed, 11 Aug 2004 22:44:37 -0700 Message-Id: X-lyris-type: command-notify From: "Lyris ListManager" Reply-To: "Lyris ListManager" To: netdev@oss.sgi.com Subject: Re: your purge request Date: Thu, 12 Aug 2004 01:49:10 -0400 X-archive-position: 7687 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lyris-admin@members3.emailwow.com Precedence: bulk X-list: netdev Re: your purge request > purge Sorry, but your email address: netdev@oss.sgi.com is not listed as a member of a mailing list. Thus, you could not be unsubscribed from any mailing lists. From sri@us.ibm.com Wed Aug 11 23:06:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 11 Aug 2004 23:06:56 -0700 (PDT) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7C66i1f012423 for ; Wed, 11 Aug 2004 23:06:50 -0700 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e4.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7C66IvL833856; Thu, 12 Aug 2004 02:06:18 -0400 Received: from w-sridhar.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 i7C67LE8100194; Thu, 12 Aug 2004 02:07:22 -0400 Date: Wed, 11 Aug 2004 23:06:16 -0700 (PDT) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: Werner Almesberger cc: Suparna Bhattacharya , netdev@oss.sgi.com Subject: Re: net-AIO and real-time TCP (blue sky research) In-Reply-To: <20040811214044.U28020@almesberger.net> Message-ID: References: <20040801235102.K1276@almesberger.net> <20040810155148.GA4630@in.ibm.com> <20040811201829.T28020@almesberger.net> <20040811214044.U28020@almesberger.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7688 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 On Wed, 11 Aug 2004, Werner Almesberger wrote: > Sridhar Samudrala wrote: > > Your AIO-TCP looks pretty similar to the partial reliablity extension to > > SCTP that allows an SCTP endpoint to signal to its peer that it is no longer > > going to retransmit certain messages and should skip past those messages. > > Damn, so it's not such a crazy idea after all :-) > > Something like this would be useful for the sender side, if the > receiver can't figure out on its own that it shouldn't wait for > the data to arrive. (And, assuming that the sender skips data by > leaving a gap, not by filling it with other data, which seems > like a reasonable assumption if we use AIO-TCP at both ends. If > the receiver may use regular TCP, the sender would have to try > to fill the missing part, which can be hairy, particularly if > some of the data-to-be-dropped has already be sent.) > > Clearly, any such thing on the sender side would need to have some > means to detect that the receiver can recover from segments that > are never sent. > > Is a concrete API for this functionality described somewhere ? > (I only skimmed through the RFC, but the API mentioned there > looks more like an abstract one.) There is a sockets API extensions for SCTP draft that describes a way for an app to specify timetolive value for a message. This can be done using the standard sendmsg() with a control mesage of type SCTP_SNDRCV. Also a new API sctp_sendmsg() can be used which has timetolive as an argument. http://www.ietf.org/internet-drafts/draft-ietf-tsvwg-sctpsocket-08.txt -Sridhar > > I like the term "partial reliability" :) > > Thanks, > - Werner > > -- > _________________________________________________________________________ > / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / > /_http://www.almesberger.net/____________________________________________/ > From dhowells@redhat.com Thu Aug 12 01:35:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 01:35:46 -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 i7C8ZdpZ018918 for ; Thu, 12 Aug 2004 01:35:41 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7C8YVe1009538; Thu, 12 Aug 2004 04:34:31 -0400 Received: from file.cambridge.redhat.com (file.cambridge.redhat.com [172.16.18.10]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7C8YTa15949; Thu, 12 Aug 2004 04:34:30 -0400 Received: from warthog.cambridge.redhat.com (warthog.cambridge.redhat.com [172.16.18.73]) by file.cambridge.redhat.com (8.11.6/8.11.6) with ESMTP id i7C8YSF22635; Thu, 12 Aug 2004 09:34:28 +0100 Received: from warthog.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by warthog.cambridge.redhat.com (8.12.11/8.12.8) with ESMTP id i7C8YROG018773; Thu, 12 Aug 2004 09:34:27 +0100 Received: from redhat.com (dhowells@localhost) by warthog.cambridge.redhat.com (8.12.11/8.12.11/Submit) with ESMTP id i7C8YQQ6018767; Thu, 12 Aug 2004 09:34:26 +0100 X-Authentication-Warning: warthog.cambridge.redhat.com: dhowells owned process doing -bs From: David Howells In-Reply-To: <20040811224102.GU11200@holomorphy.com> References: <20040811224102.GU11200@holomorphy.com> <20040811223225.GN26174@fs.tum.de> To: William Lee Irwin III Cc: Adrian Bunk , linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: 2.6: rxrpc compile errors with SYSCTL=n User-Agent: EMH/1.14.1 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Date: Thu, 12 Aug 2004 09:34:25 +0100 Message-ID: <18766.1092299665@redhat.com> X-archive-position: 7689 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dhowells@redhat.com Precedence: bulk X-list: netdev > > I'm getting tons of the following compile errors in 2.6.8-rc4-mm1 (but > > it doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: > ... > Does this help? Yeah... that patch will do. Thanks. Pass it to Andrew? David From bunk@fs.tum.de Thu Aug 12 01:47:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 01:47:33 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7C8lRrB019507 for ; Thu, 12 Aug 2004 01:47:27 -0700 Received: (qmail 5485 invoked from network); 12 Aug 2004 08:39:30 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 12 Aug 2004 08:39:30 -0000 Date: Thu, 12 Aug 2004 10:47:17 +0200 From: Adrian Bunk To: Stephen Hemminger Cc: acme@conectiva.com.br, linux-kernel@vger.kernel.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [2.6 patch] atalk compile errors with SYSCTL=n Message-ID: <20040812084717.GY26174@fs.tum.de> References: <20040811224747.GQ26174@fs.tum.de> <20040811170101.69c140b6@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811170101.69c140b6@dell_ss3.pdx.osdl.net> User-Agent: Mutt/1.5.6i X-archive-position: 7690 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev On Wed, Aug 11, 2004 at 05:01:01PM -0700, Stephen Hemminger wrote: > I prefer to have the CONFIG stuff in the header file. > Here is an alternative that rearranges to put all function prototypes in atalk.h > and stubs if necessary. It gets all the #ifdef CONFIG_ stuff out of the > .c files. >... Compiles and looks good. 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 suparna@in.ibm.com Thu Aug 12 04:57:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 04:58: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 i7CBvtmV029170 for ; Thu, 12 Aug 2004 04:57:55 -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 i7CBvUDD625778; Thu, 12 Aug 2004 07:57:30 -0400 Received: from sparklet2.in.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7CBvPDR081456; Thu, 12 Aug 2004 05:57:28 -0600 Received: by sparklet2.in.ibm.com (Postfix, from userid 500) id A8FA6192E8; Thu, 12 Aug 2004 17:37:10 +0530 (IST) Date: Thu, 12 Aug 2004 17:37:10 +0530 From: Suparna Bhattacharya To: Werner Almesberger Cc: netdev@oss.sgi.com Subject: Re: net-AIO and real-time TCP (blue sky research) Message-ID: <20040812120710.GA4435@in.ibm.com> Reply-To: suparna@in.ibm.com References: <20040801235102.K1276@almesberger.net> <20040810155148.GA4630@in.ibm.com> <20040811201829.T28020@almesberger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811201829.T28020@almesberger.net> User-Agent: Mutt/1.4i X-archive-position: 7691 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: suparna@in.ibm.com Precedence: bulk X-list: netdev On Wed, Aug 11, 2004 at 08:18:29PM -0300, Werner Almesberger wrote: > Suparna Bhattacharya wrote: > > I was hoping all this while that someone with deeper knowledge > > in this area than me would respond, but well, maybe they were > > all quiet chuckles :) ? > > Or they haven't stopped laughing yet ;-) > > > Does your proposal require additional semantics on aio TCP socket > > reads and writes that differ from the synchronous TCP case, besides > > not blocking and indicating completion through aio_complete ? > > Unfortunately, yes. First of all, we'd need a definition of where > in the stream the AIO operation is applied. Two possibilities: > > 1) explicit: apply the concept of a "file position" to the stream, > and make it visible to applications (through aio_offset) > > 2) implicit: follow the existing principle that any read consumes > just the next chunk of data, and internally assign positions > based on the sequence number. As a consequence, AIOs would be > ordered over time (in the case of individual aio_reads) and > space (in the case of lio_listio). > > In any case, it's a departure from existing API properties, i.e. > 1) would introduce an application-visible "stream position" for > TCP (which doesn't agree with TCP being able to send arbitrarily > long streams, but then, a nice 64 bit position is probably close > enough to near-infinity), and 2) adds ordering to AIO, which may > be undesirable in terms of consistency, and also in terms of > lock avoidance. > > There's also the issue of whether an AIO read should complete > after retrieving less than aio_nbytes. Three possibilities: > > 1) never (probably not a great idea) > 2) may always (like "read" does) > 3) only on the last AIO read returning data > > 2) would be the most flexible approach, but requires either > application-settable positions (to fetch the missing part) or > automatic re-arranging of subsequent AIO reads. > > 3) avoids the problems of 2), but doesn't work well if the > reader didn't correctly predict segment boundaries, and may > cause trouble (like in 2) if there are pending requests after > the one that was "short", and new data arrives. > > Last but not least, aio_forget would have to tell TCP that we're > not only no longer interested in retrieving a certain piece of > data, but that we'll never be. > > If positions are implicit, aio_cancel would actually have this > effect (since there would be no way to request the same range of > data again), so we wouldn't even need aio_forget. > > > The notion of which segment to aio_forget on the Rx path > > is a little hazy to me (were you were indeed referring > > to the receive side here ? I can see this more clearly for > > the send side when coupled with zero copy). > > Yes, this is mainly about receiving. Similar things could be > done for sending, but that's largely a separate issue. > > Let's say I'm issuing three AIOs: > > 1: offset = 0, nbytes = 100 > 2: offset = 100, nbytes = 100 > 3: offset = 200, nbytes = 100 > > Now a segment arrives for 0-99, and another for 200-299. > Normal TCP will retry (by ACKing sequence 100) until also the > segment 100-199 has made it. > > With AIO-TCP, if our application is happy with getting two > out of the three requests, it can now aio_forget the 2nd > request. TCP would notice that can now ACK up to sequence 200, > for the forgotten read, and even up to sequence 300, because > the 200-299 has been received. So it'll ACK sequence 300 now, > and happily move on, without caring whether segment 100-199 > ever gets through. OK, in the light of the change in semantics you described earlier, introducing the notion of an offset, this makes sense. Thanks for clarifying. Regards Suparna > > - Werner > > -- > _________________________________________________________________________ > / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / > /_http://www.almesberger.net/____________________________________________/ -- Suparna Bhattacharya (suparna@in.ibm.com) Linux Technology Center IBM Software Lab, India From macro@linux-mips.org Thu Aug 12 05:06:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 05:06:29 -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 i7CC6NQ6029634 for ; Thu, 12 Aug 2004 05:06:24 -0700 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id C4586E1C95 for ; Thu, 12 Aug 2004 14:06:10 +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 16487-08 for ; Thu, 12 Aug 2004 14:06:10 +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 A1DE5E1C94 for ; Thu, 12 Aug 2004 14:06:10 +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.11.4) with ESMTP id i7CC6Z80026647 for ; Thu, 12 Aug 2004 14:06:35 +0200 Date: Thu, 12 Aug 2004 14:06:13 +0200 (CEST) From: "Maciej W. Rozycki" To: netdev@oss.sgi.com Subject: [patch] 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: 7692 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 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. 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 bunk@fs.tum.de Thu Aug 12 09:06:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 09:06:50 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7CG6dBN005499 for ; Thu, 12 Aug 2004 09:06:41 -0700 Received: (qmail 1604 invoked from network); 12 Aug 2004 15:58:41 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 12 Aug 2004 15:58:41 -0000 Date: Thu, 12 Aug 2004 18:06:27 +0200 From: Adrian Bunk To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" Cc: davem@redhat.com, SteveW@ACM.org, emserrat@geocities.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6: DECNET compile errors with SYSCTL=n Message-ID: <20040812160627.GM13377@fs.tum.de> References: <20040811224015.GP26174@fs.tum.de> <20040812.094206.42261287.yoshfuji@linux-ipv6.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040812.094206.42261287.yoshfuji@linux-ipv6.org> User-Agent: Mutt/1.5.6i X-archive-position: 7693 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev On Thu, Aug 12, 2004 at 09:42:06AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > Hello. > > In article <20040811224015.GP26174@fs.tum.de> (at Thu, 12 Aug 2004 00:40:15 +0200), Adrian Bunk says: > > > I'm getting the following compile errors in 2.6.8-rc4-mm1 (but it > > doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n: > > > > <-- snip --> > > > > ... > > LD .tmp_vmlinux1 > > net/built-in.o(.text+0x1685e9): In function `dn_route_output_slow': > > : undefined reference to `dn_dev_get_default' > : > > Please try this patch. Thanks. >... Thanks, I can confirm it fixes the compilation. 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 shemminger@osdl.org Thu Aug 12 10:48:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 10:49: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 i7CHmvDo007710 for ; Thu, 12 Aug 2004 10:48:57 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7CHmZ105706; Thu, 12 Aug 2004 10:48:35 -0700 Date: Thu, 12 Aug 2004 10:48:35 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [RFC] enhanced version of net_random() Message-Id: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7694 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 While doing the network emulator, I discovered that the default net_random() is too stupid, and get_random_bytes() is more than needed. Rather than put another function in just for sch_netem, how about making net_random() smarter? The tin-hat crowd already replace net_random() with get_random_bytes anyway. Here is a proposed alternative to use a longer period PRNG for net_random(). The choice of TT800 was because it was freely available, had a long period, was fast and relatively small footprint. The existing net_random() was not really thread safe, but was immune to thread corruption. Signed-off-by: Stephen Hemminger diff -Nru a/net/core/utils.c b/net/core/utils.c --- a/net/core/utils.c 2004-08-12 10:40:05 -07:00 +++ b/net/core/utils.c 2004-08-12 10:40:05 -07:00 @@ -2,6 +2,7 @@ * Generic address resultion entity * * Authors: + * net_random update to TT800 Stephen Hemminger * net_random Alan Cox * net_ratelimit Andy Kleen * @@ -23,6 +24,7 @@ #include #include +#ifdef CONFIG_EMBEDDED static unsigned long net_rand_seed = 152L; unsigned long net_random(void) @@ -34,8 +36,79 @@ void net_srandom(unsigned long entropy) { net_rand_seed ^= entropy; + net_random(); +} +#else +/* + * This is the TT800 twisted Global Finite Shift Register random number + * generator originally by M. Matsumoto, email: matumoto@math.keio.ac.jp. + * July 8th 1996 Version + * + * See: ACM Transactions on Modelling and Computer Simulation, + * Vol. 4, No. 3, 1994, pages 254-266. + * + * It has a large period 2^800 and good distribution properties + * up to dimension 25, and passes statistical tests. + * + * Don't use for cryptographic purposes, see get_random_bytes instead. + */ +#define N 25 +#define M 7 + +static unsigned long net_rand_seed[N] = { + 0x95f24dab, 0x0b685215, 0xe76ccae7, 0xaf3ec239, 0x715fad23, + 0x24a590ad, 0x69e4b5ef, 0xbf456141, 0x96bc1b7b, 0xa7bdf825, + 0xc1de75b7, 0x8858a9c9, 0x2da87693, 0xb657f9dd, 0xffdc8a9f, + 0x8121da71, 0x8b823ecb, 0x885d05f5, 0x4e20cd47, 0x5a9ad5d9, + 0x512c0c03, 0xea857ccd, 0x4cc1d30f, 0x8891a8a1, 0xa6b7aadb +}; + +static spinlock_t net_random_lock = SPIN_LOCK_UNLOCKED; + +unsigned long net_random(void) +{ + unsigned long y; + unsigned long flags; + static int k; + static const unsigned long mag01[2]={ 0x0, 0x8ebfd028 }; +#define X net_rand_seed + + /* generate N words at one time */ + spin_lock_irqsave(&net_random_lock, flags); + if (k == N) { + int kk; + for (kk=0; kk< N - M; kk++) { + X[kk] = X[kk+M] ^ (X[kk] >> 1) ^ mag01[X[kk] % 2]; + } + + for (; kk < N; kk++) { + X[kk] = X[kk+(M-N)] ^ (X[kk] >> 1) ^ mag01[X[kk] % 2]; + } + k = 0; + } + + y = X[k]; + y ^= (y << 7) & 0x2b5b2500; /* s and b, magic vectors */ + y ^= (y << 15) & 0xdb8b0000; /* t and c, magic vectors */ + + /* + * the following line was added by Makoto Matsumoto in the 1996 version + * to improve lower bit's corellation. + * Delete this line to o use the code published in 1994. + */ + y ^= (y >> 16); /* added to the 1994 version */ + k++; + spin_unlock_irqrestore(&net_random_lock, flags); +#undef X + return y; +} + +void net_srandom(unsigned long entropy) +{ + net_rand_seed[0] ^= entropy; net_random(); } +#endif int net_msg_cost = 5*HZ; int net_msg_burst = 10; From jheffner@psc.edu Thu Aug 12 11:11:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 11:11:54 -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 i7CIBf6U008574 for ; Thu, 12 Aug 2004 11:11:42 -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 i7CIBAe7016506 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 12 Aug 2004 14:11:10 -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 i7CIBAWu005671; Thu, 12 Aug 2004 14:11:10 -0400 (EDT) Date: Thu, 12 Aug 2004 14:11:10 -0400 (EDT) From: John Heffner To: Werner Almesberger cc: Sridhar Samudrala , Suparna Bhattacharya , Subject: Re: net-AIO and real-time TCP (blue sky research) In-Reply-To: <20040811214044.U28020@almesberger.net> 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: 7695 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 Wed, 11 Aug 2004, Werner Almesberger wrote: > Sridhar Samudrala wrote: > > Your AIO-TCP looks pretty similar to the partial reliablity extension to > > SCTP that allows an SCTP endpoint to signal to its peer that it is no longer > > going to retransmit certain messages and should skip past those messages. > > Damn, so it's not such a crazy idea after all :-) Perhaps not for SCTP. I'd love to see a good AIO API for TCP, but if what you are describing is implemented, the resulting protocol would be something other than TCP. There are some RDDP people talking about similar things, and it is quite controversial within the IETF. It might be easier to focus on SCTP. This is what it was designed for. -John From davem@redhat.com Thu Aug 12 12:50:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 12:50:07 -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 i7CJo0vF017666 for ; Thu, 12 Aug 2004 12:50:01 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7CJnoe1015608; Thu, 12 Aug 2004 15:49: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 i7CJnoa02549; Thu, 12 Aug 2004 15:49:50 -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 i7CJn1t7006322; Thu, 12 Aug 2004 15:49:01 -0400 Date: Thu, 12 Aug 2004 12:48:54 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040812124854.646f1936.davem@redhat.com> In-Reply-To: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> References: <20040812104835.3b179f5a@dell_ss3.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: 7696 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, 12 Aug 2004 10:48:35 -0700 Stephen Hemminger wrote: > Here is a proposed alternative to use a longer period PRNG for net_random(). > The choice of TT800 was because it was freely available, had a long period, > was fast and relatively small footprint. The existing net_random() was not > really thread safe, but was immune to thread corruption. Any chance of a version that doesn't grab a global lock and disable interrupts every call? :( From greearb@candelatech.com Thu Aug 12 13:02:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 13:02: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 i7CK2Rln018439 for ; Thu, 12 Aug 2004 13:02:34 -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 i7CKHvSb007235; Thu, 12 Aug 2004 13:17:57 -0700 Message-ID: <411BCCC7.2090804@candelatech.com> Date: Thu, 12 Aug 2004 13:02:15 -0700 From: Ben Greear Organization: Candela Technologies 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: Stephen Hemminger CC: "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> In-Reply-To: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7697 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 Stephen Hemminger wrote: > While doing the network emulator, I discovered that the default net_random() > is too stupid, and get_random_bytes() is more than needed. Rather than put > another function in just for sch_netem, how about making net_random() smarter? > The tin-hat crowd already replace net_random() with get_random_bytes anyway. > > Here is a proposed alternative to use a longer period PRNG for net_random(). > The choice of TT800 was because it was freely available, had a long period, > was fast and relatively small footprint. The existing net_random() was not > really thread safe, but was immune to thread corruption. Is it really worth the extra spin lock & math? Maybe we could have a net_more_random() method instead that encompasses this improved random logic? Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From romieu@fr.zoreil.com Thu Aug 12 13:32:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 13:33:30 -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 i7CKWgk3019887 for ; Thu, 12 Aug 2004 13:32:43 -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 i7CKTNu5025241; Thu, 12 Aug 2004 22:29:23 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7CKSrmB025236; Thu, 12 Aug 2004 22:28:53 +0200 Date: Thu, 12 Aug 2004 22:28:53 +0200 From: Francois Romieu To: Pasi Sjoholm Cc: Jeff Garzik , Andrew Morton , Hector Martin , OGAWA Hirofumi , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8-rc3-mm1 1/2] 8139too: Rx fifo/overflow recovery Message-ID: <20040812202853.GA22774@electric-eye.fr.zoreil.com> References: <20040805234336.A15407@electric-eye.fr.zoreil.com> <411A70CB.8060101@pobox.com> <20040811223243.GA8584@electric-eye.fr.zoreil.com> <411AA42E.50804@pobox.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <411AA42E.50804@pobox.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7698 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 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Jeff Garzik : [...] > Both branches is fine. > > You'll quickly hit the RX-error-requiring-reset condition if you don't > update on each packet, though. M. Sjoholm, can you apply the attached patch below to a vanilla 2.6.8-rc4 and report if the former bug reappears ? If the bug is (partially) back, 8139too-20.patch on top of -10 may help. If you want to test against 2.6.8-rc4-mm1: http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-10.patch http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-20.patch -- Ueimor --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8139too-10.patch" This patch allows to update the interrupt status register after an Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. The update must be kept in the packet processing loop to prevent an Rx error storm. Signed-off-by: Francois Romieu drivers/net/8139too.c | 45 ++++++++++++++++++++++++++++++--------------- 1 files changed, 30 insertions(+), 15 deletions(-) diff -puN drivers/net/8139too.c~8139too-10 drivers/net/8139too.c --- linux-2.6.8-rc4/drivers/net/8139too.c~8139too-10 2004-08-12 21:37:18.000000000 +0200 +++ linux-2.6.8-rc4-romieu/drivers/net/8139too.c 2004-08-12 22:10:21.000000000 +0200 @@ -1927,6 +1927,23 @@ static __inline__ void wrap_copy(struct } #endif +static void rtl8139_isr_ack(struct rtl8139_private *tp, u16 status) +{ + void *ioaddr = tp->mmio_addr; + + status &= RxAckBits; + + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; + } + RTL_W16_F (IntrStatus, RxAckBits); + } +} + static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { @@ -1934,20 +1951,22 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + unsigned int rx_size = 0; + u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); + status = RTL_R16 (IntrStatus); + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; - unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1996,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +2008,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2025,19 +2045,13 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); - } + rtl8139_isr_ack(tp, status); + + status = RTL_R16 (IntrStatus); } - done: + if (unlikely(!received || rx_size == 0xfff0)) + rtl8139_isr_ack(tp, status); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2047,6 +2061,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8139too-20.patch" If the Rx buffer gets corrupted or the FIFO hangs in new interesting ways, this code prevents the driver from looping in ksoftirqd context without making any progress. Signed-off-by: Francois Romieu drivers/net/8139too.c | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletion(-) diff -puN drivers/net/8139too.c~8139too-20 drivers/net/8139too.c --- linux-2.6.8-rc4/drivers/net/8139too.c~8139too-20 2004-08-12 22:13:18.000000000 +0200 +++ linux-2.6.8-rc4-romieu/drivers/net/8139too.c 2004-08-12 22:13:18.000000000 +0200 @@ -593,6 +593,7 @@ struct rtl8139_private { int time_to_die; struct mii_if_info mii; unsigned int regs_len; + unsigned long fifo_copy_timeout; }; MODULE_AUTHOR ("Jeff Garzik "); @@ -1955,7 +1956,7 @@ static int rtl8139_rx(struct net_device u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," - " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, + " free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); @@ -1995,10 +1996,24 @@ static int rtl8139_rx(struct net_device * since EarlyRx is disabled. */ if (unlikely(rx_size == 0xfff0)) { + if (!tp->fifo_copy_timeout) + tp->fifo_copy_timeout = jiffies + 2; + else if (time_after(jiffies, tp->fifo_copy_timeout)) { + DPRINTK ("%s: hung FIFO. Reset.", dev->name); + rx_size = 0; + goto no_early_rx; + } + if (netif_msg_intr(tp)) { + printk(KERN_DEBUG "%s: fifo copy in progress.", + dev->name); + } tp->xstats.early_rx++; break; } +no_early_rx: + tp->fifo_copy_timeout = 0; + /* If Rx err or invalid rx_size/rx_status received * (which happens if we get lost in the ring), * Rx process gets reset, so we abort any further @@ -2061,6 +2076,14 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; + + /* + * The receive buffer should be mostly empty. + * Tell NAPI to reenable the Rx irq. + */ + if (tp->fifo_copy_timeout) + received = budget; + out: return received; } _ --nFreZHaLTZJo0R7j-- From cfriesen@nortelnetworks.com Thu Aug 12 14:38:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 14:38:58 -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 i7CLcoEv021271 for ; Thu, 12 Aug 2004 14:38:53 -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 i7CLccH27129 for ; Thu, 12 Aug 2004 17:38:38 -0400 (EDT) Received: from nortelnetworks.com (pcard0ks.ca.nortel.com [47.129.117.131]) by zcard303.ca.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id NALTFJVW; Thu, 12 Aug 2004 17:38:39 -0400 Message-ID: <411BE35E.6010406@nortelnetworks.com> Date: Thu, 12 Aug 2004 17:38:38 -0400 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 Subject: useability issue with iproute2 -- unexpected behaviour Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7699 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 tried running the command "ip ro del default table 100" on a system that did not have advanced routing support compiled in. Let's just say I was kind of surprised when it took down the default route on the *main* routing table. Is this expected behaviour? I would expect some sort of error saying that routing table 100 was not accessable, or something similar. Thanks, Chris From xschmi00@stud.feec.vutbr.cz Thu Aug 12 15:25:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 15:25:35 -0700 (PDT) Received: from smtp-out4.iol.cz (smtp-out4.iol.cz [194.228.2.92]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7CMPTek022356 for ; Thu, 12 Aug 2004 15:25:30 -0700 Received: from [10.1.3.2] (unknown [83.208.54.64]) by smtp-out4.iol.cz (Internet on Line ESMTP server) with ESMTP id 17B17302A2; Thu, 12 Aug 2004 23:25:01 +0200 (CEST) Message-ID: <411BEE42.4050806@stud.feec.vutbr.cz> Date: Fri, 13 Aug 2004 00:25:06 +0200 From: Michal Schmidt User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: achirica@ttd.net Cc: netdev@oss.sgi.com Subject: [PATCH] airo.c - don't clear FLAG_RADIO_DOWN on resume Content-Type: multipart/mixed; boundary="------------040306020700070807040203" X-archive-position: 7700 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 This is a multi-part message in MIME format. --------------040306020700070807040203 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello, According to comments in airo.c the flag FLAG_RADIO_DOWN means: Radio disabled via "ifconfig ethX down". airo_pci_resume clears this flag. This causes a little problem I can reproduce on my IBM ThinkPad R40 with Cisco Aironet mini-PCI card (MPI350) with these steps: 1) ifup eth0 => card works OK, radio status LED indicator is on 2) ifdown eth0 => LED turns off 3) hibernate using swsuspend 4) resume from swsuspend Result: interface eth0 is down, but the LED indicates that radio is on. Expected result: interface eth0 is down, so the radio should be off. I think that airo_pci_resume shouldn't mess with FLAG_RADIO_DOWN. I have removed the line and now everything works as expected. One-line patch attached. Michal Schmidt --------------040306020700070807040203 Content-Type: text/x-patch; name="airo-resume-radio.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="airo-resume-radio.patch" --- linux-2.6.8-rc4-bk2/drivers/net/wireless/airo.c 2004-08-12 22:00:42.000000000 +0200 +++ linux-2.6.8-rc4-bk2-mich/drivers/net/wireless/airo.c 2004-08-12 22:09:15.000000000 +0200 @@ -5520,7 +5520,6 @@ static int airo_pci_resume(struct pci_de mpi_init_descriptors(ai); setup_card(ai, dev->dev_addr, 0); clear_bit(FLAG_RADIO_OFF, &ai->flags); - clear_bit(FLAG_RADIO_DOWN, &ai->flags); clear_bit(FLAG_PENDING_XMIT, &ai->flags); } else { OUT4500(ai, EVACK, EV_AWAKEN); --------------040306020700070807040203-- From davem@redhat.com Thu Aug 12 17:01:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:01: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 i7D01GHN027492 for ; Thu, 12 Aug 2004 17:01:16 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7D00se1000498; Thu, 12 Aug 2004 20:00:54 -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 i7D00sa11930; Thu, 12 Aug 2004 20:00:54 -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 i7D004pW019627; Thu, 12 Aug 2004 20:00:04 -0400 Date: Thu, 12 Aug 2004 16:59:54 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Cc: robert.olsson@data.slu.se, hadi@cyberus.ca, kuznet@ms2.inr.ac.ru Subject: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040812165954.00429e65.davem@redhat.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: 7701 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 [ Robert, Jamal, Alexey, the previous version I sent you guys privately early today had a minor bug, in inet_free_ifa() we now need to use in_dev_put() instead of __in_dev_put() ] The main motivation for this was to make fib_validate_source() cheaper, as currently it needs a global lock in order to access the inet device interface lists. This makes is all use RCU. I kept the non-RCU lock usage in multicast address list handling in net/ipv4/igmp.c, but that could use RCU as well if we wanted to. While doing this I noticed that devinet.c had these two counters (inet_ifa_count and inet_dev_count) which were updated but nobody ever read, so these got killed. Someone poke holes in this patch please :-) # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/12 16:42:07-07:00 davem@nuts.davemloft.net # [IPV4]: Move inetdev/ifa locking over to RCU. # # Multicast ipv4 address handling still uses rwlock # and spinlock synchronization. # # Signed-off-by: David S. Miller # # net/sctp/protocol.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +3 -5 # [IPV4]: Move inetdev/ifa locking over to RCU. # # net/irda/irlan/irlan_eth.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +2 -2 # [IPV4]: Move inetdev/ifa locking over to RCU. # # net/ipv4/route.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +3 -3 # [IPV4]: Move inetdev/ifa locking over to RCU. # # net/ipv4/igmp.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +47 -45 # [IPV4]: Move inetdev/ifa locking over to RCU. # # net/ipv4/icmp.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +2 -2 # [IPV4]: Move inetdev/ifa locking over to RCU. # # net/ipv4/fib_frontend.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +2 -2 # [IPV4]: Move inetdev/ifa locking over to RCU. # # net/ipv4/devinet.c # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +49 -63 # [IPV4]: Move inetdev/ifa locking over to RCU. # # include/linux/inetdevice.h # 2004/08/12 16:41:13-07:00 davem@nuts.davemloft.net +17 -11 # [IPV4]: Move inetdev/ifa locking over to RCU. # diff -Nru a/include/linux/inetdevice.h b/include/linux/inetdevice.h --- a/include/linux/inetdevice.h 2004-08-12 16:42:31 -07:00 +++ b/include/linux/inetdevice.h 2004-08-12 16:42:31 -07:00 @@ -3,6 +3,8 @@ #ifdef __KERNEL__ +#include + struct ipv4_devconf { int accept_redirects; @@ -31,13 +33,13 @@ struct in_device { - struct net_device *dev; + struct net_device *dev; atomic_t refcnt; - rwlock_t lock; int dead; struct in_ifaddr *ifa_list; /* IP ifaddr chain */ + rwlock_t mc_list_lock; struct ip_mc_list *mc_list; /* IP multicast filter chain */ - rwlock_t mc_lock; /* for mc_tomb */ + spinlock_t mc_tomb_lock; struct ip_mc_list *mc_tomb; unsigned long mr_v1_seen; unsigned long mr_v2_seen; @@ -50,6 +52,7 @@ struct neigh_parms *arp_parms; struct ipv4_devconf cnf; + struct rcu_head rcu_head; }; #define IN_DEV_FORWARD(in_dev) ((in_dev)->cnf.forwarding) @@ -80,6 +83,7 @@ { struct in_ifaddr *ifa_next; struct in_device *ifa_dev; + struct rcu_head rcu_head; u32 ifa_local; u32 ifa_address; u32 ifa_mask; @@ -133,19 +137,16 @@ #define endfor_ifa(in_dev) } -extern rwlock_t inetdev_lock; - - static __inline__ struct in_device * in_dev_get(const struct net_device *dev) { struct in_device *in_dev; - read_lock(&inetdev_lock); + rcu_read_lock(); in_dev = dev->ip_ptr; if (in_dev) atomic_inc(&in_dev->refcnt); - read_unlock(&inetdev_lock); + rcu_read_unlock(); return in_dev; } @@ -157,11 +158,16 @@ extern void in_dev_finish_destroy(struct in_device *idev); -static __inline__ void -in_dev_put(struct in_device *idev) +static inline void in_dev_rcu_destroy(struct rcu_head *head) +{ + struct in_device *idev = container_of(head, struct in_device, rcu_head); + in_dev_finish_destroy(idev); +} + +static inline void in_dev_put(struct in_device *idev) { if (atomic_dec_and_test(&idev->refcnt)) - in_dev_finish_destroy(idev); + call_rcu(&idev->rcu_head, in_dev_rcu_destroy); } #define __in_dev_put(idev) atomic_dec(&(idev)->refcnt) diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c 2004-08-12 16:42:31 -07:00 +++ b/net/ipv4/devinet.c 2004-08-12 16:42:31 -07:00 @@ -88,12 +88,9 @@ static void devinet_sysctl_unregister(struct ipv4_devconf *p); #endif -int inet_ifa_count; -int inet_dev_count; - /* Locks all the inet devices. */ -rwlock_t inetdev_lock = RW_LOCK_UNLOCKED; +static spinlock_t inetdev_lock = SPIN_LOCK_UNLOCKED; static struct in_ifaddr *inet_alloc_ifa(void) { @@ -101,18 +98,24 @@ if (ifa) { memset(ifa, 0, sizeof(*ifa)); - inet_ifa_count++; + INIT_RCU_HEAD(&ifa->rcu_head); } return ifa; } -static __inline__ void inet_free_ifa(struct in_ifaddr *ifa) +static inline void inet_free_ifa(struct in_ifaddr *ifa) { if (ifa->ifa_dev) - __in_dev_put(ifa->ifa_dev); + in_dev_put(ifa->ifa_dev); kfree(ifa); - inet_ifa_count--; +} + +static void inet_rcu_free_ifa(struct rcu_head *head) +{ + struct in_ifaddr *ifa = container_of(head, struct in_ifaddr, rcu_head); + + inet_free_ifa(ifa); } void in_dev_finish_destroy(struct in_device *idev) @@ -129,7 +132,6 @@ if (!idev->dead) printk("Freeing alive in_device %p\n", idev); else { - inet_dev_count--; kfree(idev); } } @@ -144,24 +146,23 @@ if (!in_dev) goto out; memset(in_dev, 0, sizeof(*in_dev)); - in_dev->lock = RW_LOCK_UNLOCKED; + INIT_RCU_HEAD(&in_dev->rcu_head); memcpy(&in_dev->cnf, &ipv4_devconf_dflt, sizeof(in_dev->cnf)); in_dev->cnf.sysctl = NULL; in_dev->dev = dev; if ((in_dev->arp_parms = neigh_parms_alloc(dev, &arp_tbl)) == NULL) goto out_kfree; - inet_dev_count++; /* Reference in_dev->dev */ dev_hold(dev); #ifdef CONFIG_SYSCTL neigh_sysctl_register(dev, in_dev->arp_parms, NET_IPV4, NET_IPV4_NEIGH, "ipv4", NULL); #endif - write_lock_bh(&inetdev_lock); + spin_lock_bh(&inetdev_lock); dev->ip_ptr = in_dev; /* Account for reference dev->ip_ptr */ in_dev_hold(in_dev); - write_unlock_bh(&inetdev_lock); + spin_unlock_bh(&inetdev_lock); #ifdef CONFIG_SYSCTL devinet_sysctl_register(in_dev, &in_dev->cnf); #endif @@ -188,16 +189,16 @@ while ((ifa = in_dev->ifa_list) != NULL) { inet_del_ifa(in_dev, &in_dev->ifa_list, 0); - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); } #ifdef CONFIG_SYSCTL devinet_sysctl_unregister(&in_dev->cnf); #endif - write_lock_bh(&inetdev_lock); + spin_lock_bh(&inetdev_lock); in_dev->dev->ip_ptr = NULL; /* in_dev_put following below will kill the in_device */ - write_unlock_bh(&inetdev_lock); + spin_unlock_bh(&inetdev_lock); #ifdef CONFIG_SYSCTL neigh_sysctl_unregister(in_dev->arp_parms); @@ -208,16 +209,16 @@ int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b) { - read_lock(&in_dev->lock); + rcu_read_lock(); for_primary_ifa(in_dev) { if (inet_ifa_match(a, ifa)) { if (!b || inet_ifa_match(b, ifa)) { - read_unlock(&in_dev->lock); + rcu_read_unlock(); return 1; } } } endfor_ifa(in_dev); - read_unlock(&in_dev->lock); + rcu_read_unlock(); return 0; } @@ -241,21 +242,21 @@ ifap1 = &ifa->ifa_next; continue; } - write_lock_bh(&in_dev->lock); + spin_lock_bh(&inetdev_lock); *ifap1 = ifa->ifa_next; - write_unlock_bh(&in_dev->lock); + spin_unlock_bh(&inetdev_lock); rtmsg_ifa(RTM_DELADDR, ifa); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa); - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); } } /* 2. Unlink it */ - write_lock_bh(&in_dev->lock); + spin_lock_bh(&inetdev_lock); *ifap = ifa1->ifa_next; - write_unlock_bh(&in_dev->lock); + spin_unlock_bh(&inetdev_lock); /* 3. Announce address deletion */ @@ -270,7 +271,7 @@ rtmsg_ifa(RTM_DELADDR, ifa1); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); if (destroy) { - inet_free_ifa(ifa1); + call_rcu(&ifa1->rcu_head, inet_rcu_free_ifa); if (!in_dev->ifa_list) inetdev_destroy(in_dev); @@ -285,7 +286,7 @@ ASSERT_RTNL(); if (!ifa->ifa_local) { - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); return 0; } @@ -300,11 +301,11 @@ if (ifa1->ifa_mask == ifa->ifa_mask && inet_ifa_match(ifa1->ifa_address, ifa)) { if (ifa1->ifa_local == ifa->ifa_local) { - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); return -EEXIST; } if (ifa1->ifa_scope != ifa->ifa_scope) { - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); return -EINVAL; } ifa->ifa_flags |= IFA_F_SECONDARY; @@ -317,9 +318,9 @@ } ifa->ifa_next = *ifap; - write_lock_bh(&in_dev->lock); + spin_lock_bh(&inetdev_lock); *ifap = ifa; - write_unlock_bh(&in_dev->lock); + spin_unlock_bh(&inetdev_lock); /* Send message first, then call notifier. Notifier will trigger FIB update, so that @@ -339,7 +340,7 @@ if (!in_dev) { in_dev = inetdev_init(dev); if (!in_dev) { - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); return -ENOBUFS; } } @@ -771,12 +772,11 @@ u32 addr = 0; struct in_device *in_dev; - read_lock(&inetdev_lock); + rcu_read_lock(); in_dev = __in_dev_get(dev); if (!in_dev) goto out_unlock_inetdev; - read_lock(&in_dev->lock); for_primary_ifa(in_dev) { if (ifa->ifa_scope > scope) continue; @@ -787,8 +787,7 @@ if (!addr) addr = ifa->ifa_local; } endfor_ifa(in_dev); - read_unlock(&in_dev->lock); - read_unlock(&inetdev_lock); + rcu_read_unlock(); if (addr) goto out; @@ -798,30 +797,25 @@ in dev_base list. */ read_lock(&dev_base_lock); - read_lock(&inetdev_lock); + rcu_read_lock(); for (dev = dev_base; dev; dev = dev->next) { if ((in_dev = __in_dev_get(dev)) == NULL) continue; - read_lock(&in_dev->lock); for_primary_ifa(in_dev) { if (ifa->ifa_scope != RT_SCOPE_LINK && ifa->ifa_scope <= scope) { - read_unlock(&in_dev->lock); addr = ifa->ifa_local; goto out_unlock_both; } } endfor_ifa(in_dev); - read_unlock(&in_dev->lock); } out_unlock_both: - read_unlock(&inetdev_lock); read_unlock(&dev_base_lock); +out_unlock_inetdev: + rcu_read_unlock(); out: return addr; -out_unlock_inetdev: - read_unlock(&inetdev_lock); - goto out; } static u32 confirm_addr_indev(struct in_device *in_dev, u32 dst, @@ -874,29 +868,24 @@ struct in_device *in_dev; if (dev) { - read_lock(&inetdev_lock); - if ((in_dev = __in_dev_get(dev))) { - read_lock(&in_dev->lock); + rcu_read_lock(); + if ((in_dev = __in_dev_get(dev))) addr = confirm_addr_indev(in_dev, dst, local, scope); - read_unlock(&in_dev->lock); - } - read_unlock(&inetdev_lock); + rcu_read_unlock(); return addr; } read_lock(&dev_base_lock); - read_lock(&inetdev_lock); + rcu_read_lock(); for (dev = dev_base; dev; dev = dev->next) { if ((in_dev = __in_dev_get(dev))) { - read_lock(&in_dev->lock); addr = confirm_addr_indev(in_dev, dst, local, scope); - read_unlock(&in_dev->lock); if (addr) break; } } - read_unlock(&inetdev_lock); + rcu_read_unlock(); read_unlock(&dev_base_lock); return addr; @@ -1065,12 +1054,12 @@ continue; if (idx > s_idx) s_ip_idx = 0; - read_lock(&inetdev_lock); + rcu_read_lock(); if ((in_dev = __in_dev_get(dev)) == NULL) { - read_unlock(&inetdev_lock); + rcu_read_unlock(); continue; } - read_lock(&in_dev->lock); + for (ifa = in_dev->ifa_list, ip_idx = 0; ifa; ifa = ifa->ifa_next, ip_idx++) { if (ip_idx < s_ip_idx) @@ -1078,13 +1067,11 @@ if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, RTM_NEWADDR) <= 0) { - read_unlock(&in_dev->lock); - read_unlock(&inetdev_lock); + rcu_read_unlock(); goto done; } } - read_unlock(&in_dev->lock); - read_unlock(&inetdev_lock); + rcu_read_unlock(); } done: @@ -1138,11 +1125,11 @@ read_lock(&dev_base_lock); for (dev = dev_base; dev; dev = dev->next) { struct in_device *in_dev; - read_lock(&inetdev_lock); + rcu_read_lock(); in_dev = __in_dev_get(dev); if (in_dev) in_dev->cnf.forwarding = on; - read_unlock(&inetdev_lock); + rcu_read_unlock(); } read_unlock(&dev_base_lock); @@ -1508,6 +1495,5 @@ EXPORT_SYMBOL(in_dev_finish_destroy); EXPORT_SYMBOL(inet_select_addr); EXPORT_SYMBOL(inetdev_by_index); -EXPORT_SYMBOL(inetdev_lock); EXPORT_SYMBOL(register_inetaddr_notifier); EXPORT_SYMBOL(unregister_inetaddr_notifier); diff -Nru a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c --- a/net/ipv4/fib_frontend.c 2004-08-12 16:42:31 -07:00 +++ b/net/ipv4/fib_frontend.c 2004-08-12 16:42:31 -07:00 @@ -172,13 +172,13 @@ int ret; no_addr = rpf = 0; - read_lock(&inetdev_lock); + rcu_read_lock(); in_dev = __in_dev_get(dev); if (in_dev) { no_addr = in_dev->ifa_list == NULL; rpf = IN_DEV_RPFILTER(in_dev); } - read_unlock(&inetdev_lock); + rcu_read_unlock(); if (in_dev == NULL) goto e_inval; diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c --- a/net/ipv4/icmp.c 2004-08-12 16:42:31 -07:00 +++ b/net/ipv4/icmp.c 2004-08-12 16:42:31 -07:00 @@ -878,7 +878,7 @@ in_dev = in_dev_get(dev); if (!in_dev) goto out; - read_lock(&in_dev->lock); + rcu_read_lock(); if (in_dev->ifa_list && IN_DEV_LOG_MARTIANS(in_dev) && IN_DEV_FORWARD(in_dev)) { @@ -895,7 +895,7 @@ NIPQUAD(mask), dev->name, NIPQUAD(rt->rt_src)); } } - read_unlock(&in_dev->lock); + rcu_read_unlock(); in_dev_put(in_dev); out:; } diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c --- a/net/ipv4/igmp.c 2004-08-12 16:42:31 -07:00 +++ b/net/ipv4/igmp.c 2004-08-12 16:42:31 -07:00 @@ -487,7 +487,7 @@ int type; if (!pmc) { - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { if (pmc->multiaddr == IGMP_ALL_HOSTS) continue; @@ -499,7 +499,7 @@ skb = add_grec(skb, pmc, type, 0, 0); spin_unlock_bh(&pmc->lock); } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); } else { spin_lock_bh(&pmc->lock); if (pmc->sfcount[MCAST_EXCLUDE]) @@ -541,8 +541,8 @@ struct sk_buff *skb = NULL; int type, dtype; - read_lock(&in_dev->lock); - write_lock_bh(&in_dev->mc_lock); + read_lock(&in_dev->mc_list_lock); + spin_lock_bh(&in_dev->mc_tomb_lock); /* deleted MCA's */ pmc_prev = NULL; @@ -575,7 +575,7 @@ } else pmc_prev = pmc; } - write_unlock_bh(&in_dev->mc_lock); + spin_unlock_bh(&in_dev->mc_tomb_lock); /* change recs */ for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { @@ -601,7 +601,8 @@ } spin_unlock_bh(&pmc->lock); } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); + if (!skb) return; (void) igmpv3_sendpack(skb); @@ -759,14 +760,14 @@ if (group == IGMP_ALL_HOSTS) return; - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (im=in_dev->mc_list; im!=NULL; im=im->next) { if (im->multiaddr == group) { igmp_stop_timer(im); break; } } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); } static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, @@ -840,7 +841,7 @@ * - Use the igmp->igmp_code field as the maximum * delay possible */ - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (im=in_dev->mc_list; im!=NULL; im=im->next) { if (group && group != im->multiaddr) continue; @@ -856,7 +857,7 @@ spin_unlock_bh(&im->lock); igmp_mod_timer(im, max_delay); } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); } int igmp_rcv(struct sk_buff *skb) @@ -982,10 +983,10 @@ } spin_unlock_bh(&im->lock); - write_lock_bh(&in_dev->mc_lock); + spin_lock_bh(&in_dev->mc_tomb_lock); pmc->next = in_dev->mc_tomb; in_dev->mc_tomb = pmc; - write_unlock_bh(&in_dev->mc_lock); + spin_unlock_bh(&in_dev->mc_tomb_lock); } static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr) @@ -993,7 +994,7 @@ struct ip_mc_list *pmc, *pmc_prev; struct ip_sf_list *psf, *psf_next; - write_lock_bh(&in_dev->mc_lock); + spin_lock_bh(&in_dev->mc_tomb_lock); pmc_prev = NULL; for (pmc=in_dev->mc_tomb; pmc; pmc=pmc->next) { if (pmc->multiaddr == multiaddr) @@ -1006,7 +1007,7 @@ else in_dev->mc_tomb = pmc->next; } - write_unlock_bh(&in_dev->mc_lock); + spin_unlock_bh(&in_dev->mc_tomb_lock); if (pmc) { for (psf=pmc->tomb; psf; psf=psf_next) { psf_next = psf->sf_next; @@ -1021,10 +1022,10 @@ { struct ip_mc_list *pmc, *nextpmc; - write_lock_bh(&in_dev->mc_lock); + spin_lock_bh(&in_dev->mc_tomb_lock); pmc = in_dev->mc_tomb; in_dev->mc_tomb = NULL; - write_unlock_bh(&in_dev->mc_lock); + spin_unlock_bh(&in_dev->mc_tomb_lock); for (; pmc; pmc = nextpmc) { nextpmc = pmc->next; @@ -1033,7 +1034,7 @@ kfree(pmc); } /* clear dead sources, too */ - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { struct ip_sf_list *psf, *psf_next; @@ -1046,7 +1047,7 @@ kfree(psf); } } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); } #endif @@ -1167,10 +1168,10 @@ im->gsquery = 0; #endif im->loaded = 0; - write_lock_bh(&in_dev->lock); + write_lock_bh(&in_dev->mc_list_lock); im->next=in_dev->mc_list; in_dev->mc_list=im; - write_unlock_bh(&in_dev->lock); + write_unlock_bh(&in_dev->mc_list_lock); #ifdef CONFIG_IP_MULTICAST igmpv3_del_delrec(in_dev, im->multiaddr); #endif @@ -1194,9 +1195,9 @@ for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) { if (i->multiaddr==addr) { if (--i->users == 0) { - write_lock_bh(&in_dev->lock); + write_lock_bh(&in_dev->mc_list_lock); *ip = i->next; - write_unlock_bh(&in_dev->lock); + write_unlock_bh(&in_dev->mc_list_lock); igmp_group_dropped(i); if (!in_dev->dead) @@ -1251,7 +1252,8 @@ in_dev->mr_qrv = IGMP_Unsolicited_Report_Count; #endif - in_dev->mc_lock = RW_LOCK_UNLOCKED; + in_dev->mc_list_lock = RW_LOCK_UNLOCKED; + in_dev->mc_tomb_lock = SPIN_LOCK_UNLOCKED; } /* Device going up */ @@ -1281,17 +1283,17 @@ /* Deactivate timers */ ip_mc_down(in_dev); - write_lock_bh(&in_dev->lock); + write_lock_bh(&in_dev->mc_list_lock); while ((i = in_dev->mc_list) != NULL) { in_dev->mc_list = i->next; - write_unlock_bh(&in_dev->lock); + write_unlock_bh(&in_dev->mc_list_lock); igmp_group_dropped(i); ip_ma_put(i); - write_lock_bh(&in_dev->lock); + write_lock_bh(&in_dev->mc_list_lock); } - write_unlock_bh(&in_dev->lock); + write_unlock_bh(&in_dev->mc_list_lock); } static struct in_device * ip_mc_find_dev(struct ip_mreqn *imr) @@ -1391,18 +1393,18 @@ if (!in_dev) return -ENODEV; - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { if (*pmca == pmc->multiaddr) break; } if (!pmc) { /* MCA not found?? bug */ - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); return -ESRCH; } spin_lock_bh(&pmc->lock); - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); #ifdef CONFIG_IP_MULTICAST sf_markstate(pmc); #endif @@ -1527,18 +1529,18 @@ if (!in_dev) return -ENODEV; - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { if (*pmca == pmc->multiaddr) break; } if (!pmc) { /* MCA not found?? bug */ - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); return -ESRCH; } spin_lock_bh(&pmc->lock); - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); #ifdef CONFIG_IP_MULTICAST sf_markstate(pmc); @@ -2095,7 +2097,7 @@ struct ip_sf_list *psf; int rv = 0; - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); for (im=in_dev->mc_list; im; im=im->next) { if (im->multiaddr == mc_addr) break; @@ -2117,7 +2119,7 @@ } else rv = 1; /* unspecified source; tentatively allow */ } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); return rv; } @@ -2141,13 +2143,13 @@ in_dev = in_dev_get(state->dev); if (!in_dev) continue; - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); im = in_dev->mc_list; if (im) { state->in_dev = in_dev; break; } - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); in_dev_put(in_dev); } return im; @@ -2159,7 +2161,7 @@ im = im->next; while (!im) { if (likely(state->in_dev != NULL)) { - read_unlock(&state->in_dev->lock); + read_unlock(&state->in_dev->mc_list_lock); in_dev_put(state->in_dev); } state->dev = state->dev->next; @@ -2170,7 +2172,7 @@ state->in_dev = in_dev_get(state->dev); if (!state->in_dev) continue; - read_lock(&state->in_dev->lock); + read_lock(&state->in_dev->mc_list_lock); im = state->in_dev->mc_list; } return im; @@ -2206,7 +2208,7 @@ { struct igmp_mc_iter_state *state = igmp_mc_seq_private(seq); if (likely(state->in_dev != NULL)) { - read_unlock(&state->in_dev->lock); + read_unlock(&state->in_dev->mc_list_lock); in_dev_put(state->in_dev); state->in_dev = NULL; } @@ -2304,7 +2306,7 @@ idev = in_dev_get(state->dev); if (unlikely(idev == NULL)) continue; - read_lock_bh(&idev->lock); + read_lock(&idev->mc_list_lock); im = idev->mc_list; if (likely(im != NULL)) { spin_lock_bh(&im->lock); @@ -2316,7 +2318,7 @@ } spin_unlock_bh(&im->lock); } - read_unlock_bh(&idev->lock); + read_unlock(&idev->mc_list_lock); in_dev_put(idev); } return psf; @@ -2332,7 +2334,7 @@ state->im = state->im->next; while (!state->im) { if (likely(state->idev != NULL)) { - read_unlock_bh(&state->idev->lock); + read_unlock(&state->idev->mc_list_lock); in_dev_put(state->idev); } state->dev = state->dev->next; @@ -2343,7 +2345,7 @@ state->idev = in_dev_get(state->dev); if (!state->idev) continue; - read_lock_bh(&state->idev->lock); + read_lock(&state->idev->mc_list_lock); state->im = state->idev->mc_list; } if (!state->im) @@ -2389,7 +2391,7 @@ state->im = NULL; } if (likely(state->idev != NULL)) { - read_unlock_bh(&state->idev->lock); + read_unlock(&state->idev->mc_list_lock); in_dev_put(state->idev); state->idev = NULL; } diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c 2004-08-12 16:42:31 -07:00 +++ b/net/ipv4/route.c 2004-08-12 16:42:31 -07:00 @@ -1855,7 +1855,7 @@ if (MULTICAST(daddr)) { struct in_device *in_dev; - read_lock(&inetdev_lock); + rcu_read_lock(); if ((in_dev = __in_dev_get(dev)) != NULL) { int our = ip_check_mc(in_dev, daddr, saddr, skb->nh.iph->protocol); @@ -1864,12 +1864,12 @@ || (!LOCAL_MCAST(daddr) && IN_DEV_MFORWARD(in_dev)) #endif ) { - read_unlock(&inetdev_lock); + rcu_read_unlock(); return ip_route_input_mc(skb, daddr, saddr, tos, dev, our); } } - read_unlock(&inetdev_lock); + rcu_read_unlock(); return -EINVAL; } return ip_route_input_slow(skb, daddr, saddr, tos, dev); diff -Nru a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c --- a/net/irda/irlan/irlan_eth.c 2004-08-12 16:42:31 -07:00 +++ b/net/irda/irlan/irlan_eth.c 2004-08-12 16:42:31 -07:00 @@ -306,7 +306,7 @@ in_dev = in_dev_get(dev); if (in_dev == NULL) return; - read_lock(&in_dev->lock); + rcu_read_lock(); if (in_dev->ifa_list) arp_send(ARPOP_REQUEST, ETH_P_ARP, @@ -314,7 +314,7 @@ dev, in_dev->ifa_list->ifa_address, NULL, dev->dev_addr, NULL); - read_unlock(&in_dev->lock); + rcu_read_unlock(); in_dev_put(in_dev); #endif /* CONFIG_INET */ } diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c --- a/net/sctp/protocol.c 2004-08-12 16:42:31 -07:00 +++ b/net/sctp/protocol.c 2004-08-12 16:42:31 -07:00 @@ -148,13 +148,12 @@ struct in_ifaddr *ifa; struct sctp_sockaddr_entry *addr; - read_lock(&inetdev_lock); + rcu_read_lock(); if ((in_dev = __in_dev_get(dev)) == NULL) { - read_unlock(&inetdev_lock); + rcu_read_unlock(); return; } - read_lock(&in_dev->lock); for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { /* Add the address to the local list. */ addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC); @@ -166,8 +165,7 @@ } } - read_unlock(&in_dev->lock); - read_unlock(&inetdev_lock); + rcu_read_unlock(); } /* Extract our IP addresses from the system and stash them in the From sri@us.ibm.com Thu Aug 12 17:25:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:25:08 -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 i7D0Ou29028135 for ; Thu, 12 Aug 2004 17:25:03 -0700 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e5.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7D0OOjw168932; Thu, 12 Aug 2004 20:24:24 -0400 Received: from w-sridhar.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 i7D0PSwu107376; Thu, 12 Aug 2004 20:25:29 -0400 Date: Thu, 12 Aug 2004 17:24:22 -0700 (PDT) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: davem@redhat.com cc: netdev@oss.sgi.com, lksctp-developers@lists.sourceforge.net Subject: [BK PATCH] 2.4 SCTP updates Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7702 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 Dave, Please do a bk pull http://linux-lksctp.bkbits.net/lksctp-2.4.work to get the following csets to bring 2.4 SCTP in sync with 2.6. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/12 14:15:26-07:00 sri@us.ibm.com # [SCTP] Mark chunks as ineligible for fast retransmit after they are # retransmitted. Also mark any chunks that could not be fit in the # PMTU sized packet as ineligible for fast retransmit. # # net/sctp/outqueue.c # # ChangeSet # 2004/08/12 14:14:29-07:00 sri@us.ibm.com # [SCTP] Fix missing '+' in the computation of sack chunk size in # sctp_sm_pull_sack(). # # net/sctp/sm_statefuns.c # # ChangeSet # 2004/08/12 14:13:23-07:00 sri@us.ibm.com # [SCTP] Fix issues with handling stale cookie error over multihoming # associations. # # net/sctp/sm_statefuns.c # net/sctp/sm_sideeffect.c # include/net/sctp/command.h # # ChangeSet # 2004/08/12 14:12:00-07:00 sri@us.ibm.com # [SCTP] Fix data not being delivered to user in SHUTDOWN_SENT state. # # Also cleaned up sctp_sf_eat_data_6_2() and sctp_sf_eat_data_fast_4_4() # as they have a lot of common code. # # net/sctp/sm_statefuns.c # net/sctp/associola.c # include/net/sctp/sm.h # include/net/sctp/constants.h # # ChangeSet # 2004/08/12 14:08:40-07:00 sri@us.ibm.com # [SCTP] Set/Get default SCTP_PEER_ADDR_PARAMS for endpoint when associd # and peer address are 0. # # net/sctp/socket.c # # ChangeSet # 2004/08/12 12:25:45-07:00 sri@us.ibm.com # [SCTP] SPARSE cleanup backported from 2.6 # # net/sctp/ulpqueue.c # net/sctp/ulpevent.c # net/sctp/socket.c # net/sctp/sm_statefuns.c # net/sctp/protocol.c # net/sctp/outqueue.c # net/sctp/output.c # net/sctp/inqueue.c # Thanks Sridhar From sandr8_NOSPAM_@crocetta.org Thu Aug 12 17:50:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:50:37 -0700 (PDT) Received: from vsmtp1.tin.it (vsmtp1b.tin.it [212.216.176.141] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D0oRiU029194 for ; Thu, 12 Aug 2004 17:50:28 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp1.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C680000D14F; Fri, 13 Aug 2004 02:47:57 +0200 Message-ID: <411C0FC0.4060703@crocetta.org> Date: Fri, 13 Aug 2004 02:48:00 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca, kuznet@ms2.inr.ac.ru, davem@redhat.com, devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, laforge@netfilter.org CC: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [PATCH 0/4] deferred drop, __parent workaround, reshape_fail, ACCT unbilling and some cosmetics Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7703 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev This set of patches addresses some issues _apparently_ not tightly bound one to the other one. i tested the whole patchset in two configurations, one with cbq + sfq + ingress and the other with a packet scheduler that i'm actually working on. i'd be very glad if somebody volunteers for more testing, although i would be even more happy if somebody could read attentively and countercheck what i have written. i have checked and double checked slowly and carefully myself but i would really appreciate if somebody else does some further bug hunting, just in case i forgot something or i've made some wrong assumption. Alessandro Salvatori -- the _NOSPAM_ account is the one i am subscribed with, please remove _NOSPAM_ for personal replies From sandr8_NOSPAM_@crocetta.org Thu Aug 12 17:50:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:50:41 -0700 (PDT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D0oYio029200 for ; Thu, 12 Aug 2004 17:50:34 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp3.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C170000CBF4; Fri, 13 Aug 2004 02:48:05 +0200 Message-ID: <411C0FC7.3040100@crocetta.org> Date: Fri, 13 Aug 2004 02:48:07 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca, kuznet@ms2.inr.ac.ru, davem@redhat.com, devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, laforge@netfilter.org CC: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [PATCH 1/4] some cosmetics Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7704 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev 1) the first patch is a tiny patch that changes the #define-s for the NET_XMIT_* return values and provides quick inline functions that determine if *a* packet was dropped ("a packet" does not necessarily mean "the" packet that was enqueued!) this is not just cosmetic but it's useful later on. furthermore, in some places the code makes me think that there has been a lack of update... in those places it was assumpted that the success or insuccess was somewhat binary (either 0 or NET_XMIT_SUCCESS or != NET_XMIT_SUCCESS)... Alessandro Salvatori -- the _NOSPAM_ account is the one i am subscribed with, please remove _NOSPAM_ for personal replies diff -NaurX dontdiff linux-2.6.8-rc4/include/linux/netdevice.h linux-2.6.8-rc4-netxmitcodes/include/linux/netdevice.h --- linux-2.6.8-rc4/include/linux/netdevice.h 2004-08-10 12:27:33.000000000 +0200 +++ linux-2.6.8-rc4-netxmitcodes/include/linux/netdevice.h 2004-08-12 13:31:07.278643720 +0200 @@ -52,12 +52,14 @@ #define HAVE_NETDEV_PRIV /* netdev_priv() */ #define NET_XMIT_SUCCESS 0 -#define NET_XMIT_DROP 1 /* skb dropped */ -#define NET_XMIT_CN 2 /* congestion notification */ -#define NET_XMIT_POLICED 3 /* skb is shot by police */ -#define NET_XMIT_BYPASS 4 /* packet does not leave via dequeue; +#define NET_XMIT_BYPASS 2 /* packet does not leave via dequeue; (TC use only - dev_queue_xmit returns this as NET_XMIT_SUCCESS) */ +#define NET_XMIT_RESHAPED 4 + +#define NET_XMIT_DROP 5 /* skb dropped */ +#define NET_XMIT_CN 7 /* congestion notification */ +#define NET_XMIT_POLICED 9 /* skb is shot by police */ /* Backlog congestion levels */ #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ diff -NaurX dontdiff linux-2.6.8-rc4/include/net/pkt_sched.h linux-2.6.8-rc4-netxmitcodes/include/net/pkt_sched.h --- linux-2.6.8-rc4/include/net/pkt_sched.h 2004-08-10 12:27:34.000000000 +0200 +++ linux-2.6.8-rc4-netxmitcodes/include/net/pkt_sched.h 2004-08-12 13:31:12.114908496 +0200 @@ -440,6 +440,16 @@ extern int qdisc_restart(struct net_device *dev); +static inline unsigned any_dropped(unsigned code) +{ + return(0x1 & code); +} + +static inline unsigned no_dropped(unsigned code) +{ + return(!(0x1 & code)); +} + /* Calculate maximal size of packet seen by hard_start_xmit routine of this device. */ From sandr8_NOSPAM_@crocetta.org Thu Aug 12 17:50:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:51:00 -0700 (PDT) Received: from vsmtp2.tin.it (smtp.virgilio.it [212.216.176.142] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D0oqwJ029323 for ; Thu, 12 Aug 2004 17:50:53 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp2.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8CBC0000C9A3; Fri, 13 Aug 2004 02:48:19 +0200 Message-ID: <411C0FD6.9010401@crocetta.org> Date: Fri, 13 Aug 2004 02:48:22 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca, kuznet@ms2.inr.ac.ru, davem@redhat.com, devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, laforge@netfilter.org CC: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [PATCH 3/4] ACCT billing Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7706 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev 3) the third patch is not my own work but Harald Welte's one. i just send the same patch but against the kernel as it results after applying (1) and (2) so that it applies cleanly. that patch is intended to bill connections and datagram flows for the amount of traffic they have actually been served. Alessandro Salvatori -- the _NOSPAM_ account is the one i am subscribed with, please remove _NOSPAM_ for personal replies diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.8-rc4-apichanged-ACCT/include/linux/netfilter_ipv4/ip_conntrack.h --- linux-2.6.8-rc4-apichanged/include/linux/netfilter_ipv4/ip_conntrack.h 2004-08-10 12:27:34.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/include/linux/netfilter_ipv4/ip_conntrack.h 2004-08-12 17:43:06.994097592 +0200 @@ -156,6 +156,12 @@ union ip_conntrack_expect_help help; }; +struct ip_conntrack_counter +{ + u_int64_t packets; + u_int64_t bytes; +}; + struct ip_conntrack_helper; struct ip_conntrack @@ -173,6 +179,11 @@ /* Timer function; drops refcnt when it goes off. */ struct timer_list timeout; +#ifdef CONFIG_IP_NF_CT_ACCT + /* Accounting Information (same cache line as other written members) */ + struct ip_conntrack_counter counters[IP_CT_DIR_MAX]; +#endif + /* If we're expecting another related connection, this will be in expected linked list */ struct list_head sibling_list; @@ -245,8 +256,10 @@ const struct ip_conntrack_tuple *orig); /* Refresh conntrack for this many jiffies */ -extern void ip_ct_refresh(struct ip_conntrack *ct, - unsigned long extra_jiffies); +extern void ip_ct_refresh_acct(struct ip_conntrack *ct, + enum ip_conntrack_info ctinfo, + const struct sk_buff *skb, + unsigned long extra_jiffies); /* These are for NAT. Icky. */ /* Call me when a conntrack is destroyed. */ diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_amanda.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_amanda.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_amanda.c 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_amanda.c 2004-08-12 17:43:07.043090144 +0200 @@ -58,7 +58,7 @@ /* increase the UDP timeout of the master connection as replies from * Amanda clients to the server can be quite delayed */ - ip_ct_refresh(ct, master_timeout * HZ); + ip_ct_refresh_acct(ct, ctinfo, NULL, master_timeout * HZ); /* No data? */ dataoff = skb->nh.iph->ihl*4 + sizeof(struct udphdr); diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_core.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-12 17:43:07.049089232 +0200 @@ -1164,21 +1164,39 @@ synchronize_net(); } -/* Refresh conntrack for this many jiffies. */ -void ip_ct_refresh(struct ip_conntrack *ct, unsigned long extra_jiffies) +static inline void ct_add_counters(struct ip_conntrack *ct, + enum ip_conntrack_info ctinfo, + const struct sk_buff *skb) +{ +#ifdef CONFIG_IP_NF_CT_ACCT + if (skb) { + ct->counters[CTINFO2DIR(ctinfo)].packets++; + ct->counters[CTINFO2DIR(ctinfo)].bytes += + ntohs(skb->nh.iph->tot_len); + } +#endif +} + +/* Refresh conntrack for this many jiffies and do accounting (if skb != NULL) */ +void ip_ct_refresh_acct(struct ip_conntrack *ct, + enum ip_conntrack_info ctinfo, + const struct sk_buff *skb, + unsigned long extra_jiffies) { IP_NF_ASSERT(ct->timeout.data == (unsigned long)ct); /* If not in hash table, timer will not be active yet */ - if (!is_confirmed(ct)) + if (!is_confirmed(ct)) { ct->timeout.expires = extra_jiffies; - else { + ct_add_counters(ct, ctinfo, skb); + } else { WRITE_LOCK(&ip_conntrack_lock); /* Need del_timer for race avoidance (may already be dying). */ if (del_timer(&ct->timeout)) { ct->timeout.expires = jiffies + extra_jiffies; add_timer(&ct->timeout); } + ct_add_counters(ct, ctinfo, skb); WRITE_UNLOCK(&ip_conntrack_lock); } } diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_generic.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_generic.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_generic.c 2004-06-16 07:19:13.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_generic.c 2004-08-12 17:43:07.079084672 +0200 @@ -50,9 +50,9 @@ /* Returns verdict for packet, or -1 for invalid. */ static int packet(struct ip_conntrack *conntrack, const struct sk_buff *skb, - enum ip_conntrack_info conntrackinfo) + enum ip_conntrack_info ctinfo) { - ip_ct_refresh(conntrack, ip_ct_generic_timeout); + ip_ct_refresh_acct(conntrack, ctinfo, skb, ip_ct_generic_timeout); return NF_ACCEPT; } diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_icmp.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_icmp.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2004-06-16 07:18:52.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2004-08-12 17:43:07.082084216 +0200 @@ -94,7 +94,7 @@ ct->timeout.function((unsigned long)ct); } else { atomic_inc(&ct->proto.icmp.count); - ip_ct_refresh(ct, ip_ct_icmp_timeout); + ip_ct_refresh_acct(ct, ctinfo, skb, ip_ct_icmp_timeout); } return NF_ACCEPT; diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_tcp.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_tcp.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2004-08-12 17:43:07.087083456 +0200 @@ -225,7 +225,7 @@ set_bit(IPS_ASSURED_BIT, &conntrack->status); out: WRITE_UNLOCK(&tcp_lock); - ip_ct_refresh(conntrack, *tcp_timeouts[newconntrack]); + ip_ct_refresh_acct(conntrack, ctinfo, skb, *tcp_timeouts[newconntrack]); return NF_ACCEPT; } diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_udp.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_udp.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2004-06-16 07:18:37.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2004-08-12 17:43:07.090083000 +0200 @@ -60,16 +60,17 @@ /* Returns verdict for packet, and may modify conntracktype */ static int udp_packet(struct ip_conntrack *conntrack, const struct sk_buff *skb, - enum ip_conntrack_info conntrackinfo) + enum ip_conntrack_info ctinfo) { /* If we've seen traffic both ways, this is some kind of UDP stream. Extend timeout. */ if (test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)) { - ip_ct_refresh(conntrack, ip_ct_udp_timeout_stream); + ip_ct_refresh_acct(conntrack, ctinfo, skb, + ip_ct_udp_timeout_stream); /* Also, more likely to be important, and not a probe */ set_bit(IPS_ASSURED_BIT, &conntrack->status); } else - ip_ct_refresh(conntrack, ip_ct_udp_timeout); + ip_ct_refresh_acct(conntrack, ctinfo, skb, ip_ct_udp_timeout); return NF_ACCEPT; } diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_standalone.c --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-12 17:43:07.111079808 +0200 @@ -83,6 +83,17 @@ return len; } +#ifdef CONFIG_IP_NF_CT_ACCT +static unsigned int +print_counters(char *buffer, struct ip_conntrack_counter *counter) +{ + return sprintf(buffer, "packets=%llu bytes=%llu ", + counter->packets, counter->bytes); +} +#else +#define print_counters(x, y) 0 +#endif + static unsigned int print_conntrack(char *buffer, struct ip_conntrack *conntrack) { @@ -102,11 +113,15 @@ len += print_tuple(buffer + len, &conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple, proto); + len += print_counters(buffer + len, + &conntrack->counters[IP_CT_DIR_ORIGINAL]); if (!(test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status))) len += sprintf(buffer + len, "[UNREPLIED] "); len += print_tuple(buffer + len, &conntrack->tuplehash[IP_CT_DIR_REPLY].tuple, proto); + len += print_counters(buffer + len, + &conntrack->counters[IP_CT_DIR_REPLY]); if (test_bit(IPS_ASSURED_BIT, &conntrack->status)) len += sprintf(buffer + len, "[ASSURED] "); len += sprintf(buffer + len, "use=%u ", @@ -638,7 +653,7 @@ EXPORT_SYMBOL(ip_conntrack_helper_register); EXPORT_SYMBOL(ip_conntrack_helper_unregister); EXPORT_SYMBOL(ip_ct_selective_cleanup); -EXPORT_SYMBOL(ip_ct_refresh); +EXPORT_SYMBOL(ip_ct_refresh_acct); EXPORT_SYMBOL(ip_ct_find_proto); EXPORT_SYMBOL(__ip_ct_find_proto); EXPORT_SYMBOL(ip_ct_find_helper); diff -NaurX dontdiff linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/Kconfig linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/Kconfig --- linux-2.6.8-rc4-apichanged/net/ipv4/netfilter/Kconfig 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/Kconfig 2004-08-12 17:45:47.330722720 +0200 @@ -19,6 +19,10 @@ To compile it as a module, choose M here. If unsure, say N. +config IP_NF_CT_ACCT + bool "Connection tracking flow accounting" + depends on IP_NF_CONNTRACK + config IP_NF_FTP tristate "FTP protocol support" depends on IP_NF_CONNTRACK From sandr8_NOSPAM_@crocetta.org Thu Aug 12 17:50:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:50:50 -0700 (PDT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D0oicT029226 for ; Thu, 12 Aug 2004 17:50:45 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp12.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 40B33B7C010E9586; Fri, 13 Aug 2004 02:48:28 +0200 Message-ID: <411C0FDF.2040200@crocetta.org> Date: Fri, 13 Aug 2004 02:48:31 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca, kuznet@ms2.inr.ac.ru, davem@redhat.com, devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, laforge@netfilter.org CC: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [PATCH 4/4] ACCT unbilling Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7705 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev 4) the fourth patch is again my work and unbills flows that undergo a loss. in other words it aims at enforcing the _actually been served_ above. in fact patch (3) doesn't unbill connections for packets that are dropped, since this was not trivial at all to do before the changes in patch (2). the error made could be huge with respect to open loop streams (such as UDP), while with closed loop ones we could imagine that there will be not that much difference between the goodput seen before the enqueuing and the goodput seen after the deuqueuing. (well throughput and goodput are over time... but they are the most immediate words to convey the idea) thanks to patch (4), when a packet is dropped, we call the unbilling function ct_sub_counters() from inside the before_explicit_drop(). the body of ct_sub_counters() is executed if and only if the connection tracking module is loaded (and, of course, if ACCT was enabled at compile time). here, if some further development needs it, we could place a new HOOK that gets packets right before they are dropped... you would then be able to register packet filters functions that wanna gather informations from dropped packets... That way netfilter could also catch packets dropped _after_ they were enqueued. RFC: personally i don't like having ip_ct_get and ip_conntrack_lockp in core/net.c, as logically they should not be there. where would they fit better? some place more appropriate? otherwise i should really take into consideration the hook stuff and have the ct_sub_counters() registered to the hook as well, so that there's no more need for those pointers. Alessandro Salvatori -- the _NOSPAM_ account is the one i am subscribed with, please remove _NOSPAM_ for personal replies diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/include/net/pkt_sched.h linux-2.6.8-rc4-apichanged-ACCT-unbill/include/net/pkt_sched.h --- linux-2.6.8-rc4-apichanged-ACCT/include/net/pkt_sched.h 2004-08-12 16:01:09.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/include/net/pkt_sched.h 2004-08-12 21:09:57.732378592 +0200 @@ -10,6 +10,21 @@ #include #include +#ifdef CONFIG_IP_NF_CT_ACCT +#include +#include +#include +extern struct ip_conntrack * +(*ip_ct_get)(struct sk_buff *skb, enum ip_conntrack_info *ctinfo); + +#ifdef CONFIG_NETFILTER_DEBUG +extern struct rwlock_debug * ip_conntrack_lockp; +#else +extern rwlock_t * ip_conntrack_lockp; +#endif + +#endif + struct rtattr; struct Qdisc; @@ -94,9 +109,53 @@ #define IMPLICIT_DROP() do; while (0) /* readability: just to be aware of what you are doing!!! */ +static inline void ct_sub_counters(const struct sk_buff *skb) +{ + /* skb must not be NULL */ +#ifdef CONFIG_IP_NF_CT_ACCT + if(ip_ct_get){ + enum ip_conntrack_info ctinfo; + struct ip_conntrack *ct; + + struct ip_conntrack * + (*the_connection_tracking_is_loaded)(struct sk_buff *skb, + enum ip_conntrack_info *ctinfo); + + if(skb->nfct && (the_connection_tracking_is_loaded=ip_ct_get)){ + mb(); + ct=the_connection_tracking_is_loaded( + (struct sk_buff *)skb, + &ctinfo); + if(ct){ + WRITE_LOCK(ip_conntrack_lockp); + + ct->counters[CTINFO2DIR(ctinfo)].packets--; + ct->counters[CTINFO2DIR(ctinfo)].bytes -= + ntohs(skb->nh.iph->tot_len); //no need to check against wraparound + //unless there's a bug it should not be possible to unbill more than we have billed! + WRITE_UNLOCK(ip_conntrack_lockp); + } + } + } +#endif +} + static inline void before_explicit_drop(const struct sk_buff * skb) { - /* for the moment there's nothing to do. see next patch!!! */ + ct_sub_counters(skb); + + /* here, if some further development needs it, we could place + * a new HOOK that gets packets right before they are dropped... + * you would then be able to register packet filters functions + * that wanna gather informations from dropped packets... + * + * it would also be somehow dirty but technically feasible to + * use the kfree_skb() as the okfn: it has the right prototype + * to be used in that way and it could also make some sense, + * though the meaning of the value of filter functions would + * be pretty counterintuitive... */ + + skb_free(skb); } #define QDISC_ALIGN 32 diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/net/core/dev.c linux-2.6.8-rc4-apichanged-ACCT-unbill/net/core/dev.c --- linux-2.6.8-rc4-apichanged-ACCT/net/core/dev.c 2004-08-12 17:23:43.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/net/core/dev.c 2004-08-12 18:30:24.561721744 +0200 @@ -113,6 +113,23 @@ #include #endif /* CONFIG_NET_RADIO */ #include +#include +#ifdef CONFIG_IP_NF_CT_ACCT +struct ip_conntrack * +(* ip_ct_get)(struct sk_buff *skb, + enum ip_conntrack_info *ctinfo)=NULL; +DECLARE_RWLOCK(ct_load); +#ifdef CONFIG_NETFILTER_DEBUG +struct rwlock_debug * ip_conntrack_lockp=NULL; +#else +rwlock_t * ip_conntrack_lockp=NULL; +#endif + +EXPORT_SYMBOL(ip_ct_get); +EXPORT_SYMBOL(ip_conntrack_lockp); + +#endif + /* This define, if set, will randomly drop a packet when congestion * is more than moderate. It helps fairness in the multi-interface diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/ip_conntrack_core.c --- linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-12 17:43:07.049089232 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-12 18:30:24.614713688 +0200 @@ -56,6 +56,21 @@ #define DEBUGP(format, args...) #endif +#ifdef CONFIG_IP_NF_CT_ACCT +extern struct ip_conntrack * +(*ip_ct_get)(struct sk_buff *skb, enum ip_conntrack_info *ctinfo); + + + +#ifdef CONFIG_NETFILTER_DEBUG +extern struct rwlock_debug * ip_conntrack_lockp; +#else +extern rwlock_t * ip_conntrack_lockp; +#endif + +#endif + + DECLARE_RWLOCK(ip_conntrack_lock); DECLARE_RWLOCK(ip_conntrack_expect_tuple_lock); @@ -1373,6 +1388,10 @@ void ip_conntrack_cleanup(void) { ip_ct_attach = NULL; +#ifdef CONFIG_IP_NF_CT_ACCT + ip_ct_get = NULL; +#endif + /* This makes sure all current packets have passed through netfilter framework. Roll on, two-stage module delete... */ @@ -1451,6 +1470,12 @@ /* For use by ipt_REJECT */ ip_ct_attach = ip_conntrack_attach; + +#ifdef CONFIG_IP_NF_CT_ACCT + /* For the core kernel, in net/core/dev.c */ + ip_conntrack_lockp=&ip_conntrack_lock; + ip_ct_get = ip_conntrack_get; +#endif /* Set up fake conntrack: - to never be deleted, not in any hashes */ diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/Kconfig linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/Kconfig --- linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/Kconfig 2004-08-12 17:45:47.330722720 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/Kconfig 2004-08-12 18:30:24.651708064 +0200 @@ -22,6 +22,14 @@ config IP_NF_CT_ACCT bool "Connection tracking flow accounting" depends on IP_NF_CONNTRACK + ---help--- + If you enable this option, the connection tracking code will keep + per-flow packet and byte counters. + + Those counters can be used for flow-based accounting or the + `connbytes' match. + + If unsure, say N. config IP_NF_FTP tristate "FTP protocol support" From sandr8_NOSPAM_@crocetta.org Thu Aug 12 17:52:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 17:52:15 -0700 (PDT) Received: from vsmtp1.tin.it (vsmtp1b.tin.it [212.216.176.141] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D0q3rZ029832 for ; Thu, 12 Aug 2004 17:52:03 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp1.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C680000D15A; Fri, 13 Aug 2004 02:48:13 +0200 Message-ID: <411C0FCE.9060906@crocetta.org> Date: Fri, 13 Aug 2004 02:48:14 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca, kuznet@ms2.inr.ac.ru, davem@redhat.com, devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, laforge@netfilter.org CC: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7707 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev 2) The second patch eliminates the need for the deprecated __parent field and eliminates some tricks such as the rx_class field... to do so it introduces a slight change in the interface of the enqueue() and requeue() operations... the "struct sk_buff * skb" becomes now a "struct sk_buff ** const skb". All the in-2.6.8-kernel packet schedulers and the core/dev.c are updated consequently... changes are quite trivial so there's no issue for out-of-the-kernel-tree schedulers. in order to make it clearer i should give a broader insight... i hate to describe the gory details but it's a bit delicate. a) the socket buffer for a dropped packet is freed as late as possible (lazy lazy lazy!). in other words, locally, a packet is _candidated_ to be dropped, but the latest word is the most global one. who's got the most global viewpoint? Elementary! My Dear Watson! the most external enqueuing operation. Ok... now you get it... the stack is your friend and will discriminate for free :) the pointer to the socket buffer structure always stays at the same location, but is updated by the enqueueing operations. This means that whatever packet "Barabba" is choosen to be dropped internally, it can be further saved by the caller, who can exchange it with an other victim... (i think there's no need to say who) b) the changes in (a) made it possible to remove the deprecated __parent field due to cbq. this is done by handling the reshape operation from the outside (in a very stupid loop cycle), whoever drops whatever. this way we also avoid saving the class in the rx_class field, calling a function that retrieves it and doing complex tricks to cope with the old byval api c) now it's possible to have (almost) a single point (core/dev.c) where packets are dropped. Though there are some other few places, the inline function before_explicit_drop() easies the centralization of the operations. this comes into great help for patch 4. Also, the empty macro IMPLICIT_DROP() behaves as a marker for the reader and the coder, helping maintainance and readability. d) yet the reshape_fail field is kept, and the code that handled it in the leaf disciplines is kept as well (slightly reworked but kept). this just in case some out-of-the-kernel classful schedulers use it: we don't want to break them (for what concerns the in-kernel-schedulers, you can wipe out all the code related to reshape_fail without any harm, it is not any more needed... with regard to it, what about wrapping it in some #ifdef CONFIG_TC_DONT_BREAK_OUT_OF_THE_KERNEL_CLASSFUL_SCHEDULERS ?) NOTA BENE e) it is darn important that if a packet is dropped all the outmost queueing discipline's enqueue()'s return value tells it! NOTA BENE f) kfree_skb() for locally allocated socket buffers are still there and must stay there NOTA BENE g) kfree_skb() whose semantic is to just decrement the user count are not a packet drop. furthermore, the same kfree_skb() could have a different run-time semantic, and is hence splitted in two, as in the following excerpt of code: } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } Alessandro Salvatori -- the _NOSPAM_ account is the one i am subscribed with, please remove _NOSPAM_ for personal replies diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/include/net/pkt_sched.h linux-2.6.8-rc4-apichanged/include/net/pkt_sched.h --- linux-2.6.8-rc4-netxmitcodes/include/net/pkt_sched.h 2004-08-12 13:31:12.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/include/net/pkt_sched.h 2004-08-12 16:01:09.134153672 +0200 @@ -52,10 +52,10 @@ char id[IFNAMSIZ]; int priv_size; - int (*enqueue)(struct sk_buff *, struct Qdisc *); + int (*enqueue)(struct sk_buff ** const, struct Qdisc *); struct sk_buff * (*dequeue)(struct Qdisc *); - int (*requeue)(struct sk_buff *, struct Qdisc *); - unsigned int (*drop)(struct Qdisc *); + int (*requeue)(struct sk_buff ** const, struct Qdisc *); + unsigned int (*drop)(struct Qdisc *, struct sk_buff ** const); int (*init)(struct Qdisc *, struct rtattr *arg); void (*reset)(struct Qdisc *); @@ -71,7 +71,7 @@ struct Qdisc { - int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); + int (*enqueue)(struct sk_buff ** const skb, struct Qdisc *dev); struct sk_buff * (*dequeue)(struct Qdisc *dev); unsigned flags; #define TCQ_F_BUILTIN 1 @@ -88,14 +88,17 @@ struct tc_stats stats; 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; + int (*reshape_fail)(struct sk_buff ** const skb, + struct Qdisc *q); }; +#define IMPLICIT_DROP() do; while (0) /* readability: just to be aware of what you are doing!!! */ + +static inline void before_explicit_drop(const struct sk_buff * skb) +{ + /* for the moment there's nothing to do. see next patch!!! */ +} + #define QDISC_ALIGN 32 #define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/core/dev.c linux-2.6.8-rc4-apichanged/net/core/dev.c --- linux-2.6.8-rc4-netxmitcodes/net/core/dev.c 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/core/dev.c 2004-08-12 17:23:43.682947768 +0200 @@ -1341,13 +1341,18 @@ /* Grab device queue */ spin_lock_bh(&dev->queue_lock); - rc = q->enqueue(skb, q); + rc = q->enqueue(&skb, q); qdisc_run(dev); spin_unlock_bh(&dev->queue_lock); rcu_read_unlock(); rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc; + + if(rc!=NET_XMIT_SUCCESS){ /* unlikely? better dynamically IMHO */ + before_explicit_drop(skb); + goto out_kfree_skb; + } goto out; } rcu_read_unlock(); @@ -1747,7 +1752,7 @@ } spin_lock(&dev->ingress_lock); if ((q = dev->qdisc_ingress) != NULL) - result = q->enqueue(skb, q); + result = q->enqueue(&skb, q); spin_unlock(&dev->ingress_lock); } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_api.c linux-2.6.8-rc4-apichanged/net/sched/sch_api.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_api.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_api.c 2004-08-12 17:00:27.707168344 +0200 @@ -13,6 +13,7 @@ * Rani Assaf :980802: JIFFIES and CPU clock sources are repaired. * Eduardo J. Blanco :990222: kmod support * Jamal Hadi Salim : 990601: ingress support + * sandr8 :040812: api change, deferred drop, __parent workaround */ #include @@ -95,9 +96,9 @@ ---enqueue - enqueue returns 0, if packet was enqueued successfully. + enqueue returns an even number, if packet was enqueued successfully. If packet (this one or another one) was dropped, it returns - not zero error code. + an odd error code. NET_XMIT_DROP - this packet dropped Expected action: do not backoff, but wait until queue will clear. NET_XMIT_CN - probably this packet enqueued, but another one dropped. diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_atm.c linux-2.6.8-rc4-apichanged/net/sched/sch_atm.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_atm.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_atm.c 2004-08-12 16:39:10.000000000 +0200 @@ -398,7 +398,7 @@ /* --------------------------- Qdisc operations ---------------------------- */ -static int atm_tc_enqueue(struct sk_buff *skb,struct Qdisc *sch) +static int atm_tc_enqueue(struct sk_buff ** const skb,struct Qdisc *sch) { struct atm_qdisc_data *p = PRIV(sch); struct atm_flow_data *flow = NULL ; /* @@@ */ @@ -406,13 +406,13 @@ int result; int ret = NET_XMIT_POLICED; - D2PRINTK("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + D2PRINTK("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n",*skb,sch,p); result = TC_POLICE_OK; /* be nice to gcc */ - if (TC_H_MAJ(skb->priority) != sch->handle || - !(flow = (struct atm_flow_data *) atm_tc_get(sch,skb->priority))) + if (TC_H_MAJ((*skb)->priority) != sch->handle || + !(flow = (struct atm_flow_data *) atm_tc_get(sch,(*skb)->priority))) for (flow = p->flows; flow; flow = flow->next) if (flow->filter_list) { - result = tc_classify(skb,flow->filter_list, + result = tc_classify((*skb),flow->filter_list, &res); if (result < 0) continue; flow = (struct atm_flow_data *) res.class; @@ -422,17 +422,17 @@ if (!flow) flow = &p->link; else { if (flow->vcc) - ATM_SKB(skb)->atm_options = flow->vcc->atm_options; + ATM_SKB(*skb)->atm_options = flow->vcc->atm_options; /*@@@ looks good ... but it's not supposed to work :-)*/ #ifdef CONFIG_NET_CLS_POLICE switch (result) { case TC_POLICE_SHOT: - kfree_skb(skb); + IMPLICIT_DROP(); break; case TC_POLICE_RECLASSIFY: if (flow->excess) flow = flow->excess; else { - ATM_SKB(skb)->atm_options |= + ATM_SKB(*skb)->atm_options |= ATM_ATMOPT_CLP; break; } @@ -508,8 +508,11 @@ struct sk_buff *new; new = skb_realloc_headroom(skb,flow->hdr_len); + if(!new) + before_explicit_drop(skb); dev_kfree_skb(skb); - if (!new) continue; + if (!new) + continue; skb = new; } D2PRINTK("sch_atm_dequeue: ip %p, data %p\n", @@ -538,12 +541,12 @@ } -static int atm_tc_requeue(struct sk_buff *skb,struct Qdisc *sch) +static int atm_tc_requeue(struct sk_buff ** const skb,struct Qdisc *sch) { struct atm_qdisc_data *p = PRIV(sch); int ret; - D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + 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 { @@ -554,7 +557,7 @@ } -static unsigned int atm_tc_drop(struct Qdisc *sch) +static unsigned int atm_tc_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct atm_qdisc_data *p = PRIV(sch); struct atm_flow_data *flow; @@ -562,7 +565,7 @@ DPRINTK("atm_tc_drop(sch %p,[qdisc %p])\n",sch,p); for (flow = p->flows; flow; flow = flow->next) - if (flow->q->ops->drop && (len = flow->q->ops->drop(flow->q))) + if (flow->q->ops->drop && (len = flow->q->ops->drop(flow->q, skb))) return len; return 0; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_cbq.c linux-2.6.8-rc4-apichanged/net/sched/sch_cbq.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_cbq.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_cbq.c 2004-08-12 17:03:46.257984032 +0200 @@ -8,6 +8,8 @@ * * Authors: Alexey Kuznetsov, * + * Fixes: + * sandr8 __parent workaround, rx_class removal */ #include @@ -170,9 +172,6 @@ struct cbq_class *active[TC_CBQ_MAXPRIO+1]; /* List of all classes with backlog */ -#ifdef CONFIG_NET_CLS_POLICE - struct cbq_class *rx_class; -#endif struct cbq_class *tx_class; struct cbq_class *tx_borrowed; int tx_len; @@ -239,17 +238,17 @@ */ static struct cbq_class * -cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) +cbq_classify(struct sk_buff ** const skb, struct Qdisc *sch, int *qres) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *head = &q->link; struct cbq_class **defmap; struct cbq_class *cl = NULL; - u32 prio = skb->priority; + u32 prio = (*skb)->priority; struct tcf_result res; /* - * Step 1. If skb->priority points to one of our classes, use it. + * Step 1. If (*skb)->priority points to one of our classes, use it. */ if (TC_H_MAJ(prio^sch->handle) == 0 && (cl = cbq_class_lookup(q, prio)) != NULL) @@ -265,7 +264,7 @@ /* * Step 2+n. Apply classifier. */ - if (!head->filter_list || (result = tc_classify(skb, head->filter_list, &res)) < 0) + if (!head->filter_list || (result = tc_classify(*skb, head->filter_list, &res)) < 0) goto fallback; if ((cl = (void*)res.class) == NULL) { @@ -296,14 +295,18 @@ } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } #else #ifdef CONFIG_NET_CLS_POLICE switch (result) { case TC_POLICE_RECLASSIFY: - return cbq_reclassify(skb, cl); + return cbq_reclassify(*skb, cl); case TC_POLICE_SHOT: return NULL; default: @@ -417,61 +420,61 @@ } static int -cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) +cbq_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { struct cbq_sched_data *q = qdisc_priv(sch); - int len = skb->len; int ret = NET_XMIT_SUCCESS; struct cbq_class *cl = cbq_classify(skb, sch,&ret); -#ifdef CONFIG_NET_CLS_POLICE - q->rx_class = cl; -#endif - if (cl) { -#ifdef CONFIG_NET_CLS_POLICE - cl->q->__parent = sch; -#endif - if ((ret = cl->q->enqueue(skb, cl->q)) == NET_XMIT_SUCCESS) { + while (cl) { + cbq_mark_toplevel(q, cl); + if ( no_dropped(ret = cl->q->enqueue(skb, cl->q)) ) { sch->q.qlen++; sch->stats.packets++; - sch->stats.bytes+=len; - cbq_mark_toplevel(q, cl); + sch->stats.bytes+=(*skb)->len; if (!cl->next_alive) cbq_activate_class(cl); return ret; +#ifdef CONFIG_NET_CLS_POLICE + } else { + /* we renqueue the the (latest) dropped packet */ + cl->stats.drops++; + + if(cl->police != TC_POLICE_RECLASSIFY) + break; + /* just one line follows. this is instead of the + * old reshape_fail, without the need of the + * tricks with rx_class and __parent */ + cl=cbq_reclassify(*skb, cl); +#endif } } #ifndef CONFIG_NET_CLS_ACT sch->stats.drops++; if (cl == NULL) - kfree_skb(skb); + IMPLICIT_DROP(); else { cbq_mark_toplevel(q, cl); cl->stats.drops++; } #else - if ( NET_XMIT_DROP == ret) { + if ( any_dropped(ret) ) { sch->stats.drops++; } - - if (cl != NULL) { - cbq_mark_toplevel(q, cl); - cl->stats.drops++; - } #endif return ret; } static int -cbq_requeue(struct sk_buff *skb, struct Qdisc *sch) +cbq_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int ret; if ((cl = q->tx_class) == NULL) { - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_CN; } @@ -479,10 +482,6 @@ cbq_mark_toplevel(q, cl); -#ifdef CONFIG_NET_CLS_POLICE - q->rx_class = cl; - cl->q->__parent = sch; -#endif if ((ret = cl->q->ops->requeue(skb, cl->q)) == 0) { sch->q.qlen++; if (!cl->next_alive) @@ -625,9 +624,13 @@ static void cbq_ovl_drop(struct cbq_class *cl) { + struct sk_buff * skb; + if (cl->q->ops->drop) - if (cl->q->ops->drop(cl->q)) + if (cl->q->ops->drop(cl->q, &skb)){ + before_explicit_drop(skb); cl->qdisc->q.qlen--; + } cl->xstats.overactions++; cbq_ovl_classic(cl); } @@ -708,42 +711,6 @@ netif_schedule(sch->dev); } - -#ifdef CONFIG_NET_CLS_POLICE - -static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child) -{ - int len = skb->len; - struct Qdisc *sch = child->__parent; - struct cbq_sched_data *q = qdisc_priv(sch); - struct cbq_class *cl = q->rx_class; - - q->rx_class = NULL; - - if (cl && (cl = cbq_reclassify(skb, cl)) != NULL) { - - cbq_mark_toplevel(q, cl); - - q->rx_class = cl; - cl->q->__parent = sch; - - if (cl->q->enqueue(skb, cl->q) == 0) { - sch->q.qlen++; - sch->stats.packets++; - sch->stats.bytes+=len; - if (!cl->next_alive) - cbq_activate_class(cl); - return 0; - } - sch->stats.drops++; - return 0; - } - - sch->stats.drops++; - return -1; -} -#endif - /* It is mission critical procedure. @@ -1268,7 +1235,7 @@ } } -static unsigned int cbq_drop(struct Qdisc* sch) +static unsigned int cbq_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl, *cl_head; @@ -1281,7 +1248,7 @@ cl = cl_head; do { - if (cl->q->ops->drop && (len = cl->q->ops->drop(cl->q))) { + if (cl->q->ops->drop && (len = cl->q->ops->drop(cl->q, skb))) { sch->q.qlen--; return len; } @@ -1413,13 +1380,7 @@ static int cbq_set_police(struct cbq_class *cl, struct tc_cbq_police *p) { cl->police = p->police; - - if (cl->q->handle) { - if (p->police == TC_POLICE_RECLASSIFY) - cl->q->reshape_fail = cbq_reshape_fail; - else - cl->q->reshape_fail = NULL; - } +printk("police set to: %d", cl->police); return 0; } #endif @@ -1698,11 +1659,6 @@ if (new == NULL) { if ((new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops)) == NULL) return -ENOBUFS; - } else { -#ifdef CONFIG_NET_CLS_POLICE - if (cl->police == TC_POLICE_RECLASSIFY) - new->reshape_fail = cbq_reshape_fail; -#endif } sch_tree_lock(sch); *old = cl->q; @@ -1764,9 +1720,6 @@ struct cbq_class *cl; unsigned h; -#ifdef CONFIG_NET_CLS_POLICE - q->rx_class = NULL; -#endif for (h = 0; h < 16; h++) { for (cl = q->classes[h]; cl; cl = cl->next) cbq_destroy_filters(cl); @@ -1790,15 +1743,6 @@ struct cbq_class *cl = (struct cbq_class*)arg; if (--cl->refcnt == 0) { -#ifdef CONFIG_NET_CLS_POLICE - struct cbq_sched_data *q = qdisc_priv(sch); - - spin_lock_bh(&sch->dev->queue_lock); - if (q->rx_class == cl) - q->rx_class = NULL; - spin_unlock_bh(&sch->dev->queue_lock); -#endif - cbq_destroy_class(cl); } } @@ -2021,10 +1965,6 @@ q->tx_class = NULL; q->tx_borrowed = NULL; } -#ifdef CONFIG_NET_CLS_POLICE - if (q->rx_class == cl) - q->rx_class = NULL; -#endif cbq_unlink_class(cl); cbq_adjust_levels(cl->tparent); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_dsmark.c linux-2.6.8-rc4-apichanged/net/sched/sch_dsmark.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_dsmark.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_dsmark.c 2004-08-12 16:39:11.000000000 +0200 @@ -186,38 +186,38 @@ /* --------------------------- Qdisc operations ---------------------------- */ -static int dsmark_enqueue(struct sk_buff *skb,struct Qdisc *sch) +static int dsmark_enqueue(struct sk_buff ** const skb,struct Qdisc *sch) { struct dsmark_qdisc_data *p = PRIV(sch); struct tcf_result res; int result; int ret = NET_XMIT_POLICED; - D2PRINTK("dsmark_enqueue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + D2PRINTK("dsmark_enqueue(skb %p,sch %p,[qdisc %p])\n",*skb,sch,p); if (p->set_tc_index) { /* FIXME: Safe with non-linear skbs? --RR */ - switch (skb->protocol) { + switch ((*skb)->protocol) { case __constant_htons(ETH_P_IP): - skb->tc_index = ipv4_get_dsfield(skb->nh.iph); + (*skb)->tc_index = ipv4_get_dsfield((*skb)->nh.iph); break; case __constant_htons(ETH_P_IPV6): - skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h); + (*skb)->tc_index = ipv6_get_dsfield((*skb)->nh.ipv6h); break; default: - skb->tc_index = 0; + (*skb)->tc_index = 0; break; }; } result = TC_POLICE_OK; /* be nice to gcc */ - if (TC_H_MAJ(skb->priority) == sch->handle) { - skb->tc_index = TC_H_MIN(skb->priority); + if (TC_H_MAJ((*skb)->priority) == sch->handle) { + (*skb)->tc_index = TC_H_MIN((*skb)->priority); } else { - result = tc_classify(skb,p->filter_list,&res); + result = tc_classify(*skb,p->filter_list,&res); D2PRINTK("result %d class 0x%04x\n",result,res.classid); switch (result) { #ifdef CONFIG_NET_CLS_POLICE case TC_POLICE_SHOT: - kfree_skb(skb); + IMPLICIT_DROP(); /* this whole ifdef will never be coded! */ break; #if 0 case TC_POLICE_RECLASSIFY: @@ -225,13 +225,13 @@ #endif #endif case TC_POLICE_OK: - skb->tc_index = TC_H_MIN(res.classid); + (*skb)->tc_index = TC_H_MIN(res.classid); break; case TC_POLICE_UNSPEC: /* fall through */ default: if (p->default_index != NO_DEFAULT_INDEX) - skb->tc_index = p->default_index; + (*skb)->tc_index = p->default_index; break; }; } @@ -240,11 +240,11 @@ result == TC_POLICE_SHOT || #endif - ((ret = p->q->enqueue(skb,p->q)) != 0)) { + (0x1 & (ret = p->q->enqueue(skb,p->q))) ) { sch->stats.drops++; return ret; } - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; sch->q.qlen++; return ret; @@ -289,12 +289,12 @@ } -static int dsmark_requeue(struct sk_buff *skb,struct Qdisc *sch) +static int dsmark_requeue(struct sk_buff ** const skb,struct Qdisc *sch) { int ret; struct dsmark_qdisc_data *p = PRIV(sch); - D2PRINTK("dsmark_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + 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++; return 0; @@ -304,7 +304,7 @@ } -static unsigned int dsmark_drop(struct Qdisc *sch) +static unsigned int dsmark_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct dsmark_qdisc_data *p = PRIV(sch); unsigned int len; @@ -312,7 +312,7 @@ DPRINTK("dsmark_reset(sch %p,[qdisc %p])\n",sch,p); if (!p->q->ops->drop) return 0; - if (!(len = p->q->ops->drop(p->q))) + if (!(len = p->q->ops->drop(p->q, skb))) return 0; sch->q.qlen--; return len; diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_fifo.c linux-2.6.8-rc4-apichanged/net/sched/sch_fifo.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_fifo.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_fifo.c 2004-08-12 16:39:11.000000000 +0200 @@ -43,30 +43,34 @@ }; static int -bfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) +bfifo_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct fifo_sched_data *q = qdisc_priv(sch); - if (sch->stats.backlog + skb->len <= q->limit) { - __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; + if (sch->stats.backlog + (*skb)->len <= q->limit) { + __skb_queue_tail(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } sch->stats.drops++; #ifdef CONFIG_NET_CLS_POLICE - if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) + if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)){ +#endif + IMPLICIT_DROP(); + return NET_XMIT_DROP; +#ifdef CONFIG_NET_CLS_POLICE + } + return NET_XMIT_RESHAPED; #endif - kfree_skb(skb); - return NET_XMIT_DROP; } static int -bfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) +bfifo_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { - __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + __skb_queue_head(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; return 0; } @@ -82,15 +86,13 @@ } static unsigned int -fifo_drop(struct Qdisc* sch) +fifo_drop(struct Qdisc* sch, struct sk_buff ** const skb) { - struct sk_buff *skb; - - skb = __skb_dequeue_tail(&sch->q); - if (skb) { - unsigned int len = skb->len; + *skb = __skb_dequeue_tail(&sch->q); + if (*skb) { + unsigned int len = (*skb)->len; sch->stats.backlog -= len; - kfree_skb(skb); + IMPLICIT_DROP(); return len; } return 0; @@ -104,28 +106,33 @@ } static int -pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) +pfifo_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct fifo_sched_data *q = qdisc_priv(sch); if (sch->q.qlen < q->limit) { - __skb_queue_tail(&sch->q, skb); - sch->stats.bytes += skb->len; + __skb_queue_tail(&sch->q, *skb); + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } sch->stats.drops++; + +#ifdef CONFIG_NET_CLS_POLICE + if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)){ +#endif + IMPLICIT_DROP(); + return NET_XMIT_DROP; #ifdef CONFIG_NET_CLS_POLICE - if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) + } + return NET_XMIT_RESHAPED; #endif - kfree_skb(skb); - return NET_XMIT_DROP; } static int -pfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) +pfifo_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { - __skb_queue_head(&sch->q, skb); + __skb_queue_head(&sch->q, *skb); return 0; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_generic.c linux-2.6.8-rc4-apichanged/net/sched/sch_generic.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_generic.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_generic.c 2004-08-12 16:39:11.000000000 +0200 @@ -131,6 +131,7 @@ packet when deadloop is detected. */ if (dev->xmit_lock_owner == smp_processor_id()) { + before_explicit_drop(skb); kfree_skb(skb); if (net_ratelimit()) printk(KERN_DEBUG "Dead loop on netdevice %s, fix it urgently!\n", dev->name); @@ -149,7 +150,7 @@ 3. device is buggy (ppp) */ - q->ops->requeue(skb, q); + q->ops->requeue(&skb, q); netif_schedule(dev); return 1; } @@ -217,9 +218,9 @@ */ static int -noop_enqueue(struct sk_buff *skb, struct Qdisc * qdisc) +noop_enqueue(struct sk_buff ** const skb, struct Qdisc * qdisc) { - kfree_skb(skb); + IMPLICIT_DROP(); return NET_XMIT_CN; } @@ -230,11 +231,11 @@ } static int -noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc) +noop_requeue(struct sk_buff ** const skb, struct Qdisc* qdisc) { if (net_ratelimit()) - printk(KERN_DEBUG "%s deferred output. It is buggy.\n", skb->dev->name); - kfree_skb(skb); + printk(KERN_DEBUG "%s deferred output. It is buggy.\n", (*skb)->dev->name); + IMPLICIT_DROP(); return NET_XMIT_CN; } @@ -283,21 +284,21 @@ */ static int -pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) +pfifo_fast_enqueue(struct sk_buff ** const skb, struct Qdisc* qdisc) { struct sk_buff_head *list = qdisc_priv(qdisc); - list += prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[(*skb)->priority&TC_PRIO_MAX]; if (list->qlen < qdisc->dev->tx_queue_len) { - __skb_queue_tail(list, skb); + __skb_queue_tail(list, (*skb)); qdisc->q.qlen++; - qdisc->stats.bytes += skb->len; + qdisc->stats.bytes += (*skb)->len; qdisc->stats.packets++; return 0; } qdisc->stats.drops++; - kfree_skb(skb); + IMPLICIT_DROP(); return NET_XMIT_DROP; } @@ -319,13 +320,13 @@ } static int -pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc) +pfifo_fast_requeue(struct sk_buff ** const skb, struct Qdisc* qdisc) { struct sk_buff_head *list = qdisc_priv(qdisc); - list += prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[(*skb)->priority&TC_PRIO_MAX]; - __skb_queue_head(list, skb); + __skb_queue_head(list, *skb); qdisc->q.qlen++; return 0; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_gred.c linux-2.6.8-rc4-apichanged/net/sched/sch_gred.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_gred.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_gred.c 2004-08-12 16:39:11.000000000 +0200 @@ -102,7 +102,7 @@ }; static int -gred_enqueue(struct sk_buff *skb, struct Qdisc* sch) +gred_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { psched_time_t now; struct gred_sched_data *q=NULL; @@ -116,7 +116,7 @@ } - if ( ((skb->tc_index&0xf) > (t->DPs -1)) || !(q=t->tab[skb->tc_index&0xf])) { + if ( (((*skb)->tc_index&0xf) > (t->DPs -1)) || !(q=t->tab[(*skb)->tc_index&0xf])) { printk("GRED: setting to default (%d)\n ",t->def); if (!(q=t->tab[t->def])) { DPRINTK("GRED: setting to default FAILED! dropping!! " @@ -125,11 +125,11 @@ } /* fix tc_index? --could be controvesial but needed for requeueing */ - skb->tc_index=(skb->tc_index&0xfffffff0) | t->def; + (*skb)->tc_index=((*skb)->tc_index&0xfffffff0) | t->def; } D2PRINTK("gred_enqueue virtualQ 0x%x classid %x backlog %d " - "general backlog %d\n",skb->tc_index&0xf,sch->handle,q->backlog, + "general backlog %d\n",(*skb)->tc_index&0xf,sch->handle,q->backlog, sch->stats.backlog); /* sum up all the qaves of prios <= to ours to get the new qave*/ if (!t->eqp && t->grio) { @@ -144,7 +144,7 @@ } q->packetsin++; - q->bytesin+=skb->len; + q->bytesin+=(*skb)->len; if (t->eqp && t->grio) { qave=0; @@ -175,12 +175,12 @@ if ((q->qave+qave) < q->qth_min) { q->qcount = -1; enqueue: - if (q->backlog + skb->len <= q->limit) { - q->backlog += skb->len; + if (q->backlog + (*skb)->len <= q->limit) { + q->backlog += (*skb)->len; do_enqueue: - __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; + __skb_queue_tail(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } else { @@ -188,7 +188,7 @@ } drop: - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } @@ -212,17 +212,17 @@ } static int -gred_requeue(struct sk_buff *skb, struct Qdisc* sch) +gred_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct gred_sched_data *q; struct gred_sched *t= qdisc_priv(sch); - q= t->tab[(skb->tc_index&0xf)]; + q= t->tab[((*skb)->tc_index&0xf)]; /* error checking here -- probably unnecessary */ PSCHED_SET_PASTPERFECT(q->qidlestart); - __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; - q->backlog += skb->len; + __skb_queue_head(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + q->backlog += (*skb)->len; return 0; } @@ -259,29 +259,27 @@ return NULL; } -static unsigned int gred_drop(struct Qdisc* sch) +static unsigned int gred_drop(struct Qdisc* sch, struct sk_buff ** const skb) { - struct sk_buff *skb; - struct gred_sched_data *q; struct gred_sched *t= qdisc_priv(sch); - skb = __skb_dequeue_tail(&sch->q); - if (skb) { - unsigned int len = skb->len; + *skb = __skb_dequeue_tail(&sch->q); + if (*skb) { + unsigned int len = (*skb)->len; sch->stats.backlog -= len; sch->stats.drops++; - q= t->tab[(skb->tc_index&0xf)]; + q= t->tab[((*skb)->tc_index&0xf)]; if (q) { q->backlog -= len; q->other++; if (!q->backlog && !t->eqp) PSCHED_GET_TIME(q->qidlestart); } else { - D2PRINTK("gred_dequeue: skb has bad tcindex %x\n",skb->tc_index&0xf); + D2PRINTK("gred_dequeue: skb has bad tcindex %x\n",(*skb)->tc_index&0xf); } - kfree_skb(skb); + IMPLICIT_DROP(); return len; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_hfsc.c linux-2.6.8-rc4-apichanged/net/sched/sch_hfsc.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_hfsc.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_hfsc.c 2004-08-12 16:39:11.000000000 +0200 @@ -967,7 +967,8 @@ return 0; } len = skb->len; - if (unlikely(sch->ops->requeue(skb, sch) != NET_XMIT_SUCCESS)) { + if (unlikely(sch->ops->requeue(&skb, sch) != NET_XMIT_SUCCESS)) { + before_explicit_drop(skb); if (net_ratelimit()) printk("qdisc_peek_len: failed to requeue\n"); return 0; @@ -1238,7 +1239,7 @@ } static struct hfsc_class * -hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) +hfsc_classify(struct sk_buff ** const skb, struct Qdisc *sch, int *qres) { struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; @@ -1246,13 +1247,13 @@ struct tcf_proto *tcf; int result; - if (TC_H_MAJ(skb->priority ^ sch->handle) == 0 && - (cl = hfsc_find_class(skb->priority, sch)) != NULL) + if (TC_H_MAJ((*skb)->priority ^ sch->handle) == 0 && + (cl = hfsc_find_class((*skb)->priority, sch)) != NULL) if (cl->level == 0) return cl; tcf = q->root.filter_list; - while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { + while (tcf && (result = tc_classify(*skb, tcf, &res)) >= 0) { #ifdef CONFIG_NET_CLS_ACT int terminal = 0; switch (result) { @@ -1272,7 +1273,11 @@ } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } #else @@ -1685,11 +1690,11 @@ } static int -hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch) +hfsc_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; struct hfsc_class *cl = hfsc_classify(skb, sch, &ret); - unsigned int len = skb->len; + unsigned int len = (*skb)->len; int err; @@ -1702,14 +1707,14 @@ } #else if (cl == NULL) { - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } #endif err = cl->qdisc->enqueue(skb, cl->qdisc); - if (unlikely(err != NET_XMIT_SUCCESS)) { + if (unlikely(any_dropped(err))) { cl->stats.drops++; sch->stats.drops++; return err; @@ -1797,17 +1802,17 @@ } static int -hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch) +hfsc_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct hfsc_sched *q = qdisc_priv(sch); - __skb_queue_head(&q->requeue, skb); + __skb_queue_head(&q->requeue, *skb); sch->q.qlen++; return NET_XMIT_SUCCESS; } static unsigned int -hfsc_drop(struct Qdisc *sch) +hfsc_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; @@ -1815,7 +1820,7 @@ list_for_each_entry(cl, &q->droplist, dlist) { if (cl->qdisc->ops->drop != NULL && - (len = cl->qdisc->ops->drop(cl->qdisc)) > 0) { + (len = cl->qdisc->ops->drop(cl->qdisc, skb)) > 0) { if (cl->qdisc->q.qlen == 0) { update_vf(cl, 0, 0); set_passive(cl); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_htb.c linux-2.6.8-rc4-apichanged/net/sched/sch_htb.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_htb.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_htb.c 2004-08-12 16:39:11.000000000 +0200 @@ -298,7 +298,7 @@ return (cl && cl != HTB_DIRECT) ? cl->classid : TC_H_UNSPEC; } -static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) +static struct htb_class *htb_classify(struct sk_buff ** const skb, struct Qdisc *sch, int *qres) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; @@ -306,16 +306,16 @@ struct tcf_proto *tcf; int result; - /* allow to select class by setting skb->priority to valid classid; + /* allow to select class by setting *skb->priority to valid classid; note that nfmark can be used too by attaching filter fw with no rules in it */ - if (skb->priority == sch->handle) + if ((*skb)->priority == sch->handle) return HTB_DIRECT; /* X:0 (direct flow) selected */ - if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) + if ((cl = htb_find((*skb)->priority,sch)) != NULL && cl->level == 0) return cl; tcf = q->filter_list; - while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { + while (tcf && (result = tc_classify(*skb, tcf, &res)) >= 0) { #ifdef CONFIG_NET_CLS_ACT int terminal = 0; switch (result) { @@ -335,7 +335,11 @@ } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } #else @@ -709,7 +713,7 @@ list_del_init(&cl->un.leaf.drop_list); } -static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static int htb_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; struct htb_sched *q = qdisc_priv(sch); @@ -719,7 +723,7 @@ #ifdef CONFIG_NET_CLS_ACT if (cl == HTB_DIRECT ) { if (q->direct_queue.qlen < q->direct_qlen ) { - __skb_queue_tail(&q->direct_queue, skb); + __skb_queue_tail(&q->direct_queue, *skb); q->direct_pkts++; } } else if (!cl) { @@ -732,10 +736,10 @@ if (cl == HTB_DIRECT || !cl) { /* enqueue to helper queue */ if (q->direct_queue.qlen < q->direct_qlen && cl) { - __skb_queue_tail(&q->direct_queue, skb); + __skb_queue_tail(&q->direct_queue, *skb); q->direct_pkts++; } else { - kfree_skb (skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } @@ -746,32 +750,31 @@ cl->stats.drops++; return NET_XMIT_DROP; } else { - cl->stats.packets++; cl->stats.bytes += skb->len; + cl->stats.packets++; cl->stats.bytes += (*skb)->len; htb_activate (q,cl); } sch->q.qlen++; - sch->stats.packets++; sch->stats.bytes += skb->len; - HTB_DBG(1,1,"htb_enq_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); + sch->stats.packets++; sch->stats.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; } /* TODO: requeuing packet charges it to policers again !! */ -static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) +static int htb_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct htb_sched *q = qdisc_priv(sch); int ret = NET_XMIT_SUCCESS; struct htb_class *cl = htb_classify(skb,sch, &ret); - struct sk_buff *tskb; if (cl == HTB_DIRECT || !cl) { /* enqueue to helper queue */ if (q->direct_queue.qlen < q->direct_qlen && cl) { - __skb_queue_head(&q->direct_queue, skb); + __skb_queue_head(&q->direct_queue, *skb); } else { - __skb_queue_head(&q->direct_queue, skb); - tskb = __skb_dequeue_tail(&q->direct_queue); - kfree_skb (tskb); + __skb_queue_head(&q->direct_queue, *skb); + *skb = __skb_dequeue_tail(&q->direct_queue); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_CN; } @@ -783,7 +786,7 @@ htb_activate (q,cl); sch->q.qlen++; - HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); + HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,*skb); return NET_XMIT_SUCCESS; } @@ -1145,7 +1148,7 @@ } /* try to drop from each class (by prio) until one succeed */ -static unsigned int htb_drop(struct Qdisc* sch) +static unsigned int htb_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct htb_sched *q = qdisc_priv(sch); int prio; @@ -1157,7 +1160,7 @@ un.leaf.drop_list); unsigned int len; if (cl->un.leaf.q->ops->drop && - (len = cl->un.leaf.q->ops->drop(cl->un.leaf.q))) { + (len = cl->un.leaf.q->ops->drop(cl->un.leaf.q, skb))) { sch->q.qlen--; if (!cl->un.leaf.q->q.qlen) htb_deactivate (q,cl); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_ingress.c linux-2.6.8-rc4-apichanged/net/sched/sch_ingress.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_ingress.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_ingress.c 2004-08-12 16:39:11.000000000 +0200 @@ -137,14 +137,14 @@ /* --------------------------- Qdisc operations ---------------------------- */ -static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch) +static int ingress_enqueue(struct sk_buff ** const skb,struct Qdisc *sch) { struct ingress_qdisc_data *p = PRIV(sch); struct tcf_result res; int result; - D2PRINTK("ingress_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p); - result = tc_classify(skb, p->filter_list, &res); + D2PRINTK("ingress_enqueue(skb %p,sch %p,[qdisc %p])\n", *skb, sch, p); + result = tc_classify(*skb, p->filter_list, &res); D2PRINTK("result %d class 0x%04x\n", result, res.classid); /* * Unlike normal "enqueue" functions, ingress_enqueue returns a @@ -152,7 +152,7 @@ */ #ifdef CONFIG_NET_CLS_ACT sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; switch (result) { case TC_ACT_SHOT: result = TC_ACT_SHOT; @@ -166,7 +166,7 @@ case TC_ACT_OK: case TC_ACT_UNSPEC: default: - skb->tc_index = TC_H_MIN(res.classid); + (*skb)->tc_index = TC_H_MIN(res.classid); result = TC_ACT_OK; break; }; @@ -183,7 +183,7 @@ case TC_POLICE_UNSPEC: default: sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; result = NF_ACCEPT; break; }; @@ -192,7 +192,7 @@ D2PRINTK("Overriding result to ACCEPT\n"); result = NF_ACCEPT; sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; #endif #endif @@ -210,21 +210,24 @@ } -static int ingress_requeue(struct sk_buff *skb,struct Qdisc *sch) +static int ingress_requeue(struct sk_buff ** const skb,struct Qdisc *sch) { /* struct ingress_qdisc_data *p = PRIV(sch); - D2PRINTK("ingress_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,PRIV(p)); + D2PRINTK("ingress_requeue(skb %p,sch %p,[qdisc %p])\n",*skb,sch,PRIV(p)); */ return 0; } -static unsigned int ingress_drop(struct Qdisc *sch) +static unsigned int ingress_drop(struct Qdisc *sch, struct sk_buff ** const skb) { #ifdef DEBUG_INGRESS struct ingress_qdisc_data *p = PRIV(sch); #endif DPRINTK("ingress_drop(sch %p,[qdisc %p])\n", sch, p); + + *skb=NULL; // if somebody tries to free me... :> + return 0; } @@ -254,8 +257,12 @@ if (dev->qdisc_ingress) { spin_lock(&dev->queue_lock); - if ((q = dev->qdisc_ingress) != NULL) - fwres = q->enqueue(skb, q); + if ((q = dev->qdisc_ingress) != NULL){ + fwres = q->enqueue(pskb, q); + if(any_dropped(fwres)){ + before_explicit_drop(*pskb); + } + } spin_unlock(&dev->queue_lock); } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_netem.c linux-2.6.8-rc4-apichanged/net/sched/sch_netem.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_netem.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_netem.c 2004-08-12 16:39:11.000000000 +0200 @@ -601,14 +601,14 @@ /* Enqueue packets with underlying discipline (fifo) * but mark them with current time first. */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static int netem_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { struct netem_sched_data *q = qdisc_priv(sch); - struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; + struct netem_skb_cb *cb = (struct netem_skb_cb *)(*skb)->cb; psched_time_t now; long delay; - pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); + pr_debug("netem_enqueue skb=%p @%lu\n", *skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ if (q->loss && q->loss >= net_random()) { @@ -644,20 +644,20 @@ /* Always queue at tail to keep packets in order */ if (likely(q->delayed.qlen < q->limit)) { - __skb_queue_tail(&q->delayed, skb); + __skb_queue_tail(&q->delayed, *skb); sch->q.qlen++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } sch->stats.drops++; - kfree_skb(skb); + IMPLICIT_DROP(); return NET_XMIT_DROP; } /* Requeue packets but don't change time stamp */ -static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) +static int netem_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct netem_sched_data *q = qdisc_priv(sch); int ret; @@ -668,12 +668,12 @@ return ret; } -static unsigned int netem_drop(struct Qdisc* sch) +static unsigned int netem_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct netem_sched_data *q = qdisc_priv(sch); unsigned int len; - if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { + if ((len = q->qdisc->ops->drop(q->qdisc, skb)) != 0) { sch->q.qlen--; sch->stats.drops++; } @@ -706,7 +706,7 @@ } __skb_unlink(skb, &q->delayed); - if (q->qdisc->enqueue(skb, q->qdisc)) + if (q->qdisc->enqueue(&skb, q->qdisc)) sch->stats.drops++; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_prio.c linux-2.6.8-rc4-apichanged/net/sched/sch_prio.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_prio.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_prio.c 2004-08-12 16:41:53.936487224 +0200 @@ -47,16 +47,16 @@ }; -struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r) +struct Qdisc *prio_classify(struct sk_buff ** const skb, struct Qdisc *sch,int *r) { struct prio_sched_data *q = qdisc_priv(sch); - u32 band = skb->priority; + u32 band = (*skb)->priority; struct tcf_result res; - if (TC_H_MAJ(skb->priority) != sch->handle) { + if (TC_H_MAJ((*skb)->priority) != sch->handle) { #ifdef CONFIG_NET_CLS_ACT int result = 0, terminal = 0; - result = tc_classify(skb, q->filter_list, &res); + result = tc_classify(*skb, q->filter_list, &res); switch (result) { case TC_ACT_SHOT: @@ -74,13 +74,17 @@ break; }; if (terminal) { - kfree_skb(skb); + if( any_dropped(*r) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; - } + } if (!q->filter_list ) { #else - if (!q->filter_list || tc_classify(skb, q->filter_list, &res)) { + if (!q->filter_list || tc_classify(*skb, q->filter_list, &res)) { #endif if (TC_H_MAJ(band)) band = 0; @@ -96,7 +100,7 @@ } static int -prio_enqueue(struct sk_buff *skb, struct Qdisc* sch) +prio_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct Qdisc *qdisc; int ret = NET_XMIT_SUCCESS; @@ -107,7 +111,7 @@ goto dropped; if ((ret = qdisc->enqueue(skb, qdisc)) == NET_XMIT_SUCCESS) { - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; sch->q.qlen++; return NET_XMIT_SUCCESS; @@ -128,7 +132,7 @@ static int -prio_requeue(struct sk_buff *skb, struct Qdisc* sch) +prio_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct Qdisc *qdisc; int ret = NET_XMIT_DROP; @@ -167,7 +171,7 @@ } -static unsigned int prio_drop(struct Qdisc* sch) +static unsigned int prio_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct prio_sched_data *q = qdisc_priv(sch); int prio; @@ -176,7 +180,7 @@ for (prio = q->bands-1; prio >= 0; prio--) { qdisc = q->queues[prio]; - if ((len = qdisc->ops->drop(qdisc)) != 0) { + if ((len = qdisc->ops->drop(qdisc, skb)) != 0) { sch->q.qlen--; return len; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_red.c linux-2.6.8-rc4-apichanged/net/sched/sch_red.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_red.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_red.c 2004-08-12 16:39:11.000000000 +0200 @@ -178,7 +178,7 @@ } static int -red_enqueue(struct sk_buff *skb, struct Qdisc* sch) +red_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct red_sched_data *q = qdisc_priv(sch); @@ -242,16 +242,16 @@ if (q->qave < q->qth_min) { q->qcount = -1; enqueue: - if (sch->stats.backlog + skb->len <= q->limit) { - __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; + if (sch->stats.backlog + (*skb)->len <= q->limit) { + __skb_queue_tail(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return NET_XMIT_SUCCESS; } else { q->st.pdrop++; } - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } @@ -259,7 +259,7 @@ q->qcount = -1; sch->stats.overlimits++; mark: - if (!(q->flags&TC_RED_ECN) || !red_ecn_mark(skb)) { + if (!(q->flags&TC_RED_ECN) || !red_ecn_mark(*skb)) { q->st.early++; goto drop; } @@ -295,20 +295,20 @@ goto enqueue; drop: - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_CN; } static int -red_requeue(struct sk_buff *skb, struct Qdisc* sch) +red_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct red_sched_data *q = qdisc_priv(sch); PSCHED_SET_PASTPERFECT(q->qidlestart); - __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + __skb_queue_head(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; return 0; } @@ -327,18 +327,17 @@ return NULL; } -static unsigned int red_drop(struct Qdisc* sch) +static unsigned int red_drop(struct Qdisc* sch, struct sk_buff ** const skb) { - struct sk_buff *skb; struct red_sched_data *q = qdisc_priv(sch); - skb = __skb_dequeue_tail(&sch->q); - if (skb) { - unsigned int len = skb->len; + *skb = __skb_dequeue_tail(&sch->q); + if (*skb) { + unsigned int len = (*skb)->len; sch->stats.backlog -= len; sch->stats.drops++; q->st.other++; - kfree_skb(skb); + IMPLICIT_DROP(); return len; } PSCHED_GET_TIME(q->qidlestart); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_sfq.c linux-2.6.8-rc4-apichanged/net/sched/sch_sfq.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_sfq.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_sfq.c 2004-08-12 16:39:11.000000000 +0200 @@ -209,11 +209,10 @@ sfq_link(q, x); } -static unsigned int sfq_drop(struct Qdisc *sch) +static unsigned int sfq_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct sfq_sched_data *q = qdisc_priv(sch); sfq_index d = q->max_depth; - struct sk_buff *skb; unsigned int len; /* Queue is full! Find the longest slot and @@ -221,10 +220,10 @@ if (d > 1) { sfq_index x = q->dep[d+SFQ_DEPTH].next; - skb = q->qs[x].prev; - len = skb->len; - __skb_unlink(skb, &q->qs[x]); - kfree_skb(skb); + *skb = q->qs[x].prev; + len = (*skb)->len; + __skb_unlink(*skb, &q->qs[x]); + IMPLICIT_DROP(); sfq_dec(q, x); sch->q.qlen--; sch->stats.drops++; @@ -236,10 +235,10 @@ d = q->next[q->tail]; q->next[q->tail] = q->next[d]; q->allot[q->next[d]] += q->quantum; - skb = q->qs[d].prev; - len = skb->len; - __skb_unlink(skb, &q->qs[d]); - kfree_skb(skb); + *skb = q->qs[d].prev; + len = (*skb)->len; + __skb_unlink(*skb, &q->qs[d]); + IMPLICIT_DROP(); sfq_dec(q, d); sch->q.qlen--; q->ht[q->hash[d]] = SFQ_DEPTH; @@ -251,10 +250,10 @@ } static int -sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch) +sfq_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct sfq_sched_data *q = qdisc_priv(sch); - unsigned hash = sfq_hash(q, skb); + unsigned hash = sfq_hash(q, *skb); sfq_index x; x = q->ht[hash]; @@ -262,7 +261,7 @@ q->ht[hash] = x = q->dep[SFQ_DEPTH].next; q->hash[x] = hash; } - __skb_queue_tail(&q->qs[x], skb); + __skb_queue_tail(&q->qs[x], *skb); sfq_inc(q, x); if (q->qs[x].qlen == 1) { /* The flow is new */ if (q->tail == SFQ_DEPTH) { /* It is the first flow */ @@ -276,20 +275,20 @@ } } if (++sch->q.qlen < q->limit-1) { - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } - sfq_drop(sch); + sfq_drop(sch, skb); return NET_XMIT_CN; } static int -sfq_requeue(struct sk_buff *skb, struct Qdisc* sch) +sfq_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct sfq_sched_data *q = qdisc_priv(sch); - unsigned hash = sfq_hash(q, skb); + unsigned hash = sfq_hash(q, *skb); sfq_index x; x = q->ht[hash]; @@ -297,7 +296,7 @@ q->ht[hash] = x = q->dep[SFQ_DEPTH].next; q->hash[x] = hash; } - __skb_queue_head(&q->qs[x], skb); + __skb_queue_head(&q->qs[x], *skb); sfq_inc(q, x); if (q->qs[x].qlen == 1) { /* The flow is new */ if (q->tail == SFQ_DEPTH) { /* It is the first flow */ @@ -314,7 +313,7 @@ return 0; sch->stats.drops++; - sfq_drop(sch); + sfq_drop(sch, skb); return NET_XMIT_CN; } @@ -362,8 +361,10 @@ { struct sk_buff *skb; - while ((skb = sfq_dequeue(sch)) != NULL) + while ((skb = sfq_dequeue(sch)) != NULL){ + before_explicit_drop(skb); kfree_skb(skb); + } } static void sfq_perturbation(unsigned long arg) @@ -394,8 +395,11 @@ if (ctl->limit) q->limit = min_t(u32, ctl->limit, SFQ_DEPTH); - while (sch->q.qlen >= q->limit-1) - sfq_drop(sch); + struct sk_buff * skb; + while (sch->q.qlen >= q->limit-1){ + sfq_drop(sch, &skb); + before_explicit_drop(skb); + } del_timer(&q->perturb_timer); if (q->perturb_period) { diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_tbf.c linux-2.6.8-rc4-apichanged/net/sched/sch_tbf.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_tbf.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_tbf.c 2004-08-12 16:39:11.000000000 +0200 @@ -135,19 +135,23 @@ #define L2T(q,L) ((q)->R_tab->data[(L)>>(q)->R_tab->rate.cell_log]) #define L2T_P(q,L) ((q)->P_tab->data[(L)>>(q)->P_tab->rate.cell_log]) -static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) +static int tbf_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct tbf_sched_data *q = qdisc_priv(sch); int ret; - if (skb->len > q->max_size) { + if ((*skb)->len > q->max_size) { sch->stats.drops++; + #ifdef CONFIG_NET_CLS_POLICE - if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) + if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)){ +#endif + IMPLICIT_DROP(); + return NET_XMIT_DROP; +#ifdef CONFIG_NET_CLS_POLICE + } + return NET_XMIT_RESHAPED; #endif - kfree_skb(skb); - - return NET_XMIT_DROP; } if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) { @@ -156,12 +160,12 @@ } sch->q.qlen++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } -static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch) +static int tbf_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct tbf_sched_data *q = qdisc_priv(sch); int ret; @@ -172,12 +176,12 @@ return ret; } -static unsigned int tbf_drop(struct Qdisc* sch) +static unsigned int tbf_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct tbf_sched_data *q = qdisc_priv(sch); unsigned int len; - if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { + if ((len = q->qdisc->ops->drop(q->qdisc, skb)) != 0) { sch->q.qlen--; sch->stats.drops++; } @@ -247,8 +251,9 @@ (cf. CSZ, HPFQ, HFSC) */ - if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { + if (q->qdisc->ops->requeue(&skb, q->qdisc) != NET_XMIT_SUCCESS) { /* When requeue fails skb is dropped */ + before_explicit_drop(skb); sch->q.qlen--; sch->stats.drops++; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_teql.c linux-2.6.8-rc4-apichanged/net/sched/sch_teql.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_teql.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_teql.c 2004-08-12 16:39:43.808269720 +0200 @@ -88,30 +88,30 @@ /* "teql*" qdisc routines */ static int -teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) +teql_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct net_device *dev = sch->dev; struct teql_sched_data *q = qdisc_priv(sch); - __skb_queue_tail(&q->q, skb); + __skb_queue_tail(&q->q, *skb); if (q->q.qlen <= dev->tx_queue_len) { - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } - __skb_unlink(skb, &q->q); - kfree_skb(skb); + __skb_unlink(*skb, &q->q); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } static int -teql_requeue(struct sk_buff *skb, struct Qdisc* sch) +teql_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct teql_sched_data *q = qdisc_priv(sch); - __skb_queue_head(&q->q, skb); + __skb_queue_head(&q->q, *skb); return 0; } @@ -340,6 +340,7 @@ drop: master->stats.tx_dropped++; + before_explicit_drop(skb); dev_kfree_skb(skb); return 0; } From davem@redhat.com Thu Aug 12 18:02:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 18:02: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 i7D124g1030926 for ; Thu, 12 Aug 2004 18:02:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7D11pe1011856; Thu, 12 Aug 2004 21:01:51 -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 i7D11pa25024; Thu, 12 Aug 2004 21:01:51 -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 i7D112U0003790; Thu, 12 Aug 2004 21:01:02 -0400 Date: Thu, 12 Aug 2004 18:00:51 -0700 From: "David S. Miller" To: Sridhar Samudrala Cc: netdev@oss.sgi.com, lksctp-developers@lists.sourceforge.net Subject: Re: [BK PATCH] 2.4 SCTP updates Message-Id: <20040812180051.5f6681ad.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: 7708 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, 12 Aug 2004 17:24:22 -0700 (PDT) Sridhar Samudrala wrote: > http://linux-lksctp.bkbits.net/lksctp-2.4.work Pulled, thanks Sridhar. From sandr8_NOSPAM_@crocetta.org Thu Aug 12 18:15:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 18:15:56 -0700 (PDT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D1Fjnt031654 for ; Thu, 12 Aug 2004 18:15:45 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp3.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C170000CE76; Fri, 13 Aug 2004 03:11:52 +0200 Message-ID: <411C1559.4020401@crocetta.org> Date: Fri, 13 Aug 2004 03:11:53 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: sandr8_NOSPAM_@crocetta.org CC: hadi@cyberus.ca, kuznet@ms2.inr.ac.ru, davem@redhat.com, devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, laforge@netfilter.org, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 4/4] ACCT unbilling [PATCH 2/4] deferred drop, __parent workaround, reshape_fail References: <411C0FDF.2040200@crocetta.org> In-Reply-To: <411C0FDF.2040200@crocetta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7709 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev sorry i picked the wrong file for these two patches, it's too late in the night :) i re-paste them here below alessandro ########## [ PATCH 4 ] ########## diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/include/net/pkt_sched.h linux-2.6.8-rc4-apichanged-ACCT-unbill/include/net/pkt_sched.h --- linux-2.6.8-rc4-apichanged-ACCT/include/net/pkt_sched.h 2004-08-12 16:01:09.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/include/net/pkt_sched.h 2004-08-12 21:09:57.732378592 +0200 @@ -10,6 +10,21 @@ #include #include +#ifdef CONFIG_IP_NF_CT_ACCT +#include +#include +#include +extern struct ip_conntrack * +(*ip_ct_get)(struct sk_buff *skb, enum ip_conntrack_info *ctinfo); + +#ifdef CONFIG_NETFILTER_DEBUG +extern struct rwlock_debug * ip_conntrack_lockp; +#else +extern rwlock_t * ip_conntrack_lockp; +#endif + +#endif + struct rtattr; struct Qdisc; @@ -94,9 +109,51 @@ #define IMPLICIT_DROP() do; while (0) /* readability: just to be aware of what you are doing!!! */ +static inline void ct_sub_counters(const struct sk_buff *skb) +{ + /* skb must not be NULL */ +#ifdef CONFIG_IP_NF_CT_ACCT + if(ip_ct_get){ + enum ip_conntrack_info ctinfo; + struct ip_conntrack *ct; + + struct ip_conntrack * + (*the_connection_tracking_is_loaded)(struct sk_buff *skb, + enum ip_conntrack_info *ctinfo); + + if(skb->nfct && (the_connection_tracking_is_loaded=ip_ct_get)){ + mb(); + ct=the_connection_tracking_is_loaded( + (struct sk_buff *)skb, + &ctinfo); + if(ct){ + WRITE_LOCK(ip_conntrack_lockp); + + ct->counters[CTINFO2DIR(ctinfo)].packets--; + ct->counters[CTINFO2DIR(ctinfo)].bytes -= + ntohs(skb->nh.iph->tot_len); //no need to check against wraparound + //unless there's a bug it should not be possible to unbill more than we have billed! + WRITE_UNLOCK(ip_conntrack_lockp); + } + } + } +#endif +} + static inline void before_explicit_drop(const struct sk_buff * skb) { - /* for the moment there's nothing to do. see next patch!!! */ + ct_sub_counters(skb); + + /* here, if some further development needs it, we could place + * a new HOOK that gets packets right before they are dropped... + * you would then be able to register packet filters functions + * that wanna gather informations from dropped packets... + * + * it would also be somehow dirty but technically feasible to + * use the kfree_skb() as the okfn: it has the right prototype + * to be used in that way and it could also make some sense, + * though the meaning of the value of filter functions would + * be pretty counterintuitive... */ } #define QDISC_ALIGN 32 diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/net/core/dev.c linux-2.6.8-rc4-apichanged-ACCT-unbill/net/core/dev.c --- linux-2.6.8-rc4-apichanged-ACCT/net/core/dev.c 2004-08-12 17:23:43.000000000 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/net/core/dev.c 2004-08-12 18:30:24.561721744 +0200 @@ -115,6 +115,23 @@ #include #endif /* CONFIG_NET_RADIO */ #include +#include +#ifdef CONFIG_IP_NF_CT_ACCT +struct ip_conntrack * +(* ip_ct_get)(struct sk_buff *skb, + enum ip_conntrack_info *ctinfo)=NULL; +DECLARE_RWLOCK(ct_load); +#ifdef CONFIG_NETFILTER_DEBUG +struct rwlock_debug * ip_conntrack_lockp=NULL; +#else +rwlock_t * ip_conntrack_lockp=NULL; +#endif + +EXPORT_SYMBOL(ip_ct_get); +EXPORT_SYMBOL(ip_conntrack_lockp); + +#endif + /* This define, if set, will randomly drop a packet when congestion * is more than moderate. It helps fairness in the multi-interface diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/ip_conntrack_core.c --- linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-12 17:43:07.049089232 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-12 18:30:24.614713688 +0200 @@ -56,6 +56,21 @@ #define DEBUGP(format, args...) #endif +#ifdef CONFIG_IP_NF_CT_ACCT +extern struct ip_conntrack * +(*ip_ct_get)(struct sk_buff *skb, enum ip_conntrack_info *ctinfo); + + + +#ifdef CONFIG_NETFILTER_DEBUG +extern struct rwlock_debug * ip_conntrack_lockp; +#else +extern rwlock_t * ip_conntrack_lockp; +#endif + +#endif + + DECLARE_RWLOCK(ip_conntrack_lock); DECLARE_RWLOCK(ip_conntrack_expect_tuple_lock); @@ -1373,6 +1388,10 @@ void ip_conntrack_cleanup(void) { ip_ct_attach = NULL; +#ifdef CONFIG_IP_NF_CT_ACCT + ip_ct_get = NULL; +#endif + /* This makes sure all current packets have passed through netfilter framework. Roll on, two-stage module delete... */ @@ -1451,6 +1470,12 @@ /* For use by ipt_REJECT */ ip_ct_attach = ip_conntrack_attach; + +#ifdef CONFIG_IP_NF_CT_ACCT + /* For the core kernel, in net/core/dev.c */ + ip_conntrack_lockp=&ip_conntrack_lock; + ip_ct_get = ip_conntrack_get; +#endif /* Set up fake conntrack: - to never be deleted, not in any hashes */ diff -NaurX dontdiff linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/Kconfig linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/Kconfig --- linux-2.6.8-rc4-apichanged-ACCT/net/ipv4/netfilter/Kconfig 2004-08-12 17:45:47.330722720 +0200 +++ linux-2.6.8-rc4-apichanged-ACCT-unbill/net/ipv4/netfilter/Kconfig 2004-08-12 18:30:24.651708064 +0200 @@ -22,6 +22,14 @@ config IP_NF_CT_ACCT bool "Connection tracking flow accounting" depends on IP_NF_CONNTRACK + ---help--- + If you enable this option, the connection tracking code will keep + per-flow packet and byte counters. + + Those counters can be used for flow-based accounting or the + `connbytes' match. + + If unsure, say N. config IP_NF_FTP tristate "FTP protocol support" ########## [ PATCH 2 ] ########## diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/include/net/pkt_sched.h linux-2.6.8-rc4-apichanged/include/net/pkt_sched.h --- linux-2.6.8-rc4-netxmitcodes/include/net/pkt_sched.h 2004-08-12 13:31:12.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/include/net/pkt_sched.h 2004-08-12 16:01:09.134153672 +0200 @@ -52,10 +52,10 @@ char id[IFNAMSIZ]; int priv_size; - int (*enqueue)(struct sk_buff *, struct Qdisc *); + int (*enqueue)(struct sk_buff ** const, struct Qdisc *); struct sk_buff * (*dequeue)(struct Qdisc *); - int (*requeue)(struct sk_buff *, struct Qdisc *); - unsigned int (*drop)(struct Qdisc *); + int (*requeue)(struct sk_buff ** const, struct Qdisc *); + unsigned int (*drop)(struct Qdisc *, struct sk_buff ** const); int (*init)(struct Qdisc *, struct rtattr *arg); void (*reset)(struct Qdisc *); @@ -71,7 +71,7 @@ struct Qdisc { - int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); + int (*enqueue)(struct sk_buff ** const skb, struct Qdisc *dev); struct sk_buff * (*dequeue)(struct Qdisc *dev); unsigned flags; #define TCQ_F_BUILTIN 1 @@ -88,14 +88,17 @@ struct tc_stats stats; 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; + int (*reshape_fail)(struct sk_buff ** const skb, + struct Qdisc *q); }; +#define IMPLICIT_DROP() do; while (0) /* readability: just to be aware of what you are doing!!! */ + +static inline void before_explicit_drop(const struct sk_buff * skb) +{ + /* for the moment there's nothing to do. see next patch!!! */ +} + #define QDISC_ALIGN 32 #define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/core/dev.c linux-2.6.8-rc4-apichanged/net/core/dev.c --- linux-2.6.8-rc4-netxmitcodes/net/core/dev.c 2004-08-10 12:27:35.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/core/dev.c 2004-08-12 17:23:43.682947768 +0200 @@ -70,6 +70,8 @@ * indefinitely on dev->refcnt * J Hadi Salim : - Backlog queue sampling * - netif_rx() feedback + * Alessandro Salvatori : enqueue() byref for centralized tc drop, + * before_explicit_drop() */ #include @@ -1341,13 +1343,18 @@ /* Grab device queue */ spin_lock_bh(&dev->queue_lock); - rc = q->enqueue(skb, q); + rc = q->enqueue(&skb, q); qdisc_run(dev); spin_unlock_bh(&dev->queue_lock); rcu_read_unlock(); rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc; + + if(rc!=NET_XMIT_SUCCESS){ /* unlikely? better dynamically IMHO */ + before_explicit_drop(skb); + goto out_kfree_skb; + } goto out; } rcu_read_unlock(); @@ -1747,7 +1752,7 @@ } spin_lock(&dev->ingress_lock); if ((q = dev->qdisc_ingress) != NULL) - result = q->enqueue(skb, q); + result = q->enqueue(&skb, q); spin_unlock(&dev->ingress_lock); } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_api.c linux-2.6.8-rc4-apichanged/net/sched/sch_api.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_api.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_api.c 2004-08-12 17:00:27.707168344 +0200 @@ -13,6 +13,7 @@ * Rani Assaf :980802: JIFFIES and CPU clock sources are repaired. * Eduardo J. Blanco :990222: kmod support * Jamal Hadi Salim : 990601: ingress support + * sandr8 :040812: api change, deferred drop, __parent workaround */ #include @@ -95,9 +96,9 @@ ---enqueue - enqueue returns 0, if packet was enqueued successfully. + enqueue returns an even number, if packet was enqueued successfully. If packet (this one or another one) was dropped, it returns - not zero error code. + an odd error code. NET_XMIT_DROP - this packet dropped Expected action: do not backoff, but wait until queue will clear. NET_XMIT_CN - probably this packet enqueued, but another one dropped. diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_atm.c linux-2.6.8-rc4-apichanged/net/sched/sch_atm.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_atm.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_atm.c 2004-08-12 16:39:10.000000000 +0200 @@ -398,7 +398,7 @@ /* --------------------------- Qdisc operations ---------------------------- */ -static int atm_tc_enqueue(struct sk_buff *skb,struct Qdisc *sch) +static int atm_tc_enqueue(struct sk_buff ** const skb,struct Qdisc *sch) { struct atm_qdisc_data *p = PRIV(sch); struct atm_flow_data *flow = NULL ; /* @@@ */ @@ -406,13 +406,13 @@ int result; int ret = NET_XMIT_POLICED; - D2PRINTK("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + D2PRINTK("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n",*skb,sch,p); result = TC_POLICE_OK; /* be nice to gcc */ - if (TC_H_MAJ(skb->priority) != sch->handle || - !(flow = (struct atm_flow_data *) atm_tc_get(sch,skb->priority))) + if (TC_H_MAJ((*skb)->priority) != sch->handle || + !(flow = (struct atm_flow_data *) atm_tc_get(sch,(*skb)->priority))) for (flow = p->flows; flow; flow = flow->next) if (flow->filter_list) { - result = tc_classify(skb,flow->filter_list, + result = tc_classify((*skb),flow->filter_list, &res); if (result < 0) continue; flow = (struct atm_flow_data *) res.class; @@ -422,17 +422,17 @@ if (!flow) flow = &p->link; else { if (flow->vcc) - ATM_SKB(skb)->atm_options = flow->vcc->atm_options; + ATM_SKB(*skb)->atm_options = flow->vcc->atm_options; /*@@@ looks good ... but it's not supposed to work :-)*/ #ifdef CONFIG_NET_CLS_POLICE switch (result) { case TC_POLICE_SHOT: - kfree_skb(skb); + IMPLICIT_DROP(); break; case TC_POLICE_RECLASSIFY: if (flow->excess) flow = flow->excess; else { - ATM_SKB(skb)->atm_options |= + ATM_SKB(*skb)->atm_options |= ATM_ATMOPT_CLP; break; } @@ -508,8 +508,11 @@ struct sk_buff *new; new = skb_realloc_headroom(skb,flow->hdr_len); + if(!new) + before_explicit_drop(skb); dev_kfree_skb(skb); - if (!new) continue; + if (!new) + continue; skb = new; } D2PRINTK("sch_atm_dequeue: ip %p, data %p\n", @@ -538,12 +541,12 @@ } -static int atm_tc_requeue(struct sk_buff *skb,struct Qdisc *sch) +static int atm_tc_requeue(struct sk_buff ** const skb,struct Qdisc *sch) { struct atm_qdisc_data *p = PRIV(sch); int ret; - D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + 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 { @@ -554,7 +557,7 @@ } -static unsigned int atm_tc_drop(struct Qdisc *sch) +static unsigned int atm_tc_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct atm_qdisc_data *p = PRIV(sch); struct atm_flow_data *flow; @@ -562,7 +565,7 @@ DPRINTK("atm_tc_drop(sch %p,[qdisc %p])\n",sch,p); for (flow = p->flows; flow; flow = flow->next) - if (flow->q->ops->drop && (len = flow->q->ops->drop(flow->q))) + if (flow->q->ops->drop && (len = flow->q->ops->drop(flow->q, skb))) return len; return 0; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_cbq.c linux-2.6.8-rc4-apichanged/net/sched/sch_cbq.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_cbq.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_cbq.c 2004-08-12 17:03:46.257984032 +0200 @@ -8,6 +8,8 @@ * * Authors: Alexey Kuznetsov, * + * Fixes: + * sandr8 __parent workaround, rx_class removal */ #include @@ -170,9 +172,6 @@ struct cbq_class *active[TC_CBQ_MAXPRIO+1]; /* List of all classes with backlog */ -#ifdef CONFIG_NET_CLS_POLICE - struct cbq_class *rx_class; -#endif struct cbq_class *tx_class; struct cbq_class *tx_borrowed; int tx_len; @@ -239,17 +238,17 @@ */ static struct cbq_class * -cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) +cbq_classify(struct sk_buff ** const skb, struct Qdisc *sch, int *qres) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *head = &q->link; struct cbq_class **defmap; struct cbq_class *cl = NULL; - u32 prio = skb->priority; + u32 prio = (*skb)->priority; struct tcf_result res; /* - * Step 1. If skb->priority points to one of our classes, use it. + * Step 1. If (*skb)->priority points to one of our classes, use it. */ if (TC_H_MAJ(prio^sch->handle) == 0 && (cl = cbq_class_lookup(q, prio)) != NULL) @@ -265,7 +264,7 @@ /* * Step 2+n. Apply classifier. */ - if (!head->filter_list || (result = tc_classify(skb, head->filter_list, &res)) < 0) + if (!head->filter_list || (result = tc_classify(*skb, head->filter_list, &res)) < 0) goto fallback; if ((cl = (void*)res.class) == NULL) { @@ -296,14 +295,18 @@ } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } #else #ifdef CONFIG_NET_CLS_POLICE switch (result) { case TC_POLICE_RECLASSIFY: - return cbq_reclassify(skb, cl); + return cbq_reclassify(*skb, cl); case TC_POLICE_SHOT: return NULL; default: @@ -417,61 +420,61 @@ } static int -cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) +cbq_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { struct cbq_sched_data *q = qdisc_priv(sch); - int len = skb->len; int ret = NET_XMIT_SUCCESS; struct cbq_class *cl = cbq_classify(skb, sch,&ret); -#ifdef CONFIG_NET_CLS_POLICE - q->rx_class = cl; -#endif - if (cl) { -#ifdef CONFIG_NET_CLS_POLICE - cl->q->__parent = sch; -#endif - if ((ret = cl->q->enqueue(skb, cl->q)) == NET_XMIT_SUCCESS) { + while (cl) { + cbq_mark_toplevel(q, cl); + if ( no_dropped(ret = cl->q->enqueue(skb, cl->q)) ) { sch->q.qlen++; sch->stats.packets++; - sch->stats.bytes+=len; - cbq_mark_toplevel(q, cl); + sch->stats.bytes+=(*skb)->len; if (!cl->next_alive) cbq_activate_class(cl); return ret; +#ifdef CONFIG_NET_CLS_POLICE + } else { + /* we renqueue the the (latest) dropped packet */ + cl->stats.drops++; + + if(cl->police != TC_POLICE_RECLASSIFY) + break; + /* just one line follows. this is instead of the + * old reshape_fail, without the need of the + * tricks with rx_class and __parent */ + cl=cbq_reclassify(*skb, cl); +#endif } } #ifndef CONFIG_NET_CLS_ACT sch->stats.drops++; if (cl == NULL) - kfree_skb(skb); + IMPLICIT_DROP(); else { cbq_mark_toplevel(q, cl); cl->stats.drops++; } #else - if ( NET_XMIT_DROP == ret) { + if ( any_dropped(ret) ) { sch->stats.drops++; } - - if (cl != NULL) { - cbq_mark_toplevel(q, cl); - cl->stats.drops++; - } #endif return ret; } static int -cbq_requeue(struct sk_buff *skb, struct Qdisc *sch) +cbq_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl; int ret; if ((cl = q->tx_class) == NULL) { - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_CN; } @@ -479,10 +482,6 @@ cbq_mark_toplevel(q, cl); -#ifdef CONFIG_NET_CLS_POLICE - q->rx_class = cl; - cl->q->__parent = sch; -#endif if ((ret = cl->q->ops->requeue(skb, cl->q)) == 0) { sch->q.qlen++; if (!cl->next_alive) @@ -625,9 +624,13 @@ static void cbq_ovl_drop(struct cbq_class *cl) { + struct sk_buff * skb; + if (cl->q->ops->drop) - if (cl->q->ops->drop(cl->q)) + if (cl->q->ops->drop(cl->q, &skb)){ + before_explicit_drop(skb); cl->qdisc->q.qlen--; + } cl->xstats.overactions++; cbq_ovl_classic(cl); } @@ -708,42 +711,6 @@ netif_schedule(sch->dev); } - -#ifdef CONFIG_NET_CLS_POLICE - -static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child) -{ - int len = skb->len; - struct Qdisc *sch = child->__parent; - struct cbq_sched_data *q = qdisc_priv(sch); - struct cbq_class *cl = q->rx_class; - - q->rx_class = NULL; - - if (cl && (cl = cbq_reclassify(skb, cl)) != NULL) { - - cbq_mark_toplevel(q, cl); - - q->rx_class = cl; - cl->q->__parent = sch; - - if (cl->q->enqueue(skb, cl->q) == 0) { - sch->q.qlen++; - sch->stats.packets++; - sch->stats.bytes+=len; - if (!cl->next_alive) - cbq_activate_class(cl); - return 0; - } - sch->stats.drops++; - return 0; - } - - sch->stats.drops++; - return -1; -} -#endif - /* It is mission critical procedure. @@ -1268,7 +1235,7 @@ } } -static unsigned int cbq_drop(struct Qdisc* sch) +static unsigned int cbq_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl, *cl_head; @@ -1281,7 +1248,7 @@ cl = cl_head; do { - if (cl->q->ops->drop && (len = cl->q->ops->drop(cl->q))) { + if (cl->q->ops->drop && (len = cl->q->ops->drop(cl->q, skb))) { sch->q.qlen--; return len; } @@ -1413,13 +1380,7 @@ static int cbq_set_police(struct cbq_class *cl, struct tc_cbq_police *p) { cl->police = p->police; - - if (cl->q->handle) { - if (p->police == TC_POLICE_RECLASSIFY) - cl->q->reshape_fail = cbq_reshape_fail; - else - cl->q->reshape_fail = NULL; - } +printk("police set to: %d", cl->police); return 0; } #endif @@ -1698,11 +1659,6 @@ if (new == NULL) { if ((new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops)) == NULL) return -ENOBUFS; - } else { -#ifdef CONFIG_NET_CLS_POLICE - if (cl->police == TC_POLICE_RECLASSIFY) - new->reshape_fail = cbq_reshape_fail; -#endif } sch_tree_lock(sch); *old = cl->q; @@ -1764,9 +1720,6 @@ struct cbq_class *cl; unsigned h; -#ifdef CONFIG_NET_CLS_POLICE - q->rx_class = NULL; -#endif for (h = 0; h < 16; h++) { for (cl = q->classes[h]; cl; cl = cl->next) cbq_destroy_filters(cl); @@ -1790,15 +1743,6 @@ struct cbq_class *cl = (struct cbq_class*)arg; if (--cl->refcnt == 0) { -#ifdef CONFIG_NET_CLS_POLICE - struct cbq_sched_data *q = qdisc_priv(sch); - - spin_lock_bh(&sch->dev->queue_lock); - if (q->rx_class == cl) - q->rx_class = NULL; - spin_unlock_bh(&sch->dev->queue_lock); -#endif - cbq_destroy_class(cl); } } @@ -2021,10 +1965,6 @@ q->tx_class = NULL; q->tx_borrowed = NULL; } -#ifdef CONFIG_NET_CLS_POLICE - if (q->rx_class == cl) - q->rx_class = NULL; -#endif cbq_unlink_class(cl); cbq_adjust_levels(cl->tparent); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_dsmark.c linux-2.6.8-rc4-apichanged/net/sched/sch_dsmark.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_dsmark.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_dsmark.c 2004-08-12 16:39:11.000000000 +0200 @@ -186,38 +186,38 @@ /* --------------------------- Qdisc operations ---------------------------- */ -static int dsmark_enqueue(struct sk_buff *skb,struct Qdisc *sch) +static int dsmark_enqueue(struct sk_buff ** const skb,struct Qdisc *sch) { struct dsmark_qdisc_data *p = PRIV(sch); struct tcf_result res; int result; int ret = NET_XMIT_POLICED; - D2PRINTK("dsmark_enqueue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + D2PRINTK("dsmark_enqueue(skb %p,sch %p,[qdisc %p])\n",*skb,sch,p); if (p->set_tc_index) { /* FIXME: Safe with non-linear skbs? --RR */ - switch (skb->protocol) { + switch ((*skb)->protocol) { case __constant_htons(ETH_P_IP): - skb->tc_index = ipv4_get_dsfield(skb->nh.iph); + (*skb)->tc_index = ipv4_get_dsfield((*skb)->nh.iph); break; case __constant_htons(ETH_P_IPV6): - skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h); + (*skb)->tc_index = ipv6_get_dsfield((*skb)->nh.ipv6h); break; default: - skb->tc_index = 0; + (*skb)->tc_index = 0; break; }; } result = TC_POLICE_OK; /* be nice to gcc */ - if (TC_H_MAJ(skb->priority) == sch->handle) { - skb->tc_index = TC_H_MIN(skb->priority); + if (TC_H_MAJ((*skb)->priority) == sch->handle) { + (*skb)->tc_index = TC_H_MIN((*skb)->priority); } else { - result = tc_classify(skb,p->filter_list,&res); + result = tc_classify(*skb,p->filter_list,&res); D2PRINTK("result %d class 0x%04x\n",result,res.classid); switch (result) { #ifdef CONFIG_NET_CLS_POLICE case TC_POLICE_SHOT: - kfree_skb(skb); + IMPLICIT_DROP(); /* this whole ifdef will never be coded! */ break; #if 0 case TC_POLICE_RECLASSIFY: @@ -225,13 +225,13 @@ #endif #endif case TC_POLICE_OK: - skb->tc_index = TC_H_MIN(res.classid); + (*skb)->tc_index = TC_H_MIN(res.classid); break; case TC_POLICE_UNSPEC: /* fall through */ default: if (p->default_index != NO_DEFAULT_INDEX) - skb->tc_index = p->default_index; + (*skb)->tc_index = p->default_index; break; }; } @@ -240,11 +240,11 @@ result == TC_POLICE_SHOT || #endif - ((ret = p->q->enqueue(skb,p->q)) != 0)) { + (0x1 & (ret = p->q->enqueue(skb,p->q))) ) { sch->stats.drops++; return ret; } - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; sch->q.qlen++; return ret; @@ -289,12 +289,12 @@ } -static int dsmark_requeue(struct sk_buff *skb,struct Qdisc *sch) +static int dsmark_requeue(struct sk_buff ** const skb,struct Qdisc *sch) { int ret; struct dsmark_qdisc_data *p = PRIV(sch); - D2PRINTK("dsmark_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); + 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++; return 0; @@ -304,7 +304,7 @@ } -static unsigned int dsmark_drop(struct Qdisc *sch) +static unsigned int dsmark_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct dsmark_qdisc_data *p = PRIV(sch); unsigned int len; @@ -312,7 +312,7 @@ DPRINTK("dsmark_reset(sch %p,[qdisc %p])\n",sch,p); if (!p->q->ops->drop) return 0; - if (!(len = p->q->ops->drop(p->q))) + if (!(len = p->q->ops->drop(p->q, skb))) return 0; sch->q.qlen--; return len; diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_fifo.c linux-2.6.8-rc4-apichanged/net/sched/sch_fifo.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_fifo.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_fifo.c 2004-08-12 16:39:11.000000000 +0200 @@ -43,30 +43,34 @@ }; static int -bfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) +bfifo_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct fifo_sched_data *q = qdisc_priv(sch); - if (sch->stats.backlog + skb->len <= q->limit) { - __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; + if (sch->stats.backlog + (*skb)->len <= q->limit) { + __skb_queue_tail(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } sch->stats.drops++; #ifdef CONFIG_NET_CLS_POLICE - if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) + if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)){ +#endif + IMPLICIT_DROP(); + return NET_XMIT_DROP; +#ifdef CONFIG_NET_CLS_POLICE + } + return NET_XMIT_RESHAPED; #endif - kfree_skb(skb); - return NET_XMIT_DROP; } static int -bfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) +bfifo_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { - __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + __skb_queue_head(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; return 0; } @@ -82,15 +86,13 @@ } static unsigned int -fifo_drop(struct Qdisc* sch) +fifo_drop(struct Qdisc* sch, struct sk_buff ** const skb) { - struct sk_buff *skb; - - skb = __skb_dequeue_tail(&sch->q); - if (skb) { - unsigned int len = skb->len; + *skb = __skb_dequeue_tail(&sch->q); + if (*skb) { + unsigned int len = (*skb)->len; sch->stats.backlog -= len; - kfree_skb(skb); + IMPLICIT_DROP(); return len; } return 0; @@ -104,28 +106,33 @@ } static int -pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) +pfifo_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct fifo_sched_data *q = qdisc_priv(sch); if (sch->q.qlen < q->limit) { - __skb_queue_tail(&sch->q, skb); - sch->stats.bytes += skb->len; + __skb_queue_tail(&sch->q, *skb); + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } sch->stats.drops++; + +#ifdef CONFIG_NET_CLS_POLICE + if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)){ +#endif + IMPLICIT_DROP(); + return NET_XMIT_DROP; #ifdef CONFIG_NET_CLS_POLICE - if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) + } + return NET_XMIT_RESHAPED; #endif - kfree_skb(skb); - return NET_XMIT_DROP; } static int -pfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) +pfifo_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { - __skb_queue_head(&sch->q, skb); + __skb_queue_head(&sch->q, *skb); return 0; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_generic.c linux-2.6.8-rc4-apichanged/net/sched/sch_generic.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_generic.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_generic.c 2004-08-12 16:39:11.000000000 +0200 @@ -131,6 +131,7 @@ packet when deadloop is detected. */ if (dev->xmit_lock_owner == smp_processor_id()) { + before_explicit_drop(skb); kfree_skb(skb); if (net_ratelimit()) printk(KERN_DEBUG "Dead loop on netdevice %s, fix it urgently!\n", dev->name); @@ -149,7 +150,7 @@ 3. device is buggy (ppp) */ - q->ops->requeue(skb, q); + q->ops->requeue(&skb, q); netif_schedule(dev); return 1; } @@ -217,9 +218,9 @@ */ static int -noop_enqueue(struct sk_buff *skb, struct Qdisc * qdisc) +noop_enqueue(struct sk_buff ** const skb, struct Qdisc * qdisc) { - kfree_skb(skb); + IMPLICIT_DROP(); return NET_XMIT_CN; } @@ -230,11 +231,11 @@ } static int -noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc) +noop_requeue(struct sk_buff ** const skb, struct Qdisc* qdisc) { if (net_ratelimit()) - printk(KERN_DEBUG "%s deferred output. It is buggy.\n", skb->dev->name); - kfree_skb(skb); + printk(KERN_DEBUG "%s deferred output. It is buggy.\n", (*skb)->dev->name); + IMPLICIT_DROP(); return NET_XMIT_CN; } @@ -283,21 +284,21 @@ */ static int -pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) +pfifo_fast_enqueue(struct sk_buff ** const skb, struct Qdisc* qdisc) { struct sk_buff_head *list = qdisc_priv(qdisc); - list += prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[(*skb)->priority&TC_PRIO_MAX]; if (list->qlen < qdisc->dev->tx_queue_len) { - __skb_queue_tail(list, skb); + __skb_queue_tail(list, (*skb)); qdisc->q.qlen++; - qdisc->stats.bytes += skb->len; + qdisc->stats.bytes += (*skb)->len; qdisc->stats.packets++; return 0; } qdisc->stats.drops++; - kfree_skb(skb); + IMPLICIT_DROP(); return NET_XMIT_DROP; } @@ -319,13 +320,13 @@ } static int -pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc) +pfifo_fast_requeue(struct sk_buff ** const skb, struct Qdisc* qdisc) { struct sk_buff_head *list = qdisc_priv(qdisc); - list += prio2band[skb->priority&TC_PRIO_MAX]; + list += prio2band[(*skb)->priority&TC_PRIO_MAX]; - __skb_queue_head(list, skb); + __skb_queue_head(list, *skb); qdisc->q.qlen++; return 0; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_gred.c linux-2.6.8-rc4-apichanged/net/sched/sch_gred.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_gred.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_gred.c 2004-08-12 16:39:11.000000000 +0200 @@ -102,7 +102,7 @@ }; static int -gred_enqueue(struct sk_buff *skb, struct Qdisc* sch) +gred_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { psched_time_t now; struct gred_sched_data *q=NULL; @@ -116,7 +116,7 @@ } - if ( ((skb->tc_index&0xf) > (t->DPs -1)) || !(q=t->tab[skb->tc_index&0xf])) { + if ( (((*skb)->tc_index&0xf) > (t->DPs -1)) || !(q=t->tab[(*skb)->tc_index&0xf])) { printk("GRED: setting to default (%d)\n ",t->def); if (!(q=t->tab[t->def])) { DPRINTK("GRED: setting to default FAILED! dropping!! " @@ -125,11 +125,11 @@ } /* fix tc_index? --could be controvesial but needed for requeueing */ - skb->tc_index=(skb->tc_index&0xfffffff0) | t->def; + (*skb)->tc_index=((*skb)->tc_index&0xfffffff0) | t->def; } D2PRINTK("gred_enqueue virtualQ 0x%x classid %x backlog %d " - "general backlog %d\n",skb->tc_index&0xf,sch->handle,q->backlog, + "general backlog %d\n",(*skb)->tc_index&0xf,sch->handle,q->backlog, sch->stats.backlog); /* sum up all the qaves of prios <= to ours to get the new qave*/ if (!t->eqp && t->grio) { @@ -144,7 +144,7 @@ } q->packetsin++; - q->bytesin+=skb->len; + q->bytesin+=(*skb)->len; if (t->eqp && t->grio) { qave=0; @@ -175,12 +175,12 @@ if ((q->qave+qave) < q->qth_min) { q->qcount = -1; enqueue: - if (q->backlog + skb->len <= q->limit) { - q->backlog += skb->len; + if (q->backlog + (*skb)->len <= q->limit) { + q->backlog += (*skb)->len; do_enqueue: - __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; + __skb_queue_tail(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } else { @@ -188,7 +188,7 @@ } drop: - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } @@ -212,17 +212,17 @@ } static int -gred_requeue(struct sk_buff *skb, struct Qdisc* sch) +gred_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct gred_sched_data *q; struct gred_sched *t= qdisc_priv(sch); - q= t->tab[(skb->tc_index&0xf)]; + q= t->tab[((*skb)->tc_index&0xf)]; /* error checking here -- probably unnecessary */ PSCHED_SET_PASTPERFECT(q->qidlestart); - __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; - q->backlog += skb->len; + __skb_queue_head(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + q->backlog += (*skb)->len; return 0; } @@ -259,29 +259,27 @@ return NULL; } -static unsigned int gred_drop(struct Qdisc* sch) +static unsigned int gred_drop(struct Qdisc* sch, struct sk_buff ** const skb) { - struct sk_buff *skb; - struct gred_sched_data *q; struct gred_sched *t= qdisc_priv(sch); - skb = __skb_dequeue_tail(&sch->q); - if (skb) { - unsigned int len = skb->len; + *skb = __skb_dequeue_tail(&sch->q); + if (*skb) { + unsigned int len = (*skb)->len; sch->stats.backlog -= len; sch->stats.drops++; - q= t->tab[(skb->tc_index&0xf)]; + q= t->tab[((*skb)->tc_index&0xf)]; if (q) { q->backlog -= len; q->other++; if (!q->backlog && !t->eqp) PSCHED_GET_TIME(q->qidlestart); } else { - D2PRINTK("gred_dequeue: skb has bad tcindex %x\n",skb->tc_index&0xf); + D2PRINTK("gred_dequeue: skb has bad tcindex %x\n",(*skb)->tc_index&0xf); } - kfree_skb(skb); + IMPLICIT_DROP(); return len; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_hfsc.c linux-2.6.8-rc4-apichanged/net/sched/sch_hfsc.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_hfsc.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_hfsc.c 2004-08-12 16:39:11.000000000 +0200 @@ -967,7 +967,8 @@ return 0; } len = skb->len; - if (unlikely(sch->ops->requeue(skb, sch) != NET_XMIT_SUCCESS)) { + if (unlikely(sch->ops->requeue(&skb, sch) != NET_XMIT_SUCCESS)) { + before_explicit_drop(skb); if (net_ratelimit()) printk("qdisc_peek_len: failed to requeue\n"); return 0; @@ -1238,7 +1239,7 @@ } static struct hfsc_class * -hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) +hfsc_classify(struct sk_buff ** const skb, struct Qdisc *sch, int *qres) { struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; @@ -1246,13 +1247,13 @@ struct tcf_proto *tcf; int result; - if (TC_H_MAJ(skb->priority ^ sch->handle) == 0 && - (cl = hfsc_find_class(skb->priority, sch)) != NULL) + if (TC_H_MAJ((*skb)->priority ^ sch->handle) == 0 && + (cl = hfsc_find_class((*skb)->priority, sch)) != NULL) if (cl->level == 0) return cl; tcf = q->root.filter_list; - while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { + while (tcf && (result = tc_classify(*skb, tcf, &res)) >= 0) { #ifdef CONFIG_NET_CLS_ACT int terminal = 0; switch (result) { @@ -1272,7 +1273,11 @@ } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } #else @@ -1685,11 +1690,11 @@ } static int -hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch) +hfsc_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; struct hfsc_class *cl = hfsc_classify(skb, sch, &ret); - unsigned int len = skb->len; + unsigned int len = (*skb)->len; int err; @@ -1702,14 +1707,14 @@ } #else if (cl == NULL) { - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } #endif err = cl->qdisc->enqueue(skb, cl->qdisc); - if (unlikely(err != NET_XMIT_SUCCESS)) { + if (unlikely(any_dropped(err))) { cl->stats.drops++; sch->stats.drops++; return err; @@ -1797,17 +1802,17 @@ } static int -hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch) +hfsc_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct hfsc_sched *q = qdisc_priv(sch); - __skb_queue_head(&q->requeue, skb); + __skb_queue_head(&q->requeue, *skb); sch->q.qlen++; return NET_XMIT_SUCCESS; } static unsigned int -hfsc_drop(struct Qdisc *sch) +hfsc_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; @@ -1815,7 +1820,7 @@ list_for_each_entry(cl, &q->droplist, dlist) { if (cl->qdisc->ops->drop != NULL && - (len = cl->qdisc->ops->drop(cl->qdisc)) > 0) { + (len = cl->qdisc->ops->drop(cl->qdisc, skb)) > 0) { if (cl->qdisc->q.qlen == 0) { update_vf(cl, 0, 0); set_passive(cl); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_htb.c linux-2.6.8-rc4-apichanged/net/sched/sch_htb.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_htb.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_htb.c 2004-08-12 16:39:11.000000000 +0200 @@ -298,7 +298,7 @@ return (cl && cl != HTB_DIRECT) ? cl->classid : TC_H_UNSPEC; } -static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qres) +static struct htb_class *htb_classify(struct sk_buff ** const skb, struct Qdisc *sch, int *qres) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; @@ -306,16 +306,16 @@ struct tcf_proto *tcf; int result; - /* allow to select class by setting skb->priority to valid classid; + /* allow to select class by setting *skb->priority to valid classid; note that nfmark can be used too by attaching filter fw with no rules in it */ - if (skb->priority == sch->handle) + if ((*skb)->priority == sch->handle) return HTB_DIRECT; /* X:0 (direct flow) selected */ - if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) + if ((cl = htb_find((*skb)->priority,sch)) != NULL && cl->level == 0) return cl; tcf = q->filter_list; - while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { + while (tcf && (result = tc_classify(*skb, tcf, &res)) >= 0) { #ifdef CONFIG_NET_CLS_ACT int terminal = 0; switch (result) { @@ -335,7 +335,11 @@ } if (terminal) { - kfree_skb(skb); + if( any_dropped(*qres) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; } #else @@ -709,7 +713,7 @@ list_del_init(&cl->un.leaf.drop_list); } -static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static int htb_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { int ret = NET_XMIT_SUCCESS; struct htb_sched *q = qdisc_priv(sch); @@ -719,7 +723,7 @@ #ifdef CONFIG_NET_CLS_ACT if (cl == HTB_DIRECT ) { if (q->direct_queue.qlen < q->direct_qlen ) { - __skb_queue_tail(&q->direct_queue, skb); + __skb_queue_tail(&q->direct_queue, *skb); q->direct_pkts++; } } else if (!cl) { @@ -732,10 +736,10 @@ if (cl == HTB_DIRECT || !cl) { /* enqueue to helper queue */ if (q->direct_queue.qlen < q->direct_qlen && cl) { - __skb_queue_tail(&q->direct_queue, skb); + __skb_queue_tail(&q->direct_queue, *skb); q->direct_pkts++; } else { - kfree_skb (skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } @@ -746,32 +750,31 @@ cl->stats.drops++; return NET_XMIT_DROP; } else { - cl->stats.packets++; cl->stats.bytes += skb->len; + cl->stats.packets++; cl->stats.bytes += (*skb)->len; htb_activate (q,cl); } sch->q.qlen++; - sch->stats.packets++; sch->stats.bytes += skb->len; - HTB_DBG(1,1,"htb_enq_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); + sch->stats.packets++; sch->stats.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; } /* TODO: requeuing packet charges it to policers again !! */ -static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) +static int htb_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct htb_sched *q = qdisc_priv(sch); int ret = NET_XMIT_SUCCESS; struct htb_class *cl = htb_classify(skb,sch, &ret); - struct sk_buff *tskb; if (cl == HTB_DIRECT || !cl) { /* enqueue to helper queue */ if (q->direct_queue.qlen < q->direct_qlen && cl) { - __skb_queue_head(&q->direct_queue, skb); + __skb_queue_head(&q->direct_queue, *skb); } else { - __skb_queue_head(&q->direct_queue, skb); - tskb = __skb_dequeue_tail(&q->direct_queue); - kfree_skb (tskb); + __skb_queue_head(&q->direct_queue, *skb); + *skb = __skb_dequeue_tail(&q->direct_queue); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_CN; } @@ -783,7 +786,7 @@ htb_activate (q,cl); sch->q.qlen++; - HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); + HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,*skb); return NET_XMIT_SUCCESS; } @@ -1145,7 +1148,7 @@ } /* try to drop from each class (by prio) until one succeed */ -static unsigned int htb_drop(struct Qdisc* sch) +static unsigned int htb_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct htb_sched *q = qdisc_priv(sch); int prio; @@ -1157,7 +1160,7 @@ un.leaf.drop_list); unsigned int len; if (cl->un.leaf.q->ops->drop && - (len = cl->un.leaf.q->ops->drop(cl->un.leaf.q))) { + (len = cl->un.leaf.q->ops->drop(cl->un.leaf.q, skb))) { sch->q.qlen--; if (!cl->un.leaf.q->q.qlen) htb_deactivate (q,cl); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_ingress.c linux-2.6.8-rc4-apichanged/net/sched/sch_ingress.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_ingress.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_ingress.c 2004-08-12 16:39:11.000000000 +0200 @@ -137,14 +137,14 @@ /* --------------------------- Qdisc operations ---------------------------- */ -static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch) +static int ingress_enqueue(struct sk_buff ** const skb,struct Qdisc *sch) { struct ingress_qdisc_data *p = PRIV(sch); struct tcf_result res; int result; - D2PRINTK("ingress_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p); - result = tc_classify(skb, p->filter_list, &res); + D2PRINTK("ingress_enqueue(skb %p,sch %p,[qdisc %p])\n", *skb, sch, p); + result = tc_classify(*skb, p->filter_list, &res); D2PRINTK("result %d class 0x%04x\n", result, res.classid); /* * Unlike normal "enqueue" functions, ingress_enqueue returns a @@ -152,7 +152,7 @@ */ #ifdef CONFIG_NET_CLS_ACT sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; switch (result) { case TC_ACT_SHOT: result = TC_ACT_SHOT; @@ -166,7 +166,7 @@ case TC_ACT_OK: case TC_ACT_UNSPEC: default: - skb->tc_index = TC_H_MIN(res.classid); + (*skb)->tc_index = TC_H_MIN(res.classid); result = TC_ACT_OK; break; }; @@ -183,7 +183,7 @@ case TC_POLICE_UNSPEC: default: sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; result = NF_ACCEPT; break; }; @@ -192,7 +192,7 @@ D2PRINTK("Overriding result to ACCEPT\n"); result = NF_ACCEPT; sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; #endif #endif @@ -210,21 +210,24 @@ } -static int ingress_requeue(struct sk_buff *skb,struct Qdisc *sch) +static int ingress_requeue(struct sk_buff ** const skb,struct Qdisc *sch) { /* struct ingress_qdisc_data *p = PRIV(sch); - D2PRINTK("ingress_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,PRIV(p)); + D2PRINTK("ingress_requeue(skb %p,sch %p,[qdisc %p])\n",*skb,sch,PRIV(p)); */ return 0; } -static unsigned int ingress_drop(struct Qdisc *sch) +static unsigned int ingress_drop(struct Qdisc *sch, struct sk_buff ** const skb) { #ifdef DEBUG_INGRESS struct ingress_qdisc_data *p = PRIV(sch); #endif DPRINTK("ingress_drop(sch %p,[qdisc %p])\n", sch, p); + + *skb=NULL; + return 0; } @@ -254,8 +257,12 @@ if (dev->qdisc_ingress) { spin_lock(&dev->queue_lock); - if ((q = dev->qdisc_ingress) != NULL) - fwres = q->enqueue(skb, q); + if ((q = dev->qdisc_ingress) != NULL){ + fwres = q->enqueue(pskb, q); + if(any_dropped(fwres)){ + before_explicit_drop(*pskb); + } + } spin_unlock(&dev->queue_lock); } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_netem.c linux-2.6.8-rc4-apichanged/net/sched/sch_netem.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_netem.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_netem.c 2004-08-12 16:39:11.000000000 +0200 @@ -601,14 +601,14 @@ /* Enqueue packets with underlying discipline (fifo) * but mark them with current time first. */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static int netem_enqueue(struct sk_buff ** const skb, struct Qdisc *sch) { struct netem_sched_data *q = qdisc_priv(sch); - struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; + struct netem_skb_cb *cb = (struct netem_skb_cb *)(*skb)->cb; psched_time_t now; long delay; - pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); + pr_debug("netem_enqueue skb=%p @%lu\n", *skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ if (q->loss && q->loss >= net_random()) { @@ -644,20 +644,20 @@ /* Always queue at tail to keep packets in order */ if (likely(q->delayed.qlen < q->limit)) { - __skb_queue_tail(&q->delayed, skb); + __skb_queue_tail(&q->delayed, *skb); sch->q.qlen++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } sch->stats.drops++; - kfree_skb(skb); + IMPLICIT_DROP(); return NET_XMIT_DROP; } /* Requeue packets but don't change time stamp */ -static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) +static int netem_requeue(struct sk_buff ** const skb, struct Qdisc *sch) { struct netem_sched_data *q = qdisc_priv(sch); int ret; @@ -668,12 +668,12 @@ return ret; } -static unsigned int netem_drop(struct Qdisc* sch) +static unsigned int netem_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct netem_sched_data *q = qdisc_priv(sch); unsigned int len; - if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { + if ((len = q->qdisc->ops->drop(q->qdisc, skb)) != 0) { sch->q.qlen--; sch->stats.drops++; } @@ -706,7 +706,7 @@ } __skb_unlink(skb, &q->delayed); - if (q->qdisc->enqueue(skb, q->qdisc)) + if (q->qdisc->enqueue(&skb, q->qdisc)) sch->stats.drops++; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_prio.c linux-2.6.8-rc4-apichanged/net/sched/sch_prio.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_prio.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_prio.c 2004-08-12 16:41:53.936487224 +0200 @@ -47,16 +47,16 @@ }; -struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r) +struct Qdisc *prio_classify(struct sk_buff ** const skb, struct Qdisc *sch,int *r) { struct prio_sched_data *q = qdisc_priv(sch); - u32 band = skb->priority; + u32 band = (*skb)->priority; struct tcf_result res; - if (TC_H_MAJ(skb->priority) != sch->handle) { + if (TC_H_MAJ((*skb)->priority) != sch->handle) { #ifdef CONFIG_NET_CLS_ACT int result = 0, terminal = 0; - result = tc_classify(skb, q->filter_list, &res); + result = tc_classify(*skb, q->filter_list, &res); switch (result) { case TC_ACT_SHOT: @@ -74,13 +74,17 @@ break; }; if (terminal) { - kfree_skb(skb); + if( any_dropped(*r) ){ + before_explicit_drop(*skb); + IMPLICIT_DROP(); + } else + kfree_skb(*skb); return NULL; - } + } if (!q->filter_list ) { #else - if (!q->filter_list || tc_classify(skb, q->filter_list, &res)) { + if (!q->filter_list || tc_classify(*skb, q->filter_list, &res)) { #endif if (TC_H_MAJ(band)) band = 0; @@ -96,7 +100,7 @@ } static int -prio_enqueue(struct sk_buff *skb, struct Qdisc* sch) +prio_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct Qdisc *qdisc; int ret = NET_XMIT_SUCCESS; @@ -107,7 +111,7 @@ goto dropped; if ((ret = qdisc->enqueue(skb, qdisc)) == NET_XMIT_SUCCESS) { - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; sch->q.qlen++; return NET_XMIT_SUCCESS; @@ -128,7 +132,7 @@ static int -prio_requeue(struct sk_buff *skb, struct Qdisc* sch) +prio_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct Qdisc *qdisc; int ret = NET_XMIT_DROP; @@ -167,7 +171,7 @@ } -static unsigned int prio_drop(struct Qdisc* sch) +static unsigned int prio_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct prio_sched_data *q = qdisc_priv(sch); int prio; @@ -176,7 +180,7 @@ for (prio = q->bands-1; prio >= 0; prio--) { qdisc = q->queues[prio]; - if ((len = qdisc->ops->drop(qdisc)) != 0) { + if ((len = qdisc->ops->drop(qdisc, skb)) != 0) { sch->q.qlen--; return len; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_red.c linux-2.6.8-rc4-apichanged/net/sched/sch_red.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_red.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_red.c 2004-08-12 16:39:11.000000000 +0200 @@ -178,7 +178,7 @@ } static int -red_enqueue(struct sk_buff *skb, struct Qdisc* sch) +red_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct red_sched_data *q = qdisc_priv(sch); @@ -242,16 +242,16 @@ if (q->qave < q->qth_min) { q->qcount = -1; enqueue: - if (sch->stats.backlog + skb->len <= q->limit) { - __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; + if (sch->stats.backlog + (*skb)->len <= q->limit) { + __skb_queue_tail(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return NET_XMIT_SUCCESS; } else { q->st.pdrop++; } - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } @@ -259,7 +259,7 @@ q->qcount = -1; sch->stats.overlimits++; mark: - if (!(q->flags&TC_RED_ECN) || !red_ecn_mark(skb)) { + if (!(q->flags&TC_RED_ECN) || !red_ecn_mark(*skb)) { q->st.early++; goto drop; } @@ -295,20 +295,20 @@ goto enqueue; drop: - kfree_skb(skb); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_CN; } static int -red_requeue(struct sk_buff *skb, struct Qdisc* sch) +red_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct red_sched_data *q = qdisc_priv(sch); PSCHED_SET_PASTPERFECT(q->qidlestart); - __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + __skb_queue_head(&sch->q, *skb); + sch->stats.backlog += (*skb)->len; return 0; } @@ -327,18 +327,17 @@ return NULL; } -static unsigned int red_drop(struct Qdisc* sch) +static unsigned int red_drop(struct Qdisc* sch, struct sk_buff ** const skb) { - struct sk_buff *skb; struct red_sched_data *q = qdisc_priv(sch); - skb = __skb_dequeue_tail(&sch->q); - if (skb) { - unsigned int len = skb->len; + *skb = __skb_dequeue_tail(&sch->q); + if (*skb) { + unsigned int len = (*skb)->len; sch->stats.backlog -= len; sch->stats.drops++; q->st.other++; - kfree_skb(skb); + IMPLICIT_DROP(); return len; } PSCHED_GET_TIME(q->qidlestart); diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_sfq.c linux-2.6.8-rc4-apichanged/net/sched/sch_sfq.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_sfq.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_sfq.c 2004-08-12 16:39:11.000000000 +0200 @@ -209,11 +209,10 @@ sfq_link(q, x); } -static unsigned int sfq_drop(struct Qdisc *sch) +static unsigned int sfq_drop(struct Qdisc *sch, struct sk_buff ** const skb) { struct sfq_sched_data *q = qdisc_priv(sch); sfq_index d = q->max_depth; - struct sk_buff *skb; unsigned int len; /* Queue is full! Find the longest slot and @@ -221,10 +220,10 @@ if (d > 1) { sfq_index x = q->dep[d+SFQ_DEPTH].next; - skb = q->qs[x].prev; - len = skb->len; - __skb_unlink(skb, &q->qs[x]); - kfree_skb(skb); + *skb = q->qs[x].prev; + len = (*skb)->len; + __skb_unlink(*skb, &q->qs[x]); + IMPLICIT_DROP(); sfq_dec(q, x); sch->q.qlen--; sch->stats.drops++; @@ -236,10 +235,10 @@ d = q->next[q->tail]; q->next[q->tail] = q->next[d]; q->allot[q->next[d]] += q->quantum; - skb = q->qs[d].prev; - len = skb->len; - __skb_unlink(skb, &q->qs[d]); - kfree_skb(skb); + *skb = q->qs[d].prev; + len = (*skb)->len; + __skb_unlink(*skb, &q->qs[d]); + IMPLICIT_DROP(); sfq_dec(q, d); sch->q.qlen--; q->ht[q->hash[d]] = SFQ_DEPTH; @@ -251,10 +250,10 @@ } static int -sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch) +sfq_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct sfq_sched_data *q = qdisc_priv(sch); - unsigned hash = sfq_hash(q, skb); + unsigned hash = sfq_hash(q, *skb); sfq_index x; x = q->ht[hash]; @@ -262,7 +261,7 @@ q->ht[hash] = x = q->dep[SFQ_DEPTH].next; q->hash[x] = hash; } - __skb_queue_tail(&q->qs[x], skb); + __skb_queue_tail(&q->qs[x], *skb); sfq_inc(q, x); if (q->qs[x].qlen == 1) { /* The flow is new */ if (q->tail == SFQ_DEPTH) { /* It is the first flow */ @@ -276,20 +275,20 @@ } } if (++sch->q.qlen < q->limit-1) { - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } - sfq_drop(sch); + sfq_drop(sch, skb); return NET_XMIT_CN; } static int -sfq_requeue(struct sk_buff *skb, struct Qdisc* sch) +sfq_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct sfq_sched_data *q = qdisc_priv(sch); - unsigned hash = sfq_hash(q, skb); + unsigned hash = sfq_hash(q, *skb); sfq_index x; x = q->ht[hash]; @@ -297,7 +296,7 @@ q->ht[hash] = x = q->dep[SFQ_DEPTH].next; q->hash[x] = hash; } - __skb_queue_head(&q->qs[x], skb); + __skb_queue_head(&q->qs[x], *skb); sfq_inc(q, x); if (q->qs[x].qlen == 1) { /* The flow is new */ if (q->tail == SFQ_DEPTH) { /* It is the first flow */ @@ -314,7 +313,7 @@ return 0; sch->stats.drops++; - sfq_drop(sch); + sfq_drop(sch, skb); return NET_XMIT_CN; } @@ -362,8 +361,10 @@ { struct sk_buff *skb; - while ((skb = sfq_dequeue(sch)) != NULL) + while ((skb = sfq_dequeue(sch)) != NULL){ + before_explicit_drop(skb); kfree_skb(skb); + } } static void sfq_perturbation(unsigned long arg) @@ -394,8 +395,11 @@ if (ctl->limit) q->limit = min_t(u32, ctl->limit, SFQ_DEPTH); - while (sch->q.qlen >= q->limit-1) - sfq_drop(sch); + struct sk_buff * skb; + while (sch->q.qlen >= q->limit-1){ + sfq_drop(sch, &skb); + before_explicit_drop(skb); + } del_timer(&q->perturb_timer); if (q->perturb_period) { diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_tbf.c linux-2.6.8-rc4-apichanged/net/sched/sch_tbf.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_tbf.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_tbf.c 2004-08-12 16:39:11.000000000 +0200 @@ -135,19 +135,23 @@ #define L2T(q,L) ((q)->R_tab->data[(L)>>(q)->R_tab->rate.cell_log]) #define L2T_P(q,L) ((q)->P_tab->data[(L)>>(q)->P_tab->rate.cell_log]) -static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) +static int tbf_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct tbf_sched_data *q = qdisc_priv(sch); int ret; - if (skb->len > q->max_size) { + if ((*skb)->len > q->max_size) { sch->stats.drops++; + #ifdef CONFIG_NET_CLS_POLICE - if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) + if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)){ +#endif + IMPLICIT_DROP(); + return NET_XMIT_DROP; +#ifdef CONFIG_NET_CLS_POLICE + } + return NET_XMIT_RESHAPED; #endif - kfree_skb(skb); - - return NET_XMIT_DROP; } if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) { @@ -156,12 +160,12 @@ } sch->q.qlen++; - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } -static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch) +static int tbf_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct tbf_sched_data *q = qdisc_priv(sch); int ret; @@ -172,12 +176,12 @@ return ret; } -static unsigned int tbf_drop(struct Qdisc* sch) +static unsigned int tbf_drop(struct Qdisc* sch, struct sk_buff ** const skb) { struct tbf_sched_data *q = qdisc_priv(sch); unsigned int len; - if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { + if ((len = q->qdisc->ops->drop(q->qdisc, skb)) != 0) { sch->q.qlen--; sch->stats.drops++; } @@ -247,8 +251,9 @@ (cf. CSZ, HPFQ, HFSC) */ - if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { + if (q->qdisc->ops->requeue(&skb, q->qdisc) != NET_XMIT_SUCCESS) { /* When requeue fails skb is dropped */ + before_explicit_drop(skb); sch->q.qlen--; sch->stats.drops++; } diff -NaurX dontdiff linux-2.6.8-rc4-netxmitcodes/net/sched/sch_teql.c linux-2.6.8-rc4-apichanged/net/sched/sch_teql.c --- linux-2.6.8-rc4-netxmitcodes/net/sched/sch_teql.c 2004-08-10 12:27:36.000000000 +0200 +++ linux-2.6.8-rc4-apichanged/net/sched/sch_teql.c 2004-08-12 16:39:43.808269720 +0200 @@ -88,30 +88,30 @@ /* "teql*" qdisc routines */ static int -teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) +teql_enqueue(struct sk_buff ** const skb, struct Qdisc* sch) { struct net_device *dev = sch->dev; struct teql_sched_data *q = qdisc_priv(sch); - __skb_queue_tail(&q->q, skb); + __skb_queue_tail(&q->q, *skb); if (q->q.qlen <= dev->tx_queue_len) { - sch->stats.bytes += skb->len; + sch->stats.bytes += (*skb)->len; sch->stats.packets++; return 0; } - __skb_unlink(skb, &q->q); - kfree_skb(skb); + __skb_unlink(*skb, &q->q); + IMPLICIT_DROP(); sch->stats.drops++; return NET_XMIT_DROP; } static int -teql_requeue(struct sk_buff *skb, struct Qdisc* sch) +teql_requeue(struct sk_buff ** const skb, struct Qdisc* sch) { struct teql_sched_data *q = qdisc_priv(sch); - __skb_queue_head(&q->q, skb); + __skb_queue_head(&q->q, *skb); return 0; } @@ -340,6 +340,7 @@ drop: master->stats.tx_dropped++; + before_explicit_drop(skb); dev_kfree_skb(skb); return 0; } From jmorris@redhat.com Thu Aug 12 19:20:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 12 Aug 2004 19:20: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 i7D2KXC3000635 for ; Thu, 12 Aug 2004 19:20:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7D2KMe1028426; Thu, 12 Aug 2004 22:20:22 -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 i7D2KMa08867; Thu, 12 Aug 2004 22:20:22 -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 i7D2KLtM028080; Thu, 12 Aug 2004 22:20:21 -0400 Date: Thu, 12 Aug 2004 22:20:19 -0400 (EDT) From: James Morris X-X-Sender: jmorris@dhcp83-76.boston.redhat.com To: "David S. Miller" cc: netdev@oss.sgi.com, , , Subject: Re: [PATCH] Move inetdev/ifa over to RCU In-Reply-To: <20040812165954.00429e65.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7710 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 Thu, 12 Aug 2004, David S. Miller wrote: > Someone poke holes in this patch please :-) Looks ok to me. - James -- James Morris From master@tentacle.sectorb.msk.ru Fri Aug 13 01:03:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 01:03:54 -0700 (PDT) Received: from tentacle.sectorb.msk.ru (postfix@tentacle.s2s.msu.ru [193.232.119.109]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7D83k7B017464 for ; Fri, 13 Aug 2004 01:03:48 -0700 Received: by tentacle.sectorb.msk.ru (Postfix, from userid 10001) id D97132F7E; Fri, 13 Aug 2004 12:03:34 +0400 (MSD) Date: Fri, 13 Aug 2004 12:03:34 +0400 From: "Vladimir B. Savkin" To: Nuno Silva Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 Message-ID: <20040813080334.GA13337@tentacle.sectorb.msk.ru> References: <411BC284.6080807@vgertech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <411BC284.6080807@vgertech.com> X-Organization: Moscow State Univ., Dept. of Mechanics and Mathematics X-Operating-System: Linux 2.6.8-rc3-barrier User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 7711 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: master@sectorb.msk.ru Precedence: bulk X-list: netdev On Thu, Aug 12, 2004 at 08:18:28PM +0100, Nuno Silva wrote: > Hi! > > With 2.6.8-rc4-bk1 I get "Aug 12 17:33:10 puma kernel: > unregister_netdevice: waiting for ppp0 to become free. Usage count = 1" > in the logs after pppd exit. > > Also, the box won't reboot and print that message forever in the > console. sysrq-U && sysrq-R did it :-) > > The last version I tried was 2.6.8-rc2-bk11 and, wrt this prob, is > running fine. So, the problem is in that window and the changelog for > rc4 mentions something about ppp: > http://kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.8-rc4 > > If someone requires more information or tests feel free to ask! I saw this too, with 2.6.7-rc3-mm1. I have discovered that it happens because of idle TCP socket holds a reference to a network device. After killing associated process, device was freed immediately. ~ :wq With best regards, Vladimir Savkin. From herbert@gondor.apana.org.au Fri Aug 13 03:03:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 03:03: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 i7DA36tJ026822 for ; Fri, 13 Aug 2004 03:03: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 1BvYth-0002Yh-00; Fri, 13 Aug 2004 20:02:53 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvYtU-0002tT-00; Fri, 13 Aug 2004 20:02:40 +1000 From: Herbert Xu To: davem@redhat.com (David S. Miller) Subject: Re: [PATCH] Move inetdev/ifa over to RCU Cc: netdev@oss.sgi.com, robert.olsson@data.slu.se, hadi@cyberus.ca, kuznet@ms2.inr.ac.ru Organization: Core In-Reply-To: <20040812165954.00429e65.davem@redhat.com> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Fri, 13 Aug 2004 20:02:40 +1000 X-archive-position: 7712 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: > > static __inline__ struct in_device * > in_dev_get(const struct net_device *dev) > { > struct in_device *in_dev; > > - read_lock(&inetdev_lock); > + rcu_read_lock(); > in_dev = dev->ip_ptr; > if (in_dev) > atomic_inc(&in_dev->refcnt); > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > return in_dev; > } > > @@ -157,11 +158,16 @@ > > extern void in_dev_finish_destroy(struct in_device *idev); > > -static __inline__ void > -in_dev_put(struct in_device *idev) > +static inline void in_dev_rcu_destroy(struct rcu_head *head) > +{ > + struct in_device *idev = container_of(head, struct in_device, rcu_head); > + in_dev_finish_destroy(idev); > +} > + > +static inline void in_dev_put(struct in_device *idev) > { > if (atomic_dec_and_test(&idev->refcnt)) > - in_dev_finish_destroy(idev); > + call_rcu(&idev->rcu_head, in_dev_rcu_destroy); > } This doesn't look right. The only thing in_dev_get() does in the critical section is incrementing the refcnt. But here we're only delaying the destruction of the idev rather than the dropping of the refcnt. So the following race can occur with preemption: CPU0 CPU1 in_dev_get rcu_read_lock in_dev = dev->ip_ptr inetdev_destroy dev->ip_ptr = NULL in_dev_put --refcnt == 0 call_rcu refcnt++ rcu_read_unlock PREEMPT sched point in_dev_rcu_destroy use in_dev => BUG The obvious thing to do is to move the call_rcu into inetdev_destroy and get it to call in_dev_put. But we still need to make sure that nobody increments the count again without checking in_dev->dev->ip_ptr != NULL. 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 hadi@cyberus.ca Fri Aug 13 05:51:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 05:51:45 -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 i7DCpc5P001760 for ; Fri, 13 Aug 2004 05:51:39 -0700 Received: from [127.0.0.1] ([208.2.156.2]) by lotus.znyx.com (Lotus Domino Release 5.0.11) with ESMTP id 2004081305512707:74904 ; Fri, 13 Aug 2004 05:51:27 -0700 Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail From: jamal Reply-To: hadi@cyberus.ca To: sandr8_NOSPAM_@crocetta.org Cc: Alexey , "David S. Miller" , devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, Harald Welte , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <411C0FCE.9060906@crocetta.org> References: <411C0FCE.9060906@crocetta.org> Organization: jamalopolis Message-Id: <1092401484.1043.30.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 13 Aug 2004 08:51:24 -0400 X-MIMETrack: Itemize by SMTP Server on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 08/13/2004 05:51:27 AM, Serialize by Router on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 08/13/2004 05:51:33 AM, Serialize complete at 08/13/2004 05:51:33 AM Content-Transfer-Encoding: 7bit Content-Type: text/plain X-archive-position: 7713 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 Alessandro, This summary applies to all your patches: Too many changes that seem unnecessary. Take a deep breath. 1) You cant change the enqueue/dequeue API just because one qdisc doesnt seem to use it right. Whats all that contrack stuff doing in dev.c and pkt sched areas? 2) incr/decrementing ref cnt is the right way to go. skbs are shared. Try running tcpdump with your changes (and what i suspect your qdisc is doing) to see the effect. If you want to make changes to an skb, get your own copy (or copy of parts of the skb look at things like clone and skb_expand and relatives) 3) I have a feeling what you are trying to do is best achieved by using a tc action and not a qdisc. As an example (based on a conversation with Harald at OLS) i plan on doing selective contracking at the ingress/egress - but as a clean separate action and not touching any other files. If this is what you are trying to do, i can help sit on the sideline and cheer you own with advice. It is not complicated to do, time is the issue. Maybe what you are trying to do is use contracking for accounting? In which case there will be two independent actions: one to track and another to account. cheers, jamal On Thu, 2004-08-12 at 20:48, sandr8 wrote: > 2) The second patch eliminates the need for the deprecated __parent > field and eliminates some tricks such as the rx_class field... > to do so it introduces a slight change in the interface of the enqueue() > and requeue() operations... the "struct sk_buff * skb" becomes now a > "struct sk_buff ** const skb". All the in-2.6.8-kernel packet schedulers > and the core/dev.c are updated consequently... changes are quite trivial > so there's no issue for out-of-the-kernel-tree schedulers. > > in order to make it clearer i should give a broader insight... i hate to > describe the gory details but it's a bit delicate. > > a) the socket buffer for a dropped packet is freed as late as possible > (lazy lazy lazy!). in other words, locally, a packet is _candidated_ to > be dropped, but the latest word is the most global one. > > who's got the most global viewpoint? Elementary! My Dear Watson! the > most external enqueuing operation. Ok... now you get it... the stack is > your friend and will discriminate for free :) the pointer to the socket > buffer structure always stays at the same location, but is updated by > the enqueueing operations. > > This means that whatever packet "Barabba" is choosen to be dropped > internally, it can be further saved by the caller, who can exchange it > with an other victim... (i think there's no need to say who) > > b) the changes in (a) made it possible to remove the deprecated > __parent field due to cbq. this is done by handling the reshape > operation from the outside (in a very stupid loop cycle), whoever > drops whatever. > > this way we also avoid saving the class in the rx_class field, calling a > function that retrieves it and doing complex tricks to cope with the old > byval api > > c) now it's possible to have (almost) a single point (core/dev.c) where > packets are dropped. Though there are some other few places, the inline > function before_explicit_drop() easies the centralization of the > operations. this comes into great help for patch 4. > > Also, the empty macro IMPLICIT_DROP() behaves as a marker for the > reader and the coder, helping maintainance and readability. > > d) yet the reshape_fail field is kept, and the code that handled it in > the leaf disciplines is kept as well (slightly reworked but kept). this > just in case some out-of-the-kernel classful schedulers use it: we don't > want to break them (for what concerns the in-kernel-schedulers, you can > wipe out all the code related to reshape_fail without any harm, it is > not any more needed... with regard to it, what about wrapping it in some > #ifdef CONFIG_TC_DONT_BREAK_OUT_OF_THE_KERNEL_CLASSFUL_SCHEDULERS ?) > > NOTA BENE > e) it is darn important that if a packet is dropped all the outmost > queueing discipline's enqueue()'s return value tells it! > > NOTA BENE > f) kfree_skb() for locally allocated socket buffers are still there and > must stay there > > NOTA BENE > g) kfree_skb() whose semantic is to just decrement the user count are > not a packet drop. furthermore, the same kfree_skb() could have a > different run-time semantic, and is hence splitted in two, as in the > following excerpt of code: > > } > > if (terminal) { > - kfree_skb(skb); > + if( any_dropped(*qres) ){ > + before_explicit_drop(*skb); > + IMPLICIT_DROP(); > + } else > + kfree_skb(*skb); > return NULL; > } > From sandr8_NOSPAM_@crocetta.org Fri Aug 13 07:18:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 07:18:41 -0700 (PDT) Received: from vsmtp2.tin.it (vsmtp2alice.tin.it [212.216.176.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7DEIG8m005046 for ; Fri, 13 Aug 2004 07:18:34 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp2.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8CBC0001C936; Fri, 13 Aug 2004 16:09:28 +0200 Message-ID: <411CCB98.4080904@crocetta.org> Date: Fri, 13 Aug 2004 16:09:28 +0200 From: sandr8 Reply-To: sandr8_NOSPAM_@crocetta.org User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Alexey , "David S. Miller" , devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, Harald Welte , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> In-Reply-To: <1092401484.1043.30.camel@jzny.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7714 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev jamal wrote: >Alessandro, > >This summary applies to all your patches: Too many changes that seem >unnecessary. Take a deep breath. > >1) You cant change the enqueue/dequeue API just because one qdisc >doesnt seem to use it right. Whats all that contrack stuff doing in >dev.c and pkt sched areas? > the conntrack stuff (actually that little part of code that adds unbilling to ACCT in case of a drop) is something that comes later (patch 4) and is not in the pkt sched part. please, don't let it divert your mind from the real point. just forget it for the moment... [in any case it is _not_ in the pkt sched area and as i said in mail 4/4 i don't like to put the variables into dev.c, that's why i am there asking for alternatives] the api change is there to tell the outside which packet was dropped from the qdisc queue as a consequence of the enqueueing operation. the very first and most important consequence is that instead of having to call the callback function reshape_fail() from the inside of the inner qdisc and having to save information about the last visited class into rx_class and the parent qdisc into __parent you just have to *use one only line* inside a loop in the outer qdisc, isn't it neat? the main aim of all those changes in the API is not this accounting stuff but having less and simpler code, which imho is more straightforward, but this is just my viewpoint. have a look at how many lines disappeared from sch_cbq.c.... as i said, in all the other sources all code that has to do with the reshape_fail can immediatly disappear. just immagine how many lines (and ifdef blocks!) can disappear from all the inner queueing policies that use the reshape_fail(). asking the mantainer of an inner qdisc to add some (furthermore conditionally compiled) code to help the outer qdisc makes it harder to write and mantain, isn't it? yes, the patch looks big but there are many changes just because i wanted to update every single scheduler so that they complies with the slightly changed API. but now everything is ready to go and much code and overehead has become unnecessary. i mean, if what i have just written above is not a rave, then i'd say "it is better not to overcomplicate the code of any non-root policy just because one classful qdisc doesnt seem to use the API right" rather than "You cant change the enqueue/dequeue API just because one qdisc doesnt seem to use it right." and similarly i'd say "Too many things have now become unnecessary." rather than "Too many changes that seem unnecessary" ...isn't this simply amazing? >2) incr/decrementing ref cnt is the right way to go. skbs are shared. >Try running tcpdump with your changes (and what i suspect your qdisc is >doing) to see the effect. If you want to make changes to an skb, get >your own copy (or copy of parts of the skb look at things like clone and >skb_expand and relatives) > > i'm not making changes to any socket buffer... sorry i can't get the point about "If you want to make changes to an skb" i could interpret your suggestion as to increment the user count when passing a skb to the enqueue() of a qdisc so that the kfree_skb() inside will just decrement the counter, but still there's the problem of always: how can you know from the outside which packet did the kfree_skb() apply to? >3) I have a feeling what you are trying to do is best achieved by >using a tc action and not a qdisc. As an example (based on a >conversation with Harald at OLS) i plan on doing selective contracking >at the ingress/egress - but as a clean separate action and not touching >any other files. If this is what you are trying to do, i can help sit on >the sideline and cheer you own with advice. It is not complicated to do, >time is the issue. >Maybe what you are trying to do is use contracking for accounting? >In which case there will be two independent actions: one to track and >another to account. > > this is what that conntrack stuff in patch 4 was there for... better to say: patch 4 is there to unbill in case of a drop due to traffic control. the billing is already done by the patch 3 by Harald Welte, that as far as i understood was already on the way for inclusion. packet action was not there in 2.6.7 when i started coding this patch. now i might as well try to dig into it and see if it can help. but, i repeat, in any case the main aim of all those changes in the API is not this accounting stuff but having less and simpler code. >cheers, >jamal > > > ciao and thank you for the attention! sandr8) >On Thu, 2004-08-12 at 20:48, sandr8 wrote: > > >>2) The second patch eliminates the need for the deprecated __parent >>field and eliminates some tricks such as the rx_class field... >>to do so it introduces a slight change in the interface of the enqueue() >>and requeue() operations... the "struct sk_buff * skb" becomes now a >>"struct sk_buff ** const skb". All the in-2.6.8-kernel packet schedulers >>and the core/dev.c are updated consequently... changes are quite trivial >>so there's no issue for out-of-the-kernel-tree schedulers. >> >>in order to make it clearer i should give a broader insight... i hate to >>describe the gory details but it's a bit delicate. >> >>a) the socket buffer for a dropped packet is freed as late as possible >>(lazy lazy lazy!). in other words, locally, a packet is _candidated_ to >>be dropped, but the latest word is the most global one. >> >>who's got the most global viewpoint? Elementary! My Dear Watson! the >>most external enqueuing operation. Ok... now you get it... the stack is >>your friend and will discriminate for free :) the pointer to the socket >>buffer structure always stays at the same location, but is updated by >>the enqueueing operations. >> >>This means that whatever packet "Barabba" is choosen to be dropped >>internally, it can be further saved by the caller, who can exchange it >>with an other victim... (i think there's no need to say who) >> >>b) the changes in (a) made it possible to remove the deprecated >>__parent field due to cbq. this is done by handling the reshape >>operation from the outside (in a very stupid loop cycle), whoever >>drops whatever. >> >>this way we also avoid saving the class in the rx_class field, calling a >>function that retrieves it and doing complex tricks to cope with the old >>byval api >> >>c) now it's possible to have (almost) a single point (core/dev.c) where >>packets are dropped. Though there are some other few places, the inline >>function before_explicit_drop() easies the centralization of the >>operations. this comes into great help for patch 4. >> >>Also, the empty macro IMPLICIT_DROP() behaves as a marker for the >>reader and the coder, helping maintainance and readability. >> >>d) yet the reshape_fail field is kept, and the code that handled it in >>the leaf disciplines is kept as well (slightly reworked but kept). this >>just in case some out-of-the-kernel classful schedulers use it: we don't >>want to break them (for what concerns the in-kernel-schedulers, you can >>wipe out all the code related to reshape_fail without any harm, it is >>not any more needed... with regard to it, what about wrapping it in some >>#ifdef CONFIG_TC_DONT_BREAK_OUT_OF_THE_KERNEL_CLASSFUL_SCHEDULERS ?) >> >>NOTA BENE >>e) it is darn important that if a packet is dropped all the outmost >>queueing discipline's enqueue()'s return value tells it! >> >>NOTA BENE >>f) kfree_skb() for locally allocated socket buffers are still there and >>must stay there >> >>NOTA BENE >>g) kfree_skb() whose semantic is to just decrement the user count are >>not a packet drop. furthermore, the same kfree_skb() could have a >>different run-time semantic, and is hence splitted in two, as in the >>following excerpt of code: >> >> } >> >> if (terminal) { >>- kfree_skb(skb); >>+ if( any_dropped(*qres) ){ >>+ before_explicit_drop(*skb); >>+ IMPLICIT_DROP(); >>+ } else >>+ kfree_skb(*skb); >> return NULL; >> } >> >> >> > > > > > > > From shemminger@osdl.org Fri Aug 13 09:03:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 09:03:45 -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 i7DG3cTA011673 for ; Fri, 13 Aug 2004 09:03:38 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7DG3E112150; Fri, 13 Aug 2004 09:03:14 -0700 Date: Fri, 13 Aug 2004 09:03:14 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com, robert.olsson@data.slu.se, hadi@cyberus.ca, kuznet@ms2.inr.ac.ru Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> In-Reply-To: <20040812165954.00429e65.davem@redhat.com> References: <20040812165954.00429e65.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7715 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 > static __inline__ struct in_device * > in_dev_get(const struct net_device *dev) > { > struct in_device *in_dev; > > - read_lock(&inetdev_lock); > + rcu_read_lock(); > in_dev = dev->ip_ptr; Don't you need a smp_read_barrier_depends() here? > if (in_dev) > atomic_inc(&in_dev->refcnt); > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > return in_dev; > } > > @@ -157,11 +158,16 @@ > > extern void in_dev_finish_destroy(struct in_device *idev); > > -static __inline__ void > -in_dev_put(struct in_device *idev) > +static inline void in_dev_rcu_destroy(struct rcu_head *head) > +{ > + struct in_device *idev = container_of(head, struct in_device, rcu_head); > + in_dev_finish_destroy(idev); > +} > + > +static inline void in_dev_put(struct in_device *idev) > { > if (atomic_dec_and_test(&idev->refcnt)) > - in_dev_finish_destroy(idev); > + call_rcu(&idev->rcu_head, in_dev_rcu_destroy); > } > > #define __in_dev_put(idev) atomic_dec(&(idev)->refcnt) > diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c > --- a/net/ipv4/devinet.c 2004-08-12 16:42:31 -07:00 > +++ b/net/ipv4/devinet.c 2004-08-12 16:42:31 -07:00 > @@ -88,12 +88,9 @@ > static void devinet_sysctl_unregister(struct ipv4_devconf *p); > #endif > > -int inet_ifa_count; > -int inet_dev_count; > - > /* Locks all the inet devices. */ > > -rwlock_t inetdev_lock = RW_LOCK_UNLOCKED; > +static spinlock_t inetdev_lock = SPIN_LOCK_UNLOCKED; > > static struct in_ifaddr *inet_alloc_ifa(void) > { > @@ -101,18 +98,24 @@ > > if (ifa) { > memset(ifa, 0, sizeof(*ifa)); > - inet_ifa_count++; > + INIT_RCU_HEAD(&ifa->rcu_head); > } > > return ifa; > } > > -static __inline__ void inet_free_ifa(struct in_ifaddr *ifa) > +static inline void inet_free_ifa(struct in_ifaddr *ifa) > { > if (ifa->ifa_dev) > - __in_dev_put(ifa->ifa_dev); > + in_dev_put(ifa->ifa_dev); > kfree(ifa); > - inet_ifa_count--; > +} > + > +static void inet_rcu_free_ifa(struct rcu_head *head) > +{ > + struct in_ifaddr *ifa = container_of(head, struct in_ifaddr, rcu_head); > + > + inet_free_ifa(ifa); > } > > void in_dev_finish_destroy(struct in_device *idev) > @@ -129,7 +132,6 @@ > if (!idev->dead) > printk("Freeing alive in_device %p\n", idev); > else { > - inet_dev_count--; > kfree(idev); > } > } > @@ -144,24 +146,23 @@ > if (!in_dev) > goto out; > memset(in_dev, 0, sizeof(*in_dev)); > - in_dev->lock = RW_LOCK_UNLOCKED; > + INIT_RCU_HEAD(&in_dev->rcu_head); > memcpy(&in_dev->cnf, &ipv4_devconf_dflt, sizeof(in_dev->cnf)); > in_dev->cnf.sysctl = NULL; > in_dev->dev = dev; > if ((in_dev->arp_parms = neigh_parms_alloc(dev, &arp_tbl)) == NULL) > goto out_kfree; > - inet_dev_count++; > /* Reference in_dev->dev */ > dev_hold(dev); > #ifdef CONFIG_SYSCTL > neigh_sysctl_register(dev, in_dev->arp_parms, NET_IPV4, > NET_IPV4_NEIGH, "ipv4", NULL); > #endif > - write_lock_bh(&inetdev_lock); > + spin_lock_bh(&inetdev_lock); > dev->ip_ptr = in_dev; > /* Account for reference dev->ip_ptr */ > in_dev_hold(in_dev); > - write_unlock_bh(&inetdev_lock); > + spin_unlock_bh(&inetdev_lock); > #ifdef CONFIG_SYSCTL > devinet_sysctl_register(in_dev, &in_dev->cnf); > #endif > @@ -188,16 +189,16 @@ > > while ((ifa = in_dev->ifa_list) != NULL) { > inet_del_ifa(in_dev, &in_dev->ifa_list, 0); > - inet_free_ifa(ifa); > + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); > } > > #ifdef CONFIG_SYSCTL > devinet_sysctl_unregister(&in_dev->cnf); > #endif > - write_lock_bh(&inetdev_lock); > + spin_lock_bh(&inetdev_lock); > in_dev->dev->ip_ptr = NULL; > /* in_dev_put following below will kill the in_device */ > - write_unlock_bh(&inetdev_lock); > + spin_unlock_bh(&inetdev_lock); > > #ifdef CONFIG_SYSCTL > neigh_sysctl_unregister(in_dev->arp_parms); > @@ -208,16 +209,16 @@ > > int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b) > { > - read_lock(&in_dev->lock); > + rcu_read_lock(); > for_primary_ifa(in_dev) { And probably need smp_read_barrier_depends here > if (inet_ifa_match(a, ifa)) { > if (!b || inet_ifa_match(b, ifa)) { > - read_unlock(&in_dev->lock); > + rcu_read_unlock(); > return 1; > } > } > } endfor_ifa(in_dev); > - read_unlock(&in_dev->lock); > + rcu_read_unlock(); > return 0; > } > > @@ -241,21 +242,21 @@ > ifap1 = &ifa->ifa_next; > continue; > } > - write_lock_bh(&in_dev->lock); > + spin_lock_bh(&inetdev_lock); > *ifap1 = ifa->ifa_next; > - write_unlock_bh(&in_dev->lock); > + spin_unlock_bh(&inetdev_lock); > > rtmsg_ifa(RTM_DELADDR, ifa); > notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa); > - inet_free_ifa(ifa); > + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); > } > } > > /* 2. Unlink it */ > > - write_lock_bh(&in_dev->lock); > + spin_lock_bh(&inetdev_lock); > *ifap = ifa1->ifa_next; > - write_unlock_bh(&in_dev->lock); > + spin_unlock_bh(&inetdev_lock); > > /* 3. Announce address deletion */ > > @@ -270,7 +271,7 @@ > rtmsg_ifa(RTM_DELADDR, ifa1); > notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); > if (destroy) { > - inet_free_ifa(ifa1); > + call_rcu(&ifa1->rcu_head, inet_rcu_free_ifa); > > if (!in_dev->ifa_list) > inetdev_destroy(in_dev); > @@ -285,7 +286,7 @@ > ASSERT_RTNL(); > > if (!ifa->ifa_local) { > - inet_free_ifa(ifa); > + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); > return 0; > } > > @@ -300,11 +301,11 @@ > if (ifa1->ifa_mask == ifa->ifa_mask && > inet_ifa_match(ifa1->ifa_address, ifa)) { > if (ifa1->ifa_local == ifa->ifa_local) { > - inet_free_ifa(ifa); > + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); > return -EEXIST; > } > if (ifa1->ifa_scope != ifa->ifa_scope) { > - inet_free_ifa(ifa); > + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); > return -EINVAL; > } > ifa->ifa_flags |= IFA_F_SECONDARY; > @@ -317,9 +318,9 @@ > } > > ifa->ifa_next = *ifap; > - write_lock_bh(&in_dev->lock); > + spin_lock_bh(&inetdev_lock); > *ifap = ifa; > - write_unlock_bh(&in_dev->lock); > + spin_unlock_bh(&inetdev_lock); > > /* Send message first, then call notifier. > Notifier will trigger FIB update, so that > @@ -339,7 +340,7 @@ > if (!in_dev) { > in_dev = inetdev_init(dev); > if (!in_dev) { > - inet_free_ifa(ifa); > + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); > return -ENOBUFS; > } > } > @@ -771,12 +772,11 @@ > u32 addr = 0; > struct in_device *in_dev; > > - read_lock(&inetdev_lock); > + rcu_read_lock(); > in_dev = __in_dev_get(dev); > if (!in_dev) > goto out_unlock_inetdev; > > - read_lock(&in_dev->lock); > for_primary_ifa(in_dev) { > if (ifa->ifa_scope > scope) > continue; > @@ -787,8 +787,7 @@ > if (!addr) > addr = ifa->ifa_local; > } endfor_ifa(in_dev); > - read_unlock(&in_dev->lock); > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > > if (addr) > goto out; > @@ -798,30 +797,25 @@ > in dev_base list. > */ > read_lock(&dev_base_lock); > - read_lock(&inetdev_lock); > + rcu_read_lock(); > for (dev = dev_base; dev; dev = dev->next) { > if ((in_dev = __in_dev_get(dev)) == NULL) > continue; > > - read_lock(&in_dev->lock); > for_primary_ifa(in_dev) { > if (ifa->ifa_scope != RT_SCOPE_LINK && > ifa->ifa_scope <= scope) { > - read_unlock(&in_dev->lock); > addr = ifa->ifa_local; > goto out_unlock_both; > } > } endfor_ifa(in_dev); > - read_unlock(&in_dev->lock); > } > out_unlock_both: > - read_unlock(&inetdev_lock); > read_unlock(&dev_base_lock); > +out_unlock_inetdev: > + rcu_read_unlock(); > out: > return addr; > -out_unlock_inetdev: > - read_unlock(&inetdev_lock); > - goto out; > } > > static u32 confirm_addr_indev(struct in_device *in_dev, u32 dst, > @@ -874,29 +868,24 @@ > struct in_device *in_dev; > > if (dev) { > - read_lock(&inetdev_lock); > - if ((in_dev = __in_dev_get(dev))) { > - read_lock(&in_dev->lock); > + rcu_read_lock(); > + if ((in_dev = __in_dev_get(dev))) > addr = confirm_addr_indev(in_dev, dst, local, scope); > - read_unlock(&in_dev->lock); > - } > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > > return addr; > } > > read_lock(&dev_base_lock); > - read_lock(&inetdev_lock); > + rcu_read_lock(); > for (dev = dev_base; dev; dev = dev->next) { > if ((in_dev = __in_dev_get(dev))) { > - read_lock(&in_dev->lock); > addr = confirm_addr_indev(in_dev, dst, local, scope); > - read_unlock(&in_dev->lock); > if (addr) > break; > } > } > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > read_unlock(&dev_base_lock); > > return addr; > @@ -1065,12 +1054,12 @@ > continue; > if (idx > s_idx) > s_ip_idx = 0; > - read_lock(&inetdev_lock); > + rcu_read_lock(); > if ((in_dev = __in_dev_get(dev)) == NULL) { > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > continue; > } > - read_lock(&in_dev->lock); > + > for (ifa = in_dev->ifa_list, ip_idx = 0; ifa; > ifa = ifa->ifa_next, ip_idx++) { > if (ip_idx < s_ip_idx) > @@ -1078,13 +1067,11 @@ > if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid, > cb->nlh->nlmsg_seq, > RTM_NEWADDR) <= 0) { > - read_unlock(&in_dev->lock); > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > goto done; > } > } > - read_unlock(&in_dev->lock); > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > } > > done: > @@ -1138,11 +1125,11 @@ > read_lock(&dev_base_lock); > for (dev = dev_base; dev; dev = dev->next) { > struct in_device *in_dev; > - read_lock(&inetdev_lock); > + rcu_read_lock(); > in_dev = __in_dev_get(dev); > if (in_dev) > in_dev->cnf.forwarding = on; > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > } > read_unlock(&dev_base_lock); > > @@ -1508,6 +1495,5 @@ > EXPORT_SYMBOL(in_dev_finish_destroy); > EXPORT_SYMBOL(inet_select_addr); > EXPORT_SYMBOL(inetdev_by_index); > -EXPORT_SYMBOL(inetdev_lock); > EXPORT_SYMBOL(register_inetaddr_notifier); > EXPORT_SYMBOL(unregister_inetaddr_notifier); > diff -Nru a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c > --- a/net/ipv4/fib_frontend.c 2004-08-12 16:42:31 -07:00 > +++ b/net/ipv4/fib_frontend.c 2004-08-12 16:42:31 -07:00 > @@ -172,13 +172,13 @@ > int ret; > > no_addr = rpf = 0; > - read_lock(&inetdev_lock); > + rcu_read_lock(); > in_dev = __in_dev_get(dev); > if (in_dev) { > no_addr = in_dev->ifa_list == NULL; > rpf = IN_DEV_RPFILTER(in_dev); > } > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > > if (in_dev == NULL) > goto e_inval; > diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c > --- a/net/ipv4/icmp.c 2004-08-12 16:42:31 -07:00 > +++ b/net/ipv4/icmp.c 2004-08-12 16:42:31 -07:00 > @@ -878,7 +878,7 @@ > in_dev = in_dev_get(dev); > if (!in_dev) > goto out; > - read_lock(&in_dev->lock); > + rcu_read_lock(); > if (in_dev->ifa_list && > IN_DEV_LOG_MARTIANS(in_dev) && > IN_DEV_FORWARD(in_dev)) { > @@ -895,7 +895,7 @@ > NIPQUAD(mask), dev->name, NIPQUAD(rt->rt_src)); > } > } > - read_unlock(&in_dev->lock); > + rcu_read_unlock(); > in_dev_put(in_dev); > out:; > } > diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c > --- a/net/ipv4/igmp.c 2004-08-12 16:42:31 -07:00 > +++ b/net/ipv4/igmp.c 2004-08-12 16:42:31 -07:00 > @@ -487,7 +487,7 @@ > int type; > > if (!pmc) { > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { > if (pmc->multiaddr == IGMP_ALL_HOSTS) > continue; > @@ -499,7 +499,7 @@ > skb = add_grec(skb, pmc, type, 0, 0); > spin_unlock_bh(&pmc->lock); > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > } else { > spin_lock_bh(&pmc->lock); > if (pmc->sfcount[MCAST_EXCLUDE]) > @@ -541,8 +541,8 @@ > struct sk_buff *skb = NULL; > int type, dtype; > > - read_lock(&in_dev->lock); > - write_lock_bh(&in_dev->mc_lock); > + read_lock(&in_dev->mc_list_lock); > + spin_lock_bh(&in_dev->mc_tomb_lock); > > /* deleted MCA's */ > pmc_prev = NULL; > @@ -575,7 +575,7 @@ > } else > pmc_prev = pmc; > } > - write_unlock_bh(&in_dev->mc_lock); > + spin_unlock_bh(&in_dev->mc_tomb_lock); > > /* change recs */ > for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { > @@ -601,7 +601,8 @@ > } > spin_unlock_bh(&pmc->lock); > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > + > if (!skb) > return; > (void) igmpv3_sendpack(skb); > @@ -759,14 +760,14 @@ > if (group == IGMP_ALL_HOSTS) > return; > > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (im=in_dev->mc_list; im!=NULL; im=im->next) { > if (im->multiaddr == group) { > igmp_stop_timer(im); > break; > } > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > } > > static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, > @@ -840,7 +841,7 @@ > * - Use the igmp->igmp_code field as the maximum > * delay possible > */ > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (im=in_dev->mc_list; im!=NULL; im=im->next) { > if (group && group != im->multiaddr) > continue; > @@ -856,7 +857,7 @@ > spin_unlock_bh(&im->lock); > igmp_mod_timer(im, max_delay); > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > } > > int igmp_rcv(struct sk_buff *skb) > @@ -982,10 +983,10 @@ > } > spin_unlock_bh(&im->lock); > > - write_lock_bh(&in_dev->mc_lock); > + spin_lock_bh(&in_dev->mc_tomb_lock); > pmc->next = in_dev->mc_tomb; > in_dev->mc_tomb = pmc; > - write_unlock_bh(&in_dev->mc_lock); > + spin_unlock_bh(&in_dev->mc_tomb_lock); > } > > static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr) > @@ -993,7 +994,7 @@ > struct ip_mc_list *pmc, *pmc_prev; > struct ip_sf_list *psf, *psf_next; > > - write_lock_bh(&in_dev->mc_lock); > + spin_lock_bh(&in_dev->mc_tomb_lock); > pmc_prev = NULL; > for (pmc=in_dev->mc_tomb; pmc; pmc=pmc->next) { > if (pmc->multiaddr == multiaddr) > @@ -1006,7 +1007,7 @@ > else > in_dev->mc_tomb = pmc->next; > } > - write_unlock_bh(&in_dev->mc_lock); > + spin_unlock_bh(&in_dev->mc_tomb_lock); > if (pmc) { > for (psf=pmc->tomb; psf; psf=psf_next) { > psf_next = psf->sf_next; > @@ -1021,10 +1022,10 @@ > { > struct ip_mc_list *pmc, *nextpmc; > > - write_lock_bh(&in_dev->mc_lock); > + spin_lock_bh(&in_dev->mc_tomb_lock); > pmc = in_dev->mc_tomb; > in_dev->mc_tomb = NULL; > - write_unlock_bh(&in_dev->mc_lock); > + spin_unlock_bh(&in_dev->mc_tomb_lock); > > for (; pmc; pmc = nextpmc) { > nextpmc = pmc->next; > @@ -1033,7 +1034,7 @@ > kfree(pmc); > } > /* clear dead sources, too */ > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { > struct ip_sf_list *psf, *psf_next; > > @@ -1046,7 +1047,7 @@ > kfree(psf); > } > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > } > #endif > > @@ -1167,10 +1168,10 @@ > im->gsquery = 0; > #endif > im->loaded = 0; > - write_lock_bh(&in_dev->lock); > + write_lock_bh(&in_dev->mc_list_lock); > im->next=in_dev->mc_list; > in_dev->mc_list=im; > - write_unlock_bh(&in_dev->lock); > + write_unlock_bh(&in_dev->mc_list_lock); > #ifdef CONFIG_IP_MULTICAST > igmpv3_del_delrec(in_dev, im->multiaddr); > #endif > @@ -1194,9 +1195,9 @@ > for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) { > if (i->multiaddr==addr) { > if (--i->users == 0) { > - write_lock_bh(&in_dev->lock); > + write_lock_bh(&in_dev->mc_list_lock); > *ip = i->next; > - write_unlock_bh(&in_dev->lock); > + write_unlock_bh(&in_dev->mc_list_lock); > igmp_group_dropped(i); > > if (!in_dev->dead) > @@ -1251,7 +1252,8 @@ > in_dev->mr_qrv = IGMP_Unsolicited_Report_Count; > #endif > > - in_dev->mc_lock = RW_LOCK_UNLOCKED; > + in_dev->mc_list_lock = RW_LOCK_UNLOCKED; > + in_dev->mc_tomb_lock = SPIN_LOCK_UNLOCKED; > } > > /* Device going up */ > @@ -1281,17 +1283,17 @@ > /* Deactivate timers */ > ip_mc_down(in_dev); > > - write_lock_bh(&in_dev->lock); > + write_lock_bh(&in_dev->mc_list_lock); > while ((i = in_dev->mc_list) != NULL) { > in_dev->mc_list = i->next; > - write_unlock_bh(&in_dev->lock); > + write_unlock_bh(&in_dev->mc_list_lock); > > igmp_group_dropped(i); > ip_ma_put(i); > > - write_lock_bh(&in_dev->lock); > + write_lock_bh(&in_dev->mc_list_lock); > } > - write_unlock_bh(&in_dev->lock); > + write_unlock_bh(&in_dev->mc_list_lock); > } > > static struct in_device * ip_mc_find_dev(struct ip_mreqn *imr) > @@ -1391,18 +1393,18 @@ > > if (!in_dev) > return -ENODEV; > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { > if (*pmca == pmc->multiaddr) > break; > } > if (!pmc) { > /* MCA not found?? bug */ > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > return -ESRCH; > } > spin_lock_bh(&pmc->lock); > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > #ifdef CONFIG_IP_MULTICAST > sf_markstate(pmc); > #endif > @@ -1527,18 +1529,18 @@ > > if (!in_dev) > return -ENODEV; > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) { > if (*pmca == pmc->multiaddr) > break; > } > if (!pmc) { > /* MCA not found?? bug */ > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > return -ESRCH; > } > spin_lock_bh(&pmc->lock); > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > > #ifdef CONFIG_IP_MULTICAST > sf_markstate(pmc); > @@ -2095,7 +2097,7 @@ > struct ip_sf_list *psf; > int rv = 0; > > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > for (im=in_dev->mc_list; im; im=im->next) { > if (im->multiaddr == mc_addr) > break; > @@ -2117,7 +2119,7 @@ > } else > rv = 1; /* unspecified source; tentatively allow */ > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > return rv; > } > > @@ -2141,13 +2143,13 @@ > in_dev = in_dev_get(state->dev); > if (!in_dev) > continue; > - read_lock(&in_dev->lock); > + read_lock(&in_dev->mc_list_lock); > im = in_dev->mc_list; > if (im) { > state->in_dev = in_dev; > break; > } > - read_unlock(&in_dev->lock); > + read_unlock(&in_dev->mc_list_lock); > in_dev_put(in_dev); > } > return im; > @@ -2159,7 +2161,7 @@ > im = im->next; > while (!im) { > if (likely(state->in_dev != NULL)) { > - read_unlock(&state->in_dev->lock); > + read_unlock(&state->in_dev->mc_list_lock); > in_dev_put(state->in_dev); > } > state->dev = state->dev->next; > @@ -2170,7 +2172,7 @@ > state->in_dev = in_dev_get(state->dev); > if (!state->in_dev) > continue; > - read_lock(&state->in_dev->lock); > + read_lock(&state->in_dev->mc_list_lock); > im = state->in_dev->mc_list; > } > return im; > @@ -2206,7 +2208,7 @@ > { > struct igmp_mc_iter_state *state = igmp_mc_seq_private(seq); > if (likely(state->in_dev != NULL)) { > - read_unlock(&state->in_dev->lock); > + read_unlock(&state->in_dev->mc_list_lock); > in_dev_put(state->in_dev); > state->in_dev = NULL; > } > @@ -2304,7 +2306,7 @@ > idev = in_dev_get(state->dev); > if (unlikely(idev == NULL)) > continue; > - read_lock_bh(&idev->lock); > + read_lock(&idev->mc_list_lock); > im = idev->mc_list; > if (likely(im != NULL)) { > spin_lock_bh(&im->lock); > @@ -2316,7 +2318,7 @@ > } > spin_unlock_bh(&im->lock); > } > - read_unlock_bh(&idev->lock); > + read_unlock(&idev->mc_list_lock); > in_dev_put(idev); > } > return psf; > @@ -2332,7 +2334,7 @@ > state->im = state->im->next; > while (!state->im) { > if (likely(state->idev != NULL)) { > - read_unlock_bh(&state->idev->lock); > + read_unlock(&state->idev->mc_list_lock); > in_dev_put(state->idev); > } > state->dev = state->dev->next; > @@ -2343,7 +2345,7 @@ > state->idev = in_dev_get(state->dev); > if (!state->idev) > continue; > - read_lock_bh(&state->idev->lock); > + read_lock(&state->idev->mc_list_lock); > state->im = state->idev->mc_list; > } > if (!state->im) > @@ -2389,7 +2391,7 @@ > state->im = NULL; > } > if (likely(state->idev != NULL)) { > - read_unlock_bh(&state->idev->lock); > + read_unlock(&state->idev->mc_list_lock); > in_dev_put(state->idev); > state->idev = NULL; > } > diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c > --- a/net/ipv4/route.c 2004-08-12 16:42:31 -07:00 > +++ b/net/ipv4/route.c 2004-08-12 16:42:31 -07:00 > @@ -1855,7 +1855,7 @@ > if (MULTICAST(daddr)) { > struct in_device *in_dev; > > - read_lock(&inetdev_lock); > + rcu_read_lock(); > if ((in_dev = __in_dev_get(dev)) != NULL) { > int our = ip_check_mc(in_dev, daddr, saddr, > skb->nh.iph->protocol); > @@ -1864,12 +1864,12 @@ > || (!LOCAL_MCAST(daddr) && IN_DEV_MFORWARD(in_dev)) > #endif > ) { > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > return ip_route_input_mc(skb, daddr, saddr, > tos, dev, our); > } > } > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > return -EINVAL; > } > return ip_route_input_slow(skb, daddr, saddr, tos, dev); > diff -Nru a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c > --- a/net/irda/irlan/irlan_eth.c 2004-08-12 16:42:31 -07:00 > +++ b/net/irda/irlan/irlan_eth.c 2004-08-12 16:42:31 -07:00 > @@ -306,7 +306,7 @@ > in_dev = in_dev_get(dev); > if (in_dev == NULL) > return; > - read_lock(&in_dev->lock); > + rcu_read_lock(); > if (in_dev->ifa_list) > > arp_send(ARPOP_REQUEST, ETH_P_ARP, > @@ -314,7 +314,7 @@ > dev, > in_dev->ifa_list->ifa_address, > NULL, dev->dev_addr, NULL); > - read_unlock(&in_dev->lock); > + rcu_read_unlock(); > in_dev_put(in_dev); > #endif /* CONFIG_INET */ > } > diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c > --- a/net/sctp/protocol.c 2004-08-12 16:42:31 -07:00 > +++ b/net/sctp/protocol.c 2004-08-12 16:42:31 -07:00 > @@ -148,13 +148,12 @@ > struct in_ifaddr *ifa; > struct sctp_sockaddr_entry *addr; > > - read_lock(&inetdev_lock); > + rcu_read_lock(); > if ((in_dev = __in_dev_get(dev)) == NULL) { > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > return; > } > > - read_lock(&in_dev->lock); > for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { > /* Add the address to the local list. */ > addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC); > @@ -166,8 +165,7 @@ > } > } > > - read_unlock(&in_dev->lock); > - read_unlock(&inetdev_lock); > + rcu_read_unlock(); > } > > /* Extract our IP addresses from the system and stash them in the From davem@redhat.com Fri Aug 13 09:40:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 09:40:18 -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 i7DGeBuL012718 for ; Fri, 13 Aug 2004 09:40:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7DGdqe1027396; Fri, 13 Aug 2004 12:39:52 -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 i7DGdqa01648; Fri, 13 Aug 2004 12:39:52 -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 i7DGd3YJ004375; Fri, 13 Aug 2004 12:39:03 -0400 Date: Fri, 13 Aug 2004 09:38:38 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com, herbert@gondor.apana.org.au Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040813093838.6961c0d4.davem@redhat.com> In-Reply-To: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.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: 7716 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 Thanks guys. This patch should fix both problems. Herbert, if we check inetdev->dead when trying to grab a reference it fixes the RCU destroy race you mentioned. I really don't want to put that ref drop into the RCU callback as that would kill performance. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/13 09:17:07-07:00 davem@nuts.davemloft.net # [IPV4]: Fix two bugs in inetdev RCU handling. # # - Two missing smp_read_barrier_depends() noticed by # Stephen Hemminger. # - Fix RCU inetdev destroy race spotted by Herbert Xu. # Check in_dev->dead when trying to grab a reference. # # Signed-off-by: David S. Miller # # net/ipv4/devinet.c # 2004/08/13 09:15:41-07:00 davem@nuts.davemloft.net +1 -0 # [IPV4]: Fix two bugs in inetdev RCU handling. # # include/linux/inetdevice.h # 2004/08/13 09:15:41-07:00 davem@nuts.davemloft.net +7 -2 # [IPV4]: Fix two bugs in inetdev RCU handling. # diff -Nru a/include/linux/inetdevice.h b/include/linux/inetdevice.h --- a/include/linux/inetdevice.h 2004-08-13 09:20:01 -07:00 +++ b/include/linux/inetdevice.h 2004-08-13 09:20:01 -07:00 @@ -143,9 +143,14 @@ struct in_device *in_dev; rcu_read_lock(); + smp_read_barrier_depends(); in_dev = dev->ip_ptr; - if (in_dev) - atomic_inc(&in_dev->refcnt); + if (in_dev) { + if (in_dev->dead) + in_dev = NULL; + else + atomic_inc(&in_dev->refcnt); + } rcu_read_unlock(); return in_dev; } diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c 2004-08-13 09:20:01 -07:00 +++ b/net/ipv4/devinet.c 2004-08-13 09:20:01 -07:00 @@ -210,6 +210,7 @@ int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b) { rcu_read_lock(); + smp_read_barrier_depends(); for_primary_ifa(in_dev) { if (inet_ifa_match(a, ifa)) { if (!b || inet_ifa_match(b, ifa)) { From marcelo.tosatti@cyclades.com Fri Aug 13 09:52:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 09:52: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 i7DGqDkd013239 for ; Fri, 13 Aug 2004 09:52:14 -0700 Received: from [127.0.0.1] (helo=logos.cnet) by www.linux.org.uk with esmtp (Exim 4.33) id 1BvfHj-0006Cc-Jc for netdev@oss.sgi.com; Fri, 13 Aug 2004 17:52:07 +0100 Received: by logos.cnet (Postfix, from userid 500) id 16D0BF30C4; Fri, 13 Aug 2004 12:30:47 -0300 (BRT) Date: Fri, 13 Aug 2004 12:30:47 -0300 From: Marcelo Tosatti To: netdev@oss.sgi.com Subject: 8390.c workaround for interrupt storm Message-ID: <20040813153047.GC28640@logos.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1i X-archive-position: 7717 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: marcelo.tosatti@cyclades.com Precedence: bulk X-list: netdev Hi netdev, We've been seeing an interrupt storm on our embedded PowerPC systems with Linksys PCMLM56 (network+modem) PCMCIA cards (network part of it driven by pcnet_cs.c) as soon as the network cable is pluged/unpluged and after some activity on the serial line. The card goes nuts, and doesnt stop sending interrupts. So I hacked up this patch which resets the 8390 chip as soon as 256 empty interrupts are triggered. Works fine, the card comes back to sanity after resetting. Not sure if its specific to our boards, but I believe it might happen on other archs also, so I'm posting it here in the hope it might be useful for someone with the same problem. Not likely to be included in mainline driver, but hey, why not, its protection against hardware insanity. --- 8390.c.orig 2004-08-13 11:54:28.000000000 -0300 +++ 8390.c 2004-08-13 11:54:07.000000000 -0300 @@ -411,6 +411,8 @@ * needed. */ +int interrupt_cnt = 0; + void ei_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -493,6 +495,22 @@ outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base + E8390_CMD); } + + /* + * Workaround infinite interrupt storm caused by Linksys combocard + * on embedded PowerPC. Other cards/platform can suffer + * from the same. Reset the device if we get more than 256 + * empty interrupts. + */ + if (!nr_serviced) + interrupt_cnt++; + else + interrupt_cnt = 0; + + if (interrupt_cnt > 256) { + ei_status.reset_8390(dev); + interrupt_cnt = 0; + } if (interrupts && ei_debug) { From shemminger@osdl.org Fri Aug 13 11:52:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 11:52:13 -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 i7DIq6N2018656 for ; Fri, 13 Aug 2004 11:52:06 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7DIpe112949; Fri, 13 Aug 2004 11:51:41 -0700 Date: Fri, 13 Aug 2004 11:51:40 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, Ben Greear Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040813115140.0f09d889@dell_ss3.pdx.osdl.net> In-Reply-To: <20040812124854.646f1936.davem@redhat.com> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040812124854.646f1936.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7718 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 another alternative, using tansworthe generator. It uses percpu state. The one small semantic change is the net_srandom() only affects the current cpu's seed. The problem was that having it change all cpu's seed would mean adding locking and the only user's today are a couple of places that feed in mac address to try make sure address resolution to collide. diff -Nru a/include/linux/net.h b/include/linux/net.h --- a/include/linux/net.h 2004-08-13 11:48:43 -07:00 +++ b/include/linux/net.h 2004-08-13 11:48:43 -07:00 @@ -169,6 +169,7 @@ extern int net_ratelimit(void); extern unsigned long net_random(void); extern void net_srandom(unsigned long); +extern void net_random_init(void); extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec, size_t num, size_t len); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-08-13 11:48:43 -07:00 +++ b/net/core/dev.c 2004-08-13 11:48:43 -07:00 @@ -3280,6 +3280,8 @@ BUG_ON(!dev_boot_phase); + net_random_init(); + if (dev_proc_init()) goto out; diff -Nru a/net/core/utils.c b/net/core/utils.c --- a/net/core/utils.c 2004-08-13 11:48:43 -07:00 +++ b/net/core/utils.c 2004-08-13 11:48:43 -07:00 @@ -19,22 +19,116 @@ #include #include #include +#include +#include #include #include -static unsigned long net_rand_seed = 152L; + +/* + This is a maximally equidistributed combined Tausworthe generator + based on code from GNU Scientific Library 1.5 (30 Jun 2004) + + x_n = (s1_n ^ s2_n ^ s3_n) + + s1_{n+1} = (((s1_n & 4294967294) <<12) ^ (((s1_n <<13) ^ s1_n) >>19)) + s2_{n+1} = (((s2_n & 4294967288) << 4) ^ (((s2_n << 2) ^ s2_n) >>25)) + s3_{n+1} = (((s3_n & 4294967280) <<17) ^ (((s3_n << 3) ^ s3_n) >>11)) + + The period of this generator is about 2^88. + + From: P. L'Ecuyer, "Maximally Equidistributed Combined Tausworthe + Generators", Mathematics of Computation, 65, 213 (1996), 203--213. + + This is available on the net from L'Ecuyer's home page, + + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme.ps + ftp://ftp.iro.umontreal.ca/pub/simulation/lecuyer/papers/tausme.ps + + There is an erratum in the paper "Tables of Maximally + Equidistributed Combined LFSR Generators", Mathematics of + Computation, 68, 225 (1999), 261--269: + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme2.ps + + ... the k_j most significant bits of z_j must be non- + zero, for each j. (Note: this restriction also applies to the + computer code given in [4], but was mistakenly not mentioned in + that paper.) + + This affects the seeding procedure by imposing the requirement + s1 > 1, s2 > 7, s3 > 15. + +*/ +struct nrnd_state { + u32 s1, s2, s3; +}; + +static DEFINE_PER_CPU(struct nrnd_state, net_rand_state); + +static u32 __net_random(struct nrnd_state *state) +{ +#define TAUSWORTHE(s,a,b,c,d) ((s&c)<>b) + + state->s1 = TAUSWORTHE(state->s1, 13, 19, 4294967294UL, 12); + state->s2 = TAUSWORTHE(state->s2, 2, 25, 4294967288UL, 4); + state->s3 = TAUSWORTHE(state->s3, 3, 11, 4294967280UL, 17); + + return (state->s1 ^ state->s2 ^ state->s3); +} + +static void __net_srandom(struct nrnd_state *state, unsigned long entropy) +{ + u32 s = state->s1 ^ entropy; + + if (s == 0) + s = 1; /* default seed is 1 */ + +#define LCG(n) (69069 * n) + state->s1 = LCG(s); + state->s2 = LCG(state->s1); + state->s3 = LCG(state->s2); + + /* "warm it up" */ + __net_random(state); + __net_random(state); + __net_random(state); + __net_random(state); + __net_random(state); + __net_random(state); +} + unsigned long net_random(void) { - net_rand_seed=net_rand_seed*69069L+1; - return net_rand_seed^jiffies; + unsigned long r; + struct nrnd_state *state = &get_cpu_var(net_rand_state); + r = __net_random(state); + put_cpu_var(state); + return r; } + void net_srandom(unsigned long entropy) { - net_rand_seed ^= entropy; - net_random(); + struct nrnd_state *state = &get_cpu_var(net_rand_state); + __net_srandom(state, entropy); + put_cpu_var(state); +} + +void __init net_random_init(void) +{ + int i; + unsigned long seed[NR_CPUS]; + + get_random_bytes(seed, sizeof(seed)); + + for (i = 0; i < NR_CPUS; i++) { + struct nrnd_state *state = &per_cpu(net_rand_state,i); + + memset(state, 0, sizeof(*state)); + __net_srandom(state, seed[i]); + } } int net_msg_cost = 5*HZ; From ak@suse.de Fri Aug 13 12:29:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 12:29:17 -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 i7DJTAmg022981 for ; Fri, 13 Aug 2004 12:29:11 -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 7F951A5113D; Fri, 13 Aug 2004 21:28:59 +0200 (CEST) Date: Fri, 13 Aug 2004 21:28:57 +0200 From: Andi Kleen To: Stephen Hemminger Cc: davem@redhat.com, alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, greearb@candelatech.com Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040813212857.7dd50320.ak@suse.de> In-Reply-To: <20040813115140.0f09d889@dell_ss3.pdx.osdl.net> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040812124854.646f1936.davem@redhat.com> <20040813115140.0f09d889@dell_ss3.pdx.osdl.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: 7719 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, 13 Aug 2004 11:51:40 -0700 Stephen Hemminger wrote: > Here is another alternative, using tansworthe generator. It uses percpu > state. The one small semantic change is the net_srandom() only affects > the current cpu's seed. The problem was that having it change all cpu's > seed would mean adding locking I would just update the other CPUs without locking. Taking a random number from a partially updated state shouldn't be a big issue. -Andi From nick@sluggardy.net Fri Aug 13 13:15:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 13:15:31 -0700 (PDT) Received: from sluggardy.net ([66.45.74.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7DKFNKG024561 for ; Fri, 13 Aug 2004 13:15:26 -0700 Received: (qmail 20820 invoked by uid 210); 13 Aug 2004 13:15:12 -0700 Received: from nick@sluggardy.net by elwing by uid 210 with qmail-scanner-1.20 (clamscan: 0.67. spamassassin: 2.60. Clear:RC:0(66.93.180.209):SA:0(-4.9/5.0):. Processed in 0.739867 secs); 13 Aug 2004 20:15:12 -0000 Received: from dsl093-180-209.sac1.dsl.speakeasy.net (HELO sluggardy.net) (nick@66.93.180.209) by 66.45.74.15 with RC4-MD5 encrypted SMTP; 13 Aug 2004 13:15:11 -0700 Message-ID: <411D20C8.1080400@sluggardy.net> Date: Fri, 13 Aug 2004 13:12:56 -0700 From: Nick Palmer User-Agent: Mozilla Thunderbird 0.5 (X11/20040405) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alex Riesen CC: linux-kernel , netdev@oss.sgi.com Subject: Re: select implementation not POSIX compliant? References: <20040811194018.GA3971@steel.home> In-Reply-To: <20040811194018.GA3971@steel.home> X-Enigmail-Version: 0.83.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7720 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nick@sluggardy.net Precedence: bulk X-list: netdev Alex Riesen wrote: > On linux-kernel, Nick Palmer wrote: >>The application >>expects that a close call on a socket that another thread is >>blocking in select and/or recvmsg on will cause select and/or >>recvmsg to return with an error. Linux does not seem to do this. > > > It works always for stream sockets and does not at all (even with > shutdown, even using poll(2) or read(2) instead of select) for dgram > sockets. > > What domain (inet, local) are your sockets in? inet. > What type (stream, dgram)? We use both, though the breakage I was trying to fix was with a dgram socket. You are correct that it does not work for dgram sockets at all! I had not noticed the difference between the two in the test case I wrote, since I hadn't tested streams. Thanks for pointing that out. Note that shutdown will cause a dgram socket to exit from a recv* call though, as this is the workaround I am using right now. On Solaris close will do the job. However when the recv from ends it returns 0, but does not set errno, which indicates that there may be more data that can be retrieved with another call to recv. On Solaris both shutdown and close cause errno to be set. There is no way then to cause a select on a dgram socket to break out at all short of kludging some dgram packet transmission to cause it to happen. Yech! Thanks for looking into the issue more, -Nick From nick@sluggardy.net Fri Aug 13 13:16:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 13:16:11 -0700 (PDT) Received: from sluggardy.net ([66.45.74.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7DKG4nm024664 for ; Fri, 13 Aug 2004 13:16:04 -0700 Received: (qmail 20837 invoked by uid 210); 13 Aug 2004 13:15:54 -0700 Received: from nick@sluggardy.net by elwing by uid 210 with qmail-scanner-1.20 (clamscan: 0.67. spamassassin: 2.60. Clear:RC:0(66.93.180.209):SA:0(-4.9/5.0):. Processed in 0.643179 secs); 13 Aug 2004 20:15:54 -0000 Received: from dsl093-180-209.sac1.dsl.speakeasy.net (HELO sluggardy.net) (nick@66.93.180.209) by 66.45.74.15 with RC4-MD5 encrypted SMTP; 13 Aug 2004 13:15:53 -0700 Message-ID: <411D20F2.3030101@sluggardy.net> Date: Fri, 13 Aug 2004 13:13:38 -0700 From: Nick Palmer User-Agent: Mozilla Thunderbird 0.5 (X11/20040405) X-Accept-Language: en-us, en MIME-Version: 1.0 To: khandelw@cs.fsu.edu CC: Alex Riesen , linux-kernel , netdev@oss.sgi.com Subject: Re: select implementation not POSIX compliant? References: <20040811194018.GA3971@steel.home> <1092256397.512046f64c822@system.cs.fsu.edu> In-Reply-To: <1092256397.512046f64c822@system.cs.fsu.edu> X-Enigmail-Version: 0.83.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7721 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nick@sluggardy.net Precedence: bulk X-list: netdev khandelw@cs.fsu.edu wrote: > select should work for any type of socket. Its based on the type of file > descriptor not whether it is stream/dgram. Agreed, but as Alex Riesen has shown with his test case, the behavior differs based on the type of socket. This doesn't seem quite right, but was not my original point. > so why should recvmsg return error???? upon closing the socket in other thread? > wouldn't the socket linger around for some time... Only if SO_LINGER is on, and then only for the linger time. I would expect recvmsg to set errno to EINTR or EINVAL indicating that the recv message was interrupted or is no longer valid since the socket has closed. This is not the case. Instead it returns 0, and doesn't set errno. -Nick From jgarzik@pobox.com Fri Aug 13 13:18:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 13:18: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 i7DKI17v025193 for ; Fri, 13 Aug 2004 13:18:01 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1BviUq-0000j9-Vf; Fri, 13 Aug 2004 21:17:53 +0100 Message-ID: <411D21DE.2050804@pobox.com> Date: Fri, 13 Aug 2004 16:17:34 -0400 From: Jeff Garzik 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: Marcelo Tosatti CC: netdev@oss.sgi.com Subject: Re: 8390.c workaround for interrupt storm References: <20040813153047.GC28640@logos.cnet> In-Reply-To: <20040813153047.GC28640@logos.cnet> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7722 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 Marcelo Tosatti wrote: > Hi netdev, > > We've been seeing an interrupt storm on our > embedded PowerPC systems with Linksys PCMLM56 (network+modem) > PCMCIA cards (network part of it driven by pcnet_cs.c) as soon as the network > cable is pluged/unpluged and after some activity on the serial > line. > > The card goes nuts, and doesnt stop sending interrupts. > > So I hacked up this patch which resets the 8390 chip > as soon as 256 empty interrupts are triggered. Works fine, > the card comes back to sanity after resetting. > > Not sure if its specific to our boards, but I believe > it might happen on other archs also, so I'm posting it > here in the hope it might be useful for someone with the > same problem. > > Not likely to be included in mainline driver, but hey, why not, > its protection against hardware insanity. You have stumbled on a common class of problems, I think. IMO interrupt storms are almost always caused by the platform or bus. I see tons of bug reports for ethernet drivers which turn out to be interrupt routing, interrupt handling, or interrupt storms unrelated to the ethernet driver itself. Yes, you can sometimes work around this in the driver, but that tends to wind up hiding the problem. PCMCIA debugging isn't fun, to be sure, maybe RMK has some ideas? Jeff From nuno.silva@vgertech.com Fri Aug 13 13:35:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 13:36:05 -0700 (PDT) Received: from puma-vgertech.no-ip.com (postfix@[82.154.232.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7DKZtv4025783 for ; Fri, 13 Aug 2004 13:35:56 -0700 Received: from [10.0.2.15] (puma [10.0.2.15]) by puma-vgertech.no-ip.com (Postfix) with ESMTP id 5F960BA4098; Fri, 13 Aug 2004 21:35:50 +0100 (WEST) Message-ID: <411D2625.2070908@vgertech.com> Date: Fri, 13 Aug 2004 21:35:49 +0100 From: Nuno Silva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040528 Thunderbird/0.6 Mnenhy/0.6.0.103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Vladimir B. Savkin" Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 References: <411BC284.6080807@vgertech.com> <20040813080334.GA13337@tentacle.sectorb.msk.ru> In-Reply-To: <20040813080334.GA13337@tentacle.sectorb.msk.ru> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7723 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nuno.silva@vgertech.com Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vladimir B. Savkin wrote: | On Thu, Aug 12, 2004 at 08:18:28PM +0100, Nuno Silva wrote: | |>Hi! |> |>With 2.6.8-rc4-bk1 I get "Aug 12 17:33:10 puma kernel: |>unregister_netdevice: waiting for ppp0 to become free. Usage count = 1" |>in the logs after pppd exit. |> |>Also, the box won't reboot and print that message forever in the |>console. sysrq-U && sysrq-R did it :-) |> |>The last version I tried was 2.6.8-rc2-bk11 and, wrt this prob, is |>running fine. So, the problem is in that window and the changelog for |>rc4 mentions something about ppp: |>http://kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.8-rc4 |> |>If someone requires more information or tests feel free to ask! | | | I saw this too, with 2.6.7-rc3-mm1. | I have discovered that it happens because of idle TCP socket | holds a reference to a network device. | After killing associated process, device was freed immediately. | I waited for 5 mins before sysrq-U && sysrq-R. Anyway, if I 'killall pppd' and then issue 'ifconfig -a' the ifconfig command will hang. This didn't happen with 2.6.8-rc2-bk11 (the one I'm running now), so something changed... I'm I the only one with ppp/pppd/pppoe who tried 2.6.8-rc4-bk1? :-) Any success reports? Regards, Nuno Silva -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBHSYlOPig54MP17wRAs1NAJ0dMRd7tqnpRk/tnxZj7xSeoUL3UgCgrk50 tnzeT6sy3CauOI5WK7HF16o= =mkWf -----END PGP SIGNATURE----- From marcelo.tosatti@cyclades.com Fri Aug 13 14:31:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 14:31:40 -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 i7DLVY6N027770 for ; Fri, 13 Aug 2004 14:31:34 -0700 Received: from [127.0.0.1] (helo=logos.cnet) by www.linux.org.uk with esmtp (Exim 4.33) id 1Bvje1-0001b9-GG; Fri, 13 Aug 2004 22:31:25 +0100 Received: by logos.cnet (Postfix, from userid 500) id 0EEC7F30C4; Fri, 13 Aug 2004 17:07:37 -0300 (BRT) Date: Fri, 13 Aug 2004 17:07:37 -0300 From: Marcelo Tosatti To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: 8390.c workaround for interrupt storm Message-ID: <20040813200737.GC29875@logos.cnet> References: <20040813153047.GC28640@logos.cnet> <411D21DE.2050804@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411D21DE.2050804@pobox.com> User-Agent: Mutt/1.5.5.1i X-archive-position: 7724 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: marcelo.tosatti@cyclades.com Precedence: bulk X-list: netdev On Fri, Aug 13, 2004 at 04:17:34PM -0400, Jeff Garzik wrote: > Marcelo Tosatti wrote: > >Hi netdev, > > > >We've been seeing an interrupt storm on our > >embedded PowerPC systems with Linksys PCMLM56 (network+modem) > >PCMCIA cards (network part of it driven by pcnet_cs.c) as soon as the > >network cable is pluged/unpluged and after some activity on the serial > >line. > > > >The card goes nuts, and doesnt stop sending interrupts. > > > >So I hacked up this patch which resets the 8390 chip > >as soon as 256 empty interrupts are triggered. Works fine, > >the card comes back to sanity after resetting. > > > >Not sure if its specific to our boards, but I believe > >it might happen on other archs also, so I'm posting it > >here in the hope it might be useful for someone with the > >same problem. > > > >Not likely to be included in mainline driver, but hey, why not, > >its protection against hardware insanity. Hi Jeff! > You have stumbled on a common class of problems, I think. > > IMO interrupt storms are almost always caused by the platform or bus. I > see tons of bug reports for ethernet drivers which turn out to be > interrupt routing, interrupt handling, or interrupt storms unrelated to > the ethernet driver itself. > > Yes, you can sometimes work around this in the driver, but that tends to > wind up hiding the problem. I see. So, following your thoughts, what is causing the interrupt storm here is not the card itself, but the bus/platform/irq controller? That is, those interrupts are not coming from the card. Or that something on the bus/platform/irq controller triggers the card into insanity, and the card really is sending those interrupts? Since resetting the 8390 stops it from madness, its likely that the card itself is sending the interrupts, no? Interesting... > PCMCIA debugging isn't fun, to be sure, maybe RMK has some ideas? This is a MontaVista v2.4.17 kernel patched up, so I doubt he will care much. I'll ask him anyway. Thanks for answering!! From herbert@gondor.apana.org.au Fri Aug 13 14:56:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 14:56: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 i7DLuZNt028502 for ; Fri, 13 Aug 2004 14:56: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 1Bvk1v-0000cr-00; Sat, 14 Aug 2004 07:56:07 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvk1q-00048Z-00; Sat, 14 Aug 2004 07:56:02 +1000 Date: Sat, 14 Aug 2004 07:56:02 +1000 To: "David S. Miller" Cc: Stephen Hemminger , netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040813215602.GA15870@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <20040813093838.6961c0d4.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7725 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 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 13, 2004 at 09:38:38AM -0700, David S. Miller wrote: > > Herbert, if we check inetdev->dead when trying to grab > a reference it fixes the RCU destroy race you mentioned. Sorry Dave but that just makes the window smaller. A new inetdev_destroy() can still start after the in_dev->dead check and before the inc of the refcnt. > I really don't want to put that ref drop into the > RCU callback as that would kill performance. Maybe I wasn't clear enough about the solution. I've attached an untested patch below. Hopefully that should make it clearer. > diff -Nru a/include/linux/inetdevice.h b/include/linux/inetdevice.h > --- a/include/linux/inetdevice.h 2004-08-13 09:20:01 -07:00 > +++ b/include/linux/inetdevice.h 2004-08-13 09:20:01 -07:00 > @@ -143,9 +143,14 @@ > struct in_device *in_dev; > > rcu_read_lock(); > + smp_read_barrier_depends(); This isn't quite right either. It rarely makes sense to have smp_read_barrier_depends() immediately after an rcu_read_lock() since it can't be reordered. Now had you put this barrier between the reading of ip_ptr and the checking of in_dev->dead, then the race would've been closed. But I still prefer to move the work into inetdev_destroy. > in_dev = dev->ip_ptr; > - if (in_dev) > - atomic_inc(&in_dev->refcnt); > + if (in_dev) { > + if (in_dev->dead) > + in_dev = NULL; > + else > + atomic_inc(&in_dev->refcnt); > + } > rcu_read_unlock(); > return in_dev; > } > diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c > --- a/net/ipv4/devinet.c 2004-08-13 09:20:01 -07:00 > +++ b/net/ipv4/devinet.c 2004-08-13 09:20:01 -07:00 > @@ -210,6 +210,7 @@ > int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b) > { > rcu_read_lock(); > + smp_read_barrier_depends(); > for_primary_ifa(in_dev) { > if (inet_ifa_match(a, ifa)) { > if (!b || inet_ifa_match(b, ifa)) { Ditto. 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 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== include/linux/inetdevice.h 1.14 vs edited ===== --- 1.14/include/linux/inetdevice.h 2004-08-14 07:43:21 +10:00 +++ edited/include/linux/inetdevice.h 2004-08-14 07:48:59 +10:00 @@ -163,16 +163,10 @@ extern void in_dev_finish_destroy(struct in_device *idev); -static inline void in_dev_rcu_destroy(struct rcu_head *head) -{ - struct in_device *idev = container_of(head, struct in_device, rcu_head); - in_dev_finish_destroy(idev); -} - static inline void in_dev_put(struct in_device *idev) { if (atomic_dec_and_test(&idev->refcnt)) - call_rcu(&idev->rcu_head, in_dev_rcu_destroy); + in_dev_finish_destroy(idev); } #define __in_dev_put(idev) atomic_dec(&(idev)->refcnt) ===== net/ipv4/devinet.c 1.33 vs edited ===== --- 1.33/net/ipv4/devinet.c 2004-08-14 07:43:21 +10:00 +++ edited/net/ipv4/devinet.c 2004-08-14 07:49:51 +10:00 @@ -177,6 +177,12 @@ goto out; } +static void in_dev_rcu_put(struct rcu_head *head) +{ + struct in_device *idev = container_of(head, struct in_device, rcu_head); + in_dev_put(idev); +} + static void inetdev_destroy(struct in_device *in_dev) { struct in_ifaddr *ifa; @@ -204,7 +210,7 @@ neigh_sysctl_unregister(in_dev->arp_parms); #endif neigh_parms_release(&arp_tbl, in_dev->arp_parms); - in_dev_put(in_dev); + call_rcu(&idev->rcu_head, in_dev_rcu_put); } int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b) --LZvS9be/3tNcYl/X-- From davem@redhat.com Fri Aug 13 15:20:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 15:21:03 -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 i7DMKvaW029631 for ; Fri, 13 Aug 2004 15:20:58 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7DMKfe1011344; Fri, 13 Aug 2004 18:20:41 -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 i7DMKfa13332; Fri, 13 Aug 2004 18:20:41 -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 i7DMJqEW027978; Fri, 13 Aug 2004 18:19:52 -0400 Date: Fri, 13 Aug 2004 15:19:23 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040813151923.3311b4f0.davem@redhat.com> In-Reply-To: <20040813215602.GA15870@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@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: 7726 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 Sat, 14 Aug 2004 07:56:02 +1000 Herbert Xu wrote: > Now had you put this barrier between the reading of ip_ptr and > the checking of in_dev->dead, then the race would've been closed. > > But I still prefer to move the work into inetdev_destroy. Ok I see now. I've added your patch, it seems correct. From shemminger@osdl.org Fri Aug 13 17:01:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 17:01:12 -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 i7E0150x002707 for ; Fri, 13 Aug 2004 17:01:06 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7E00p106666; Fri, 13 Aug 2004 17:00:52 -0700 Date: Fri, 13 Aug 2004 17:00:51 -0700 From: Stephen Hemminger To: Jamal Hadi Salim Cc: netdev@oss.sgi.com Subject: [RFT] new iproute2 Message-Id: <20040813170051.67d79b9d@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7727 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 Okay, here is a new version of iproute2 with your last round of CLS patches incorporated in. Note: I fixed up some things that seemed to have changed in the current version of pkt_cls.h Also: - removed all #ifdef CONFIG_ from the command. - copy of kernel headers is now in iproute2/include/linux so that it will build without matching kernel headers. - this reduces the amount of configuration necessary. I don't want this final until you go over it Jamal, cause I had to rework your stuff enough that I probably broke it. See: http://developer.osdl.org/dev/iproute2/iproute2-2.6.8-jamal.tgz From ravinandan.arakali@s2io.com Fri Aug 13 17:16:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 17:16:22 -0700 (PDT) Received: from ns1.s2io.com (mail.s2io.com [142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7E0GENR003357 for ; Fri, 13 Aug 2004 17:16:15 -0700 Received: from guinness.s2io.com (sentry.s2io.com [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i7E0G1cE014341; Fri, 13 Aug 2004 20:16:01 -0400 (EDT) Received: from rarakali ([10.16.16.150]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i7E0Fsx0008487; Fri, 13 Aug 2004 20:15:54 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: Cc: , , Subject: Patch submission for S2io Xframe driver to 2.6 kernel Date: Fri, 13 Aug 2004 17:19:36 -0700 Message-ID: <001401c48194$62497260$9610100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0015_01C48159.B5EA9A60" 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.2800.1441 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 7728 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 This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C48159.B5EA9A60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi Jeff et al, We gained immensely from your code review comments last time when we submitted the S2io driver. Attached is a patch(use with -p1 option from /usr/src/ directory) on the current driver in the 2.6 kernel. Please review the code changes and reply with your valuable comments. Briefly, some of the main features in this patch: 1. Support for IBM PowerPC platform. 2. Support for NAPI. 3. More efficient allocation of Transmit blocks. 4. Multi-buffer mode for improved Receive performance. 4. Following bug fixes: a. Race condition when trying to down interface during traffic. b. Fix for bringup problems with SuSE9 on IA64 system. Thanks, Ravi ------=_NextPart_000_0015_01C48159.B5EA9A60 Content-Type: application/octet-stream; name="s2io_submit2_patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_submit2_patch" diff -Naur orig/drivers/net/Kconfig new/drivers/net/Kconfig=0A= --- orig/drivers/net/Kconfig 2004-08-06 06:55:01.000000000 -0700=0A= +++ new/drivers/net/Kconfig 2004-08-06 06:57:47.000000000 -0700=0A= @@ -2161,6 +2161,17 @@=0A= bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"=0A= depends on S2IO && EXPERIMENTAL=0A= =0A= +config 2BUFF_MODE=0A= + bool "Use 2 Buffer mode on Receive side."=0A= + depends on S2IO=0A= + ---help---=0A= + On enabling 2 buffer mode, the received frame will be=0A= + split into 2 parts before being DMA'ed to the host's =0A= + memory. the 2 parts are the ethernet header and ethernet=0A= + payload. This is useful on systems where DMA'ing to =0A= + unaligned memory locations comes with a heavy price. If =0A= + not sure please say N.=0A= +=0A= endmenu=0A= =0A= source "drivers/net/tokenring/Kconfig"=0A= diff -Naur orig/drivers/net/s2io-regs.h new/drivers/net/s2io-regs.h=0A= --- orig/drivers/net/s2io-regs.h 2004-08-06 06:55:01.000000000 -0700=0A= +++ new/drivers/net/s2io-regs.h 2004-08-06 06:58:44.000000000 -0700=0A= @@ -1,5 +1,5 @@=0A= = /************************************************************************=0A= - * regs.h: A Linux PCI-X Ethernet driver for S2IO 10GbE Server NIC=0A= + * s2io-regs.h: A Linux PCI-X Ethernet driver for S2IO 10GbE Server NIC=0A= * Copyright 2002 Raghavendra Koushik (raghavendra.koushik@s2io.com)=0A= =0A= * This software may be used and distributed according to the terms of=0A= @@ -289,6 +289,8 @@=0A= u64 tda_err_alarm;=0A= =0A= u64 pcc_err_reg;=0A= +#define PCC_FB_ECC_DB_ERR vBIT(0xFF, 16, 8)=0A= +=0A= u64 pcc_err_mask;=0A= u64 pcc_err_alarm;=0A= =0A= @@ -451,10 +453,6 @@=0A= =0A= /* Per-ring controller regs */=0A= #define RX_MAX_RINGS 8=0A= -#if 0=0A= -#define RX_MAX_RINGS_SZ 0xFFFF /* 65536 */=0A= -#define RX_MIN_RINGS_SZ 0x3F /* 63 */=0A= -#endif=0A= u64 prc_rxd0_n[RX_MAX_RINGS];=0A= u64 prc_ctrl_n[RX_MAX_RINGS];=0A= #define PRC_CTRL_RC_ENABLED BIT(7)=0A= @@ -512,6 +510,7 @@=0A= #define RX_PA_CFG_IGNORE_FRM_ERR BIT(1)=0A= #define RX_PA_CFG_IGNORE_SNAP_OUI BIT(2)=0A= #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3)=0A= +#define RX_PA_CFG_IGNORE_L2_ERR BIT(6)=0A= =0A= u8 unused12[0x700 - 0x1D8];=0A= =0A= diff -Naur orig/drivers/net/s2io.c new/drivers/net/s2io.c=0A= --- orig/drivers/net/s2io.c 2004-08-06 06:55:01.000000000 -0700=0A= +++ new/drivers/net/s2io.c 2004-08-06 06:58:44.000000000 -0700=0A= @@ -61,6 +61,7 @@=0A= #include=0A= #include=0A= #include=0A= +#include=0A= #include=0A= =0A= /* local include */=0A= @@ -69,18 +70,23 @@=0A= =0A= /* S2io Driver name & version. */=0A= static char s2io_driver_name[] =3D "s2io";=0A= -static char s2io_driver_version[] =3D "Version 1.0";=0A= +static char s2io_driver_version[] =3D "Version 1.1";=0A= =0A= +/* Often used checks defined as macros. */=0A= #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = | \=0A= ADAPTER_STATUS_RMAC_LOCAL_FAULT)))=0A= #define TASKLET_IN_USE test_and_set_bit(0, \=0A= (unsigned long *)(&sp->tasklet_status))=0A= +=0A= +/* An inline function to determine the status with respect to=0A= + * availability of Rx side buffers.=0A= + */=0A= #define PANIC 1=0A= #define LOW 2=0A= static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring)=0A= {=0A= int level =3D 0;=0A= - if ((sp->pkt_cnt[ring] - rxb_size) > 128) {=0A= + if ((sp->pkt_cnt[ring] - rxb_size) > 16) {=0A= level =3D LOW;=0A= if (rxb_size < sp->pkt_cnt[ring] / 8)=0A= level =3D PANIC;=0A= @@ -99,45 +105,45 @@=0A= };=0A= =0A= static char ethtool_stats_keys[][ETH_GSTRING_LEN] =3D {=0A= - "tmac_frms",=0A= - "tmac_data_octets",=0A= - "tmac_drop_frms",=0A= - "tmac_mcst_frms",=0A= - "tmac_bcst_frms",=0A= - "tmac_pause_ctrl_frms",=0A= - "tmac_any_err_frms",=0A= - "tmac_vld_ip_octets",=0A= - "tmac_vld_ip",=0A= - "tmac_drop_ip",=0A= - "tmac_icmp",=0A= - "tmac_rst_tcp",=0A= - "tmac_tcp",=0A= - "tmac_udp",=0A= - "rmac_vld_frms",=0A= - "rmac_data_octets",=0A= - "rmac_fcs_err_frms",=0A= - "rmac_drop_frms",=0A= - "rmac_vld_mcst_frms",=0A= - "rmac_vld_bcst_frms",=0A= - "rmac_in_rng_len_err_frms",=0A= - "rmac_long_frms",=0A= - "rmac_pause_ctrl_frms",=0A= - "rmac_discarded_frms",=0A= - "rmac_usized_frms",=0A= - "rmac_osized_frms",=0A= - "rmac_frag_frms",=0A= - "rmac_jabber_frms",=0A= - "rmac_ip",=0A= - "rmac_ip_octets",=0A= - "rmac_hdr_err_ip",=0A= - "rmac_drop_ip",=0A= - "rmac_icmp",=0A= - "rmac_tcp",=0A= - "rmac_udp",=0A= - "rmac_err_drp_udp",=0A= - "rmac_pause_cnt",=0A= - "rmac_accepted_ip",=0A= - "rmac_err_tcp",=0A= + {"tmac_frms"},=0A= + {"tmac_data_octets"},=0A= + {"tmac_drop_frms"},=0A= + {"tmac_mcst_frms"},=0A= + {"tmac_bcst_frms"},=0A= + {"tmac_pause_ctrl_frms"},=0A= + {"tmac_any_err_frms"},=0A= + {"tmac_vld_ip_octets"},=0A= + {"tmac_vld_ip"},=0A= + {"tmac_drop_ip"},=0A= + {"tmac_icmp"},=0A= + {"tmac_rst_tcp"},=0A= + {"tmac_tcp"},=0A= + {"tmac_udp"},=0A= + {"rmac_vld_frms"},=0A= + {"rmac_data_octets"},=0A= + {"rmac_fcs_err_frms"},=0A= + {"rmac_drop_frms"},=0A= + {"rmac_vld_mcst_frms"},=0A= + {"rmac_vld_bcst_frms"},=0A= + {"rmac_in_rng_len_err_frms"},=0A= + {"rmac_long_frms"},=0A= + {"rmac_pause_ctrl_frms"},=0A= + {"rmac_discarded_frms"},=0A= + {"rmac_usized_frms"},=0A= + {"rmac_osized_frms"},=0A= + {"rmac_frag_frms"},=0A= + {"rmac_jabber_frms"},=0A= + {"rmac_ip"},=0A= + {"rmac_ip_octets"},=0A= + {"rmac_hdr_err_ip"},=0A= + {"rmac_drop_ip"},=0A= + {"rmac_icmp"},=0A= + {"rmac_tcp"},=0A= + {"rmac_udp"},=0A= + {"rmac_err_drp_udp"},=0A= + {"rmac_pause_cnt"},=0A= + {"rmac_accepted_ip"},=0A= + {"rmac_err_tcp"},=0A= };=0A= =0A= #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN=0A= @@ -209,16 +215,65 @@=0A= END_SIGN=0A= };=0A= =0A= -=0A= /* Module Loadable parameters. */=0A= -static u32 ring_num;=0A= static u32 frame_len[MAX_RX_RINGS];=0A= -static u32 ring_len[MAX_RX_RINGS];=0A= -static u32 fifo_num;=0A= -static u32 fifo_len[MAX_TX_FIFOS];=0A= static u32 rx_prio;=0A= static u32 tx_prio;=0A= -static u8 latency_timer =3D 0;=0A= +=0A= +static unsigned int lso_enable =3D 1;=0A= +static unsigned int indicate_max_pkts =3D 0;=0A= +static unsigned int cksum_offload_enable =3D 1;=0A= +static unsigned int TxFifoNum =3D 1;=0A= +static unsigned int TxFIFOLen_0 =3D DEFAULT_FIFO_LEN;=0A= +static unsigned int TxFIFOLen_1 =3D 0;=0A= +static unsigned int TxFIFOLen_2 =3D 0;=0A= +static unsigned int TxFIFOLen_3 =3D 0;=0A= +static unsigned int TxFIFOLen_4 =3D 0;=0A= +static unsigned int TxFIFOLen_5 =3D 0;=0A= +static unsigned int TxFIFOLen_6 =3D 0;=0A= +static unsigned int TxFIFOLen_7 =3D 0;=0A= +static unsigned int MaxTxDs =3D MAX_SKB_FRAGS;=0A= +static unsigned int RxRingNum =3D 1;=0A= +static unsigned int RxRingSz_0 =3D SMALL_BLK_CNT;=0A= +static unsigned int RxRingSz_1 =3D 0;=0A= +static unsigned int RxRingSz_2 =3D 0;=0A= +static unsigned int RxRingSz_3 =3D 0;=0A= +static unsigned int RxRingSz_4 =3D 0;=0A= +static unsigned int RxRingSz_5 =3D 0;=0A= +static unsigned int RxRingSz_6 =3D 0;=0A= +static unsigned int RxRingSz_7 =3D 0;=0A= +static unsigned int Stats_refresh_time =3D 4;=0A= +static unsigned int rmac_pause_time =3D 65535;=0A= +static unsigned int mc_pause_threshold_q0q3 =3D 187;=0A= +static unsigned int mc_pause_threshold_q4q7 =3D 187;=0A= +static unsigned int shared_splits =3D 0;=0A= +#if defined(__ia64__)=0A= +static unsigned int max_splits_trans =3D XENA_THREE_SPLIT_TRANSACTION;=0A= +#else=0A= +static unsigned int max_splits_trans =3D XENA_TWO_SPLIT_TRANSACTION;=0A= +#endif=0A= +static unsigned int tmac_util_period =3D 5;=0A= +static unsigned int rmac_util_period =3D 5;=0A= +static unsigned int tx_timer_val =3D 0xFFF;=0A= +static unsigned int tx_utilz_periodic =3D 1;=0A= +static unsigned int rx_timer_val =3D 0xFFF;=0A= +static unsigned int rx_utilz_periodic =3D 1;=0A= +static unsigned int tx_urange_a =3D 0xA;=0A= +static unsigned int tx_ufc_a =3D 0x10;=0A= +static unsigned int tx_urange_b =3D 0x10;=0A= +static unsigned int tx_ufc_b =3D 0x20;=0A= +static unsigned int tx_urange_c =3D 0x30;=0A= +static unsigned int tx_ufc_c =3D 0x40;=0A= +static unsigned int tx_ufc_d =3D 0x80;=0A= +static unsigned int rx_urange_a =3D 0xA;=0A= +static unsigned int rx_ufc_a =3D 0x1;=0A= +static unsigned int rx_urange_b =3D 0x10;=0A= +static unsigned int rx_ufc_b =3D 0x2;=0A= +static unsigned int rx_urange_c =3D 0x30;=0A= +static unsigned int rx_ufc_c =3D 0x40;=0A= +static unsigned int rx_ufc_d =3D 0x80;=0A= +static u8 latency_timer =3D 0xf8;=0A= +static u8 max_read_byte_cnt =3D 3;=0A= =0A= /* =0A= * S2IO device table.=0A= @@ -241,23 +296,22 @@=0A= remove:__devexit_p(s2io_rem_nic),=0A= };=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * Device private variable.=0A= - * Return Value: =0A= - * SUCCESS on success and an appropriate -ve value on failure.=0A= - * Description: =0A= - * The function allocates the all memory areas shared =0A= - * between the NIC and the driver. This includes Tx descriptors, =0A= - * Rx descriptors and the statistics block.=0A= +/**=0A= + * init_shared_mem - Allocation and Initialization of Memory=0A= + * @nic: Device private variable.=0A= + * Description: The function allocates the all memory areas shared =0A= + * between the NIC and the driver. This includes Tx descriptors, =0A= + * Rx descriptors and the statistics block.=0A= */=0A= -static int initSharedMem(struct s2io_nic *nic)=0A= +=0A= +static int init_shared_mem(struct s2io_nic *nic)=0A= {=0A= u32 size;=0A= void *tmp_v_addr, *tmp_v_addr_next;=0A= dma_addr_t tmp_p_addr, tmp_p_addr_next;=0A= RxD_block_t *pre_rxd_blk =3D NULL;=0A= int i, j, blk_cnt;=0A= + int lst_size, lst_per_page;=0A= struct net_device *dev =3D nic->dev;=0A= =0A= mac_info_t *mac_control;=0A= @@ -279,39 +333,55 @@=0A= DBG_PRINT(ERR_DBG, "that can be used\n");=0A= return FAILURE;=0A= }=0A= - size *=3D (sizeof(TxD_t) * config->MaxTxDs);=0A= -=0A= - mac_control->txd_list_mem =3D pci_alloc_consistent=0A= - (nic->pdev, size, &mac_control->txd_list_mem_phy);=0A= - if (!mac_control->txd_list_mem) {=0A= - return -ENOMEM;=0A= - }=0A= - mac_control->txd_list_mem_sz =3D size;=0A= =0A= - tmp_v_addr =3D mac_control->txd_list_mem;=0A= - tmp_p_addr =3D mac_control->txd_list_mem_phy;=0A= - memset(tmp_v_addr, 0, size);=0A= + lst_size =3D (sizeof(TxD_t) * config->MaxTxDs);=0A= + lst_per_page =3D PAGE_SIZE / lst_size;=0A= =0A= - DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name,=0A= - (unsigned long long) tmp_p_addr);=0A= + for(i=3D0; iTxFIFONum; i++) {=0A= + int fifo_len =3D config->TxCfg[i].FifoLen;=0A= + int list_holder_size =3D fifo_len * sizeof(list_info_hold_t);=0A= + nic->list_info[i] =3D kmalloc(list_holder_size, GFP_KERNEL);=0A= + if(!nic->list_info[i]) {=0A= + DBG_PRINT(ERR_DBG,"Malloc failed for list_info\n");=0A= + return -ENOMEM;=0A= + }=0A= + memset(nic->list_info[i], 0, list_holder_size);=0A= + }=0A= + for(i=3D0; iTxFIFONum; i++) {=0A= + int tmp =3D config->TxCfg[i].FifoLen / lst_per_page;=0A= + int tmp1 =3D config->TxCfg[i].FifoLen % lst_per_page;=0A= + int page_num =3D tmp1? (tmp+1) : tmp;=0A= =0A= - for (i =3D 0; i < config->TxFIFONum; i++) {=0A= - mac_control->txdl_start_phy[i] =3D tmp_p_addr;=0A= - mac_control->txdl_start[i] =3D (TxD_t *) tmp_v_addr;=0A= mac_control->tx_curr_put_info[i].offset =3D 0;=0A= mac_control->tx_curr_put_info[i].fifo_len =3D=0A= config->TxCfg[i].FifoLen - 1;=0A= mac_control->tx_curr_get_info[i].offset =3D 0;=0A= mac_control->tx_curr_get_info[i].fifo_len =3D=0A= config->TxCfg[i].FifoLen - 1;=0A= -=0A= - tmp_p_addr +=3D=0A= - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) *=0A= - config->MaxTxDs);=0A= - tmp_v_addr +=3D=0A= - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) *=0A= - config->MaxTxDs);=0A= + for(j=3D0; jpdev,=0A= + PAGE_SIZE, &tmp_p);=0A= + if(!tmp_v) {=0A= + DBG_PRINT(ERR_DBG,"Malloc failed for TxDL\n");=0A= + return -ENOMEM;=0A= + }=0A= + memset(tmp_v, 0, PAGE_SIZE);=0A= + while (k < lst_per_page) {=0A= + int l =3D (j * lst_per_page)+k;=0A= + if(l =3D=3D config->TxCfg[i].FifoLen)=0A= + goto end_txd_alloc; =0A= + nic->list_info[i][l].list_virt_addr =3D =0A= + tmp_v + (k * lst_size);=0A= + nic->list_info[i][l].list_phy_addr =3D =0A= + tmp_p + (k * lst_size);=0A= + k++;=0A= + }=0A= + }=0A= }=0A= + end_txd_alloc:=0A= =0A= /* Allocation and initialization of RXDs in Rings */=0A= size =3D 0;=0A= @@ -345,11 +415,15 @@=0A= config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1);=0A= /* Allocating all the Rx blocks */=0A= for (j =3D 0; j < blk_cnt; j++) {=0A= +#ifndef CONFIG_2BUFF_MODE=0A= size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));=0A= +#else=0A= + size =3D SIZE_OF_BLOCK;=0A= +#endif=0A= tmp_v_addr =3D pci_alloc_consistent(nic->pdev, size,=0A= &tmp_p_addr);=0A= if (tmp_v_addr =3D=3D NULL) {=0A= - /* In case of failure, freeSharedMem() =0A= + /* In case of failure, free_shared_mem() =0A= * is called, which should free any =0A= * memory that was alloced till the =0A= * failure happened.=0A= @@ -377,8 +451,10 @@=0A= pre_rxd_blk->reserved_1 =3D END_OF_BLOCK; /* last RxD =0A= * marker.=0A= */=0A= +#ifndef CONFIG_2BUFF_MODE=0A= pre_rxd_blk->reserved_2_pNext_RxD_block =3D=0A= (unsigned long) tmp_v_addr_next;=0A= +#endif=0A= pre_rxd_blk->pNext_RxD_Blk_physical =3D=0A= (u64) tmp_p_addr_next;=0A= }=0A= @@ -390,7 +466,7 @@=0A= (nic->pdev, size, &mac_control->stats_mem_phy);=0A= =0A= if (!mac_control->stats_mem) {=0A= - /* In case of failure, freeSharedMem() is called, which =0A= + /* In case of failure, free_shared_mem() is called, which =0A= * should free any memory that was alloced till the =0A= * failure happened.=0A= */=0A= @@ -408,22 +484,21 @@=0A= return SUCCESS;=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * Device peivate variable.=0A= - * Return Value: =0A= - * NONE=0A= - * Description: =0A= - * This function is to free all memory locations allocated by=0A= - * the initSharedMem() function and return it to the kernel.=0A= +/** =0A= + * free_shared_mem - Free the allocated Memory =0A= + * @nic: Device private variable.=0A= + * Description: This function is to free all memory locations allocated = by=0A= + * the init_shared_mem() function and return it to the kernel.=0A= */=0A= -static void freeSharedMem(struct s2io_nic *nic)=0A= +=0A= +static void free_shared_mem(struct s2io_nic *nic)=0A= {=0A= int i, j, blk_cnt, size;=0A= void *tmp_v_addr;=0A= dma_addr_t tmp_p_addr;=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= + int lst_size, lst_per_page;=0A= =0A= =0A= if (!nic)=0A= @@ -432,14 +507,29 @@=0A= mac_control =3D &nic->mac_control;=0A= config =3D &nic->config;=0A= =0A= - if (mac_control->txd_list_mem) {=0A= - pci_free_consistent(nic->pdev,=0A= - mac_control->txd_list_mem_sz,=0A= - mac_control->txd_list_mem,=0A= - mac_control->txd_list_mem_phy);=0A= + lst_size =3D (sizeof(TxD_t) * config->MaxTxDs);=0A= + lst_per_page =3D PAGE_SIZE / lst_size;=0A= +=0A= + for(i=3D0; iTxFIFONum; i++) {=0A= + int tmp =3D config->TxCfg[i].FifoLen / lst_per_page;=0A= + int tmp1 =3D config->TxCfg[i].FifoLen % lst_per_page;=0A= + int page_num =3D tmp1?(tmp+1) : tmp;=0A= + for(j=3D0; jlist_info[i][mem_blks].list_virt_addr)=0A= + break;=0A= + pci_free_consistent(nic->pdev, PAGE_SIZE,=0A= + nic->list_info[i][mem_blks].list_virt_addr,=0A= + nic->list_info[i][mem_blks].list_phy_addr);=0A= + }=0A= + kfree(nic->list_info[i]);=0A= }=0A= =0A= +#ifndef CONFIG_2BUFF_MODE=0A= size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));=0A= +#else=0A= + size =3D SIZE_OF_BLOCK;=0A= +#endif=0A= for (i =3D 0; i < config->RxRingNum; i++) {=0A= blk_cnt =3D nic->block_count[i];=0A= for (j =3D 0; j < blk_cnt; j++) {=0A= @@ -460,16 +550,16 @@=0A= }=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * device peivate variable=0A= - * Return Value: =0A= - * SUCCESS on success and '-1' on failure (endian settings incorrect).=0A= - * Description: =0A= - * The function sequentially configures every block =0A= +/** =0A= + * init_nic - Initialization of hardware =0A= + * @nic: device peivate variable=0A= + * Description: The function sequentially configures every block =0A= * of the H/W from their reset values. =0A= + * Returns: SUCCESS on success and =0A= + * '-1' on failure (endian settings incorrect).=0A= */=0A= -static int initNic(struct s2io_nic *nic)=0A= +=0A= +static int init_nic(struct s2io_nic *nic)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= struct net_device *dev =3D nic->dev;=0A= @@ -559,10 +649,13 @@=0A= schedule_timeout(HZ / 2);=0A= =0A= /* Enable Receiving broadcasts */=0A= + add =3D (void *) &bar0->mac_cfg;=0A= val64 =3D readq(&bar0->mac_cfg);=0A= val64 |=3D MAC_RMAC_BCAST_ENABLE;=0A= writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= - writeq(val64, &bar0->mac_cfg);=0A= + writel((u32) val64, add);=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) (val64 >> 32), (add + 4));=0A= =0A= /* Read registers in all blocks */=0A= val64 =3D readq(&bar0->mac_int_mask);=0A= @@ -760,13 +853,15 @@=0A= =0A= /* Enable statistics */=0A= writeq(mac_control->stats_mem_phy, &bar0->stat_addr);=0A= - val64 =3D SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN;=0A= + val64 =3D SET_UPDT_PERIOD(Stats_refresh_time) |=0A= + STAT_CFG_STAT_RO | STAT_CFG_STAT_EN;=0A= writeq(val64, &bar0->stat_cfg);=0A= =0A= /* Initializing the sampling rate for the device to calculate the=0A= * bandwidth utilization.=0A= */=0A= - val64 =3D MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5);=0A= + val64 =3D MAC_TX_LINK_UTIL_VAL(tmac_util_period) |=0A= + MAC_RX_LINK_UTIL_VAL(rmac_util_period);=0A= writeq(val64, &bar0->mac_link_util);=0A= =0A= =0A= @@ -774,14 +869,18 @@=0A= * Scheme.=0A= */=0A= /* TTI Initialization */=0A= - val64 =3D TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) |=0A= - TTI_DATA1_MEM_TX_URNG_A(0xA) | TTI_DATA1_MEM_TX_URNG_B(0x10) |=0A= - TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN;=0A= + val64 =3D TTI_DATA1_MEM_TX_TIMER_VAL(tx_timer_val) |=0A= + TTI_DATA1_MEM_TX_URNG_A(tx_urange_a) |=0A= + TTI_DATA1_MEM_TX_URNG_B(tx_urange_b) |=0A= + TTI_DATA1_MEM_TX_URNG_C(tx_urange_c);=0A= + if (tx_utilz_periodic)=0A= + val64 |=3D TTI_DATA1_MEM_TX_TIMER_AC_EN;=0A= writeq(val64, &bar0->tti_data1_mem);=0A= =0A= - val64 =3D=0A= - TTI_DATA2_MEM_TX_UFC_A(0x10) | TTI_DATA2_MEM_TX_UFC_B(0x20) |=0A= - TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80);=0A= + val64 =3D TTI_DATA2_MEM_TX_UFC_A(tx_ufc_a) |=0A= + TTI_DATA2_MEM_TX_UFC_B(tx_ufc_b) |=0A= + TTI_DATA2_MEM_TX_UFC_C(tx_ufc_c) |=0A= + TTI_DATA2_MEM_TX_UFC_D(tx_ufc_d);=0A= writeq(val64, &bar0->tti_data2_mem);=0A= =0A= val64 =3D TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD;=0A= @@ -809,13 +908,19 @@=0A= }=0A= =0A= /* RTI Initialization */=0A= - val64 =3D RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) |=0A= - RTI_DATA1_MEM_RX_URNG_A(0xA) | RTI_DATA1_MEM_RX_URNG_B(0x10) |=0A= - RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN;=0A= + val64 =3D RTI_DATA1_MEM_RX_TIMER_VAL(rx_timer_val) |=0A= + RTI_DATA1_MEM_RX_URNG_A(rx_urange_a) |=0A= + RTI_DATA1_MEM_RX_URNG_B(rx_urange_b) |=0A= + RTI_DATA1_MEM_RX_URNG_C(rx_urange_c);=0A= + if (rx_utilz_periodic)=0A= + val64 |=3D RTI_DATA1_MEM_RX_TIMER_AC_EN;=0A= +=0A= writeq(val64, &bar0->rti_data1_mem);=0A= =0A= - val64 =3D RTI_DATA2_MEM_RX_UFC_A(0x1) | RTI_DATA2_MEM_RX_UFC_B(0x2) |=0A= - RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80);=0A= + val64 =3D RTI_DATA2_MEM_RX_UFC_A(rx_ufc_a) |=0A= + RTI_DATA2_MEM_RX_UFC_B(rx_ufc_b) |=0A= + RTI_DATA2_MEM_RX_UFC_C(rx_ufc_c) |=0A= + RTI_DATA2_MEM_RX_UFC_D(rx_ufc_d);=0A= writeq(val64, &bar0->rti_data2_mem);=0A= =0A= val64 =3D RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD;=0A= @@ -858,22 +963,57 @@=0A= writel((u32) (val64 >> 32), (add + 4));=0A= val64 =3D readq(&bar0->mac_cfg);=0A= =0A= + /*Set the time value to be inserted in the pause frame generated by = xena */=0A= + val64 =3D readq(&bar0->rmac_pause_cfg);=0A= + val64 &=3D ~(RMAC_PAUSE_HG_PTIME(0xffff));=0A= + val64 |=3D RMAC_PAUSE_HG_PTIME(nic->mac_control.rmac_pause_time);=0A= + writeq(val64, &bar0->rmac_pause_cfg);=0A= +=0A= + /* Set the Threshold Limit for Generating the pause frame=0A= + * If the amount of data in any Queue exceeds ratio of=0A= + * (mac_control.mc_pause_threshold_q0q3 or q4q7)/256=0A= + * pause frame is generated=0A= + */=0A= + val64 =3D 0;=0A= + for (i =3D 0; i < 4; i++) {=0A= + val64 |=3D=0A= + (((u64) 0xFF00 | nic->mac_control.=0A= + mc_pause_threshold_q0q3)=0A= + << (i * 2 * 8));=0A= + }=0A= + writeq(val64, &bar0->mc_pause_thresh_q0q3);=0A= +=0A= + val64 =3D 0;=0A= + for (i =3D 0; i < 4; i++) {=0A= + val64 |=3D=0A= + (((u64) 0xFF00 | nic->mac_control.=0A= + mc_pause_threshold_q4q7)=0A= + << (i * 2 * 8));=0A= + }=0A= + writeq(val64, &bar0->mc_pause_thresh_q4q7);=0A= +=0A= + /* TxDMA will stop Read request if the number of read split has = exceeded=0A= + * the limit pointed by shared_splits=0A= + */=0A= + val64 =3D readq(&bar0->pic_control);=0A= + val64 |=3D PIC_CNTL_SHARED_SPLITS(shared_splits);=0A= + writeq(val64, &bar0->pic_control);=0A= +=0A= return SUCCESS;=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * device private variable,=0A= - * A mask indicating which Intr block must be modified and,=0A= - * A flag indicating whether to enable or disable the Intrs.=0A= - * Return Value: =0A= - * NONE.=0A= - * Description: =0A= - * This function will either disable or enable the interrupts =0A= +/** =0A= + * en_dis_able_nicintrs - Enable or Disable the interrupts =0A= + * @nic: device private variable,=0A= + * @mask: A mask indicating which Intr block must be modified and,=0A= + * @flag: A flag indicating whether to enable or disable the Intrs.=0A= + * Description: This function will either disable or enable the = interrupts=0A= * depending on the flag argument. The mask argument can be used to =0A= * enable/disable any Intr block. =0A= + * Return Value: NONE.=0A= */=0A= -static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int = flag)=0A= +=0A= +static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int = flag)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= register u64 val64 =3D 0, temp64 =3D 0;=0A= @@ -913,15 +1053,20 @@=0A= temp64 =3D readq(&bar0->general_int_mask);=0A= temp64 &=3D ~((u64) val64);=0A= writeq(temp64, &bar0->general_int_mask);=0A= - /* Disable all interrupts other than PFC interrupt in =0A= - * DMA level.=0A= + /* Keep all interrupts other than PFC interrupt =0A= + * and PCC interrupt disabled in DMA level.=0A= */=0A= - val64 =3D DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M);=0A= + val64 =3D DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M | =0A= + TXDMA_PCC_INT_M);=0A= writeq(val64, &bar0->txdma_int_mask);=0A= /* Enable only the MISC error 1 interrupt in PFC block =0A= */=0A= val64 =3D DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1);=0A= writeq(val64, &bar0->pfc_err_mask);=0A= + /* Enable only the FB_ECC error interrupt in PCC block =0A= + */=0A= + val64 =3D DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR);=0A= + writeq(val64, &bar0->pcc_err_mask);=0A= } else if (flag =3D=3D DISABLE_INTRS) {=0A= /* Disable TxDMA Intrs in the general intr mask =0A= * register */=0A= @@ -1075,17 +1220,19 @@=0A= }=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * val64 - Value read from adapter status register.=0A= - * flag - indicates if the adapter enable bit was ever written once = before.=0A= - * Return Value: =0A= - * void.=0A= - * Description: =0A= - * Returns whether the H/W is ready to go or not. Depending on = whether =0A= - * adapter enable bit was written or not the comparison differs and = the =0A= - * calling function passes the input argument flag to indicate this.=0A= +/** =0A= + * verify_xena_quiescence - Checks whether the H/W is ready =0A= + * @val64 : Value read from adapter status register.=0A= + * @flag : indicates if the adapter enable bit was ever written once=0A= + * before.=0A= + * Description: Returns whether the H/W is ready to go or not. = Depending=0A= + * on whether adapter enable bit was written or not the comparison =0A= + * differs and the calling function passes the input argument flag to=0A= + * indicate this.=0A= + * Return: 1 If xena is quiescence =0A= + * 0 If Xena is not quiescence=0A= */=0A= +=0A= static int verify_xena_quiescence(u64 val64, int flag)=0A= {=0A= int ret =3D 0;=0A= @@ -1122,11 +1269,15 @@=0A= return ret;=0A= }=0A= =0A= -/* =0A= +/**=0A= + * fix_mac_address - Fix for Mac addr problem on Alpha platforms=0A= + * @sp: Pointer to device specifc structure=0A= + * Description : =0A= * New procedure to clear mac address reading problems on Alpha = platforms=0A= *=0A= */=0A= -void FixMacAddress(nic_t * sp)=0A= +=0A= +void fix_mac_address(nic_t * sp)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= u64 val64;=0A= @@ -1138,19 +1289,20 @@=0A= }=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * device private variable.=0A= - * Return Value: =0A= - * SUCCESS on success and -1 on failure.=0A= +/**=0A= + * start_nic - Turns the device on =0A= + * @nic : device private variable.=0A= * Description: =0A= - * This function actually turns the device on. Before this =0A= - * function is called, all Registers are configured from their reset = states =0A= + * This function actually turns the device on. Before this function = is =0A= + * called,all Registers are configured from their reset states =0A= * and shared memory is allocated but the NIC is still quiescent. On =0A= * calling this function, the device interrupts are cleared and the = NIC is=0A= * literally switched on by writing into the adapter control register.=0A= + * Return Value: =0A= + * SUCCESS on success and -1 on failure.=0A= */=0A= -static int startNic(struct s2io_nic *nic)=0A= +=0A= +static int start_nic(struct s2io_nic *nic)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= struct net_device *dev =3D nic->dev;=0A= @@ -1169,10 +1321,21 @@=0A= &bar0->prc_rxd0_n[i]);=0A= =0A= val64 =3D readq(&bar0->prc_ctrl_n[i]);=0A= +#ifndef CONFIG_2BUFF_MODE=0A= val64 |=3D PRC_CTRL_RC_ENABLED;=0A= +#else=0A= + val64 |=3D PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3;=0A= +#endif=0A= writeq(val64, &bar0->prc_ctrl_n[i]);=0A= }=0A= =0A= +#ifdef CONFIG_2BUFF_MODE=0A= + /* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */=0A= + val64 =3D readq(&bar0->rx_pa_cfg);=0A= + val64 |=3D RX_PA_CFG_IGNORE_L2_ERR;=0A= + writeq(val64, &bar0->rx_pa_cfg);=0A= +#endif=0A= +=0A= /* Enabling MC-RLDRAM. After enabling the device, we timeout=0A= * for around 100ms, which is approximately the time required=0A= * for the device to be ready for operation.=0A= @@ -1211,7 +1374,7 @@=0A= /* Enable select interrupts */=0A= interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR |=0A= RX_MAC_INTR;=0A= - en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS);=0A= + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS);=0A= =0A= /* With some switches, link might be already up at this point.=0A= * Because of this weird behavior, when we enable laser, =0A= @@ -1250,23 +1413,19 @@=0A= return SUCCESS;=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * nic - device private variable.=0A= - * Return Value: =0A= - * void.=0A= +/** =0A= + * Free_tx_buffers - Free all queued Tx buffers =0A= + * @nic : device private variable.=0A= * Description: =0A= - * Free all queued Tx buffers.=0A= - */=0A= -void freeTxBuffers(struct s2io_nic *nic)=0A= + * Free all queued Tx buffers.=0A= + * Return Value: void =0A= +*/=0A= +=0A= +void free_tx_buffers(struct s2io_nic *nic)=0A= {=0A= - struct net_device *dev =3D nic->dev;=0A= struct sk_buff *skb;=0A= TxD_t *txdp;=0A= int i, j;=0A= -#if DEBUG_ON=0A= - int cnt =3D 0;=0A= -#endif=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= =0A= @@ -1275,47 +1434,34 @@=0A= =0A= for (i =3D 0; i < config->TxFIFONum; i++) {=0A= for (j =3D 0; j < config->TxCfg[i].FifoLen - 1; j++) {=0A= - txdp =3D mac_control->txdl_start[i] +=0A= - (config->MaxTxDs * j);=0A= -=0A= - if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) {=0A= - /* If owned by host, ignore */=0A= - continue;=0A= - }=0A= + txdp =3D (TxD_t *)nic->list_info[i][j].=0A= + list_virt_addr;=0A= skb =3D=0A= (struct sk_buff *) ((unsigned long) txdp->=0A= Host_Control);=0A= if (skb =3D=3D NULL) {=0A= - DBG_PRINT(ERR_DBG, "%s: NULL skb ",=0A= - dev->name);=0A= - DBG_PRINT(ERR_DBG, "in Tx Int\n");=0A= - return;=0A= + memset(txdp, 0, sizeof(TxD_t));=0A= + continue;=0A= }=0A= -#if DEBUG_ON=0A= - cnt++;=0A= -#endif=0A= dev_kfree_skb(skb);=0A= memset(txdp, 0, sizeof(TxD_t));=0A= }=0A= -#if DEBUG_ON=0A= - DBG_PRINT(INTR_DBG,=0A= - "%s:forcibly freeing %d skbs on FIFO%d\n",=0A= - dev->name, cnt, i);=0A= -#endif=0A= + mac_control->tx_curr_get_info[i].offset =3D 0;=0A= + mac_control->tx_curr_put_info[i].offset =3D 0;=0A= }=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * nic - device private variable.=0A= - * Return Value: =0A= +/** =0A= + * stop_nic - To stop the nic =0A= + * @nic ; device private variable.=0A= + * Description: =0A= + * This function does exactly the opposite of what the start_nic() =0A= + * function does. This function is called to stop the device.=0A= + * Return Value:=0A= * void.=0A= - * Description: =0A= - * This function does exactly the opposite of what the startNic() =0A= - * function does. This function is called to stop =0A= - * the device.=0A= */=0A= -static void stopNic(struct s2io_nic *nic)=0A= +=0A= +static void stop_nic(struct s2io_nic *nic)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= register u64 val64 =3D 0;=0A= @@ -1329,7 +1475,7 @@=0A= /* Disable all interrupts */=0A= interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR |=0A= RX_MAC_INTR;=0A= - en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS);=0A= + en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS);=0A= =0A= /* Disable PRCs */=0A= for (i =3D 0; i < config->RxRingNum; i++) {=0A= @@ -1339,11 +1485,10 @@=0A= }=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * device private variable=0A= - * Return Value: =0A= - * SUCCESS on success or an appropriate -ve value on failure.=0A= +/** =0A= + * fill_rx_buffers - Allocates the Rx side skbs =0A= + * @nic: device private variable=0A= + * @ring_no: ring number =0A= * Description: =0A= * The function allocates Rx side skbs and puts the physical=0A= * address of these buffers into the RxD buffer pointers, so that the = NIC=0A= @@ -1354,9 +1499,13 @@=0A= * 3. Five buffer modes.=0A= * Each mode defines how many fragments the received frame will be = split =0A= * up into by the NIC. The frame is split into L3 header, L4 Header, =0A= - * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself =0A= - * is split into 3 fragments. As of now only single buffer mode is = supported.=0A= + * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself=0A= + * is split into 3 fragments. As of now only single buffer mode is=0A= + * supported.=0A= + * Return Value:=0A= + * SUCCESS on success or an appropriate -ve value on failure.=0A= */=0A= +=0A= int fill_rx_buffers(struct s2io_nic *nic, int ring_no)=0A= {=0A= struct net_device *dev =3D nic->dev;=0A= @@ -1369,6 +1518,13 @@=0A= atomic_read(&nic->rx_bufs_left[ring_no]);=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + RxD_t *rxdpnext;=0A= + int nextblk;=0A= + u64 tmp;=0A= + buffAdd_t *ba;=0A= + dma_addr_t rxdpphys;=0A= +#endif=0A= =0A= mac_control =3D &nic->mac_control;=0A= config =3D &nic->config;=0A= @@ -1390,8 +1546,13 @@=0A= block_index;=0A= off =3D mac_control->rx_curr_put_info[ring_no].offset;=0A= off1 =3D mac_control->rx_curr_get_info[ring_no].offset;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= offset =3D block_no * (MAX_RXDS_PER_BLOCK + 1) + off;=0A= offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1;=0A= +#else=0A= + offset =3D block_no * (MAX_RXDS_PER_BLOCK) + off;=0A= + offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK) + off1;=0A= +#endif=0A= =0A= rxdp =3D nic->rx_blocks[ring_no][block_no].=0A= block_virt_addr + off;=0A= @@ -1400,7 +1561,7 @@=0A= DBG_PRINT(INTR_DBG, " info equated\n");=0A= goto end;=0A= }=0A= -=0A= +#ifndef CONFIG_2BUFF_MODE=0A= if (rxdp->Control_1 =3D=3D END_OF_BLOCK) {=0A= mac_control->rx_curr_put_info[ring_no].=0A= block_index++;=0A= @@ -1418,19 +1579,70 @@=0A= DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n",=0A= dev->name, rxdp);=0A= }=0A= +#else=0A= + if (rxdp->Host_Control =3D=3D END_OF_BLOCK) {=0A= + mac_control->rx_curr_put_info[ring_no].=0A= + block_index++;=0A= + mac_control->rx_curr_put_info[ring_no].=0A= + block_index %=3D nic->block_count[ring_no];=0A= + block_no =3D mac_control->rx_curr_put_info=0A= + [ring_no].block_index;=0A= + off =3D 0;=0A= + DBG_PRINT(INTR_DBG, "%s: block%d at: 0x%llx\n",=0A= + dev->name, block_no,=0A= + (unsigned long long) rxdp->Control_1);=0A= + mac_control->rx_curr_put_info[ring_no].offset =3D=0A= + off;=0A= + rxdp =3D nic->rx_blocks[ring_no][block_no].=0A= + block_virt_addr;=0A= + }=0A= +#endif=0A= =0A= +#ifndef CONFIG_2BUFF_MODE=0A= if (rxdp->Control_1 & RXD_OWN_XENA) {=0A= +#else=0A= + if (rxdp->Control_2 & BIT(0)) {=0A= +#endif=0A= mac_control->rx_curr_put_info[ring_no].=0A= offset =3D off;=0A= goto end;=0A= }=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + /* RxDs Spanning chachelines will be replenished only =0A= + * if the succeeding RxD is also owned by Host. It =0A= + * will always be the ((8*i)+3) and ((8*i)+6) =0A= + * descriptors for the 48 byte descriptor. The offending =0A= + * decsriptor is of-course the 3rd descriptor.=0A= + */=0A= + rxdpphys =3D nic->rx_blocks[ring_no][block_no].=0A= + block_dma_addr + (off * sizeof(RxD_t));=0A= + if (((u64) (rxdpphys)) % 128 > 80) {=0A= + rxdpnext =3D nic->rx_blocks[ring_no][block_no].=0A= + block_virt_addr + (off + 1);=0A= + if (rxdpnext->Host_Control =3D=3D END_OF_BLOCK) {=0A= + nextblk =3D (block_no + 1) %=0A= + (nic->block_count[ring_no]);=0A= + rxdpnext =3D nic->rx_blocks[ring_no]=0A= + [nextblk].block_virt_addr;=0A= + }=0A= + if (rxdpnext->Control_2 & BIT(0))=0A= + goto end;=0A= + }=0A= +#endif=0A= =0A= +#ifndef CONFIG_2BUFF_MODE=0A= skb =3D dev_alloc_skb(size + HEADER_ALIGN_LAYER_3);=0A= +#else=0A= + skb =3D=0A= + dev_alloc_skb(dev->mtu + ALIGN_SIZE +=0A= + /*BUF0_LEN + */ 22);=0A= +#endif=0A= if (!skb) {=0A= DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name);=0A= DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n");=0A= return -ENOMEM;=0A= }=0A= +#ifndef CONFIG_2BUFF_MODE=0A= skb_reserve(skb, HEADER_ALIGN_LAYER_3);=0A= memset(rxdp, 0, sizeof(RxD_t));=0A= rxdp->Buffer0_ptr =3D pci_map_single=0A= @@ -1442,6 +1654,52 @@=0A= off++;=0A= off %=3D (MAX_RXDS_PER_BLOCK + 1);=0A= mac_control->rx_curr_put_info[ring_no].offset =3D off;=0A= +#else=0A= + ba =3D &nic->ba[block_no][off];=0A= + tmp =3D (u64) skb->data;=0A= + tmp +=3D ALIGN_SIZE;=0A= + tmp &=3D ~ALIGN_SIZE;=0A= + skb->data =3D (void *) tmp;=0A= +=0A= + ba->ba_0_org =3D (void *)=0A= + kmalloc(BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC);=0A= + if (!ba->ba_0_org)=0A= + return -ENOMEM;=0A= + tmp =3D (u64) ba->ba_0_org;=0A= + tmp +=3D ALIGN_SIZE;=0A= + tmp &=3D ~((u64) ALIGN_SIZE);=0A= + ba->ba_0 =3D (void *) tmp;=0A= +=0A= + ba->ba_1_org =3D (void *)=0A= + kmalloc(BUF1_LEN + ALIGN_SIZE, GFP_ATOMIC);=0A= + if (!ba->ba_1_org)=0A= + return -ENOMEM;=0A= + tmp =3D (u64) ba->ba_1_org;=0A= + tmp +=3D ALIGN_SIZE;=0A= + tmp &=3D ~((u64) ALIGN_SIZE);=0A= + ba->ba_1 =3D (void *) tmp;=0A= +=0A= + memset(rxdp, 0, sizeof(RxD_t));=0A= +=0A= + rxdp->Buffer2_ptr =3D pci_map_single=0A= + (nic->pdev, skb->data, dev->mtu + 22,=0A= + PCI_DMA_FROMDEVICE);=0A= + rxdp->Buffer0_ptr =3D=0A= + pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN,=0A= + PCI_DMA_FROMDEVICE);=0A= + rxdp->Buffer1_ptr =3D=0A= + pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN,=0A= + PCI_DMA_FROMDEVICE);=0A= +=0A= + rxdp->Control_2 =3D SET_BUFFER2_SIZE(dev->mtu + 22);=0A= + rxdp->Control_2 |=3D SET_BUFFER0_SIZE(BUF0_LEN);=0A= + rxdp->Control_2 |=3D SET_BUFFER1_SIZE(1); /* dummy. */=0A= + rxdp->Control_2 |=3D BIT(0); /* Set Buffer_Empty bit. */=0A= + rxdp->Host_Control =3D (u64) ((unsigned long) (skb));=0A= + rxdp->Control_1 |=3D RXD_OWN_XENA;=0A= + off++;=0A= + mac_control->rx_curr_put_info[ring_no].offset =3D off;=0A= +#endif=0A= atomic_inc(&nic->rx_bufs_left[ring_no]);=0A= alloc_tab++;=0A= }=0A= @@ -1450,15 +1708,16 @@=0A= return SUCCESS;=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * device private variable.=0A= - * Return Value: =0A= - * NONE.=0A= +/**=0A= + * free_rx_buffers - Frees all Rx buffers =0A= + * @sp: device private variable.=0A= * Description: =0A= * This function will free all Rx buffers allocated by host.=0A= + * Return Value:=0A= + * NONE.=0A= */=0A= -static void freeRxBuffers(struct s2io_nic *sp)=0A= +=0A= +static void free_rx_buffers(struct s2io_nic *sp)=0A= {=0A= struct net_device *dev =3D sp->dev;=0A= int i, j, blk =3D 0, off, buf_cnt =3D 0;=0A= @@ -1466,6 +1725,9 @@=0A= struct sk_buff *skb;=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + buffAdd_t *ba;=0A= +#endif=0A= =0A= mac_control =3D &sp->mac_control;=0A= config =3D &sp->config;=0A= @@ -1475,6 +1737,7 @@=0A= off =3D j % (MAX_RXDS_PER_BLOCK + 1);=0A= rxdp =3D sp->rx_blocks[i][blk].block_virt_addr + off;=0A= =0A= +#ifndef CONFIG_2BUFF_MODE=0A= if (rxdp->Control_1 =3D=3D END_OF_BLOCK) {=0A= rxdp =3D=0A= (RxD_t *) ((unsigned long) rxdp->=0A= @@ -1482,11 +1745,23 @@=0A= j++;=0A= blk++;=0A= }=0A= +#else=0A= + if (rxdp->Host_Control =3D=3D END_OF_BLOCK) {=0A= + blk++;=0A= + continue;=0A= + }=0A= +#endif=0A= +=0A= + if (!(rxdp->Control_1 & RXD_OWN_XENA)) {=0A= + memset(rxdp, 0, sizeof(RxD_t));=0A= + continue;=0A= + }=0A= =0A= skb =3D=0A= (struct sk_buff *) ((unsigned long) rxdp->=0A= Host_Control);=0A= if (skb) {=0A= +#ifndef CONFIG_2BUFF_MODE=0A= pci_unmap_single(sp->pdev, (dma_addr_t)=0A= rxdp->Buffer0_ptr,=0A= dev->mtu +=0A= @@ -1494,6 +1769,23 @@=0A= + HEADER_802_2_SIZE +=0A= HEADER_SNAP_SIZE,=0A= PCI_DMA_FROMDEVICE);=0A= +#else=0A= + ba =3D &sp->ba[blk][off];=0A= + pci_unmap_single(sp->pdev, (dma_addr_t)=0A= + rxdp->Buffer0_ptr,=0A= + BUF0_LEN,=0A= + PCI_DMA_FROMDEVICE);=0A= + pci_unmap_single(sp->pdev, (dma_addr_t)=0A= + rxdp->Buffer1_ptr,=0A= + BUF1_LEN,=0A= + PCI_DMA_FROMDEVICE);=0A= + pci_unmap_single(sp->pdev, (dma_addr_t)=0A= + rxdp->Buffer2_ptr,=0A= + dev->mtu + 22,=0A= + PCI_DMA_FROMDEVICE);=0A= + kfree(ba->ba_0_org);=0A= + kfree(ba->ba_1_org);=0A= +#endif=0A= dev_kfree_skb(skb);=0A= atomic_dec(&sp->rx_bufs_left[i]);=0A= buf_cnt++;=0A= @@ -1510,18 +1802,19 @@=0A= }=0A= }=0A= =0A= -/*=0A= - * Input Argument: =0A= - * dev - pointer to the device structure.=0A= - * budget - The number of packets that were budgeted to be processed = during=0A= - * one pass through the 'Poll" function.=0A= - * Return value:=0A= - * 0 on success and 1 if there are No Rx packets to be processed.=0A= - * Description:=0A= - * Comes into picture only if NAPI support has been incorporated. It = does=0A= - * the same thing that rxIntrHandler does, but not in a interrupt = context=0A= - * also It will process only a given number of packets.=0A= +/**=0A= + * s2io_poll - Rx interrupt handler for NAPI support=0A= + * @dev : pointer to the device structure.=0A= + * @budget : The number of packets that were budgeted to be processed =0A= + * during one pass through the 'Poll" function.=0A= + * Description:=0A= + * Comes into picture only if NAPI support has been incorporated. It = does=0A= + * the same thing that rx_intr_handler does, but not in a interrupt = context=0A= + * also It will process only a given number of packets.=0A= + * Return value:=0A= + * 0 on success and 1 if there are No Rx packets to be processed.=0A= */=0A= +=0A= #ifdef CONFIG_S2IO_NAPI=0A= static int s2io_poll(struct net_device *dev, int *budget)=0A= {=0A= @@ -1531,11 +1824,16 @@=0A= register u64 val64 =3D 0;=0A= rx_curr_get_info_t offset_info;=0A= int i, block_no;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= u16 val16, cksum;=0A= +#endif=0A= struct sk_buff *skb;=0A= RxD_t *rxdp;=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + buffAdd_t *ba;=0A= +#endif=0A= =0A= mac_control =3D &nic->mac_control;=0A= config =3D &nic->config;=0A= @@ -1554,6 +1852,7 @@=0A= block_no =3D offset_info.block_index;=0A= rxdp =3D nic->rx_blocks[i][block_no].block_virt_addr +=0A= offset_info.offset;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= while (!(rxdp->Control_1 & RXD_OWN_XENA)) {=0A= if (rxdp->Control_1 =3D=3D END_OF_BLOCK) {=0A= rxdp =3D=0A= @@ -1589,7 +1888,7 @@=0A= HEADER_802_2_SIZE +=0A= HEADER_SNAP_SIZE,=0A= PCI_DMA_FROMDEVICE);=0A= - rxOsmHandler(nic, val16, rxdp, i);=0A= + rx_osm_handler(nic, val16, rxdp, i);=0A= pkt_cnt++;=0A= offset_info.offset++;=0A= offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1);=0A= @@ -1598,7 +1897,64 @@=0A= offset_info.offset;=0A= mac_control->rx_curr_get_info[i].offset =3D=0A= offset_info.offset;=0A= + if ((indicate_max_pkts)=0A= + && (pkt_cnt > indicate_max_pkts))=0A= + break;=0A= + }=0A= +#else=0A= + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) &&=0A= + !(rxdp->Control_2 & BIT(0))) {=0A= + skb =3D (struct sk_buff *) ((unsigned long)=0A= + rxdp->Host_Control);=0A= + if (skb =3D=3D NULL) {=0A= + DBG_PRINT(ERR_DBG, "%s: The skb is ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");=0A= + return;=0A= + }=0A= +=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer0_ptr,=0A= + BUF0_LEN, PCI_DMA_FROMDEVICE);=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer1_ptr,=0A= + BUF1_LEN, PCI_DMA_FROMDEVICE);=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer2_ptr,=0A= + dev->mtu + 22,=0A= + PCI_DMA_FROMDEVICE);=0A= + ba =3D &nic->ba[block_no][offset_info.offset];=0A= +=0A= + rx_osm_handler(nic, rxdp, i, ba);=0A= +=0A= + offset_info.offset++;=0A= + mac_control->rx_curr_get_info[i].offset =3D=0A= + offset_info.offset;=0A= + rxdp =3D=0A= + nic->rx_blocks[i][block_no].block_virt_addr +=0A= + offset_info.offset;=0A= +=0A= + if (offset_info.offset &&=0A= + (!(offset_info.offset % MAX_RXDS_PER_BLOCK))) {=0A= + offset_info.offset =3D 0;=0A= + mac_control->rx_curr_get_info[i].=0A= + offset =3D offset_info.offset;=0A= + block_no++;=0A= + block_no %=3D nic->block_count[i];=0A= + mac_control->rx_curr_get_info[i].=0A= + block_index =3D block_no;=0A= + rxdp =3D=0A= + nic->rx_blocks[i][block_no].=0A= + block_virt_addr;=0A= + }=0A= + pkt_cnt++;=0A= + if ((indicate_max_pkts) &&=0A= + (pkt_cnt > indicate_max_pkts))=0A= + break;=0A= }=0A= +#endif=0A= + if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts))=0A= + break;=0A= }=0A= if (!pkt_cnt)=0A= pkt_cnt =3D 1;=0A= @@ -1611,7 +1967,7 @@=0A= netif_rx_complete(dev);=0A= =0A= /* Re enable the Rx interrupts. */=0A= - en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS);=0A= + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS);=0A= return 0;=0A= =0A= no_rx:=0A= @@ -1622,37 +1978,40 @@=0A= return 1;=0A= }=0A= #else=0A= -/* =0A= - * Input Arguments: =0A= - * device private variable.=0A= - * Return Value: =0A= - * NONE.=0A= +/** =0A= + * rx_intr_handler - Rx interrupt handler=0A= + * @nic: device private variable.=0A= * Description: =0A= - * If the interrupt is because of a received frame or if the =0A= - * receive ring contains fresh as yet un-processed frames, this = function is=0A= + * If the interrupt is because of a received frame or if the =0A= + * receive ring contains fresh as yet un-processed frames,this = function is=0A= * called. It picks out the RxD at which place the last Rx processing = had =0A= * stopped and sends the skb to the OSM's Rx handler and then = increments =0A= * the offset.=0A= + * Return Value:=0A= + * NONE.=0A= */=0A= -static void rxIntrHandler(struct s2io_nic *nic)=0A= +=0A= +static void rx_intr_handler(struct s2io_nic *nic)=0A= {=0A= struct net_device *dev =3D (struct net_device *) nic->dev;=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= rx_curr_get_info_t offset_info;=0A= RxD_t *rxdp;=0A= struct sk_buff *skb;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= u16 val16, cksum;=0A= +#endif=0A= register u64 val64 =3D 0;=0A= - int i, block_no;=0A= + int i, block_no, pkt_cnt =3D 0;=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + buffAdd_t *ba;=0A= +#endif=0A= =0A= mac_control =3D &nic->mac_control;=0A= config =3D &nic->config;=0A= =0A= -#if DEBUG_ON=0A= - nic->rxint_cnt++;=0A= -#endif=0A= =0A= /* rx_traffic_int reg is an R1 register, hence we read and write back =0A= * the samevalue in the register to clear it.=0A= @@ -1665,6 +2024,7 @@=0A= block_no =3D offset_info.block_index;=0A= rxdp =3D nic->rx_blocks[i][block_no].block_virt_addr +=0A= offset_info.offset;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= while (!(rxdp->Control_1 & RXD_OWN_XENA)) {=0A= if (rxdp->Control_1 =3D=3D END_OF_BLOCK) {=0A= rxdp =3D (RxD_t *) ((unsigned long)=0A= @@ -1698,7 +2058,7 @@=0A= HEADER_802_2_SIZE +=0A= HEADER_SNAP_SIZE,=0A= PCI_DMA_FROMDEVICE);=0A= - rxOsmHandler(nic, val16, rxdp, i);=0A= + rx_osm_handler(nic, val16, rxdp, i);=0A= offset_info.offset++;=0A= offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1);=0A= rxdp =3D=0A= @@ -1706,27 +2066,85 @@=0A= offset_info.offset;=0A= mac_control->rx_curr_get_info[i].offset =3D=0A= offset_info.offset;=0A= + pkt_cnt++;=0A= + if ((indicate_max_pkts)=0A= + && (pkt_cnt > indicate_max_pkts))=0A= + break;=0A= + }=0A= +#else=0A= + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) &&=0A= + !(rxdp->Control_2 & BIT(0))) {=0A= + skb =3D (struct sk_buff *) ((unsigned long)=0A= + rxdp->Host_Control);=0A= + if (skb =3D=3D NULL) {=0A= + DBG_PRINT(ERR_DBG, "%s: The skb is ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");=0A= + return;=0A= + }=0A= +=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer0_ptr,=0A= + BUF0_LEN, PCI_DMA_FROMDEVICE);=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer1_ptr,=0A= + BUF1_LEN, PCI_DMA_FROMDEVICE);=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer2_ptr,=0A= + dev->mtu + 22,=0A= + PCI_DMA_FROMDEVICE);=0A= + ba =3D &nic->ba[block_no][offset_info.offset];=0A= +=0A= + rx_osm_handler(nic, rxdp, i, ba);=0A= +=0A= + offset_info.offset++;=0A= + mac_control->rx_curr_get_info[i].offset =3D=0A= + offset_info.offset;=0A= + rxdp =3D=0A= + nic->rx_blocks[i][block_no].block_virt_addr +=0A= + offset_info.offset;=0A= +=0A= + if (offset_info.offset &&=0A= + (!(offset_info.offset % MAX_RXDS_PER_BLOCK))) {=0A= + offset_info.offset =3D 0;=0A= + mac_control->rx_curr_get_info[i].=0A= + offset =3D offset_info.offset;=0A= + block_no++;=0A= + block_no %=3D nic->block_count[i];=0A= + mac_control->rx_curr_get_info[i].=0A= + block_index =3D block_no;=0A= + rxdp =3D=0A= + nic->rx_blocks[i][block_no].=0A= + block_virt_addr;=0A= + }=0A= + pkt_cnt++;=0A= + if ((indicate_max_pkts)=0A= + && (pkt_cnt > indicate_max_pkts))=0A= + break;=0A= }=0A= +#endif=0A= + if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts))=0A= + break;=0A= }=0A= }=0A= #endif=0A= -=0A= -/* =0A= - * Input Arguments: =0A= - * device private variable=0A= - * Return Value: =0A= - * NONE=0A= +/** =0A= + * tx_intr_handler - Transmit interrupt handler=0A= + * @nic : device private variable=0A= * Description: =0A= * If an interrupt was raised to indicate DMA complete of the =0A= - * Tx packet, this function is called. It identifies the last TxD = whose buffer=0A= - * was freed and frees all skbs whose data have already DMA'ed into = the NICs=0A= - * internal memory.=0A= + * Tx packet, this function is called. It identifies the last TxD =0A= + * whose buffer was freed and frees all skbs whose data have already =0A= + * DMA'ed into the NICs internal memory.=0A= + * Return Value:=0A= + * NONE=0A= */=0A= -static void txIntrHandler(struct s2io_nic *nic)=0A= +=0A= +static void tx_intr_handler(struct s2io_nic *nic)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= struct net_device *dev =3D (struct net_device *) nic->dev;=0A= - tx_curr_get_info_t offset_info, offset_info1;=0A= + tx_curr_get_info_t get_info, put_info;=0A= struct sk_buff *skb;=0A= TxD_t *txdlp;=0A= register u64 val64 =3D 0;=0A= @@ -1734,10 +2152,6 @@=0A= u16 j, frg_cnt;=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= -#if DEBUG_ON=0A= - int cnt =3D 0;=0A= - nic->txint_cnt++;=0A= -#endif=0A= =0A= mac_control =3D &nic->mac_control;=0A= config =3D &nic->config;=0A= @@ -1749,12 +2163,12 @@=0A= writeq(val64, &bar0->tx_traffic_int);=0A= =0A= for (i =3D 0; i < config->TxFIFONum; i++) {=0A= - offset_info =3D mac_control->tx_curr_get_info[i];=0A= - offset_info1 =3D mac_control->tx_curr_put_info[i];=0A= - txdlp =3D mac_control->txdl_start[i] +=0A= - (config->MaxTxDs * offset_info.offset);=0A= + get_info =3D mac_control->tx_curr_get_info[i];=0A= + put_info =3D mac_control->tx_curr_put_info[i];=0A= + txdlp =3D (TxD_t *)nic->list_info[i][get_info.offset].=0A= + list_virt_addr;=0A= while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&=0A= - (offset_info.offset !=3D offset_info1.offset) &&=0A= + (get_info.offset !=3D put_info.offset) &&=0A= (txdlp->Host_Control)) {=0A= /* Check for TxD errors */=0A= if (txdlp->Control_1 & TXD_T_CODE) {=0A= @@ -1802,23 +2216,15 @@=0A= /* Updating the statistics block */=0A= nic->stats.tx_packets++;=0A= nic->stats.tx_bytes +=3D skb->len;=0A= -#if DEBUG_ON=0A= - nic->txpkt_bytes +=3D skb->len;=0A= - cnt++;=0A= -#endif=0A= dev_kfree_skb_irq(skb);=0A= =0A= - offset_info.offset++;=0A= - offset_info.offset %=3D offset_info.fifo_len + 1;=0A= - txdlp =3D mac_control->txdl_start[i] +=0A= - (config->MaxTxDs * offset_info.offset);=0A= + get_info.offset++;=0A= + get_info.offset %=3D get_info.fifo_len + 1;=0A= + txdlp =3D (TxD_t *)nic->list_info[i]=0A= + [get_info.offset].list_virt_addr;=0A= mac_control->tx_curr_get_info[i].offset =3D=0A= - offset_info.offset;=0A= + get_info.offset;=0A= }=0A= -#if DEBUG_ON=0A= - DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name,=0A= - cnt);=0A= -#endif=0A= }=0A= =0A= spin_lock(&nic->tx_lock);=0A= @@ -1827,55 +2233,70 @@=0A= spin_unlock(&nic->tx_lock);=0A= }=0A= =0A= -/* =0A= - * Input Arguments: =0A= - * device private variable=0A= - * Return Value: =0A= +/** =0A= + * alarm_intr_handler - Alarm Interrrupt handler=0A= + * @nic: device private variable=0A= + * Description: If the interrupt was neither because of Rx packet or = Tx =0A= + * complete, this function is called. If the interrupt was to indicate=0A= + * a loss of link, the OSM link status handler is invoked for any = other =0A= + * alarm interrupt the block that raised the interrupt is displayed =0A= + * and a H/W reset is issued.=0A= + * Return Value:=0A= * NONE=0A= - * Description: =0A= - * If the interrupt was neither because of Rx packet or Tx =0A= - * complete, this function is called. If the interrupt was to indicate = a loss=0A= - * of link, the OSM link status handler is invoked for any other alarm =0A= - * interrupt the block that raised the interrupt is displayed and a = H/W reset =0A= - * is issued.=0A= - */=0A= -static void alarmIntrHandler(struct s2io_nic *nic)=0A= +*/=0A= +=0A= +static void alarm_intr_handler(struct s2io_nic *nic)=0A= {=0A= struct net_device *dev =3D (struct net_device *) nic->dev;=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= register u64 val64 =3D 0, err_reg =3D 0;=0A= =0A= -=0A= /* Handling link status change error Intr */=0A= err_reg =3D readq(&bar0->mac_rmac_err_reg);=0A= + writeq(err_reg, &bar0->mac_rmac_err_reg);=0A= if (err_reg & RMAC_LINK_STATE_CHANGE_INT) {=0A= schedule_work(&nic->set_link_task);=0A= }=0A= =0A= - /* Handling SERR errors by stopping device Xmit queue and forcing =0A= - * a H/W reset.=0A= - */=0A= + /* In case of a serious error, the device will be Reset. */=0A= val64 =3D readq(&bar0->serr_source);=0A= if (val64 & SERR_SOURCE_ANY) {=0A= DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name);=0A= DBG_PRINT(ERR_DBG, "serious error!!\n");=0A= - netif_stop_queue(dev);=0A= + schedule_work(&nic->rst_timer_task);=0A= }=0A= +=0A= + /*=0A= + * Also as mentioned in the latest Errata sheets if the PCC_FB_ECC=0A= + * Error occurs, the adapter will be recycled by disabling the=0A= + * adapter enable bit and enabling it again after the device =0A= + * becomes Quiescent.=0A= + */=0A= + val64 =3D readq(&bar0->pcc_err_reg);=0A= + writeq(val64, &bar0->pcc_err_reg);=0A= + if (val64 & PCC_FB_ECC_DB_ERR) {=0A= + u64 ac =3D readq(&bar0->adapter_control);=0A= + ac &=3D ~(ADAPTER_CNTL_EN);=0A= + writeq(ac, &bar0->adapter_control);=0A= + ac =3D readq(&bar0->adapter_control);=0A= + schedule_work(&nic->set_link_task);=0A= + }=0A= +=0A= /* Other type of interrupts are not being handled now, TODO*/=0A= }=0A= =0A= -/*=0A= - * Input Argument: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= +/** =0A= + * waitFor Cmd Complete - waits for a command to complete.=0A= + * @sp : private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * Description: Function that waits for a command to Write into RMAC =0A= + * ADDR DATA registers to be completed and returns either success or =0A= + * error depending on whether the command was complete or not. =0A= * Return value:=0A= * SUCCESS on success and FAILURE on failure.=0A= - * Description:=0A= - * Function that waits for a command to Write into RMAC ADDR DATA = registers =0A= - * to be completed and returns either success or error depending on = whether =0A= - * the command was complete or not. =0A= */=0A= -int waitForCmdComplete(nic_t * sp)=0A= +=0A= +int wait_for_cmd_complete(nic_t * sp)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= int ret =3D FAILURE, cnt =3D 0;=0A= @@ -1900,17 +2321,16 @@=0A= return ret;=0A= }=0A= =0A= -/*=0A= - * Input Argument: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= +/** =0A= + * s2io_reset - Resets the card. =0A= + * @sp : private member of the device structure.=0A= + * Description: Function to Reset the card. This function then also=0A= + * restores the previously saved PCI configuration space registers as =0A= + * the card reset also resets the Configration space.=0A= * Return value:=0A= - * void.=0A= - * Description:=0A= - * Function to Reset the card. This function then also restores the = previously=0A= - * saved PCI configuration space registers as the card reset also = resets the=0A= - * Configration space.=0A= + * void.=0A= */=0A= +=0A= void s2io_reset(nic_t * sp)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= @@ -1954,16 +2374,16 @@=0A= sp->device_enabled_once =3D FALSE;=0A= }=0A= =0A= -/*=0A= - * Input Argument: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= +/**=0A= + * s2io_set_swapper - to set the swapper controle on the card =0A= + * @sp : private member of the device structure, =0A= + * pointer to the s2io_nic structure.=0A= + * Description: Function to set the swapper control on the card =0A= + * correctly depending on the 'endianness' of the system.=0A= * Return value:=0A= * SUCCESS on success and FAILURE on failure.=0A= - * Description:=0A= - * Function to set the swapper control on the card correctly depending = on the=0A= - * 'endianness' of the system.=0A= */=0A= +=0A= int s2io_set_swapper(nic_t * sp)=0A= {=0A= struct net_device *dev =3D sp->dev;=0A= @@ -2041,17 +2461,18 @@=0A= * Functions defined below concern the OS part of the driver *=0A= * ********************************************************* */=0A= =0A= -/*=0A= - * Input Argument: =0A= - * dev - pointer to the device structure.=0A= - * Return value:=0A= - * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= - * file on failure.=0A= +/** =0A= + * s2io-open - open entry point of the driver=0A= + * @dev : pointer to the device structure.=0A= * Description:=0A= * This function is the open entry point of the driver. It mainly = calls a=0A= * function to allocate Rx buffers and inserts them into the buffer=0A= * descriptors and then enables the Rx part of the NIC. =0A= - */=0A= + * Return value:=0A= + * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= + * file on failure.=0A= +*/=0A= +=0A= int s2io_open(struct net_device *dev)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= @@ -2065,7 +2486,7 @@=0A= sp->last_link_state =3D LINK_DOWN;=0A= =0A= /* Initialize the H/W I/O registers */=0A= - if (initNic(sp) !=3D 0) {=0A= + if (init_nic(sp) !=3D 0) {=0A= DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n",=0A= dev->name);=0A= return -ENODEV;=0A= @@ -2102,7 +2523,7 @@=0A= dev->name);=0A= s2io_reset(sp);=0A= free_irq(dev->irq, dev);=0A= - freeRxBuffers(sp);=0A= + free_rx_buffers(sp);=0A= return -ENOMEM;=0A= }=0A= DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i,=0A= @@ -2113,12 +2534,12 @@=0A= tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev);=0A= =0A= /* Enable Rx Traffic and interrupts on the NIC */=0A= - if (startNic(sp)) {=0A= + if (start_nic(sp)) {=0A= DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name);=0A= tasklet_kill(&sp->task);=0A= s2io_reset(sp);=0A= free_irq(dev->irq, dev);=0A= - freeRxBuffers(sp);=0A= + free_rx_buffers(sp);=0A= return -ENODEV;=0A= }=0A= =0A= @@ -2128,32 +2549,32 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - device pointer.=0A= - * Return value:=0A= - * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= - * file on failure.=0A= +/**=0A= + * s2io_close -close entry point of the driver=0A= + * @dev : device pointer.=0A= * Description:=0A= * This is the stop entry point of the driver. It needs to undo exactly=0A= - * whatever was done by the open entry point, thus it's usually = referred to=0A= - * as the close function. Among other things this function mainly = stops the=0A= + * whatever was done by the open entry point,thus it's usually = referred to=0A= + * as the close function.Among other things this function mainly stops = the=0A= * Rx side of the NIC and frees all the Rx buffers in the Rx rings.=0A= - */=0A= + * Return value:=0A= + * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= + * file on failure.=0A= +*/=0A= +=0A= int s2io_close(struct net_device *dev)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= register u64 val64 =3D 0;=0A= u16 cnt =3D 0;=0A= + unsigned long flags;=0A= =0A= - spin_lock(&sp->isr_lock);=0A= + spin_lock_irqsave(&sp->tx_lock, flags);=0A= netif_stop_queue(dev);=0A= =0A= /* disable Tx and Rx traffic on the NIC */=0A= - stopNic(sp);=0A= -=0A= - spin_unlock(&sp->isr_lock);=0A= + stop_nic(sp);=0A= =0A= /* If the device tasklet is running, wait till its done before killing = it */=0A= while (atomic_read(&(sp->tasklet_status))) {=0A= @@ -2162,6 +2583,17 @@=0A= }=0A= tasklet_kill(&sp->task);=0A= =0A= + /* Free the Registered IRQ */=0A= + free_irq(dev->irq, dev);=0A= +=0A= + /* Flush all scheduled tasks */=0A= + if(sp->task_flag =3D=3D 1) {=0A= + DBG_PRINT(INFO_DBG,"%s: Calling close from a task\n",=0A= + dev->name);=0A= + } else {=0A= + flush_scheduled_work();=0A= + }=0A= +=0A= /* Check if the device is Quiescent and then Reset the NIC */=0A= do {=0A= val64 =3D readq(&bar0->adapter_status);=0A= @@ -2182,36 +2614,36 @@=0A= } while (1);=0A= s2io_reset(sp);=0A= =0A= -/* Free the Registered IRQ */=0A= - free_irq(dev->irq, dev);=0A= -=0A= /* Free all Tx Buffers waiting for transmission */=0A= - freeTxBuffers(sp);=0A= + free_tx_buffers(sp);=0A= =0A= /* Free all Rx buffers allocated by host */=0A= - freeRxBuffers(sp);=0A= + free_rx_buffers(sp);=0A= =0A= sp->device_close_flag =3D TRUE; /* Device is shut down. */=0A= + spin_unlock_irqrestore(&sp->tx_lock, flags);=0A= +// sp->cls_flg =3D 1;=0A= =0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * skb - the socket buffer containing the Tx data.=0A= - * dev - device pointer.=0A= - * Return value:=0A= - * '0' on success & 1 on failure. =0A= - * NOTE: when device cant queue the pkt, just the trans_start variable = will=0A= - * not be upadted.=0A= - * Description:=0A= +/**=0A= + * s2io_xmit - Tx entry point of te driver=0A= + * @skb : the socket buffer containing the Tx data.=0A= + * @dev : device pointer.=0A= + * Description :=0A= * This function is the Tx entry point of the driver. S2IO NIC supports=0A= * certain protocol assist features on Tx side, namely CSO, S/G, LSO.=0A= - */=0A= + * NOTE: when device cant queue the pkt,just the trans_start variable = will=0A= + * not be upadted.=0A= + * Return value:=0A= + * '0' on success & 1 on failure.=0A= +*/=0A= +=0A= int s2io_xmit(struct sk_buff *skb, struct net_device *dev)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= - u16 off, txd_len, frg_cnt, frg_len, i, queue, off1, queue_len;=0A= + u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off;=0A= register u64 val64;=0A= TxD_t *txdp;=0A= TxFIFO_element_t *tx_fifo;=0A= @@ -2221,6 +2653,7 @@=0A= #endif=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= =0A= mac_control =3D &sp->mac_control;=0A= config =3D &sp->config;=0A= @@ -2228,6 +2661,14 @@=0A= DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name);=0A= =0A= spin_lock_irqsave(&sp->tx_lock, flags);=0A= + if(netif_queue_stopped(dev)) {=0A= + DBG_PRINT(ERR_DBG,"%s:s2io_xmit: Tx Queue stopped\n",=0A= + dev->name);=0A= + dev_kfree_skb(skb);=0A= + spin_unlock_irqrestore(&sp->tx_lock, flags);=0A= + return 0;=0A= + }=0A= +=0A= queue =3D 0;=0A= /* Multi FIFO Tx is disabled for now. */=0A= if (!queue && tx_prio) {=0A= @@ -2236,21 +2677,20 @@=0A= }=0A= =0A= =0A= - off =3D (u16) mac_control->tx_curr_put_info[queue].offset;=0A= - off1 =3D (u16) mac_control->tx_curr_get_info[queue].offset;=0A= - txd_len =3D mac_control->txdl_len;=0A= - txdp =3D mac_control->txdl_start[queue] + (config->MaxTxDs * off);=0A= + put_off =3D (u16) mac_control->tx_curr_put_info[queue].offset;=0A= + get_off =3D (u16) mac_control->tx_curr_get_info[queue].offset;=0A= + txdp =3D (TxD_t *)sp->list_info[queue][put_off].list_virt_addr;=0A= =0A= queue_len =3D mac_control->tx_curr_put_info[queue].fifo_len + 1;=0A= /* Avoid "put" pointer going beyond "get" pointer */=0A= - if (txdp->Host_Control || (((off + 1) % queue_len) =3D=3D off1)) {=0A= + if (txdp->Host_Control || =0A= + (((put_off + 1) % queue_len) =3D=3D get_off)) {=0A= DBG_PRINT(ERR_DBG, "Error in xmit, No free TXDs.\n");=0A= netif_stop_queue(dev);=0A= dev_kfree_skb(skb);=0A= spin_unlock_irqrestore(&sp->tx_lock, flags);=0A= return 0;=0A= }=0A= -=0A= #ifdef NETIF_F_TSO=0A= mss =3D skb_shinfo(skb)->tso_size;=0A= if (mss) {=0A= @@ -2289,8 +2729,7 @@=0A= txdp->Control_1 |=3D TXD_GATHER_CODE_LAST;=0A= =0A= tx_fifo =3D mac_control->tx_FIFO_start[queue];=0A= - val64 =3D (mac_control->txdl_start_phy[queue] +=0A= - (sizeof(TxD_t) * txd_len * off));=0A= + val64 =3D sp->list_info[queue][put_off].list_phy_addr;=0A= writeq(val64, &tx_fifo->TxDL_Pointer);=0A= =0A= val64 =3D (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST |=0A= @@ -2301,15 +2740,18 @@=0A= #endif=0A= writeq(val64, &tx_fifo->List_Control);=0A= =0A= - off++;=0A= - off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1;=0A= - mac_control->tx_curr_put_info[queue].offset =3D off;=0A= + /* Perform a PCI read to flush previous writes */=0A= + val64 =3D readq(&bar0->general_int_status);=0A= +=0A= + put_off++;=0A= + put_off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1;=0A= + mac_control->tx_curr_put_info[queue].offset =3D put_off;=0A= =0A= /* Avoid "put" pointer going beyond "get" pointer */=0A= - if (((off + 1) % queue_len) =3D=3D off1) {=0A= - DBG_PRINT(TX_DBG, =0A= - "No free TxDs for xmit, Put: 0x%x Get:0x%x\n",=0A= - off, off1);=0A= + if (((put_off + 1) % queue_len) =3D=3D get_off) {=0A= + DBG_PRINT(TX_DBG,=0A= + "No free TxDs for xmit, Put: 0x%x Get:0x%x\n",=0A= + put_off, get_off);=0A= netif_stop_queue(dev);=0A= }=0A= =0A= @@ -2319,26 +2761,26 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * irq: the irq of the device.=0A= - * dev_id: a void pointer to the dev structure of the NIC.=0A= - * ptregs: pointer to the registers pushed on the stack.=0A= +/**=0A= + * s2io_isr - ISR handler of the device .=0A= + * @irq: the irq of the device.=0A= + * @dev_id: a void pointer to the dev structure of the NIC.=0A= + * @ptregs: pointer to the registers pushed on the stack.=0A= + * Description: This function is the ISR handler of the device. It =0A= + * identifies the reason for the interrupt and calls the relevant =0A= + * service routines. As a contongency measure, this ISR allocates the =0A= + * recv buffers, if their numbers are below the panic value which is=0A= + * presently set to 25% of the original number of rcv buffers = allocated.=0A= * Return value:=0A= * void.=0A= - * Description:=0A= - * This function is the ISR handler of the device. It identifies the = reason =0A= - * for the interrupt and calls the relevant service routines.=0A= - * As a contongency measure, this ISR allocates the recv buffers, if = their =0A= - * numbers are below the panic value which is presently set to 25% of = the=0A= - * original number of rcv buffers allocated.=0A= - */=0A= +*/=0A= =0A= static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs)=0A= {=0A= struct net_device *dev =3D (struct net_device *) dev_id;=0A= nic_t *sp =3D dev->priv;=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + int i, ret;=0A= u64 reason =3D 0, general_mask =3D 0;=0A= mac_info_t *mac_control;=0A= struct config_param *config;=0A= @@ -2346,8 +2788,6 @@=0A= mac_control =3D &sp->mac_control;=0A= config =3D &sp->config;=0A= =0A= - spin_lock(&sp->isr_lock);=0A= -=0A= /* Identify the cause for interrupt and call the appropriate=0A= * interrupt handler. Causes for the interrupt could be;=0A= * 1. Rx of packet.=0A= @@ -2359,42 +2799,38 @@=0A= =0A= if (!reason) {=0A= /* The interrupt was not raised by Xena. */=0A= - spin_unlock(&sp->isr_lock);=0A= return IRQ_NONE;=0A= }=0A= /* Mask the interrupts on the NIC */=0A= general_mask =3D readq(&bar0->general_int_mask);=0A= writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask);=0A= =0A= -#if DEBUG_ON=0A= - sp->int_cnt++;=0A= -#endif=0A= =0A= /* If Intr is because of Tx Traffic */=0A= if (reason & GEN_INTR_TXTRAFFIC) {=0A= - txIntrHandler(sp);=0A= + tx_intr_handler(sp);=0A= }=0A= =0A= /* If Intr is because of an error */=0A= if (reason & (GEN_ERROR_INTR))=0A= - alarmIntrHandler(sp);=0A= + alarm_intr_handler(sp);=0A= =0A= #ifdef CONFIG_S2IO_NAPI=0A= if (reason & GEN_INTR_RXTRAFFIC) {=0A= if (netif_rx_schedule_prep(dev)) {=0A= - en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR,=0A= - DISABLE_INTRS);=0A= - /* We retake the snap shot of the general interrupt =0A= - * register.=0A= + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR,=0A= + DISABLE_INTRS);=0A= + /* We reflect the disable Rx Intr into the =0A= + * general interrupt mask register's snap shot.=0A= */=0A= - general_mask =3D readq(&bar0->general_int_mask);=0A= + general_mask |=3D BIT(40);=0A= __netif_rx_schedule(dev);=0A= }=0A= }=0A= #else=0A= /* If Intr is because of Rx Traffic */=0A= if (reason & GEN_INTR_RXTRAFFIC) {=0A= - rxIntrHandler(sp);=0A= + rx_intr_handler(sp);=0A= }=0A= #endif=0A= =0A= @@ -2402,26 +2838,21 @@=0A= * buffers from the interrupt handler itself, else schedule a tasklet = to =0A= * reallocate the buffers.=0A= */=0A= -#if 1=0A= - {=0A= - int i;=0A= -=0A= for (i =3D 0; i < config->RxRingNum; i++) {=0A= int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]);=0A= int level =3D rx_buffer_level(sp, rxb_size, i);=0A= =0A= if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) {=0A= - int ret;=0A= -=0A= - DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name);=0A= - DBG_PRINT(ERR_DBG, "PANIC levels\n");=0A= + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name);=0A= + DBG_PRINT(INTR_DBG, "PANIC levels\n");=0A= if ((ret =3D fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) {=0A= DBG_PRINT(ERR_DBG, "%s:Out of memory",=0A= dev->name);=0A= DBG_PRINT(ERR_DBG, " in ISR!!\n");=0A= writeq(general_mask,=0A= &bar0->general_int_mask);=0A= - spin_unlock(&sp->isr_lock);=0A= + clear_bit(0,=0A= + (unsigned long *) (&sp->tasklet_status));=0A= return IRQ_HANDLED;=0A= }=0A= clear_bit(0,=0A= @@ -2433,27 +2864,25 @@=0A= =0A= }=0A= =0A= - }=0A= -#else=0A= - tasklet_schedule(&sp->task);=0A= -#endif=0A= -=0A= /* Unmask all the previously enabled interrupts on the NIC */=0A= writeq(general_mask, &bar0->general_int_mask);=0A= =0A= - spin_unlock(&sp->isr_lock);=0A= + /* Perform a PCI read to flush previous writes */=0A= + reason =3D readq(&bar0->general_int_mask);=0A= +=0A= return IRQ_HANDLED;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - pointer to the device structure.=0A= - * Return value:=0A= - * pointer to the updated net_device_stats structure.=0A= +/**=0A= + * s2io_get_stats - Updates the device statistics structure. =0A= + * @dev : pointer to the device structure.=0A= * Description:=0A= * This function updates the device statistics structure in the = s2io_nic =0A= * structure and returns a pointer to the same.=0A= + * Return value:=0A= + * pointer to the updated net_device_stats structure.=0A= */=0A= +=0A= struct net_device_stats *s2io_get_stats(struct net_device *dev)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= @@ -2472,18 +2901,19 @@=0A= return (&sp->stats);=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - pointer to the device structure=0A= - * Return value:=0A= - * void.=0A= +/**=0A= + * s2io_set_multicast - entry point for multicast address = enable/disable.=0A= + * @dev : pointer to the device structure=0A= * Description:=0A= * This function is a driver entry point which gets called by the = kernel =0A= * whenever multicast addresses must be enabled/disabled. This also = gets =0A= * called to set/reset promiscuous mode. Depending on the deivce flag, = we=0A= * determine, if multicast address must be enabled or if promiscuous = mode=0A= * is to be disabled etc.=0A= + * Return value:=0A= + * void.=0A= */=0A= +=0A= static void s2io_set_multicast(struct net_device *dev)=0A= {=0A= int i, j, prev_cnt;=0A= @@ -2506,7 +2936,7 @@=0A= RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET);=0A= writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= /* Wait till command completes */=0A= - waitForCmdComplete(sp);=0A= + wait_for_cmd_complete(sp);=0A= =0A= sp->m_cast_flg =3D 1;=0A= sp->all_multi_pos =3D MAC_MC_ALL_MC_ADDR_OFFSET;=0A= @@ -2519,7 +2949,7 @@=0A= RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos);=0A= writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= /* Wait till command completes */=0A= - waitForCmdComplete(sp);=0A= + wait_for_cmd_complete(sp);=0A= =0A= sp->m_cast_flg =3D 0;=0A= sp->all_multi_pos =3D 0;=0A= @@ -2582,7 +3012,7 @@=0A= writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= =0A= /* Wait for command completes */=0A= - if (waitForCmdComplete(sp)) {=0A= + if (wait_for_cmd_complete(sp)) {=0A= DBG_PRINT(ERR_DBG, "%s: Adding ",=0A= dev->name);=0A= DBG_PRINT(ERR_DBG, "Multicasts failed\n");=0A= @@ -2609,7 +3039,7 @@=0A= writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= =0A= /* Wait for command completes */=0A= - if (waitForCmdComplete(sp)) {=0A= + if (wait_for_cmd_complete(sp)) {=0A= DBG_PRINT(ERR_DBG, "%s: Adding ",=0A= dev->name);=0A= DBG_PRINT(ERR_DBG, "Multicasts failed\n");=0A= @@ -2619,17 +3049,16 @@=0A= }=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - pointer to the device structure.=0A= - * new_mac - a uchar pointer to the new mac address which is to be set.=0A= - * Return value:=0A= - * SUCCESS on success and an appropriate (-)ve integer as defined in = errno.h=0A= - * file on failure.=0A= - * Description:=0A= - * This procedure will program the Xframe to receive frames with new=0A= - * Mac Address=0A= +/**=0A= + * s2io_set_mac_address - Programs the Xframe mac address =0A= + * @dev : pointer to the device structure.=0A= + * @new_mac : a uchar pointer to the new mac address which is to be = set.=0A= + * Description : This procedure will program the Xframe to receive =0A= + * frames with new Mac Address=0A= + * Return value: SUCCESS on success and an appropriate (-)ve integer =0A= + * as defined in errno.h file on failure.=0A= */=0A= +=0A= int s2io_set_mac_addr(struct net_device *dev, u8 * addr)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= @@ -2655,7 +3084,7 @@=0A= RMAC_ADDR_CMD_MEM_OFFSET(0);=0A= writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= /* Wait till command completes */=0A= - if (waitForCmdComplete(sp)) {=0A= + if (wait_for_cmd_complete(sp)) {=0A= DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name);=0A= return FAILURE;=0A= }=0A= @@ -2663,18 +3092,18 @@=0A= return SUCCESS;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * info - pointer to the structure with parameters given by ethtool to = set=0A= - * link information.=0A= - * Return value:=0A= - * 0 on success.=0A= +/**=0A= + * s2io_ethtool_sset - Sets different link parameters. =0A= + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure.=0A= + * @info: pointer to the structure with parameters given by ethtool to = set=0A= + * link information.=0A= * Description:=0A= - * The function sets different link parameters provided by the user = onto =0A= - * the NIC.=0A= - */=0A= + * The function sets different link parameters provided by the user = onto =0A= + * the NIC.=0A= + * Return value:=0A= + * 0 on success.=0A= +*/=0A= +=0A= static int s2io_ethtool_sset(struct net_device *dev,=0A= struct ethtool_cmd *info)=0A= {=0A= @@ -2690,17 +3119,18 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * info - pointer to the structure with parameters given by ethtool to = return=0A= - * link information.=0A= - * Return value:=0A= - * void=0A= +/**=0A= + * s2io_ethtol_gset - Return link specific information. =0A= + * @sp : private member of the device structure, pointer to the=0A= + * s2io_nic structure.=0A= + * @info : pointer to the structure with parameters given by ethtool=0A= + * to return link information.=0A= * Description:=0A= - * Returns link specefic information like speed, duplex etc.. to = ethtool.=0A= + * Returns link specefic information like speed, duplex etc.. to = ethtool.=0A= + * Return value :=0A= + * void.=0A= */=0A= +=0A= int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= @@ -2721,17 +3151,18 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * info - pointer to the structure with parameters given by ethtool to = return=0A= - * driver information.=0A= +/**=0A= + * s2io_ethtool_gdrvinfo - Returns driver specific information. =0A= + * @sp : private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @info : pointer to the structure with parameters given by ethtool to=0A= + * return driver information.=0A= + * Description:=0A= + * Returns driver specefic information like name, version etc.. to = ethtool.=0A= * Return value:=0A= * void=0A= - * Description:=0A= - * Returns driver specefic information like name, version etc.. to = ethtool.=0A= */=0A= +=0A= static void s2io_ethtool_gdrvinfo(struct net_device *dev,=0A= struct ethtool_drvinfo *info)=0A= {=0A= @@ -2748,19 +3179,20 @@=0A= info->n_stats =3D S2IO_STAT_LEN;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * regs - pointer to the structure with parameters given by ethtool = for =0A= +/**=0A= + * s2io_ethtool_gregs - dumps the entire space of Xfame into te buffer.=0A= + * @sp: private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @regs : pointer to the structure with parameters given by ethtool = for =0A= * dumping the registers.=0A= - * reg_space - The input argumnet into which all the registers are = dumped.=0A= - * Return value:=0A= - * void=0A= - * Description:=0A= - * Dumps the entire register space of xFrame NIC into the user given = buffer =0A= - * area.=0A= - */=0A= + * @reg_space: The input argumnet into which all the registers are = dumped.=0A= + * Description:=0A= + * Dumps the entire register space of xFrame NIC into the user given=0A= + * buffer area.=0A= + * Return value :=0A= + * void .=0A= +*/=0A= +=0A= static void s2io_ethtool_gregs(struct net_device *dev,=0A= struct ethtool_regs *regs, void *space)=0A= {=0A= @@ -2778,17 +3210,15 @@=0A= }=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * data - address of the private member of the device structure, which =0A= +/**=0A= + * s2io_phy_id - timer function that alternates adapter LED.=0A= + * @data : address of the private member of the device structure, = which =0A= * is a pointer to the s2io_nic structure, provided as an u32.=0A= - * Return value:=0A= - * void=0A= - * Description:=0A= - * This is actually the timer function that alternates the adapter LED = bit=0A= - * of the adapter control bit to set/reset every time on invocation.=0A= - * The timer is set for 1/2 a second, hence tha NIC blinks once every = second.=0A= - */=0A= + * Description: This is actually the timer function that alternates the =0A= + * adapter LED bit of the adapter control bit to set/reset every time = on =0A= + * invocation. The timer is set for 1/2 a second, hence tha NIC blinks =0A= + * once every second.=0A= +*/=0A= static void s2io_phy_id(unsigned long data)=0A= {=0A= nic_t *sp =3D (nic_t *) data;=0A= @@ -2810,28 +3240,30 @@=0A= mod_timer(&sp->id_timer, jiffies + HZ / 2);=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * id - pointer to the structure with identification parameters given = by =0A= - * ethtool.=0A= +/**=0A= + * s2io_ethtool_idnic - To physically ientify the nic on the system.=0A= + * @sp : private member of the device structure, which is a pointer to = the=0A= + * s2io_nic structure.=0A= + * @id : pointer to the structure with identification parameters given = by =0A= + * ethtool.=0A= + * Description: Used to physically identify the NIC on the system.=0A= + * The Link LED will blink for a time specified by the user for =0A= + * identification.=0A= + * NOTE: The Link has to be Up to be able to blink the LED. Hence =0A= + * identification is possible only if it's link is up.=0A= * Return value:=0A= - * int , returns '0' on success=0A= - * Description:=0A= - * Used to physically identify the NIC on the system. The Link LED = will blink=0A= - * for a time specified by the user for identification.=0A= - * NOTE: The Link has to be Up to be able to blink the LED. Hence =0A= - * identification is possible only if it's link is up.=0A= + * int , returns '0' on success=0A= */=0A= +=0A= static int s2io_ethtool_idnic(struct net_device *dev, u32 data)=0A= {=0A= - u64 val64 =3D 0;=0A= + u64 val64 =3D 0, last_gpio_ctrl_val;=0A= nic_t *sp =3D dev->priv;=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= u16 subid;=0A= =0A= subid =3D sp->pdev->subsystem_device;=0A= + last_gpio_ctrl_val =3D readq(&bar0->gpio_control);=0A= if ((subid & 0xFF) < 0x07) {=0A= val64 =3D readq(&bar0->adapter_control);=0A= if (!(val64 & ADAPTER_CNTL_EN)) {=0A= @@ -2853,19 +3285,23 @@=0A= schedule_timeout(MAX_SCHEDULE_TIMEOUT);=0A= del_timer_sync(&sp->id_timer);=0A= =0A= + if(CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) {=0A= + writeq(last_gpio_ctrl_val, &bar0->gpio_control);=0A= + last_gpio_ctrl_val =3D readq(&bar0->gpio_control);=0A= + }=0A= +=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * ep - pointer to the structure with pause parameters given by = ethtool.=0A= +/**=0A= + * s2io_ethtool_getpause_data -Pause frame frame generation and = reception.=0A= + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure.=0A= + * @ep : pointer to the structure with pause parameters given by = ethtool.=0A= + * Description:=0A= + * Returns the Pause frame generation and reception capability of the = NIC.=0A= * Return value:=0A= * void=0A= - * Description:=0A= - * Returns the Pause frame generation and reception capability of the = NIC.=0A= - */=0A= +*/=0A= static void s2io_ethtool_getpause_data(struct net_device *dev,=0A= struct ethtool_pauseparam *ep)=0A= {=0A= @@ -2881,17 +3317,18 @@=0A= ep->autoneg =3D FALSE;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * ep - pointer to the structure with pause parameters given by ethtool.=0A= +/**=0A= + * s2io_ethtool-setpause_data - set/reset pause frame generation.=0A= + * @sp : private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @ep : pointer to the structure with pause parameters given by = ethtool.=0A= + * Description:=0A= + * It can be used to set or reset Pause frame generation or reception=0A= + * support of the NIC.=0A= * Return value:=0A= * int, returns '0' on Success=0A= - * Description:=0A= - * It can be used to set or reset Pause frame generation or reception = support =0A= - * of the NIC.=0A= - */=0A= +*/=0A= +=0A= int s2io_ethtool_setpause_data(struct net_device *dev,=0A= struct ethtool_pauseparam *ep)=0A= {=0A= @@ -2912,21 +3349,22 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * off - offset at which the data must be written=0A= - * Return value:=0A= - * -1 on failure and the value read from the Eeprom if successful.=0A= +/**=0A= + * read_eeprom - reads 4 bytes of data from user given offset.=0A= + * @sp : private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @off : offset at which the data must be written=0A= * Description:=0A= - * Will read 4 bytes of data from the user given offset and return the =0A= - * read data.=0A= + * Will read 4 bytes of data from the user given offset and return the =0A= + * read data.=0A= * NOTE: Will allow to read only part of the EEPROM visible through the=0A= - * I2C bus.=0A= - */=0A= + * I2C bus.=0A= + * Return value:=0A= + * -1 on failure and the value read from the Eeprom if successful.=0A= +*/=0A= +=0A= #define S2IO_DEV_ID 5=0A= -static u32 readEeprom(nic_t * sp, int off)=0A= +static u32 read_eeprom(nic_t * sp, int off)=0A= {=0A= u32 data =3D -1, exit_cnt =3D 0;=0A= u64 val64;=0A= @@ -2951,21 +3389,22 @@=0A= return data;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * off - offset at which the data must be written=0A= - * data - The data that is to be written=0A= - * cnt - Number of bytes of the data that are actually to be written = into =0A= +/**=0A= + * write_eeprom - actually writes the relevant part of the data value.=0A= + * @sp : private member of the device structure, which is a pointer to = the=0A= + * s2io_nic structure.=0A= + * @off : offset at which the data must be written=0A= + * @data : The data that is to be written=0A= + * @cnt : Number of bytes of the data that are actually to be written = into =0A= * the Eeprom. (max of 3)=0A= - * Return value:=0A= - * '0' on success, -1 on failure.=0A= * Description:=0A= * Actually writes the relevant part of the data value into the Eeprom=0A= * through the I2C bus.=0A= - */=0A= -static int writeEeprom(nic_t * sp, int off, u32 data, int cnt)=0A= + * Return value:=0A= + * '0' on success, -1 on failure.=0A= +*/=0A= +=0A= +static int write_eeprom(nic_t * sp, int off, u32 data, int cnt)=0A= {=0A= int exit_cnt =3D 0, ret =3D -1;=0A= u64 val64;=0A= @@ -2991,39 +3430,19 @@=0A= return ret;=0A= }=0A= =0A= -/* =0A= - * A helper function used to invert the 4 byte u32 data field=0A= - * byte by byte. This will be used by the Read Eeprom function=0A= - * for display purposes.=0A= - */=0A= -u32 inv(u32 data)=0A= -{=0A= - static u32 ret =3D 0;=0A= -=0A= - if (data) {=0A= - u8 c =3D data;=0A= - ret =3D ((ret << 8) + c);=0A= - data >>=3D 8;=0A= - inv(data);=0A= - }=0A= -=0A= - return ret;=0A= -}=0A= -=0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * eeprom - pointer to the user level structure provided by ethtool, =0A= - * containing all relevant information.=0A= - * data_buf - user defined value to be written into Eeprom.=0A= - * Return value:=0A= +/**=0A= + * s2io_ethtool_geeprom - reads the value stored in the Eeprom.=0A= + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure.=0A= + * @eeprom : pointer to the user level structure provided by ethtool, =0A= + * containing all relevant information.=0A= + * @data_buf : user defined value to be written into Eeprom.=0A= + * Description: Reads the values stored in the Eeprom at given offset=0A= + * for a given length. Stores these values int the input argument data=0A= + * buffer 'data_buf' and returns these to the caller (ethtool.)=0A= + * Return value:=0A= * int '0' on success=0A= - * Description:=0A= - * Reads the values stored in the Eeprom at given offset for a given = length.=0A= - * Stores these values int the input argument data buffer 'data_buf' = and=0A= - * returns these to the caller (ethtool.)=0A= - */=0A= +*/=0A= +=0A= int s2io_ethtool_geeprom(struct net_device *dev,=0A= struct ethtool_eeprom *eeprom, u8 * data_buf)=0A= {=0A= @@ -3036,30 +3455,31 @@=0A= eeprom->len =3D XENA_EEPROM_SPACE - eeprom->offset;=0A= =0A= for (i =3D 0; i < eeprom->len; i +=3D 4) {=0A= - data =3D readEeprom(sp, eeprom->offset + i);=0A= + data =3D read_eeprom(sp, eeprom->offset + i);=0A= if (data < 0) {=0A= DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n");=0A= return -EFAULT;=0A= }=0A= - valid =3D inv(data);=0A= + valid =3D INV(data);=0A= memcpy((data_buf + i), &valid, 4);=0A= }=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * eeprom - pointer to the user level structure provided by ethtool, =0A= - * containing all relevant information.=0A= - * data_buf - user defined value to be written into Eeprom.=0A= - * Return value:=0A= - * '0' on success, -EFAULT on failure.=0A= - * Description:=0A= +/**=0A= + * s2io_ethtool_seeprom - tries to write the user provided value in = Eeprom=0A= + * @sp : private member of the device structure, which is a pointer to = the=0A= + * s2io_nic structure.=0A= + * @eeprom : pointer to the user level structure provided by ethtool, =0A= + * containing all relevant information.=0A= + * @data_buf ; user defined value to be written into Eeprom.=0A= + * Description:=0A= * Tries to write the user provided value in the Eeprom, at the offset=0A= * given by the user.=0A= - */=0A= + * Return value:=0A= + * '0' on success, -EFAULT on failure.=0A= +*/=0A= +=0A= static int s2io_ethtool_seeprom(struct net_device *dev,=0A= struct ethtool_eeprom *eeprom,=0A= u8 * data_buf)=0A= @@ -3083,7 +3503,7 @@=0A= } else=0A= valid =3D data;=0A= =0A= - if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) {=0A= + if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) {=0A= DBG_PRINT(ERR_DBG,=0A= "ETHTOOL_WRITE_EEPROM Err: Cannot ");=0A= DBG_PRINT(ERR_DBG,=0A= @@ -3097,19 +3517,20 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * data - variable that returns the result of each of the test = conducted by =0A= - * the driver.=0A= - * Return value:=0A= - * '0' on success.=0A= +/**=0A= + * s2io_register_test - reads and writes into all clock domains. =0A= + * @sp : private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @data : variable that returns the result of each of the test = conducted b=0A= + * by the driver.=0A= * Description:=0A= - * Read and write into all clock domains. The NIC has 3 clock domains,=0A= - * see that registers in all the three regions are accessible.=0A= - */=0A= -static int s2io_registerTest(nic_t * sp, uint64_t * data)=0A= + * Read and write into all clock domains. The NIC has 3 clock domains,=0A= + * see that registers in all the three regions are accessible.=0A= + * Return value:=0A= + * '0' on success.=0A= +*/=0A= +=0A= +static int s2io_register_test(nic_t * sp, uint64_t * data)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= u64 val64 =3D 0;=0A= @@ -3159,88 +3580,90 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * data - variable that returns the result of each of the test = conducted by =0A= - * the driver.=0A= - * Return value:=0A= - * '0' on success.=0A= +/**=0A= + * s2io_eeprom_test - to verify that EEprom in the xena can be = programmed. =0A= + * @sp : private member of the device structure, which is a pointer to = the=0A= + * s2io_nic structure.=0A= + * @data:variable that returns the result of each of the test conducted = by=0A= + * the driver.=0A= * Description:=0A= - * Verify that EEPROM in the xena can be programmed using I2C_CONTROL =0A= - * register.=0A= - */=0A= -static int s2io_eepromTest(nic_t * sp, uint64_t * data)=0A= + * Verify that EEPROM in the xena can be programmed using I2C_CONTROL =0A= + * register.=0A= + * Return value:=0A= + * '0' on success.=0A= +*/=0A= +=0A= +static int s2io_eeprom_test(nic_t * sp, uint64_t * data)=0A= {=0A= int fail =3D 0, ret_data;=0A= =0A= /* Test Write Error at offset 0 */=0A= - if (!writeEeprom(sp, 0, 0, 3))=0A= + if (!write_eeprom(sp, 0, 0, 3))=0A= fail =3D 1;=0A= =0A= /* Test Write at offset 4f0 */=0A= - if (writeEeprom(sp, 0x4F0, 0x01234567, 3))=0A= + if (write_eeprom(sp, 0x4F0, 0x01234567, 3))=0A= fail =3D 1;=0A= - if ((ret_data =3D readEeprom(sp, 0x4f0)) < 0)=0A= + if ((ret_data =3D read_eeprom(sp, 0x4f0)) < 0)=0A= fail =3D 1;=0A= =0A= if (ret_data !=3D 0x01234567)=0A= fail =3D 1;=0A= =0A= /* Reset the EEPROM data go FFFF */=0A= - writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3);=0A= + write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3);=0A= =0A= /* Test Write Request Error at offset 0x7c */=0A= - if (!writeEeprom(sp, 0x07C, 0, 3))=0A= + if (!write_eeprom(sp, 0x07C, 0, 3))=0A= fail =3D 1;=0A= =0A= /* Test Write Request at offset 0x7fc */=0A= - if (writeEeprom(sp, 0x7FC, 0x01234567, 3))=0A= + if (write_eeprom(sp, 0x7FC, 0x01234567, 3))=0A= fail =3D 1;=0A= - if ((ret_data =3D readEeprom(sp, 0x7FC)) < 0)=0A= + if ((ret_data =3D read_eeprom(sp, 0x7FC)) < 0)=0A= fail =3D 1;=0A= =0A= if (ret_data !=3D 0x01234567)=0A= fail =3D 1;=0A= =0A= /* Reset the EEPROM data go FFFF */=0A= - writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3);=0A= + write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3);=0A= =0A= /* Test Write Error at offset 0x80 */=0A= - if (!writeEeprom(sp, 0x080, 0, 3))=0A= + if (!write_eeprom(sp, 0x080, 0, 3))=0A= fail =3D 1;=0A= =0A= /* Test Write Error at offset 0xfc */=0A= - if (!writeEeprom(sp, 0x0FC, 0, 3))=0A= + if (!write_eeprom(sp, 0x0FC, 0, 3))=0A= fail =3D 1;=0A= =0A= /* Test Write Error at offset 0x100 */=0A= - if (!writeEeprom(sp, 0x100, 0, 3))=0A= + if (!write_eeprom(sp, 0x100, 0, 3))=0A= fail =3D 1;=0A= =0A= /* Test Write Error at offset 4ec */=0A= - if (!writeEeprom(sp, 0x4EC, 0, 3))=0A= + if (!write_eeprom(sp, 0x4EC, 0, 3))=0A= fail =3D 1;=0A= =0A= *data =3D fail;=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * data - variable that returns the result of each of the test = conducted by =0A= - * the driver.=0A= - * Return value:=0A= - * '0' on success and -1 on failure.=0A= +/**=0A= + * s2io_bist_test - invokes the MemBist test of the card .=0A= + * @sp : private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @data:variable that returns the result of each of the test conducted = by =0A= + * the driver.=0A= * Description:=0A= - * This invokes the MemBist test of the card. We give around=0A= - * 2 secs time for the Test to complete. If it's still not complete=0A= - * within this peiod, we consider that the test failed. =0A= - */=0A= -static int s2io_bistTest(nic_t * sp, uint64_t * data)=0A= + * This invokes the MemBist test of the card. We give around=0A= + * 2 secs time for the Test to complete. If it's still not complete=0A= + * within this peiod, we consider that the test failed. =0A= + * Return value:=0A= + * '0' on success and -1 on failure.=0A= +*/=0A= +=0A= +static int s2io_bist_test(nic_t * sp, uint64_t * data)=0A= {=0A= u8 bist =3D 0;=0A= int cnt =3D 0, ret =3D -1;=0A= @@ -3264,19 +3687,20 @@=0A= return ret;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * data - variable that returns the result of each of the test = conducted by =0A= - * the driver.=0A= - * Return value:=0A= - * '0' on success.=0A= +/**=0A= + * s2io-link_test - verifies the link state of the nic =0A= + * @sp ; private member of the device structure, which is a pointer to = the =0A= + * s2io_nic structure.=0A= + * @data: variable that returns the result of each of the test = conducted by=0A= + * the driver.=0A= * Description:=0A= - * The function verifies the link state of the NIC and updates the = input =0A= - * argument 'data' appropriately.=0A= - */=0A= -static int s2io_linkTest(nic_t * sp, uint64_t * data)=0A= + * The function verifies the link state of the NIC and updates the = input =0A= + * argument 'data' appropriately.=0A= + * Return value:=0A= + * '0' on success.=0A= +*/=0A= +=0A= +static int s2io_link_test(nic_t * sp, uint64_t * data)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= u64 val64;=0A= @@ -3288,19 +3712,19 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * data - variable that returns the result of each of the test = conducted by =0A= - * the driver.=0A= - * Return value:=0A= - * '0' on success.=0A= +/**=0A= + * s2io_rldram_test - offline test for access to the RldRam chip on the = NIC =0A= + * @sp - private member of the device structure, which is a pointer to = the * s2io_nic structure.=0A= + * @data - variable that returns the result of each of the test =0A= + * conducted by the driver.=0A= * Description:=0A= * This is one of the offline test that tests the read and write =0A= * access to the RldRam chip on the NIC.=0A= - */=0A= -static int s2io_rldramTest(nic_t * sp, uint64_t * data)=0A= + * Return value:=0A= + * '0' on success.=0A= +*/=0A= +=0A= +static int s2io_rldram_test(nic_t * sp, uint64_t * data)=0A= {=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= u64 val64;=0A= @@ -3395,20 +3819,21 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * ethtest - pointer to a ethtool command specific structure that will = be=0A= - * returned to the user.=0A= - * data - variable that returns the result of each of the test = conducted by =0A= - * the driver.=0A= - * Return value:=0A= - * SUCCESS on success and an appropriate -1 on failure.=0A= +/**=0A= + * s2io_ethtool_test - conducts 6 tsets to determine the health of = card.=0A= + * @sp : private member of the device structure, which is a pointer to = the=0A= + * s2io_nic structure.=0A= + * @ethtest : pointer to a ethtool command specific structure that = will be=0A= + * returned to the user.=0A= + * @data : variable that returns the result of each of the test =0A= + * conducted by the driver.=0A= * Description:=0A= * This function conducts 6 tests ( 4 offline and 2 online) to = determine=0A= - * the health of the card.=0A= - */=0A= + * the health of the card.=0A= + * Return value:=0A= + * SUCCESS on success and an appropriate -1 on failure.=0A= +*/=0A= +=0A= static void s2io_ethtool_test(struct net_device *dev,=0A= struct ethtool_test *ethtest,=0A= uint64_t * data)=0A= @@ -3424,22 +3849,22 @@=0A= } else=0A= s2io_set_swapper(sp);=0A= =0A= - if (s2io_registerTest(sp, &data[0]))=0A= + if (s2io_register_test(sp, &data[0]))=0A= ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= =0A= s2io_reset(sp);=0A= s2io_set_swapper(sp);=0A= =0A= - if (s2io_rldramTest(sp, &data[3]))=0A= + if (s2io_rldram_test(sp, &data[3]))=0A= ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= =0A= s2io_reset(sp);=0A= s2io_set_swapper(sp);=0A= =0A= - if (s2io_eepromTest(sp, &data[1]))=0A= + if (s2io_eeprom_test(sp, &data[1]))=0A= ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= =0A= - if (s2io_bistTest(sp, &data[4]))=0A= + if (s2io_bist_test(sp, &data[4]))=0A= ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= =0A= if (orig_state)=0A= @@ -3459,7 +3884,7 @@=0A= data[4] =3D -1;=0A= }=0A= =0A= - if (s2io_linkTest(sp, &data[2]))=0A= + if (s2io_link_test(sp, &data[2]))=0A= ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= =0A= data[0] =3D 0;=0A= @@ -3567,6 +3992,17 @@=0A= return (S2IO_STAT_LEN);=0A= }=0A= =0A= +int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)=0A= +{=0A= + if (data)=0A= + dev->features |=3D NETIF_F_IP_CSUM;=0A= + else=0A= + dev->features &=3D ~NETIF_F_IP_CSUM;=0A= +=0A= + return 0;=0A= +}=0A= +=0A= +=0A= static struct ethtool_ops netdev_ethtool_ops =3D {=0A= .get_settings =3D s2io_ethtool_gset,=0A= .set_settings =3D s2io_ethtool_sset,=0A= @@ -3582,7 +4018,7 @@=0A= .get_rx_csum =3D s2io_ethtool_get_rx_csum,=0A= .set_rx_csum =3D s2io_ethtool_set_rx_csum,=0A= .get_tx_csum =3D ethtool_op_get_tx_csum,=0A= - .set_tx_csum =3D ethtool_op_set_tx_csum,=0A= + .set_tx_csum =3D s2io_ethtool_op_set_tx_csum,=0A= .get_sg =3D ethtool_op_get_sg,=0A= .set_sg =3D ethtool_op_set_sg,=0A= #ifdef NETIF_F_TSO=0A= @@ -3597,36 +4033,37 @@=0A= .get_ethtool_stats =3D s2io_get_ethtool_stats=0A= };=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - Device pointer.=0A= - * ifr - An IOCTL specefic structure, that can contain a pointer to=0A= - * a proprietary structure used to pass information to the driver.=0A= - * cmd - This is used to distinguish between the different commands = that=0A= - * can be passed to the IOCTL functions.=0A= - * Return value:=0A= - * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= - * file on failure.=0A= +/**=0A= + * s2io_ioctl -Entry point for the Ioctl =0A= + * @dev : Device pointer.=0A= + * @ifr : An IOCTL specefic structure, that can contain a pointer to=0A= + * a proprietary structure used to pass information to the driver.=0A= + * @cmd : This is used to distinguish between the different commands = that=0A= + * can be passed to the IOCTL functions.=0A= * Description:=0A= * This function has support for ethtool, adding multiple MAC = addresses on =0A= * the NIC and some DBG commands for the util tool.=0A= - */=0A= + * Return value:=0A= + * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= + * file on failure. =0A= +*/=0A= +=0A= int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)=0A= {=0A= return -EOPNOTSUPP;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - device pointer.=0A= - * new_mtu - the new MTU size for the device.=0A= - * Return value:=0A= +/**=0A= + * s2io_change-mtu - entry point to change MTU size for the device.=0A= + * @dev : device pointer.=0A= + * @new_mtu : the new MTU size for the device.=0A= + * Description: A driver entry point to change MTU size for the = device.=0A= + * Before changing the MTU the device must be stopped.=0A= + * Return value:=0A= * '0' on success and an appropriate (-)ve integer as defined in = errno.h=0A= * file on failure.=0A= - * Description:=0A= - * A driver entry point to change MTU size for the device. Before = changing=0A= - * the MTU the device must be stopped.=0A= - */=0A= +*/=0A= +=0A= int s2io_change_mtu(struct net_device *dev, int new_mtu)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= @@ -3654,18 +4091,19 @@=0A= return 0;=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev_adr - address of the device structure in dma_addr_t format.=0A= - * Return value:=0A= - * void.=0A= +/**=0A= + * s2io_tasklet - Bottom half of the ISR.=0A= + * @dev_adr : address of the device structure in dma_addr_t format.=0A= * Description:=0A= * This is the tasklet or the bottom half of the ISR. This is=0A= * an extension of the ISR which is scheduled by the scheduler to be = run =0A= * when the load on the CPU is low. All low priority tasks of the ISR = can=0A= * be pushed into the tasklet. For now the tasklet is used only to =0A= * replenish the Rx buffers in the Rx buffer descriptors.=0A= - */=0A= + * Return value:=0A= + * void.=0A= +*/=0A= +=0A= static void s2io_tasklet(unsigned long dev_addr)=0A= {=0A= struct net_device *dev =3D (struct net_device *) dev_addr;=0A= @@ -3684,30 +4122,33 @@=0A= DBG_PRINT(ERR_DBG, "%s: Out of ",=0A= dev->name);=0A= DBG_PRINT(ERR_DBG, "memory in tasklet\n");=0A= - return;=0A= + break;=0A= } else if (ret =3D=3D -EFILL) {=0A= DBG_PRINT(ERR_DBG,=0A= "%s: Rx Ring %d is full\n",=0A= dev->name, i);=0A= - return;=0A= + break;=0A= }=0A= }=0A= clear_bit(0, (unsigned long *) (&sp->tasklet_status));=0A= }=0A= }=0A= =0A= -=0A= -/*=0A= - * Description:=0A= - * =0A= +/**=0A= + * s2io_set_link- Set the LInk status=0A= + * @data: long pointer to device private structue=0A= + * Description: Sets the link status for the adapter=0A= */=0A= +=0A= static void s2io_set_link(unsigned long data)=0A= {=0A= nic_t *nic =3D (nic_t *) data;=0A= struct net_device *dev =3D nic->dev;=0A= XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= - register u64 val64, err_reg;=0A= + register u64 val64;=0A= + u16 subid;=0A= =0A= + subid =3D nic->pdev->subsystem_device;=0A= /* Allow a small delay for the NICs self initiated =0A= * cleanup to complete.=0A= */=0A= @@ -3716,16 +4157,19 @@=0A= =0A= val64 =3D readq(&bar0->adapter_status);=0A= if (verify_xena_quiescence(val64, nic->device_enabled_once)) {=0A= - /* Acknowledge interrupt and clear the R1 register */=0A= - err_reg =3D readq(&bar0->mac_rmac_err_reg);=0A= - writeq(err_reg, &bar0->mac_rmac_err_reg);=0A= -=0A= if (LINK_IS_UP(val64)) {=0A= val64 =3D readq(&bar0->adapter_control);=0A= val64 |=3D ADAPTER_CNTL_EN;=0A= writeq(val64, &bar0->adapter_control);=0A= - val64 |=3D ADAPTER_LED_ON;=0A= - writeq(val64, &bar0->adapter_control);=0A= + if(CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) {=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + val64 |=3D GPIO_CTRL_GPIO_0;=0A= + writeq(val64, &bar0->gpio_control);=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + } else {=0A= + val64 |=3D ADAPTER_LED_ON;=0A= + writeq(val64, &bar0->adapter_control);=0A= + }=0A= val64 =3D readq(&bar0->adapter_status);=0A= if (!LINK_IS_UP(val64)) {=0A= DBG_PRINT(ERR_DBG, "%s:", dev->name);=0A= @@ -3739,6 +4183,12 @@=0A= }=0A= s2io_link(nic, LINK_UP);=0A= } else {=0A= + if(CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) {=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + val64 &=3D ~GPIO_CTRL_GPIO_0;=0A= + writeq(val64, &bar0->gpio_control);=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + }=0A= s2io_link(nic, LINK_DOWN);=0A= }=0A= } else { /* NIC is not Quiescent. */=0A= @@ -3748,37 +4198,43 @@=0A= }=0A= }=0A= =0A= -/*=0A= +/** =0A= + * s2io-restart_nic -Resets the NIC.=0A= + * @data : long pointer to the device private structure=0A= * Description:=0A= * This function is scheduled to be run by the s2io_tx_watchdog=0A= * function after 0.5 secs to reset the NIC. The idea is to reduce =0A= * the run time of the watch dog routine which is run holding a=0A= * spin lock.=0A= */=0A= +=0A= static void s2io_restart_nic(unsigned long data)=0A= {=0A= struct net_device *dev =3D (struct net_device *) data;=0A= nic_t *sp =3D dev->priv;=0A= =0A= + sp->task_flag =3D 1;=0A= s2io_close(dev);=0A= + sp->task_flag =3D 0;=0A= sp->device_close_flag =3D TRUE;=0A= s2io_open(dev);=0A= DBG_PRINT(ERR_DBG,=0A= "%s: was reset by Tx watchdog timer.\n", dev->name);=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * dev - device pointer.=0A= - * Return value:=0A= - * void=0A= +/** =0A= + * s2io_tx_watchdog - Watchdog for transmit side. =0A= + * @dev : Pointer to net device structure=0A= * Description:=0A= * This function is triggered if the Tx Queue is stopped=0A= * for a pre-defined amount of time when the Interface is still up.=0A= * If the Interface is jammed in such a situation, the hardware is=0A= * reset (by s2io_close) and restarted again (by s2io_open) to=0A= * overcome any problem that might have been caused in the hardware.=0A= - */=0A= + * Return value:=0A= + * void=0A= +*/=0A= +=0A= static void s2io_tx_watchdog(struct net_device *dev)=0A= {=0A= nic_t *sp =3D dev->priv;=0A= @@ -3788,30 +4244,38 @@=0A= }=0A= }=0A= =0A= -/*=0A= - * Input Argument/s: =0A= - * sp - private member of the device structure, which is a pointer to = the =0A= - * s2io_nic structure.=0A= - * skb - the socket buffer pointer.=0A= - * len - length of the packet=0A= - * cksum - FCS checksum of the frame.=0A= - * ring_no - the ring from which this RxD was extracted.=0A= - * Return value:=0A= - * SUCCESS on success and -1 on failure.=0A= - * Description: =0A= - * This function is called by the Tx interrupt serivce routine to = perform =0A= +/**=0A= + * rx_osm_handler - To perform some OS related operations on SKB.=0A= + * @sp: private member of the device structure,pointer to s2io_nic = structure.=0A= + * @skb : the socket buffer pointer.=0A= + * @len : length of the packet=0A= + * @cksum : FCS checksum of the frame.=0A= + * @ring_no : the ring from which this RxD was extracted.=0A= + * Description: =0A= + * This function is called by the Tx interrupt serivce routine to = perform=0A= * some OS related operations on the SKB before passing it to the = upper=0A= * layers. It mainly checks if the checksum is OK, if so adds it to = the=0A= * SKBs cksum variable, increments the Rx packet count and passes the = SKB=0A= * to the upper layer. If the checksum is wrong, it increments the Rx=0A= * packet error count, frees the SKB and returns error.=0A= - */=0A= -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no)=0A= + * Return value:=0A= + * SUCCESS on success and -1 on failure.=0A= +*/=0A= +#ifndef CONFIG_2BUFF_MODE=0A= +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no)=0A= +#else=0A= +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no,=0A= + buffAdd_t * ba)=0A= +#endif=0A= {=0A= struct net_device *dev =3D (struct net_device *) sp->dev;=0A= struct sk_buff *skb =3D=0A= (struct sk_buff *) ((unsigned long) rxdp->Host_Control);=0A= u16 l3_csum, l4_csum;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + int buf0_len, buf2_len;=0A= + struct ethhdr *eth =3D (struct ethhdr *) ba->ba_0;=0A= +#endif=0A= =0A= l3_csum =3D RXD_GET_L3_CKSUM(rxdp->Control_1);=0A= if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) {=0A= @@ -3833,9 +4297,36 @@=0A= skb->ip_summed =3D CHECKSUM_NONE;=0A= }=0A= =0A= + if (rxdp->Control_1 & RXD_T_CODE) {=0A= + unsigned long long err =3D rxdp->Control_1 & RXD_T_CODE;=0A= + DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n",=0A= + dev->name, err);=0A= + }=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + buf0_len =3D RXD_GET_BUFFER0_SIZE(rxdp->Control_2);=0A= + buf2_len =3D RXD_GET_BUFFER2_SIZE(rxdp->Control_2);=0A= +#endif=0A= +=0A= skb->dev =3D dev;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= skb_put(skb, len);=0A= skb->protocol =3D eth_type_trans(skb, dev);=0A= +#else=0A= + skb_put(skb, buf2_len);=0A= + /* Reproducing eth_type_trans functionality and running=0A= + * on the ethernet header 'eth' stripped and given to us=0A= + * by the hardware in 2Buff mode.=0A= + */=0A= + if (*eth->h_dest & 1) {=0A= + if (!memcmp(eth->h_dest, dev->broadcast, ETH_ALEN))=0A= + skb->pkt_type =3D PACKET_BROADCAST;=0A= + else=0A= + skb->pkt_type =3D PACKET_MULTICAST;=0A= + } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) {=0A= + skb->pkt_type =3D PACKET_OTHERHOST;=0A= + }=0A= + skb->protocol =3D eth->h_proto;=0A= +#endif=0A= =0A= #ifdef CONFIG_S2IO_NAPI=0A= netif_receive_skb(skb);=0A= @@ -3843,21 +4334,26 @@=0A= netif_rx(skb);=0A= #endif=0A= =0A= - dev->last_rx =3D jiffies;=0A= -#if DEBUG_ON=0A= - sp->rxpkt_cnt++;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + kfree(ba->ba_0_org);=0A= + kfree(ba->ba_1_org);=0A= #endif=0A= +=0A= + dev->last_rx =3D jiffies;=0A= sp->rx_pkt_count++;=0A= sp->stats.rx_packets++;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= sp->stats.rx_bytes +=3D len;=0A= - sp->rxpkt_bytes +=3D len;=0A= +#else=0A= + sp->stats.rx_bytes +=3D buf0_len + buf2_len;=0A= +#endif=0A= =0A= atomic_dec(&sp->rx_bufs_left[ring_no]);=0A= rxdp->Host_Control =3D 0;=0A= return SUCCESS;=0A= }=0A= =0A= -int check_for_txSpace(nic_t * sp)=0A= +int check_for_tx_space(nic_t * sp)=0A= {=0A= u32 put_off, get_off, queue_len;=0A= int ret =3D TRUE, i;=0A= @@ -3876,18 +4372,19 @@=0A= return ret;=0A= }=0A= =0A= -/*=0A= -* Input Argument/s: =0A= -* sp - private member of the device structure, which is a pointer to = the =0A= -* s2io_nic structure.=0A= -* link - inidicates whether link is UP/DOWN.=0A= -* Return value:=0A= -* void.=0A= +/**=0A= +* s2io_link - stops/starts the Tx queue.=0A= +* @sp : private member of the device structure, which is a pointer to = the=0A= +* s2io_nic structure.=0A= +* @link : inidicates whether link is UP/DOWN.=0A= * Description:=0A= -* This function stops/starts the Tx queue depending on whether the = link=0A= -* status of the NIC is is down or up. This is called by the Alarm = interrupt =0A= -* handler whenever a link change interrupt comes up. =0A= +* This function stops/starts the Tx queue depending on whether the link=0A= +* status of the NIC is is down or up. This is called by the Alarm =0A= +* interrupt handler whenever a link change interrupt comes up. =0A= +* Return value:=0A= +* void.=0A= */=0A= +=0A= void s2io_link(nic_t * sp, int link)=0A= {=0A= struct net_device *dev =3D (struct net_device *) sp->dev;=0A= @@ -3900,7 +4397,7 @@=0A= } else {=0A= DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name);=0A= netif_carrier_on(dev);=0A= - if (check_for_txSpace(sp) =3D=3D TRUE) {=0A= + if (check_for_tx_space(sp) =3D=3D TRUE) {=0A= /* Don't wake the queue, if we know there=0A= * are no free TxDs available.=0A= */=0A= @@ -3911,14 +4408,15 @@=0A= sp->last_link_state =3D link;=0A= }=0A= =0A= -/*=0A= -* Input Argument/s: =0A= -* pdev - structure containing the PCI related information of the = device.=0A= -* Return value:=0A= -* returns the revision ID of the device.=0A= +/**=0A= +* get_xena_rev_id - to identify revision ID of xena. =0A= +* @pdev : PCI Dev structure=0A= * Description:=0A= -* Function to identify the Revision ID of xena.=0A= +* Function to identify the Revision ID of xena.=0A= +* Return value:=0A= +* returns the revision ID of the device.=0A= */=0A= +=0A= int get_xena_rev_id(struct pci_dev *pdev)=0A= {=0A= u8 id =3D 0;=0A= @@ -3927,21 +4425,22 @@=0A= return id;=0A= }=0A= =0A= -/*=0A= -* Input Argument/s: =0A= -* sp - private member of the device structure, which is a pointer to = the =0A= -* s2io_nic structure.=0A= -* Return value:=0A= -* void=0A= +/**=0A= +* s2io_init_pci -Initialization of PCI and PCI-X configuration = registers . =0A= +* @sp : private member of the device structure, which is a pointer to = the =0A= +* s2io_nic structure.=0A= * Description:=0A= -* This function initializes a few of the PCI and PCI-X configuration = registers=0A= -* with recommended values.=0A= +* This function initializes a few of the PCI and PCI-X configuration = registers=0A= +* with recommended values.=0A= +* Return value:=0A= +* void=0A= */=0A= +=0A= static void s2io_init_pci(nic_t * sp)=0A= {=0A= u16 pci_cmd =3D 0;=0A= =0A= -/* Enable Data Parity Error Recovery in PCI-X command register. */=0A= + /* Enable Data Parity Error Recovery in PCI-X command register. */=0A= pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= &(sp->pcix_cmd));=0A= pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= @@ -3949,13 +4448,13 @@=0A= pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= &(sp->pcix_cmd));=0A= =0A= -/* Set the PErr Response bit in PCI command register. */=0A= + /* Set the PErr Response bit in PCI command register. */=0A= pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd);=0A= pci_write_config_word(sp->pdev, PCI_COMMAND,=0A= (pci_cmd | PCI_COMMAND_PARITY));=0A= pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd);=0A= =0A= -/* Set user specified value in Latency Timer */=0A= + /* Set user specified value in Latency Timer */=0A= if (latency_timer) {=0A= pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER,=0A= latency_timer);=0A= @@ -3963,49 +4462,95 @@=0A= &latency_timer);=0A= }=0A= =0A= -/* Set MMRB count to 4096 in PCI-X Command register. */=0A= + /* Set MMRB count to 4096 in PCI-X Command register. */=0A= + sp->pcix_cmd &=3D 0xFFF3;=0A= pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= - (sp->pcix_cmd | 0x0C));=0A= + (sp->pcix_cmd | (max_read_byte_cnt << 2)) );=0A= pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= &(sp->pcix_cmd));=0A= =0A= -/* Setting Maximum outstanding splits to two for now. */=0A= - sp->pcix_cmd &=3D 0xFF1F;=0A= + /* Setting Maximum outstanding splits based on system type. */=0A= + sp->pcix_cmd &=3D 0xFF8F;=0A= =0A= - sp->pcix_cmd |=3D=0A= - XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION);=0A= + sp->pcix_cmd |=3D XENA_MAX_OUTSTANDING_SPLITS(max_splits_trans);=0A= + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= + sp->pcix_cmd);=0A= + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= + &(sp->pcix_cmd));=0A= + /* Forcibly disabling relaxed ordering capability of the card. */=0A= + sp->pcix_cmd &=3D 0xfffd;=0A= pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= sp->pcix_cmd);=0A= pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= &(sp->pcix_cmd));=0A= -=0A= }=0A= =0A= MODULE_AUTHOR("Raghavendra Koushik ");=0A= MODULE_LICENSE("GPL");=0A= -MODULE_PARM(ring_num, "1-" __MODULE_STRING(1) "i");=0A= -MODULE_PARM(frame_len, "1-" __MODULE_STRING(8) "i");=0A= -MODULE_PARM(ring_len, "1-" __MODULE_STRING(8) "i");=0A= -MODULE_PARM(fifo_num, "1-" __MODULE_STRING(1) "i");=0A= -MODULE_PARM(fifo_len, "1-" __MODULE_STRING(8) "i");=0A= -MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i");=0A= -MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i");=0A= -MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i");=0A= -=0A= -/*=0A= -* Input Argument/s: =0A= -* pdev - structure containing the PCI related information of the = device.=0A= -* pre - the List of PCI devices supported by the driver listed in = s2io_tbl.=0A= -* Return value:=0A= -* returns '0' on success and negative on failure.=0A= +MODULE_PARM(lso_enable, "i");=0A= +MODULE_PARM(indicate_max_pkts, "i");=0A= +MODULE_PARM(cksum_offload_enable, "i");=0A= +MODULE_PARM(TxFifoNum, "i");=0A= +MODULE_PARM(TxFIFOLen_0, "i");=0A= +MODULE_PARM(TxFIFOLen_1, "i");=0A= +MODULE_PARM(TxFIFOLen_2, "i");=0A= +MODULE_PARM(TxFIFOLen_3, "i");=0A= +MODULE_PARM(TxFIFOLen_4, "i");=0A= +MODULE_PARM(TxFIFOLen_5, "i");=0A= +MODULE_PARM(TxFIFOLen_6, "i");=0A= +MODULE_PARM(TxFIFOLen_7, "i");=0A= +MODULE_PARM(MaxTxDs, "i");=0A= +MODULE_PARM(RxRingNum, "i");=0A= +MODULE_PARM(RxRingSz_0, "i");=0A= +MODULE_PARM(RxRingSz_1, "i");=0A= +MODULE_PARM(RxRingSz_2, "i");=0A= +MODULE_PARM(RxRingSz_3, "i");=0A= +MODULE_PARM(RxRingSz_4, "i");=0A= +MODULE_PARM(RxRingSz_5, "i");=0A= +MODULE_PARM(RxRingSz_6, "i");=0A= +MODULE_PARM(RxRingSz_7, "i");=0A= +MODULE_PARM(Stats_refresh_time, "i");=0A= +MODULE_PARM(rmac_pause_time, "i");=0A= +MODULE_PARM(mc_pause_threshold_q0q3, "i");=0A= +MODULE_PARM(mc_pause_threshold_q4q7, "i");=0A= +MODULE_PARM(shared_splits, "i");=0A= +MODULE_PARM(max_splits_trans, "i");=0A= +MODULE_PARM(tmac_util_period, "i");=0A= +MODULE_PARM(rmac_util_period, "i");=0A= +MODULE_PARM(tx_timer_val, "i");=0A= +MODULE_PARM(tx_utilz_periodic, "i");=0A= +MODULE_PARM(rx_timer_val, "i");=0A= +MODULE_PARM(rx_utilz_periodic, "i");=0A= +MODULE_PARM(tx_urange_a, "i");=0A= +MODULE_PARM(tx_ufc_a, "i");=0A= +MODULE_PARM(tx_urange_b, "i");=0A= +MODULE_PARM(tx_ufc_b, "i");=0A= +MODULE_PARM(tx_urange_c, "i");=0A= +MODULE_PARM(tx_ufc_c, "i");=0A= +MODULE_PARM(tx_ufc_d, "i");=0A= +MODULE_PARM(rx_urange_a, "i");=0A= +MODULE_PARM(rx_ufc_a, "i");=0A= +MODULE_PARM(rx_urange_b, "i");=0A= +MODULE_PARM(rx_ufc_b, "i");=0A= +MODULE_PARM(rx_urange_c, "i");=0A= +MODULE_PARM(rx_ufc_c, "i");=0A= +MODULE_PARM(rx_ufc_d, "i");=0A= +MODULE_PARM(latency_timer, "i");=0A= +MODULE_PARM(max_read_byte_cnt, "i");=0A= +/**=0A= +* s2io_init_nic - Initialization of the adapter . =0A= +* @pdev : structure containing the PCI related information of the = device.=0A= +* @pre: List of PCI devices supported by the driver listed in s2io_tbl.=0A= * Description:=0A= * The function initializes an adapter identified by the pci_dec = structure.=0A= * All OS related initialization including memory and device structure = and =0A= * initlaization of the device private variable is done. Also the = swapper =0A= * control register is initialized to enable read and write into the = I/O =0A= * registers of the device.=0A= -* =0A= +* Return value:=0A= +* returns '0' on success and negative on failure.=0A= */=0A= +=0A= static int __devinit=0A= s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)=0A= {=0A= @@ -4031,6 +4576,7 @@=0A= if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {=0A= DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n");=0A= dma_flag =3D TRUE;=0A= +=0A= if (pci_set_consistent_dma_mask=0A= (pdev, 0xffffffffffffffffULL)) {=0A= DBG_PRINT(ERR_DBG,=0A= @@ -4090,69 +4636,64 @@=0A= config =3D &sp->config;=0A= =0A= /* Tx side parameters. */=0A= - config->TxFIFONum =3D fifo_num ? fifo_num : 1;=0A= -=0A= - if (!fifo_len[0] && (fifo_num > 1)) {=0A= - printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n");=0A= - goto init_failed;=0A= - }=0A= -=0A= - if (fifo_len[0]) {=0A= - int cnt;=0A= -=0A= - for (cnt =3D 0; fifo_len[cnt]; cnt++);=0A= - if (fifo_num) {=0A= - if (cnt < fifo_num) {=0A= - printk(KERN_ERR=0A= - "Fifo Lens not specified for ");=0A= - printk(KERN_ERR "all FIFOs\n");=0A= - goto init_failed;=0A= - }=0A= - }=0A= - for (cnt =3D 0; cnt < config->TxFIFONum; cnt++) {=0A= - config->TxCfg[cnt].FifoLen =3D fifo_len[cnt];=0A= - config->TxCfg[cnt].FifoPriority =3D cnt;=0A= - }=0A= - } else {=0A= - config->TxCfg[0].FifoLen =3D DEFAULT_FIFO_LEN;=0A= - config->TxCfg[0].FifoPriority =3D 0;=0A= - }=0A= + config->TxFIFONum =3D TxFifoNum;=0A= + config->TxCfg[0].FifoLen =3D TxFIFOLen_0;=0A= + config->TxCfg[0].FifoPriority =3D 0;=0A= + config->TxCfg[1].FifoLen =3D TxFIFOLen_1;=0A= + config->TxCfg[1].FifoPriority =3D 1;=0A= + config->TxCfg[2].FifoLen =3D TxFIFOLen_2;=0A= + config->TxCfg[2].FifoPriority =3D 2;=0A= + config->TxCfg[3].FifoLen =3D TxFIFOLen_3;=0A= + config->TxCfg[3].FifoPriority =3D 3;=0A= + config->TxCfg[4].FifoLen =3D TxFIFOLen_4;=0A= + config->TxCfg[4].FifoPriority =3D 4;=0A= + config->TxCfg[5].FifoLen =3D TxFIFOLen_5;=0A= + config->TxCfg[5].FifoPriority =3D 5;=0A= + config->TxCfg[6].FifoLen =3D TxFIFOLen_6;=0A= + config->TxCfg[6].FifoPriority =3D 6;=0A= + config->TxCfg[7].FifoLen =3D TxFIFOLen_7;=0A= + config->TxCfg[7].FifoPriority =3D 7;=0A= =0A= config->TxIntrType =3D TXD_INT_TYPE_UTILZ;=0A= for (i =3D 0; i < config->TxFIFONum; i++) {=0A= + config->TxCfg[i].fNoSnoop =3D=0A= + (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER);=0A= if (config->TxCfg[i].FifoLen < 65) {=0A= config->TxIntrType =3D TXD_INT_TYPE_PER_LIST;=0A= break;=0A= }=0A= }=0A= -=0A= - config->TxCfg[0].fNoSnoop =3D (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER);=0A= config->MaxTxDs =3D MAX_SKB_FRAGS;=0A= config->TxFlow =3D TRUE;=0A= +// sp->cls_flg =3D 0;=0A= =0A= /* Rx side parameters. */=0A= - config->RxRingNum =3D ring_num ? ring_num : 1;=0A= -=0A= - if (ring_len[0]) {=0A= - int cnt;=0A= - for (cnt =3D 0; cnt < config->RxRingNum; cnt++) {=0A= - config->RxCfg[cnt].NumRxd =3D ring_len[cnt];=0A= - config->RxCfg[cnt].RingPriority =3D cnt;=0A= - }=0A= - } else {=0A= - int id;=0A= - if ((id =3D get_xena_rev_id(pdev)) =3D=3D 1) {=0A= - config->RxCfg[0].NumRxd =3D LARGE_RXD_CNT;=0A= -=0A= - } else {=0A= - config->RxCfg[0].NumRxd =3D SMALL_RXD_CNT;=0A= - }=0A= - config->RxCfg[0].RingPriority =3D 0;=0A= + config->RxRingNum =3D RxRingNum;=0A= + config->RxCfg[0].NumRxd =3D RxRingSz_0 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[0].RingPriority =3D 0;=0A= + config->RxCfg[1].NumRxd =3D RxRingSz_1 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[1].RingPriority =3D 1;=0A= + config->RxCfg[2].NumRxd =3D RxRingSz_2 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[2].RingPriority =3D 2;=0A= + config->RxCfg[3].NumRxd =3D RxRingSz_3 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[3].RingPriority =3D 3;=0A= + config->RxCfg[4].NumRxd =3D RxRingSz_4 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[4].RingPriority =3D 4;=0A= + config->RxCfg[5].NumRxd =3D RxRingSz_5 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[5].RingPriority =3D 5;=0A= + config->RxCfg[6].NumRxd =3D RxRingSz_6 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[6].RingPriority =3D 6;=0A= + config->RxCfg[7].NumRxd =3D RxRingSz_7 * (MAX_RXDS_PER_BLOCK + 1);=0A= + config->RxCfg[7].RingPriority =3D 7;=0A= +=0A= + for (i =3D 0; i < RxRingNum; i++) {=0A= + config->RxCfg[i].RingOrg =3D RING_ORG_BUFF1;=0A= + config->RxCfg[i].RxdThresh =3D DEFAULT_RXD_THRESHOLD;=0A= + config->RxCfg[i].fNoSnoop =3D=0A= + (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER);=0A= + config->RxCfg[i].RxD_BackOff_Interval =3D TBD;=0A= }=0A= - config->RxCfg[0].RingOrg =3D RING_ORG_BUFF1;=0A= - config->RxCfg[0].RxdThresh =3D DEFAULT_RXD_THRESHOLD;=0A= - config->RxCfg[0].fNoSnoop =3D (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER);=0A= - config->RxCfg[0].RxD_BackOff_Interval =3D TBD;=0A= +=0A= config->RxFlow =3D TRUE;=0A= =0A= /* Miscellaneous parameters. */=0A= @@ -4162,14 +4703,17 @@=0A= =0A= /* Setting Mac Control parameters */=0A= mac_control->txdl_len =3D MAX_SKB_FRAGS;=0A= - mac_control->rmac_pause_time =3D 0;=0A= + mac_control->rmac_pause_time =3D rmac_pause_time;=0A= + mac_control->mc_pause_threshold_q0q3 =3D mc_pause_threshold_q0q3;=0A= + mac_control->mc_pause_threshold_q4q7 =3D mc_pause_threshold_q4q7;=0A= +=0A= =0A= /* Initialize Ring buffer parameters. */=0A= for (i =3D 0; i < config->RxRingNum; i++)=0A= atomic_set(&sp->rx_bufs_left[i], 0);=0A= =0A= /* initialize the shared memory used by the NIC and the host */=0A= - if (initSharedMem(sp)) {=0A= + if (init_shared_mem(sp)) {=0A= DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n",=0A= dev->name);=0A= goto mem_alloc_failed;=0A= @@ -4209,21 +4753,19 @@=0A= dev->do_ioctl =3D &s2io_ioctl;=0A= dev->change_mtu =3D &s2io_change_mtu;=0A= SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);=0A= -=0A= - /*=0A= - * will use eth_mac_addr() for dev->set_mac_address=0A= - * mac address will be set every time dev->open() is called=0A= - */=0A= #ifdef CONFIG_S2IO_NAPI=0A= dev->poll =3D s2io_poll;=0A= dev->weight =3D 128; /* For now. */=0A= #endif=0A= =0A= - dev->features |=3D NETIF_F_SG | NETIF_F_IP_CSUM;=0A= + dev->features |=3D NETIF_F_SG;=0A= + if (cksum_offload_enable)=0A= + dev->features |=3D NETIF_F_IP_CSUM;=0A= if (sp->high_dma_flag =3D=3D TRUE)=0A= dev->features |=3D NETIF_F_HIGHDMA;=0A= #ifdef NETIF_F_TSO=0A= - dev->features |=3D NETIF_F_TSO;=0A= + if (lso_enable)=0A= + dev->features |=3D NETIF_F_TSO;=0A= #endif=0A= =0A= dev->tx_timeout =3D &s2io_tx_watchdog;=0A= @@ -4233,11 +4775,6 @@=0A= INIT_WORK(&sp->set_link_task,=0A= (void (*)(void *)) s2io_set_link, sp);=0A= =0A= - if (register_netdev(dev)) {=0A= - DBG_PRINT(ERR_DBG, "Device registration failed\n");=0A= - goto register_failed;=0A= - }=0A= -=0A= pci_save_state(sp->pdev, sp->config_space);=0A= =0A= /* Setting swapper control on the NIC, for proper reset operation */=0A= @@ -4248,7 +4785,7 @@=0A= }=0A= =0A= /* Fix for all "FFs" MAC address problems observed on Alpha platforms = */=0A= - FixMacAddress(sp);=0A= + fix_mac_address(sp);=0A= s2io_reset(sp);=0A= =0A= /* Setting swapper control on the NIC, so the MAC address can be read.=0A= @@ -4267,7 +4804,7 @@=0A= val64 =3D RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |=0A= RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET);=0A= writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= - waitForCmdComplete(sp);=0A= + wait_for_cmd_complete(sp);=0A= =0A= tmp64 =3D readq(&bar0->rmac_addr_data0_mem);=0A= mac_down =3D (u32) tmp64;=0A= @@ -4300,7 +4837,6 @@=0A= =0A= =0A= /* Initialize spinlocks */=0A= - spin_lock_init(&sp->isr_lock);=0A= spin_lock_init(&sp->tx_lock);=0A= =0A= /* SXE-002: Configure link and activity LED to init state =0A= @@ -4316,6 +4852,13 @@=0A= val64 =3D readq(&bar0->gpio_control);=0A= }=0A= =0A= + sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */=0A= +=0A= + if (register_netdev(dev)) {=0A= + DBG_PRINT(ERR_DBG, "Device registration failed\n");=0A= + goto register_failed;=0A= + }=0A= +=0A= /* Make Link state as off at this point, when the Link change =0A= * interrupt comes the state will be automatically changed to =0A= * the right state.=0A= @@ -4323,20 +4866,16 @@=0A= netif_carrier_off(dev);=0A= sp->last_link_state =3D LINK_DOWN;=0A= =0A= - sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */=0A= -=0A= return 0;=0A= =0A= - set_swap_failed:=0A= - unregister_netdev(dev);=0A= register_failed:=0A= + set_swap_failed:=0A= iounmap(sp->bar1);=0A= bar1_remap_failed:=0A= iounmap(sp->bar0);=0A= bar0_remap_failed:=0A= mem_alloc_failed:=0A= - freeSharedMem(sp);=0A= - init_failed:=0A= + free_shared_mem(sp);=0A= pci_disable_device(pdev);=0A= pci_release_regions(pdev);=0A= pci_set_drvdata(pdev, NULL);=0A= @@ -4345,16 +4884,15 @@=0A= return -ENODEV;=0A= }=0A= =0A= -/*=0A= -* Input Argument/s: =0A= -* pdev - structure containing the PCI related information of the = device.=0A= -* Return value:=0A= -* void=0A= -* Description:=0A= -* This function is called by the Pci subsystem to release a PCI device =0A= -* and free up all resource held up by the device. This could be in = response =0A= -* to a Hot plug event or when the driver is to be removed from memory.=0A= +/**=0A= +* s2io_rem_nic - Free the PCI device =0A= +* @pdev: structure containing the PCI related information of the device.=0A= +* Description: This function is called by the Pci subsystem to release = a =0A= +* PCI device and free up all resource held up by the device. This could=0A= +* be in response to a Hot plug event or when the driver is to be = removed =0A= +* from memory.=0A= */=0A= +=0A= static void __devexit s2io_rem_nic(struct pci_dev *pdev)=0A= {=0A= struct net_device *dev =3D=0A= @@ -4365,24 +4903,38 @@=0A= DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n");=0A= return;=0A= }=0A= +=0A= sp =3D dev->priv;=0A= - freeSharedMem(sp);=0A= + unregister_netdev(dev);=0A= +=0A= + free_shared_mem(sp);=0A= iounmap(sp->bar0);=0A= iounmap(sp->bar1);=0A= pci_disable_device(pdev);=0A= pci_release_regions(pdev);=0A= pci_set_drvdata(pdev, NULL);=0A= =0A= - unregister_netdev(dev);=0A= -=0A= free_netdev(dev);=0A= }=0A= =0A= +/**=0A= + * s2io_starter - Entry point for the driver=0A= + * Description: This function is the entry point for the driver. It = verifies=0A= + * the module loadable parameters and initializes PCI configuration = space.=0A= + */=0A= +=0A= int __init s2io_starter(void)=0A= {=0A= + if (verify_load_parm())=0A= + return -ENODEV;=0A= return pci_module_init(&s2io_driver);=0A= }=0A= =0A= +/**=0A= + * s2io_closer - Cleanup routine for the driver =0A= + * Description: This function is the cleanup routine for the driver. It = unregist * ers the driver.=0A= + */=0A= +=0A= void s2io_closer(void)=0A= {=0A= pci_unregister_driver(&s2io_driver);=0A= @@ -4391,3 +4943,201 @@=0A= =0A= module_init(s2io_starter);=0A= module_exit(s2io_closer);=0A= +/**=0A= + * verify_load_parm - verifies the module loadable parameters=0A= + * Descriptions: Verifies the module loadable paramters and initializes = the=0A= + * Tx Fifo, Rx Ring and other paramters.=0A= + */=0A= +=0A= +int verify_load_parm()=0A= +{=0A= + int fail =3D 0;=0A= + if (!((lso_enable =3D=3D 0) || (lso_enable =3D=3D 1))) {=0A= + printk("lso_enable can be either '1' or '0'\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((indicate_max_pkts > (0xFFFFFFFF))) {=0A= + printk=0A= + ("indicate_max_pkts can take value greater than zero but less = than 2power(32)\n");=0A= + fail =3D 1;=0A= + }=0A= + if (!((cksum_offload_enable =3D=3D 0) || (cksum_offload_enable =3D=3D = 1))) {=0A= + printk("cksum_offload_enable can be only '0' or '1' \n");=0A= + fail =3D 1;=0A= + }=0A= + if ((TxFifoNum =3D=3D 0) || (TxFifoNum > 8)) {=0A= + printk("TxFifoNum can take value from 1 to 8\n");=0A= + fail =3D 1;=0A= + }=0A= + switch (TxFifoNum) {=0A= + case 8:=0A= + if ((TxFIFOLen_7 =3D=3D 0) || TxFIFOLen_7 > 8192) {=0A= + printk("TxFIFOLen_7 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + case 7:=0A= + if ((TxFIFOLen_6 =3D=3D 0) || TxFIFOLen_6 > 8192) {=0A= + printk("TxFIFOLen_6 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + case 6: =0A= + if ((TxFIFOLen_5 =3D=3D 0) || TxFIFOLen_5 > 8192) {=0A= + printk("TxFIFOLen_5 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + } =0A= + case 5:=0A= + if ((TxFIFOLen_4 =3D=3D 0) || TxFIFOLen_4 > 8192) {=0A= + printk("TxFIFOLen_4 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + case 4:=0A= + if ((TxFIFOLen_3 =3D=3D 0) || TxFIFOLen_3 > 8192) {=0A= + printk("TxFIFOLen_3 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + case 3: =0A= + if ((TxFIFOLen_2 =3D=3D 0) || TxFIFOLen_2 > 8192) {=0A= + printk("TxFIFOLen_2 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + case 2:=0A= + if ((TxFIFOLen_1 =3D=3D 0) || TxFIFOLen_1 > 8192) {=0A= + printk("TxFIFOLen_1 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + case 1:=0A= + if ((TxFIFOLen_0 =3D=3D 0) || TxFIFOLen_0 > 8192) {=0A= + printk("TxFIFOLen_0 can take value from 1 to 8192\n");=0A= + fail =3D 1;=0A= + }=0A= + }=0A= + if ((MaxTxDs > 32) || (MaxTxDs < 1)) {=0A= + printk("MaxTxDs can take falue from 1 to 32\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((RxRingNum > 8) || (RxRingNum < 1)) {=0A= + printk("RxRingNum can take falue from 1 to 8\n");=0A= + fail =3D 1;=0A= + }=0A= + switch(RxRingNum) {=0A= + case 8:=0A= + if (RxRingSz_7 < 1) {=0A= + printk("RxRingSz_7 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 7:=0A= + if (RxRingSz_6 < 1) {=0A= + printk("RxRingSz_6 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 6:=0A= + if (RxRingSz_5 < 1) {=0A= + printk("RxRingSz_5 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 5:=0A= + if (RxRingSz_4 < 1) {=0A= + printk("RxRingSz_4 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 4:=0A= + if (RxRingSz_3 < 1) {=0A= + printk("RxRingSz_3 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 3:=0A= + if (RxRingSz_2 < 1) {=0A= + printk("RxRingSz_2 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 2:=0A= + if (RxRingSz_1 < 1) {=0A= + printk("RxRingSz_1 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + case 1:=0A= + if (RxRingSz_0 < 1) {=0A= + printk("RxRingSz_0 can take value greater than 0\n");=0A= + fail =3D 1;=0A= + }=0A= + }=0A= + if ((Stats_refresh_time < 1)) {=0A= + printk=0A= + ("Stats_refresh_time cannot be less than 1 second \n");=0A= + fail =3D 1;=0A= + }=0A= + if (((rmac_pause_time < 0x10) && (rmac_pause_time !=3D 0)) ||=0A= + (rmac_pause_time > 0xFFFF)) {=0A= + printk=0A= + ("rmac_pause_time can take value from 16 to 65535\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((max_splits_trans < 0) || (max_splits_trans > 7)) {=0A= + printk("max_splits_trans can take value from 0 to 7\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((mc_pause_threshold_q0q3 > 0xFE)) {=0A= + printk("mc_pause_threshold_q0q3 cannot exceed 254\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((mc_pause_threshold_q4q7 > 0xFE)) {=0A= + printk("mc_pause_threshold_q4q7 cannot exceed 254\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((latency_timer)=0A= + && ((latency_timer < 8) || (latency_timer > 255))) {=0A= + printk("latency_timer can take value from 8 to 255\n");=0A= + fail =3D 1;=0A= + }=0A= + if (max_read_byte_cnt > 3) {=0A= + printk("max_read_byte_cnt can take value from 0 to 3\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((shared_splits > 31)) {=0A= + printk("shared_splits can exceed 31\n");=0A= + fail =3D 1;=0A= + }=0A= + if (rmac_util_period > 0xF) {=0A= + printk("rmac_util_period can exceed 15\n");=0A= + fail =3D 1;=0A= + }=0A= + if (tmac_util_period > 0xF) {=0A= + printk("tmac_util_period can exceed 15\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((tx_utilz_periodic > 1) || (rx_utilz_periodic > 1)) {=0A= + printk=0A= + ("tx_utilz_periodic & rx_utilz_periodic can be either "=0A= + "'0' or '1'\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((tx_urange_a > 127) || (tx_urange_b > 127)=0A= + || (tx_urange_c > 127)) {=0A= + printk=0A= + ("tx_urange_a, tx_urange_b & tx_urange_c can take value "=0A= + "from 0 to 127\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((rx_urange_a > 127) || (rx_urange_b > 127)=0A= + || (rx_urange_c > 127)) {=0A= + printk=0A= + ("rx_urange_a, rx_urange_b & rx_urange_c can take value "=0A= + "from 0 to 127\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) ||=0A= + (tx_ufc_c > 0xffff) || (tx_ufc_d > 0xffff)) {=0A= + printk=0A= + (" tx_ufc_a, tx_ufc_b, tx_ufc_c, tx_ufc_d can take value"=0A= + "from 0 to 65535(0xFFFF)\n");=0A= + fail =3D 1;=0A= + }=0A= + if ((rx_ufc_a > 0xffff) || (rx_ufc_b > 0xffff) ||=0A= + (rx_ufc_c > 0xffff) || (rx_ufc_d > 0xffff)) {=0A= + printk=0A= + (" rx_ufc_a, rx_ufc_b, rx_ufc_c, rx_ufc_d can take value"=0A= + "from 0 to 65535(0xFFFF)\n");=0A= + fail =3D 1;=0A= + }=0A= + return fail;=0A= +}=0A= diff -Naur orig/drivers/net/s2io.h new/drivers/net/s2io.h=0A= --- orig/drivers/net/s2io.h 2004-08-06 06:55:01.000000000 -0700=0A= +++ new/drivers/net/s2io.h 2004-08-06 07:16:40.000000000 -0700=0A= @@ -16,6 +16,7 @@=0A= #define TBD 0=0A= #define BIT(loc) (0x8000000000000000ULL >> (loc))=0A= #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz))=0A= +#define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | = (((d>>16)&0xff)<<8)| ((d>>24)&0xff)=0A= =0A= #ifndef BOOL=0A= #define BOOL int=0A= @@ -49,11 +50,6 @@=0A= #define ALIGN_SIZE 127=0A= #define PCIX_COMMAND_REGISTER 0x62=0A= =0A= -/*=0A= - * Debug related variables.=0A= - */=0A= -#define DEBUG_ON TRUE=0A= -=0A= /* different debug levels. */=0A= #define ERR_DBG 0=0A= #define INIT_DBG 1=0A= @@ -492,6 +488,12 @@=0A= u64 Host_Control; /* reserved for host */=0A= } TxD_t;=0A= =0A= +/* Structure to hold the phy and virt addr of every TxDL. */=0A= +typedef struct list_info_hold {=0A= + dma_addr_t list_phy_addr;=0A= + void *list_virt_addr;=0A= +} list_info_hold_t;=0A= +=0A= /* Rx descriptor structure */=0A= typedef struct _RxD_t {=0A= u64 Host_Control; /* reserved for host */=0A= @@ -508,36 +510,80 @@=0A= #define RXD_GET_L4_CKSUM(val) ((u16)(val) & 0xFFFF)=0A= =0A= u64 Control_2;=0A= +#ifndef CONFIG_2BUFF_MODE=0A= #define MASK_BUFFER0_SIZE vBIT(0xFFFF,0,16)=0A= #define SET_BUFFER0_SIZE(val) vBIT(val,0,16)=0A= +#else=0A= +#define MASK_BUFFER0_SIZE vBIT(0xFF,0,16)=0A= +#define MASK_BUFFER1_SIZE vBIT(0xFFFF,16,16)=0A= +#define MASK_BUFFER2_SIZE vBIT(0xFFFF,32,16)=0A= +#define SET_BUFFER0_SIZE(val) vBIT(val,8,8)=0A= +#define SET_BUFFER1_SIZE(val) vBIT(val,16,16)=0A= +#define SET_BUFFER2_SIZE(val) vBIT(val,32,16)=0A= +#endif=0A= +=0A= #define MASK_VLAN_TAG vBIT(0xFFFF,48,16)=0A= #define SET_VLAN_TAG(val) vBIT(val,48,16)=0A= #define SET_NUM_TAG(val) vBIT(val,16,32)=0A= =0A= +#ifndef CONFIG_2BUFF_MODE=0A= #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & = vBIT(0xFFFF,0,16)))=0A= -/* =0A= -#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER1_SIZE) >> (63-31)) =0A= -#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER2_SIZE) >> (63-47)) =0A= -*/=0A= +#else=0A= +#define RXD_GET_BUFFER0_SIZE(Control_2) (u8)((Control_2 & = MASK_BUFFER0_SIZE) \=0A= + >> 48)=0A= +#define RXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER1_SIZE) \=0A= + >> 32)=0A= +#define RXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER2_SIZE) \=0A= + >> 16)=0A= +#define BUF0_LEN 40=0A= +#define BUF1_LEN 1=0A= +#endif=0A= +=0A= u64 Buffer0_ptr;=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + u64 Buffer1_ptr;=0A= + u64 Buffer2_ptr;=0A= +#endif=0A= } RxD_t;=0A= =0A= -=0A= /* Structure that represents the Rx descriptor block which contains =0A= * 128 Rx descriptors.=0A= */=0A= +#ifndef CONFIG_2BUFF_MODE=0A= typedef struct _RxD_block {=0A= #define MAX_RXDS_PER_BLOCK 127=0A= RxD_t rxd[MAX_RXDS_PER_BLOCK];=0A= =0A= u64 reserved_0;=0A= #define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL=0A= - u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */=0A= - u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */=0A= - u64 pNext_RxD_Blk_physical; /* Buff0_ptr.=0A= - In a 32 bit arch the upper 32 bits =0A= - should be 0 */=0A= + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last =0A= + * Rxd in this blk */=0A= + u64 reserved_2_pNext_RxD_block; /* Logical ptr to next */=0A= + u64 pNext_RxD_Blk_physical; /* Buff0_ptr.In a 32 bit arch=0A= + * the upper 32 bits should =0A= + * be 0 */=0A= +} RxD_block_t;=0A= +#else=0A= +typedef struct _RxD_block {=0A= +#define MAX_RXDS_PER_BLOCK 85=0A= + RxD_t rxd[MAX_RXDS_PER_BLOCK];=0A= +=0A= +#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL=0A= + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd =0A= + * in this blk */=0A= + u64 pNext_RxD_Blk_physical; /* Phy ponter to next blk. */=0A= } RxD_block_t;=0A= +#define SIZE_OF_BLOCK 4096=0A= +=0A= +/* Structure to hold virtual addresses of Buf0 and Buf1 in =0A= + * 2buf mode. */=0A= +typedef struct bufAdd {=0A= + void *ba_0_org;=0A= + void *ba_1_org;=0A= + void *ba_0;=0A= + void *ba_1;=0A= +} buffAdd_t;=0A= +#endif=0A= =0A= /* Structure which stores all the MAC control parameters */=0A= =0A= @@ -584,6 +630,9 @@=0A= rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS];=0A= =0A= u16 rmac_pause_time;=0A= + u16 mc_pause_threshold_q0q3;=0A= + u16 mc_pause_threshold_q4q7;=0A= +=0A= =0A= /* this will be used in receive function, this decides which ring would=0A= be processed first. eg: ring with priority value 0 (highest) should=0A= @@ -633,6 +682,13 @@=0A= dma_addr_t block_dma_addr;=0A= } rx_block_info_t;=0A= =0A= +/* Default Tunable parameters of the NIC. */=0A= +#define DEFAULT_FIFO_LEN 4096=0A= +#define SMALL_RXD_CNT 20 * (MAX_RXDS_PER_BLOCK+1)=0A= +#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1)=0A= +#define SMALL_BLK_CNT 20=0A= +#define LARGE_BLK_CNT 100=0A= +=0A= /* Structure representing one instance of the NIC */=0A= typedef struct s2io_nic {=0A= #define MAX_MAC_SUPPORTED 16=0A= @@ -672,7 +728,6 @@=0A= u32 irq;=0A= atomic_t rx_bufs_left[MAX_RX_RINGS];=0A= =0A= - spinlock_t isr_lock;=0A= spinlock_t tx_lock;=0A= =0A= #define PROMISC 1=0A= @@ -692,15 +747,6 @@=0A= u16 tx_err_count;=0A= u16 rx_err_count;=0A= =0A= -#if DEBUG_ON=0A= - u64 rxpkt_bytes;=0A= - u64 txpkt_bytes;=0A= - int int_cnt;=0A= - int rxint_cnt;=0A= - int txint_cnt;=0A= - u64 rxpkt_cnt;=0A= -#endif=0A= -=0A= /* Place holders for the virtual and physical addresses of =0A= * all the Rx Blocks=0A= */=0A= @@ -709,6 +755,9 @@=0A= int block_count[MAX_RX_RINGS];=0A= int pkt_cnt[MAX_RX_RINGS];=0A= =0A= + /* Place holder of all the TX List's Phy and Virt addresses. */=0A= + list_info_hold_t *list_info[MAX_TX_FIFOS];=0A= +=0A= /* Id timer, used to blink NIC to physically identify NIC. */=0A= struct timer_list id_timer;=0A= =0A= @@ -716,13 +765,8 @@=0A= * a schedule task that will set the correct Link state once the =0A= * NIC's PHY has stabilized after a state change.=0A= */=0A= -#ifdef INIT_TQUEUE=0A= - struct tq_struct rst_timer_task;=0A= - struct tq_struct set_link_task;=0A= -#else=0A= struct work_struct rst_timer_task;=0A= struct work_struct set_link_task;=0A= -#endif=0A= =0A= /* Flag that can be used to turn on or turn off the Rx checksum =0A= * offload feature.=0A= @@ -738,24 +782,26 @@=0A= u16 last_link_state;=0A= #define LINK_DOWN 1=0A= #define LINK_UP 2=0A= +=0A= +#ifdef CONFIG_2BUFF_MODE=0A= + /* Buffer Address store. */=0A= + buffAdd_t ba[SMALL_BLK_CNT][MAX_RXDS_PER_BLOCK + 1];=0A= +#endif=0A= + int task_flag;=0A= +=0A= } nic_t;=0A= =0A= #define RESET_ERROR 1;=0A= #define CMD_ERROR 2;=0A= =0A= -/* Default Tunable parameters of the NIC. */=0A= -#define DEFAULT_FIFO_LEN 4096=0A= -#define SMALL_RXD_CNT 40 * (MAX_RXDS_PER_BLOCK+1)=0A= -#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1)=0A= -=0A= /* OS related system calls */=0A= #ifndef readq=0A= static inline u64 readq(void *addr)=0A= {=0A= u64 ret =3D 0;=0A= ret =3D readl(addr + 4);=0A= - ret <<=3D 32;=0A= - ret |=3D readl(addr);=0A= + (u64) ret <<=3D 32;=0A= + (u64) ret |=3D readl(addr);=0A= =0A= return ret;=0A= }=0A= @@ -817,30 +863,48 @@=0A= =0A= /* DMA level Inressupts */=0A= #define TXDMA_PFC_INT_M BIT(0)=0A= - /* PFC block interrupts */=0A= +#define TXDMA_PCC_INT_M BIT(2)=0A= +=0A= +/* PFC block interrupts */=0A= #define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full */=0A= =0A= +/* PCC block interrupts. */=0A= +#define PCC_FB_ECC_ERR vBIT(0xff, 16, 8) /* Interrupt to indicate=0A= + PCC_FB_ECC Error. */=0A= +=0A= +/* Cards with following subsystem_id have a link state indication=0A= + * problem, 600B, 600C, 600D, 640B, 640C and 640D.=0A= + * macro below identifies these cards given the subsystem_id.=0A= + */=0A= +#define CARDS_WITH_FAULTY_LINK_INDICATORS(subid) \=0A= + (((subid >=3D 0x600B) && (subid <=3D 0x600D)) || \=0A= + ((subid >=3D 0x640B) && (subid <=3D 0x640D))) ? 1 : 0=0A= /*=0A= * Prototype declaration.=0A= */=0A= static int __devinit s2io_init_nic(struct pci_dev *pdev,=0A= const struct pci_device_id *pre);=0A= static void __devexit s2io_rem_nic(struct pci_dev *pdev);=0A= -static int initSharedMem(struct s2io_nic *sp);=0A= -static void freeSharedMem(struct s2io_nic *sp);=0A= -static int initNic(struct s2io_nic *nic);=0A= +static int init_shared_mem(struct s2io_nic *sp);=0A= +static void free_shared_mem(struct s2io_nic *sp);=0A= +static int init_nic(struct s2io_nic *nic);=0A= #ifndef CONFIG_S2IO_NAPI=0A= -static void rxIntrHandler(struct s2io_nic *sp);=0A= +static void rx_intr_handler(struct s2io_nic *sp);=0A= #endif=0A= -static void txIntrHandler(struct s2io_nic *sp);=0A= -static void alarmIntrHandler(struct s2io_nic *sp);=0A= +static void tx_intr_handler(struct s2io_nic *sp);=0A= +static void alarm_intr_handler(struct s2io_nic *sp);=0A= =0A= static int s2io_starter(void);=0A= void s2io_closer(void);=0A= static void s2io_tx_watchdog(struct net_device *dev);=0A= static void s2io_tasklet(unsigned long dev_addr);=0A= static void s2io_set_multicast(struct net_device *dev);=0A= -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no);=0A= +#ifndef CONFIG_2BUFF_MODE=0A= +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no);=0A= +#else=0A= +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no,=0A= + buffAdd_t * ba);=0A= +#endif=0A= void s2io_link(nic_t * sp, int link);=0A= void s2io_reset(nic_t * sp);=0A= #ifdef CONFIG_S2IO_NAPI=0A= @@ -850,6 +914,8 @@=0A= int s2io_set_mac_addr(struct net_device *dev, u8 * addr);=0A= static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs);=0A= static int verify_xena_quiescence(u64 val64, int flag);=0A= +int verify_load_parm(void);=0A= static struct ethtool_ops netdev_ethtool_ops;=0A= +static void s2io_set_link(unsigned long data);=0A= =0A= #endif /* _S2IO_H */=0A= ------=_NextPart_000_0015_01C48159.B5EA9A60-- From herbert@gondor.apana.org.au Fri Aug 13 17:34:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 17:35: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 i7E0YpBq003897 for ; Fri, 13 Aug 2004 17:34:52 -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 1BvmVF-0001Zt-00; Sat, 14 Aug 2004 10:34:33 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvmVA-0004co-00; Sat, 14 Aug 2004 10:34:28 +1000 Date: Sat, 14 Aug 2004 10:34:28 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814003428.GA17760@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040813151923.3311b4f0.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7729 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, Aug 13, 2004 at 03:19:23PM -0700, David S. Miller wrote: > On Sat, 14 Aug 2004 07:56:02 +1000 > Herbert Xu wrote: > > > Now had you put this barrier between the reading of ip_ptr and > > the checking of in_dev->dead, then the race would've been closed. Actually even that won't close the race so the barrier is completely unnecessary. > > But I still prefer to move the work into inetdev_destroy. > > Ok I see now. I've added your patch, it seems correct. Thanks. I presume you've reversed the previous patch as well? BTW, it looks like you can remove inetdev_lock altogether. All its users already assume that they don't race against each other by taking the rtnl lock. 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 davem@redhat.com Fri Aug 13 17:41:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 17:41:07 -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 i7E0f02C004295 for ; Fri, 13 Aug 2004 17:41:01 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7E0eje1001461; Fri, 13 Aug 2004 20:40:45 -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 i7E0eja18825; Fri, 13 Aug 2004 20:40:45 -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 i7E0dtIJ002510; Fri, 13 Aug 2004 20:39:56 -0400 Date: Fri, 13 Aug 2004 17:39:24 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040813173924.6d05be15.davem@redhat.com> In-Reply-To: <20040814003428.GA17760@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@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: 7730 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 Sat, 14 Aug 2004 10:34:28 +1000 Herbert Xu wrote: > > Ok I see now. I've added your patch, it seems correct. > > Thanks. I presume you've reversed the previous patch as well? Yes and I cured the one typo in it two, idev-->in_dev :-) > BTW, it looks like you can remove inetdev_lock altogether. All its > users already assume that they don't race against each other by > taking the rtnl lock. Possibly, I'll have a look. From herbert@gondor.apana.org.au Fri Aug 13 17:54:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 17:54:42 -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 i7E0sWfp004781 for ; Fri, 13 Aug 2004 17:54: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 1BvmoK-0001gl-00; Sat, 14 Aug 2004 10:54:16 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvmoF-0005Bd-00; Sat, 14 Aug 2004 10:54:11 +1000 Date: Sat, 14 Aug 2004 10:54:11 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814005411.GA18350@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <20040813173924.6d05be15.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7731 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 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 13, 2004 at 05:39:24PM -0700, David S. Miller wrote: > > Yes and I cured the one typo in it two, idev-->in_dev :-) Two birds with one stone :) Here is a trivial optimisation for irda to since it doesn't hold onto the idev. 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 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/irda/irlan/irlan_eth.c 1.12 vs edited ===== --- 1.12/net/irda/irlan/irlan_eth.c 2004-08-14 07:40:24 +10:00 +++ edited/net/irda/irlan/irlan_eth.c 2004-08-14 10:50:29 +10:00 @@ -303,10 +303,10 @@ */ #ifdef CONFIG_INET IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n"); - in_dev = in_dev_get(dev); - if (in_dev == NULL) - return; rcu_read_lock(); + in_dev = __in_dev_get(dev); + if (in_dev == NULL) + goto out; if (in_dev->ifa_list) arp_send(ARPOP_REQUEST, ETH_P_ARP, @@ -314,8 +314,8 @@ dev, in_dev->ifa_list->ifa_address, NULL, dev->dev_addr, NULL); +out: rcu_read_unlock(); - in_dev_put(in_dev); #endif /* CONFIG_INET */ } --DocE+STaALJfprDB-- From herbert@gondor.apana.org.au Fri Aug 13 18:25:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 18:25: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 i7E1PYLK005625 for ; Fri, 13 Aug 2004 18:25: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 1BvnIM-0001oo-00; Sat, 14 Aug 2004 11:25:18 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvnIH-0000Ig-00; Sat, 14 Aug 2004 11:25:13 +1000 Date: Sat, 14 Aug 2004 11:25:13 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814012513.GA721@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <20040814005411.GA18350@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7732 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 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: I gave your patch to the compiler and it doesn't like it :) call_rcu needs three arguments, not two. Watch out, this will probably conflict with your in_dev typo fix. 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 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=r ===== net/ipv4/devinet.c 1.34 vs edited ===== --- 1.34/net/ipv4/devinet.c 2004-08-14 08:36:53 +10:00 +++ edited/net/ipv4/devinet.c 2004-08-14 11:20:19 +10:00 @@ -111,10 +111,8 @@ kfree(ifa); } -static void inet_rcu_free_ifa(struct rcu_head *head) +static void inet_rcu_free_ifa(void *ifa) { - struct in_ifaddr *ifa = container_of(head, struct in_ifaddr, rcu_head); - inet_free_ifa(ifa); } @@ -177,9 +175,8 @@ goto out; } -static void in_dev_rcu_put(struct rcu_head *head) +static void in_dev_rcu_put(void *idev) { - struct in_device *idev = container_of(head, struct in_device, rcu_head); in_dev_put(idev); } @@ -195,7 +192,7 @@ while ((ifa = in_dev->ifa_list) != NULL) { inet_del_ifa(in_dev, &in_dev->ifa_list, 0); - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); } #ifdef CONFIG_SYSCTL @@ -210,7 +207,7 @@ neigh_sysctl_unregister(in_dev->arp_parms); #endif neigh_parms_release(&arp_tbl, in_dev->arp_parms); - call_rcu(&idev->rcu_head, in_dev_rcu_put); + call_rcu(&in_dev->rcu_head, in_dev_rcu_put, in_dev); } int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b) @@ -255,7 +252,7 @@ rtmsg_ifa(RTM_DELADDR, ifa); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa); - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); } } @@ -278,7 +275,7 @@ rtmsg_ifa(RTM_DELADDR, ifa1); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); if (destroy) { - call_rcu(&ifa1->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa1->rcu_head, inet_rcu_free_ifa, ifa1); if (!in_dev->ifa_list) inetdev_destroy(in_dev); @@ -293,7 +290,7 @@ ASSERT_RTNL(); if (!ifa->ifa_local) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); return 0; } @@ -308,11 +305,13 @@ if (ifa1->ifa_mask == ifa->ifa_mask && inet_ifa_match(ifa1->ifa_address, ifa)) { if (ifa1->ifa_local == ifa->ifa_local) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, + ifa); return -EEXIST; } if (ifa1->ifa_scope != ifa->ifa_scope) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, + ifa); return -EINVAL; } ifa->ifa_flags |= IFA_F_SECONDARY; @@ -347,7 +346,7 @@ if (!in_dev) { in_dev = inetdev_init(dev); if (!in_dev) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); return -ENOBUFS; } } --5vNYLRcllDrimb99-- From herbert@gondor.apana.org.au Fri Aug 13 18:31:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 18:31: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 i7E1UtH6005982 for ; Fri, 13 Aug 2004 18:30:59 -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 1BvnNQ-0001pv-00; Sat, 14 Aug 2004 11:30:32 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvnNO-0000dL-00; Sat, 14 Aug 2004 11:30:30 +1000 Date: Sat, 14 Aug 2004 11:30:30 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814013030.GA2042@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20040814012513.GA721@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7733 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 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: Here are some more ifa_list fixes outside net/ipv4. 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 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=q ===== drivers/net/wan/syncppp.c 1.19 vs edited ===== --- 1.19/drivers/net/wan/syncppp.c 2004-07-13 23:29:35 +10:00 +++ edited/drivers/net/wan/syncppp.c 2004-08-14 10:57:25 +10:00 @@ -50,6 +50,7 @@ #include #include #include +#include #include @@ -767,9 +768,9 @@ struct in_ifaddr *ifa; u32 addr = 0, mask = ~0; /* FIXME: is the mask correct? */ #ifdef CONFIG_INET - if ((in_dev=in_dev_get(dev)) != NULL) + rcu_read_lock(); + if ((in_dev = __in_dev_get(dev)) != NULL) { - read_lock(&in_dev->lock); for (ifa=in_dev->ifa_list; ifa != NULL; ifa=ifa->ifa_next) { if (strcmp(dev->name, ifa->ifa_label) == 0) @@ -779,9 +780,8 @@ break; } } - read_unlock(&in_dev->lock); - in_dev_put(in_dev); } + rcu_read_unlock(); #endif /* I hope both addr and mask are in the net order */ sppp_cisco_send (sp, CISCO_ADDR_REPLY, addr, mask); ===== drivers/net/wireless/strip.c 1.24 vs edited ===== --- 1.24/drivers/net/wireless/strip.c 2004-07-13 23:29:35 +10:00 +++ edited/drivers/net/wireless/strip.c 2004-08-14 11:05:22 +10:00 @@ -106,6 +106,7 @@ #include #include #include +#include #include #include @@ -1348,14 +1349,17 @@ */ if (haddr.c[0] == 0xFF) { u32 brd = 0; - struct in_device *in_dev = in_dev_get(strip_info->dev); - if (in_dev == NULL) + struct in_device *in_dev; + + rcu_read_lock(); + in_dev = __in_dev_get(strip_info->dev); + if (in_dev == NULL) { + rcu_read_unlock(); return NULL; - read_lock(&in_dev->lock); + } if (in_dev->ifa_list) brd = in_dev->ifa_list->ifa_broadcast; - read_unlock(&in_dev->lock); - in_dev_put(in_dev); + rcu_read_unlock(); /* arp_query returns 1 if it succeeds in looking up the address, 0 if it fails */ if (!arp_query(haddr.c, brd, strip_info->dev)) { @@ -1500,17 +1504,18 @@ } if (1) { - struct in_device *in_dev = in_dev_get(strip_info->dev); + struct in_device *in_dev; + brd = addr = 0; + rcu_read_lock(); + in_dev = __in_dev_get(strip_info->dev); if (in_dev) { - read_lock(&in_dev->lock); if (in_dev->ifa_list) { brd = in_dev->ifa_list->ifa_broadcast; addr = in_dev->ifa_list->ifa_local; } - read_unlock(&in_dev->lock); - in_dev_put(in_dev); } + rcu_read_unlock(); } ===== net/core/netpoll.c 1.12 vs edited ===== --- 1.12/net/core/netpoll.c 2004-07-03 06:38:38 +10:00 +++ edited/net/core/netpoll.c 2004-08-14 10:58:29 +10:00 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -572,16 +573,18 @@ memcpy(np->local_mac, ndev->dev_addr, 6); if (!np->local_ip) { - in_dev = in_dev_get(ndev); + rcu_read_lock(); + in_dev = __in_dev_get(ndev); if (!in_dev) { + rcu_read_unlock(); printk(KERN_ERR "%s: no IP address for %s, aborting\n", np->name, np->dev_name); goto release; } np->local_ip = ntohl(in_dev->ifa_list->ifa_local); - in_dev_put(in_dev); + rcu_read_unlock(); printk(KERN_INFO "%s: local IP %d.%d.%d.%d\n", np->name, HIPQUAD(np->local_ip)); } ===== net/core/pktgen.c 1.12 vs edited ===== --- 1.12/net/core/pktgen.c 2004-07-29 12:06:49 +10:00 +++ edited/net/core/pktgen.c 2004-08-14 11:01:55 +10:00 @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -263,14 +264,17 @@ info->saddr_min = 0; info->saddr_max = 0; if (strlen(info->src_min) == 0) { - struct in_device *in_dev = in_dev_get(odev); + struct in_device *in_dev; + + rcu_read_lock(); + in_dev = __in_dev_get(odev); if (in_dev) { if (in_dev->ifa_list) { info->saddr_min = in_dev->ifa_list->ifa_address; info->saddr_max = info->saddr_min; } - in_dev_put(in_dev); } + rcu_read_unlock(); } else { info->saddr_min = in_aton(info->src_min); ===== net/econet/af_econet.c 1.42 vs edited ===== --- 1.42/net/econet/af_econet.c 2004-07-17 00:13:45 +10:00 +++ edited/net/econet/af_econet.c 2004-08-14 11:09:32 +10:00 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -401,16 +402,17 @@ y.x maps to IP a.b.c.x. This should be replaced with something more flexible and more aware of subnet masks. */ { - struct in_device *idev = in_dev_get(dev); + struct in_device *idev; unsigned long network = 0; + + rcu_read_lock(); + idev = __in_dev_get(dev); if (idev) { - read_lock(&idev->lock); if (idev->ifa_list) network = ntohl(idev->ifa_list->ifa_address) & 0xffffff00; /* !!! */ - read_unlock(&idev->lock); - in_dev_put(idev); } + rcu_read_unlock(); udpdest.sin_addr.s_addr = htonl(network | addr.station); } --RnlQjJ0d97Da+TV1-- From herbert@gondor.apana.org.au Fri Aug 13 18:41:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 18:41: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 i7E1fEPL006484 for ; Fri, 13 Aug 2004 18:41: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 1BvnXQ-0001tB-00; Sat, 14 Aug 2004 11:40:52 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvnXM-0000id-00; Sat, 14 Aug 2004 11:40:48 +1000 Date: Sat, 14 Aug 2004 11:40:48 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814014048.GA2746@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <20040814012513.GA721@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7734 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 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: Since nobody calls inet_free_ifa directly anymore, we can perform the following simplification. 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 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=s ===== net/ipv4/devinet.c 1.36 vs edited ===== --- 1.36/net/ipv4/devinet.c 2004-08-14 11:23:39 +10:00 +++ edited/net/ipv4/devinet.c 2004-08-14 11:38:22 +10:00 @@ -104,16 +104,17 @@ return ifa; } -static inline void inet_free_ifa(struct in_ifaddr *ifa) +static void inet_rcu_free_ifa(void *arg) { + struct in_ifaddr *ifa = arg; if (ifa->ifa_dev) in_dev_put(ifa->ifa_dev); kfree(ifa); } -static void inet_rcu_free_ifa(void *ifa) +static inline void inet_free_ifa(struct in_ifaddr *ifa) { - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); } void in_dev_finish_destroy(struct in_device *idev) @@ -192,7 +193,7 @@ while ((ifa = in_dev->ifa_list) != NULL) { inet_del_ifa(in_dev, &in_dev->ifa_list, 0); - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); + inet_free_ifa(ifa); } #ifdef CONFIG_SYSCTL @@ -251,7 +252,7 @@ rtmsg_ifa(RTM_DELADDR, ifa); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa); - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); + inet_free_ifa(ifa); } } @@ -274,7 +275,7 @@ rtmsg_ifa(RTM_DELADDR, ifa1); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); if (destroy) { - call_rcu(&ifa1->rcu_head, inet_rcu_free_ifa, ifa1); + inet_free_ifa(ifa1); if (!in_dev->ifa_list) inetdev_destroy(in_dev); @@ -289,7 +290,7 @@ ASSERT_RTNL(); if (!ifa->ifa_local) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); + inet_free_ifa(ifa); return 0; } @@ -304,13 +305,11 @@ if (ifa1->ifa_mask == ifa->ifa_mask && inet_ifa_match(ifa1->ifa_address, ifa)) { if (ifa1->ifa_local == ifa->ifa_local) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, - ifa); + inet_free_ifa(ifa); return -EEXIST; } if (ifa1->ifa_scope != ifa->ifa_scope) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, - ifa); + inet_free_ifa(ifa); return -EINVAL; } ifa->ifa_flags |= IFA_F_SECONDARY; @@ -345,7 +344,7 @@ if (!in_dev) { in_dev = inetdev_init(dev); if (!in_dev) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa, ifa); + inet_free_ifa(ifa); return -ENOBUFS; } } --qMm9M+Fa2AknHoGS-- From leonid.grossman@s2io.com Fri Aug 13 21:26:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 21:26:51 -0700 (PDT) Received: from ns1.s2io.com (mail.s2io.com [142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7E4Qisd013116 for ; Fri, 13 Aug 2004 21:26:44 -0700 Received: from guinness.s2io.com (sentry.s2io.com [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i7E4QWcE015162; Sat, 14 Aug 2004 00:26:32 -0400 (EDT) Received: from lgt40 ([192.168.0.3]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i7E4QVx0006252; Sat, 14 Aug 2004 00:26:31 -0400 (EDT) Message-Id: <200408140426.i7E4QVx0006252@guinness.s2io.com> From: "Leonid Grossman" To: Cc: "'Andi Kleen'" Subject: TCP hardware assists Date: Fri, 13 Aug 2004 21:27:17 -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: AcSBk9zu7YxXlf6GQAK/8D4e5owwkgAHVHIg In-Reply-To: <001401c48194$62497260$9610100a@S2IOtech.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Scanned-By: MIMEDefang 2.34 X-archive-position: 7735 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 Hi all, Apologies for the wide distribution, hopefully this is the right forum... We are finalizing design for the next version of our 10GbE ASIC; in a nutshell the device supports both TOE/RDMA interface as well as standard Ethernet interface with number of "Stateless" TCP assists like TSO, offload for large UDP segments, etc. (The non-offload path will be software compatible with the current Xframe 10GbE NIC). We are going to further enhance the latter "partial offload" (aka "stateless offload", aka "fast path acceleration" :-)) interface by adding some additional features. As an example, some time ago Andi put forward an idea of socket demultiplex in hardware, to improve receive side performance. This is already being designed in, and we are willing to consider other TCP hardware assists as well. I'm looking for volunteers who would collaborate with us on this project and implement kernel support for the socket demultiplex (and possibly other assists), with S2io providing the necessary driver support and access to the (likely, remote) 10GbE hardware platform. Most if not all the work could be done on a current S2io 10GbE hardware; main limitation for now will be the number of sockets since shipping NIC has only 8 independent rx hw queues but the next version will support tens of thousands. Please contact me if there is an interest in the project. I'm not sure about the legal framework yet, access to our hw specs may require an NDA but the driver code will be released under GPL of course, much like the current S2io Linux driver. Regards, Leonid Leonid Grossman Software Development www.s2io.com From shemminger@osdl.org Fri Aug 13 21:34:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 21:34:25 -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 i7E4YHvN013491 for ; Fri, 13 Aug 2004 21:34:18 -0700 Received: from [192.168.0.10] (063-170-215-071.dslnorthwest.net [63.170.215.71]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i7E4XkSf005204 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 13 Aug 2004 21:33:55 -0700 Message-ID: <411D957A.5040507@osdl.org> Date: Fri, 13 Aug 2004 21:30:50 -0700 From: Stephen Hemminger User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> In-Reply-To: <20040814012513.GA721@gondor.apana.org.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.73 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 7736 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 RCU now takes two args, part of the simplification from IBM in later 2.6.8 series. From herbert@gondor.apana.org.au Fri Aug 13 21:36:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 21:36: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 i7E4aakB013820 for ; Fri, 13 Aug 2004 21:36: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 1BvqHF-0002ZK-00; Sat, 14 Aug 2004 14:36:21 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BvqHC-0000yU-00; Sat, 14 Aug 2004 14:36:18 +1000 Date: Sat, 14 Aug 2004 14:36:18 +1000 To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814043618.GA3724@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <411D957A.5040507@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411D957A.5040507@osdl.org> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7737 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, Aug 13, 2004 at 09:30:50PM -0700, Stephen Hemminger wrote: > RCU now takes two args, part of the simplification from IBM in > later 2.6.8 series. Sorry, please disregard the call_rcu patch. -- 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 Aug 13 22:09:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 22:09: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 i7E59E2r014719 for ; Fri, 13 Aug 2004 22:09: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 1Bvqmi-0002lr-00; Sat, 14 Aug 2004 15:08:52 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvqme-0003Wy-00; Sat, 14 Aug 2004 15:08:48 +1000 Date: Sat, 14 Aug 2004 15:08:48 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814050848.GA11874@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814013030.GA2042@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7738 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 Hi: I'm just going through all the __in_dev_get() callers and the one in ip_route_output_slow() looks fishy. It appears to be checking whether the subsequent inet_select_addr() calls will succeed or not. But this is not reliable since the addresses can always disappear between the check and the actual call. Do we really care about the zero return value of inet_select_addr() here? What about the other calls to inet_select_addr()? -- 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 Aug 13 23:27:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 23:27: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 i7E6ROa4016115 for ; Fri, 13 Aug 2004 23:27: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 1Bvs0S-000358-00; Sat, 14 Aug 2004 16:27:08 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvs0O-0004tx-00; Sat, 14 Aug 2004 16:27:04 +1000 Date: Sat, 14 Aug 2004 16:27:03 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: neigh_create/inetdev_destroy race? Message-ID: <20040814062703.GA4806@gondor.apana.org.au> References: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814050848.GA11874@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7739 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 Hi: I'm going through in_dev_get() callers. The call in arp_constructor() looks racy. It takes in_dev->arp_parms and stores it in neigh->parms. Is there any thing that prevents the following scenario from occuring? CPU0 CPU1 neigh_create inet_del_ifa notifier_call_chain neigh_ifdown inetdev_destroy arp_constructor neigh->parms = in_dev->arp_parms in_dev->dead = 1 in_dev->dev->ip_ptr = NULL neigh_parms_release n->parms->neigh_setup => BUG 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 Fri Aug 13 23:31:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 23:31: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 i7E6VeA7016533 for ; Fri, 13 Aug 2004 23:31: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 1Bvs4W-00036E-00; Sat, 14 Aug 2004 16:31:20 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvs4V-0004vQ-00; Sat, 14 Aug 2004 16:31:19 +1000 Date: Sat, 14 Aug 2004 16:31:19 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814063119.GA18907@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20040814013030.GA2042@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7740 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 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: On Sat, Aug 14, 2004 at 11:30:30AM +1000, herbert wrote: > > Here are some more ifa_list fixes outside net/ipv4. Missed one in sdlamain.c because it was marked BROKEN. 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 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p1 ===== drivers/net/wan/sdlamain.c 1.23 vs edited ===== --- 1.23/drivers/net/wan/sdlamain.c 2003-10-06 02:23:10 +10:00 +++ edited/drivers/net/wan/sdlamain.c 2004-08-14 15:16:40 +10:00 @@ -68,6 +68,7 @@ #include #include +#include #include #define KMEM_SAFETYZONE 8 @@ -1268,37 +1269,39 @@ struct in_ifaddr *ifaddr; struct in_device *in_dev; + unsigned long addr = 0; + rcu_read_lock(); if ((in_dev = __in_dev_get(dev)) == NULL){ - return 0; + goto out; } if ((ifaddr = in_dev->ifa_list)== NULL ){ - return 0; + goto out; } switch (option){ case WAN_LOCAL_IP: - return ifaddr->ifa_local; + addr = ifaddr->ifa_local; break; case WAN_POINTOPOINT_IP: - return ifaddr->ifa_address; + addr = ifaddr->ifa_address; break; case WAN_NETMASK_IP: - return ifaddr->ifa_mask; + addr = ifaddr->ifa_mask; break; case WAN_BROADCAST_IP: - return ifaddr->ifa_broadcast; + addr = ifaddr->ifa_broadcast; break; - default: - return 0; } - return 0; +out: + rcu_read_unlock(); + return addr; } void add_gateway(sdla_t *card, struct net_device *dev) --vtzGhvizbBRQ85DL-- From herbert@gondor.apana.org.au Fri Aug 13 23:32:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Aug 2004 23:33: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 i7E6Wrul016854 for ; Fri, 13 Aug 2004 23:32:54 -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 1Bvs5k-00037G-00; Sat, 14 Aug 2004 16:32:36 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvs5j-0004vy-00; Sat, 14 Aug 2004 16:32:35 +1000 Date: Sat, 14 Aug 2004 16:32:35 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040814063235.GB18907@gondor.apana.org.au> References: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814063119.GA18907@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <20040814063119.GA18907@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7741 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 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: On Sat, Aug 14, 2004 at 04:31:19PM +1000, herbert wrote: > > Missed one in sdlamain.c because it was marked BROKEN. And a couple of them which are S390 only. 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 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p2 ===== drivers/s390/net/lcs.c 1.31 vs edited ===== --- 1.31/drivers/s390/net/lcs.c 2004-08-08 04:05:36 +10:00 +++ edited/drivers/s390/net/lcs.c 2004-08-14 15:34:58 +10:00 @@ -1002,7 +1002,7 @@ in4_dev = in_dev_get(card->dev); if (in4_dev == NULL) return 0; - read_lock(&in4_dev->lock); + read_lock(&in4_dev->mc_list_lock); spin_lock(&card->ipm_lock); /* Check for multicast addresses to be removed. */ list_for_each(l, &card->ipm_list) { @@ -1046,7 +1046,7 @@ list_add(&ipm->list, &card->ipm_list); } spin_unlock(&card->ipm_lock); - read_unlock(&in4_dev->lock); + read_unlock(&in4_dev->mc_list_lock); in_dev_put(in4_dev); lcs_fix_multicast_list(card); return 0; ===== drivers/s390/net/qeth_main.c 1.11 vs edited ===== --- 1.11/drivers/s390/net/qeth_main.c 2004-08-08 04:05:36 +10:00 +++ edited/drivers/s390/net/qeth_main.c 2004-08-14 16:27:11 +10:00 @@ -73,6 +73,7 @@ #include #include #include +#include #include "qeth.h" #include "qeth_mpc.h" @@ -4733,9 +4734,10 @@ QETH_DBF_TEXT(trace, 4, "frvaddr4"); if (!card->vlangrp) return; - in_dev = in_dev_get(card->vlangrp->vlan_devices[vid]); + rcu_read_lock(); + in_dev = __in_dev_get(card->vlangrp->vlan_devices[vid]); if (!in_dev) - return; + goto out; for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next){ addr = qeth_get_addr_buffer(QETH_PROT_IPV4); if (addr){ @@ -4746,7 +4748,8 @@ kfree(addr); } } - in_dev_put(in_dev); +out: + rcu_read_unlock(); } static void @@ -4918,9 +4921,9 @@ in_dev = in_dev_get(vg->vlan_devices[i]); if (!in_dev) continue; - read_lock(&in_dev->lock); + read_lock(&in_dev->mc_list_lock); qeth_add_mc(card,in_dev); - read_unlock(&in_dev->lock); + read_unlock(&in_dev->mc_list_lock); in_dev_put(in_dev); } #endif @@ -4935,10 +4938,10 @@ in4_dev = in_dev_get(card->dev); if (in4_dev == NULL) return; - read_lock(&in4_dev->lock); + read_lock(&in4_dev->mc_list_lock); qeth_add_mc(card, in4_dev); qeth_add_vlan_mc(card); - read_unlock(&in4_dev->lock); + read_unlock(&in4_dev->mc_list_lock); in_dev_put(in4_dev); } --EuxKj2iCbKjpUGkD-- From kaber@trash.net Sat Aug 14 01:18:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 01:18:19 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7E8IAQd022074 for ; Sat, 14 Aug 2004 01:18:12 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id C352719F33C; Sat, 14 Aug 2004 10:17:58 +0200 (CEST) Received: from trash.net (unknown [172.16.2.213]) by eru.coreworks.de (Postfix) with ESMTP id D751B3940EE; Sat, 14 Aug 2004 10:17:57 +0200 (CEST) Message-ID: <411DCA88.3080508@trash.net> Date: Sat, 14 Aug 2004 10:17: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: "David S. Miller" Cc: Tomasz Paszkowski , netdev@oss.sgi.com Subject: Re: [PATCH 2.4] Use double-linked list for dev->qdisc_list References: <20040804125926.GA15324@krezus.e-wro.net> <4110E505.1010205@trash.net> <20040804145610.GA21339@krezus.e-wro.net> <20040804134432.40500c15.davem@redhat.com> <41115A37.30806@trash.net> In-Reply-To: <41115A37.30806@trash.net> Content-Type: multipart/mixed; boundary="------------050501020404090900080208" X-archive-position: 7742 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 This is a multi-part message in MIME format. --------------050501020404090900080208 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Dave, Patrick McHardy wrote: > David S. Miller wrote: > >> Can someone regenerate this patch with the q_idx fix Patrick >> just posted added to it? >> >> > Updated patch for 2.4 attached. seems like you missed this patch. Regards Patrick --------------050501020404090900080208 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/08/04 23:46:47+02:00 kaber@coreworks.de # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +6 -19 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # net/sched/sch_api.c # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +18 -10 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # include/net/pkt_sched.h # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +1 -1 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # # include/linux/netdevice.h # 2004/08/04 23:46:40+02:00 kaber@coreworks.de +1 -1 # [PKT_SCHED]: Use double-linked list for dev->qdisc_list # diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-08-04 23:49:06 +02:00 +++ b/include/linux/netdevice.h 2004-08-04 23:49:06 +02:00 @@ -352,8 +352,8 @@ struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; - struct Qdisc *qdisc_list; struct Qdisc *qdisc_ingress; + struct list_head qdisc_list; unsigned long tx_queue_len; /* Max frames per queue allowed */ /* hard_start_xmit synchronizer */ diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h --- a/include/net/pkt_sched.h 2004-08-04 23:49:06 +02:00 +++ b/include/net/pkt_sched.h 2004-08-04 23:49:06 +02:00 @@ -80,11 +80,11 @@ #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRES 4 struct Qdisc_ops *ops; - struct Qdisc *next; u32 handle; atomic_t refcnt; struct sk_buff_head q; struct net_device *dev; + struct list_head list; struct tc_stats stats; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-04 23:49:06 +02:00 +++ b/net/sched/sch_api.c 2004-08-04 23:49:06 +02:00 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -193,7 +194,7 @@ { struct Qdisc *q; - for (q = dev->qdisc_list; q; q = q->next) { + list_for_each_entry(q, &dev->qdisc_list, list) { if (q->handle == handle) return q; } @@ -424,6 +425,7 @@ memset(sch, 0, size); + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); if (handle == TC_H_INGRESS) @@ -449,8 +451,7 @@ if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { write_lock(&qdisc_tree_lock); - sch->next = dev->qdisc_list; - dev->qdisc_list = sch; + list_add_tail(&sch->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) @@ -805,15 +806,18 @@ if (idx > s_idx) s_q_idx = 0; read_lock(&qdisc_tree_lock); - for (q = dev->qdisc_list, q_idx = 0; q; - q = q->next, q_idx++) { - if (q_idx < s_q_idx) + q_idx = 0; + list_for_each_entry(q, &dev->qdisc_list, list) { + if (q_idx < s_q_idx) { + q_idx++; continue; + } if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { read_unlock(&qdisc_tree_lock); goto done; } + q_idx++; } read_unlock(&qdisc_tree_lock); } @@ -1024,13 +1028,16 @@ return 0; s_t = cb->args[0]; + t = 0; read_lock(&qdisc_tree_lock); - for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { - if (t < s_t) continue; - if (!q->ops->cl_ops) continue; - if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle) + list_for_each_entry(q, &dev->qdisc_list, list) { + if (t < s_t || !q->ops->cl_ops || + (tcm->tcm_parent && + TC_H_MAJ(tcm->tcm_parent) != q->handle)) { + t++; continue; + } if (t > s_t) memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); arg.w.fn = qdisc_class_dump; @@ -1043,6 +1050,7 @@ cb->args[1] = arg.w.count; if (arg.w.stop) break; + t++; } read_unlock(&qdisc_tree_lock); diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-04 23:49:06 +02:00 +++ b/net/sched/sch_generic.c 2004-08-04 23:49:06 +02:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -391,6 +392,7 @@ return NULL; memset(sch, 0, size); + INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); sch->ops = ops; sch->enqueue = ops->enqueue; @@ -420,22 +422,10 @@ void qdisc_destroy(struct Qdisc *qdisc) { struct Qdisc_ops *ops = qdisc->ops; - struct net_device *dev; if (!atomic_dec_and_test(&qdisc->refcnt)) return; - - dev = qdisc->dev; - - if (dev) { - struct Qdisc *q, **qp; - for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) { - if (q == qdisc) { - *qp = q->next; - break; - } - } - } + list_del(&qdisc->list); #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&qdisc->stats); #endif @@ -464,10 +454,8 @@ printk(KERN_INFO "%s: activation failed\n", dev->name); return; } - write_lock(&qdisc_tree_lock); - qdisc->next = dev->qdisc_list; - dev->qdisc_list = qdisc; + list_add_tail(&qdisc->list, &dev->qdisc_list); write_unlock(&qdisc_tree_lock); } else { @@ -513,7 +501,7 @@ dev->qdisc = &noop_qdisc; spin_unlock_bh(&dev->queue_lock); dev->qdisc_sleeping = &noop_qdisc; - dev->qdisc_list = NULL; + INIT_LIST_HEAD(&dev->qdisc_list); write_unlock(&qdisc_tree_lock); dev_watchdog_init(dev); @@ -535,9 +523,8 @@ qdisc_destroy(qdisc); } #endif - BUG_TRAP(dev->qdisc_list == NULL); + BUG_TRAP(list_empty(&dev->qdisc_list)); BUG_TRAP(!timer_pending(&dev->watchdog_timer)); - dev->qdisc_list = NULL; spin_unlock_bh(&dev->queue_lock); write_unlock(&qdisc_tree_lock); } --------------050501020404090900080208-- From bondarenko007@aport2000.ru Sat Aug 14 02:34:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 02:34:42 -0700 (PDT) Received: from umail.ru (umail.ru [195.34.32.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7E9YZqO023547 for ; Sat, 14 Aug 2004 02:34:36 -0700 Received: from [83.237.28.249] (HELO shaman007.homelinux.com) by umail.ru (CommuniGate Pro SMTP 4.2b6) with ESMTP id 289627204; Sat, 14 Aug 2004 13:34:28 +0400 Received: from shaman007.homelinux.com (linux.local.ru [127.0.0.1]) by linux.local.ru (Postfix) with SMTP id 6EC963ECAC; Sat, 14 Aug 2004 13:34:28 +0400 (MSD) Received: from linux.local.ru (linux.local.ru [127.0.0.1]) by shaman007.homelinux.com (Postfix) with ESMTP id AFE9E3EC93; Sat, 14 Aug 2004 13:34:27 +0400 (MSD) From: Andrey Bondarenko Reply-To: bondarenko007@aport2000.ru Organization: KL To: mostrows@styx.uwaterloo.ca Subject: /dev/ptyXX 2.6.8 problem Date: Sat, 14 Aug 2004 13:34:27 +0400 User-Agent: KMail/1.6.2 Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200408141334.27402.bondarenko007@aport2000.ru> X-SpamTest-Info: Profile: Formal (98/040813) X-SpamTest-Info: Profile: Detect Hard (4/030526) X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Marking Spam - Subject (2/030321) X-SpamTest-Status: Not detected X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0124], KAS/Release X-archive-position: 7743 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bondarenko007@aport2000.ru Precedence: bulk X-list: netdev Hello! I had found an issue in the 2.6.8 kernel, I don't know correct person to report, but I hope you will mind much. Well, I had 2.6.7 kernel, everything was OK, I had compiled 2.6.8 with same settings and found, that I can not run xterm (or other terminal), and when I run MC from console, it reports, that it can not open pty's. I had googled round and found (http://seclists.org/lists/linux-kernel/2004/Aug/1097.html) same problem and solution for it - kill everything, that uses /dev/pts/XX. So I had killed pppd, run Xterm - everything was OK. Than I run pppd again (I can not live without my ppp-oe), but xterm remanis working and problem seems to disappear. Problem is quite annoying and very strange. Thank you for your time. -- With best regards, Andrey "Shaman" Bondarenko This message does not contain any viruses. From herbert@gondor.apana.org.au Sat Aug 14 03:48:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 03:48: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 i7EAmT8G026728 for ; Sat, 14 Aug 2004 03:48: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 1Bvw56-0004J5-00; Sat, 14 Aug 2004 20:48:12 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvw52-0005Mj-00; Sat, 14 Aug 2004 20:48:08 +1000 Date: Sat, 14 Aug 2004 20:48:07 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [ESP] Only one algorithm is required Message-ID: <20040814104807.GA20572@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7744 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 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: In a previous, I moved the encap_type checks in esp4.c from the packet processing path to xfrm_user/af_key. This isn't ideal since those encap types only make sense for esp4. The following patch moves it back into esp4.c. The difference is that it's now done in init_state so that it's only done once rather than per-packet. I've also added encap_type checks for every transform. This means that people attaching encap objects to AH/IPCOMP/IPIP will now get errors. That should be fine as no major KM does this. Please note that the error returned is now EINVAL instead of ENOPROTOOPT. This shouldn't break anything since KMs only test the errno from setsockopt() for NAT-T support rather than add_sa where it would be too late 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 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=encap-check ===== net/ipv4/ah4.c 1.39 vs edited ===== --- 1.39/net/ipv4/ah4.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv4/ah4.c 2004-08-12 19:37:27 +10:00 @@ -214,6 +214,9 @@ if (x->aalg->alg_key_len > 512) goto error; + if (x->encap) + goto error; + ahp = kmalloc(sizeof(*ahp), GFP_KERNEL); if (ahp == NULL) return -ENOMEM; ===== net/ipv4/esp4.c 1.54 vs edited ===== --- 1.54/net/ipv4/esp4.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv4/esp4.c 2004-08-12 19:47:07 +10:00 @@ -436,6 +436,7 @@ switch (encap->encap_type) { default: + goto error; case UDP_ENCAP_ESPINUDP: x->props.header_len += sizeof(struct udphdr); break; @@ -449,15 +450,9 @@ return 0; error: - if (esp) { - if (esp->auth.tfm) - crypto_free_tfm(esp->auth.tfm); - if (esp->auth.work_icv) - kfree(esp->auth.work_icv); - if (esp->conf.tfm) - crypto_free_tfm(esp->conf.tfm); - kfree(esp); - } + x->data = esp; + esp_destroy(x); + x->data = NULL; return -EINVAL; } ===== net/ipv4/ipcomp.c 1.29 vs edited ===== --- 1.29/net/ipv4/ipcomp.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv4/ipcomp.c 2004-08-12 19:44:39 +10:00 @@ -288,6 +288,9 @@ if (!x->calg) goto out; + if (x->encap) + goto out; + err = -ENOMEM; ipcd = kmalloc(sizeof(*ipcd), GFP_KERNEL); if (!ipcd) ===== net/ipv4/xfrm4_tunnel.c 1.15 vs edited ===== --- 1.15/net/ipv4/xfrm4_tunnel.c 2004-08-02 18:13:28 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-12 19:48:55 +10:00 @@ -84,6 +84,10 @@ { if (!x->props.mode) return -EINVAL; + + if (x->encap) + return -EINVAL; + x->props.header_len = sizeof(struct iphdr); return 0; ===== net/ipv6/ah6.c 1.39 vs edited ===== --- 1.39/net/ipv6/ah6.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv6/ah6.c 2004-08-12 19:47:45 +10:00 @@ -353,6 +353,9 @@ if (x->aalg->alg_key_len > 512) goto error; + if (x->encap) + goto error; + ahp = kmalloc(sizeof(*ahp), GFP_KERNEL); if (ahp == NULL) return -ENOMEM; ===== net/ipv6/esp6.c 1.35 vs edited ===== --- 1.35/net/ipv6/esp6.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv6/esp6.c 2004-08-12 19:48:01 +10:00 @@ -309,6 +309,9 @@ if (x->ealg == NULL) goto error; + if (x->encap) + goto error; + esp = kmalloc(sizeof(*esp), GFP_KERNEL); if (esp == NULL) return -ENOMEM; ===== net/ipv6/ipcomp6.c 1.20 vs edited ===== --- 1.20/net/ipv6/ipcomp6.c 2004-08-02 17:53:26 +10:00 +++ edited/net/ipv6/ipcomp6.c 2004-08-12 19:48:23 +10:00 @@ -284,6 +284,9 @@ if (!x->calg) goto out; + if (x->encap) + goto out; + err = -ENOMEM; ipcd = kmalloc(sizeof(*ipcd), GFP_KERNEL); if (!ipcd) ===== net/ipv6/xfrm6_tunnel.c 1.5 vs edited ===== --- 1.5/net/ipv6/xfrm6_tunnel.c 2004-08-02 18:13:28 +10:00 +++ edited/net/ipv6/xfrm6_tunnel.c 2004-08-12 19:48:43 +10:00 @@ -517,6 +517,9 @@ if (!x->props.mode) return -EINVAL; + if (x->encap) + return -EINVAL; + x->props.header_len = sizeof(struct ipv6hdr); return 0; ===== net/key/af_key.c 1.66 vs edited ===== --- 1.66/net/key/af_key.c 2004-08-02 07:15:03 +10:00 +++ edited/net/key/af_key.c 2004-08-12 19:50:30 +10:00 @@ -1075,15 +1075,6 @@ n_type = ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]; natt->encap_type = n_type->sadb_x_nat_t_type_type; - switch (natt->encap_type) { - case UDP_ENCAP_ESPINUDP: - case UDP_ENCAP_ESPINUDP_NON_IKE: - break; - default: - err = -ENOPROTOOPT; - goto out; - } - if (ext_hdrs[SADB_X_EXT_NAT_T_SPORT-1]) { struct sadb_x_nat_t_port* n_port = ext_hdrs[SADB_X_EXT_NAT_T_SPORT-1]; ===== net/xfrm/xfrm_user.c 1.47 vs edited ===== --- 1.47/net/xfrm/xfrm_user.c 2004-07-30 21:16:40 +10:00 +++ edited/net/xfrm/xfrm_user.c 2004-08-12 19:51:50 +10:00 @@ -78,15 +78,6 @@ if ((rt->rta_len - sizeof(*rt)) < sizeof(*encap)) return -EINVAL; - encap = RTA_DATA(rt); - switch (encap->encap_type) { - case UDP_ENCAP_ESPINUDP: - case UDP_ENCAP_ESPINUDP_NON_IKE: - break; - default: - return -ENOPROTOOPT; - } - return 0; } --tKW2IUtsqtDRztdT-- From herbert@gondor.apana.org.au Sat Aug 14 03:52:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 03:53: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 i7EAquLT027088 for ; Sat, 14 Aug 2004 03:52: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 1Bvw9W-0004Ka-00; Sat, 14 Aug 2004 20:52:46 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bvw9V-0005Nc-00; Sat, 14 Aug 2004 20:52:45 +1000 Date: Sat, 14 Aug 2004 20:52:45 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [ESP] Only one algorithm is required Message-ID: <20040814105245.GA20646@gondor.apana.org.au> References: <20040814104807.GA20572@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <20040814104807.GA20572@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7745 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 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: I wrote the wrong subject for the last patch. It was really meant for this one :) Both encryption and authentication are optional for ESP. However, at least one of them must be present. The following patch changes init_state to match that specification. It also changes the IPv6 ESP check to allow zero-length authentication keys as is the case with the IPv4 version. 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 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=esp-alg-check ===== net/ipv4/esp4.c 1.55 vs edited ===== --- 1.55/net/ipv4/esp4.c 2004-08-12 19:59:52 +10:00 +++ edited/net/ipv4/esp4.c 2004-08-14 09:33:05 +10:00 @@ -372,8 +372,7 @@ if (x->aalg) { if (x->aalg->alg_key_len > 512) goto error; - } - if (x->ealg == NULL) + } else if (x->ealg == NULL) goto error; esp = kmalloc(sizeof(*esp), GFP_KERNEL); ===== net/ipv6/esp6.c 1.36 vs edited ===== --- 1.36/net/ipv6/esp6.c 2004-08-12 19:59:52 +10:00 +++ edited/net/ipv6/esp6.c 2004-08-14 09:33:25 +10:00 @@ -302,11 +302,11 @@ { struct esp_data *esp = NULL; + /* null auth and encryption can have zero length keys */ if (x->aalg) { - if (x->aalg->alg_key_len == 0 || x->aalg->alg_key_len > 512) + if (x->aalg->alg_key_len > 512) goto error; - } - if (x->ealg == NULL) + } else if (x->ealg == NULL) goto error; if (x->encap) --DocE+STaALJfprDB-- From jurriaan@rivierenland.xs4all.nl Sat Aug 14 06:56:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 06:56:42 -0700 (PDT) Received: from smtp-vbr5.xs4all.nl (smtp-vbr5.xs4all.nl [194.109.24.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EDuZvA001155 for ; Sat, 14 Aug 2004 06:56:36 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr5.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7EDuR4h016437 for ; Sat, 14 Aug 2004 15:56:28 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 15541 invoked from network); 14 Aug 2004 13:56:07 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 14 Aug 2004 13:56:07 -0000 Received: (qmail 9237 invoked by uid 1000); 14 Aug 2004 13:56:06 -0000 Date: Sat, 14 Aug 2004 15:56:06 +0200 From: Jurriaan To: Francois Romieu Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040814135606.GA6001@middle.of.nowhere> Reply-To: Jurriaan References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814121533.GB18754@electric-eye.fr.zoreil.com> X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040803i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 7747 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev Content-Length: 2653 Lines: 71 From: Francois Romieu Date: Sat, Aug 14, 2004 at 02:15:33PM +0200 > > What could be the problem here? > > The transition from 2.6.8-rc3-mm1 to 2.6.8-rc4-mm1 changes both the > point outlined above and the 8139too driver. > > You may: > 1 - try the "pci=routeirq" argument at startup on your 2.6.8-rc4-mm1 if you > have not done so; that didn't help > 2 - apply to your 2.6.8-rc4-mm1 tree: > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch I don't get it. INTEL :patch -p1 -R --dry-run < ../268rc4mm1_8139too-mm-revert.patch patching file drivers/net/8139too.c Hunk #1 FAILED at 593. Hunk #2 FAILED at 1935. Hunk #3 FAILED at 1951. Hunk #4 FAILED at 1979. Hunk #5 FAILED at 2006. Hunk #6 FAILED at 2042. Hunk #7 FAILED at 2062. 7 out of 7 hunks FAILED -- saving rejects to file drivers/net/8139too.c.rej INTEL :patch -p1 --dry-run < ../268rc4mm1_8139too-mm-revert.patch patching file drivers/net/8139too.c Hunk #1 FAILED at 593. Hunk #2 FAILED at 1934. Hunk #3 FAILED at 1947. Hunk #4 FAILED at 1976. Hunk #5 FAILED at 1989. Hunk #6 FAILED at 2024. Hunk #7 FAILED at 2047. 7 out of 7 hunks FAILED -- saving rejects to file drivers/net/8139too.c.rej This patch fails both with and without -R - how am I supposed to apply it? > 3 - apply to your 2.6.8-rc4-mm1 tree: > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-10.patch > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-20.patch > I can get the -20 patch to apply with -R (with offsets), but after that -10 with -R fails. Since it's the network card, here's some extra info: 0000:02:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) Subsystem: Unex Technology Corp. ND010 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- ; Sat, 14 Aug 2004 07:16:41 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7EEGSe1017446; Sat, 14 Aug 2004 10:16:28 -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 i7EEGMa24774; Sat, 14 Aug 2004 10:16:22 -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 i7EEGJtM004188; Sat, 14 Aug 2004 10:16:20 -0400 Date: Sat, 14 Aug 2004 10:16:17 -0400 (EDT) From: James Morris X-X-Sender: jmorris@dhcp83-76.boston.redhat.com To: Herbert Xu cc: "David S. Miller" , Subject: Re: [ESP] Only one algorithm is required In-Reply-To: <20040814105245.GA20646@gondor.apana.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7748 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: 356 Lines: 16 On Sat, 14 Aug 2004, Herbert Xu wrote: > Both encryption and authentication are optional for ESP. However, at > least one of them must be present. The following patch changes init_state > to match that specification. This is userland level policy and I don't think the kernel should be enforcing this. - James -- James Morris From hch@lst.de Sat Aug 14 07:33:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 07:33:37 -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 i7EEXVZv002535 for ; Sat, 14 Aug 2004 07:33:32 -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 i7EEXO95026076 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 14 Aug 2004 16:33:24 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7EEXOmf026074; Sat, 14 Aug 2004 16:33:24 +0200 Date: Sat, 14 Aug 2004 16:33:24 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] missing statics in atm Message-ID: <20040814143324.GA26061@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: 7749 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: 790 Lines: 27 --- 1.35/net/atm/clip.c 2004-07-13 15:39:15 +02:00 +++ edited/net/atm/clip.c 2004-08-11 12:00:00 +02:00 @@ -47,8 +47,8 @@ #endif -struct net_device *clip_devs = NULL; -struct atm_vcc *atmarpd = NULL; +static struct net_device *clip_devs; +static struct atm_vcc *atmarpd; static struct neigh_table clip_tbl; static struct timer_list idle_timer; static int start_timer = 1; ===== net/atm/ipcommon.h 1.1 vs edited ===== --- 1.1/net/atm/ipcommon.h 2002-02-05 18:40:00 +01:00 +++ edited/net/atm/ipcommon.h 2004-08-11 11:59:21 +02:00 @@ -12,9 +12,6 @@ #include #include - -extern struct net_device *clip_devs; - /* * Appends all skbs from "from" to "to". The operation is atomic with respect * to all other skb operations on "from" or "to". From romieu@fr.zoreil.com Sat Aug 14 08:12:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 08:12: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 i7EFCKlX003675 for ; Sat, 14 Aug 2004 08:12:21 -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 i7EF8Ou5022077; Sat, 14 Aug 2004 17:08:24 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7EF8O0x022076; Sat, 14 Aug 2004 17:08:24 +0200 Date: Sat, 14 Aug 2004 17:08:24 +0200 From: Francois Romieu To: Jurriaan Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040814150824.GA21843@electric-eye.fr.zoreil.com> References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814135606.GA6001@middle.of.nowhere> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7751 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: 745 Lines: 29 Jurriaan : [...] > > 1 - try the "pci=routeirq" argument at startup on your 2.6.8-rc4-mm1 if you > > have not done so; > > that didn't help Ok. Bad day. [...] > > 2 - apply to your 2.6.8-rc4-mm1 tree: > > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch > > I don't get it. [...] > This patch fails both with and without -R - how am I supposed to apply > it? Without -R. [linux-2.6.8-rc4-mm1]$ patch -p1 --dry-run < /tmp/8139too-mm-revert.patch patching file drivers/net/8139too.c [linux-2.6.8-rc4-mm1]$ md5sum drivers/net/8139too.c 70b78e69d4c2387b63aaee943e67a244 drivers/net/8139too.c Can you check the md5sum of the 8139too.c file in your 2.6.8-rc4-mm1 tree ? -- Ueimor From jurriaan@rivierenland.xs4all.nl Sat Aug 14 09:10:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 09:11:05 -0700 (PDT) Received: from smtp-vbr14.xs4all.nl (smtp-vbr14.xs4all.nl [194.109.24.34]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EGAw94008112 for ; Sat, 14 Aug 2004 09:10:58 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr14.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7EGApSh043014 for ; Sat, 14 Aug 2004 18:10:52 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 26376 invoked from network); 14 Aug 2004 16:10:48 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 14 Aug 2004 16:10:48 -0000 Received: (qmail 2463 invoked by uid 1000); 14 Aug 2004 16:10:39 -0000 Date: Sat, 14 Aug 2004 18:10:39 +0200 From: Jurriaan To: Francois Romieu Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040814161039.GA1985@middle.of.nowhere> Reply-To: Jurriaan References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814150824.GA21843@electric-eye.fr.zoreil.com> X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040803i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 7752 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev Content-Length: 1299 Lines: 38 From: Francois Romieu Date: Sat, Aug 14, 2004 at 05:08:24PM +0200 > Jurriaan : > [...] > > > 1 - try the "pci=routeirq" argument at startup on your 2.6.8-rc4-mm1 if you > > > have not done so; > > > > that didn't help > > Ok. Bad day. > > [...] > > > 2 - apply to your 2.6.8-rc4-mm1 tree: > > > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch > > > > I don't get it. > [...] > > This patch fails both with and without -R - how am I supposed to apply > > it? > Never mind, it seems my patch was saved incorrectly. Anyway, after applying this patch my network-traffic is as fast as it ever was. There's no difference in dmesg-output, but I reach 450-460 KiB/s again. If there's anything else I can test, please let me know - I gather the update did work for other people, so if testers are wanted I'm available. Kind regards, Jurriaan -- 'Tempers grow short,' Kruppe murmured as the commander rode away. 'But not as short as Kruppe, for whom all nasty words whiz impactless over his head, and are thus lost in the ether. And those darts aimed lower, ah, they but bounce from Kruppe's ample equanimity--' Steven Erikson - Memories of Ice Debian (Unstable) GNU/Linux 2.6.8-rc4-mm1 2x6078 bogomips load 0.20 From vda@port.imtp.ilyichevsk.odessa.ua Sat Aug 14 09:23:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 09:23:07 -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 i7EGMvLu008558 for ; Sat, 14 Aug 2004 09:23:01 -0700 Received: (qmail 27002 invoked by alias); 2 Feb 1992 17:12:50 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 02 Feb 1992 17:12:50 -0000 From: Denis Vlasenko To: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez), prism54-devel@prism54.org, netdev@oss.sgi.com Subject: cvs commit'ed Date: Sat, 14 Aug 2004 19:22:42 +0300 User-Agent: KMail/1.5.4 References: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> <20040811002844.GH26262@ruslug.rutgers.edu> <20040811005346.GK26262@ruslug.rutgers.edu> In-Reply-To: <20040811005346.GK26262@ruslug.rutgers.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408141922.42792.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 7753 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: 660 Lines: 20 On Wednesday 11 August 2004 03:53, Luis R. Rodriguez wrote: > Denis, > > Actually you have CVS access to prism54, if no one complains about these > patches (and I think no one will as they are trivial), just go ahead and > commit these changes yourself. Please remember to update the ChangeLog too. > > After your changes go through I plan on starting to integrate the wpa work > I have (it can't wait any longer). I did it. You may want to check whether cvs is still ok, it was the first time I ever used cvs ;] Shall I do something more to propagate changes into mainline or cvs commit done @prism54.org is enough? I also changed my login passwd. -- vda From romieu@fr.zoreil.com Sat Aug 14 10:32:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 10:33: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 i7EHWJnL009910 for ; Sat, 14 Aug 2004 10:32: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 i7EHSZu5023478; Sat, 14 Aug 2004 19:28:36 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7EHSZH2023477; Sat, 14 Aug 2004 19:28:35 +0200 Date: Sat, 14 Aug 2004 19:28:35 +0200 From: Francois Romieu To: Jurriaan Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040814172835.GA23427@electric-eye.fr.zoreil.com> References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> <20040814161039.GA1985@middle.of.nowhere> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814161039.GA1985@middle.of.nowhere> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7754 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 Jurriaan : [...] > Never mind, it seems my patch was saved incorrectly. Anyway, after > applying this patch my network-traffic is as fast as it ever was. > > There's no difference in dmesg-output, but I reach 450-460 KiB/s again. Ok. So Jeff was right (TM). > If there's anything else I can test, please let me know - I gather the > update did work for other people, so if testers are wanted I'm > available. Can you apply 8139too-10.patch + 8139too-20.patch on top of your working config (namely 2.6.8-rc4-mm1 + 8139too-mm-revert.patch) and tell if things go wrong ? -- Ueimor From mcgrof@studorgs.rutgers.edu Sat Aug 14 11:37:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 11:37:32 -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 i7EIbImG011276 for ; Sat, 14 Aug 2004 11:37:18 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 98681F99BD; Sat, 14 Aug 2004 14:37:12 -0400 (EDT) Date: Sat, 14 Aug 2004 14:37:12 -0400 To: Denis Vlasenko Cc: "Luis R. Rodriguez" , prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: cvs commit'ed Message-ID: <20040814183712.GH2050@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , "Luis R. Rodriguez" , prism54-devel@prism54.org, netdev@oss.sgi.com References: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> <20040811002844.GH26262@ruslug.rutgers.edu> <20040811005346.GK26262@ruslug.rutgers.edu> <200408141922.42792.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408141922.42792.vda@port.imtp.ilyichevsk.odessa.ua> 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: 7755 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, Aug 14, 2004 at 07:22:42PM +0300, Denis Vlasenko wrote: > On Wednesday 11 August 2004 03:53, Luis R. Rodriguez wrote: > > Denis, > > > > Actually you have CVS access to prism54, if no one complains about these > > patches (and I think no one will as they are trivial), just go ahead and > > commit these changes yourself. Please remember to update the ChangeLog too. > > > > After your changes go through I plan on starting to integrate the wpa work > > I have (it can't wait any longer). > > I did it. You may want to check whether cvs is still ok, > it was the first time I ever used cvs ;] Heh, I'm sure its fine. BTW I'd like us to move to subversion to use the concepts of patchsets. I think this will help us keep our tree and the kernel tree in sync. > Shall I do something more to propagate changes into mainline > or cvs commit done @prism54.org is enough? cvs commit is enough. We still have to keep kernel tree in sync with our cvs rep. Not sure if you've sent new patches out to Jeff/netdev yet, have you? 2.6.8 is out so I'm assuming Jeff will now accept non-bug-fix patches. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From hch@lst.de Sat Aug 14 11:51:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 11:51:45 -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 i7EIpcVF011825 for ; Sat, 14 Aug 2004 11:51:39 -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 i7EIpT95028966 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 14 Aug 2004 20:51:30 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7EIpTqf028964; Sat, 14 Aug 2004 20:51:29 +0200 Date: Sat, 14 Aug 2004 20:51:29 +0200 From: Christoph Hellwig To: netdev@oss.sgi.com Cc: wbrown338@netscape.net Subject: [wbrown338@netscape.net: 2.6 kernels not allowing eth0 connection] Message-ID: <20040814185129.GA28942@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: 7756 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 ----- Forwarded message from William Brown ----- Date: Sat, 14 Aug 2004 11:13:54 -0400 From: wbrown338@netscape.net (William Brown) Subject: 2.6 kernels not allowing eth0 connection To: debian-kernel@lists.debian.org X-Mailer: Atlas Mailer 2.0 Greetings: I have tried submitting a bug # #254962 through the debian bug reporting system but I don't think it made it to anybody. I was told by an old maintainer of the 2.6 kernel (Herbert Xu) to submitt the info here. The following is output from some system logs. Basically the eth0 connection won't work on any of the 2.6 kernel builds. It does work with the 2.4 kerneles: >From syslog: Aug 13 12:51:41 localhost kernel: irda_init() Aug 13 12:51:41 localhost kernel: NET: Registered protocol family 23 Aug 13 12:51:41 localhost kernel: 8139too Fast Ethernet driver 0.9.27 Aug 13 12:51:41 localhost kernel: eth0: RealTek RTL8139 at 0xc000, 00:0d:88:3b:a5:73, IRQ 10 Aug 13 12:51:41 localhost kernel: eth0: Identified 8139 chip type 'RTL-8100B/8139D' Aug 13 12:51:41 localhost kernel: via-rhine.c:v1.10-LK1.1.20-2.6 May-23-2004 Written by Donald Becker Aug 13 12:51:41 localhost kernel: eth1: VIA VT6102 Rhine-II at 0xec00, 00:d0:68:01:57:18, IRQ 11. Aug 13 12:51:41 localhost kernel: eth1: MII PHY found at address 1, status 0x7849 advertising 05e1 Link 0000. ... Aug 13 12:51:41 localhost kernel: NET: Registered protocol family 17 Aug 13 12:51:41 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 Aug 13 12:51:41 localhost kernel: NETDEV WATCHDOG: eth0: transmit timed out Aug 13 12:51:41 localhost kernel: eth0: Transmit timeout, status 0c 0005 c07f media 10. Aug 13 12:51:41 localhost kernel: eth0: Tx queue start entry 4 dirty entry 0. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 0 is 0008a24e. (queue head) Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 1 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 2 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 3 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 Aug 13 12:51:41 localhost kernel: NETDEV WATCHDOG: eth0: transmit timed out Aug 13 12:51:41 localhost kernel: eth0: Transmit timeout, status 0c 0005 c07f media 10. from debug: Aug 13 12:51:41 localhost kernel: eth0: Identified 8139 chip type 'RTL-8100B/8139D' Aug 13 12:51:41 localhost kernel: eth0: Transmit timeout, status 0c 0005 c07f media 10. Aug 13 12:51:41 localhost kernel: eth0: Tx queue start entry 4 dirty entry 0. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 0 is 0008a24e. (queue head) Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 1 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 2 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 3 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Transmit timeout, status 0c 0005 c07f media 10. Aug 13 12:51:41 localhost kernel: eth0: Tx queue start entry 4 dirty entry 0. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 0 is 0008a24e. (queue head) Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 1 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 2 is 0008a24e. Aug 13 12:51:41 localhost kernel: eth0: Tx descriptor 3 is 0008a24e. >From dmesg: NET: Registered protocol family 17 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 NETDEV WATCHDOG: eth0: transmit timed out eth0: Transmit timeout, status 0c 0005 c07f media 10. eth0: Tx queue start entry 4 dirty entry 0. eth0: Tx descriptor 0 is 0008a24e. (queue head) eth0: Tx descriptor 1 is 0008a24e. eth0: Tx descriptor 2 is 0008a24e. eth0: Tx descriptor 3 is 0008a24e. Does this look familiar to anyone? Thanks. Bill. __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp -- To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org ----- End forwarded message ----- From ptsjohol@cc.jyu.fi Sat Aug 14 11:58:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 11:58:54 -0700 (PDT) Received: from posti6.jyu.fi (posti6.jyu.fi [130.234.4.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EIwlpw012266 for ; Sat, 14 Aug 2004 11:58:48 -0700 Received: from silmu.st.jyu.fi (IDENT:LtcDrahFE7KNMtzJ2osZfAoTAwmsS9lE@silmu.st.jyu.fi [130.234.4.64]) by posti6.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i7EIwFob009890; Sat, 14 Aug 2004 21:58:15 +0300 Date: Sat, 14 Aug 2004 21:58:14 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Jeff Garzik , Andrew Morton , Hector Martin , OGAWA Hirofumi , Subject: Re: [PATCH 2.6.8-rc3-mm1 1/2] 8139too: Rx fifo/overflow recovery In-Reply-To: <20040812202853.GA22774@electric-eye.fr.zoreil.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti6.jyu.fi; Sat, 14 Aug 2004 21:58:20 +0300 X-archive-position: 7757 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev On Thu, 12 Aug 2004, Francois Romieu wrote: > Jeff Garzik : > [...] > > Both branches is fine. > > You'll quickly hit the RX-error-requiring-reset condition if you don't > > update on each packet, though. > M. Sjoholm, can you apply the attached patch below to a vanilla 2.6.8-rc4 > and report if the former bug reappears ? Hello Francois, I only tested 8139too-10.patch against vanilla 2.6.8.1 and it seems that the 8139too-driver is working ok. I tested it for three hours but I guess it's enough. =) -- Pasi Sjöholm From jurriaan@rivierenland.xs4all.nl Sat Aug 14 12:02:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 12:02:22 -0700 (PDT) Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EJ2FZ6012631 for ; Sat, 14 Aug 2004 12:02:16 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr6.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7EJ28wZ002181 for ; Sat, 14 Aug 2004 21:02:08 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 4476 invoked from network); 14 Aug 2004 19:01:46 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 14 Aug 2004 19:01:46 -0000 Received: (qmail 2220 invoked by uid 1000); 14 Aug 2004 19:01:40 -0000 Date: Sat, 14 Aug 2004 21:01:40 +0200 From: Jurriaan To: Francois Romieu Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040814190140.GA1954@middle.of.nowhere> Reply-To: Jurriaan References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> <20040814161039.GA1985@middle.of.nowhere> <20040814172835.GA23427@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814172835.GA23427@electric-eye.fr.zoreil.com> X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040803i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 7758 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev From: Francois Romieu Date: Sat, Aug 14, 2004 at 07:28:35PM +0200 > Jurriaan : > [...] > > Never mind, it seems my patch was saved incorrectly. Anyway, after > > applying this patch my network-traffic is as fast as it ever was. > > > > There's no difference in dmesg-output, but I reach 450-460 KiB/s again. > > Ok. So Jeff was right (TM). > > > If there's anything else I can test, please let me know - I gather the > > update did work for other people, so if testers are wanted I'm > > available. > > Can you apply 8139too-10.patch + 8139too-20.patch on top of your working > config (namely 2.6.8-rc4-mm1 + 8139too-mm-revert.patch) and tell if things > go wrong ? > Indeed they do. Both with -10 and with -10+-20 added on my working 2.6.8-rc4-mm1 the booting process hangs somewhere while iptables is installing my ipv6 firewall. This is reproducable, I've not tried to install my firewall by hand after booting (call me paranoid). Thus: 2.6.8-rc4-mm1: boots, slow network 2.6.8-rc4-mm1 + 8139too-mm-revert: boots, fast network 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10: doesn't boot 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10 + 8139too-20: doesn't boot Good luck, Jurriaan -- Linux hackers are funny people: They count the time in patchlevels. Gerd Knorr Debian (Unstable) GNU/Linux 2.6.8-rc4-mm1 2x6078 bogomips load 0.01 From mrenzmann@web.de Sat Aug 14 12:12:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 12:12:25 -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 i7EJCImX013177 for ; Sat, 14 Aug 2004 12:12:19 -0700 Received: from xdsl-195-14-201-22.netcologne.de ([195.14.201.22] helo=web.de) by smtp08.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.101 #44) id 1Bw3wl-0007iS-00 for netdev@oss.sgi.com; Sat, 14 Aug 2004 21:12:07 +0200 Message-ID: <411E642C.9010708@web.de> Date: Sat, 14 Aug 2004 21:12:44 +0200 From: Michael Renzmann User-Agent: Mozilla Thunderbird 0.5 (X11/20040304) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Deleting incoming network packets / sk_buff Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Sender: mrenzmann@web.de X-archive-position: 7759 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 Hi all. I'm just making my first steps in kernel programming, and I have a few questions. It's necessary for me to "delete" network packets that come in on a ethernet device after passing them to an userspace program (through a packet socket that the program has opened). My first idea was to write a kernel module that registers on the NF_IP_PRE_ROUTING netfilter hook and does its job. But there are two downsides on this approach: 1. I need to delete every packet, no matter if it is IP or something else. As far as I understood only IP-packets will pass the netfilter hooks, since the netfilter framework only works with IP traffic. 2. The solution also has to work for 2.2.x kernels, as long as there is any way to achieve this functionality for these kernel series and 2.4.x as well. I continued to dig some documentation, and found a possible solution in a rather old phrack article [1]: "What we do is code our own kernel module that registers our packet_type{} data structure to handle all incoming packets (sk_buff's) right after they come out of the device driver." While the authors use this technique to implement some "protocol obfuscation" or an in-kernel packet sniffer, it seems to be a good way to reach what I want to do. Now, what I'm wondering about is the way to "correctly" remove an sk_buff so that the upper layer won't see the corresponding packet. I somewhere read that the code for packet sockets have to clone the sk_buff before passing it to the socket, else it would be "lost" and could not be seen by following handlers. So, the questions I have: 1. What has to be done to delete a bypassing sk_buff, so that upper layer routines don't see it? 2. How can it be achieved to pass a sk_buff to opened packet sockets before deleting the sk_buff? I guess the handler either has to pass the sk_buff "manually" to the packet socket handler packet_rcv() or has to place itself to be called directly after packet_rcv() has been called. I hope that my description can be understood - not enough that I'm not very keen with kernel programming, but I also am no native english speaker... :) Please let me know if you need further information to clarify. Bye, Mike [1] http://www.phrack.org/show.php?p=55&a=12 From herbert@gondor.apana.org.au Sat Aug 14 12:24:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 12:24:42 -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 i7EJOXmE016807 for ; Sat, 14 Aug 2004 12:24:34 -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 1Bw48V-00085M-00; Sun, 15 Aug 2004 05:24:15 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bw48S-0006MR-00; Sun, 15 Aug 2004 05:24:12 +1000 Date: Sun, 15 Aug 2004 05:24:12 +1000 To: James Morris Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [ESP] Only one algorithm is required Message-ID: <20040814192412.GA24399@gondor.apana.org.au> References: <20040814105245.GA20646@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+20040523i From: Herbert Xu X-archive-position: 7760 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 Sat, Aug 14, 2004 at 10:16:17AM -0400, James Morris wrote: > On Sat, 14 Aug 2004, Herbert Xu wrote: > > > Both encryption and authentication are optional for ESP. However, at > > least one of them must be present. The following patch changes init_state > > to match that specification. > > This is userland level policy and I don't think the kernel should be > enforcing this. We should remove the ealg check altogether 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 romieu@fr.zoreil.com Sat Aug 14 12:28:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 12:28:29 -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 i7EJSKVv017154 for ; Sat, 14 Aug 2004 12:28: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 i7EJReu5025032; Sat, 14 Aug 2004 21:27:40 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7EJReMC025031; Sat, 14 Aug 2004 21:27:40 +0200 Date: Sat, 14 Aug 2004 21:27:40 +0200 From: Francois Romieu To: Jurriaan Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040814192740.GB23427@electric-eye.fr.zoreil.com> References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> <20040814161039.GA1985@middle.of.nowhere> <20040814172835.GA23427@electric-eye.fr.zoreil.com> <20040814190140.GA1954@middle.of.nowhere> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <20040814190140.GA1954@middle.of.nowhere> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7761 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 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Jurriaan : [...] > Indeed they do. Both with -10 and with -10+-20 added on my working > 2.6.8-rc4-mm1 the booting process hangs somewhere while iptables is > installing my ipv6 firewall. This is reproducable, I've not tried to > install my firewall by hand after booting (call me paranoid). > > Thus: > > 2.6.8-rc4-mm1: boots, slow network > 2.6.8-rc4-mm1 + 8139too-mm-revert: boots, fast network > 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10: doesn't boot > 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10 + 8139too-20: doesn't boot Thanks. Erm... not exactly what I had expected. Could you return to 2.6.8-rc4-mm1 + 8139too-mm-revert.patch and try each of the three patches attached ? I.e.: - apply patch #1 - boot test (success/crash) - revert patch #1 - apply patch #2 - boot test (success/crash) - revert patch #2 - apply patch #3 - boot test (success/crash) - revert patch #3 -- Ueimor --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8139-a.patch" This patch allows to update the interrupt status register after an Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. The update must be kept in the packet processing loop to prevent an Rx error storm. Signed-off-by: Francois Romieu drivers/net/8139too.c | 45 ++++++++++++++++++++++++++++++--------------- 1 files changed, 30 insertions(+), 15 deletions(-) diff -puN drivers/net/8139too.c~8139too-10 drivers/net/8139too.c --- linux-2.6.8-rc4/drivers/net/8139too.c~8139too-10 2004-08-12 21:37:18.000000000 +0200 +++ linux-2.6.8-rc4-fr/drivers/net/8139too.c 2004-08-12 22:10:21.000000000 +0200 @@ -1927,6 +1927,23 @@ static __inline__ void wrap_copy(struct } #endif +static void rtl8139_isr_ack(struct rtl8139_private *tp, u16 status) +{ + void *ioaddr = tp->mmio_addr; + + status = RTL_R16 (IntrStatus) & RxAckBits; + + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; + } + RTL_W16_F (IntrStatus, RxAckBits); + } +} + static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { @@ -1934,20 +1951,22 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + unsigned int rx_size = 0; + u16 status = 0; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); + // status = RTL_R16 (IntrStatus); + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; - unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1996,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +2008,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2025,19 +2045,13 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); - } + rtl8139_isr_ack(tp, status); + + status = RTL_R16 (IntrStatus); } - done: + if (unlikely(!received || rx_size == 0xfff0)) + rtl8139_isr_ack(tp, status); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2047,6 +2061,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8139-b.patch" This patch allows to update the interrupt status register after an Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. The update must be kept in the packet processing loop to prevent an Rx error storm. Signed-off-by: Francois Romieu drivers/net/8139too.c | 45 ++++++++++++++++++++++++++++++--------------- 1 files changed, 30 insertions(+), 15 deletions(-) diff -puN drivers/net/8139too.c~8139too-10 drivers/net/8139too.c --- linux-2.6.8-rc4/drivers/net/8139too.c~8139too-10 2004-08-12 21:37:18.000000000 +0200 +++ linux-2.6.8-rc4-fr/drivers/net/8139too.c 2004-08-12 22:10:21.000000000 +0200 @@ -1927,6 +1927,23 @@ static __inline__ void wrap_copy(struct } #endif +static void rtl8139_isr_ack(struct rtl8139_private *tp, u16 status) +{ + void *ioaddr = tp->mmio_addr; + + status &= RxAckBits; + + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; + } + RTL_W16_F (IntrStatus, RxAckBits); + } +} + static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { @@ -1934,20 +1951,22 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + unsigned int rx_size = 0; + u16 status; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); + status = RTL_R16 (IntrStatus); + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; - unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1996,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +2008,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2025,19 +2045,13 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); - } + rtl8139_isr_ack(tp, status); + + status = RTL_R16 (IntrStatus); } - done: + if (0) + rtl8139_isr_ack(tp, status); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2047,6 +2061,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8139-c.patch" This patch allows to update the interrupt status register after an Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. The update must be kept in the packet processing loop to prevent an Rx error storm. Signed-off-by: Francois Romieu drivers/net/8139too.c | 45 ++++++++++++++++++++++++++++++--------------- 1 files changed, 30 insertions(+), 15 deletions(-) diff -puN drivers/net/8139too.c~8139too-10 drivers/net/8139too.c --- linux-2.6.8-rc4/drivers/net/8139too.c~8139too-10 2004-08-12 21:37:18.000000000 +0200 +++ linux-2.6.8-rc4-fr/drivers/net/8139too.c 2004-08-12 22:10:21.000000000 +0200 @@ -1927,6 +1927,23 @@ static __inline__ void wrap_copy(struct } #endif +static void rtl8139_isr_ack(struct rtl8139_private *tp, u16 status) +{ + void *ioaddr = tp->mmio_addr; + + status = RTL_R16 (IntrStatus) & RxAckBits; + + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; + } + RTL_W16_F (IntrStatus, RxAckBits); + } +} + static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { @@ -1934,20 +1951,22 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + unsigned int rx_size = 0; + u16 status = 0; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); + // status = RTL_R16 (IntrStatus); + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; - unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1996,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +2008,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2025,19 +2045,13 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); - } + rtl8139_isr_ack(tp, status); + + status = RTL_R16 (IntrStatus); } - done: + if (0) + rtl8139_isr_ack(tp, status); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2047,6 +2061,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ --gKMricLos+KVdGMg-- From mcgrof@studorgs.rutgers.edu Sat Aug 14 12:41:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 12:41:25 -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 i7EJfKaS017626 for ; Sat, 14 Aug 2004 12:41:20 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 01BB9F99BD; Sat, 14 Aug 2004 15:41:14 -0400 (EDT) Date: Sat, 14 Aug 2004 15:41:14 -0400 To: Denis Vlasenko , "Luis R. Rodriguez" , prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: cvs commit'ed Message-ID: <20040814194114.GJ2050@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , "Luis R. Rodriguez" , prism54-devel@prism54.org, netdev@oss.sgi.com References: <200408101824.28368.vda@port.imtp.ilyichevsk.odessa.ua> <20040811002844.GH26262@ruslug.rutgers.edu> <20040811005346.GK26262@ruslug.rutgers.edu> <200408141922.42792.vda@port.imtp.ilyichevsk.odessa.ua> <20040814183712.GH2050@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814183712.GH2050@ruslug.rutgers.edu> 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: 7762 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, Aug 14, 2004 at 02:37:12PM -0400, Luis R. Rodriguez wrote: > On Sat, Aug 14, 2004 at 07:22:42PM +0300, Denis Vlasenko wrote: > > On Wednesday 11 August 2004 03:53, Luis R. Rodriguez wrote: > > > Denis, > > > > > > Actually you have CVS access to prism54, if no one complains about these > > > patches (and I think no one will as they are trivial), just go ahead and > > > commit these changes yourself. Please remember to update the ChangeLog too. > > > > > > After your changes go through I plan on starting to integrate the wpa work > > > I have (it can't wait any longer). > > > > I did it. You may want to check whether cvs is still ok, > > it was the first time I ever used cvs ;] > > Heh, I'm sure its fine. BTW I'd like us to move to subversion to use the > concepts of patchsets. I think this will help us keep our tree and the > kernel tree in sync. I just checked to make sure and CVS rep is fine. The updates weren't going through to generate patches published online since the latest kernel was just released -- 2.6.8. I DLed, and now patches are going through. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From herbert@gondor.apana.org.au Sat Aug 14 12:56:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 12:57: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 i7EJusPW018155 for ; Sat, 14 Aug 2004 12:56: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 1Bw4du-0008Vr-00; Sun, 15 Aug 2004 05:56:43 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bw4dr-0006Vi-00; Sun, 15 Aug 2004 05:56:39 +1000 Date: Sun, 15 Aug 2004 05:56:39 +1000 To: James Morris Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [ESP] Only one algorithm is required Message-ID: <20040814195639.GA25009@gondor.apana.org.au> References: <20040814105245.GA20646@gondor.apana.org.au> <20040814192412.GA24399@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <20040814192412.GA24399@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7763 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 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 15, 2004 at 05:24:12AM +1000, herbert wrote: > > > This is userland level policy and I don't think the kernel should be > > enforcing this. > > We should remove the ealg check altogether then? Please disregard the esp alg check patch altogether. It's comletely bogus. The way to get null algorithms through is to attach a non-null algorithm with the name set to cipher_null/digest_null. However, we should fix IPv6 to allow null authentication algorithms. 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 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv6/esp6.c 1.36 vs edited ===== --- 1.36/net/ipv6/esp6.c 2004-08-12 19:59:52 +10:00 +++ edited/net/ipv6/esp6.c 2004-08-15 05:54:35 +10:00 @@ -302,8 +302,9 @@ { struct esp_data *esp = NULL; + /* null auth and encryption can have zero length keys */ if (x->aalg) { - if (x->aalg->alg_key_len == 0 || x->aalg->alg_key_len > 512) + if (x->aalg->alg_key_len > 512) goto error; } if (x->ealg == NULL) --k+w/mQv8wyuph6w0-- From kaber@trash.net Sat Aug 14 13:00:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:00:26 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK0LpG018529 for ; Sat, 14 Aug 2004 13:00:22 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id DEBF419F33C; Sat, 14 Aug 2004 22:00:10 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id F0D8C394133; Sat, 14 Aug 2004 22:00:09 +0200 (CEST) Message-ID: <411E6F49.9030303@trash.net> Date: Sat, 14 Aug 2004 22:00:09 +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, devik , jamal Subject: [PATCH 0/4]: Scalable HFSC Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7764 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 These 4 patches for 2.4/2.6 make HFSC more scalable by using rbtree's instead of sorted lists and an O(1) algorithm for adjusting childrens vt-offset. With these patches HFSC with 1024 active sibling classes performs only slightly worse (CPU-wise) than HTB. Each change has been well tested in tcsim, so I think nothing should break. Regards Patrick From kaber@trash.net Sat Aug 14 13:00:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:00:34 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK0Qn8018530 for ; Sat, 14 Aug 2004 13:00:26 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 6736019F34F; Sat, 14 Aug 2004 22:00:15 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id BEC61394133; Sat, 14 Aug 2004 22:00:14 +0200 (CEST) Message-ID: <411E6F4E.6010705@trash.net> Date: Sat, 14 Aug 2004 22:00:14 +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, devik , jamal Subject: [PATCH 2.6 1/4]: Add rb_last() Content-Type: multipart/mixed; boundary="------------000107040408030403080905" X-archive-position: 7765 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 This is a multi-part message in MIME format. --------------000107040408030403080905 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds rb_last which returns the last element in sort-order from a rbtree. --------------000107040408030403080905 Content-Type: text/x-patch; name="01-hfsc-2.6.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-hfsc-2.6.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:09:51+02:00 kaber@coreworks.de # [RBTREE]: Add rb_last() # # Signed-off-by: Patrick McHardy # # lib/rbtree.c # 2004/08/11 23:09:34+02:00 kaber@coreworks.de +13 -0 # [RBTREE]: Add rb_last() # # include/linux/rbtree.h # 2004/08/11 23:09:34+02:00 kaber@coreworks.de +1 -0 # [RBTREE]: Add rb_last() # diff -Nru a/include/linux/rbtree.h b/include/linux/rbtree.h --- a/include/linux/rbtree.h 2004-08-12 23:25:04 +02:00 +++ b/include/linux/rbtree.h 2004-08-12 23:25:04 +02:00 @@ -123,6 +123,7 @@ extern struct rb_node *rb_next(struct rb_node *); extern struct rb_node *rb_prev(struct rb_node *); extern struct rb_node *rb_first(struct rb_root *); +extern struct rb_node *rb_last(struct rb_root *); /* Fast replacement of a single node without remove/rebalance/add/rebalance */ extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, diff -Nru a/lib/rbtree.c b/lib/rbtree.c --- a/lib/rbtree.c 2004-08-12 23:25:04 +02:00 +++ b/lib/rbtree.c 2004-08-12 23:25:04 +02:00 @@ -312,6 +312,19 @@ } EXPORT_SYMBOL(rb_first); +struct rb_node *rb_last(struct rb_root *root) +{ + struct rb_node *n; + + n = root->rb_node; + if (!n) + return NULL; + while (n->rb_right) + n = n->rb_right; + return n; +} +EXPORT_SYMBOL(rb_last); + struct rb_node *rb_next(struct rb_node *node) { /* If we have a right-hand child, go down and then left as far --------------000107040408030403080905-- From kaber@trash.net Sat Aug 14 13:00:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:00:44 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK0aif018583 for ; Sat, 14 Aug 2004 13:00:37 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 27CD319F353; Sat, 14 Aug 2004 22:00:26 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 7609A394133; Sat, 14 Aug 2004 22:00:25 +0200 (CEST) Message-ID: <411E6F59.6090100@trash.net> Date: Sat, 14 Aug 2004 22:00: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: "David S. Miller" Cc: netdev@oss.sgi.com, devik , jamal Subject: [PATCH 2.6 2/4]: replace eligible list by rbtree Content-Type: multipart/mixed; boundary="------------040603000804030209050006" X-archive-position: 7766 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 This is a multi-part message in MIME format. --------------040603000804030209050006 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch replaces the eligible list by a rbtree. --------------040603000804030209050006 Content-Type: text/x-patch; name="02-hfsc-2.6.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02-hfsc-2.6.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:14:57+02:00 kaber@coreworks.de # [NET_SCHED]: Replace eligible list by rbtree in HFSC scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_hfsc.c # 2004/08/11 23:14:39+02:00 kaber@coreworks.de +42 -69 # [NET_SCHED]: Replace eligible list by rbtree in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-12 23:25:23 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-12 23:25:23 +02:00 @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -133,9 +134,9 @@ struct list_head children; /* child classes */ struct Qdisc *qdisc; /* leaf qdisc */ + struct rb_node el_node; /* qdisc's eligible tree member */ struct list_head actlist; /* active children list */ struct list_head alist; /* active children list member */ - struct list_head ellist; /* eligible list member */ struct list_head hlist; /* hash list member */ struct list_head dlist; /* drop list member */ @@ -183,7 +184,7 @@ u16 defcls; /* default class id */ struct hfsc_class root; /* root class */ struct list_head clhash[HFSC_HSIZE]; /* class hash */ - struct list_head eligible; /* eligible list */ + struct rb_root eligible; /* eligible tree */ struct list_head droplist; /* active leaf class list (for dropping) */ struct sk_buff_head requeue; /* requeued packet */ @@ -219,82 +220,51 @@ /* - * eligible list holds backlogged classes being sorted by their eligible times. - * there is one eligible list per hfsc instance. + * eligible tree holds backlogged classes being sorted by their eligible times. + * there is one eligible tree per hfsc instance. */ static void -ellist_insert(struct hfsc_class *cl) +eltree_insert(struct hfsc_class *cl) { - struct list_head *head = &cl->sched->eligible; - struct hfsc_class *p; - - /* check the last entry first */ - if (list_empty(head) || - ((p = list_entry(head->prev, struct hfsc_class, ellist)) && - p->cl_e <= cl->cl_e)) { - list_add_tail(&cl->ellist, head); - return; - } - - list_for_each_entry(p, head, ellist) { - if (cl->cl_e < p->cl_e) { - /* insert cl before p */ - list_add_tail(&cl->ellist, &p->ellist); - return; - } + struct rb_node **p = &cl->sched->eligible.rb_node; + struct rb_node *parent = NULL; + struct hfsc_class *cl1; + + while (*p != NULL) { + parent = *p; + cl1 = rb_entry(parent, struct hfsc_class, el_node); + if (cl->cl_e >= cl1->cl_e) + p = &parent->rb_right; + else + p = &parent->rb_left; } - ASSERT(0); /* should not reach here */ + rb_link_node(&cl->el_node, parent, p); + rb_insert_color(&cl->el_node, &cl->sched->eligible); } static inline void -ellist_remove(struct hfsc_class *cl) +eltree_remove(struct hfsc_class *cl) { - list_del(&cl->ellist); + rb_erase(&cl->el_node, &cl->sched->eligible); } -static void -ellist_update(struct hfsc_class *cl) +static inline void +eltree_update(struct hfsc_class *cl) { - struct list_head *head = &cl->sched->eligible; - struct hfsc_class *p, *last; - - /* - * the eligible time of a class increases monotonically. - * if the next entry has a larger eligible time, nothing to do. - */ - if (cl->ellist.next == head || - ((p = list_entry(cl->ellist.next, struct hfsc_class, ellist)) && - cl->cl_e <= p->cl_e)) - return; - - /* check the last entry */ - last = list_entry(head->prev, struct hfsc_class, ellist); - if (last->cl_e <= cl->cl_e) { - list_move_tail(&cl->ellist, head); - return; - } - - /* - * the new position must be between the next entry - * and the last entry - */ - list_for_each_entry_continue(p, head, ellist) { - if (cl->cl_e < p->cl_e) { - list_move_tail(&cl->ellist, &p->ellist); - return; - } - } - ASSERT(0); /* should not reach here */ + eltree_remove(cl); + eltree_insert(cl); } /* find the class with the minimum deadline among the eligible classes */ static inline struct hfsc_class * -ellist_get_mindl(struct list_head *head, u64 cur_time) +eltree_get_mindl(struct hfsc_sched *q, u64 cur_time) { struct hfsc_class *p, *cl = NULL; + struct rb_node *n; - list_for_each_entry(p, head, ellist) { + for (n = rb_first(&q->eligible); n != NULL; n = rb_next(n)) { + p = rb_entry(n, struct hfsc_class, el_node); if (p->cl_e > cur_time) break; if (cl == NULL || p->cl_d < cl->cl_d) @@ -305,11 +275,14 @@ /* find the class with minimum eligible time among the eligible classes */ static inline struct hfsc_class * -ellist_get_minel(struct list_head *head) +eltree_get_minel(struct hfsc_sched *q) { - if (list_empty(head)) + struct rb_node *n; + + n = rb_first(&q->eligible); + if (n == NULL) return NULL; - return list_entry(head->next, struct hfsc_class, ellist); + return rb_entry(n, struct hfsc_class, el_node); } /* @@ -711,7 +684,7 @@ cl->cl_e = rtsc_y2x(&cl->cl_eligible, cl->cl_cumul); cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); - ellist_insert(cl); + eltree_insert(cl); } static void @@ -720,7 +693,7 @@ cl->cl_e = rtsc_y2x(&cl->cl_eligible, cl->cl_cumul); cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); - ellist_update(cl); + eltree_update(cl); } static inline void @@ -941,7 +914,7 @@ set_passive(struct hfsc_class *cl) { if (cl->cl_flags & HFSC_RSC) - ellist_remove(cl); + eltree_remove(cl); list_del(&cl->dlist); @@ -1528,7 +1501,7 @@ u64 next_time = 0; long delay; - if ((cl = ellist_get_minel(&q->eligible)) != NULL) + if ((cl = eltree_get_minel(q)) != NULL) next_time = cl->cl_e; if (q->root.cl_cfmin != 0) { if (next_time == 0 || next_time > q->root.cl_cfmin) @@ -1559,7 +1532,7 @@ q->defcls = qopt->defcls; for (i = 0; i < HFSC_HSIZE; i++) INIT_LIST_HEAD(&q->clhash[i]); - INIT_LIST_HEAD(&q->eligible); + q->eligible = RB_ROOT; INIT_LIST_HEAD(&q->droplist); skb_queue_head_init(&q->requeue); @@ -1641,7 +1614,7 @@ hfsc_reset_class(cl); } __skb_queue_purge(&q->requeue); - INIT_LIST_HEAD(&q->eligible); + q->eligible = RB_ROOT; INIT_LIST_HEAD(&q->droplist); del_timer(&q->wd_timer); sch->flags &= ~TCQ_F_THROTTLED; @@ -1749,7 +1722,7 @@ * find the class with the minimum deadline among * the eligible classes. */ - if ((cl = ellist_get_mindl(&q->eligible, cur_time)) != NULL) { + if ((cl = eltree_get_mindl(q, cur_time)) != NULL) { realtime = 1; } else { /* --------------040603000804030209050006-- From kaber@trash.net Sat Aug 14 13:00:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:01:02 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK0r31018866 for ; Sat, 14 Aug 2004 13:00:54 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 427B319F354; Sat, 14 Aug 2004 22:00:43 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 8C3A3394133; Sat, 14 Aug 2004 22:00:42 +0200 (CEST) Message-ID: <411E6F69.4020102@trash.net> Date: Sat, 14 Aug 2004 22:00:41 +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, devik , jamal Subject: [PATCH 2.6 3/4]: replace actlist by rbtrees Content-Type: multipart/mixed; boundary="------------040100090103030503040005" X-archive-position: 7767 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 This is a multi-part message in MIME format. --------------040100090103030503040005 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch replaces actlist by two rbtrees: vt_tree, sorted by virtual time and cf_tree, sorted by fit-time. --------------040100090103030503040005 Content-Type: text/x-patch; name="03-hfsc-2.6.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="03-hfsc-2.6.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:22:32+02:00 kaber@coreworks.de # [NET_SCHED]: Replace actlist by rbtrees in HFSC scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_hfsc.c # 2004/08/11 23:22:08+02:00 kaber@coreworks.de +92 -90 # [NET_SCHED]: Replace actlist by rbtrees in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-12 23:25:39 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-12 23:25:39 +02:00 @@ -135,8 +135,10 @@ struct Qdisc *qdisc; /* leaf qdisc */ struct rb_node el_node; /* qdisc's eligible tree member */ - struct list_head actlist; /* active children list */ - struct list_head alist; /* active children list member */ + struct rb_root vt_tree; /* active children sorted by cl_vt */ + struct rb_node vt_node; /* parent's vt_tree member */ + struct rb_root cf_tree; /* active children sorted by cl_f */ + struct rb_node cf_node; /* parent's cf_heap member */ struct list_head hlist; /* hash list member */ struct list_head dlist; /* drop list member */ @@ -286,84 +288,51 @@ } /* - * active children list holds backlogged child classes being sorted - * by their virtual time. each intermediate class has one active - * children list. + * vttree holds holds backlogged child classes being sorted by their virtual + * time. each intermediate class has one vttree. */ static void -actlist_insert(struct hfsc_class *cl) +vttree_insert(struct hfsc_class *cl) { - struct list_head *head = &cl->cl_parent->actlist; - struct hfsc_class *p; - - /* check the last entry first */ - if (list_empty(head) || - ((p = list_entry(head->prev, struct hfsc_class, alist)) && - p->cl_vt <= cl->cl_vt)) { - list_add_tail(&cl->alist, head); - return; - } + struct rb_node **p = &cl->cl_parent->vt_tree.rb_node; + struct rb_node *parent = NULL; + struct hfsc_class *cl1; - list_for_each_entry(p, head, alist) { - if (cl->cl_vt < p->cl_vt) { - /* insert cl before p */ - list_add_tail(&cl->alist, &p->alist); - return; - } + while (*p != NULL) { + parent = *p; + cl1 = rb_entry(parent, struct hfsc_class, vt_node); + if (cl->cl_vt >= cl1->cl_vt) + p = &parent->rb_right; + else + p = &parent->rb_left; } - ASSERT(0); /* should not reach here */ + rb_link_node(&cl->vt_node, parent, p); + rb_insert_color(&cl->vt_node, &cl->cl_parent->vt_tree); } static inline void -actlist_remove(struct hfsc_class *cl) +vttree_remove(struct hfsc_class *cl) { - list_del(&cl->alist); + rb_erase(&cl->vt_node, &cl->cl_parent->vt_tree); } -static void -actlist_update(struct hfsc_class *cl) +static inline void +vttree_update(struct hfsc_class *cl) { - struct list_head *head = &cl->cl_parent->actlist; - struct hfsc_class *p, *last; - - /* - * the virtual time of a class increases monotonically. - * if the next entry has a larger virtual time, nothing to do. - */ - if (cl->alist.next == head || - ((p = list_entry(cl->alist.next, struct hfsc_class, alist)) && - cl->cl_vt <= p->cl_vt)) - return; - - /* check the last entry */ - last = list_entry(head->prev, struct hfsc_class, alist); - if (last->cl_vt <= cl->cl_vt) { - list_move_tail(&cl->alist, head); - return; - } - - /* - * the new position must be between the next entry - * and the last entry - */ - list_for_each_entry_continue(p, head, alist) { - if (cl->cl_vt < p->cl_vt) { - list_move_tail(&cl->alist, &p->alist); - return; - } - } - ASSERT(0); /* should not reach here */ + vttree_remove(cl); + vttree_insert(cl); } static inline struct hfsc_class * -actlist_firstfit(struct hfsc_class *cl, u64 cur_time) +vttree_firstfit(struct hfsc_class *cl, u64 cur_time) { struct hfsc_class *p; + struct rb_node *n; - list_for_each_entry(p, &cl->actlist, alist) { - if (p->cl_f <= cur_time) { + for (n = rb_first(&cl->vt_tree); n != NULL; n = rb_next(n)) { + p = rb_entry(n, struct hfsc_class, vt_node); + if (p->cl_f <= cur_time) return p; - } } return NULL; } @@ -372,14 +341,14 @@ * get the leaf class with the minimum vt in the hierarchy */ static struct hfsc_class * -actlist_get_minvt(struct hfsc_class *cl, u64 cur_time) +vttree_get_minvt(struct hfsc_class *cl, u64 cur_time) { /* if root-class's cfmin is bigger than cur_time nothing to do */ if (cl->cl_cfmin > cur_time) return NULL; while (cl->level > 0) { - cl = actlist_firstfit(cl, cur_time); + cl = vttree_firstfit(cl, cur_time); if (cl == NULL) return NULL; /* @@ -391,6 +360,38 @@ return cl; } +static void +cftree_insert(struct hfsc_class *cl) +{ + struct rb_node **p = &cl->cl_parent->cf_tree.rb_node; + struct rb_node *parent = NULL; + struct hfsc_class *cl1; + + while (*p != NULL) { + parent = *p; + cl1 = rb_entry(parent, struct hfsc_class, cf_node); + if (cl->cl_f >= cl1->cl_f) + p = &parent->rb_right; + else + p = &parent->rb_left; + } + rb_link_node(&cl->cf_node, parent, p); + rb_insert_color(&cl->cf_node, &cl->cl_parent->cf_tree); +} + +static inline void +cftree_remove(struct hfsc_class *cl) +{ + rb_erase(&cl->cf_node, &cl->cl_parent->cf_tree); +} + +static inline void +cftree_update(struct hfsc_class *cl) +{ + cftree_remove(cl); + cftree_insert(cl); +} + /* * service curve support functions * @@ -702,32 +703,25 @@ cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); } -static void +static inline void update_cfmin(struct hfsc_class *cl) { + struct rb_node *n = rb_first(&cl->cf_tree); struct hfsc_class *p; - u64 cfmin; - if (list_empty(&cl->actlist)) { + if (n == NULL) { cl->cl_cfmin = 0; return; } - cfmin = HT_INFINITY; - list_for_each_entry(p, &cl->actlist, alist) { - if (p->cl_f == 0) { - cl->cl_cfmin = 0; - return; - } - if (p->cl_f < cfmin) - cfmin = p->cl_f; - } - cl->cl_cfmin = cfmin; + p = rb_entry(n, struct hfsc_class, cf_node); + cl->cl_cfmin = p->cl_f; } static void init_vf(struct hfsc_class *cl, unsigned int len) { struct hfsc_class *max_cl, *p; + struct rb_node *n; u64 vt, f, cur_time; int go_active; @@ -740,9 +734,9 @@ go_active = 0; if (go_active) { - if (!list_empty(&cl->cl_parent->actlist)) { - max_cl = list_entry(cl->cl_parent->actlist.prev, - struct hfsc_class, alist); + n = rb_last(&cl->cl_parent->vt_tree); + if (n != NULL) { + max_cl = rb_entry(n, struct hfsc_class,vt_node); /* * set vt to the average of the min and max * classes. if the parent's period didn't @@ -787,7 +781,8 @@ cl->cl_parentperiod++; cl->cl_f = 0; - actlist_insert(cl); + vttree_insert(cl); + cftree_insert(cl); if (cl->cl_flags & HFSC_USC) { /* class has upper limit curve */ @@ -807,6 +802,7 @@ f = max(cl->cl_myf, cl->cl_cfmin); if (f != cl->cl_f) { cl->cl_f = f; + cftree_update(cl); update_cfmin(cl->cl_parent); } } @@ -839,9 +835,10 @@ if (cl->cl_vt > cl->cl_parent->cl_cvtmax) cl->cl_parent->cl_cvtmax = cl->cl_vt; - /* remove this class from the vt list */ - actlist_remove(cl); + /* remove this class from the vt tree */ + vttree_remove(cl); + cftree_remove(cl); update_cfmin(cl->cl_parent); continue; @@ -863,8 +860,8 @@ cl->cl_vt = cl->cl_parent->cl_cvtmin; } - /* update the vt list */ - actlist_update(cl); + /* update the vt tree */ + vttree_update(cl); if (cl->cl_flags & HFSC_USC) { cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit, @@ -894,6 +891,7 @@ f = max(cl->cl_myf, cl->cl_cfmin); if (f != cl->cl_f) { cl->cl_f = f; + cftree_update(cl); update_cfmin(cl->cl_parent); } } @@ -919,8 +917,8 @@ list_del(&cl->dlist); /* - * actlist is now handled in update_vf() so that update_vf(cl, 0, 0) - * needs to be called explicitly to remove a class from actlist + * vttree is now handled in update_vf() so that update_vf(cl, 0, 0) + * needs to be called explicitly to remove a class from vttree. */ } @@ -1144,7 +1142,8 @@ cl->qdisc = &noop_qdisc; cl->stats_lock = &sch->dev->queue_lock; INIT_LIST_HEAD(&cl->children); - INIT_LIST_HEAD(&cl->actlist); + cl->vt_tree = RB_ROOT; + cl->cf_tree = RB_ROOT; sch_tree_lock(sch); list_add_tail(&cl->hlist, &q->clhash[hfsc_hash(classid)]); @@ -1544,7 +1543,8 @@ q->root.qdisc = &noop_qdisc; q->root.stats_lock = &sch->dev->queue_lock; INIT_LIST_HEAD(&q->root.children); - INIT_LIST_HEAD(&q->root.actlist); + q->root.vt_tree = RB_ROOT; + q->root.cf_tree = RB_ROOT; list_add(&q->root.hlist, &q->clhash[hfsc_hash(q->root.classid)]); @@ -1591,7 +1591,9 @@ cl->cl_myfadj = 0; cl->cl_cfmin = 0; cl->cl_nactive = 0; - INIT_LIST_HEAD(&cl->actlist); + + cl->vt_tree = RB_ROOT; + cl->cf_tree = RB_ROOT; qdisc_reset(cl->qdisc); if (cl->cl_flags & HFSC_RSC) @@ -1729,7 +1731,7 @@ * use link-sharing criteria * get the class with the minimum vt in the hierarchy */ - cl = actlist_get_minvt(&q->root, cur_time); + cl = vttree_get_minvt(&q->root, cur_time); if (cl == NULL) { sch->stats.overlimits++; hfsc_schedule_watchdog(sch, cur_time); --------------040100090103030503040005-- From kaber@trash.net Sat Aug 14 13:01:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:01:11 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK12Vr019069 for ; Sat, 14 Aug 2004 13:01:03 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 4EBAB19F33C; Sat, 14 Aug 2004 22:00:52 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id AA588394133; Sat, 14 Aug 2004 22:00:51 +0200 (CEST) Message-ID: <411E6F73.2010107@trash.net> Date: Sat, 14 Aug 2004 22:00: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: "David S. Miller" Cc: netdev@oss.sgi.com, devik , jamal Subject: [PATCH 2.6 4/4]: O(1) children vtoff adjustment Content-Type: multipart/mixed; boundary="------------070602050008090103010707" X-archive-position: 7768 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 This is a multi-part message in MIME format. --------------070602050008090103010707 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patches replaces the O(n) algorithm for children vtoff adjustment by a O(1) variant. --------------070602050008090103010707 Content-Type: text/x-patch; name="04-hfsc-2.6.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="04-hfsc-2.6.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:24:31+02:00 kaber@coreworks.de # [NET_SCHED]: O(1) children vtoff adjustment in HFSC scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_hfsc.c # 2004/08/11 23:24:14+02:00 kaber@coreworks.de +15 -8 # [NET_SCHED]: O(1) children vtoff adjustment in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-12 23:25:53 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-12 23:25:53 +02:00 @@ -164,6 +164,9 @@ adjustment */ u64 cl_vtoff; /* inter-period cumulative vt offset */ u64 cl_cvtmax; /* max child's vt in the last period */ + u64 cl_cvtoff; /* cumulative cvtmax of all periods */ + u64 cl_pcvtoff; /* parent's cvtoff at initalization + time */ struct internal_sc cl_rsc; /* internal real-time service curve */ struct internal_sc cl_fsc; /* internal fair service curve */ @@ -720,7 +723,7 @@ static void init_vf(struct hfsc_class *cl, unsigned int len) { - struct hfsc_class *max_cl, *p; + struct hfsc_class *max_cl; struct rb_node *n; u64 vt, f, cur_time; int go_active; @@ -752,19 +755,20 @@ } else { /* * first child for a new parent backlog period. - * add parent's cvtmax to vtoff of children - * to make a new vt (vtoff + vt) larger than - * the vt in the last period for all children. + * add parent's cvtmax to cvtoff to make a new + * vt (vtoff + vt) larger than the vt in the + * last period for all children. */ vt = cl->cl_parent->cl_cvtmax; - list_for_each_entry(p, &cl->cl_parent->children, - siblings) - p->cl_vtoff += vt; - cl->cl_vt = 0; + cl->cl_parent->cl_cvtoff += vt; cl->cl_parent->cl_cvtmax = 0; cl->cl_parent->cl_cvtmin = 0; + cl->cl_vt = 0; } + cl->cl_vtoff = cl->cl_parent->cl_cvtoff - + cl->cl_pcvtoff; + /* update the virtual curve */ vt = cl->cl_vt + cl->cl_vtoff; rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt, @@ -1151,6 +1155,7 @@ if (parent->level == 0) hfsc_purge_queue(sch, parent); hfsc_adjust_levels(parent); + cl->cl_pcvtoff = parent->cl_cvtoff; sch_tree_unlock(sch); #ifdef CONFIG_NET_ESTIMATOR @@ -1584,6 +1589,8 @@ cl->cl_vtoff = 0; cl->cl_cvtmin = 0; cl->cl_cvtmax = 0; + cl->cl_cvtoff = 0; + cl->cl_pcvtoff = 0; cl->cl_vtperiod = 0; cl->cl_parentperiod = 0; cl->cl_f = 0; --------------070602050008090103010707-- From kaber@trash.net Sat Aug 14 13:01:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:01:58 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK1p3X020004 for ; Sat, 14 Aug 2004 13:01:52 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id B073119F33C; Sat, 14 Aug 2004 22:01:40 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 1033F394133; Sat, 14 Aug 2004 22:01:40 +0200 (CEST) Message-ID: <411E6FA3.9010102@trash.net> Date: Sat, 14 Aug 2004 22:01: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, devik , jamal Subject: [PATCH 2.4 1/4]: Add rb_first/rb_last/rb_prev/rb_next Content-Type: multipart/mixed; boundary="------------020100060703010000030607" X-archive-position: 7769 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 This is a multi-part message in MIME format. --------------020100060703010000030607 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds some useful rbtree functions from 2.6 to 2.4. --------------020100060703010000030607 Content-Type: text/x-patch; name="01-hfsc-2.4.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-hfsc-2.4.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:11:30+02:00 kaber@coreworks.de # [RBTREE]: Add rb_first/rb_last/rb_prev/rb_next # # Signed-off-by: Patrick McHardy # # lib/rbtree.c # 2004/08/11 23:11:25+02:00 kaber@coreworks.de +71 -0 # [RBTREE]: Add rb_first/rb_last/rb_prev/rb_next # # include/linux/rbtree.h # 2004/08/11 23:11:25+02:00 kaber@coreworks.de +6 -0 # [RBTREE]: Add rb_first/rb_last/rb_prev/rb_next # diff -Nru a/include/linux/rbtree.h b/include/linux/rbtree.h --- a/include/linux/rbtree.h 2004-08-12 23:23:07 +02:00 +++ b/include/linux/rbtree.h 2004-08-12 23:23:07 +02:00 @@ -121,6 +121,12 @@ extern void rb_insert_color(rb_node_t *, rb_root_t *); extern void rb_erase(rb_node_t *, rb_root_t *); +/* Find logical next and previous nodes in a tree */ +extern rb_node_t *rb_next(rb_node_t *); +extern rb_node_t *rb_prev(rb_node_t *); +extern rb_node_t *rb_first(rb_root_t *); +extern rb_node_t *rb_last(rb_root_t *); + static inline void rb_link_node(rb_node_t * node, rb_node_t * parent, rb_node_t ** rb_link) { node->rb_parent = parent; diff -Nru a/lib/rbtree.c b/lib/rbtree.c --- a/lib/rbtree.c 2004-08-12 23:23:07 +02:00 +++ b/lib/rbtree.c 2004-08-12 23:23:07 +02:00 @@ -294,3 +294,74 @@ __rb_erase_color(child, parent, root); } EXPORT_SYMBOL(rb_erase); + +/* + * This function returns the first node (in sort order) of the tree. + */ +rb_node_t *rb_first(rb_root_t *root) +{ + rb_node_t *n; + + n = root->rb_node; + if (!n) + return NULL; + while (n->rb_left) + n = n->rb_left; + return n; +} +EXPORT_SYMBOL(rb_first); + +rb_node_t *rb_last(rb_root_t *root) +{ + rb_node_t *n; + + n = root->rb_node; + if (!n) + return NULL; + while (n->rb_right) + n = n->rb_right; + return n; +} +EXPORT_SYMBOL(rb_last); + +rb_node_t *rb_next(rb_node_t *node) +{ + /* If we have a right-hand child, go down and then left as far + as we can. */ + if (node->rb_right) { + node = node->rb_right; + while (node->rb_left) + node = node->rb_left; + } + + /* No right-hand children. Everything down and left is + smaller than us, so any 'next' node must be in the general + direction of our parent. Go up the tree; any time the + ancestor is a right-hand child of its parent, keep going + up. First time it's a left-hand child of its parent, said + parent is our 'next' node. */ + while (node->rb_parent && node == node->rb_parent->rb_right) + node = node->rb_parent; + + return node->rb_parent; +} +EXPORT_SYMBOL(rb_next); + +rb_node_t *rb_prev(rb_node_t *node) +{ + /* If we have a left-hand child, go down and then right as far + as we can. */ + if (node->rb_left) { + node = node->rb_left; + while (node->rb_right) + node = node->rb_right; + } + + /* No left-hand children. Go up till we find an ancestor which + is a right-hand child of its parent */ + while (node->rb_parent && node == node->rb_parent->rb_left) + node = node->rb_parent; + + return node->rb_parent; +} +EXPORT_SYMBOL(rb_prev); --------------020100060703010000030607-- From kaber@trash.net Sat Aug 14 13:02:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:02:10 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK21Ic020045 for ; Sat, 14 Aug 2004 13:02:01 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 70E2D19F34F; Sat, 14 Aug 2004 22:01:50 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id B653F394133; Sat, 14 Aug 2004 22:01:49 +0200 (CEST) Message-ID: <411E6FAD.1090904@trash.net> Date: Sat, 14 Aug 2004 22:01:49 +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, devik , jamal Subject: [PATCH 2.4 2/4]: replace eligible list by rbtree Content-Type: multipart/mixed; boundary="------------060408080200000501070206" X-archive-position: 7770 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 This is a multi-part message in MIME format. --------------060408080200000501070206 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch replaces the eligible list by a rbtree. --------------060408080200000501070206 Content-Type: text/x-patch; name="02-hfsc-2.4.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02-hfsc-2.4.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:14:22+02:00 kaber@coreworks.de # [NET_SCHED]: Replace eligible list by rbtree in HFSC scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_hfsc.c # 2004/08/11 23:14:17+02:00 kaber@coreworks.de +42 -69 # [NET_SCHED]: Replace eligible list by rbtree in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-12 23:23:11 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-12 23:23:11 +02:00 @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -131,9 +132,9 @@ struct list_head children; /* child classes */ struct Qdisc *qdisc; /* leaf qdisc */ + rb_node_t el_node; /* qdisc's eligible tree member */ struct list_head actlist; /* active children list */ struct list_head alist; /* active children list member */ - struct list_head ellist; /* eligible list member */ struct list_head hlist; /* hash list member */ struct list_head dlist; /* drop list member */ @@ -181,7 +182,7 @@ u16 defcls; /* default class id */ struct hfsc_class root; /* root class */ struct list_head clhash[HFSC_HSIZE]; /* class hash */ - struct list_head eligible; /* eligible list */ + rb_root_t eligible; /* eligible tree */ struct list_head droplist; /* active leaf class list (for dropping) */ struct sk_buff_head requeue; /* requeued packet */ @@ -217,82 +218,51 @@ /* - * eligible list holds backlogged classes being sorted by their eligible times. - * there is one eligible list per hfsc instance. + * eligible tree holds backlogged classes being sorted by their eligible times. + * there is one eligible tree per hfsc instance. */ static void -ellist_insert(struct hfsc_class *cl) +eltree_insert(struct hfsc_class *cl) { - struct list_head *head = &cl->sched->eligible; - struct hfsc_class *p; - - /* check the last entry first */ - if (list_empty(head) || - ((p = list_entry(head->prev, struct hfsc_class, ellist)) && - p->cl_e <= cl->cl_e)) { - list_add_tail(&cl->ellist, head); - return; - } - - list_for_each_entry(p, head, ellist) { - if (cl->cl_e < p->cl_e) { - /* insert cl before p */ - list_add_tail(&cl->ellist, &p->ellist); - return; - } + rb_node_t **p = &cl->sched->eligible.rb_node; + rb_node_t *parent = NULL; + struct hfsc_class *cl1; + + while (*p != NULL) { + parent = *p; + cl1 = rb_entry(parent, struct hfsc_class, el_node); + if (cl->cl_e >= cl1->cl_e) + p = &parent->rb_right; + else + p = &parent->rb_left; } - ASSERT(0); /* should not reach here */ + rb_link_node(&cl->el_node, parent, p); + rb_insert_color(&cl->el_node, &cl->sched->eligible); } static inline void -ellist_remove(struct hfsc_class *cl) +eltree_remove(struct hfsc_class *cl) { - list_del(&cl->ellist); + rb_erase(&cl->el_node, &cl->sched->eligible); } -static void -ellist_update(struct hfsc_class *cl) +static inline void +eltree_update(struct hfsc_class *cl) { - struct list_head *head = &cl->sched->eligible; - struct hfsc_class *p, *last; - - /* - * the eligible time of a class increases monotonically. - * if the next entry has a larger eligible time, nothing to do. - */ - if (cl->ellist.next == head || - ((p = list_entry(cl->ellist.next, struct hfsc_class, ellist)) && - cl->cl_e <= p->cl_e)) - return; - - /* check the last entry */ - last = list_entry(head->prev, struct hfsc_class, ellist); - if (last->cl_e <= cl->cl_e) { - list_move_tail(&cl->ellist, head); - return; - } - - /* - * the new position must be between the next entry - * and the last entry - */ - list_for_each_entry_continue(p, head, ellist) { - if (cl->cl_e < p->cl_e) { - list_move_tail(&cl->ellist, &p->ellist); - return; - } - } - ASSERT(0); /* should not reach here */ + eltree_remove(cl); + eltree_insert(cl); } /* find the class with the minimum deadline among the eligible classes */ static inline struct hfsc_class * -ellist_get_mindl(struct list_head *head, u64 cur_time) +eltree_get_mindl(struct hfsc_sched *q, u64 cur_time) { struct hfsc_class *p, *cl = NULL; + rb_node_t *n; - list_for_each_entry(p, head, ellist) { + for (n = rb_first(&q->eligible); n != NULL; n = rb_next(n)) { + p = rb_entry(n, struct hfsc_class, el_node); if (p->cl_e > cur_time) break; if (cl == NULL || p->cl_d < cl->cl_d) @@ -303,11 +273,14 @@ /* find the class with minimum eligible time among the eligible classes */ static inline struct hfsc_class * -ellist_get_minel(struct list_head *head) +eltree_get_minel(struct hfsc_sched *q) { - if (list_empty(head)) + rb_node_t *n; + + n = rb_first(&q->eligible); + if (n == NULL) return NULL; - return list_entry(head->next, struct hfsc_class, ellist); + return rb_entry(n, struct hfsc_class, el_node); } /* @@ -709,7 +682,7 @@ cl->cl_e = rtsc_y2x(&cl->cl_eligible, cl->cl_cumul); cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); - ellist_insert(cl); + eltree_insert(cl); } static void @@ -718,7 +691,7 @@ cl->cl_e = rtsc_y2x(&cl->cl_eligible, cl->cl_cumul); cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); - ellist_update(cl); + eltree_update(cl); } static inline void @@ -939,7 +912,7 @@ set_passive(struct hfsc_class *cl) { if (cl->cl_flags & HFSC_RSC) - ellist_remove(cl); + eltree_remove(cl); list_del(&cl->dlist); @@ -1500,7 +1473,7 @@ u64 next_time = 0; long delay; - if ((cl = ellist_get_minel(&q->eligible)) != NULL) + if ((cl = eltree_get_minel(q)) != NULL) next_time = cl->cl_e; if (q->root.cl_cfmin != 0) { if (next_time == 0 || next_time > q->root.cl_cfmin) @@ -1531,7 +1504,7 @@ q->defcls = qopt->defcls; for (i = 0; i < HFSC_HSIZE; i++) INIT_LIST_HEAD(&q->clhash[i]); - INIT_LIST_HEAD(&q->eligible); + q->eligible = RB_ROOT; INIT_LIST_HEAD(&q->droplist); skb_queue_head_init(&q->requeue); @@ -1614,7 +1587,7 @@ hfsc_reset_class(cl); } __skb_queue_purge(&q->requeue); - INIT_LIST_HEAD(&q->eligible); + q->eligible = RB_ROOT; INIT_LIST_HEAD(&q->droplist); del_timer(&q->wd_timer); sch->flags &= ~TCQ_F_THROTTLED; @@ -1712,7 +1685,7 @@ * find the class with the minimum deadline among * the eligible classes. */ - if ((cl = ellist_get_mindl(&q->eligible, cur_time)) != NULL) { + if ((cl = eltree_get_mindl(q, cur_time)) != NULL) { realtime = 1; } else { /* --------------060408080200000501070206-- From kaber@trash.net Sat Aug 14 13:02:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:02:15 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK26hj020072 for ; Sat, 14 Aug 2004 13:02:06 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 6727619F353; Sat, 14 Aug 2004 22:01:55 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id ADC4D394133; Sat, 14 Aug 2004 22:01:54 +0200 (CEST) Message-ID: <411E6FB2.3050501@trash.net> Date: Sat, 14 Aug 2004 22:01: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, devik , jamal Subject: [PATCH 2.4 3/4]: replace actlist by rbtrees Content-Type: multipart/mixed; boundary="------------060501030002060205020209" X-archive-position: 7771 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 This is a multi-part message in MIME format. --------------060501030002060205020209 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch replaces actlist by two rbtrees: vt_tree, sorted by virtual time and cf_tree, sorted by fit-time. --------------060501030002060205020209 Content-Type: text/x-patch; name="03-hfsc-2.4.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="03-hfsc-2.4.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:22:13+02:00 kaber@coreworks.de # [NET_SCHED]: Replace actlist by rbtrees in HFSC scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_hfsc.c # 2004/08/11 23:22:06+02:00 kaber@coreworks.de +92 -90 # [NET_SCHED]: Replace actlist by rbtrees in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-12 23:23:16 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-12 23:23:16 +02:00 @@ -133,8 +133,10 @@ struct Qdisc *qdisc; /* leaf qdisc */ rb_node_t el_node; /* qdisc's eligible tree member */ - struct list_head actlist; /* active children list */ - struct list_head alist; /* active children list member */ + rb_root_t vt_tree; /* active children sorted by cl_vt */ + rb_node_t vt_node; /* parent's vt_tree member */ + rb_root_t cf_tree; /* active children sorted by cl_f */ + rb_node_t cf_node; /* parent's cf_heap member */ struct list_head hlist; /* hash list member */ struct list_head dlist; /* drop list member */ @@ -284,84 +286,51 @@ } /* - * active children list holds backlogged child classes being sorted - * by their virtual time. each intermediate class has one active - * children list. + * vttree holds holds backlogged child classes being sorted by their virtual + * time. each intermediate class has one vttree. */ static void -actlist_insert(struct hfsc_class *cl) +vttree_insert(struct hfsc_class *cl) { - struct list_head *head = &cl->cl_parent->actlist; - struct hfsc_class *p; - - /* check the last entry first */ - if (list_empty(head) || - ((p = list_entry(head->prev, struct hfsc_class, alist)) && - p->cl_vt <= cl->cl_vt)) { - list_add_tail(&cl->alist, head); - return; - } + rb_node_t **p = &cl->cl_parent->vt_tree.rb_node; + rb_node_t *parent = NULL; + struct hfsc_class *cl1; - list_for_each_entry(p, head, alist) { - if (cl->cl_vt < p->cl_vt) { - /* insert cl before p */ - list_add_tail(&cl->alist, &p->alist); - return; - } + while (*p != NULL) { + parent = *p; + cl1 = rb_entry(parent, struct hfsc_class, vt_node); + if (cl->cl_vt >= cl1->cl_vt) + p = &parent->rb_right; + else + p = &parent->rb_left; } - ASSERT(0); /* should not reach here */ + rb_link_node(&cl->vt_node, parent, p); + rb_insert_color(&cl->vt_node, &cl->cl_parent->vt_tree); } static inline void -actlist_remove(struct hfsc_class *cl) +vttree_remove(struct hfsc_class *cl) { - list_del(&cl->alist); + rb_erase(&cl->vt_node, &cl->cl_parent->vt_tree); } -static void -actlist_update(struct hfsc_class *cl) +static inline void +vttree_update(struct hfsc_class *cl) { - struct list_head *head = &cl->cl_parent->actlist; - struct hfsc_class *p, *last; - - /* - * the virtual time of a class increases monotonically. - * if the next entry has a larger virtual time, nothing to do. - */ - if (cl->alist.next == head || - ((p = list_entry(cl->alist.next, struct hfsc_class, alist)) && - cl->cl_vt <= p->cl_vt)) - return; - - /* check the last entry */ - last = list_entry(head->prev, struct hfsc_class, alist); - if (last->cl_vt <= cl->cl_vt) { - list_move_tail(&cl->alist, head); - return; - } - - /* - * the new position must be between the next entry - * and the last entry - */ - list_for_each_entry_continue(p, head, alist) { - if (cl->cl_vt < p->cl_vt) { - list_move_tail(&cl->alist, &p->alist); - return; - } - } - ASSERT(0); /* should not reach here */ + vttree_remove(cl); + vttree_insert(cl); } static inline struct hfsc_class * -actlist_firstfit(struct hfsc_class *cl, u64 cur_time) +vttree_firstfit(struct hfsc_class *cl, u64 cur_time) { struct hfsc_class *p; + rb_node_t *n; - list_for_each_entry(p, &cl->actlist, alist) { - if (p->cl_f <= cur_time) { + for (n = rb_first(&cl->vt_tree); n != NULL; n = rb_next(n)) { + p = rb_entry(n, struct hfsc_class, vt_node); + if (p->cl_f <= cur_time) return p; - } } return NULL; } @@ -370,14 +339,14 @@ * get the leaf class with the minimum vt in the hierarchy */ static struct hfsc_class * -actlist_get_minvt(struct hfsc_class *cl, u64 cur_time) +vttree_get_minvt(struct hfsc_class *cl, u64 cur_time) { /* if root-class's cfmin is bigger than cur_time nothing to do */ if (cl->cl_cfmin > cur_time) return NULL; while (cl->level > 0) { - cl = actlist_firstfit(cl, cur_time); + cl = vttree_firstfit(cl, cur_time); if (cl == NULL) return NULL; /* @@ -389,6 +358,38 @@ return cl; } +static void +cftree_insert(struct hfsc_class *cl) +{ + rb_node_t **p = &cl->cl_parent->cf_tree.rb_node; + rb_node_t *parent = NULL; + struct hfsc_class *cl1; + + while (*p != NULL) { + parent = *p; + cl1 = rb_entry(parent, struct hfsc_class, cf_node); + if (cl->cl_f >= cl1->cl_f) + p = &parent->rb_right; + else + p = &parent->rb_left; + } + rb_link_node(&cl->cf_node, parent, p); + rb_insert_color(&cl->cf_node, &cl->cl_parent->cf_tree); +} + +static inline void +cftree_remove(struct hfsc_class *cl) +{ + rb_erase(&cl->cf_node, &cl->cl_parent->cf_tree); +} + +static inline void +cftree_update(struct hfsc_class *cl) +{ + cftree_remove(cl); + cftree_insert(cl); +} + /* * service curve support functions * @@ -700,32 +701,25 @@ cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); } -static void +static inline void update_cfmin(struct hfsc_class *cl) { + rb_node_t *n = rb_first(&cl->cf_tree); struct hfsc_class *p; - u64 cfmin; - if (list_empty(&cl->actlist)) { + if (n == NULL) { cl->cl_cfmin = 0; return; } - cfmin = HT_INFINITY; - list_for_each_entry(p, &cl->actlist, alist) { - if (p->cl_f == 0) { - cl->cl_cfmin = 0; - return; - } - if (p->cl_f < cfmin) - cfmin = p->cl_f; - } - cl->cl_cfmin = cfmin; + p = rb_entry(n, struct hfsc_class, cf_node); + cl->cl_cfmin = p->cl_f; } static void init_vf(struct hfsc_class *cl, unsigned int len) { struct hfsc_class *max_cl, *p; + rb_node_t *n; u64 vt, f, cur_time; int go_active; @@ -738,9 +732,9 @@ go_active = 0; if (go_active) { - if (!list_empty(&cl->cl_parent->actlist)) { - max_cl = list_entry(cl->cl_parent->actlist.prev, - struct hfsc_class, alist); + n = rb_last(&cl->cl_parent->vt_tree); + if (n != NULL) { + max_cl = rb_entry(n, struct hfsc_class,vt_node); /* * set vt to the average of the min and max * classes. if the parent's period didn't @@ -785,7 +779,8 @@ cl->cl_parentperiod++; cl->cl_f = 0; - actlist_insert(cl); + vttree_insert(cl); + cftree_insert(cl); if (cl->cl_flags & HFSC_USC) { /* class has upper limit curve */ @@ -805,6 +800,7 @@ f = max(cl->cl_myf, cl->cl_cfmin); if (f != cl->cl_f) { cl->cl_f = f; + cftree_update(cl); update_cfmin(cl->cl_parent); } } @@ -837,9 +833,10 @@ if (cl->cl_vt > cl->cl_parent->cl_cvtmax) cl->cl_parent->cl_cvtmax = cl->cl_vt; - /* remove this class from the vt list */ - actlist_remove(cl); + /* remove this class from the vt tree */ + vttree_remove(cl); + cftree_remove(cl); update_cfmin(cl->cl_parent); continue; @@ -861,8 +858,8 @@ cl->cl_vt = cl->cl_parent->cl_cvtmin; } - /* update the vt list */ - actlist_update(cl); + /* update the vt tree */ + vttree_update(cl); if (cl->cl_flags & HFSC_USC) { cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit, @@ -892,6 +889,7 @@ f = max(cl->cl_myf, cl->cl_cfmin); if (f != cl->cl_f) { cl->cl_f = f; + cftree_update(cl); update_cfmin(cl->cl_parent); } } @@ -917,8 +915,8 @@ list_del(&cl->dlist); /* - * actlist is now handled in update_vf() so that update_vf(cl, 0, 0) - * needs to be called explicitly to remove a class from actlist + * vttree is now handled in update_vf() so that update_vf(cl, 0, 0) + * needs to be called explicitly to remove a class from vttree. */ } @@ -1141,7 +1139,8 @@ cl->qdisc = &noop_qdisc; cl->stats.lock = &sch->dev->queue_lock; INIT_LIST_HEAD(&cl->children); - INIT_LIST_HEAD(&cl->actlist); + cl->vt_tree = RB_ROOT; + cl->cf_tree = RB_ROOT; sch_tree_lock(sch); list_add_tail(&cl->hlist, &q->clhash[hfsc_hash(classid)]); @@ -1516,7 +1515,8 @@ q->root.qdisc = &noop_qdisc; q->root.stats.lock = &sch->dev->queue_lock; INIT_LIST_HEAD(&q->root.children); - INIT_LIST_HEAD(&q->root.actlist); + q->root.vt_tree = RB_ROOT; + q->root.cf_tree = RB_ROOT; list_add(&q->root.hlist, &q->clhash[hfsc_hash(q->root.classid)]); @@ -1564,7 +1564,9 @@ cl->cl_myfadj = 0; cl->cl_cfmin = 0; cl->cl_nactive = 0; - INIT_LIST_HEAD(&cl->actlist); + + cl->vt_tree = RB_ROOT; + cl->cf_tree = RB_ROOT; qdisc_reset(cl->qdisc); if (cl->cl_flags & HFSC_RSC) @@ -1692,7 +1694,7 @@ * use link-sharing criteria * get the class with the minimum vt in the hierarchy */ - cl = actlist_get_minvt(&q->root, cur_time); + cl = vttree_get_minvt(&q->root, cur_time); if (cl == NULL) { sch->stats.overlimits++; hfsc_schedule_watchdog(sch, cur_time); --------------060501030002060205020209-- From kaber@trash.net Sat Aug 14 13:02:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 13:02:22 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7EK2Far020162 for ; Sat, 14 Aug 2004 13:02:16 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 030FD19F354; Sat, 14 Aug 2004 22:02:05 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 5976E394133; Sat, 14 Aug 2004 22:02:04 +0200 (CEST) Message-ID: <411E6FBB.9020101@trash.net> Date: Sat, 14 Aug 2004 22:02:03 +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, devik , jamal Subject: [PATCH 2.4 4/4]: O(1) children vtoff adjustment Content-Type: multipart/mixed; boundary="------------070108090108040407080008" X-archive-position: 7772 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 This is a multi-part message in MIME format. --------------070108090108040407080008 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patches replaces the O(n) algorithm for children vtoff adjustment by a O(1) variant. --------------070108090108040407080008 Content-Type: text/x-patch; name="04-hfsc-2.4.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="04-hfsc-2.4.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/11 23:23:56+02:00 kaber@coreworks.de # [NET_SCHED]: O(1) children vtoff adjustment in HFSC scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_hfsc.c # 2004/08/11 23:23:51+02:00 kaber@coreworks.de +15 -8 # [NET_SCHED]: O(1) children vtoff adjustment in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-12 23:23:20 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-12 23:23:20 +02:00 @@ -162,6 +162,9 @@ adjustment */ u64 cl_vtoff; /* inter-period cumulative vt offset */ u64 cl_cvtmax; /* max child's vt in the last period */ + u64 cl_cvtoff; /* cumulative cvtmax of all periods */ + u64 cl_pcvtoff; /* parent's cvtoff at initalization + time */ struct internal_sc cl_rsc; /* internal real-time service curve */ struct internal_sc cl_fsc; /* internal fair service curve */ @@ -718,7 +721,7 @@ static void init_vf(struct hfsc_class *cl, unsigned int len) { - struct hfsc_class *max_cl, *p; + struct hfsc_class *max_cl; rb_node_t *n; u64 vt, f, cur_time; int go_active; @@ -750,19 +753,20 @@ } else { /* * first child for a new parent backlog period. - * add parent's cvtmax to vtoff of children - * to make a new vt (vtoff + vt) larger than - * the vt in the last period for all children. + * add parent's cvtmax to cvtoff to make a new + * vt (vtoff + vt) larger than the vt in the + * last period for all children. */ vt = cl->cl_parent->cl_cvtmax; - list_for_each_entry(p, &cl->cl_parent->children, - siblings) - p->cl_vtoff += vt; - cl->cl_vt = 0; + cl->cl_parent->cl_cvtoff += vt; cl->cl_parent->cl_cvtmax = 0; cl->cl_parent->cl_cvtmin = 0; + cl->cl_vt = 0; } + cl->cl_vtoff = cl->cl_parent->cl_cvtoff - + cl->cl_pcvtoff; + /* update the virtual curve */ vt = cl->cl_vt + cl->cl_vtoff; rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt, @@ -1148,6 +1152,7 @@ if (parent->level == 0) hfsc_purge_queue(sch, parent); hfsc_adjust_levels(parent); + cl->cl_pcvtoff = parent->cl_cvtoff; sch_tree_unlock(sch); #ifdef CONFIG_NET_ESTIMATOR @@ -1557,6 +1562,8 @@ cl->cl_vtoff = 0; cl->cl_cvtmin = 0; cl->cl_cvtmax = 0; + cl->cl_cvtoff = 0; + cl->cl_pcvtoff = 0; cl->cl_vtperiod = 0; cl->cl_parentperiod = 0; cl->cl_f = 0; --------------070108090108040407080008-- From hadi@cyberus.ca Sat Aug 14 14:21:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 14:21: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 i7ELLnmA022816 for ; Sat, 14 Aug 2004 14:21:49 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1Bw5y7-0004iP-Rr for netdev@oss.sgi.com; Sat, 14 Aug 2004 17:21:39 -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 1Bw5y2-0001Ey-SY; Sat, 14 Aug 2004 17:21:35 -0400 Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail From: jamal Reply-To: hadi@cyberus.ca To: sandr8@crocetta.org Cc: Alexey , "David S. Miller" , devik@cdi.cz, shemminger@osdl.org, kaber@trash.net, rusty@rustcorp.com.au, Harald Welte , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <411CCB98.4080904@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <411CCB98.4080904@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1092518370.2876.3.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 14 Aug 2004 17:21:31 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7773 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 [please wrap your email at about 76 characters; makes it easier to respond to] On Fri, 2004-08-13 at 10:09, sandr8 wrote: > jamal wrote: > >1) You cant change the enqueue/dequeue API just because one qdisc > >doesnt seem to use it right. Whats all that contrack stuff doing in > >dev.c and pkt sched areas? > > > the conntrack stuff (actually that little part of code that adds > unbilling to ACCT in case of a drop) is something that comes later > (patch 4) and is not in the pkt sched part. please, don't let it > divert your mind from the real point. just forget it for the moment... > [in any case it is _not_ in the pkt sched area and as i said in mail > 4/4 i don't like to put the variables into dev.c, that's why i am > there asking for alternatives] This actually seems to be the core issue. Correct me if i misunderstood what you are trying to achieve: Somewhere above, the netfilter code bills some packet. Packet gets all the way to the scheduler on egress. Scheduler drops packet although it has been billed already. You being a man looking for justice ;-> decides that was unfair and you are trying to undo it. Is this accurate? Also is their a corrective factor that happens once the _accounting_ data has been shipped? Example: - account for packet - ship accounting data to some billing server - oops, unbill - what now? BTW, what happens if you clone the packet below netfilter and send several copies of it possibly over several different interfaces? This may happen with tc extensions. I think accounting is important - especially if it is almost free with contracking. Lets talk about this issue first instead of confusing it with everything else you have in other patches. cheers, jamal From greearb@candelatech.com Sat Aug 14 15:15:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 15:15: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 i7EMF6kM025129 for ; Sat, 14 Aug 2004 15:15: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 i7EMUuSb007149; Sat, 14 Aug 2004 15:30:57 -0700 Message-ID: <411E8EE4.70900@candelatech.com> Date: Sat, 14 Aug 2004 15:15:00 -0700 From: Ben Greear Organization: Candela Technologies 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: Michael Renzmann CC: netdev@oss.sgi.com Subject: Re: Deleting incoming network packets / sk_buff References: <411E642C.9010708@web.de> In-Reply-To: <411E642C.9010708@web.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7774 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 Michael Renzmann wrote: > Hi all. > > I'm just making my first steps in kernel programming, and I have a few > questions. > > It's necessary for me to "delete" network packets that come in on a > ethernet device after passing them to an userspace program (through a > packet socket that the program has opened). My first idea was to write a > kernel module that registers on the NF_IP_PRE_ROUTING netfilter hook and > does its job. But there are two downsides on this approach: > > 1. I need to delete every packet, no matter if it is IP or something > else. As far as I understood only IP-packets will pass the netfilter > hooks, since the netfilter framework only works with IP traffic. > > 2. The solution also has to work for 2.2.x kernels, as long as there is > any way to achieve this functionality for these kernel series and 2.4.x > as well. > > I continued to dig some documentation, and found a possible solution in > a rather old phrack article [1]: "What we do is code our own kernel > module that registers our packet_type{} data structure to handle all > incoming packets (sk_buff's) right after they come out of the device > driver." While the authors use this technique to implement some > "protocol obfuscation" or an in-kernel packet sniffer, it seems to be a > good way to reach what I want to do. > > Now, what I'm wondering about is the way to "correctly" remove an > sk_buff so that the upper layer won't see the corresponding packet. I > somewhere read that the code for packet sockets have to clone the > sk_buff before passing it to the socket, else it would be "lost" and > could not be seen by following handlers. There is no way that I am aware of to block packets from high-level protocols, but you can disable the higher protocols (ie, set IP to 0.0.0.0). You can also hack net/core/dev.c to stop the packets from going up the stack, but it requires more than just a new kernel module, you'd have to actually change dev.c. (Search for BRIDGE). Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From hadi@cyberus.ca Sat Aug 14 15:32:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 15:32:28 -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 i7EMWMhq026051 for ; Sat, 14 Aug 2004 15:32:23 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1Bw74S-00077J-KR for netdev@oss.sgi.com; Sat, 14 Aug 2004 18:32:16 -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 1Bw74P-0005mq-C0; Sat, 14 Aug 2004 18:32:13 -0400 Subject: Re: [RFT] new iproute2 From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: netdev@oss.sgi.com In-Reply-To: <20040813170051.67d79b9d@dell_ss3.pdx.osdl.net> References: <20040813170051.67d79b9d@dell_ss3.pdx.osdl.net> Content-Type: multipart/mixed; boundary="=-0WGlRc+Z4atePLsA/Ie3" Organization: jamalopolous Message-Id: <1092522729.2877.33.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 14 Aug 2004 18:32:10 -0400 X-archive-position: 7775 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 --=-0WGlRc+Z4atePLsA/Ie3 Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2004-08-13 at 20:00, Stephen Hemminger wrote: > Okay, here is a new version of iproute2 with your last round of CLS patches > incorporated in. Note: I fixed up some things that seemed to have changed in > the current version of pkt_cls.h > > Also: > - removed all #ifdef CONFIG_ from the command. > - copy of kernel headers is now in iproute2/include/linux so that > it will build without matching kernel headers. > - this reduces the amount of configuration necessary. > > I don't want this final until you go over it Jamal, cause I had to rework your > stuff enough that I probably broke it. It was broken already because of latest kernel changes. Heres a patch on top of what you have that fixes it. I have not run my full regression tests on it (will do later next week) but basic tests all pass. Note that i think you may have a typo in your bit conversion for rates. Example: -- [root@jzny tc]# ./tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src 10.0.0.1/32 flowid 1:16 police rate 1kbit burst 90k drop [root@jzny tc]# ./tc -s filter show parent ffff: dev eth0 filter protocol ip pref 6 u32 filter protocol ip pref 6 u32 fh 800: ht divisor 1 filter protocol ip pref 6 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:16 police 1 action drop rate 125bps burst 90Kb mtu 2Kb match 0a000001/ffffffff at 12 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) -- 125bps Should be 125Bps which is 1Kbits/sec, no? cheers, jamal --=-0WGlRc+Z4atePLsA/Ie3 Content-Disposition: attachment; filename=p1 Content-Type: text/plain; name=p1; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- a/tc/tc_filter.c 2004-08-13 19:57:35.000000000 -0400 +++ b/tc/tc_filter.c 2004-08-13 21:54:49.000000000 -0400 @@ -254,18 +254,14 @@ if (show_stats) { if (tb[TCA_STATS]) { -#ifndef STOOPID_8BYTE if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats)) fprintf(fp, "statistics truncated"); else { -#endif struct tc_stats st; memcpy(&st, RTA_DATA(tb[TCA_STATS]), sizeof(st)); print_tcstats(fp, &st); fprintf(fp, "\n"); -#ifndef STOOPID_8BYTE } -#endif } } fflush(fp); --- a/tc/tc_class.c 2004-08-13 19:57:34.000000000 -0400 +++ b/tc/tc_class.c 2004-08-13 21:58:37.000000000 -0400 @@ -241,18 +241,14 @@ fprintf(fp, "\n"); if (show_stats) { if (tb[TCA_STATS]) { -#ifndef STOOPID_8BYTE if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats)) fprintf(fp, "statistics truncated"); else { -#endif struct tc_stats st; memcpy(&st, RTA_DATA(tb[TCA_STATS]), sizeof(st)); print_class_tcstats(fp, &st); fprintf(fp, "\n"); -#ifndef STOOPID_8BYTE } -#endif } if (q && tb[TCA_XSTATS]) { q->print_xstats(q, fp, tb[TCA_XSTATS]); --- a/tc/tc_qdisc.c 2004-08-13 19:57:34.000000000 -0400 +++ b/tc/tc_qdisc.c 2004-08-13 22:01:52.000000000 -0400 @@ -173,7 +173,6 @@ 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) { @@ -256,19 +255,15 @@ fprintf(fp, "\n"); if (show_stats) { if (tb[TCA_STATS]) { -#ifndef STOOPID_8BYTE if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats)) fprintf(fp, "statistics truncated"); else { -#endif struct tc_stats st; memcpy(&st, RTA_DATA(tb[TCA_STATS]), sizeof(st)); print_tcstats(fp, &st); fprintf(fp, "\n"); } -#ifndef STOOPID_8BYTE } -#endif if (q && tb[TCA_XSTATS]) { q->print_xstats(q, fp, tb[TCA_XSTATS]); fprintf(fp, "\n"); --- a/tc/m_action.c 2004-08-13 19:57:35.000000000 -0400 +++ b/tc/m_action.c 2004-08-13 22:34:09.000000000 -0400 @@ -262,21 +262,17 @@ if (show_stats) { if (tb[TCA_STATS]) { -#ifndef STOOPID_8BYTE if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof (struct tc_stats)) fprintf(f, "statistics truncated"); else { -#endif struct tc_stats st; memcpy(&st, RTA_DATA(tb[TCA_STATS]), sizeof (st)); fprintf(f, "\t"); print_tcstats(f, &st); fprintf(f, "\n"); -#ifndef STOOPID_8BYTE } -#endif } } --- a/tc/f_u32.c 2004-08-13 19:57:35.000000000 -0400 +++ b/tc/f_u32.c 2004-08-13 22:54:08.000000000 -0400 @@ -123,8 +123,6 @@ return -1; sel->keys[i].val |= key; sel->keys[i].mask |= mask; - sel->keys[i].off = 0; - sel->keys[i].offmask = 0; return 0; } } @@ -710,19 +708,10 @@ while (argc > 0) { if (matches(*argv, "mask") == 0) { __u32 mask; - int i = 0; NEXT_ARG(); if (get_u32(&mask, *argv, 16)) return -1; sel->hmask = htonl(mask); - mask = sel->hmask; - while (!(mask & 1)) { - i++; - mask>>=1; - } -#ifdef fix_u32_bug - sel->fshift = i; -#endif } else if (matches(*argv, "at") == 0) { int num; NEXT_ARG(); @@ -875,6 +864,7 @@ } strncpy(ind, *argv, sizeof (ind) - 1); addattr_l(n, MAX_MSG, TCA_U32_INDEV, ind, strlen(ind) + 1); + } else if (matches(*argv, "action") == 0) { NEXT_ARG(); if (parse_action(&argc, &argv, TCA_U32_ACT, n)) { @@ -882,6 +872,7 @@ return -1; } continue; + } else if (matches(*argv, "police") == 0) { NEXT_ARG(); if (parse_police(&argc, &argv, TCA_U32_POLICE, n)) { @@ -920,6 +911,7 @@ { struct rtattr *tb[TCA_U32_MAX+1]; struct tc_u32_sel *sel = NULL; + struct tc_u32_pcnt *pf = NULL; if (opt == NULL) return 0; @@ -964,10 +956,19 @@ fprintf(f, "link %s ", sprint_u32_handle(*(__u32*)RTA_DATA(tb[TCA_U32_LINK]), b1)); } + if (tb[TCA_U32_PCNT]) { + if (RTA_PAYLOAD(tb[TCA_U32_PCNT]) < sizeof(*pf)) { + fprintf(f, "Broken perf counters \n"); + return -1; + } + pf = RTA_DATA(tb[TCA_U32_PCNT]); + } if (sel) { int i; struct tc_u32_key *key = sel->keys; + if (show_stats && NULL != pf) + fprintf(f, " (rule hit %llu success %llu)",pf->rcnt,pf->rhit); if (sel->nkeys) { for (i=0; inkeys; i++, key++) { fprintf(f, "\n match %08x/%08x at %s%d", @@ -975,6 +976,8 @@ (unsigned int)ntohl(key->mask), key->offmask ? "nexthdr+" : "", key->off); + if (show_stats && NULL != pf) + fprintf(f, " (success %lld ) ",pf->kcnts[i]); } } @@ -994,11 +997,6 @@ } } - if (show_stats && tb[TCA_U32_PCNT]){ - struct tc_u32_pcnt *p = RTA_DATA(tb[TCA_U32_PCNT]); - fprintf(f, " (rule hit %llu success %llu)", - p->rcnt, p->rhit); - } if (tb[TCA_U32_POLICE]) { fprintf(f, "\n"); tc_print_police(f, tb[TCA_U32_POLICE]); --=-0WGlRc+Z4atePLsA/Ie3-- From jurriaan@rivierenland.xs4all.nl Sat Aug 14 22:55:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 22:55:22 -0700 (PDT) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7F5tDhs009113 for ; Sat, 14 Aug 2004 22:55:16 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr4.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7F5t7PR049372 for ; Sun, 15 Aug 2004 07:55:07 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 10782 invoked from network); 15 Aug 2004 05:55:02 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 15 Aug 2004 05:55:02 -0000 Received: (qmail 1775 invoked by uid 1000); 15 Aug 2004 05:54:55 -0000 Date: Sun, 15 Aug 2004 07:54:55 +0200 From: Jurriaan To: Francois Romieu Cc: netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040815055455.GA1496@middle.of.nowhere> Reply-To: Jurriaan References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> <20040814161039.GA1985@middle.of.nowhere> <20040814172835.GA23427@electric-eye.fr.zoreil.com> <20040814190140.GA1954@middle.of.nowhere> <20040814192740.GB23427@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040814192740.GB23427@electric-eye.fr.zoreil.com> X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040803i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 7776 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev From: Francois Romieu Date: Sat, Aug 14, 2004 at 09:27:40PM +0200 > Jurriaan : > [...] > > Indeed they do. Both with -10 and with -10+-20 added on my working > > 2.6.8-rc4-mm1 the booting process hangs somewhere while iptables is > > installing my ipv6 firewall. This is reproducable, I've not tried to > > install my firewall by hand after booting (call me paranoid). > > > > Thus: > > > > 2.6.8-rc4-mm1: boots, slow network > > 2.6.8-rc4-mm1 + 8139too-mm-revert: boots, fast network > > 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10: doesn't boot > > 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10 + 8139too-20: doesn't boot > > Thanks. Erm... not exactly what I had expected. > > Could you return to 2.6.8-rc4-mm1 + 8139too-mm-revert.patch and try each > of the three patches attached ? > patch #1 boots patch #2 doesn't boot patch #3 boots btw, if I shut off my ipv6 firewall, patch #2 hangs in the ntpupdate script, so it looks like the network card is hanging the system on first actual use with #2. Kind regards, Jurriaan -- Well, let's just say, 'if your VCR is still blinking 12:00, you don't want Linux'. Bruce Perens, Debian's Fearless Leader Debian (Unstable) GNU/Linux 2.6.8-rc4-mm1 2x6078 bogomips load 0.34 From akpm@osdl.org Sat Aug 14 23:32:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 14 Aug 2004 23:32: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 i7F6WqNH009981 for ; Sat, 14 Aug 2004 23:32:53 -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 i7F6Wf117009 for ; Sat, 14 Aug 2004 23:32:41 -0700 Date: Sat, 14 Aug 2004 23:31:08 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [Bugme-new] [Bug 3200] New: linux-2.6.8-rc4-mm1: IPv6-in-IPv6 undefined references Message-Id: <20040814233108.51a04d33.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: 7777 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, 12 Aug 2004 14:59:08 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3200] New: linux-2.6.8-rc4-mm1: IPv6-in-IPv6 undefined references http://bugme.osdl.org/show_bug.cgi?id=3200 Summary: linux-2.6.8-rc4-mm1: IPv6-in-IPv6 undefined references Kernel Version: linux-2.6.8-rc4-mm1 Status: NEW Severity: blocking Owner: laforge@gnumonks.org Submitter: aioannis@tinet.org Distribution: Gentoo GNU/Linux Hardware Environment: i686 (Athlon XP) Software Environment: Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.6.7-gentoo-r12) ================================================================= System uname: 2.6.7-gentoo-r12 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.5.2 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Problem Description: There seems to be a problem either compiling built-in or as a module the IPv6-in-IPv6 tunnel option: <*> The IPv6 protocol (EXPERIMENTAL) IPv6: IPv6-in-IPv6 tunnel As module: ********** make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/linux/compile.h Kernel: arch/i386/boot/bzImage is ready Building modules, stage 2. MODPOST *** Warning: "xfrm6_tunnel_deregister" [net/ipv6/ip6_tunnel.ko] undefined! *** Warning: "xfrm6_tunnel_register" [net/ipv6/ip6_tunnel.ko] undefined! make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/linux/compile.h Kernel: arch/i386/boot/bzImage is ready Building modules, stage 2. MODPOST *** Warning: "xfrm6_tunnel_deregister" [net/ipv6/ip6_tunnel.ko] undefined! *** Warning: "xfrm6_tunnel_register" [net/ipv6/ip6_tunnel.ko] undefined! INSTALL drivers/ide/ide-floppy.ko INSTALL drivers/net/dummy.ko INSTALL drivers/pci/hotplug/cpqphp.ko INSTALL drivers/pci/hotplug/fakephp.ko INSTALL drivers/pci/hotplug/ibmphp.ko INSTALL drivers/pci/hotplug/pci_hotplug.ko INSTALL drivers/pci/hotplug/pciehp.ko INSTALL drivers/pci/hotplug/shpchp.ko INSTALL drivers/scsi/osst.ko INSTALL drivers/scsi/sd_mod.ko INSTALL drivers/scsi/st.ko INSTALL drivers/usb/host/ehci-hcd.ko INSTALL drivers/usb/host/ohci-hcd.ko INSTALL drivers/usb/storage/usb-storage.ko INSTALL net/bluetooth/hidp/hidp.ko INSTALL net/ipv6/ip6_tunnel.ko if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.8-rc4-mm1; fi WARNING: /lib/modules/2.6.8-rc4-mm1/kernel/net/ipv6/ip6_tunnel.ko needs unknown symbol xfrm6_tunnel_register WARNING: /lib/modules/2.6.8-rc4-mm1/kernel/net/ipv6/ip6_tunnel.ko needs unknown symbol xfrm6_tunnel_deregister ********** Built-in: ********** SPLIT include/linux/autoconf.h -> include/config/* make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/linux/compile.h GZIP kernel/config_data.gz IKCFG kernel/config_data.h CC kernel/configs.o LD kernel/built-in.o CC net/ipv6/af_inet6.o LD net/ipv6/ipv6.o CC net/ipv6/ip6_tunnel.o LD net/ipv6/built-in.o LD net/built-in.o GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 net/built-in.o(.init.text+0x37e7): In function `ip6_tunnel_init': : undefined reference to `xfrm6_tunnel_register' net/built-in.o(.init.text+0x3846): In function `ip6_tunnel_init': : undefined reference to `xfrm6_tunnel_deregister' net/built-in.o(.exit.text+0x926): In function `ip6_tunnel_cleanup': : undefined reference to `xfrm6_tunnel_deregister' make: *** [.tmp_vmlinux1] Error 1 ********** Reproducible: Always Steps to Reproduce: 1. Select IPv6-in-IPv6 tunnel support for linux kernel 2.6.8-rc4-mm1 2. make Actual Results: Image fails when selecting it built-in. Compiling as a module fails too. In both cases, there are undefined references. References: http://bugs.gentoo.org/show_bug.cgi?id=60133 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From herbert@gondor.apana.org.au Sun Aug 15 00:41:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 00:42: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 i7F7frDl014407 for ; Sun, 15 Aug 2004 00:41: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 1BwFe9-0003fo-00; Sun, 15 Aug 2004 17:41:41 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwFe4-0007hy-00; Sun, 15 Aug 2004 17:41:36 +1000 From: Herbert Xu To: akpm@osdl.org (Andrew Morton) Subject: Re: Fw: [Bugme-new] [Bug 3200] New: linux-2.6.8-rc4-mm1: IPv6-in-IPv6 undefined references Cc: netdev@oss.sgi.com, davem@redhat.com Organization: Core In-Reply-To: <20040814233108.51a04d33.akpm@osdl.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Sun, 15 Aug 2004 17:41:36 +1000 X-archive-position: 7778 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 Andrew Morton wrote: > > As module: > > ********** > make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. > CHK include/linux/compile.h > Kernel: arch/i386/boot/bzImage is ready > Building modules, stage 2. > MODPOST > *** Warning: "xfrm6_tunnel_deregister" [net/ipv6/ip6_tunnel.ko] undefined! > *** Warning: "xfrm6_tunnel_register" [net/ipv6/ip6_tunnel.ko] undefined! This patch should fix it. 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/ipv6/Kconfig 1.9 vs edited ===== --- 1.9/net/ipv6/Kconfig 2004-07-30 08:48:33 +10:00 +++ edited/net/ipv6/Kconfig 2004-08-15 17:39:29 +10:00 @@ -59,6 +59,7 @@ config IPV6_TUNNEL tristate "IPv6: IPv6-in-IPv6 tunnel" depends on IPV6 + select XFRM ---help--- Support for IPv6-in-IPv6 tunnels described in RFC 2473. From romieu@fr.zoreil.com Sun Aug 15 03:00:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 03:00: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 i7FA0Njl020812 for ; Sun, 15 Aug 2004 03:00:24 -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 i7F9x1u5003089; Sun, 15 Aug 2004 11:59:01 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7F9x0RT003088; Sun, 15 Aug 2004 11:59:00 +0200 Date: Sun, 15 Aug 2004 11:59:00 +0200 From: Francois Romieu To: Jurriaan Cc: Pasi Sjoholm , netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040815095900.GA2846@electric-eye.fr.zoreil.com> References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> <20040814161039.GA1985@middle.of.nowhere> <20040814172835.GA23427@electric-eye.fr.zoreil.com> <20040814190140.GA1954@middle.of.nowhere> <20040814192740.GB23427@electric-eye.fr.zoreil.com> <20040815055455.GA1496@middle.of.nowhere> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815055455.GA1496@middle.of.nowhere> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7779 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 Jurriaan : > > > 2.6.8-rc4-mm1 + 8139too-mm-revert + 8139too-10 + 8139too-20: doesn't boot > > > > Thanks. Erm... not exactly what I had expected. > > > > Could you return to 2.6.8-rc4-mm1 + 8139too-mm-revert.patch and try each > > of the three patches attached ? > > > patch #1 boots > patch #2 doesn't boot > patch #3 boots Ok, the early read of the interrupt status register is the culprit. I have modified 8139too-10.patch so that it behaves like patch #1 and resynced the whole serie. Can you both apply the updated patches below ? If M.Sjoholm's setup works fine, I'll forward the update for inclusion in -mm/-netdev. http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-10.patch http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-20.patch -- Ueimor From jurriaan@rivierenland.xs4all.nl Sun Aug 15 03:44:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 03:44:59 -0700 (PDT) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7FAinEi022114 for ; Sun, 15 Aug 2004 03:44:52 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr4.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7FAih6R066323 for ; Sun, 15 Aug 2004 12:44:43 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 2002 invoked from network); 15 Aug 2004 10:44:30 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 15 Aug 2004 10:44:30 -0000 Received: (qmail 2404 invoked by uid 1000); 15 Aug 2004 10:44:27 -0000 Date: Sun, 15 Aug 2004 12:44:27 +0200 From: Jurriaan To: Francois Romieu Cc: Pasi Sjoholm , netdev@oss.sgi.com Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 Message-ID: <20040815104427.GA2157@middle.of.nowhere> Reply-To: Jurriaan References: <20040814060948.GA7842@middle.of.nowhere> <20040814121533.GB18754@electric-eye.fr.zoreil.com> <20040814135606.GA6001@middle.of.nowhere> <20040814150824.GA21843@electric-eye.fr.zoreil.com> <20040814161039.GA1985@middle.of.nowhere> <20040814172835.GA23427@electric-eye.fr.zoreil.com> <20040814190140.GA1954@middle.of.nowhere> <20040814192740.GB23427@electric-eye.fr.zoreil.com> <20040815055455.GA1496@middle.of.nowhere> <20040815095900.GA2846@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815095900.GA2846@electric-eye.fr.zoreil.com> X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040803i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 7780 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev From: Francois Romieu Date: Sun, Aug 15, 2004 at 11:59:00AM +0200 > > Ok, the early read of the interrupt status register is the culprit. > > I have modified 8139too-10.patch so that it behaves like patch #1 and > resynced the whole serie. > > Can you both apply the updated patches below ? > > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-mm-revert.patch > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-10.patch > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.8-rc4-mm1/8139too-20.patch > 2.6.8-rc4-mm1 with those patches applied boots, and the network isn't slow either. Thanks, Jurriaan -- Sort of a pregnant Johnny Cash, actually. Rev Hammer describing his voice in Elizabeth's Great Gallop Debian (Unstable) GNU/Linux 2.6.8 2x6078 bogomips load 0.01 From mcgrof@studorgs.rutgers.edu Sun Aug 15 04:23:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 04:23:54 -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 i7FBNmAn031761 for ; Sun, 15 Aug 2004 04:23:48 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id A34FBF99BD; Sun, 15 Aug 2004 07:23:42 -0400 (EDT) Date: Sun, 15 Aug 2004 07:23:42 -0400 To: Denis Vlasenko Cc: Jean Tourrilhes , Jouni Malinen , prism54-devel@prism54.org, acx100-devel@lists.sourceforge.net, Netdev Subject: Re: [PATCH/RFC] set_rates support for prism54 Message-ID: <20040815112342.GT2050@ruslug.rutgers.edu> Mail-Followup-To: Denis Vlasenko , Jean Tourrilhes , Jouni Malinen , prism54-devel@prism54.org, acx100-devel@lists.sourceforge.net, Netdev References: <200408150118.30598.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408150118.30598.vda@port.imtp.ilyichevsk.odessa.ua> 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: 7781 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 [Included Jeff/Netdev on the thread] Jeff, can you review Denis's proposed idea and comment on it? Comments from others are welcomed. I ask since we need to decide if we want this in our cvs repository soon or not. It won't make sense to commit the work unless it will eventually be accepted by you. Denis, to not loose your work or get it out of sync with our cvs repository please set up a branch for yourself and commit there. That way if it gets approved all you have to do is merge. Maybe now would be a good time to set up subversion for our project... Luis On Sun, Aug 15, 2004 at 01:18:30AM +0300, Denis Vlasenko wrote: > Hi all, > > This patch adds new private ioctl: > > iwpriv set_rate "1,2,5,11 11p,24d" > > Similar ioctl is already added to acx100 driver. > With these ioctl, I managed to connect acx100 > STA to prism54 AP using only ofdm modulation. > > Syntax: two space delimited lists. > First one defines basic rate set, second one > lists additional usable rates and is optional. > > Syntax of lists: comma separated list of > rates in Mbit/s, rounded down to integer value > (translation: 5 == 5.5Mbit/s), optionally suffixed > by modulation. Currently valid suffixes are: > c: cck > d: cckofdm > o: ofdm > p: pbcc > more will be added as new standards emerge. > > When suffix is omitted, it defaults to "natural" modulation > for given rate. Here are default and currently > allowed alternative modulations, default is listed first: > 1,2:(no suffixes allowed) > 5:cck pbcc > 11:cck pbcc > 22:pbcc > 33:pbcc > other rates:ofdm > > Driver will refuse ioctl if it cannot satisfy it precisely. > > Examples: > > iwpriv wlan0 set_rate 11 > ? ? fixed rate, 11Mbit/s (cck) basic rate > iwpriv wlan0 set_rate 22 > ? ? fixed rate, 22Mbit/s (pbcc) basic rate > iwpriv wlan0 set_rate 5,11 > ? ? auto rate, both 5.5 and 11Mbit/s (cck) are basic rates > iwpriv wlan0 set_rate "5 11,22" > ? ? auto rate, 5.5 is basic rate, 11 (cck) and 22(pbcc) extended rates > iwpriv wlan0 set_rate "5 11p,22" > ? ? auto rate, 5.5 is basic rate, 11 (pbcc) and 22(pbcc) extended rates > iwpriv wlan0 set_rate "1,2,5,11 6,9,12,18,24,36,48,54" > ? ? auto rate, 1,2,5.5,11 are basic, everything else > ? ? are extended rates, using ofdm > iwpriv wlan0 set_rate "6 9,12,18,24,36,48,54" > ? ? 6 (ofdm) basic rate, 9,12,18,24,36,48,54 (ofdm) extended > ? ? it is an '11g-only' setup: use only 11g-rates with ofdm, > ? ? will interfere with 11b equipment > iwpriv wlan0 set_rate "6d 9d,12d,18d,24d,36d,48d,54d" > ? ? 6 (cckofdm) basic rate, g-rates (cckofdm) extended > ? ? '11g 11b-compatible' setup: use only g-rates with cckofdm, > ? ? 11b stations in the area can detect signal and avoid collisions > ? ? (am I right here?) > > Notes: > * ioctl takes ASCIIZ string as a parameter. This is intentional. > I think that in this case, ASCII format is more flexible and future-proof > than binary, while not being too hard to parse. > * setrates.c (contains parser) compiles down to 1k of code+data. > Jean, do you see any problems with moving it into wireless.c in the future? > * whitespace is made consistent with rest of the driver > * leak fixed > * rate settings will survive reset now > > Comments? > -- > vda -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From herbert@gondor.apana.org.au Sun Aug 15 04:26:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 04:27: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 i7FBQt2E032111 for ; Sun, 15 Aug 2004 04:26: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 1BwJ99-0004wi-00; Sun, 15 Aug 2004 21:25:55 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwJ92-0000lt-00; Sun, 15 Aug 2004 21:25:48 +1000 Date: Sun, 15 Aug 2004 21:25:48 +1000 To: Jiva DeVoe Cc: users@lists.openswan.org, dev@lists.openswan.org, "David S. Miller" , kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [Openswan Users] Invalid argument NULL Message-ID: <20040815112548.GA2864@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7782 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 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 15, 2004 at 08:36:59PM +1000, Herbert Xu wrote: > Jiva DeVoe wrote: > > Am trying to set up a couple of crypto_NULL tunnels... (I know, insecure, > > that's ok... ) I have the module loaded, but I'm getting the following > > error in pluto's logs: > > > > ERROR: netlink response for Add SA esp.ff31fffb@ included errno > > 22: Invalid argument > > > > I presume this is something to do with setkey... Any suggestions on what I'm > > doing wrong? > > You aren't doing anything wrong. The IPsec stack is :) It turns out that xfrm_user isn't filling in x->props.ealgo or any of the other algo values! I guess no one ever noticed because we rely on the reqid to pick the right SA rather than the values in props. Unfortunately ESP's init_state function looks at x->props.ealgo to decide whether it's a NULL transform or not. That may be something that we want to fix in itself. However, for the moment we should probably fill in x->props.*algo since it is used elsewhere in the IPsec stack. For example, the user may create a template that has ealgos set which will require x->props.ealgo to be set properly. Come to think of it again, we only check/use aalgo anyway. Maybe I should forget about setting these values and just fix esp_init_state? In any case, here is a really ugly patch to fill in those values for xfrm_user. Please let me know of any clean-ups or better ways of doing 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 --ibTvN161/egqYuK8 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-08-12 19:59:52 +10:00 +++ edited/net/xfrm/xfrm_user.c 2004-08-15 21:07:03 +10:00 @@ -155,15 +155,24 @@ return err; } -static int attach_one_algo(struct xfrm_algo **algpp, struct rtattr *u_arg) +static int attach_one_algo(struct xfrm_algo **algpp, u8 *props, + struct xfrm_algo_desc *(*get_byname)(char *), + struct rtattr *u_arg) { struct rtattr *rta = u_arg; struct xfrm_algo *p, *ualg; + struct xfrm_algo_desc *algo; if (!rta) return 0; ualg = RTA_DATA(rta); + + algo = get_byname(ualg->alg_name); + if (!algo) + return -ENOSYS; + *props = algo->desc.sadb_alg_id; + p = kmalloc(sizeof(*ualg) + ualg->alg_key_len, GFP_KERNEL); if (!p) return -ENOMEM; @@ -216,11 +225,17 @@ copy_from_user_state(x, p); - if ((err = attach_one_algo(&x->aalg, xfrma[XFRMA_ALG_AUTH-1]))) + if ((err = attach_one_algo(&x->aalg, &x->props.aalgo, + xfrm_aalg_get_byname, + xfrma[XFRMA_ALG_AUTH-1]))) goto error; - if ((err = attach_one_algo(&x->ealg, xfrma[XFRMA_ALG_CRYPT-1]))) + if ((err = attach_one_algo(&x->ealg, &x->props.ealgo, + xfrm_ealg_get_byname, + xfrma[XFRMA_ALG_CRYPT-1]))) goto error; - if ((err = attach_one_algo(&x->calg, xfrma[XFRMA_ALG_COMP-1]))) + if ((err = attach_one_algo(&x->calg, &x->props.calgo, + xfrm_calg_get_byname, + xfrma[XFRMA_ALG_COMP-1]))) goto error; if ((err = attach_encap_tmpl(&x->encap, xfrma[XFRMA_ENCAP-1]))) goto error; --ibTvN161/egqYuK8-- From margitsw@t-online.de Sun Aug 15 06:20:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 06:20:59 -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 i7FDKr97001897 for ; Sun, 15 Aug 2004 06:20:54 -0700 Received: from fwd08.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1BwKwF-0003OT-05; Sun, 15 Aug 2004 15:20:43 +0200 Received: from margit.t-online.de (EwMd5qZEYek50YMicEX6qW+MvmQGOGpd1bV6Ti7tB-KCNsTIJlPnkW@[217.224.20.73]) by fwd08.sul.t-online.com with esmtp id 1BwKw5-0XlRKa0; Sun, 15 Aug 2004 15:20:33 +0200 Message-Id: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 15 Aug 2004 15:21:25 +0200 To: prism54-devel@prism54.org From: margitsw@t-online.de (Margit Schubert-While) Subject: Re: [PATCH/RFC] set_rates support for prism54 Cc: vda@port.imtp.ilyichevsk.odessa.ua, mcgrof@studorgs.rutgers.edu, netdev@oss.sgi.com, jgarzik@pobox.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: EwMd5qZEYek50YMicEX6qW+MvmQGOGpd1bV6Ti7tB-KCNsTIJlPnkW X-archive-position: 7783 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 I disagree with this. We don't need parameter parsing either in the driver or in wireless.c. There is a perfectly good infrastructure in wireless tools iwpriv.c Take a look at around line 375 in iwpriv.c for the existing example of IW_PRIV_TYPE_FLOAT. This could be adapted for this purpose (IW_PRIV_TYPE_BITRATE ?) and (mis)use the iw_freq structure to pass the values and extra info. This is probably the least invasive and can be tied to a particular WE release. Also we seem to have forgotten the 5 GHz band with 72, 100, 108 rates and only ofdm allowable. Margit From george@galis.org Sun Aug 15 08:55:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 08:55:15 -0700 (PDT) Received: from dyn.galis.org (ool-44c1e325.dyn.optonline.net [68.193.227.37]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7FFt9Fx007727 for ; Sun, 15 Aug 2004 08:55:09 -0700 Received: (qmail 4536 invoked by uid 1010); 15 Aug 2004 15:54:57 -0000 From: "George Georgalis" Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, romieu@fr.zoreil.com, alan@lxorguk.ukuu.org.uk Date: Sun, 15 Aug 2004 11:54:57 -0400 To: Francois Romieu , Alan Cox Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: kernel-2.6.8.1 EIP is at velocity_netdev_event+0x16/0x50 Message-ID: <20040815155457.GB32195@trot.local> References: <20040815095814.GA32195@trot.local> <20040815110625.GA2829@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815110625.GA2829@electric-eye.fr.zoreil.com> X-archive-position: 7784 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: george@galis.org Precedence: bulk X-list: netdev On Sun, Aug 15, 2004 at 01:06:25PM +0200, Francois Romieu wrote: >George Georgalis : >[...] >> Unable to handle kernel NULL pointer dereference at virtual address 000000e4 >> printing eip: >> c03034d6 >> *pde = 00000000 >> Oops: 0000 [#1] >> PREEMPT >> CPU: 0 >> EIP: 0060:[] Not tainted >> EFLAGS: 00010282 (2.6.8.1) >> EIP is at velocity_netdev_event+0x16/0x50 >> eax: 00000000 ebx: c060b724 ecx: 00000000 edx: f7d7dd60 >> esi: f6d771e0 edi: 00000001 ebp: 0100007f esp: f6ccdeb4 >> ds: 007b es: 007b ss: 0068 >> Process ifconfig (pid: 328, threadinfo=f6ccc000 task=f6ca80d0) > >You may apply on top of your 2.6.8.1 kernel: >http://www.fr.zoreil.com/people/francois/misc/20040815-2.6.8-via-velocity-test.patch > >It will sync the via-velocity driver with the one in 2.6.8-rc4-mm1. >It is supposed to fix this issue. > >Once the patch is applied, it will be interesting to know if CONFIG_SUPEND >makes a difference or not. > >Please add netdev@oss.sgi.com to the Cc: ...that patch doesn't build 26674 Aug 15 06:51 ../20040815-2.6.8-via-velocity-test.patch $ cd linux-2.6.8.1-via-velocity-test/ $ patch -p1 <../20040815-2.6.8-via-velocity-test.patch patching file drivers/net/via-velocity.h patching file drivers/net/via-velocity.c $ make bzImage make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/linux/compile.h OUI2C drivers/ieee1394/oui.c CC drivers/ieee1394/oui.o LD drivers/ieee1394/ieee1394.o LD drivers/ieee1394/built-in.o CC drivers/net/via-velocity.o drivers/net/via-velocity.c:310: error: `PCI_DEVICE_ID_VIA_612X' undeclared here (not in a function) drivers/net/via-velocity.c:310: error: initializer element is not constant drivers/net/via-velocity.c:310: error: (near initialization for `velocity_id_table[0].device') drivers/net/via-velocity.c:311: error: initializer element is not constant drivers/net/via-velocity.c:311: error: (near initialization for `velocity_id_table[0]') drivers/net/via-velocity.c:312: error: initializer element is not constant drivers/net/via-velocity.c:312: error: (near initialization for `velocity_id_table[1]') make[2]: *** [drivers/net/via-velocity.o] Error 1 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 Also note, I don't actually have one of these devices to test, I only included it in case I come across one. // George -- George Georgalis, Architect and administrator, Linux services. IXOYE http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org Key fingerprint = 5415 2738 61CF 6AE1 E9A7 9EF0 0186 503B 9831 1631 From vda@port.imtp.ilyichevsk.odessa.ua Sun Aug 15 09:10:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 09:10:44 -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 i7FGAbp5008388 for ; Sun, 15 Aug 2004 09:10:38 -0700 Received: (qmail 31757 invoked by alias); 3 Feb 1992 17:00:29 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 03 Feb 1992 17:00:29 -0000 From: Denis Vlasenko To: margitsw@t-online.de (Margit Schubert-While), prism54-devel@prism54.org Subject: Re: [Prism54-devel] Re: [PATCH/RFC] set_rates support for prism54 Date: Sun, 15 Aug 2004 19:10:25 +0300 User-Agent: KMail/1.5.4 Cc: mcgrof@studorgs.rutgers.edu, netdev@oss.sgi.com, jgarzik@pobox.com References: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> In-Reply-To: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408151910.25641.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 7785 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 On Sunday 15 August 2004 16:21, Margit Schubert-While wrote: > I disagree with this. > We don't need parameter parsing either in the driver or in > wireless.c. > There is a perfectly good infrastructure in wireless tools iwpriv.c > Take a look at around line 375 in iwpriv.c for the > existing example of IW_PRIV_TYPE_FLOAT. > This could be adapted for this purpose (IW_PRIV_TYPE_BITRATE ?) > and (mis)use the iw_freq structure to pass the values and extra info. Ok. And then we will need to parse that data into format suitable for prism54 in prism54 driver, and into format suitable for acx100/acx111 in acx100 driver, etc... Most probably this code will be ugly, because different hardware have completely different way of setting tx rate. Even acx100 and acx111 are different, not to say acx100 and prism54. -- vda From kaber@trash.net Sun Aug 15 09:12:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 09:12:22 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7FGCDtd008606 for ; Sun, 15 Aug 2004 09:12:14 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 4226B19F33C; Sun, 15 Aug 2004 18:12:02 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 751EA39414B; Sun, 15 Aug 2004 18:12:01 +0200 (CEST) Message-ID: <411F8B50.2020402@trash.net> Date: Sun, 15 Aug 2004 18:12:00 +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: lkml@lazy.shacknet.nu Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: [Panic] 2.6.8 and ingress scheduling References: <20040814175233.GA3617@lazy.shacknet.nu> <20040815130635.GA3703@lazy.shacknet.nu> In-Reply-To: <20040815130635.GA3703@lazy.shacknet.nu> Content-Type: multipart/mixed; boundary="------------030503090501060902070806" X-archive-position: 7786 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 This is a multi-part message in MIME format. --------------030503090501060902070806 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit lkml@lazy.shacknet.nu wrote: >hello again, > > > >>the last line (filter add) in the "wondershaper" script does sth. to the >>kernel, that lets it panic on receiving network packets. >> >> > >actually, the last _two_ commands set up the kernel for panic. please >see attached script; running should produce this console message: > > Fixed by this patch. qdisc_data was only aligned correctly in qdisc_create_dflt(), not qdisc_create() which resulted in memory corruption. Regards Patrick --------------030503090501060902070806 Content-Type: text/x-patch; name="qdisc-align.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qdisc-align.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/15 18:08:13+02:00 kaber@coreworks.de # [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() # # Signed-off-by: Patrick McHardy # # net/sched/sch_api.c # 2004/08/15 18:04:27+02:00 kaber@coreworks.de +13 -8 # [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-15 18:09:36 +02:00 +++ b/net/sched/sch_api.c 2004-08-15 18:09:36 +02:00 @@ -389,7 +389,8 @@ { int err; struct rtattr *kind = tca[TCA_KIND-1]; - struct Qdisc *sch = NULL; + void *p = NULL; + struct Qdisc *sch; struct Qdisc_ops *ops; int size; @@ -407,12 +408,18 @@ if (ops == NULL) goto err_out; - size = sizeof(*sch) + ops->priv_size; + /* ensure that the Qdisc and the private data are 32-byte aligned */ + size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); + size += ops->priv_size + QDISC_ALIGN_CONST; - sch = kmalloc(size, GFP_KERNEL); + p = kmalloc(size, GFP_KERNEL); err = -ENOBUFS; - if (!sch) + if (!p) goto err_out; + memset(p, 0, size); + sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); + sch->padded = (char *)sch - (char *)p; /* Grrr... Resolve race condition with module unload */ @@ -420,8 +427,6 @@ if (ops != qdisc_lookup_ops(kind)) goto err_out; - memset(sch, 0, size); - INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); @@ -470,8 +475,8 @@ err_out: *errp = err; - if (sch) - kfree(sch); + if (p) + kfree(p); return NULL; } --------------030503090501060902070806-- From vkondra@mail.ru Sun Aug 15 09:49:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 09:49:48 -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 i7FGngtu009575 for ; Sun, 15 Aug 2004 09:49:43 -0700 Received: from [212.179.233.204] (port=34260 helo=[192.168.10.2]) by mx2.mail.ru with esmtp id 1BwOCL-000KFy-00; Sun, 15 Aug 2004 20:49:35 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: Re: [Prism54-devel] Re: [PATCH/RFC] set_rates support for prism54 Date: Sun, 15 Aug 2004 19:48:43 +0300 User-Agent: KMail/1.7 Cc: Denis Vlasenko , Margit Schubert-While , prism54-devel@prism54.org, mcgrof@studorgs.rutgers.edu, jgarzik@pobox.com References: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> <200408151910.25641.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200408151910.25641.vda@port.imtp.ilyichevsk.odessa.ua> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1250376.I0hDbYN7QE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408151949.01351.vkondra@mail.ru> X-Spam: Not detected X-archive-position: 7787 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 --nextPart1250376.I0hDbYN7QE Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I would not mix rates with modulation and other channel parameters. It looks better to bind frequency with parameters like modulation, channel= =20 width (10Mzh narrow channels in japan) etc. , into 'channel' number or=20 (channel,band) tuple. =46or supported and optional rate, IE (info element) format may be the best= =20 choice. On Sunday 15 August 2004 19:10, Denis Vlasenko wrote: DV> On Sunday 15 August 2004 16:21, Margit Schubert-While wrote: DV> > I disagree with this. DV> > We don't need parameter parsing either in the driver or in DV> > wireless.c. DV> > There is a perfectly good infrastructure in wireless tools iwpriv.c DV> > Take a look at around line 375 in iwpriv.c for the DV> > existing example of IW_PRIV_TYPE_FLOAT. DV> > This could be adapted for this purpose (IW_PRIV_TYPE_BITRATE ?) DV> > and (mis)use the iw_freq structure to pass the values and extra info. DV> DV> Ok. And then we will need to parse that data into format suitable for DV> prism54 in prism54 driver, and into format suitable for acx100/acx111 DV> in acx100 driver, etc... Most probably this code will be ugly, because DV> different hardware have completely different way of setting tx rate. DV> Even acx100 and acx111 are different, not to say acx100 and prism54. --nextPart1250376.I0hDbYN7QE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBH5P9qxdj7mhC6o0RAnjkAKCPoHxyhCdZmf97FpiBDzyeG4L7pwCfdEU7 zjSjELq7X8fEydLtAVOWNFw= =Pqbn -----END PGP SIGNATURE----- --nextPart1250376.I0hDbYN7QE-- From vda@port.imtp.ilyichevsk.odessa.ua Sun Aug 15 10:12:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 10:12:35 -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 i7FHCTRR010440 for ; Sun, 15 Aug 2004 10:12:30 -0700 Received: (qmail 9089 invoked by alias); 3 Feb 1992 18:02:20 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 03 Feb 1992 18:02:20 -0000 From: Denis Vlasenko To: Vladimir Kondratiev , netdev@oss.sgi.com Subject: Re: [Prism54-devel] Re: [PATCH/RFC] set_rates support for prism54 Date: Sun, 15 Aug 2004 20:12:18 +0300 User-Agent: KMail/1.5.4 Cc: Margit Schubert-While , prism54-devel@prism54.org, mcgrof@studorgs.rutgers.edu, jgarzik@pobox.com References: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> <200408151910.25641.vda@port.imtp.ilyichevsk.odessa.ua> <200408151949.01351.vkondra@mail.ru> In-Reply-To: <200408151949.01351.vkondra@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408152012.18018.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 7788 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 On Sunday 15 August 2004 19:48, Vladimir Kondratiev wrote: > I would not mix rates with modulation and other channel parameters. > It looks better to bind frequency with parameters like modulation, channel > width (10Mzh narrow channels in japan) etc. , into 'channel' number or > (channel,band) tuple. Consider need of being able to: set_rates "1,2 5p,11p,22p" - i.e. "use PBCC modulation" set_rates "1,2 5,11,22p" - "use standard CCK, and PBCC only for 22Mbit" See? Very similar, but not the same. So, how do you propose to express this? This need is not imagined by me, it is very real for acx100 owners. > For supported and optional rate, IE (info element) format may be the best > choice. I did not quite understand you, can you elaborate a bit? -- vda From ptsjohol@cc.jyu.fi Sun Aug 15 10:16:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 10:16:51 -0700 (PDT) Received: from posti6.jyu.fi (posti6.jyu.fi [130.234.4.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7FHGhcJ010797 for ; Sun, 15 Aug 2004 10:16:46 -0700 Received: from silmu.st.jyu.fi (IDENT:nRM2i3d5cA3y6qYPFwbgwyCF3YT7Fbwp@silmu.st.jyu.fi [130.234.4.64]) by posti6.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id i7FHGTob029558; Sun, 15 Aug 2004 20:16:30 +0300 Date: Sun, 15 Aug 2004 20:16:29 +0300 (EEST) From: Pasi Sjoholm X-X-Sender: ptsjohol@silmu.st.jyu.fi To: Francois Romieu cc: Jurriaan , Subject: Re: strange network performance degradation 2.6.8-rc3-mm1 -> 2.6.8-rc4-mm1 In-Reply-To: <20040815095900.GA2846@electric-eye.fr.zoreil.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/) at posti6.jyu.fi; Sun, 15 Aug 2004 20:16:30 +0300 X-archive-position: 7789 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ptsjohol@cc.jyu.fi Precedence: bulk X-list: netdev On Sun, 15 Aug 2004, Francois Romieu wrote: > Ok, the early read of the interrupt status register is the culprit. > If M.Sjoholm's setup works fine, I'll forward the update for inclusion > in -mm/-netdev. Tested these patches and everything worked ok. -- Pasi Sjöholm From mrenzmann@web.de Sun Aug 15 11:04:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 11:04:45 -0700 (PDT) Received: from smtp07.web.de (smtp07.web.de [217.72.192.225]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7FI4d6O012010 for ; Sun, 15 Aug 2004 11:04:39 -0700 Received: from xdsl-195-14-216-39.netcologne.de ([195.14.216.39] helo=web.de) by smtp07.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.101 #44) id 1BwPMn-000059-00; Sun, 15 Aug 2004 20:04:26 +0200 Message-ID: <411FA5D0.6000004@web.de> Date: Sun, 15 Aug 2004 20:05:04 +0200 From: Michael Renzmann User-Agent: Mozilla Thunderbird 0.5 (X11/20040304) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Greear CC: netdev@oss.sgi.com Subject: Re: Deleting incoming network packets / sk_buff References: <411E642C.9010708@web.de> <411E8EE4.70900@candelatech.com> In-Reply-To: <411E8EE4.70900@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Sender: mrenzmann@web.de X-archive-position: 7790 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 Hi Ben. First of all, thanks for your answer. Ben Greear wrote: > There is no way that I am aware of to block packets from high-level > protocols, but you can disable the higher protocols (ie, set IP to > 0.0.0.0). Unfortunately this doesn't work for my setup. I have some kind of userspace bridge implementation running, which copies frames incoming on a physical device (e.g. eth1) to a virtual (tun/tap) device (e.g. tap0) and vice versa. When the kernel wants to communicate with the outside world it does this by using tap0, and the program "bridges" the packets to eth1. In order to avoid to have eth1 running in promiscious mode I configure tap0 to have the same MAC address as eth1 - but this has the drawback that the kernel sees every incoming packet twice: once when it hits eth1, and once when it gets copied by the userspace bridge to tap0. There is no simple way to have the incoming communication "split" over both interfaces without running in serious troubles regarding firewall rules or such things as having quagga/zebra dropping incoming OSPF announces from eth1 (since it self uses tap0 to communicate with the outside world). Abd yes, it is necessary to have this host only using tap0 for outgoing communication (it would be longish to explain the reason, just believe me for now ;)). Bottom line: the easiest way to solve this problem would be to have some way for blocking packets on eth1 from being processed (after they have been passed to the packet socket - else my userspace program won't be able to "bridge" incoming packets to tap0). > You can also hack net/core/dev.c to stop the packets from going > up the stack, but it requires more than just a new kernel module, > you'd have to actually change dev.c. (Search for BRIDGE). Hmm, now that you mention it: at least the 2.4.x kernels I use have the bridging code enabled. I'll take a look at possible hooks or other mechanisms that are used by the bridging code for its job - maybe this will help. Thanks for the hint. Bye, Mike From greearb@candelatech.com Sun Aug 15 11:18:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 11:18: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 i7FIImUh012725 for ; Sun, 15 Aug 2004 11:18: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 i7FIYjSb026626; Sun, 15 Aug 2004 11:34:45 -0700 Message-ID: <411FA902.8070402@candelatech.com> Date: Sun, 15 Aug 2004 11:18:42 -0700 From: Ben Greear Organization: Candela Technologies 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: Michael Renzmann CC: netdev@oss.sgi.com Subject: Re: Deleting incoming network packets / sk_buff References: <411E642C.9010708@web.de> <411E8EE4.70900@candelatech.com> <411FA5D0.6000004@web.de> In-Reply-To: <411FA5D0.6000004@web.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7791 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 Michael Renzmann wrote: > Bottom line: the easiest way to solve this problem would be to have some > way for blocking packets on eth1 from being processed (after they have > been passed to the packet socket - else my userspace program won't be > able to "bridge" incoming packets to tap0). Can't you have no IP on eth1 and have your IP on tap0 instead? That would at least keep any pkts received on eth1 from being processed by the IP stack. Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From vkondra@mail.ru Sun Aug 15 11:42:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 11:42:26 -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 i7FIgKRg013373 for ; Sun, 15 Aug 2004 11:42:21 -0700 Received: from [212.179.233.204] (port=11312 helo=[192.168.10.2]) by mx2.mail.ru with esmtp id 1BwPxM-000MlS-00; Sun, 15 Aug 2004 22:42:14 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: Re: [Prism54-devel] Re: [PATCH/RFC] set_rates support for prism54 Date: Sun, 15 Aug 2004 21:41:31 +0300 User-Agent: KMail/1.7 Cc: Denis Vlasenko , Margit Schubert-While , prism54-devel@prism54.org, mcgrof@studorgs.rutgers.edu, jgarzik@pobox.com References: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> <200408151949.01351.vkondra@mail.ru> <200408152012.18018.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200408152012.18018.vda@port.imtp.ilyichevsk.odessa.ua> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart13660570.kJMNPqysdf"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408152141.48877.vkondra@mail.ru> X-Spam: Not detected X-archive-position: 7792 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 --nextPart13660570.kJMNPqysdf Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline DV> > For supported and optional rate, IE (info element) format may be the best DV> > choice. DV> DV> I did not quite understand you, can you elaborate a bit? How card know what rates it can use? It parses "supported rates" IE (info=20 element) from beacon it gets from AP. My point, it is reasonable to use the= =20 same language to specify further restrictions. This way, we will speak the= =20 same language as standard do. In standard, there is no way to say "you can use PBCC, but not for rate 5.5= ".=20 PBCC is either permitted or not. For "good" hardware, there is no point of= =20 doing this. You may need to artificially restrict rate/modulation only if=20 hardware can't find best for current channel conditions, or, of course, for= =20 debug. But, I would say, for this cases, let's use debug hooks. Mainline=20 should be as close to standard as possible. It should be as generic as possible, also. Scheme you suggested is not very= =20 scalable. Think of TGn that would for sure add its tricks with modulation. = If=20 we start combining rate with modulation, we will shortly fall into too many= =20 options. Does it clarify my point? --nextPart13660570.kJMNPqysdf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBH65sqxdj7mhC6o0RAi2oAJ0SUm8JiqR9pAAO0eZKM0+5UfHysQCfW+P1 nDQusW70c6m3S80KD2O6RUU= =/shC -----END PGP SIGNATURE----- --nextPart13660570.kJMNPqysdf-- From romieu@fr.zoreil.com Sun Aug 15 11:53:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 11:53:34 -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 i7FIrQ81013761 for ; Sun, 15 Aug 2004 11:53:27 -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 i7FInc45009276; Sun, 15 Aug 2004 20:49:38 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7FIncd8009275; Sun, 15 Aug 2004 20:49:38 +0200 Date: Sun, 15 Aug 2004 20:49:38 +0200 From: Francois Romieu To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk Subject: Re: kernel-2.6.8.1 EIP is at velocity_netdev_event+0x16/0x50 Message-ID: <20040815184937.GA9105@electric-eye.fr.zoreil.com> References: <20040815095814.GA32195@trot.local> <20040815110625.GA2829@electric-eye.fr.zoreil.com> <20040815155457.GB32195@trot.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815155457.GB32195@trot.local> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7793 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 George Georgalis : [...] > ...that patch doesn't build > > 26674 Aug 15 06:51 ../20040815-2.6.8-via-velocity-test.patch The patch has been updated. Same location. [...] > Also note, I don't actually have one of these devices to test, I only > included it in case I come across one. Nobody's perfect. -- Ueimor From mrenzmann@web.de Sun Aug 15 11:56:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 11:57:00 -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 i7FIutO7014114 for ; Sun, 15 Aug 2004 11:56:55 -0700 Received: from xdsl-195-14-216-39.netcologne.de ([195.14.216.39] helo=web.de) by smtp08.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.101 #44) id 1BwQBO-0002wX-00; Sun, 15 Aug 2004 20:56:42 +0200 Message-ID: <411FB211.1050400@web.de> Date: Sun, 15 Aug 2004 20:57:21 +0200 From: Michael Renzmann User-Agent: Mozilla Thunderbird 0.5 (X11/20040304) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Greear CC: netdev@oss.sgi.com Subject: Re: Deleting incoming network packets / sk_buff References: <411E642C.9010708@web.de> <411E8EE4.70900@candelatech.com> <411FA5D0.6000004@web.de> <411FA902.8070402@candelatech.com> In-Reply-To: <411FA902.8070402@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Sender: mrenzmann@web.de X-archive-position: 7794 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 Hi. Ben Greear wrote: >> Bottom line: the easiest way to solve this problem would be to have >> some way for blocking packets on eth1 from being processed (after they >> have been passed to the packet socket - else my userspace program >> won't be able to "bridge" incoming packets to tap0). > Can't you have no IP on eth1 and have your IP on tap0 instead? That would > at least keep any pkts received on eth1 from being processed by the > IP stack. This is infact what I have done. The result is still that every packet will be dup'ed - which can be seen for example when pinging from that host, every reply is shown twice (and ping says "DUP" for every reply). Bye, Mike From vda@port.imtp.ilyichevsk.odessa.ua Sun Aug 15 11:58:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 11:58:23 -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 i7FIwH1B014415 for ; Sun, 15 Aug 2004 11:58:18 -0700 Received: (qmail 16606 invoked by alias); 3 Feb 1992 19:48:09 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 03 Feb 1992 19:48:09 -0000 From: Denis Vlasenko To: Vladimir Kondratiev , netdev@oss.sgi.com Subject: Re: [Prism54-devel] Re: [PATCH/RFC] set_rates support for prism54 Date: Sun, 15 Aug 2004 21:58:06 +0300 User-Agent: KMail/1.5.4 Cc: Margit Schubert-While , prism54-devel@prism54.org, mcgrof@studorgs.rutgers.edu, jgarzik@pobox.com References: <5.1.0.14.2.20040815145122.00afd708@pop.t-online.de> <200408152012.18018.vda@port.imtp.ilyichevsk.odessa.ua> <200408152141.48877.vkondra@mail.ru> In-Reply-To: <200408152141.48877.vkondra@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408152158.06344.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 7795 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 On Sunday 15 August 2004 21:41, Vladimir Kondratiev wrote: > DV> > For supported and optional rate, IE (info element) format may be the best > DV> > choice. > DV> > DV> I did not quite understand you, can you elaborate a bit? > > How card know what rates it can use? It parses "supported rates" IE (info > element) from beacon it gets from AP. My point, it is reasonable to use the > same language to specify further restrictions. This way, we will speak the > same language as standard do. And advantages of doing that are .... ? > In standard, there is no way to say "you can use PBCC, but not for rate > 5.5". PBCC is either permitted or not. For "good" hardware, there is no > point of doing this. You may need to artificially restrict rate/modulation > only if hardware can't find best for current channel conditions, or, of > course, for debug. But, I would say, for this cases, let's use debug hooks. You can consider set_rates a debug hook. For 'normal' use, just stick to "iwconfig rate" command. > Mainline should be as close to standard as possible. 802.11 does not say anything about OS interface to setting basic and operational rates. We are free to inmplement whatever we like. Of course, I do not propose sending anything non-standard. > It should be as generic as possible, also. Scheme you suggested is not very > scalable. It's much better than what we have now. "iwconfig rate" cover only a subset of AP configuration needs. How can I, say, diasllow 1 and 2 Mbit/s with iwconfig? > Think of TGn that would for sure add its tricks with modulation. > If we start combining rate with modulation, we will shortly fall into too > many options. I don't know what is TGn... sorry... However, adding new suffixes would not be a problem at all. -- vda From margitsw@t-online.de Sun Aug 15 12:09:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 12:09:37 -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 i7FJ9Ws1014865 for ; Sun, 15 Aug 2004 12:09:33 -0700 Received: from fwd04.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1BwQNd-0001u8-05; Sun, 15 Aug 2004 21:09:21 +0200 Received: from margit.t-online.de (XRsS08ZYoesn8Uxf8P44bs0EdmRbfDrSlSvoQXgXSYawHXWmeurowx@[217.224.17.225]) by fwd04.sul.t-online.com with esmtp id 1BwQNU-1z1Sam0; Sun, 15 Aug 2004 21:09:12 +0200 Message-Id: <5.1.0.14.2.20040815205413.02a70b28@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 15 Aug 2004 21:10:05 +0200 To: prism54-devel@prism54.org From: margitsw@t-online.de (Margit Schubert-While) Subject: Re: [PATCH/RFC] set_rates support for prism54 Cc: vda@port.imtp.ilyichevsk.odessa.ua, mcgrof@studorgs.rutgers.edu, netdev@oss.sgi.com, jgarzik@pobox.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: XRsS08ZYoesn8Uxf8P44bs0EdmRbfDrSlSvoQXgXSYawHXWmeurowx X-archive-position: 7796 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 Denis scribeth: > Ok. And then we will need to parse that data into format suitable for > prism54 in prism54 driver, and into format suitable for acx100/acx111 > in acx100 driver, etc... No, no. The format as it arrives at the driver should be fixed/defined. Exactly as happens to private ioctls now. Let's, for the sake of argument, say that we misuse the iw_freq structure. (We can/should define a new structure) iwpriv parses and sets up an iw_freq structure in the buffer that it passes for -each- rate. eg: freq.i = rate freq.m = modulation freq.e = basic/extended So, the driver gets a bunch of defined structures to act upon. Margit From george@galis.org Sun Aug 15 12:22:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 12:22:12 -0700 (PDT) Received: from dyn.galis.org (ool-44c1e325.dyn.optonline.net [68.193.227.37]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7FJM6B2018561 for ; Sun, 15 Aug 2004 12:22:07 -0700 Received: (qmail 7567 invoked by uid 1010); 15 Aug 2004 19:21:55 -0000 From: "George Georgalis" Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk, romieu@fr.zoreil.com Date: Sun, 15 Aug 2004 15:21:55 -0400 To: Francois Romieu Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk Subject: Re: kernel-2.6.8.1 EIP is at velocity_netdev_event+0x16/0x50 Message-ID: <20040815192155.GG32195@trot.local> References: <20040815095814.GA32195@trot.local> <20040815110625.GA2829@electric-eye.fr.zoreil.com> <20040815155457.GB32195@trot.local> <20040815184937.GA9105@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815184937.GA9105@electric-eye.fr.zoreil.com> X-archive-position: 7797 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: george@galis.org Precedence: bulk X-list: netdev On Sun, Aug 15, 2004 at 08:49:38PM +0200, Francois Romieu wrote: >George Georgalis : >[...] >> ...that patch doesn't build >> >> 26674 Aug 15 06:51 ../20040815-2.6.8-via-velocity-test.patch > >The patch has been updated. Same location. still no build... kernel-2.6.8.1 + 27253 Aug 15 14:31 ../20040815-2.6.8-via-velocity-test.patch CC arch/i386/pci/i386.o CC arch/i386/pci/pcbios.o CC arch/i386/pci/mmconfig.o CC arch/i386/pci/direct.o CC arch/i386/pci/fixup.o CC arch/i386/pci/acpi.o CC arch/i386/pci/legacy.o CC arch/i386/pci/irq.o CC arch/i386/pci/common.o LD arch/i386/pci/built-in.o GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 drivers/built-in.o: In function `wol_calc_crc': drivers/built-in.o(.text+0x69e02): undefined reference to `crc_ccitt' make: *** [.tmp_vmlinux1] Error 1 // George -- George Georgalis, Architect and administrator, Linux services. IXOYE http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org Key fingerprint = 5415 2738 61CF 6AE1 E9A7 9EF0 0186 503B 9831 1631 From romieu@fr.zoreil.com Sun Aug 15 12:41:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 12:41:32 -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 i7FJfPR3019162 for ; Sun, 15 Aug 2004 12:41:26 -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 i7FJeB45011129; Sun, 15 Aug 2004 21:40:11 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7FJeBTG011128; Sun, 15 Aug 2004 21:40:11 +0200 Date: Sun, 15 Aug 2004 21:40:11 +0200 From: Francois Romieu To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk Subject: Re: kernel-2.6.8.1 EIP is at velocity_netdev_event+0x16/0x50 Message-ID: <20040815194011.GB9105@electric-eye.fr.zoreil.com> References: <20040815095814.GA32195@trot.local> <20040815110625.GA2829@electric-eye.fr.zoreil.com> <20040815155457.GB32195@trot.local> <20040815184937.GA9105@electric-eye.fr.zoreil.com> <20040815192155.GG32195@trot.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815192155.GG32195@trot.local> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7798 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 George Georgalis : [...] > still no build... > > kernel-2.6.8.1 + > 27253 Aug 15 14:31 ../20040815-2.6.8-via-velocity-test.patch The patch has been updated. Same location. -- Ueimor From davem@redhat.com Sun Aug 15 19:10:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:10:54 -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 i7G2AjOU030461 for ; Sun, 15 Aug 2004 19:10:45 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2ASe1011764; Sun, 15 Aug 2004 22:10:28 -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 i7G2ARa28241; Sun, 15 Aug 2004 22:10:27 -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 i7G29a0J016231; Sun, 15 Aug 2004 22:09:37 -0400 Date: Sun, 15 Aug 2004 19:08:23 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815190823.654bf2d5.davem@redhat.com> In-Reply-To: <20040814050848.GA11874@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@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: 7799 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 Sat, 14 Aug 2004 15:08:48 +1000 Herbert Xu wrote: > I'm just going through all the __in_dev_get() callers and the one > in ip_route_output_slow() looks fishy. It appears to be checking > whether the subsequent inet_select_addr() calls will succeed or not. > > But this is not reliable since the addresses can always disappear > between the check and the actual call. > > Do we really care about the zero return value of inet_select_addr() > here? What about the other calls to inet_select_addr()? It won't return zero, typically it will return loopback's IP (with preference to any non-loopback addresses assigned to the loopback device). This is being used for source address selection. Also, when device ipv4 addresses are deleted, NETDEV_DOWN messages are broadcast to all the subsystems. One of the subsystems is FIB, which will disable IP on that interface if this is the last ipv4 address and it will also flush the routing cache immediately. However you are right that we may need to synchronize this more tightly. Hmmm.... From george@galis.org Sun Aug 15 19:17:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:17:08 -0700 (PDT) Received: from dyn.galis.org (ool-44c1e325.dyn.optonline.net [68.193.227.37]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7G2GxaW030863 for ; Sun, 15 Aug 2004 19:17:01 -0700 Received: (qmail 13110 invoked by uid 1010); 16 Aug 2004 02:16:48 -0000 From: "George Georgalis" Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk, romieu@fr.zoreil.com Date: Sun, 15 Aug 2004 22:16:48 -0400 To: Francois Romieu Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk Subject: Re: kernel-2.6.8.1 EIP is at velocity_netdev_event+0x16/0x50 Message-ID: <20040816021648.GA12929@trot.local> References: <20040815095814.GA32195@trot.local> <20040815110625.GA2829@electric-eye.fr.zoreil.com> <20040815155457.GB32195@trot.local> <20040815184937.GA9105@electric-eye.fr.zoreil.com> <20040815192155.GG32195@trot.local> <20040815194011.GB9105@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815194011.GB9105@electric-eye.fr.zoreil.com> X-archive-position: 7800 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: george@galis.org Precedence: bulk X-list: netdev On Sun, Aug 15, 2004 at 09:40:11PM +0200, Francois Romieu wrote: >George Georgalis : >[...] >> still no build... >> >> kernel-2.6.8.1 + >> 27253 Aug 15 14:31 ../20040815-2.6.8-via-velocity-test.patch > >The patch has been updated. Same location. Perfect, as long as it actually works. ;-) // George -- George Georgalis, Architect and administrator, Linux services. IXOYE http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org Key fingerprint = 5415 2738 61CF 6AE1 E9A7 9EF0 0186 503B 9831 1631 From davem@redhat.com Sun Aug 15 19:17:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:17: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 i7G2HDQQ030915 for ; Sun, 15 Aug 2004 19:17:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2Gxe1013010; Sun, 15 Aug 2004 22:16:59 -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 i7G2Gra29286; Sun, 15 Aug 2004 22:16:53 -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 i7G2G3HO017804; Sun, 15 Aug 2004 22:16:03 -0400 Date: Sun, 15 Aug 2004 19:14:50 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: neigh_create/inetdev_destroy race? Message-Id: <20040815191450.77532d5d.davem@redhat.com> In-Reply-To: <20040814062703.GA4806@gondor.apana.org.au> References: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040814062703.GA4806@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: 7801 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 Sat, 14 Aug 2004 16:27:03 +1000 Herbert Xu wrote: > Is there any thing that prevents the following scenario from occuring? > > CPU0 CPU1 > neigh_create > inet_del_ifa > notifier_call_chain > neigh_ifdown > inetdev_destroy > arp_constructor > neigh->parms = > in_dev->arp_parms > in_dev->dead = 1 > in_dev->dev->ip_ptr = > NULL > neigh_parms_release > n->parms->neigh_setup => BUG Is there anything other than hostess_sv11.c, sealevel.c, and shaper.c which are using n->parms->neigh_setup at all? This seems to be a very obscure special case hack, which perhaps we can removee entirely. From davem@redhat.com Sun Aug 15 19:21:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:21:12 -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 i7G2L4HH031514 for ; Sun, 15 Aug 2004 19:21:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2Kue1013781; Sun, 15 Aug 2004 22:20:56 -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 i7G2Kpa30100; Sun, 15 Aug 2004 22:20:51 -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 i7G2K0Bk018425; Sun, 15 Aug 2004 22:20:01 -0400 Date: Sun, 15 Aug 2004 19:18:47 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: netdev@oss.sgi.com Subject: Re: [PATCH] missing statics in atm Message-Id: <20040815191847.3d242356.davem@redhat.com> In-Reply-To: <20040814143324.GA26061@lst.de> References: <20040814143324.GA26061@lst.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: 7802 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 Sat, 14 Aug 2004 16:33:24 +0200 Christoph Hellwig wrote: > -struct net_device *clip_devs = NULL; > -struct atm_vcc *atmarpd = NULL; > +static struct net_device *clip_devs; > +static struct atm_vcc *atmarpd; ... > - > -extern struct net_device *clip_devs; > - Works for me. Patch applied, thanks Christoph. From herbert@gondor.apana.org.au Sun Aug 15 19:43:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:44: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 i7G2hr8m032200 for ; Sun, 15 Aug 2004 19:43:54 -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 1BwXTD-0002aE-00; Mon, 16 Aug 2004 12:43:35 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwXT8-00027N-00; Mon, 16 Aug 2004 12:43:30 +1000 Date: Mon, 16 Aug 2004 12:43:30 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040816024329.GA8127@gondor.apana.org.au> References: <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040815190823.654bf2d5.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815190823.654bf2d5.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7803 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 Sun, Aug 15, 2004 at 07:08:23PM -0700, David S. Miller wrote: > > > Do we really care about the zero return value of inet_select_addr() > > here? What about the other calls to inet_select_addr()? > > It won't return zero, typically it will return loopback's IP > (with preference to any non-loopback addresses assigned to > the loopback device). This is being used for source address > selection. It will return zero if there is no in_dev at all. Perhaps what we should do is get inet_select_addr() to get the address from other devices in that case as well? 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 davem@redhat.com Sun Aug 15 19:44:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:44:54 -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 i7G2ilqn032383 for ; Sun, 15 Aug 2004 19:44:47 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2iRe1018657; Sun, 15 Aug 2004 22:44:27 -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 i7G2iRa02951; Sun, 15 Aug 2004 22:44:27 -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 i7G2harm024374; Sun, 15 Aug 2004 22:43:36 -0400 Date: Sun, 15 Aug 2004 19:42:23 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com, devik@cdi.cz, hadi@cyberus.ca Subject: Re: [PATCH 0/4]: Scalable HFSC Message-Id: <20040815194223.18896b40.davem@redhat.com> In-Reply-To: <411E6F49.9030303@trash.net> References: <411E6F49.9030303@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: 7804 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 Sat, 14 Aug 2004 22:00:09 +0200 Patrick McHardy wrote: > These 4 patches for 2.4/2.6 make HFSC more scalable by using rbtree's > instead of sorted lists and an O(1) algorithm for adjusting childrens > vt-offset. With these patches HFSC with 1024 active sibling classes > performs only slightly worse (CPU-wise) than HTB. Each change has been > well tested in tcsim, so I think nothing should break. All applied, thanks Patrick. From davem@redhat.com Sun Aug 15 19:45:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:46: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 i7G2ju50000377 for ; Sun, 15 Aug 2004 19:45:56 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2jbe1018835; Sun, 15 Aug 2004 22:45: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 i7G2jRa03175; Sun, 15 Aug 2004 22:45:27 -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 i7G2ibCZ024638; Sun, 15 Aug 2004 22:44:37 -0400 Date: Sun, 15 Aug 2004 19:43:23 -0700 From: "David S. Miller" To: Herbert Xu Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3200] New: linux-2.6.8-rc4-mm1: IPv6-in-IPv6 undefined references Message-Id: <20040815194323.4f7b93eb.davem@redhat.com> In-Reply-To: References: <20040814233108.51a04d33.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: 7805 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 15 Aug 2004 17:41:36 +1000 Herbert Xu wrote: > Andrew Morton wrote: > > > > As module: > > > > ********** > > make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. > > CHK include/linux/compile.h > > Kernel: arch/i386/boot/bzImage is ready > > Building modules, stage 2. > > MODPOST > > *** Warning: "xfrm6_tunnel_deregister" [net/ipv6/ip6_tunnel.ko] undefined! > > *** Warning: "xfrm6_tunnel_register" [net/ipv6/ip6_tunnel.ko] undefined! > > This patch should fix it. Applied. From davem@redhat.com Sun Aug 15 19:48:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:48: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 i7G2mHfH000708 for ; Sun, 15 Aug 2004 19:48:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2m4e1019454; Sun, 15 Aug 2004 22:48:09 -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 i7G2lxa04122; Sun, 15 Aug 2004 22:47:59 -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 i7G2l9Yo025450; Sun, 15 Aug 2004 22:47:09 -0400 Date: Sun, 15 Aug 2004 19:45:55 -0700 From: "David S. Miller" To: Patrick McHardy Cc: lkml@lazy.shacknet.nu, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [Panic] 2.6.8 and ingress scheduling Message-Id: <20040815194555.1990f313.davem@redhat.com> In-Reply-To: <411F8B50.2020402@trash.net> References: <20040814175233.GA3617@lazy.shacknet.nu> <20040815130635.GA3703@lazy.shacknet.nu> <411F8B50.2020402@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: 7806 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 15 Aug 2004 18:12:00 +0200 Patrick McHardy wrote: > Fixed by this patch. qdisc_data was only aligned correctly in > qdisc_create_dflt(), > not qdisc_create() which resulted in memory corruption. Oops, thanks Patrick. Patch applied. From davem@redhat.com Sun Aug 15 19:55:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:55:47 -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 i7G2taZo001198 for ; Sun, 15 Aug 2004 19:55:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2tJe1020656; Sun, 15 Aug 2004 22:55:19 -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 i7G2tIa05570; Sun, 15 Aug 2004 22:55:18 -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 i7G2sRdi026897; Sun, 15 Aug 2004 22:54:27 -0400 Date: Sun, 15 Aug 2004 19:53:13 -0700 From: "David S. Miller" To: Herbert Xu Cc: jiva@ixiacom.com, users@lists.openswan.org, dev@lists.openswan.org, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [Openswan Users] Invalid argument NULL Message-Id: <20040815195313.31bacf13.davem@redhat.com> In-Reply-To: <20040815112548.GA2864@gondor.apana.org.au> References: <20040815112548.GA2864@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: 7807 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 15 Aug 2004 21:25:48 +1000 Herbert Xu wrote: > In any case, here is a really ugly patch to fill in those values for > xfrm_user. Please let me know of any clean-ups or better ways of doing > this. I've applied this for now. There is a lot of duplication around the xfrm structures of this kind of information. Thanks. From davem@redhat.com Sun Aug 15 19:56:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:56:46 -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 i7G2ufZA001389 for ; Sun, 15 Aug 2004 19:56:41 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2uTe1020879; Sun, 15 Aug 2004 22:56:29 -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 i7G2uTa05815; Sun, 15 Aug 2004 22:56: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 i7G2tcSx027396; Sun, 15 Aug 2004 22:55:39 -0400 Date: Sun, 15 Aug 2004 19:54:25 -0700 From: "David S. Miller" To: Herbert Xu Cc: jmorris@redhat.com, netdev@oss.sgi.com Subject: Re: [ESP] Only one algorithm is required Message-Id: <20040815195425.72332d01.davem@redhat.com> In-Reply-To: <20040814195639.GA25009@gondor.apana.org.au> References: <20040814105245.GA20646@gondor.apana.org.au> <20040814192412.GA24399@gondor.apana.org.au> <20040814195639.GA25009@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: 7808 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 15 Aug 2004 05:56:39 +1000 Herbert Xu wrote: > The way to get null algorithms through is to attach a non-null algorithm > with the name set to cipher_null/digest_null. > > However, we should fix IPv6 to allow null authentication algorithms. Applied. From davem@redhat.com Sun Aug 15 19:58:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 19:58:10 -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 i7G2w5dh001855 for ; Sun, 15 Aug 2004 19:58:06 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G2vte1021125; Sun, 15 Aug 2004 22:57:55 -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 i7G2voa05979; Sun, 15 Aug 2004 22:57:50 -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 i7G2v0LZ027625; Sun, 15 Aug 2004 22:57:00 -0400 Date: Sun, 15 Aug 2004 19:55:46 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [ESP] Only one algorithm is required Message-Id: <20040815195546.1e1ae36a.davem@redhat.com> In-Reply-To: <20040814104807.GA20572@gondor.apana.org.au> References: <20040814104807.GA20572@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: 7809 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 Sat, 14 Aug 2004 20:48:07 +1000 Herbert Xu wrote: > I've also added encap_type checks for every transform. This means > that people attaching encap objects to AH/IPCOMP/IPIP will now get > errors. That should be fine as no major KM does this. > > Please note that the error returned is now EINVAL instead of > ENOPROTOOPT. This shouldn't break anything since KMs only test > the errno from setsockopt() for NAT-T support rather than add_sa > where it would be too late anyway. Applied. From davem@redhat.com Sun Aug 15 20:00:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:00:46 -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 i7G30fKq002251 for ; Sun, 15 Aug 2004 20:00:42 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G30Pe1021523; Sun, 15 Aug 2004 23:00:25 -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 i7G30Pa06454; Sun, 15 Aug 2004 23:00:25 -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 i7G2xYlu028058; Sun, 15 Aug 2004 22:59:34 -0400 Date: Sun, 15 Aug 2004 19:58:20 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815195820.6b79b3fc.davem@redhat.com> In-Reply-To: <20040814003428.GA17760@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@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: 7810 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 Sat, 14 Aug 2004 10:34:28 +1000 Herbert Xu wrote: > BTW, it looks like you can remove inetdev_lock altogether. All its > users already assume that they don't race against each other by > taking the rtnl lock. I think it's needed at least for the: dev->ip_ptr = idev; in_dev_get(idev); thing, isn't it? From davem@redhat.com Sun Aug 15 20:02:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:02: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 i7G329pL002574 for ; Sun, 15 Aug 2004 20:02:09 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G31ue1021826; Sun, 15 Aug 2004 23:01:56 -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 i7G31ua06903; Sun, 15 Aug 2004 23:01: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 i7G3164R028435; Sun, 15 Aug 2004 23:01:06 -0400 Date: Sun, 15 Aug 2004 19:59:52 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815195952.61f8a29b.davem@redhat.com> In-Reply-To: <20040814005411.GA18350@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@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: 7811 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 Sat, 14 Aug 2004 10:54:11 +1000 Herbert Xu wrote: > On Fri, Aug 13, 2004 at 05:39:24PM -0700, David S. Miller wrote: > > > > Yes and I cured the one typo in it two, idev-->in_dev :-) > > Two birds with one stone :) > > Here is a trivial optimisation for irda to since it doesn't hold > onto the idev. Applied. From davem@redhat.com Sun Aug 15 20:03:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:03: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 i7G33OMt002905 for ; Sun, 15 Aug 2004 20:03:24 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G33Ce1022129; Sun, 15 Aug 2004 23:03:12 -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 i7G33Ba07291; Sun, 15 Aug 2004 23:03:12 -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 i7G32LR2028581; Sun, 15 Aug 2004 23:02:21 -0400 Date: Sun, 15 Aug 2004 20:01:07 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815200107.08f76718.davem@redhat.com> In-Reply-To: <20040814013030.GA2042@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@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: 7812 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 Sat, 14 Aug 2004 11:30:30 +1000 Herbert Xu wrote: > Here are some more ifa_list fixes outside net/ipv4. Applied. From davem@redhat.com Sun Aug 15 20:06:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:06:20 -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 i7G36FTj003258 for ; Sun, 15 Aug 2004 20:06:15 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G361e1022729; Sun, 15 Aug 2004 23:06:01 -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 i7G361a07831; Sun, 15 Aug 2004 23:06:01 -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 i7G35AjF029176; Sun, 15 Aug 2004 23:05:11 -0400 Date: Sun, 15 Aug 2004 20:03:57 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815200357.6593e861.davem@redhat.com> In-Reply-To: <20040814014048.GA2746@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814014048.GA2746@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: 7813 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 Sat, 14 Aug 2004 11:40:48 +1000 Herbert Xu wrote: > Since nobody calls inet_free_ifa directly anymore, we can > perform the following simplification. You need to redo this patch because the 3-arg call_rcu() bits are in there. From herbert@gondor.apana.org.au Sun Aug 15 20:08:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:09: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 i7G38qXZ003583 for ; Sun, 15 Aug 2004 20:08:54 -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 1BwXrJ-0002q8-00; Mon, 16 Aug 2004 13:08:29 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwXrG-0002BZ-00; Mon, 16 Aug 2004 13:08:26 +1000 Date: Mon, 16 Aug 2004 13:08:26 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040816030826.GA8341@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040815195820.6b79b3fc.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815195820.6b79b3fc.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7814 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 Sun, Aug 15, 2004 at 07:58:20PM -0700, David S. Miller wrote: > On Sat, 14 Aug 2004 10:34:28 +1000 > Herbert Xu wrote: > > > BTW, it looks like you can remove inetdev_lock altogether. All its > > users already assume that they don't race against each other by > > taking the rtnl lock. > > I think it's needed at least for the: > > dev->ip_ptr = idev; > in_dev_get(idev); You mean in_dev_hold? > thing, isn't it? I don't think so. But there is a real bug here :) The lock doesn't really do much since everyone who's holding it (they're all in devinet.c) already hold the RTNL lock (the rotten old lock perhaps :) But the RCU change has created a real bug here. Imagine this: CPU0 CPU1 inetdev_init dev->ip_ptr = idev in_dev_get atomic_inc on refcnt in_dev_put => frees idev in_dev_hold(idev) => BUG So we should reverse the two statements and add an smp_wmb(). Unfortunately the lock doesn't really help you at all. 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 davem@redhat.com Sun Aug 15 20:10:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:11: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 i7G3AvNY003995 for ; Sun, 15 Aug 2004 20:10:58 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G3Age1023760; Sun, 15 Aug 2004 23:10:42 -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 i7G3Aga08652; Sun, 15 Aug 2004 23:10:42 -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 i7G39qLR029885; Sun, 15 Aug 2004 23:09:52 -0400 Date: Sun, 15 Aug 2004 20:08:38 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815200838.1f971350.davem@redhat.com> In-Reply-To: <20040816024329.GA8127@gondor.apana.org.au> References: <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040815190823.654bf2d5.davem@redhat.com> <20040816024329.GA8127@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: 7815 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 16 Aug 2004 12:43:30 +1000 Herbert Xu wrote: > It will return zero if there is no in_dev at all. Perhaps what > we should do is get inet_select_addr() to get the address from > other devices in that case as well? It does that now, look at how it iterates over dev_base's list. From herbert@gondor.apana.org.au Sun Aug 15 20:15:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:15: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 i7G3FKjE004344 for ; Sun, 15 Aug 2004 20:15: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 1BwXxa-0002tn-00; Mon, 16 Aug 2004 13:14:58 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwXxY-0002DD-00; Mon, 16 Aug 2004 13:14:56 +1000 Date: Mon, 16 Aug 2004 13:14:56 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040816031456.GA8493@gondor.apana.org.au> References: <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040815190823.654bf2d5.davem@redhat.com> <20040816024329.GA8127@gondor.apana.org.au> <20040815200838.1f971350.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <20040815200838.1f971350.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7816 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 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 15, 2004 at 08:08:38PM -0700, David S. Miller wrote: > On Mon, 16 Aug 2004 12:43:30 +1000 > Herbert Xu wrote: > > > It will return zero if there is no in_dev at all. Perhaps what > > we should do is get inet_select_addr() to get the address from > > other devices in that case as well? > > It does that now, look at how it iterates over dev_base's > list. But not if __in_dev_get() == NULL. The following patch should express that more clearly. 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 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/devinet.c 1.38 vs edited ===== --- 1.38/net/ipv4/devinet.c 2004-08-14 14:50:31 +10:00 +++ edited/net/ipv4/devinet.c 2004-08-16 13:13:44 +10:00 @@ -780,7 +780,7 @@ rcu_read_lock(); in_dev = __in_dev_get(dev); if (!in_dev) - goto out_unlock_inetdev; + goto no_in_dev; for_primary_ifa(in_dev) { if (ifa->ifa_scope > scope) @@ -792,6 +792,7 @@ if (!addr) addr = ifa->ifa_local; } endfor_ifa(in_dev); +no_in_dev: rcu_read_unlock(); if (addr) @@ -817,7 +818,6 @@ } out_unlock_both: read_unlock(&dev_base_lock); -out_unlock_inetdev: rcu_read_unlock(); out: return addr; --DocE+STaALJfprDB-- From herbert@gondor.apana.org.au Sun Aug 15 20:24:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 20:24: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 i7G3OGOU007893 for ; Sun, 15 Aug 2004 20:24: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 1BwY69-0002vp-00; Mon, 16 Aug 2004 13:23:49 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwY64-0002G6-00; Mon, 16 Aug 2004 13:23:44 +1000 Date: Mon, 16 Aug 2004 13:23:44 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040816032344.GA8666@gondor.apana.org.au> References: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814014048.GA2746@gondor.apana.org.au> <20040815200357.6593e861.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20040815200357.6593e861.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7817 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 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 15, 2004 at 08:03:57PM -0700, David S. Miller wrote: > On Sat, 14 Aug 2004 11:40:48 +1000 > Herbert Xu wrote: > > > Since nobody calls inet_free_ifa directly anymore, we can > > perform the following simplification. > > You need to redo this patch because the 3-arg call_rcu() bits > are in there. Sorry. Here it is again. 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 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=q ===== net/ipv4/devinet.c 1.34 vs 1.38 ===== --- 1.34/net/ipv4/devinet.c 2004-08-14 08:36:53 +10:00 +++ 1.38/net/ipv4/devinet.c 2004-08-14 14:50:31 +10:00 @@ -104,18 +104,17 @@ return ifa; } -static inline void inet_free_ifa(struct in_ifaddr *ifa) +static void inet_rcu_free_ifa(struct rcu_head *head) { + struct in_ifaddr *ifa = container_of(head, struct in_ifaddr, rcu_head); if (ifa->ifa_dev) in_dev_put(ifa->ifa_dev); kfree(ifa); } -static void inet_rcu_free_ifa(struct rcu_head *head) +static inline void inet_free_ifa(struct in_ifaddr *ifa) { - struct in_ifaddr *ifa = container_of(head, struct in_ifaddr, rcu_head); - - inet_free_ifa(ifa); + call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); } void in_dev_finish_destroy(struct in_device *idev) @@ -195,7 +194,7 @@ while ((ifa = in_dev->ifa_list) != NULL) { inet_del_ifa(in_dev, &in_dev->ifa_list, 0); - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa); } #ifdef CONFIG_SYSCTL @@ -255,7 +253,7 @@ rtmsg_ifa(RTM_DELADDR, ifa); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa); - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa); } } @@ -278,7 +276,7 @@ rtmsg_ifa(RTM_DELADDR, ifa1); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); if (destroy) { - call_rcu(&ifa1->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa1); if (!in_dev->ifa_list) inetdev_destroy(in_dev); @@ -293,7 +291,7 @@ ASSERT_RTNL(); if (!ifa->ifa_local) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa); return 0; } @@ -308,11 +306,11 @@ if (ifa1->ifa_mask == ifa->ifa_mask && inet_ifa_match(ifa1->ifa_address, ifa)) { if (ifa1->ifa_local == ifa->ifa_local) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa); return -EEXIST; } if (ifa1->ifa_scope != ifa->ifa_scope) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa); return -EINVAL; } ifa->ifa_flags |= IFA_F_SECONDARY; @@ -347,7 +345,7 @@ if (!in_dev) { in_dev = inetdev_init(dev); if (!in_dev) { - call_rcu(&ifa->rcu_head, inet_rcu_free_ifa); + inet_free_ifa(ifa); return -ENOBUFS; } } --+HP7ph2BbKc20aGI-- From zwane@linuxpower.ca Sun Aug 15 22:01:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 22:01:41 -0700 (PDT) Received: from dsl.commfireservices.com (dragnfire.mtl.istop.com [66.11.160.179]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7G51XeC010794 for ; Sun, 15 Aug 2004 22:01:34 -0700 Received: from [192.168.7.6] (zwane.zwane.ca [192.168.7.6]) by dsl.commfireservices.com (Postfix) with ESMTP id BAD1C107B2C; Mon, 16 Aug 2004 01:00:01 -0400 (EDT) Date: Mon, 16 Aug 2004 01:05:25 -0400 (EDT) From: Zwane Mwaikambo To: "David S. Miller" Cc: Benjamin Herrenschmidt , Christoph Hellwig , netdev@oss.sgi.com, Linux Kernel , Andrew Morton Subject: Re: [PATCH][2.6] Move Sungem to gige menu In-Reply-To: <20040815170022.2c3ec056.davem@redhat.com> Message-ID: References: <20040815104900.A805@infradead.org> <20040815162129.A2700@infradead.org> <1092608813.9536.21.camel@gaston> <20040815170022.2c3ec056.davem@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7818 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: zwane@linuxpower.ca Precedence: bulk X-list: netdev On Sun, 15 Aug 2004, David S. Miller wrote: > On Mon, 16 Aug 2004 08:26:53 +1000 > Benjamin Herrenschmidt wrote: > > > I suppose the ones used by Sun are all gigabit tho. > > Actually no, the ones onboard in the SunBlade100 are > 10/100 only. How about; Index: linux-2.6.8/drivers/net/Kconfig =================================================================== RCS file: /home/cvsroot/linux-2.6.8/drivers/net/Kconfig,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 Kconfig --- linux-2.6.8/drivers/net/Kconfig 14 Aug 2004 17:53:39 -0000 1.1.1.1 +++ linux-2.6.8/drivers/net/Kconfig 16 Aug 2004 04:53:44 -0000 @@ -159,11 +159,11 @@ endif # Ethernet # -menu "Ethernet (10 or 100Mbit)" +menu "Ethernet (10/100/1000Mbit)" depends on NETDEVICES config NET_ETHERNET - bool "Ethernet (10 or 100Mbit)" + bool "Ethernet (10/100/1000Mbit)" ---help--- Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common type of Local Area Network (LAN) in universities and companies. @@ -1878,15 +1878,6 @@ config NE_H8300 source "drivers/net/fec_8xx/Kconfig" -endmenu - -# -# Gigabit Ethernet -# - -menu "Ethernet (1000 Mbit)" - depends on NETDEVICES - config ACENIC tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support" depends on PCI From davem@redhat.com Sun Aug 15 23:24:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 23:24:28 -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 i7G6OLFI015106 for ; Sun, 15 Aug 2004 23:24:22 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G6O1e1027322; Mon, 16 Aug 2004 02:24:01 -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 i7G6O1a14752; Mon, 16 Aug 2004 02:24:01 -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 i7G6NAMG009739; Mon, 16 Aug 2004 02:23:10 -0400 Date: Sun, 15 Aug 2004 23:21:53 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815232153.54e95346.davem@redhat.com> In-Reply-To: <20040816030826.GA8341@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040815195820.6b79b3fc.davem@redhat.com> <20040816030826.GA8341@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: 7819 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 16 Aug 2004 13:08:26 +1000 Herbert Xu wrote: > So we should reverse the two statements and add an smp_wmb(). I totally agree, and let's kill the lock too since it is in fact useless now. I've done this as follows: # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/15 23:08:21-07:00 davem@nuts.davemloft.net # [IPV4]: Kill inetdev_lock, no longer needed. # # It no longer protects anything, all users held RTNL # semaphore to boot. Also, fix a potential race in the # new RCU inetdev code, grab the reference on the idev # before attaching it via dev->ip_ptr. # # Based upon discussions with Herbert Xu. # # Signed-off-by: David S. Miller # # net/ipv4/devinet.c # 2004/08/15 23:07:17-07:00 davem@nuts.davemloft.net +6 -14 # [IPV4]: Kill inetdev_lock, no longer needed. # diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c 2004-08-15 23:08:59 -07:00 +++ b/net/ipv4/devinet.c 2004-08-15 23:08:59 -07:00 @@ -90,8 +90,6 @@ /* Locks all the inet devices. */ -static spinlock_t inetdev_lock = SPIN_LOCK_UNLOCKED; - static struct in_ifaddr *inet_alloc_ifa(void) { struct in_ifaddr *ifa = kmalloc(sizeof(*ifa), GFP_KERNEL); @@ -158,11 +156,12 @@ neigh_sysctl_register(dev, in_dev->arp_parms, NET_IPV4, NET_IPV4_NEIGH, "ipv4", NULL); #endif - spin_lock_bh(&inetdev_lock); - dev->ip_ptr = in_dev; + /* Account for reference dev->ip_ptr */ in_dev_hold(in_dev); - spin_unlock_bh(&inetdev_lock); + smp_wmb(); + dev->ip_ptr = in_dev; + #ifdef CONFIG_SYSCTL devinet_sysctl_register(in_dev, &in_dev->cnf); #endif @@ -201,10 +200,8 @@ #ifdef CONFIG_SYSCTL devinet_sysctl_unregister(&in_dev->cnf); #endif - spin_lock_bh(&inetdev_lock); + in_dev->dev->ip_ptr = NULL; - /* in_dev_put following below will kill the in_device */ - spin_unlock_bh(&inetdev_lock); #ifdef CONFIG_SYSCTL neigh_sysctl_unregister(in_dev->arp_parms); @@ -248,9 +245,8 @@ ifap1 = &ifa->ifa_next; continue; } - spin_lock_bh(&inetdev_lock); + *ifap1 = ifa->ifa_next; - spin_unlock_bh(&inetdev_lock); rtmsg_ifa(RTM_DELADDR, ifa); notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa); @@ -260,9 +256,7 @@ /* 2. Unlink it */ - spin_lock_bh(&inetdev_lock); *ifap = ifa1->ifa_next; - spin_unlock_bh(&inetdev_lock); /* 3. Announce address deletion */ @@ -324,9 +318,7 @@ } ifa->ifa_next = *ifap; - spin_lock_bh(&inetdev_lock); *ifap = ifa; - spin_unlock_bh(&inetdev_lock); /* Send message first, then call notifier. Notifier will trigger FIB update, so that From davem@redhat.com Sun Aug 15 23:26:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 23:26: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 i7G6QFFf015331 for ; Sun, 15 Aug 2004 23:26:16 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G6Q3e1027678; Mon, 16 Aug 2004 02:26:03 -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 i7G6Q3a15130; Mon, 16 Aug 2004 02:26:03 -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 i7G6PDDA010022; Mon, 16 Aug 2004 02:25:13 -0400 Date: Sun, 15 Aug 2004 23:23:56 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815232356.13858077.davem@redhat.com> In-Reply-To: <20040816031456.GA8493@gondor.apana.org.au> References: <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040815190823.654bf2d5.davem@redhat.com> <20040816024329.GA8127@gondor.apana.org.au> <20040815200838.1f971350.davem@redhat.com> <20040816031456.GA8493@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: 7820 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 16 Aug 2004 13:14:56 +1000 Herbert Xu wrote: > But not if __in_dev_get() == NULL. The following patch should > express that more clearly. Agreed, and applied. Thanks Herbert. From davem@redhat.com Sun Aug 15 23:27:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 23:27:23 -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 i7G6RH4c015605 for ; Sun, 15 Aug 2004 23:27:18 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G6R1e1027845; Mon, 16 Aug 2004 02:27:01 -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 i7G6R1a15319; Mon, 16 Aug 2004 02:27:01 -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 i7G6QBYN010196; Mon, 16 Aug 2004 02:26:11 -0400 Date: Sun, 15 Aug 2004 23:24:54 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-Id: <20040815232454.5d3fbf51.davem@redhat.com> In-Reply-To: <20040816032344.GA8666@gondor.apana.org.au> References: <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814014048.GA2746@gondor.apana.org.au> <20040815200357.6593e861.davem@redhat.com> <20040816032344.GA8666@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: 7821 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 16 Aug 2004 13:23:44 +1000 Herbert Xu wrote: > On Sun, Aug 15, 2004 at 08:03:57PM -0700, David S. Miller wrote: > > On Sat, 14 Aug 2004 11:40:48 +1000 > > Herbert Xu wrote: > > > > > Since nobody calls inet_free_ifa directly anymore, we can > > > perform the following simplification. > > > > You need to redo this patch because the 3-arg call_rcu() bits > > are in there. > > Sorry. Here it is again. Thanks for fixing that up, applied. From davem@redhat.com Sun Aug 15 23:30:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 15 Aug 2004 23:30: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 i7G6UHFR016100 for ; Sun, 15 Aug 2004 23:30:18 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7G6U2e1028488; Mon, 16 Aug 2004 02:30: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 i7G6U2a16204; Mon, 16 Aug 2004 02:30: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 i7G6TAuX011714; Mon, 16 Aug 2004 02:29:11 -0400 Date: Sun, 15 Aug 2004 23:27:54 -0700 From: "David S. Miller" To: Andi Kleen Cc: shemminger@osdl.org, alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, greearb@candelatech.com Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040815232754.2464e731.davem@redhat.com> In-Reply-To: <20040813212857.7dd50320.ak@suse.de> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040812124854.646f1936.davem@redhat.com> <20040813115140.0f09d889@dell_ss3.pdx.osdl.net> <20040813212857.7dd50320.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: 7822 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 Fri, 13 Aug 2004 21:28:57 +0200 Andi Kleen wrote: > On Fri, 13 Aug 2004 11:51:40 -0700 > Stephen Hemminger wrote: > > > Here is another alternative, using tansworthe generator. It uses percpu > > state. The one small semantic change is the net_srandom() only affects > > the current cpu's seed. The problem was that having it change all cpu's > > seed would mean adding locking > > I would just update the other CPUs without locking. Taking > a random number from a partially updated state shouldn't be a big > issue. I personally don't think we need to touch the other cpus at all, and that having a different current seed on each cpu might actually be a good thing. Stephen, I like this one a lot, especially compared to what we had before. I'm going to add this to my tree for the time being. From ja@ssi.bg Mon Aug 16 00:05:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 00:05:27 -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 i7G75BCs017515 for ; Mon, 16 Aug 2004 00:05:18 -0700 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i7G75sqY002853; Mon, 16 Aug 2004 10:05:55 +0300 Date: Mon, 16 Aug 2004 10:05:54 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: Wensong Zhang cc: netdev@oss.sgi.com Subject: [PATCH 2.6.8] ipvs - do not use skb_checksum_help Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7823 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 Hello, The skb_checksum_help calls are not appropriate for IPVS. There is already code to check and alter the ip_summed field on packet mangling and the only thing that is needed is to ensure ip_summed is valid for output path if the packet is not mangled. In such case we do not validate checksum and forward the packet claiming it is with valid checksum. Apply after ack from Wensong. Signed-off-by: Julian Anastasov diff -ur v2.6.8/linux/net/ipv4/ipvs/ip_vs_core.c linux/net/ipv4/ipvs/ip_vs_core.c --- v2.6.8/linux/net/ipv4/ipvs/ip_vs_core.c 2004-06-16 23:54:06.000000000 +0300 +++ linux/net/ipv4/ipvs/ip_vs_core.c 2004-08-16 09:35:01.317806616 +0300 @@ -735,13 +735,6 @@ if (skb->nfcache & NFC_IPVS_PROPERTY) return NF_ACCEPT; - if (skb->ip_summed == CHECKSUM_HW) { - if (skb_checksum_help(pskb, (out == NULL))) - return NF_DROP; - if (skb != *pskb) - skb = *pskb; - } - iph = skb->nh.iph; if (unlikely(iph->protocol == IPPROTO_ICMP)) { int related, verdict = ip_vs_out_icmp(pskb, &related); @@ -981,13 +974,6 @@ return NF_ACCEPT; } - if (skb->ip_summed == CHECKSUM_HW) { - if (skb_checksum_help(pskb, (out == NULL))) - return NF_DROP; - if (skb != *pskb) - skb = *pskb; - } - iph = skb->nh.iph; if (unlikely(iph->protocol == IPPROTO_ICMP)) { int related, verdict = ip_vs_in_icmp(pskb, &related); diff -ur v2.6.8/linux/net/ipv4/ipvs/ip_vs_xmit.c linux/net/ipv4/ipvs/ip_vs_xmit.c --- v2.6.8/linux/net/ipv4/ipvs/ip_vs_xmit.c 2004-08-14 11:08:13.000000000 +0300 +++ linux/net/ipv4/ipvs/ip_vs_xmit.c 2004-08-16 09:37:26.024807808 +0300 @@ -128,6 +128,7 @@ #define IP_VS_XMIT(skb, rt) \ do { \ (skb)->nfcache |= NFC_IPVS_PROPERTY; \ + (skb)->ip_summed = CHECKSUM_NONE; \ NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, (skb), NULL, \ (rt)->u.dst.dev, dst_output); \ } while (0) @@ -412,8 +413,6 @@ ip_select_ident(iph, &rt->u.dst, NULL); ip_send_check(iph); - skb->ip_summed = CHECKSUM_NONE; - /* Another hack: avoid icmp_send in ip_fragment */ skb->local_df = 1; From laforge@netfilter.org Mon Aug 16 00:20:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 00:21: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 i7G7Klbj021474 for ; Mon, 16 Aug 2004 00:20:48 -0700 Received: from dsl-082-082-096-124.arcor-ip.net ([82.82.96.124] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BwbnM-0005gc-IW; Mon, 16 Aug 2004 09:20:40 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BwbnE-0005gJ-OQ; Mon, 16 Aug 2004 09:20:32 +0200 Date: Mon, 16 Aug 2004 09:20:32 +0200 From: Harald Welte To: jamal Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail Message-ID: <20040816072032.GH15418@sunbeam2> Mail-Followup-To: Harald Welte , jamal , sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/hzbcv1ZPoZ/SOgH" Content-Disposition: inline In-Reply-To: <1092401484.1043.30.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7824 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 --/hzbcv1ZPoZ/SOgH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [removing lots of people from the Cc, since they are definitely on netdev and don't need to be Cc'ed at this state] Hi Jamal! On Fri, Aug 13, 2004 at 08:51:24AM -0400, jamal wrote: > Alessandro, >=20 > This summary applies to all your patches: Too many changes that seem > unnecessary. Take a deep breath. I'm actually not as pessimistic about all his changes. Allesandro's ultimate goal seems to be connection-based accounting that accounts precisely which packets have actually hit the outgoing wire. While I'm quite happy with the now in-kernel conntrack accounting (basedo on Rx rather than Tx packets/bytes), this is a different definition of accounting. Let's discuss the individual patches seperately. 1) Is certainly not a huge issue, no debate here 2) I am not as familiar with the tc/scheduler code as you are, but I also think that what he is trying to achieve is a valid goal. He tries to make all tc-related packet drops go to a single code path for packet dropping. Independent of Allesandro's implementation, I would really like to see something like this. We once had an experimental patch called the 'dropped hook' that would be traversed for all packets dropped somewhere in the stack (for auditing in userspace, whatever). Having a single packet drop point makes such a change less intrusive. 3) Is already in davem's tree, no need for discusion ;) 4) This is the part you are complaining about, right? I agree, I don't like conntrack specific stuff in dev.c and packet scheduler areas. > cheers, > jamal --=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 --/hzbcv1ZPoZ/SOgH 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) iD8DBQFBIGBAXaXGVTD0i/8RAs5RAJ0b+wYGtfWAoYaj4cAhJ17kO1ufTwCfSPH2 DjWXbTzwa6cEmfcVnOmBFS8= =PXbM -----END PGP SIGNATURE----- --/hzbcv1ZPoZ/SOgH-- From laforge@netfilter.org Mon Aug 16 00:35:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 00:35:51 -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 i7G7Zf9b021994 for ; Mon, 16 Aug 2004 00:35:41 -0700 Received: from dsl-082-082-096-124.arcor-ip.net ([82.82.96.124] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1Bwc1m-000626-JD; Mon, 16 Aug 2004 09:35:34 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1Bwc1i-0005h7-NY; Mon, 16 Aug 2004 09:35:30 +0200 Date: Mon, 16 Aug 2004 09:35:30 +0200 From: Harald Welte To: jamal Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail Message-ID: <20040816073530.GI15418@sunbeam2> Mail-Followup-To: Harald Welte , jamal , sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <411CCB98.4080904@crocetta.org> <1092518370.2876.3.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CjAlqr6ZqJYkDGFX" Content-Disposition: inline In-Reply-To: <1092518370.2876.3.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7825 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 --CjAlqr6ZqJYkDGFX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 14, 2004 at 05:21:31PM -0400, jamal wrote: > > the conntrack stuff (actually that little part of code that adds=20 > > unbilling to ACCT in case of a drop) is something that comes later=20 > > (patch 4) and is not in the pkt sched part. please, don't let it=20 > > divert your mind from the real point. just forget it for the moment... > > [in any case it is _not_ in the pkt sched area and as i said in mail= =20 > > 4/4 i don't like to put the variables into dev.c, that's why i am=20 > > there asking for alternatives] >=20 > This actually seems to be the core issue.=20 > Correct me if i misunderstood what you are trying to achieve:=20 > Somewhere above, the netfilter code bills some packet. Packet gets=20 > all the way to the scheduler on egress. > Scheduler drops packet although it has been billed already. > You being a man looking for justice ;-> decides that was unfair and > you are trying to undo it. Is this accurate? Yes, that's how I understoo Allesandro's efforts. While I don't think it's worth being that precise (and rather change the definition of what is being accounted to 'number of packets/bytes recevived in this flow'). > Also is their a corrective factor that happens once the _accounting_=20 > data has been shipped? Example:=20 > - account for packet > - ship accounting data to some billing server > - oops, unbill > - what now?=20 Yes, this is a race condition. However, I don't this is not very likely to occurr, since the accounting data is by default only sent to userspace via ctnetlink once the connection tracking entry is deleted. Yes, you can read it while the connection is still alive, but this will not reset/update the counters, but rather give you a current snapshot. If you send this to your accounting server, the accounting server has to cope with the fact that this intermediate snapshot can be updated by some later data. It SHOULD not care whether this later data for the same flow has bigger or smaller byte/packet counters. [and it is very unlikely that the total will be lower, since then in the timeframe [snapshot, terminations] more packets have to be dropped than accepted. Still, if this is documented with ctnetlink I'm perfectly fine which such behaviour. > BTW, what happens if you clone the packet below netfilter and send > several copies of it possibly over several different interfaces? This > may happen with tc extensions. oh yes, I think somebody has written a similar iptables target, too. I'm not sure whether there is a good solution for the 'unbill' feature. Do you have any thoughts/recommendations for this? > I think accounting is important - especially if it is almost free with > contracking. Totally agreed. =20 The reason for not delaying accounting update until qdisc has happened is locking. Then we would have to re-grab the conntrack write lock to make the counter update... whrereas in my patch counter updates happen while we are already under write lock for the timer/timeout update. > Lets talk about this issue first instead of confusing it with everything > else you have in other patches. Also, if this 'unbill' feature gets into the kernel in some form, I would definitely make it a CONFIG_ or sysctl... after all people could be interested in the Rx side only... =20 > cheers, > jamal --=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 --CjAlqr6ZqJYkDGFX 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) iD8DBQFBIGPCXaXGVTD0i/8RAuBqAJwMLWyrXpq50hxNF2yjkltUjau+xwCfeZWc A2CGgAmva/zqWXH3/lrWzeg= =Hddh -----END PGP SIGNATURE----- --CjAlqr6ZqJYkDGFX-- From herbert@gondor.apana.org.au Mon Aug 16 01:14:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 01:14: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 i7G8EFYY030373 for ; Mon, 16 Aug 2004 01:14:16 -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 1Bwccu-0004wu-00; Mon, 16 Aug 2004 18:13:56 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bwccs-0002hz-00; Mon, 16 Aug 2004 18:13:54 +1000 Date: Mon, 16 Aug 2004 18:13:54 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Move inetdev/ifa over to RCU Message-ID: <20040816081354.GA10400@gondor.apana.org.au> References: <20040812165954.00429e65.davem@redhat.com> <20040813090314.448c971d@dell_ss3.pdx.osdl.net> <20040813093838.6961c0d4.davem@redhat.com> <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040815195820.6b79b3fc.davem@redhat.com> <20040816030826.GA8341@gondor.apana.org.au> <20040815232153.54e95346.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815232153.54e95346.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7826 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 Sun, Aug 15, 2004 at 11:21:53PM -0700, David S. Miller wrote: > > I totally agree, and let's kill the lock too since it is > in fact useless now. I've done this as follows: That looks great. Thanks Dave. -- 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 Mon Aug 16 03:51:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 03:52: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 i7GApoYe004820 for ; Mon, 16 Aug 2004 03:51: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 1Bwf5R-0006BK-00; Mon, 16 Aug 2004 20:51:33 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bwf5P-0002wi-00; Mon, 16 Aug 2004 20:51:31 +1000 Date: Mon, 16 Aug 2004 20:51:31 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: neigh_create/inetdev_destroy race? Message-ID: <20040816105131.GA11299@gondor.apana.org.au> References: <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040814062703.GA4806@gondor.apana.org.au> <20040815191450.77532d5d.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815191450.77532d5d.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7828 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: 1232 Lines: 38 On Sun, Aug 15, 2004 at 07:14:50PM -0700, David S. Miller wrote: > On Sat, 14 Aug 2004 16:27:03 +1000 > Herbert Xu wrote: > > > Is there any thing that prevents the following scenario from occuring? > > > > CPU0 CPU1 > > neigh_create > > inet_del_ifa > > notifier_call_chain > > neigh_ifdown > > inetdev_destroy > > arp_constructor > > neigh->parms = > > in_dev->arp_parms > > in_dev->dead = 1 > > in_dev->dev->ip_ptr = > > NULL > > neigh_parms_release > > n->parms->neigh_setup => BUG > > Is there anything other than hostess_sv11.c, sealevel.c, and shaper.c > which are using n->parms->neigh_setup at all? > > This seems to be a very obscure special case hack, which perhaps we > can removee entirely. That maybe the case, but the race has nothing to do with neigh_setup. Even if you remove neigh_setup altogether, the very next line in neigh_create will dereference n->parms by looking up base_reachable_time. 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 hadi@cyberus.ca Mon Aug 16 06:00:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 06:00:57 -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 i7GD0pN6011849 for ; Mon, 16 Aug 2004 06:00:52 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1Bwh6R-0001nG-3X for netdev@oss.sgi.com; Mon, 16 Aug 2004 09:00: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 1Bwh6L-0001E7-TR; Mon, 16 Aug 2004 09:00:38 -0400 Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail From: jamal Reply-To: hadi@cyberus.ca To: Harald Welte Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <20040816072032.GH15418@sunbeam2> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> Content-Type: text/plain Organization: jamalopolous Message-Id: <1092661235.2874.71.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 16 Aug 2004 09:00:35 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7829 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: 2113 Lines: 56 On Mon, 2004-08-16 at 03:20, Harald Welte wrote: > On Fri, Aug 13, 2004 at 08:51:24AM -0400, jamal wrote: > > Alessandro, > > > > This summary applies to all your patches: Too many changes that seem > > unnecessary. Take a deep breath. > > I'm actually not as pessimistic about all his changes. > > Allesandro's ultimate goal seems to be connection-based accounting that > accounts precisely which packets have actually hit the outgoing wire. > While I'm quite happy with the now in-kernel conntrack accounting > (basedo on Rx rather than Tx packets/bytes), this is a different > definition of accounting. When did that code go in? > Let's discuss the individual patches seperately. > > 1) Is certainly not a huge issue, no debate here Although the patch does look innocent, actually it may break a lot of things since that code is particulary tricky and the patch changes the environmental rules. It needs study. since it doesnt add anything other than cosmetics, holding on it might be the wisest thing. > 2) I am not as familiar with the tc/scheduler code as you are, but I > also think that what he is trying to achieve is a valid goal. He tries > to make all tc-related packet drops go to a single code path for packet > dropping. Independent of Allesandro's implementation, I would really > like to see something like this. We once had an experimental patch > called the 'dropped hook' that would be traversed for all packets > dropped somewhere in the stack (for auditing in userspace, whatever). > Having a single packet drop point makes such a change less intrusive. Seems to me the interest is more having single point for stats collection. Let me think about it for a bit and get back to you guys. > 3) Is already in davem's tree, no need for discusion ;) Didnt know that ;-> Is it in released kernels already? Actually that patch should be fine. > 4) This is the part you are complaining about, right? I agree, I don't > like conntrack specific stuff in dev.c and packet scheduler areas. Let me think about it and get back to you. Solution to #2 should apply here. cheers, jamal From laforge@netfilter.org Mon Aug 16 06:09:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 06:09: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 i7GD96PS012414 for ; Mon, 16 Aug 2004 06:09:06 -0700 Received: from dsl-082-082-096-124.arcor-ip.net ([82.82.96.124] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BwhER-0004MX-PF; Mon, 16 Aug 2004 15:08:59 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BwhEN-0006FF-Mt; Mon, 16 Aug 2004 15:08:55 +0200 Date: Mon, 16 Aug 2004 15:08:55 +0200 From: Harald Welte To: jamal Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail Message-ID: <20040816130855.GU15418@sunbeam2> Mail-Followup-To: Harald Welte , jamal , sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qABWltju4eaUXBmg" Content-Disposition: inline In-Reply-To: <1092661235.2874.71.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7830 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: 1407 Lines: 48 --qABWltju4eaUXBmg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 16, 2004 at 09:00:35AM -0400, jamal wrote: > When did that code go in? sorry that should have been 'now submitted and accepted by davem' > Let me think about it for a bit and get back to you guys. sure. > > 3) Is already in davem's tree, no need for discusion ;) >=20 > Didnt know that ;-> Is it in released kernels already? no, sorry. 2.6.9 stuff > cheers, > jamal --=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 --qABWltju4eaUXBmg 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) iD8DBQFBILHnXaXGVTD0i/8RAo9vAJ43CIQdzxtPilbA8Ut8co8eWm3tvwCdFgqt 4GgO4vGAjA75aHroSqVSdKY= =dzam -----END PGP SIGNATURE----- --qABWltju4eaUXBmg-- From hadi@cyberus.ca Mon Aug 16 06:30:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 06:30:26 -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 i7GDUHXf013052 for ; Mon, 16 Aug 2004 06:30:18 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1BwhYv-0005jo-Cf for netdev@oss.sgi.com; Mon, 16 Aug 2004 09:30:09 -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 1BwhYs-0005Xt-Af; Mon, 16 Aug 2004 09:30:06 -0400 Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail From: jamal Reply-To: hadi@cyberus.ca To: Harald Welte Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <20040816073530.GI15418@sunbeam2> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <411CCB98.4080904@crocetta.org> <1092518370.2876.3.camel@jzny.localdomain> <20040816073530.GI15418@sunbeam2> Content-Type: multipart/mixed; boundary="=-Wo7ZvWyh3mDI+VyI22Oq" Organization: jamalopolous Message-Id: <1092662998.2874.102.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 16 Aug 2004 09:29:59 -0400 X-archive-position: 7831 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: 13632 Lines: 463 --=-Wo7ZvWyh3mDI+VyI22Oq Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, 2004-08-16 at 03:35, Harald Welte wrote: > On Sat, Aug 14, 2004 at 05:21:31PM -0400, jamal wrote: > > > Also is their a corrective factor that happens once the _accounting_ > > data has been shipped? Example: > > - account for packet > > - ship accounting data to some billing server > > - oops, unbill > > - what now? > > Yes, this is a race condition. However, I don't this is not very likely > to occurr, since the accounting data is by default only sent to > userspace via ctnetlink once the connection tracking entry is deleted. ah, ok. so problem solved then. > Yes, you can read it while the connection is still alive, but this will > not reset/update the counters, but rather give you a current snapshot. > If you send this to your accounting server, the accounting server has to > cope with the fact that this intermediate snapshot can be updated by > some later data. It SHOULD not care whether this later data for the > same flow has bigger or smaller byte/packet counters. [and > it is very unlikely that the total will be lower, since then in the > timeframe [snapshot, terminations] more packets have to be dropped than > accepted. Still, if this is documented with ctnetlink I'm perfectly > fine which such behaviour. I am too. Good stuff. I think 99.9% of accounting would be happy with getting data after the call is done; the other 0.01% may have to live with extra packets later which undo things. Are you working on something along the IPFIX protocol for transport? > > BTW, what happens if you clone the packet below netfilter and send > > several copies of it possibly over several different interfaces? This > > may happen with tc extensions. > > oh yes, I think somebody has written a similar iptables target, too. I'm > not sure whether there is a good solution for the 'unbill' feature. Do > you have any thoughts/recommendations for this? Let me think about it. Clearly the best place to account for things is on the wire once the packet has left the box ;-> So the closest you are to the wire, the better. How open are you to move accounting further down? My thoughts are along the lines of incrementing the contrack counters at the qdisc level. Since you transport after the structure has been deleted, it should work out fine and fair billing will be taken care of. > The reason for not delaying accounting update until qdisc has happened > is locking. Then we would have to re-grab the conntrack write lock to > make the counter update... whrereas in my patch counter updates happen > while we are already under write lock for the timer/timeout update. Yikes. That sort of kills my thought above ;-> Has someone done experimented and figured how expensive it would be to do it at the qdisc level? Note, you can probably have a low level grained lock just for stats. > > Lets talk about this issue first instead of confusing it with everything > > else you have in other patches. > > Also, if this 'unbill' feature gets into the kernel in some form, I > would definitely make it a CONFIG_ or sysctl... after all people could > be interested in the Rx side only... Agreed. Heres thinking developed while responding to you. Contracking to use generic stats counters that we plan to use for MPLS (amongst other things). I have attached a patch i was going to shoot to Dave - needs testing against latest kernels. The code is reproduced from the net/sched. My thinking is that at the qdisc level instead of saying things like: sch->stats.packets++; you do: INC_STATS(skb,sch->stats,reason_code) INC_STATS is generic (goes in the generic stats code in attached patch) and will have an ifdef for contrack billing (which includes unbilling depending on reason code). Reason code could be results that are now returned. As an example NET_XMIT_DROP is definetely unbilling while NET_XMIT_SUCCESS implies bill. I think the current stats structure may not cover all cases but we can discuss that before i push patch to Dave. cheers, jamal --=-Wo7ZvWyh3mDI+VyI22Oq Content-Disposition: attachment; filename=stats1.patch Content-Type: text/plain; name=stats1.patch; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- 268rc3/net/core/Makefile 2004/08/09 02:44:08 1.1 +++ 268rc3/net/core/Makefile 2004/08/09 02:46:01 @@ -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 --- /dev/null 1998-05-05 16:32:27.000000000 -0400 +++ 268rc3/net/core/gen_stats.c 2004-08-09 09:22:21.000000000 -0400 @@ -0,0 +1,105 @@ +/* + * 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: Alexey Kuznetsov, + * + * Changes: + * Jamal Hadi Salim adapted from net_sched_api for gen purpose use + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * USAGE: + * + * declare in mystruct: + * struct gen_stats mystats; + * + * increment as appropriate,eg : + * + * mystruct->mystats.packets++; + * + * update is lockless + * + * passing to user space: + * + * in routine my_dump(): + * + * if (gen_copy_stats(skb, &mystruct->mystats,MYSTAT_V), my_lock) + * goto rtattr_failure; + * + * + * locks: + * + * You are responsible for making sure that stats lock is + * initialized to something valid + * (typically the table lock -- i.e updates happen only when + * you are dumping like here) + * */ +int gen_copy_stats(struct sk_buff *skb, struct gnet_stats *st,int type, spinlock_t *lock) +{ + spin_lock_bh(lock); + RTA_PUT(skb, type, sizeof(struct gnet_stats), st); + spin_unlock_bh(lock); + return 0; + +rtattr_failure: + spin_unlock_bh(lock); + return -1; +} + +/* + * USAGE: + * + * declare your own private formated in mystruct: + * struct mypriv_stats mystats; + * + * passing to user space: + * + * in routine my_dump(): + * + * if (gen_copy_xstats(skb, (void *)&mystruct->mystats,sizeof(struct mypriv_stats), MYPSTAT_V),my_lock) + * goto rtattr_failure; + * + * Lock rules apply the same as in general stats + */ +int gen_copy_xstats(struct sk_buff *skb, void *st, int size, int type, spinlock_t *lock) +{ + spin_lock_bh(lock); + RTA_PUT(skb, type, size, st); + spin_unlock_bh(lock); + return 0; + +rtattr_failure: + spin_unlock_bh(lock); + return -1; +} + +EXPORT_SYMBOL(gen_copy_stats); +EXPORT_SYMBOL(gen_copy_xstats); --- /dev/null 1998-05-05 16:32:27.000000000 -0400 +++ 268rc3/net/core/gen_estimator.c 2004-08-09 09:00:56.000000000 -0400 @@ -0,0 +1,207 @@ +/* + * net/sched/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) { + struct gnet_stats *st = e->stats; + u64 nbytes; + u32 npackets; + u32 rate; + + spin_lock(e->stats_lock); + nbytes = st->bytes; + npackets = st->packets; + rate = (nbytes - e->last_bytes)<<(7 - idx); + e->last_bytes = nbytes; + e->avbps += ((long)rate - (long)e->avbps) >> e->ewma_log; + st->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->stats->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->stats = stats; + est->stats_lock = stats_lock; + est->ewma_log = parm->ewma_log; + est->last_bytes = stats->bytes; + est->avbps = stats->bps<<5; + est->last_packets = stats->packets; + est->avpps = stats->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 *stats) +{ + 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->stats != stats) { + 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); --- /dev/null 1998-05-05 16:32:27.000000000 -0400 +++ 268rc3/include/linux/gen_stats.h 2004-08-09 09:06:29.000000000 -0400 @@ -0,0 +1,21 @@ +#ifndef __LINUX_GEN_STATS_H +#define __LINUX_GEN_STATS_H + +struct gnet_stats +{ + __u64 bytes; /* Number of seen bytes */ + __u32 packets; /* Number of seen packets */ + __u32 drops; /* Packets dropped */ + __u32 bps; /* Current flow byte rate */ + __u32 pps; /* Current flow packet rate */ + __u32 qlen; + __u32 backlog; +}; + +struct gnet_estimator +{ + signed char interval; + unsigned char ewma_log; +}; + +#endif --=-Wo7ZvWyh3mDI+VyI22Oq-- From wli@holomorphy.com Mon Aug 16 07:40:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 07:40:24 -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 i7GEeH2G014970 for ; Mon, 16 Aug 2004 07:40:18 -0700 Received: from wli by holomorphy.com with local (Exim 3.36 #1 (Debian)) id 1Bwiee-0007Tf-00; Mon, 16 Aug 2004 07:40:08 -0700 Date: Mon, 16 Aug 2004 07:40:08 -0700 From: William Lee Irwin III To: remy harel Cc: netdev@oss.sgi.com Subject: Re: 2.6.8 + sarge = pb Message-ID: <20040816144008.GZ11200@holomorphy.com> References: <20040816094446.50165.qmail@web41905.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040816094446.50165.qmail@web41905.mail.yahoo.com> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7832 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 Content-Length: 2562 Lines: 60 A user got an oops in fib_sync_down(). I tried to clean up the syslog stuff here so hopefully it's not tremendously confusing. On Mon, Aug 16, 2004 at 11:44:46AM +0200, remy harel wrote: > I have a problem, with the last kernel, a 2.6.8-1 on > a sarge. I've compiled it well, without initrd ( it > refuses to compile with ) on this server : > HP netserver LH II ( bipro PII 266 / 512Mo ECC / 2 x > SCSI UW + Raid Netraid SCSI UW 3 canaux ( 8mo ECC ) / > 6xSCSI 9.1 Go Hot Swap raid 5 / rack 2Go IDE ( backup > ) / 2*400W 2 / 4 x LAN / APC Smart UPS 1000 / Debian > testing kernel 2.6.8.1 > It runs, but not stable, I've got some freeze, there > is a trace of my log, just before the last freeze. > Thanks to help me, > best regards, > Unable to handle kernel paging request at virtual address 042454df > printing eip: c02573d5 > *pde 00000000 > Oops: 0000 [#1] PREEMPT SMP > Modules linked in: tun sch_ingress cls_u32 sch_sfq sch_htb > nfsd exportfs lockd sunrpc ipt_MASQUERADE ipt_REDIRECT > ipt_state iptable_filter ppp_deflate zlib_deflate > bsd_comp capability commoncap af_packet ppp_async > crc_ccitt ipv6 ppp_generic slhc bridge evdev e100 mii > ide_disk ide_generic ide_core ne 8390 crc32 ip_nat_ftp > iptable_nat ip_tables ip_conntrack_ftp ip_conntrack > unix > CPU: 1 > EIP: 0060:[fib_sync_down+92/289] Not tainted > EFLAGS: 00010286 (2.6.8.1.15082004) > EIP is at fib_sync_down+0x5c/0x121 > eax: de6b5400 ebx: 0424548b ecx: c14106e0 edx: 00012b84 > esi: c02232e7 edi: 0000003e ebp: 00000098 esp: d023decc > ds: 007b es: 007b ss: 0068 > Process openvpn > (pid: 2640, threadinfo=d023c000 task=df6e72b0) > Stack: 000000ff 00000000 de6b5400 de6b5400 00000002 d7d63e3c c0256017 > 00000000 de6b5400 00000000 c02fefc8 c02560f3 de6b5400 00000000 c02fefc8 > de6b5400 c0122f7c c02fefc8 00000002 de6b5400 de6b5400 de6b5400 dffc39e0 > c02185d8 > Call Trace: > [fib_disable_ip+17/47] fib_disable_ip+0x11/0x2f > [fib_netdev_event+96/113] fib_netdev_event+0x60/0x71 > [notifier_call_chain+28/56] notifier_call_chain+0x1c/0x38 > [dev_close+116/123] dev_close+0x74/0x7b > [unregister_netdevice+150/592] unregister_netdevice+0x96/0x250 > [pg0+542619954/1069940736] tun_chr_close+0x61/0x6c [tun] > [__fput+65/259] __fput+0x41/0x103 > [filp_close+89/98] filp_close+0x59/0x62 > [sys_close+113/153] sys_close+0x71/0x99 > [syscall_call+7/11] syscall_call+0x7/0xb > Aug 16 10:16:47 localhost kernel: Code: 8b 43 54 85 c0 > 0f 84 a5 00 00 00 31 ff 31 ed 39 c7 8d 73 5c I could use help here. I'm not very knowledgable as far as net/ goes. -- wli From margitsw@t-online.de Mon Aug 16 08:14:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 08:14:16 -0700 (PDT) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7GFE4Kb015966 for ; Mon, 16 Aug 2004 08:14:04 -0700 Received: from fwd06.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1BwjBL-0001zf-00; Mon, 16 Aug 2004 17:13:55 +0200 Received: from roglap.local (rPCG2wZTgeDnpZv4Aj6hJU8fhAqb35FWgSW3yPvr-a6bt9XqrXBGUl@[217.224.21.61]) by fwd06.sul.t-online.com with esmtp id 1BwjB4-0WVLRQ0; Mon, 16 Aug 2004 17:13:38 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH Linux-2.6.8-rcx] prism54 Code cleanup Date: Mon, 16 Aug 2004 17:03:57 +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=_dzMIBzhQ2+RTzJZ" Message-Id: <200408161703.58124.margitsw@t-online.de> X-ID: rPCG2wZTgeDnpZv4Aj6hJU8fhAqb35FWgSW3yPvr-a6bt9XqrXBGUl X-archive-position: 7833 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: 9892 Lines: 313 --Boundary-00=_dzMIBzhQ2+RTzJZ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-08-16 Margit Schubert-While This brings the kernel driver into line with CVS. (Patches submitted by Denis Vlasenko) There are neither functionality changes nor bug fixes. * 2004-08-14 Denis Vlasenko * Move assignment out of if() * Remove trailing space from printk * Eliminate not needed local 'u32 reg' * Add a comment about undoc bits * Add #define VEC_SIZE, use it as appropriate * Add some printks to reset error code path (our * current area of trouble) * Make printk text less confusing * Some not needed NULL assignments removed * mgt_commit_list(): tell which oid has failed Jeff, patch goes on top of backed up patches. Margit --Boundary-00=_dzMIBzhQ2+RTzJZ Content-Type: text/x-diff; charset="us-ascii"; name="codeclean.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="codeclean.patch" diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_38xx.c linux-2.6.8-04/drivers/net/wireless/prism54/isl_38xx.c --- linux-2.6.8-01/drivers/net/wireless/prism54/isl_38xx.c 2004-07-27 19:42:33.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_38xx.c 2004-08-16 12:04:33.000000000 +0200 @@ -135,8 +135,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, @@ -194,10 +194,8 @@ void isl38xx_interface_reset(void *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 */ @@ -205,8 +203,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 */ @@ -214,9 +211,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 -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_38xx.h linux-2.6.8-04/drivers/net/wireless/prism54/isl_38xx.h --- linux-2.6.8-01/drivers/net/wireless/prism54/isl_38xx.h 2004-07-27 19:42:33.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_38xx.h 2004-08-16 12:04:30.000000000 +0200 @@ -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 -Naur linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8-01/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-16 12:01:53.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-16 12:04:33.000000000 +0200 @@ -1947,7 +1947,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 +1983,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, diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/islpci_dev.c linux-2.6.8-04/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.8-01/drivers/net/wireless/prism54/islpci_dev.c 2004-08-06 11:40:52.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/islpci_dev.c 2004-08-16 16:42:49.000000000 +0200 @@ -375,8 +375,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 +460,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); @@ -499,15 +496,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: reset problem: no 'reset complete' IRQ seen\n", + priv->ndev->name); } finish_wait(&priv->reset_done, &wait); - if(result) + if (result) { + printk(KERN_ERR "%s: islpci_reset_if: failure\n", priv->ndev->name); return result; + } islpci_set_state(priv, PRV_STATE_INIT); @@ -524,6 +522,7 @@ islpci_set_state(priv, PRV_STATE_READY); + printk(KERN_DEBUG "%s: interface reset complete\n", priv->ndev->name); return 0; } @@ -584,18 +583,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 +603,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; diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/islpci_eth.c linux-2.6.8-04/drivers/net/wireless/prism54/islpci_eth.c --- linux-2.6.8-01/drivers/net/wireless/prism54/islpci_eth.c 2004-07-27 19:42:33.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/islpci_eth.c 2004-08-16 12:04:33.000000000 +0200 @@ -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 -Naur linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.8-04/drivers/net/wireless/prism54/oid_mgt.c --- linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c 2004-08-10 10:52:08.000000000 +0200 +++ linux-2.6.8-04/drivers/net/wireless/prism54/oid_mgt.c 2004-08-16 12:04:33.000000000 +0200 @@ -555,15 +555,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 +627,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,9 +641,13 @@ if (res) islpci_mgt_release(res); + if (ret) + printk(KERN_ERR "%s: mgt_update_addr: failure\n", priv->ndev->name); return ret; } +#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0])) + void mgt_commit(islpci_private *priv) { @@ -650,14 +657,10 @@ if (islpci_get_state(priv) < PRV_STATE_INIT) return; - 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,8 +669,7 @@ 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); } } --Boundary-00=_dzMIBzhQ2+RTzJZ-- From sandr8_NOSPAM_@crocetta.org Mon Aug 16 08:20:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 08:20:31 -0700 (PDT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7GFKNTV019631 for ; Mon, 16 Aug 2004 08:20:24 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp12.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 40B33B7C01131B3B; Mon, 16 Aug 2004 17:19:10 +0200 Message-ID: <4120D068.2040608@crocetta.org> Date: Mon, 16 Aug 2004 17:19:04 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Harald Welte , sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> In-Reply-To: <1092661235.2874.71.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7834 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 4860 Lines: 138 jamal wrote: >On Mon, 2004-08-16 at 03:20, Harald Welte wrote: > > >>Let's discuss the individual patches seperately. >> >>1) Is certainly not a huge issue, no debate here >> >> > >Although the patch does look innocent, >actually it may break a lot of things since that code is particulary >tricky and the patch changes the environmental rules. It needs study. >since it doesnt add anything other than cosmetics, holding on it >might be the wisest thing. > > the danger should be where it is used incorrectly. you are right, but for the moment it is not used spreadly. if instead you are talking about breaking some code that relied on the old numerical values themselves (but the trivial case of 0 that many times seems to be confused with the only success return value, which is not true) then i must have definitely missed that code. btw, wouldn't it be nice to have something similar for the tc_calssify results (eg. setting a "terminal" bit in the defines and adding an inline terminal(result) function that does mask with that bit so that we avoid switching and hence some lines of code and branches)? >>2)... >> >>Having a single packet drop point makes such a change less intrusive. >> >> > >Seems to me the interest is more having single point for stats >collection. >Let me think about it for a bit and get back to you guys. > > > well i didn't dare doing that too because all those * or & insertion themselves made up a 50k patch... but in fact that would be nice and would lighten the code inside the many enqueue()... needless to say, the more (common) code is pulled outside of the per-discipline code, the smallest the kernel is and the easiest is to mantain/debug/introduce further changes. >>4) This is the part you are complaining about, right? I agree, I don't >>like conntrack specific stuff in dev.c and packet scheduler areas. >> >> > >Let me think about it and get back to you. Solution to #2 should apply >here. > > as i said from the beginning, i don't like that too. yes, it is working fine for me, but that is not the logical place where to do that... please correct me if i am wrong: the two big questions are: 1) moving that code away from net/core/dev.c and 2) what to do in case of packets sent over multiple interfaces? for what concerns (1), i was wondering if it would be less nasty to have a device enqueue operation that will interact (wraps it and does something around that) with the outmost qdisc enqueue... this could give a good abstraction to answer to question 2 as well... for what concerns (2), i see that jamal takes literally the meaning of 'billing' a connection... well i was thinking just at traffic policing and not at money accounting and billing servers... in any case... regarding what to do if a packet sent over multiple interfaces is dropped only in some of them and not on all of them... this could also happen for a broadcast or multicast packet... and thinking about it, the most coerent thing to do from my viewpoint (traffic policing, not getting money for the service given) would be to have a separate view of the same packet flow at every different interface... this would get more complex, but the separate device-level enqueue could be the place to do that. there would also have place the single point for drops. in an other message, jamal wrote: >Let me think about it. >Clearly the best place to account for things is on the wire once the >packet has left the box ;-> So the closest you are to the wire, the >better. How open are you to move accounting further down? My thoughts >are along the lines of incrementing the contrack counters at the qdisc >level. Since you transport after the structure has been deleted, it >should work out fine and fair billing will be taken care of. > > accounting when the packet goes to the wire would mean at the dequeue level? besides, as harald sais, grabbing a lock every time a packet is sent and not only when a packet is dropped... this would also imply from my particular viewpoint, that when enqueing a packet we will not yet know how much its flow/connection has been billed till know. we'll know that, only once the previous packet will have been dequeued. and for me it would be _much_ more cpu-intensive to behave consequently to that information if i get it that late :''''( this because it would force me to have more complexity in the enqueue operation, that in the scheduler i'm trying to write does need to have that information to put packets correctly into the queue. i think that in that case, i'd better duplicate the work and account that information on my own... the speedup i'd get would be definitely worth having twice the same info... even though that would not be elegant at all... :( i should stop, take an other long breath, and think a little bit about this ;) cheers alessandro From margitsw@t-online.de Mon Aug 16 09:05:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 09:05:59 -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 i7GG5nOM021333 for ; Mon, 16 Aug 2004 09:05:49 -0700 Received: from fwd02.aul.t-online.de by mailout09.sul.t-online.com with smtp id 1BwjzM-0003k1-03; Mon, 16 Aug 2004 18:05:36 +0200 Received: from roglap.local (Z4iPwvZ68eUU8jStlvexTvw0JBRUbb6QHI2OH16IkYw5vhKRACXUEj@[217.255.125.53]) by fwd02.sul.t-online.com with esmtp id 1BwjzK-1kzgtk0; Mon, 16 Aug 2004 18:05:34 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH Linux-2.4.28-pre1] prism54 Update to 2.6 status Date: Mon, 16 Aug 2004 17:55:52 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org, marcelo.tosatti@cyclades.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_IkNIBxrWR6VRArX" Message-Id: <200408161755.52667.margitsw@t-online.de> X-ID: Z4iPwvZ68eUU8jStlvexTvw0JBRUbb6QHI2OH16IkYw5vhKRACXUEj X-archive-position: 7835 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: 24517 Lines: 866 --Boundary-00=_IkNIBxrWR6VRArX Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-08-16 Margit Schubert-While * This rollup patch brings 2.4 into line with current * and pending 2.6 status as of today. * The code base is IDENTICAL for both 2.4 and 2.6 with * the exception of an extra compatibility header for 2.4. * There is no point in doing a split out for this patch * as all changes have already been individually posted * against 2.6 and passed through Jeff. * As of now, we can post one patch for both kernels. * I have included Marcelo in the CC so that he is informed. Margit --Boundary-00=_IkNIBxrWR6VRArX Content-Type: text/x-diff; charset="us-ascii"; name="248rollup.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="248rollup.patch" diff -Naur linux-2.4.28-01/drivers/net/wireless/prism54/isl_38xx.c linux-2.4.28-02/drivers/net/wireless/prism54/isl_38xx.c --- linux-2.4.28-01/drivers/net/wireless/prism54/isl_38xx.c 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/isl_38xx.c 2004-08-16 17:38:05.000000000 +0200 @@ -135,8 +135,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, @@ -194,10 +194,8 @@ void isl38xx_interface_reset(void *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 */ @@ -205,8 +203,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 */ @@ -214,9 +211,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 -Naur linux-2.4.28-01/drivers/net/wireless/prism54/isl_38xx.h linux-2.4.28-02/drivers/net/wireless/prism54/isl_38xx.h --- linux-2.4.28-01/drivers/net/wireless/prism54/isl_38xx.h 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/isl_38xx.h 2004-08-16 17:38:00.000000000 +0200 @@ -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 -Naur linux-2.4.28-01/drivers/net/wireless/prism54/isl_ioctl.c linux-2.4.28-02/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.4.28-01/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-16 17:38:05.000000000 +0200 @@ -334,9 +334,10 @@ int rvalue; rvalue = mgt_get_request(priv, DOT11_OID_CHANNEL, 0, NULL, &r); - + fwrq->i = r.u; + rvalue |= mgt_get_request(priv, DOT11_OID_FREQUENCY, 0, NULL, &r); fwrq->m = r.u; - fwrq->e = 0; + fwrq->e = 3; return rvalue; } @@ -436,7 +437,7 @@ { struct iw_range *range = (struct iw_range *) extra; islpci_private *priv = netdev_priv(ndev); - char *data; + u8 *data; int i, m, rvalue; struct obj_frequencies *freq; union oid_res_t r; @@ -513,8 +514,7 @@ i = 0; while ((i < IW_MAX_BITRATES) && (*data != 0)) { /* the result must be in bps. The card gives us 500Kbps */ - range->bitrate[i] = (__s32) (*data >> 1); - range->bitrate[i] *= 1000000; + range->bitrate[i] = *data * 500000; i++; data++; } @@ -820,9 +820,11 @@ return mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile); } - if ((ret = - mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r))) + ret = mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r); + if (ret) { + kfree(r.ptr); return ret; + } rate = (u32) (vwrq->value / 500000); data = r.ptr; @@ -840,6 +842,7 @@ } if (!data[i]) { + kfree(r.ptr); return -EINVAL; } @@ -888,8 +891,11 @@ vwrq->value = r.u * 500000; /* request the device for the enabled rates */ - if ((rvalue = mgt_get_request(priv, DOT11_OID_RATES, 0, NULL, &r))) + rvalue = mgt_get_request(priv, DOT11_OID_RATES, 0, NULL, &r); + if (rvalue) { + kfree(r.ptr); return rvalue; + } data = r.ptr; vwrq->fixed = (data[0] != 0) && (data[1] == 0); kfree(r.ptr); @@ -1941,8 +1947,8 @@ struct iw_point *data, char *extra) { islpci_private *priv = netdev_priv(ndev); - struct islpci_mgmtframe *response = NULL; - int ret = -EIO, response_op = PIMFOR_OP_ERROR; + struct islpci_mgmtframe *response; + int ret = -EIO; printk("%s: get_oid 0x%08X\n", ndev->name, priv->priv_oid); data->length = 0; @@ -1952,9 +1958,7 @@ islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET, priv->priv_oid, extra, 256, &response); - response_op = response->header->operation; printk("%s: ret: %i\n", ndev->name, ret); - printk("%s: response_op: %i\n", ndev->name, response_op); if (ret || !response || response->header->operation == PIMFOR_OP_ERROR) { if (response) { @@ -1979,7 +1983,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, @@ -1991,16 +1995,20 @@ priv->priv_oid, extra, data->length, &response); printk("%s: ret: %i\n", ndev->name, ret); + if (ret || !response + || response->header->operation == PIMFOR_OP_ERROR) { + if (response) { + islpci_mgt_release(response); + } + printk("%s: EIO\n", ndev->name); + ret = -EIO; + } if (!ret) { response_op = response->header->operation; printk("%s: response_op: %i\n", ndev->name, response_op); islpci_mgt_release(response); } - if (ret || response_op == PIMFOR_OP_ERROR) { - printk("%s: EIO\n", ndev->name); - ret = -EIO; - } } return (ret ? ret : -EINPROGRESS); diff -Naur linux-2.4.28-01/drivers/net/wireless/prism54/islpci_dev.c linux-2.4.28-02/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.4.28-01/drivers/net/wireless/prism54/islpci_dev.c 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/islpci_dev.c 2004-08-16 17:38:05.000000000 +0200 @@ -39,6 +39,7 @@ #include "oid_mgt.h" #define ISL3877_IMAGE_FILE "isl3877" +#define ISL3886_IMAGE_FILE "isl3886" #define ISL3890_IMAGE_FILE "isl3890" static int prism54_bring_down(islpci_private *); @@ -82,7 +83,7 @@ mdelay(50); { - const struct firmware *fw_entry = 0; + const struct firmware *fw_entry = NULL; long fw_len; const u32 *fw_ptr; @@ -185,6 +186,9 @@ void *device = priv->device_base; int powerstate = ISL38XX_PSM_POWERSAVE_STATE; + /* lock the interrupt handler */ + spin_lock(&priv->slock); + /* received an interrupt request on a shared IRQ line * first check whether the device is in sleep mode */ reg = readl(device + ISL38XX_CTRL_STAT_REG); @@ -194,14 +198,10 @@ #if VERBOSE > SHOW_ERROR_MESSAGES DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n"); #endif + spin_unlock(&priv->slock); return IRQ_NONE; } - if (islpci_get_state(priv) != PRV_STATE_SLEEP) - powerstate = ISL38XX_PSM_ACTIVE_STATE; - - /* lock the interrupt handler */ - spin_lock(&priv->slock); /* check whether there is any source of interrupt on the device */ reg = readl(device + ISL38XX_INT_IDENT_REG); @@ -212,6 +212,9 @@ reg &= ISL38XX_INT_SOURCES; if (reg != 0) { + if (islpci_get_state(priv) != PRV_STATE_SLEEP) + powerstate = ISL38XX_PSM_ACTIVE_STATE; + /* reset the request bits in the Identification register */ isl38xx_w32_flush(device, reg, ISL38XX_INT_ACK_REG); @@ -339,6 +342,12 @@ isl38xx_handle_wakeup(priv->control_block, &powerstate, priv->device_base); } + } else { +#if VERBOSE > SHOW_ERROR_MESSAGES + DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n"); +#endif + spin_unlock(&priv->slock); + return IRQ_NONE; } /* sleep -> ready */ @@ -366,8 +375,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) { @@ -453,8 +460,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); @@ -490,15 +496,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: reset problem: no 'reset complete' IRQ seen\n", + priv->ndev->name); } finish_wait(&priv->reset_done, &wait); - if(result) + if (result) { + printk(KERN_ERR "%s: islpci_reset_if: failure\n", priv->ndev->name); return result; + } islpci_set_state(priv, PRV_STATE_INIT); @@ -515,6 +522,7 @@ islpci_set_state(priv, PRV_STATE_READY); + printk(KERN_DEBUG "%s: interface reset complete\n", priv->ndev->name); return 0; } @@ -575,18 +583,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 * @@ -595,7 +603,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; @@ -716,7 +724,7 @@ if (priv->device_base) iounmap(priv->device_base); - priv->device_base = 0; + priv->device_base = NULL; /* free consistent DMA area... */ if (priv->driver_mem_address) @@ -725,10 +733,10 @@ priv->device_host_address); /* clear some dangling pointers */ - priv->driver_mem_address = 0; + priv->driver_mem_address = NULL; priv->device_host_address = 0; priv->device_psm_buffer = 0; - priv->control_block = 0; + priv->control_block = NULL; /* clean up mgmt rx buffers */ for (counter = 0; counter < ISL38XX_CB_MGMT_QSIZE; counter++) { @@ -754,7 +762,7 @@ if (priv->data_low_rx[counter]) dev_kfree_skb(priv->data_low_rx[counter]); - priv->data_low_rx[counter] = 0; + priv->data_low_rx[counter] = NULL; } /* Free the acces control list and the WPA list */ @@ -856,14 +864,14 @@ /* select the firmware file depending on the device id */ switch (pdev->device) { - case PCIDEVICE_ISL3890: - case PCIDEVICE_3COM6001: - strcpy(priv->firmware, ISL3890_IMAGE_FILE); - break; - case PCIDEVICE_ISL3877: + case 0x3877: strcpy(priv->firmware, ISL3877_IMAGE_FILE); break; + case 0x3886: + strcpy(priv->firmware, ISL3886_IMAGE_FILE); + break; + default: strcpy(priv->firmware, ISL3890_IMAGE_FILE); break; @@ -880,9 +888,9 @@ do_islpci_free_memory: islpci_free_memory(priv); do_free_netdev: - pci_set_drvdata(pdev, 0); + pci_set_drvdata(pdev, NULL); free_netdev(ndev); - priv = 0; + priv = NULL; return NULL; } diff -Naur linux-2.4.28-01/drivers/net/wireless/prism54/islpci_eth.c linux-2.4.28-02/drivers/net/wireless/prism54/islpci_eth.c --- linux-2.4.28-01/drivers/net/wireless/prism54/islpci_eth.c 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/islpci_eth.c 2004-08-16 17:38:05.000000000 +0200 @@ -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 -Naur linux-2.4.28-01/drivers/net/wireless/prism54/islpci_hotplug.c linux-2.4.28-02/drivers/net/wireless/prism54/islpci_hotplug.c --- linux-2.4.28-01/drivers/net/wireless/prism54/islpci_hotplug.c 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/islpci_hotplug.c 2004-08-16 17:38:05.000000000 +0200 @@ -44,102 +44,30 @@ * If you have an update for this please contact prism54-devel@prism54.org * The latest list can be found at http://prism54.org/supported_cards.php */ static const struct pci_device_id prism54_id_tbl[] = { - /* 3COM 3CRWE154G72 Wireless LAN adapter */ - { - PCIVENDOR_3COM, PCIDEVICE_3COM6001, - PCIVENDOR_3COM, PCIDEVICE_3COM6001, - 0, 0, 0 - }, - - /* D-Link Air Plus Xtreme G A1 - DWL-g650 A1 */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_DLINK, 0x3202UL, - 0, 0, 0 - }, - - /* I-O Data WN-G54/CB - WN-G54/CB */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_IODATA, 0xd019UL, - 0, 0, 0 - }, - - /* Netgear WG511 */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_NETGEAR, 0x4800UL, - 0, 0, 0 - }, - - /* Tekram Technology clones, Allnet, Netcomm, Zyxel */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_TTL, 0x1605UL, - 0, 0, 0 - }, - - /* SMC2802W */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_SMC, 0x2802UL, - 0, 0, 0 - }, - - /* SMC2835W */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_SMC, 0x2835UL, - 0, 0, 0 - }, - - /* Corega CG-WLCB54GT */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_ATI, 0xc104UL, - 0, 0, 0 - }, - - /* I4 Z-Com XG-600 */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_I4, 0x0014UL, - 0, 0, 0 - }, - - /* I4 Z-Com XG-900 and clones Macer, Ovislink, Planex, Peabird, */ - /* Sitecom, Xterasys */ - { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_I4, 0x0020UL, - 0, 0, 0 - }, - - /* SMC 2802W V2 */ + /* Intersil PRISM Duette/Prism GT Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_ACCTON, 0xee03UL, + 0x1260, 0x3890, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* SMC 2835W V2 */ + /* 3COM 3CRWE154G72 Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, - PCIVENDOR_SMC, 0xa835UL, + 0x10b7, 0x6001, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Intersil PRISM Indigo Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3877, + 0x1260, 0x3877, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* Intersil PRISM Duette/Prism GT Wireless LAN adapter */ - /* Default */ + /* Intersil PRISM Javelin/Xbow Wireless LAN adapter */ { - PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, + 0x1260, 0x3886, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, @@ -166,85 +94,6 @@ /* .enable_wake ; we don't support this yet */ }; -static void -prism54_get_card_model(struct net_device *ndev) -{ - islpci_private *priv; - char *modelp; - int notwork = 0; - - priv = netdev_priv(ndev); - switch (priv->pdev->subsystem_device) { - case PCIDEVICE_ISL3877: - modelp = "PRISM Indigo"; - break; - case PCIDEVICE_ISL3886: - modelp = "PRISM Javelin / Xbow"; - break; - case PCIDEVICE_3COM6001: - modelp = "3COM 3CRWE154G72"; - break; - case 0x3202UL: - modelp = "D-Link DWL-g650 A1"; - break; - case 0xd019UL: - modelp = "WN-G54/CB"; - break; - case 0x4800UL: - modelp = "Netgear WG511"; - break; - case 0x2802UL: - modelp = "SMC2802W"; - break; - case 0xee03UL: - modelp = "SMC2802W V2"; - notwork = 1; - break; - case 0x2835UL: - modelp = "SMC2835W"; - break; - case 0xa835UL: - modelp = "SMC2835W V2"; - notwork = 1; - break; - case 0xc104UL: - modelp = "CG-WLCB54GT"; - break; - case 0x1605UL: - modelp = "Tekram Technology clone"; - break; - /* Let's leave this one out for now since it seems bogus/wrong - * Even if the manufacturer did use 0x0000UL it may not be correct - * by their part, therefore deserving no name ;) */ - /* case 0x0000UL: - * modelp = "SparkLAN WL-850F"; - * break;*/ - - /* We have two reported for the one below :( */ - case 0x0014UL: - modelp = "I4 Z-Com XG-600 and clones"; - break; - case 0x0020UL: - modelp = "I4 Z-Com XG-900 and clones"; - break; -/* Default it */ -/* - case PCIDEVICE_ISL3890: - modelp = "PRISM Duette/GT"; - break; -*/ - default: - modelp = "PRISM Duette/GT"; - } - printk(KERN_DEBUG "%s: %s driver detected card model: %s\n", - ndev->name, DRV_NAME, modelp); - if ( notwork ) { - printk(KERN_DEBUG "%s: %s Warning - This may not work\n", - ndev->name, DRV_NAME); - } - return; -} - /****************************************************************************** Module initialization functions ******************************************************************************/ @@ -354,17 +203,14 @@ /* firmware upload is triggered in islpci_open */ - /* Pretty card model discovery output */ - prism54_get_card_model(ndev); - return 0; do_unregister_netdev: unregister_netdev(ndev); islpci_free_memory(priv); - pci_set_drvdata(pdev, 0); + pci_set_drvdata(pdev, NULL); free_netdev(ndev); - priv = 0; + priv = NULL; do_pci_release_regions: pci_release_regions(pdev); do_pci_disable_device: @@ -380,7 +226,7 @@ prism54_remove(struct pci_dev *pdev) { struct net_device *ndev = pci_get_drvdata(pdev); - islpci_private *priv = ndev ? netdev_priv(ndev) : 0; + islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; BUG_ON(!priv); if (!__in_cleanup_module) { @@ -408,9 +254,9 @@ /* free the PCI memory and unmap the remapped page */ islpci_free_memory(priv); - pci_set_drvdata(pdev, 0); + pci_set_drvdata(pdev, NULL); free_netdev(ndev); - priv = 0; + priv = NULL; pci_release_regions(pdev); @@ -421,7 +267,7 @@ prism54_suspend(struct pci_dev *pdev, u32 state) { struct net_device *ndev = pci_get_drvdata(pdev); - islpci_private *priv = ndev ? netdev_priv(ndev) : 0; + islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; BUG_ON(!priv); printk(KERN_NOTICE "%s: got suspend request (state %d)\n", @@ -446,7 +292,7 @@ prism54_resume(struct pci_dev *pdev) { struct net_device *ndev = pci_get_drvdata(pdev); - islpci_private *priv = ndev ? netdev_priv(ndev) : 0; + islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; BUG_ON(!priv); printk(KERN_NOTICE "%s: got resume request\n", ndev->name); diff -Naur linux-2.4.28-01/drivers/net/wireless/prism54/islpci_mgt.h linux-2.4.28-02/drivers/net/wireless/prism54/islpci_mgt.h --- linux-2.4.28-01/drivers/net/wireless/prism54/islpci_mgt.h 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/islpci_mgt.h 2004-08-16 17:38:00.000000000 +0200 @@ -38,21 +38,6 @@ /* General driver definitions */ -#define PCIVENDOR_INTERSIL 0x1260UL -#define PCIVENDOR_3COM 0x10b7UL -#define PCIVENDOR_DLINK 0x1186UL -#define PCIVENDOR_I4 0x17cfUL -#define PCIVENDOR_IODATA 0x10fcUL -#define PCIVENDOR_NETGEAR 0x1385UL -#define PCIVENDOR_SMC 0x10b8UL -#define PCIVENDOR_ACCTON 0x1113UL -#define PCIVENDOR_ATI 0x1259UL -#define PCIVENDOR_TTL 0x16a5UL - -#define PCIDEVICE_ISL3877 0x3877UL -#define PCIDEVICE_ISL3886 0x3886UL -#define PCIDEVICE_ISL3890 0x3890UL -#define PCIDEVICE_3COM6001 0x6001UL #define PCIDEVICE_LATENCY_TIMER_MIN 0x40 #define PCIDEVICE_LATENCY_TIMER_VAL 0x50 diff -Naur linux-2.4.28-01/drivers/net/wireless/prism54/oid_mgt.c linux-2.4.28-02/drivers/net/wireless/prism54/oid_mgt.c --- linux-2.4.28-01/drivers/net/wireless/prism54/oid_mgt.c 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/oid_mgt.c 2004-08-16 17:38:05.000000000 +0200 @@ -219,7 +219,7 @@ OID_UNKNOWN(OID_INL_MEMORY, 0xFF020002), OID_U32_C(OID_INL_MODE, 0xFF020003), OID_UNKNOWN(OID_INL_COMPONENT_NR, 0xFF020004), - OID_UNKNOWN(OID_INL_VERSION, 0xFF020005), + OID_STRUCT(OID_INL_VERSION, 0xFF020005, u8[8], OID_TYPE_RAW), OID_UNKNOWN(OID_INL_INTERFACE_ID, 0xFF020006), OID_UNKNOWN(OID_INL_COMPONENT_ID, 0xFF020007), OID_U32_C(OID_INL_CONFIG, 0xFF020008), @@ -481,6 +481,8 @@ BUG_ON(OID_NUM_LAST <= n); BUG_ON(extra > isl_oid[n].range); + res->ptr = NULL; + if (!priv->mib) /* memory has been freed */ return -1; @@ -553,15 +555,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; @@ -613,14 +618,16 @@ DOT11_OID_DEFKEYID, DOT11_OID_DOT1XENABLE, OID_INL_DOT11D_CONFORMANCE, + /* Do not initialize this - fw < 1.0.4.3 rejects it OID_INL_OUTPUTPOWER, + */ }; /* update the MAC addr. */ 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, @@ -634,9 +641,13 @@ if (res) islpci_mgt_release(res); + if (ret) + printk(KERN_ERR "%s: mgt_update_addr: failure\n", priv->ndev->name); return ret; } +#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0])) + void mgt_commit(islpci_private *priv) { @@ -646,14 +657,10 @@ if (islpci_get_state(priv) < PRV_STATE_INIT) return; - 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); @@ -662,8 +669,7 @@ 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); } } diff -Naur linux-2.4.28-01/drivers/net/wireless/prism54/prismcompat24.h linux-2.4.28-02/drivers/net/wireless/prism54/prismcompat24.h --- linux-2.4.28-01/drivers/net/wireless/prism54/prismcompat24.h 2004-08-16 17:31:11.000000000 +0200 +++ linux-2.4.28-02/drivers/net/wireless/prism54/prismcompat24.h 2004-08-16 17:38:00.000000000 +0200 @@ -52,7 +52,7 @@ #define schedule_work schedule_task #if !defined(HAVE_NETDEV_PRIV) -#define netdev_priv(x) x->priv +#define netdev_priv(x) (x)->priv #endif #if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE) --Boundary-00=_IkNIBxrWR6VRArX-- From kumar.gala@freescale.com Mon Aug 16 09:32:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 09:32:15 -0700 (PDT) Received: from motgate8.mot.com (motgate8.mot.com [129.188.136.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7GGW9ut022308 for ; Mon, 16 Aug 2004 09:32:09 -0700 Received: from il06exr03.mot.com (il06exr03.mot.com [129.188.137.133]) by motgate8.mot.com (Motorola/Motgate8) with ESMTP id i7GGWfxl004318; Mon, 16 Aug 2004 09:32:41 -0700 (MST) Received: from [10.82.17.247] ([10.82.17.247]) by il06exr03.mot.com (Motorola/il06exr03) with ESMTP id i7GGVe2e023225; Mon, 16 Aug 2004 11:31:41 -0500 In-Reply-To: <5016F2DB-E66A-11D8-B1F6-000393C30512@freescale.com> References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <1089170282.1038.80.camel@jzny.localdomain> <20040707032913.GA1822@havoc.gtf.org> <20040802231112.GA890@havoc.gtf.org> <4819CC65-E4DB-11D8-999F-000393C30512@freescale.com> <5016F2DB-E66A-11D8-B1F6-000393C30512@freescale.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: David Woodhouse , Andy Fleming , Kumar Gala , "" , jamal , Christoph Hellwig From: Kumar Gala Subject: Re: [RFR] gianfar ethernet driver Date: Mon, 16 Aug 2004 11:31:40 -0500 To: Jeff Garzik X-Mailer: Apple Mail (2.619) X-archive-position: 7836 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kumar.gala@freescale.com Precedence: bulk X-list: netdev Content-Length: 832 Lines: 33 Jeff, Now that 2.6.8.1 is out what is the status of reviewing andy's changes? thanks - kumar On Aug 4, 2004, at 6:02 PM, Andy Fleming wrote: > Ok, while we're still waiting, I found a couple of bugs, so here's > another patch: same as before, only correct (I hope) > Andy > On Aug 2, 2004, at 18:25, Andy Fleming wrote: >> D'oh! >> >> On Aug 2, 2004, at 18:11, Jeff Garzik wrote: >>> On Mon, Aug 02, 2004 at 05:19:13PM -0500, Andy Fleming wrote: >>>> Here's an updated patch which fixes module support which does this: >>>> >>>> * More cleanup/minor bug fixes >>>> * Added locking to PHY read/write wrappers >>>> * Fixed module support >>>> * Removed fastroute code >>>> >>>> As before, this patch replaces the previous ones I have submitted. >>> >>> the patch? :) >>> >>> Jeff > > From macro@linux-mips.org Mon Aug 16 16:25:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 16:25:06 -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 i7GNOv6m013710 for ; Mon, 16 Aug 2004 16:25:00 -0700 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 176C2E1CC6 for ; Tue, 17 Aug 2004 01:24:43 +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 29795-08 for ; Tue, 17 Aug 2004 01:24:43 +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 DE492E1CC4 for ; Tue, 17 Aug 2004 01:24:42 +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.11.4) with ESMTP id i7GNP2WY029808 for ; Tue, 17 Aug 2004 01:25:02 +0200 Date: Tue, 17 Aug 2004 01:24:49 +0200 (CEST) From: "Maciej W. Rozycki" To: netdev@oss.sgi.com Subject: [patch] 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: 7837 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: 1779 Lines: 50 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. 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 kaber@trash.net Mon Aug 16 17:07:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:07:58 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7H07nFD015286 for ; Mon, 16 Aug 2004 17:07:50 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id EE58C19F33C; Tue, 17 Aug 2004 02:07:35 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 15FDE3941BE; Tue, 17 Aug 2004 02:07:33 +0200 (CEST) Message-ID: <41214C44.5010108@trash.net> Date: Tue, 17 Aug 2004 02:07:32 +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]: Remove unnecessary memset in packet schedulers Content-Type: multipart/mixed; boundary="------------070406080400090802070305" X-archive-position: 7838 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: 3969 Lines: 125 This is a multi-part message in MIME format. --------------070406080400090802070305 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch removes some more unnecessary memsets in packet schedulers. The qdisc's private data is already set to 0 in qdisc_create/qdisc_create_dflt. --------------070406080400090802070305 Content-Type: text/x-patch; name="2.6-psched-memsets.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="2.6-psched-memsets.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/17 01:30:30+02:00 kaber@coreworks.de # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # Signed-off-by: Patrick McHardy # # net/sched/sch_ingress.c # 2004/08/17 01:30:10+02:00 kaber@coreworks.de +0 -8 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_htb.c # 2004/08/17 01:30:10+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_hfsc.c # 2004/08/17 01:30:10+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_dsmark.c # 2004/08/17 01:30:10+02:00 kaber@coreworks.de +0 -2 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_atm.c # 2004/08/17 01:30:10+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # diff -Nru a/net/sched/sch_atm.c b/net/sched/sch_atm.c --- a/net/sched/sch_atm.c 2004-08-17 01:35:21 +02:00 +++ b/net/sched/sch_atm.c 2004-08-17 01:35:21 +02:00 @@ -573,7 +573,6 @@ struct atm_qdisc_data *p = PRIV(sch); DPRINTK("atm_tc_init(sch %p,[qdisc %p],opt %p)\n",sch,p,opt); - memset(p,0,sizeof(*p)); p->flows = &p->link; if(!(p->link.q = qdisc_create_dflt(sch->dev,&pfifo_qdisc_ops))) p->link.q = &noop_qdisc; diff -Nru a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c --- a/net/sched/sch_dsmark.c 2004-08-17 01:35:21 +02:00 +++ b/net/sched/sch_dsmark.c 2004-08-17 01:35:21 +02:00 @@ -331,8 +331,6 @@ !tb[TCA_DSMARK_INDICES-1] || RTA_PAYLOAD(tb[TCA_DSMARK_INDICES-1]) < sizeof(__u16)) return -EINVAL; - memset(p,0,sizeof(*p)); - p->filter_list = NULL; p->indices = *(__u16 *) RTA_DATA(tb[TCA_DSMARK_INDICES-1]); if (!p->indices) return -EINVAL; diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-17 01:35:21 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-17 01:35:21 +02:00 @@ -1553,7 +1553,6 @@ return -EINVAL; qopt = RTA_DATA(opt); - memset(q, 0, sizeof(struct hfsc_sched)); sch->stats_lock = &sch->dev->queue_lock; q->defcls = qopt->defcls; diff -Nru a/net/sched/sch_htb.c b/net/sched/sch_htb.c --- a/net/sched/sch_htb.c 2004-08-17 01:35:21 +02:00 +++ b/net/sched/sch_htb.c 2004-08-17 01:35:21 +02:00 @@ -1277,7 +1277,6 @@ HTB_VER >> 16,HTB_VER & 0xffff,gopt->version); return -EINVAL; } - memset(q,0,sizeof(*q)); q->debug = gopt->debug; HTB_DBG(0,1,"htb_init sch=%p handle=%X r2q=%d\n",sch,sch->handle,gopt->rate2quantum); diff -Nru a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c --- a/net/sched/sch_ingress.c 2004-08-17 01:35:21 +02:00 +++ b/net/sched/sch_ingress.c 2004-08-17 01:35:21 +02:00 @@ -289,9 +289,6 @@ #endif #endif - if (NULL == p) - goto error; - #ifndef CONFIG_NET_CLS_ACT #ifdef CONFIG_NETFILTER if (!nf_registered) { @@ -305,8 +302,6 @@ #endif DPRINTK("ingress_init(sch %p,[qdisc %p],opt %p)\n",sch,p,opt); - memset(p, 0, sizeof(*p)); - p->filter_list = NULL; p->q = &noop_qdisc; return 0; error: @@ -346,9 +341,6 @@ p->filter_list = tp->next; tcf_destroy(tp); } - memset(p, 0, sizeof(*p)); - p->filter_list = NULL; - #if 0 /* for future use */ qdisc_destroy(p->q); --------------070406080400090802070305-- From kaber@trash.net Mon Aug 16 17:08:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:09:03 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7H08u0F015417 for ; Mon, 16 Aug 2004 17:08:57 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id E70B219F354; Tue, 17 Aug 2004 02:08:45 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id DBA1C3941BE; Tue, 17 Aug 2004 02:08:44 +0200 (CEST) Message-ID: <41214C8C.8030604@trash.net> Date: Tue, 17 Aug 2004 02:08: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.4]: Remove unnecessary memset in packet schedulers Content-Type: multipart/mixed; boundary="------------060707000704000805020302" X-archive-position: 7839 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: 3769 Lines: 116 This is a multi-part message in MIME format. --------------060707000704000805020302 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Same patch for 2.4: This patch removes some more unnecessary memsets in packet schedulers. The qdisc's private data is already set to 0 in qdisc_create/qdisc_create_dflt. --------------060707000704000805020302 Content-Type: text/x-patch; name="2.4-psched-memsets.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="2.4-psched-memsets.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/17 01:23:21+02:00 kaber@coreworks.de # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # Signed-off-by: Patrick McHardy # # net/sched/sch_ingress.c # 2004/08/17 01:23:16+02:00 kaber@coreworks.de +0 -5 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_htb.c # 2004/08/17 01:23:16+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_hfsc.c # 2004/08/17 01:23:16+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_dsmark.c # 2004/08/17 01:23:16+02:00 kaber@coreworks.de +0 -2 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # # net/sched/sch_atm.c # 2004/08/17 01:23:16+02:00 kaber@coreworks.de +0 -1 # [PKT_SCHED]: remove unnecessary memsets in packet schedulers # diff -Nru a/net/sched/sch_atm.c b/net/sched/sch_atm.c --- a/net/sched/sch_atm.c 2004-08-17 01:24:28 +02:00 +++ b/net/sched/sch_atm.c 2004-08-17 01:24:28 +02:00 @@ -566,7 +566,6 @@ struct atm_qdisc_data *p = PRIV(sch); DPRINTK("atm_tc_init(sch %p,[qdisc %p],opt %p)\n",sch,p,opt); - memset(p,0,sizeof(*p)); p->flows = &p->link; if(!(p->link.q = qdisc_create_dflt(sch->dev,&pfifo_qdisc_ops))) p->link.q = &noop_qdisc; diff -Nru a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c --- a/net/sched/sch_dsmark.c 2004-08-17 01:24:28 +02:00 +++ b/net/sched/sch_dsmark.c 2004-08-17 01:24:28 +02:00 @@ -329,8 +329,6 @@ !tb[TCA_DSMARK_INDICES-1] || RTA_PAYLOAD(tb[TCA_DSMARK_INDICES-1]) < sizeof(__u16)) return -EINVAL; - memset(p,0,sizeof(*p)); - p->filter_list = NULL; p->indices = *(__u16 *) RTA_DATA(tb[TCA_DSMARK_INDICES-1]); if (!p->indices) return -EINVAL; diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c 2004-08-17 01:24:28 +02:00 +++ b/net/sched/sch_hfsc.c 2004-08-17 01:24:28 +02:00 @@ -1525,7 +1525,6 @@ return -EINVAL; qopt = RTA_DATA(opt); - memset(q, 0, sizeof(struct hfsc_sched)); sch->stats.lock = &sch->dev->queue_lock; q->defcls = qopt->defcls; diff -Nru a/net/sched/sch_htb.c b/net/sched/sch_htb.c --- a/net/sched/sch_htb.c 2004-08-17 01:24:28 +02:00 +++ b/net/sched/sch_htb.c 2004-08-17 01:24:28 +02:00 @@ -1186,7 +1186,6 @@ HTB_VER >> 16,HTB_VER & 0xffff,gopt->version); return -EINVAL; } - memset(q,0,sizeof(*q)); q->debug = gopt->debug; HTB_DBG(0,1,"htb_init sch=%p handle=%X r2q=%d\n",sch,sch->handle,gopt->rate2quantum); diff -Nru a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c --- a/net/sched/sch_ingress.c 2004-08-17 01:24:28 +02:00 +++ b/net/sched/sch_ingress.c 2004-08-17 01:24:28 +02:00 @@ -254,8 +254,6 @@ } DPRINTK("ingress_init(sch %p,[qdisc %p],opt %p)\n",sch,p,opt); - memset(p, 0, sizeof(*p)); - p->filter_list = NULL; p->q = &noop_qdisc; MOD_INC_USE_COUNT; return 0; @@ -296,9 +294,6 @@ p->filter_list = tp->next; tcf_destroy(tp); } - memset(p, 0, sizeof(*p)); - p->filter_list = NULL; - #if 0 /* for future use */ qdisc_destroy(p->q); --------------060707000704000805020302-- From davem@redhat.com Mon Aug 16 17:19:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:19: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 i7H0Jbcp016172 for ; Mon, 16 Aug 2004 17:19:38 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7H0JVe1003787; Mon, 16 Aug 2004 20:19:31 -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 i7H0JVa23355; Mon, 16 Aug 2004 20:19:31 -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 i7H0IeIg028765; Mon, 16 Aug 2004 20:18:40 -0400 Date: Mon, 16 Aug 2004 17:17:08 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Resolve race condition with module unload in qdisc_create Message-Id: <20040816171708.3b3e01c4.davem@redhat.com> In-Reply-To: <41214A95.2000103@trash.net> References: <41214A95.2000103@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: 7840 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: 250 Lines: 9 On Tue, 17 Aug 2004 02:00:21 +0200 Patrick McHardy wrote: > This patch resolves the race condition with module unload > in qdisc_create by moving try_module_get up to the first > qdisc_lookup_ops call. Looks good, patch applied. From kaber@trash.net Mon Aug 16 17:23:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:23:33 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7H0NSOD016594 for ; Mon, 16 Aug 2004 17:23:29 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id C070219F34F; Tue, 17 Aug 2004 02:00:28 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 2802D3941CB; Tue, 17 Aug 2004 02:00:23 +0200 (CEST) Message-ID: <41214A95.2000103@trash.net> Date: Tue, 17 Aug 2004 02:00:21 +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]: Resolve race condition with module unload in qdisc_create Content-Type: multipart/mixed; boundary="------------000808090602090109040007" X-archive-position: 7841 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: 2466 Lines: 94 This is a multi-part message in MIME format. --------------000808090602090109040007 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch resolves the race condition with module unload in qdisc_create by moving try_module_get up to the first qdisc_lookup_ops call. --------------000808090602090109040007 Content-Type: text/x-patch; name="qdisc_create-race.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qdisc_create-race.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/17 01:32:55+02:00 kaber@coreworks.de # [PKT_SCHED]: Resolve race condition with module unload in qdisc_create() # # Signed-off-by: Patrick McHardy # # net/sched/sch_api.c # 2004/08/17 01:32:36+02:00 kaber@coreworks.de +6 -13 # [PKT_SCHED]: Resolve race condition with module unload in qdisc_create() # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-17 01:35:50 +02:00 +++ b/net/sched/sch_api.c 2004-08-17 01:35:50 +02:00 @@ -407,6 +407,9 @@ err = -EINVAL; if (ops == NULL) goto err_out; + err = -EBUSY; + if (!try_module_get(ops->owner)) + goto err_out; /* ensure that the Qdisc and the private data are 32-byte aligned */ size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); @@ -415,18 +418,12 @@ p = kmalloc(size, GFP_KERNEL); err = -ENOBUFS; if (!p) - goto err_out; + goto err_out2; memset(p, 0, size); sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); sch->padded = (char *)sch - (char *)p; - /* Grrr... Resolve race condition with module unload */ - - err = -EINVAL; - if (ops != qdisc_lookup_ops(kind)) - goto err_out; - INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); @@ -444,7 +441,7 @@ handle = qdisc_alloc_handle(dev); err = -ENOMEM; if (handle == 0) - goto err_out; + goto err_out2; } if (handle == TC_H_INGRESS) @@ -452,10 +449,6 @@ else sch->handle = handle; - err = -EBUSY; - if (!try_module_get(ops->owner)) - goto err_out; - /* enqueue is accessed locklessly - make sure it's visible * before we set a netdevice's qdisc pointer to sch */ smp_wmb(); @@ -471,8 +464,8 @@ #endif return sch; } +err_out2: module_put(ops->owner); - err_out: *errp = err; if (p) --------------000808090602090109040007-- From davem@redhat.com Mon Aug 16 17:24:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:24: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 i7H0OhFZ016865 for ; Mon, 16 Aug 2004 17:24:43 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7H0Obe1004857; Mon, 16 Aug 2004 20:24: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 i7H0OWa24609; Mon, 16 Aug 2004 20:24:32 -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 i7H0Nfva030521; Mon, 16 Aug 2004 20:23:42 -0400 Date: Mon, 16 Aug 2004 17:22:09 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Remove unnecessary memset in packet schedulers Message-Id: <20040816172209.426ab139.davem@redhat.com> In-Reply-To: <41214C44.5010108@trash.net> References: <41214C44.5010108@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: 7842 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: 244 Lines: 8 On Tue, 17 Aug 2004 02:07:32 +0200 Patrick McHardy wrote: > This patch removes some more unnecessary memsets in packet > schedulers. The qdisc's private data is already set to 0 > in qdisc_create/qdisc_create_dflt. Applied. From davem@redhat.com Mon Aug 16 17:25:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:25:54 -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 i7H0PnHr017178 for ; Mon, 16 Aug 2004 17:25:49 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7H0Pce1005017; Mon, 16 Aug 2004 20:25:38 -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 i7H0PXa24749; Mon, 16 Aug 2004 20:25:33 -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 i7H0Og60030728; Mon, 16 Aug 2004 20:24:42 -0400 Date: Mon, 16 Aug 2004 17:23:10 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4]: Remove unnecessary memset in packet schedulers Message-Id: <20040816172310.63c97912.davem@redhat.com> In-Reply-To: <41214C8C.8030604@trash.net> References: <41214C8C.8030604@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: 7843 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: 114 Lines: 6 On Tue, 17 Aug 2004 02:08:44 +0200 Patrick McHardy wrote: > Same patch for 2.4: Also applied. From herbert@gondor.apana.org.au Mon Aug 16 17:42:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 17:43: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 i7H0guSL017867 for ; Mon, 16 Aug 2004 17:42: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 1Bws2v-0005oC-00; Tue, 17 Aug 2004 10:41:49 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bws2n-0004tV-00; Tue, 17 Aug 2004 10:41:41 +1000 Date: Tue, 17 Aug 2004 10:41:41 +1000 To: "David S. Miller" Cc: jiva@ixiacom.com, users@lists.openswan.org, dev@lists.openswan.org, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [Openswan Users] Invalid argument NULL Message-ID: <20040817004141.GA18789@gondor.apana.org.au> References: <20040815112548.GA2864@gondor.apana.org.au> <20040815195313.31bacf13.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040815195313.31bacf13.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7844 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: 814 Lines: 22 On Sun, Aug 15, 2004 at 07:53:13PM -0700, David S. Miller wrote: > > I've applied this for now. There is a lot of duplication around > the xfrm structures of this kind of information. Yes we've got the numbers in x->props and the names in the x->*algo structure. The question is do we go with the numbers of the names? On the face of it the names look like a good idea. However, we can't do sets of names as easily as we can do sets of numbers (the *algos mask in xfrm_tmpl). Further more, for the actual IKE negotiation, numbers are required anyway. So maybe we should keep the numbers? 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 davem@redhat.com Mon Aug 16 18:06:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 18:06:57 -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 i7H16oD6018602 for ; Mon, 16 Aug 2004 18:06:51 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7H16Ne1014931; Mon, 16 Aug 2004 21:06:23 -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 i7H16Da03419; Mon, 16 Aug 2004 21:06:13 -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 i7H15MML011861; Mon, 16 Aug 2004 21:05:22 -0400 Date: Mon, 16 Aug 2004 18:03:50 -0700 From: "David S. Miller" To: Herbert Xu Cc: jiva@ixiacom.com, users@lists.openswan.org, dev@lists.openswan.org, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [Openswan Users] Invalid argument NULL Message-Id: <20040816180350.780e4912.davem@redhat.com> In-Reply-To: <20040817004141.GA18789@gondor.apana.org.au> References: <20040815112548.GA2864@gondor.apana.org.au> <20040815195313.31bacf13.davem@redhat.com> <20040817004141.GA18789@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: 7845 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: 215 Lines: 7 On Tue, 17 Aug 2004 10:41:41 +1000 Herbert Xu wrote: > So maybe we should keep the numbers? If we take out the names, won't this break xfrm_user apps that currently can receive them? From herbert@gondor.apana.org.au Mon Aug 16 18:18:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 18:18: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 i7H1ILdr019175 for ; Mon, 16 Aug 2004 18:18: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 1BwsbK-00064t-00; Tue, 17 Aug 2004 11:17:22 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwsbF-0004wd-00; Tue, 17 Aug 2004 11:17:17 +1000 Date: Tue, 17 Aug 2004 11:17:17 +1000 To: "David S. Miller" Cc: jiva@ixiacom.com, users@lists.openswan.org, dev@lists.openswan.org, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [Openswan Users] Invalid argument NULL Message-ID: <20040817011717.GA18992@gondor.apana.org.au> References: <20040815112548.GA2864@gondor.apana.org.au> <20040815195313.31bacf13.davem@redhat.com> <20040817004141.GA18789@gondor.apana.org.au> <20040816180350.780e4912.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040816180350.780e4912.davem@redhat.com> User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7846 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: 771 Lines: 22 On Mon, Aug 16, 2004 at 06:03:50PM -0700, David S. Miller wrote: > On Tue, 17 Aug 2004 10:41:41 +1000 > Herbert Xu wrote: > > > So maybe we should keep the numbers? > > If we take out the names, won't this break xfrm_user apps > that currently can receive them? I mean that we should keep the numbers internally. So xfrm_user.c will translate the names given by existing applications into numbers as the patch that you've just applied does. We can then create a new NETLINK payload type that uses numbers if we wish. 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 davem@redhat.com Mon Aug 16 18:20:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 18:20:23 -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 i7H1K6Pt019494 for ; Mon, 16 Aug 2004 18:20:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7H1Jfe1018001; Mon, 16 Aug 2004 21:19:46 -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 i7H1Jfa06357; Mon, 16 Aug 2004 21:19:41 -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 i7H1IoIg015642; Mon, 16 Aug 2004 21:18:50 -0400 Date: Mon, 16 Aug 2004 18:17:17 -0700 From: "David S. Miller" To: Herbert Xu Cc: jiva@ixiacom.com, users@lists.openswan.org, dev@lists.openswan.org, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [Openswan Users] Invalid argument NULL Message-Id: <20040816181717.4b943e31.davem@redhat.com> In-Reply-To: <20040817011717.GA18992@gondor.apana.org.au> References: <20040815112548.GA2864@gondor.apana.org.au> <20040815195313.31bacf13.davem@redhat.com> <20040817004141.GA18789@gondor.apana.org.au> <20040816180350.780e4912.davem@redhat.com> <20040817011717.GA18992@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: 7847 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: 402 Lines: 13 On Tue, 17 Aug 2004 11:17:17 +1000 Herbert Xu wrote: > I mean that we should keep the numbers internally. So xfrm_user.c > will translate the names given by existing applications into numbers > as the patch that you've just applied does. Ok, that works. > We can then create a new NETLINK payload type that uses numbers if > we wish. I think that will just be bloat. From herbert@gondor.apana.org.au Mon Aug 16 18:35:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 18:35: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 i7H1ZH0q020053 for ; Mon, 16 Aug 2004 18:35: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 1BwssT-0006Eb-00; Tue, 17 Aug 2004 11:35:05 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BwssP-0005e6-00; Tue, 17 Aug 2004 11:35:01 +1000 Date: Tue, 17 Aug 2004 11:35:01 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [XFRM] Kill unused flow_hash Message-ID: <20040817013501.GA21685@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7848 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: 1928 Lines: 76 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: This patch removes a left-over from the days when the flow cache lived in xfrm_policy.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 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== include/net/xfrm.h 1.65 vs edited ===== --- 1.65/include/net/xfrm.h 2004-08-14 20:59:43 +10:00 +++ edited/include/net/xfrm.h 2004-08-17 11:20:39 +10:00 @@ -304,47 +304,6 @@ extern int xfrm_unregister_km(struct xfrm_mgr *km); -#define XFRM_FLOWCACHE_HASH_SIZE 1024 - -static inline u32 __flow_hash4(struct flowi *fl) -{ - u32 hash = fl->fl4_src ^ fl->fl_ip_sport; - - hash = ((hash & 0xF0F0F0F0) >> 4) | ((hash & 0x0F0F0F0F) << 4); - - hash ^= fl->fl4_dst ^ fl->fl_ip_dport; - hash ^= (hash >> 10); - hash ^= (hash >> 20); - return hash & (XFRM_FLOWCACHE_HASH_SIZE-1); -} - -static inline u32 __flow_hash6(struct flowi *fl) -{ - u32 hash = fl->fl6_src.s6_addr32[2] ^ - fl->fl6_src.s6_addr32[3] ^ - fl->fl_ip_sport; - - hash = ((hash & 0xF0F0F0F0) >> 4) | ((hash & 0x0F0F0F0F) << 4); - - hash ^= fl->fl6_dst.s6_addr32[2] ^ - fl->fl6_dst.s6_addr32[3] ^ - fl->fl_ip_dport; - hash ^= (hash >> 10); - hash ^= (hash >> 20); - return hash & (XFRM_FLOWCACHE_HASH_SIZE-1); -} - -static inline u32 flow_hash(struct flowi *fl, unsigned short family) -{ - switch (family) { - case AF_INET: - return __flow_hash4(fl); - case AF_INET6: - return __flow_hash6(fl); - } - return 0; /*XXX*/ -} - extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2]; static inline void xfrm_pol_hold(struct xfrm_policy *policy) --0OAP2g/MAC+5xKAE-- From jmorris@redhat.com Mon Aug 16 23:43:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 23:43:56 -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 i7H6hlwR030674 for ; Mon, 16 Aug 2004 23:43:48 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7H6hfe1023435 for ; Tue, 17 Aug 2004 02:43:41 -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 i7H6hfa13774; Tue, 17 Aug 2004 02:43:41 -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 i7H6hftM003138; Tue, 17 Aug 2004 02:43:41 -0400 Date: Tue, 17 Aug 2004 02:43:38 -0400 (EDT) From: James Morris X-X-Sender: jmorris@dhcp83-76.boston.redhat.com To: "David S. Miller" cc: netdev@oss.sgi.com Subject: [PATCH] SLAB_PANIC cleanup Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7849 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: 16401 Lines: 402 This is a cleanup patch which adds the SLAB_PANIC to appropriate calls to kmem_cache_create() in the networking code. This eliminiates the need for calling code to check the return value then panic on its own. I found a few places that did not check for an error return from kmem_cache_create(), and these have been converted to use SLAB_PANIC. They are: net/ipv4/fib_hash.c: fn_hash_kmem = kmem_cache_create("ip_fib_hash" net/bridge/br_fdb.c: br_fdb_cache = kmem_cache_create("bridge_fdb_cache" net/decnet/dn_table.c: dn_hash_kmem = kmem_cache_create("dn_fib_info_cache" net/socket.c: sock_inode_cachep = kmem_cache_create("sock_inode_cache" Please review & apply if ok. Signed-off-by: James Morris net/bridge/br_fdb.c | 4 ++-- net/core/flow.c | 5 +---- net/core/neighbour.c | 7 ++----- net/core/skbuff.c | 4 +--- net/core/sock.c | 6 ++---- net/decnet/dn_route.c | 7 ++----- net/decnet/dn_table.c | 2 +- net/ipv4/af_inet.c | 12 ++++++------ net/ipv4/fib_hash.c | 4 ++-- net/ipv4/inetpeer.c | 5 +---- net/ipv4/ipmr.c | 5 +---- net/ipv4/route.c | 7 ++----- net/ipv4/tcp.c | 18 ++++++------------ net/ipv6/af_inet6.c | 12 ++++++------ net/ipv6/ip6_fib.c | 4 +--- net/ipv6/route.c | 6 ++---- net/socket.c | 9 +++------ net/unix/af_unix.c | 7 ++----- net/xfrm/xfrm_input.c | 4 +--- net/xfrm/xfrm_policy.c | 5 +---- 20 files changed, 45 insertions(+), 88 deletions(-) diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/bridge/br_fdb.c linux-2.6.8.1-mm1.w/net/bridge/br_fdb.c --- linux-2.6.8.1-mm1.o/net/bridge/br_fdb.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/bridge/br_fdb.c 2004-08-17 02:41:47.939429992 -0400 @@ -30,8 +30,8 @@ { br_fdb_cache = kmem_cache_create("bridge_fdb_cache", sizeof(struct net_bridge_fdb_entry), - 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); } void __exit br_fdb_fini(void) diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/core/flow.c linux-2.6.8.1-mm1.w/net/core/flow.c --- linux-2.6.8.1-mm1.o/net/core/flow.c 2004-06-16 01:18:55.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/core/flow.c 2004-08-17 02:37:06.516212824 -0400 @@ -343,12 +343,9 @@ flow_cachep = kmem_cache_create("flow_cache", sizeof(struct flow_cache_entry), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!flow_cachep) - panic("NET: failed to allocate flow cache slab\n"); - flow_hash_shift = 10; flow_lwm = 2 * flow_hash_size; flow_hwm = 4 * flow_hash_size; diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/core/neighbour.c linux-2.6.8.1-mm1.w/net/core/neighbour.c --- linux-2.6.8.1-mm1.o/net/core/neighbour.c 2004-06-16 01:18:56.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/core/neighbour.c 2004-08-17 02:57:22.888296160 -0400 @@ -1165,12 +1165,9 @@ if (!tbl->kmem_cachep) tbl->kmem_cachep = kmem_cache_create(tbl->id, tbl->entry_size, - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN| + SLAB_PANIC, NULL, NULL); - - if (!tbl->kmem_cachep) - panic("cannot create neighbour cache"); - tbl->lock = RW_LOCK_UNLOCKED; init_timer(&tbl->gc_timer); tbl->gc_timer.data = (unsigned long)tbl; diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/core/skbuff.c linux-2.6.8.1-mm1.w/net/core/skbuff.c --- linux-2.6.8.1-mm1.o/net/core/skbuff.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/core/skbuff.c 2004-08-17 02:38:35.910622808 -0400 @@ -1430,10 +1430,8 @@ skbuff_head_cache = kmem_cache_create("skbuff_head_cache", sizeof(struct sk_buff), 0, - SLAB_HWCACHE_ALIGN, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!skbuff_head_cache) - panic("cannot create skbuff cache"); } EXPORT_SYMBOL(___pskb_trim); diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/core/sock.c linux-2.6.8.1-mm1.w/net/core/sock.c --- linux-2.6.8.1-mm1.o/net/core/sock.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/core/sock.c 2004-08-17 02:51:36.197001248 -0400 @@ -660,10 +660,8 @@ void __init sk_init(void) { sk_cachep = kmem_cache_create("sock", sizeof(struct sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); - if (!sk_cachep) - printk(KERN_CRIT "sk_init: Cannot create sock SLAB cache!"); - + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); if (num_physpages <= 4096) { sysctl_wmem_max = 32767; sysctl_rmem_max = 32767; diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/decnet/dn_route.c linux-2.6.8.1-mm1.w/net/decnet/dn_route.c --- linux-2.6.8.1-mm1.o/net/decnet/dn_route.c 2004-08-16 19:23:09.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/decnet/dn_route.c 2004-08-17 02:49:12.544839696 -0400 @@ -1788,12 +1788,9 @@ dn_dst_ops.kmem_cachep = kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), - 0, SLAB_HWCACHE_ALIGN, + 0, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - - if (!dn_dst_ops.kmem_cachep) - panic("DECnet: Failed to allocate dn_dst_cache\n"); - init_timer(&dn_route_timer); dn_route_timer.function = dn_dst_check_expire; dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/decnet/dn_table.c linux-2.6.8.1-mm1.w/net/decnet/dn_table.c --- linux-2.6.8.1-mm1.o/net/decnet/dn_table.c 2004-06-16 01:19:02.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/decnet/dn_table.c 2004-08-17 02:48:00.593777920 -0400 @@ -810,7 +810,7 @@ { dn_hash_kmem = kmem_cache_create("dn_fib_info_cache", sizeof(struct dn_fib_info), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); } diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv4/af_inet.c linux-2.6.8.1-mm1.w/net/ipv4/af_inet.c --- linux-2.6.8.1-mm1.o/net/ipv4/af_inet.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv4/af_inet.c 2004-08-17 02:30:55.632595704 -0400 @@ -1018,16 +1018,16 @@ tcp_sk_cachep = kmem_cache_create("tcp_sock", sizeof(struct tcp_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); udp_sk_cachep = kmem_cache_create("udp_sock", sizeof(struct udp_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); raw4_sk_cachep = kmem_cache_create("raw4_sock", sizeof(struct raw_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); - if (!tcp_sk_cachep || !udp_sk_cachep || !raw4_sk_cachep) - printk(KERN_CRIT - "inet_init: Can't create protocol sock SLAB caches!\n"); + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); /* * Tell SOCKET that we are alive... */ diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv4/fib_hash.c linux-2.6.8.1-mm1.w/net/ipv4/fib_hash.c --- linux-2.6.8.1-mm1.o/net/ipv4/fib_hash.c 2004-06-16 01:19:23.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv4/fib_hash.c 2004-08-17 02:34:57.717793160 -0400 @@ -873,8 +873,8 @@ if (fn_hash_kmem == NULL) fn_hash_kmem = kmem_cache_create("ip_fib_hash", - sizeof(struct fib_node), - 0, SLAB_HWCACHE_ALIGN, + sizeof(struct fib_node), 0, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); tb = kmalloc(sizeof(struct fib_table) + sizeof(struct fn_hash), GFP_KERNEL); diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv4/inetpeer.c linux-2.6.8.1-mm1.w/net/ipv4/inetpeer.c --- linux-2.6.8.1-mm1.o/net/ipv4/inetpeer.c 2004-06-16 01:20:03.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv4/inetpeer.c 2004-08-17 02:35:53.926248176 -0400 @@ -126,12 +126,9 @@ peer_cachep = kmem_cache_create("inet_peer_cache", sizeof(struct inet_peer), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!peer_cachep) - panic("cannot create inet_peer_cache"); - /* All the timers, started at system startup tend to synchronize. Perturb it a bit. */ diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv4/ipmr.c linux-2.6.8.1-mm1.w/net/ipv4/ipmr.c --- linux-2.6.8.1-mm1.o/net/ipv4/ipmr.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv4/ipmr.c 2004-08-17 02:33:16.673154280 -0400 @@ -1885,11 +1885,8 @@ { mrt_cachep = kmem_cache_create("ip_mrt_cache", sizeof(struct mfc_cache), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!mrt_cachep) - panic("cannot allocate ip_mrt_cache"); - init_timer(&ipmr_expire_timer); ipmr_expire_timer.function=ipmr_expire_process; register_netdevice_notifier(&ip_mr_notifier); diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv4/route.c linux-2.6.8.1-mm1.w/net/ipv4/route.c --- linux-2.6.8.1-mm1.o/net/ipv4/route.c 2004-08-16 19:23:09.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv4/route.c 2004-08-17 02:36:33.417244632 -0400 @@ -2760,13 +2760,10 @@ #endif ipv4_dst_ops.kmem_cachep = kmem_cache_create("ip_dst_cache", - sizeof(struct rtable), - 0, SLAB_HWCACHE_ALIGN, + sizeof(struct rtable), 0, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!ipv4_dst_ops.kmem_cachep) - panic("IP: failed to allocate ip_dst_cache\n"); - goal = num_physpages >> (26 - PAGE_SHIFT); if (rhash_entries) goal = (rhash_entries * sizeof(struct rt_hash_bucket)) >> PAGE_SHIFT; diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv4/tcp.c linux-2.6.8.1-mm1.w/net/ipv4/tcp.c --- linux-2.6.8.1-mm1.o/net/ipv4/tcp.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv4/tcp.c 2004-08-17 02:32:26.816733608 -0400 @@ -2211,25 +2211,19 @@ sizeof(skb->cb)); tcp_openreq_cachep = kmem_cache_create("tcp_open_request", - sizeof(struct open_request), - 0, SLAB_HWCACHE_ALIGN, + sizeof(struct open_request), 0, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!tcp_openreq_cachep) - panic("tcp_init: Cannot alloc open_request cache."); tcp_bucket_cachep = kmem_cache_create("tcp_bind_bucket", - sizeof(struct tcp_bind_bucket), - 0, SLAB_HWCACHE_ALIGN, + sizeof(struct tcp_bind_bucket), 0, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!tcp_bucket_cachep) - panic("tcp_init: Cannot alloc tcp_bind_bucket cache."); tcp_timewait_cachep = kmem_cache_create("tcp_tw_bucket", - sizeof(struct tcp_tw_bucket), - 0, SLAB_HWCACHE_ALIGN, + sizeof(struct tcp_tw_bucket), 0, + SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!tcp_timewait_cachep) - panic("tcp_init: Cannot alloc tcp_tw_bucket cache."); /* Size and allocate the main established and bind bucket * hash tables. diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv6/af_inet6.c linux-2.6.8.1-mm1.w/net/ipv6/af_inet6.c --- linux-2.6.8.1-mm1.o/net/ipv6/af_inet6.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv6/af_inet6.c 2004-08-17 02:43:32.244573200 -0400 @@ -717,16 +717,16 @@ /* allocate our sock slab caches */ tcp6_sk_cachep = kmem_cache_create("tcp6_sock", sizeof(struct tcp6_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); udp6_sk_cachep = kmem_cache_create("udp6_sock", sizeof(struct udp6_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); raw6_sk_cachep = kmem_cache_create("raw6_sock", sizeof(struct raw6_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); - if (!tcp6_sk_cachep || !udp6_sk_cachep || !raw6_sk_cachep) - printk(KERN_CRIT "%s: Can't create protocol sock SLAB " - "caches!\n", __FUNCTION__); + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); /* Register the socket-side information for inet6_create. */ for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv6/ip6_fib.c linux-2.6.8.1-mm1.w/net/ipv6/ip6_fib.c --- linux-2.6.8.1-mm1.o/net/ipv6/ip6_fib.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv6/ip6_fib.c 2004-08-17 02:44:59.806261800 -0400 @@ -1237,10 +1237,8 @@ { fib6_node_kmem = kmem_cache_create("fib6_nodes", sizeof(struct fib6_node), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!fib6_node_kmem) - panic("cannot create fib6_nodes cache"); } void __exit fib6_gc_cleanup(void) diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv6/route.c linux-2.6.8.1-mm1.w/net/ipv6/route.c --- linux-2.6.8.1-mm1.o/net/ipv6/route.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/ipv6/route.c 2004-08-17 02:44:31.302595016 -0400 @@ -2026,11 +2026,9 @@ ip6_dst_ops.kmem_cachep = kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN| + SLAB_PANIC, NULL, NULL); - if (!ip6_dst_ops.kmem_cachep) - panic("cannot create ip6_dst_cache"); - fib6_init(); #ifdef CONFIG_PROC_FS p = proc_net_create("ipv6_route", 0, rt6_proc_info); diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/socket.c linux-2.6.8.1-mm1.w/net/socket.c --- linux-2.6.8.1-mm1.o/net/socket.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/socket.c 2004-08-17 02:50:50.653924848 -0400 @@ -307,15 +307,12 @@ inode_init_once(&ei->vfs_inode); } -static int init_inodecache(void) +static void init_inodecache(void) { sock_inode_cachep = kmem_cache_create("sock_inode_cache", sizeof(struct socket_alloc), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, - init_once, NULL); - if (sock_inode_cachep == NULL) - return -ENOMEM; - return 0; + 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| + SLAB_PANIC, init_once, NULL); } static struct super_operations sockfs_ops = { diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/unix/af_unix.c linux-2.6.8.1-mm1.w/net/unix/af_unix.c --- linux-2.6.8.1-mm1.o/net/unix/af_unix.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/unix/af_unix.c 2004-08-17 02:47:27.418821280 -0400 @@ -2034,11 +2034,8 @@ /* allocate our sock slab cache */ unix_sk_cachep = kmem_cache_create("unix_sock", sizeof(struct unix_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); - if (!unix_sk_cachep) - printk(KERN_CRIT - "af_unix_init: Cannot create unix_sock SLAB cache!\n"); - + SLAB_HWCACHE_ALIGN|SLAB_PANIC, + NULL, NULL); sock_register(&unix_family_ops); #ifdef CONFIG_PROC_FS proc_net_fops_create("unix", 0, &unix_seq_fops); diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/xfrm/xfrm_input.c linux-2.6.8.1-mm1.w/net/xfrm/xfrm_input.c --- linux-2.6.8.1-mm1.o/net/xfrm/xfrm_input.c 2004-06-16 01:18:54.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/xfrm/xfrm_input.c 2004-08-17 02:46:00.745997552 -0400 @@ -78,8 +78,6 @@ { secpath_cachep = kmem_cache_create("secpath_cache", sizeof(struct sec_path), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!secpath_cachep) - panic("XFRM: failed to allocate secpath_cache\n"); } diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/xfrm/xfrm_policy.c linux-2.6.8.1-mm1.w/net/xfrm/xfrm_policy.c --- linux-2.6.8.1-mm1.o/net/xfrm/xfrm_policy.c 2004-08-14 10:25:45.000000000 -0400 +++ linux-2.6.8.1-mm1.w/net/xfrm/xfrm_policy.c 2004-08-17 02:46:32.691141152 -0400 @@ -1230,11 +1230,8 @@ { xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache", sizeof(struct xfrm_dst), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); - if (!xfrm_dst_cache) - panic("XFRM: failed to allocate xfrm_dst_cache\n"); - INIT_WORK(&xfrm_policy_gc_work, xfrm_policy_gc_task, NULL); register_netdevice_notifier(&xfrm_dev_notifier); } From yoshfuji@linux-ipv6.org Mon Aug 16 23:59:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 16 Aug 2004 23:59:18 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7H6x8aQ000360 for ; Mon, 16 Aug 2004 23:59:14 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 7748033CE5; Tue, 17 Aug 2004 15:59:42 +0900 (JST) Date: Tue, 17 Aug 2004 15:59:42 +0900 (JST) Message-Id: <20040817.155942.51047516.yoshfuji@linux-ipv6.org> To: jmorris@redhat.com Cc: davem@redhat.com, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH] SLAB_PANIC cleanup 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: 7850 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: 1473 Lines: 37 In article (at Tue, 17 Aug 2004 02:43:38 -0400 (EDT)), James Morris says: It generally seems okay. Just a few things for readability. > diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/core/neighbour.c linux-2.6.8.1-mm1.w/net/core/neighbour.c > --- linux-2.6.8.1-mm1.o/net/core/neighbour.c 2004-06-16 01:18:56.000000000 -0400 > +++ linux-2.6.8.1-mm1.w/net/core/neighbour.c 2004-08-17 02:57:22.888296160 -0400 > @@ -1165,12 +1165,9 @@ > if (!tbl->kmem_cachep) > tbl->kmem_cachep = kmem_cache_create(tbl->id, > tbl->entry_size, > - 0, SLAB_HWCACHE_ALIGN, > + 0, SLAB_HWCACHE_ALIGN| > + SLAB_PANIC, I rather prefer tbl->entry_size, 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, > diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/ipv6/route.c linux-2.6.8.1-mm1.w/net/ipv6/route.c > --- linux-2.6.8.1-mm1.o/net/ipv6/route.c 2004-08-14 10:25:45.000000000 -0400 > +++ linux-2.6.8.1-mm1.w/net/ipv6/route.c 2004-08-17 02:44:31.302595016 -0400 > @@ -2026,11 +2026,9 @@ > > ip6_dst_ops.kmem_cachep = kmem_cache_create("ip6_dst_cache", > sizeof(struct rt6_info), > - 0, SLAB_HWCACHE_ALIGN, > + 0, SLAB_HWCACHE_ALIGN| > + SLAB_PANIC, > NULL, NULL); ditto. -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From SRS0+162d46c9a7f215777b20+359+infradead.org+hch@phoenix.srs.infradead.org Tue Aug 17 02:08:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 02:08:10 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7H983UC008876 for ; Tue, 17 Aug 2004 02:08:05 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1Bwzwi-0005Ki-1D; Tue, 17 Aug 2004 10:07:56 +0100 Date: Tue, 17 Aug 2004 10:07:55 +0100 From: Christoph Hellwig To: James Morris Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] SLAB_PANIC cleanup Message-ID: <20040817100755.A20489@infradead.org> References: 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 jmorris@redhat.com on Tue, Aug 17, 2004 at 02:43:38AM -0400 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7851 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: 248 Lines: 6 On Tue, Aug 17, 2004 at 02:43:38AM -0400, James Morris wrote: > net/bridge/br_fdb.c: br_fdb_cache = kmem_cache_create("bridge_fdb_cache" > net/decnet/dn_table.c: dn_hash_kmem = kmem_cache_create("dn_fib_info_cache" Can't these two be modular? From hadi@cyberus.ca Tue Aug 17 04:52:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 04:52: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 i7HBqLaR027261 for ; Tue, 17 Aug 2004 04:52:24 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1Bx2Vg-0007aX-FR for netdev@oss.sgi.com; Tue, 17 Aug 2004 07:52:12 -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 1Bx2Vd-0004r1-5U; Tue, 17 Aug 2004 07:52:09 -0400 Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <4120D068.2040608@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1092743526.1038.47.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 17 Aug 2004 07:52:07 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7852 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: 4199 Lines: 104 On Mon, 2004-08-16 at 11:19, sandr8 wrote: > jamal wrote: > [..] > the danger should be where it is used incorrectly. > you are right, but for the moment it is not used > spreadly. It is used all over the stack. Lets defer this part of the discussion - even if we never "fix" this it doesnt matter. > please correct me if i am wrong: the two big questions are: > > 1) moving that code away from net/core/dev.c > > and > > 2) what to do in case of packets sent over multiple interfaces? > > for what concerns (1), i was wondering if it would be > less nasty to have a device enqueue operation that will > interact (wraps it and does something around that) with > the outmost qdisc enqueue... this could give a good > abstraction to answer to question 2 as well... I am not sure i followed. > for what concerns (2), i see that jamal takes literally > the meaning of 'billing' a connection... well i was > thinking just at traffic policing and not at money > accounting and billing servers... The policer (or any other action) accounts for what passes through it. Dropping packets at the policer is policy definition. Dropping packets at the qdisc due to full queue is an accident. An accident that in a good system shouldnt happen. For the accident part i agree with the unbilling/recompensation feature. I do agree with you - I think we have some bad accounting practises at the qdisc level. Look at the requeu accounting for another example. I also have issues with some of the other stats, example stats.packets should really be incremented on enqueue to account for all the packets enqueue has seen (instead it is an accounting for how many success have happened) > in any case... regarding what to do if a packet sent over > multiple interfaces is dropped only in some of them and > not on all of them... this could also happen for a broadcast > or multicast packet... and thinking about it, the most coerent > thing to do from my viewpoint (traffic policing, not getting > money for the service given) would be to have a separate view > of the same packet flow at every different interface... this > would get more complex, but the separate device-level enqueue > could be the place to do that. there would also have place the > single point for drops. Yes, this is a hard question. Did you see the suggestion i proposed to Harald? > in an other message, jamal wrote: > > >Let me think about it. > >Clearly the best place to account for things is on the wire once the > >packet has left the box ;-> So the closest you are to the wire, the > >better. How open are you to move accounting further down? My thoughts > >are along the lines of incrementing the contrack counters at the qdisc > >level. Since you transport after the structure has been deleted, it > >should work out fine and fair billing will be taken care of. > > > > > accounting when the packet goes to the wire would mean at the > dequeue level? I mean it is grabbed from the qdisc and a DMA of the packet is attempted. > besides, as harald sais, grabbing a lock every time a packet is sent and > not only when a packet is dropped... this would also imply from my > particular viewpoint, that when enqueing a packet we will not yet know how > much its flow/connection has been billed till know. we'll know that, only > once the previous packet will have been dequeued. and for me it would > be _much_ more cpu-intensive to behave consequently to that information if > i get it that late :''''( I have been thinking about the lock cost. I believe the cost of using stats lock at qdisc is the same as what you have currently with unbilling. > this because it would force me to have more complexity in the enqueue > operation, that in the scheduler i'm trying to write does need to have that > information to put packets correctly into the queue. Ok, now you mention the other piece. What are you trying to do on said qdisc? > i think that in that case, i'd better duplicate the work and account that > information on my own... the speedup i'd get would be definitely worth > having twice the same info... even though that would not be elegant at > all... :( Explain what your qdisc is doing. cheers, jamal From jgarzik@pobox.com Tue Aug 17 05:27:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 05:27: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 i7HCRFFY032372 for ; Tue, 17 Aug 2004 05:27:16 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1Bx33U-0008Oa-TV; Tue, 17 Aug 2004 13:27:09 +0100 Message-ID: <4121F991.4000004@pobox.com> Date: Tue, 17 Aug 2004 08:26:57 -0400 From: Jeff Garzik 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: Netdev CC: Linux Kernel Subject: ethtool version 2 released Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7854 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: 762 Lines: 21 Just released a small update to ethtool, version 2, posted at http://sourceforge.net/projects/gkernel/ Like its cousin "blktool", ethtool now has a simplified version scheme, an ascending number. For those unfamiliar with ethtool, it is a utility designed to configure specific features founds on most ethernet cards. Summary of changes (mainly the new version scheme): * Feature: ethtool register dump raw mode * Feature: return results of self-test back to OS via exit(2) * Feature: add verbose register dump for pcnet32, fec_8xx * Maintenance: update to more recent autoconf * Maintenance: minor updates to e1000-specific module * Bug fix: Remove silly restriction on ethernet interface naming From herbert@gondor.apana.org.au Tue Aug 17 05:27:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 05:27: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 i7HCR1Li032334 for ; Tue, 17 Aug 2004 05:27: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 1Bx336-00032p-00; Tue, 17 Aug 2004 22:26:44 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bx330-0000cS-00; Tue, 17 Aug 2004 22:26:38 +1000 Date: Tue, 17 Aug 2004 22:26:38 +1000 To: "David S. Miller" , YOSHIFUJI Hideaki , netdev@oss.sgi.com Subject: [IPSEC] Call xfrm6_rcv in xfrm6_tunnel_rcv Message-ID: <20040817122638.GA1855@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="liOOAslEiF7prFVr" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040523i From: Herbert Xu X-archive-position: 7853 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: 4227 Lines: 159 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: This patch reuses the code in xfrm6_input.c for receiving xfrm6_tunnel packets. This removes duplicate code as well as fixing the bugs unique to xfrm6_tunnel_input. For example, it didn't move the MAC header down. Nor did it do anything with ECN. 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 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== include/net/xfrm.h 1.66 vs edited ===== --- 1.66/include/net/xfrm.h 2004-08-17 21:45:38 +10:00 +++ edited/include/net/xfrm.h 2004-08-17 22:14:07 +10:00 @@ -780,6 +780,7 @@ extern int xfrm4_output(struct sk_buff **pskb); 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); extern int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp); extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); ===== net/ipv6/xfrm6_input.c 1.17 vs edited ===== --- 1.17/net/ipv6/xfrm6_input.c 2004-07-30 21:16:40 +10:00 +++ edited/net/ipv6/xfrm6_input.c 2004-08-17 22:15:25 +10:00 @@ -9,6 +9,7 @@ * IPv6 support */ +#include #include #include #include @@ -25,11 +26,11 @@ IP6_ECN_set_ce(inner_iph); } -int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) +int xfrm6_rcv_spi(struct sk_buff **pskb, unsigned int *nhoffp, u32 spi) { struct sk_buff *skb = *pskb; int err; - u32 spi, seq; + u32 seq; struct sec_decap_state xfrm_vec[XFRM_MAX_DEPTH]; struct xfrm_state *x; int xfrm_nr = 0; @@ -40,7 +41,8 @@ nhoff = *nhoffp; nexthdr = skb->nh.raw[nhoff]; - if ((err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) + seq = 0; + if (!spi && (err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) goto drop; do { @@ -136,4 +138,11 @@ xfrm_state_put(xfrm_vec[xfrm_nr].xvec); kfree_skb(skb); return -1; +} + +EXPORT_SYMBOL(xfrm6_rcv_spi); + +int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) +{ + return xfrm6_rcv_spi(pskb, nhoffp, 0); } ===== net/ipv6/xfrm6_tunnel.c 1.7 vs edited ===== --- 1.7/net/ipv6/xfrm6_tunnel.c 2004-08-14 20:59:44 +10:00 +++ edited/net/ipv6/xfrm6_tunnel.c 2004-08-17 22:23:54 +10:00 @@ -356,17 +356,6 @@ static int xfrm6_tunnel_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) { - if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) - return -EINVAL; - - skb->mac.raw = skb->nh.raw; - skb->nh.raw = skb->data; - dst_release(skb->dst); - skb->dst = NULL; - skb->protocol = htons(ETH_P_IPV6); - skb->pkt_type = PACKET_HOST; - netif_rx(skb); - return 0; } @@ -413,49 +402,15 @@ { struct sk_buff *skb = *pskb; struct xfrm6_tunnel *handler = xfrm6_tunnel_handler; - struct xfrm_state *x = NULL; struct ipv6hdr *iph = skb->nh.ipv6h; - int err = 0; u32 spi; /* device-like_ip6ip6_handler() */ - if (handler) { - err = handler->handler(pskb, nhoffp); - if (!err) - goto out; - } + if (handler && handler->handler(pskb, nhoffp) == 0) + return 0; spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&iph->saddr); - x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, - spi, - IPPROTO_IPV6, AF_INET6); - - if (!x) - goto drop; - - spin_lock(&x->lock); - - if (unlikely(x->km.state != XFRM_STATE_VALID)) - goto drop_unlock; - - err = xfrm6_tunnel_input(x, NULL, skb); - if (err) - goto drop_unlock; - - x->curlft.bytes += skb->len; - x->curlft.packets++; - spin_unlock(&x->lock); - xfrm_state_put(x); - -out: - return 0; - -drop_unlock: - spin_unlock(&x->lock); - xfrm_state_put(x); -drop: - kfree_skb(skb); - return -1; + return xfrm6_rcv_spi(pskb, nhoffp, spi); } static void xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt, --liOOAslEiF7prFVr-- From jmorris@redhat.com Tue Aug 17 06:38:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 06:38:40 -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 i7HDcWQB001750 for ; Tue, 17 Aug 2004 06:38:33 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7HDcJe1024235; Tue, 17 Aug 2004 09:38: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 i7HDcJa32695; Tue, 17 Aug 2004 09:38:19 -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 i7HDcKtM025498; Tue, 17 Aug 2004 09:38:20 -0400 Date: Tue, 17 Aug 2004 09:38:16 -0400 (EDT) From: James Morris X-X-Sender: jmorris@dhcp83-76.boston.redhat.com To: Christoph Hellwig cc: "David S. Miller" , Subject: Re: [PATCH] SLAB_PANIC cleanup In-Reply-To: <20040817100755.A20489@infradead.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7855 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: 710 Lines: 21 On Tue, 17 Aug 2004, Christoph Hellwig wrote: > On Tue, Aug 17, 2004 at 02:43:38AM -0400, James Morris wrote: > > net/bridge/br_fdb.c: br_fdb_cache = kmem_cache_create("bridge_fdb_cache" > > net/decnet/dn_table.c: dn_hash_kmem = kmem_cache_create("dn_fib_info_cache" > > Can't these two be modular? Yes, although I'm not clear on what should be done. Returning an error via an initcall does not do anything, so if these were built statically, then the kernel would go on running after they failed. This is a general problem. e.g. IPv6, which is commonly built as a module, will panic if kmem_cache_create() fails during module load in several places. - James -- James Morris From sandr8_NOSPAM_@crocetta.org Tue Aug 17 06:41:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 06:42:03 -0700 (PDT) Received: from vsmtp2.tin.it (smtp.virgilio.it [212.216.176.142] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HDftFv002088 for ; Tue, 17 Aug 2004 06:41:56 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp2.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8CBC00076AA7; Tue, 17 Aug 2004 15:41:00 +0200 Message-ID: <41220AEA.20409@crocetta.org> Date: Tue, 17 Aug 2004 15:40:58 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: laforge@netfilter.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> In-Reply-To: <1092743526.1038.47.camel@jzny.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7856 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 4135 Lines: 124 jamal wrote: >It is used all over the stack. Lets defer this part of the >discussion - even if we never "fix" this it doesnt matter. > > sorry, i meant the two new inline functions >>i was wondering if it would be >>less nasty to have a device enqueue operation that will >>interact (wraps it and does something around that) with >>the outmost qdisc enqueue... this could give a good >>abstraction to answer to question 2 as well... >> >> > >I am not sure i followed. > > something like enqueue(dev) that will indirectly call dev->qdisc->enqueue and handle in that single place that stuff that does not fit well in net/core/dev.c >Dropping packets at the policer is policy definition. Dropping packets >at the qdisc due to full queue is an accident. An accident that in >a good system shouldnt happen. > why it should not happen in a good system? it is an accident that is a sympthom of something. when we encounter that accident we detect that "sympthom" at the scheduler. the way the scheduler reacts to that sympthom is imho part of the policy. i'm somehow advocating that the policer is something more than the mere filter, but the filter + that part of the scheduler that decides what to drop... from that viewpoint there is no big difference between the filter drop and the "accidental drop" performed nevertheless in compliance with a given policy. >For the accident part i agree with >the unbilling/recompensation feature. > > why not in the other case? :'''( well, since later on you ask me what i have in mind, it would be more clear there why i personally would need it in any case. >Yes, this is a hard question. Did you see the suggestion i proposed >to Harald? > > if it is the centralization of the stats with the reason code that, for what concerns the ACCT, says wheter to bill or unbill i think it is _really_ great :) still, for what concerns the multiple interface delivery of the same packet i don't see how it would be solved... would there be any magic to have some conntrack data per device without having to execute the actual tracking twice but without locking the whole conntrack either? what could be the "magic" to let the conntrack do the hard work just once and handle the additional traffic policing information separately, in an other data structure that is mantained on a device basis? that could also be the place where to count how much a given flow is backlogged on a given interface... which could help in choosing the dropping action... sorry, am i going too much further? >I mean it is grabbed from the qdisc and a DMA of the packet is >attempted. > > so, after (maybe better to say while :) qdisc is run and dequeues the packet. well, your approach seems to be the most coherent one... >I believe the cost of using >stats lock at qdisc is the same as what you have currently with >unbilling. > > you mean having a fine grained lock just for the stats? >>this because it would force me to have more complexity in the enqueue >>operation, that in the scheduler i'm trying to write does need to have that >>information to put packets correctly into the queue. >> >> > >Ok, now you mention the other piece. What are you trying to do on said >qdisc? > > it is not ready, but to say it shortly, i'm trying to serve first who has been _served_ the less. from the first experiments i have made this behaves pretty well and smootly, but i've noticed that _not_ unbilling can be pretty unfair towards udp flows, since they always keep sending. >>i think that in that case, i'd better duplicate the work and account that >>information on my own... the speedup i'd get would be definitely worth >>having twice the same info... even though that would not be elegant at >>all... :( >> >> > >Explain what your qdisc is doing. > > it simply has a priority dequeue that is manained ordered on the attained service. if no drop occours, then accounting before enqueueing simply forecasts the service that will have been attained up to the packet currenlty being enqueued when it will be dequeued. [ much easier to code than to say... ] >cheers, >jamal > ciao ;) From sandr8_NOSPAM_@crocetta.org Tue Aug 17 06:49:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 06:49:43 -0700 (PDT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HDnab9002551 for ; Tue, 17 Aug 2004 06:49:38 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp12.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 40B33B7C0114BD4C for netdev@oss.sgi.com; Tue, 17 Aug 2004 15:49:25 +0200 Message-ID: <41220CE4.2000308@crocetta.org> Date: Tue, 17 Aug 2004 15:49:24 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: netdev@oss.sgi.com Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> In-Reply-To: <1092743526.1038.47.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7857 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 4128 Lines: 125 jamal wrote: >It is used all over the stack. Lets defer this part of the >discussion - even if we never "fix" this it doesnt matter. > > sorry, i meant the two new inline functions >>i was wondering if it would be >>less nasty to have a device enqueue operation that will >>interact (wraps it and does something around that) with >>the outmost qdisc enqueue... this could give a good >>abstraction to answer to question 2 as well... >> >> > >I am not sure i followed. > > something like enqueue(dev) that will indirectly call dev->qdisc->enqueue and handle in that single place that stuff that does not fit well in net/core/dev.c >Dropping packets at the policer is policy definition. Dropping packets >at the qdisc due to full queue is an accident. An accident that in >a good system shouldnt happen. > why it should not happen in a good system? it is an accident that is a sympthom of something. when we encounter that accident we detect that "sympthom" at the scheduler. the way the scheduler reacts to that sympthom is imho part of the policy. i'm somehow advocating that the policer is something more than the mere filter, but the filter + that part of the scheduler that decides what to drop... from that viewpoint there is no big difference between the filter drop and the "accidental drop" performed nevertheless in compliance with a given policy. >For the accident part i agree with >the unbilling/recompensation feature. > > why not in the other case? :'''( well, since later on you ask me what i have in mind, it would be more clear there why i personally would need it in any case. >Yes, this is a hard question. Did you see the suggestion i proposed >to Harald? > > if it is the centralization of the stats with the reason code that, for what concerns the ACCT, says wheter to bill or unbill i think it is _really_ great :) still, for what concerns the multiple interface delivery of the same packet i don't see how it would be solved... would there be any magic to have some conntrack data per device without having to execute the actual tracking twice but without locking the whole conntrack either? what could be the "magic" to let the conntrack do the hard work just once and handle the additional traffic policing information separately, in an other data structure that is mantained on a device basis? that could also be the place where to count how much a given flow is backlogged on a given interface... which could help in choosing the dropping action... sorry, am i going too much further? >I mean it is grabbed from the qdisc and a DMA of the packet is >attempted. > > so, after (maybe better to say while :) qdisc is run and dequeues the packet. well, your approach seems to be the most coherent one... >I believe the cost of using >stats lock at qdisc is the same as what you have currently with >unbilling. > > you mean having a fine grained lock just for the stats? >>this because it would force me to have more complexity in the enqueue >>operation, that in the scheduler i'm trying to write does need to have that >>information to put packets correctly into the queue. >> >> > >Ok, now you mention the other piece. What are you trying to do on said >qdisc? > > it is not ready, but to say it shortly, i'm trying to serve first who has been _served_ the less. from the first experiments i have made this behaves pretty well and smootly, but i've noticed that _not_ unbilling can be pretty unfair towards udp flows, since they always keep sending. >>i think that in that case, i'd better duplicate the work and account that >>information on my own... the speedup i'd get would be definitely worth >>having twice the same info... even though that would not be elegant at >>all... :( >> >> > >Explain what your qdisc is doing. > > it simply has a priority dequeue that is manained ordered on the attained service. if no drop occours, then accounting before enqueueing simply forecasts the service that will have been attained up to the packet currenlty being enqueued when it will be dequeued. [ much easier to code than to say... ] >cheers, >jamal > ciao ;) From SRS0+162d46c9a7f215777b20+359+infradead.org+hch@phoenix.srs.infradead.org Tue Aug 17 07:07:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 07:08:00 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HE7kHK011013 for ; Tue, 17 Aug 2004 07:07:47 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1Bx4cl-0005ol-JK; Tue, 17 Aug 2004 15:07:39 +0100 Date: Tue, 17 Aug 2004 15:07:39 +0100 From: Christoph Hellwig To: James Morris Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] SLAB_PANIC cleanup Message-ID: <20040817150739.A22153@infradead.org> References: <20040817100755.A20489@infradead.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: ; from jmorris@redhat.com on Tue, Aug 17, 2004 at 09:38:16AM -0400 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 7858 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: 707 Lines: 13 On Tue, Aug 17, 2004 at 09:38:16AM -0400, James Morris wrote: > Yes, although I'm not clear on what should be done. Returning an error > via an initcall does not do anything, so if these were built statically, > then the kernel would go on running after they failed. This is a general > problem. e.g. IPv6, which is commonly built as a module, will panic if > kmem_cache_create() fails during module load in several places. The ipv6 behaviour is definnitly bad. OOM situations shouldn't panic the kernel. If something is can be built modular it surely isn't important enough to panic the kernel on bootup if it can't initialize - after all people can run a kernel without the module loaded just fine. From wensong@linux-vs.org Tue Aug 17 08:54:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 08:54:08 -0700 (PDT) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HFrxfY002642 for ; Tue, 17 Aug 2004 08:54:00 -0700 Received: from penguin.linux-vs.org ([211.136.74.15]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i7HFrSMh004907 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 17 Aug 2004 23:53:40 +0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i7HFqVUq013493; Tue, 17 Aug 2004 23:52:31 +0800 Date: Tue, 17 Aug 2004 23:52:31 +0800 (CST) From: Wensong Zhang To: netdev@oss.sgi.com cc: Julian Anastasov Subject: Re: [PATCH 2.6.8] ipvs - do not use skb_checksum_help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7859 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: 2354 Lines: 81 Hello, Agree with Julian that there is no need to call skb_checksum_help in IPVS. Please apply Julian's patch. Thanks, Wensong On Mon, 16 Aug 2004, Julian Anastasov wrote: > > Hello, > > The skb_checksum_help calls are not appropriate for > IPVS. There is already code to check and alter the ip_summed > field on packet mangling and the only thing that is needed is > to ensure ip_summed is valid for output path if the packet is > not mangled. In such case we do not validate checksum and > forward the packet claiming it is with valid checksum. > Apply after ack from Wensong. > > Signed-off-by: Julian Anastasov > > diff -ur v2.6.8/linux/net/ipv4/ipvs/ip_vs_core.c linux/net/ipv4/ipvs/ip_vs_core.c > --- v2.6.8/linux/net/ipv4/ipvs/ip_vs_core.c 2004-06-16 23:54:06.000000000 +0300 > +++ linux/net/ipv4/ipvs/ip_vs_core.c 2004-08-16 09:35:01.317806616 +0300 > @@ -735,13 +735,6 @@ > if (skb->nfcache & NFC_IPVS_PROPERTY) > return NF_ACCEPT; > > - if (skb->ip_summed == CHECKSUM_HW) { > - if (skb_checksum_help(pskb, (out == NULL))) > - return NF_DROP; > - if (skb != *pskb) > - skb = *pskb; > - } > - > iph = skb->nh.iph; > if (unlikely(iph->protocol == IPPROTO_ICMP)) { > int related, verdict = ip_vs_out_icmp(pskb, &related); > @@ -981,13 +974,6 @@ > return NF_ACCEPT; > } > > - if (skb->ip_summed == CHECKSUM_HW) { > - if (skb_checksum_help(pskb, (out == NULL))) > - return NF_DROP; > - if (skb != *pskb) > - skb = *pskb; > - } > - > iph = skb->nh.iph; > if (unlikely(iph->protocol == IPPROTO_ICMP)) { > int related, verdict = ip_vs_in_icmp(pskb, &related); > diff -ur v2.6.8/linux/net/ipv4/ipvs/ip_vs_xmit.c linux/net/ipv4/ipvs/ip_vs_xmit.c > --- v2.6.8/linux/net/ipv4/ipvs/ip_vs_xmit.c 2004-08-14 11:08:13.000000000 +0300 > +++ linux/net/ipv4/ipvs/ip_vs_xmit.c 2004-08-16 09:37:26.024807808 +0300 > @@ -128,6 +128,7 @@ > #define IP_VS_XMIT(skb, rt) \ > do { \ > (skb)->nfcache |= NFC_IPVS_PROPERTY; \ > + (skb)->ip_summed = CHECKSUM_NONE; \ > NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, (skb), NULL, \ > (rt)->u.dst.dev, dst_output); \ > } while (0) > @@ -412,8 +413,6 @@ > ip_select_ident(iph, &rt->u.dst, NULL); > ip_send_check(iph); > > - skb->ip_summed = CHECKSUM_NONE; > - > /* Another hack: avoid icmp_send in ip_fragment */ > skb->local_df = 1; > > From jmorris@redhat.com Tue Aug 17 10:35:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 10:35: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 i7HHZZXR005850 for ; Tue, 17 Aug 2004 10:35:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7HHZDe1031589; Tue, 17 Aug 2004 13:35:13 -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 i7HHZ7a31742; Tue, 17 Aug 2004 13:35:08 -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 i7HHZ5tM010653; Tue, 17 Aug 2004 13:35:06 -0400 Date: Tue, 17 Aug 2004 13:35:02 -0400 (EDT) From: James Morris X-X-Sender: jmorris@dhcp83-76.boston.redhat.com To: Wensong Zhang cc: netdev@oss.sgi.com, Julian Anastasov Subject: Re: [PATCH 2.6.8] ipvs - do not use skb_checksum_help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7860 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: 226 Lines: 13 On Tue, 17 Aug 2004, Wensong Zhang wrote: > Agree with Julian that there is no need to call skb_checksum_help in IPVS. What if you have a cloned skb? It needs to be copied. - James -- James Morris From ja@ssi.bg Tue Aug 17 10:52:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 10:52:23 -0700 (PDT) Received: from l.himel.bg (IDENT:root@[213.91.247.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HHqE1a006497 for ; Tue, 17 Aug 2004 10:52:16 -0700 Received: from linux.himel.bg (IDENT:ja@linux.himel.bg [127.0.0.1]) by l.himel.bg (8.11.6/8.9.3) with ESMTP id i7HHpdv15996; Tue, 17 Aug 2004 20:51:39 +0300 Date: Tue, 17 Aug 2004 20:51:39 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@l To: James Morris cc: Wensong Zhang , Subject: Re: [PATCH 2.6.8] ipvs - do not use skb_checksum_help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7861 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: 636 Lines: 29 Hello, On Tue, 17 Aug 2004, James Morris wrote: > On Tue, 17 Aug 2004, Wensong Zhang wrote: > > > Agree with Julian that there is no need to call skb_checksum_help in IPVS. > > What if you have a cloned skb? It needs to be copied. No problem, there is already ip_vs_make_skb_writable() which properly handles such skb states. It is used in lots of places in ipvs/: root@b:/usr/src/linux-2.6.8.1# grep -r ip_vs_make_skb_writable net/ipv4/ipvs/|wc -l 14 For read access skb_copy_bits() is used: root@b:/usr/src/linux-2.6.8.1# grep -r skb_copy_bits net/ipv4/ipvs/|wc -l 23 > - James Regards -- Julian Anastasov From Alexandre.Cassen@wanadoo.fr Tue Aug 17 12:44:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 12:44:50 -0700 (PDT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HJigmM012120 for ; Tue, 17 Aug 2004 12:44:43 -0700 Received: from Workstation.wanadoo.fr (unknown [81.185.76.199]) by hourri.hittite.isp.9tel.net (Postfix) with ESMTP id 200F3157793; Tue, 17 Aug 2004 21:55:27 +0200 (CEST) Message-Id: <6.0.1.1.2.20040817210751.01b951f0@mail> X-Sender: acassen@mail (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Tue, 17 Aug 2004 21:44:19 +0200 To: Wensong Zhang From: Alexandre Cassen Subject: [PATCH] IPVS syncd zombies fixe Cc: lvs-users@linuxvirtualserver.org, keepalived-devel@lists.sourceforge.net, netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-archive-position: 7862 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Alexandre.Cassen@wanadoo.fr Precedence: bulk X-list: netdev Content-Length: 6209 Lines: 227 Hello Wensong, I received since last few months lot of bug report from Keepalived users using VRRP with ipvs syncd option. Finally today, I found time to look at this issue and have a patch for syncd code. While starting a kernel syncd thread, we must reap the fork_sync_thread since this will produce zombies while returning to main calling point. Since syncd parent is the init process, we don't need to reap it during the syncd shutdown but we must reap it at starting time. You will find bellow a patch to fixe this and a quick trash C code to argue and highlight the need. The patch is against 2.6.7, same patch must be applied to 2.4 branch. Best regards, Alexandre --[ Patch: Begin Snip ]-- diff -urN linux-2.6.7.orig/net/ipv4/ipvs/ip_vs_sync.c linux-2.6.7/net/ipv4/ipvs/ip_vs_sync.c --- linux-2.6.7.orig/net/ipv4/ipvs/ip_vs_sync.c 2004-06-16 07:18:38.000000000 +0200 +++ linux-2.6.7/net/ipv4/ipvs/ip_vs_sync.c 2004-08-17 18:30:36.143940704 +0200 @@ -18,9 +18,11 @@ * messages filtering. */ +#define __KERNEL_SYSCALLS__ /* for waitpid */ + #include #include -#include +#include #include #include @@ -612,6 +614,7 @@ return len; } +static int errno; static DECLARE_WAIT_QUEUE_HEAD(sync_wait); static pid_t sync_master_pid = 0; @@ -840,6 +843,7 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid) { DECLARE_COMPLETION(startup); + int waitpid_result; pid_t pid; if ((state == IP_VS_STATE_MASTER && sync_master_pid) || @@ -868,6 +872,15 @@ goto repeat; } + /* + * We must reap the fork_sync_thread here. Really needed to not + * produce zombies while returning. + */ + if ((waitpid_result = waitpid(pid, NULL, __WCLONE)) != pid) { + IP_VS_ERR("%s: waitpid(%d,...) failed, errno %d\n", + __FUNCTION__, pid, -waitpid_result); + } + wait_for_completion(&startup); return 0; --[ Patch: End Snip ]-- --[ Quick Code: Begin Snip ]-- /* * Soft: Simple IPVS Syncd probing tool. * * Compilation: gcc -I/usr/src/linux/include main.c -o syncd_zombies * * Version: $Id: main.c,v 0.0.1 2004/08/17 21:35:41 acassen Exp $ * * Authors: Alexandre Cassen, * * 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. * * 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 (C) 2001-2004 Alexandre Cassen, */ #include #include #include #include #include #include #include #include static struct ip_vs_daemon_user *daemonrule; static int sockfd = -1; static void *ipvs_func = NULL; struct ip_vs_getinfo ipvs_info; typedef struct ip_vs_daemon_user ipvs_daemon_t; int ipvs_init(void) { socklen_t len; len = sizeof (ipvs_info); if ((sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) == -1) return -1; if (getsockopt(sockfd, IPPROTO_IP, IP_VS_SO_GET_INFO, (char *) &ipvs_info, &len)) return -1; return 0; } int ipvs_start_daemon(ipvs_daemon_t * dm) { ipvs_func = ipvs_start_daemon; return setsockopt(sockfd, IPPROTO_IP, IP_VS_SO_SET_STARTDAEMON, (char *) dm, sizeof (*dm)); } extern int ipvs_stop_daemon(ipvs_daemon_t * dm) { ipvs_func = ipvs_stop_daemon; return setsockopt(sockfd, IPPROTO_IP, IP_VS_SO_SET_STOPDAEMON, (char *) dm, sizeof (*dm)); } static int modprobe_ipvs(void) { char *argv[] = { "/sbin/modprobe", "-s", "-k", "--", "ip_vs", NULL }; int child; int status; int rc; if (!(child = fork())) { execv(argv[0], argv); exit(1); } rc = waitpid(child, &status, 0); if (!WIFEXITED(status) || WEXITSTATUS(status)) return 1; return 0; } static void ipvs_talk(int cmd) { int result = -1; switch (cmd) { case IP_VS_SO_SET_STARTDAEMON: result = ipvs_start_daemon(daemonrule); break; case IP_VS_SO_SET_STOPDAEMON: result = ipvs_stop_daemon(daemonrule); break; } } static int ipvs_start(void) { if (ipvs_init()) { if (modprobe_ipvs() || ipvs_init()) { printf("IPVS: Can't initialize IPVS !!!\n"); return -1; } } return 0; } int ipvs_syncd_cmd(int cmd, char *ifname, int state) { memset(daemonrule, 0, sizeof (struct ip_vs_daemon_user)); daemonrule->state = state; strncpy(daemonrule->mcast_ifn, ifname, IP_VS_IFNAME_MAXLEN); ipvs_talk(cmd); return 0; } int main(int argc, char **argv) { daemonrule = (struct ip_vs_daemon_user *) malloc(sizeof (struct ip_vs_daemon_user)); ipvs_start(); ipvs_syncd_cmd(IP_VS_SO_SET_STARTDAEMON, "eth0", IP_VS_STATE_MASTER); ipvs_syncd_cmd(IP_VS_SO_SET_STOPDAEMON, "eth0", IP_VS_STATE_MASTER); ipvs_syncd_cmd(IP_VS_SO_SET_STARTDAEMON, "eth0", IP_VS_STATE_BACKUP); ipvs_syncd_cmd(IP_VS_SO_SET_STOPDAEMON, "eth0", IP_VS_STATE_BACKUP); free(daemonrule); for (;;) { /* Dummy loop */ } exit(0); } --[ Quick Code: End Snip ]-- From qboosh@pld-linux.org Tue Aug 17 13:28:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 13:28:35 -0700 (PDT) Received: from cnj25.neoplus.adsl.tpnet.pl (cmm219.neoplus.adsl.tpnet.pl [83.31.140.219]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HKSRiL013431 for ; Tue, 17 Aug 2004 13:28:28 -0700 Received: from satan.blackhosts (localhost [127.0.0.1]) by cnj25.neoplus.adsl.tpnet.pl (8.12.11/8.12.11) with ESMTP id i7HKUEO1032184; Tue, 17 Aug 2004 22:30:14 +0200 Received: (from qboosh@localhost) by satan.blackhosts (8.12.11/8.12.11/Submit) id i7HKUDUU032181; Tue, 17 Aug 2004 22:30:13 +0200 Date: Tue, 17 Aug 2004 22:30:13 +0200 From: Jakub Bogusz To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: 2.6.8.1 - unresolved xfrm symbols in ip6_tunnel Message-ID: <20040817203013.GA31993@satan.blackhosts> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-archive-position: 7863 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: qboosh@pld-linux.org Precedence: bulk X-list: netdev Content-Length: 675 Lines: 19 I've just got: if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.8.1; fi WARNING: /lib/modules/2.6.8.1/kernel/net/ipv6/ip6_tunnel.ko needs unknown symbol xfrm6_tunnel_register WARNING: /lib/modules/2.6.8.1/kernel/net/ipv6/ip6_tunnel.ko needs unknown symbol xfrm6_tunnel_deregister with CONFIG_IPV6_TUNNEL=m and no XFRM (it wasn't selected by IPV6_TUNNEL and it's not possible to select it standalone - XFRM is selected only by some options which I don't use). So I think that IPV6_TUNNEL should select or depend on XFRM... or usage of the above symbols should depend on CONFIG_XFRM || CONFIG_XFRM_MODULE? -- Jakub Bogusz http://cyber.cs.net.pl/~qboosh/ From bunk@fs.tum.de Tue Aug 17 14:01:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 14:01:24 -0700 (PDT) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7HL1Cok016038 for ; Tue, 17 Aug 2004 14:01:16 -0700 Received: (qmail 27415 invoked from network); 17 Aug 2004 20:52:52 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 17 Aug 2004 20:52:52 -0000 Date: Tue, 17 Aug 2004 23:00:59 +0200 From: Adrian Bunk To: Jakub Bogusz , Andrew Morton Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.8.1 - unresolved xfrm symbols in ip6_tunnel Message-ID: <20040817210058.GU1387@fs.tum.de> References: <20040817203013.GA31993@satan.blackhosts> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817203013.GA31993@satan.blackhosts> User-Agent: Mutt/1.5.6i X-archive-position: 7864 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@fs.tum.de Precedence: bulk X-list: netdev Content-Length: 1882 Lines: 63 On Tue, Aug 17, 2004 at 10:30:13PM +0200, Jakub Bogusz wrote: > I've just got: > > if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.8.1; fi > WARNING: /lib/modules/2.6.8.1/kernel/net/ipv6/ip6_tunnel.ko needs unknown symbol xfrm6_tunnel_register > WARNING: /lib/modules/2.6.8.1/kernel/net/ipv6/ip6_tunnel.ko needs unknown symbol xfrm6_tunnel_deregister > > with > CONFIG_IPV6_TUNNEL=m > and no XFRM (it wasn't selected by IPV6_TUNNEL and it's not possible to > select it standalone - XFRM is selected only by some options which > I don't use). > > So I think that IPV6_TUNNEL should select or depend on XFRM... > or usage of the above symbols should depend on CONFIG_XFRM || > CONFIG_XFRM_MODULE? Thanks for this report. It's a known bug. Below is the patch from -mm fixing this issue. @Andrew: Can you push fw-new-linux-268-rc4-mm1-ipv6-in-ipv6-undefined-references with the next updates to Linus? > Jakub Bogusz http://cyber.cs.net.pl/~qboosh/ cu Adrian <-- snip --> From: Herbert Xu Fix bug #3200 *** Warning: "xfrm6_tunnel_deregister" [net/ipv6/ip6_tunnel.ko] undefined! *** Warning: "xfrm6_tunnel_register" [net/ipv6/ip6_tunnel.ko] undefined! Signed-off-by: Herbert Xu Signed-off-by: Andrew Morton --- 25-akpm/net/ipv6/Kconfig | 1 + 1 files changed, 1 insertion(+) diff -puN net/ipv6/Kconfig~fw-new-linux-268-rc4-mm1-ipv6-in-ipv6-undefined-references net/ipv6/Kconfig --- 25/net/ipv6/Kconfig~fw-new-linux-268-rc4-mm1-ipv6-in-ipv6-undefined-references 2004-08-15 17:33:34.718683088 -0700 +++ 25-akpm/net/ipv6/Kconfig 2004-08-15 17:33:34.721682632 -0700 @@ -59,6 +59,7 @@ config INET6_IPCOMP config IPV6_TUNNEL tristate "IPv6: IPv6-in-IPv6 tunnel" depends on IPV6 + select XFRM ---help--- Support for IPv6-in-IPv6 tunnels described in RFC 2473. _ From fubar@us.ibm.com Tue Aug 17 15:08:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 15:09:04 -0700 (PDT) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.133]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7HM8q9b017523 for ; Tue, 17 Aug 2004 15:08:58 -0700 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7HM8eu3535502 for ; Tue, 17 Aug 2004 18:08:40 -0400 Received: from death.nxdomain.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7HM8dn7169304 for ; Tue, 17 Aug 2004 16:08:39 -0600 Received: from death.nxdomain.ibm.com (localhost [127.0.0.1]) by death.nxdomain.ibm.com (8.12.8/8.12.8) with ESMTP id i7HM8YMg009457 for ; Tue, 17 Aug 2004 15:08:34 -0700 Received: from death (fubar@localhost) by death.nxdomain.ibm.com (8.12.8/8.12.8/Submit) with ESMTP id i7HM8Yo7009451 for ; Tue, 17 Aug 2004 15:08:34 -0700 Message-Id: <200408172208.i7HM8Yo7009451@death.nxdomain.ibm.com> To: netdev@oss.sgi.com Subject: [PATCH 2.6.8.1] bonding: bonding might sleep with lock held X-Mailer: MH-E 7.4.3; nmh 1.0.4; GNU Emacs 21.3.1 Date: Tue, 17 Aug 2004 15:08:34 -0700 From: Jay Vosburgh X-archive-position: 7865 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: fubar@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1220 Lines: 41 I posted a patch for this a while back, Andi Kleen suggested an alternate patch, which never made it into the mainline; here it is. To summarize the problem: In 802.3ad mode, the bond_close() function will eventually call dev_remove_pack() with a lock held. In turn, dev_remove_pack() calls synchronize_net() which eventually might sleep in wait_for_completion(). Patch generated against 2.6.7, but applied ok to 2.6.8.1. -J --- -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com Signed-off-by: Jay Vosburgh diff -urN linux-2.6.7-virgin/drivers/net/bonding/bond_main.c linux-2.6.7/drivers/net/bonding/bond_main.c --- linux-2.6.7-virgin/drivers/net/bonding/bond_main.c 2004-08-17 14:56:04.411984128 -0700 +++ linux-2.6.7/drivers/net/bonding/bond_main.c 2004-08-17 14:57:08.441968256 -0700 @@ -3566,15 +3566,15 @@ { struct bonding *bond = bond_dev->priv; - write_lock_bh(&bond->lock); - - bond_mc_list_destroy(bond); - if (bond->params.mode == BOND_MODE_8023AD) { /* Unregister the receive of LACPDUs */ bond_unregister_lacpdu(bond); } + write_lock_bh(&bond->lock); + + bond_mc_list_destroy(bond); + /* signal timers not to re-arm */ bond->kill_timers = 1; From acme@conectiva.com.br Tue Aug 17 21:23:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 21:23:08 -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 i7I4N1ri031109 for ; Tue, 17 Aug 2004 21:23:02 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 1B4F74757B; Wed, 18 Aug 2004 01:22:51 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 0D4354757B for ; Wed, 18 Aug 2004 01:22:50 -0300 (BRT) Received: (qmail 18828 invoked by uid 0); 18 Aug 2004 05:20:30 -0000 Received: from mapi8.distro.conectiva (HELO oops.kerneljanitors.org) (10.0.16.10) by burns.conectiva with SMTP; 18 Aug 2004 05:20:30 -0000 Received: by oops.kerneljanitors.org (Postfix, from userid 500) id 563304C816; Wed, 18 Aug 2004 01:24:05 -0300 (BRT) Date: Wed, 18 Aug 2004 01:24:05 -0300 From: Arnaldo Carvalho de Melo To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" Cc: jmorris@redhat.com, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH] SLAB_PANIC cleanup Message-ID: <20040818042404.GB1007@conectiva.com.br> References: <20040817.155942.51047516.yoshfuji@linux-ipv6.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817.155942.51047516.yoshfuji@linux-ipv6.org> X-Url: http://advogato.org/person/acme User-Agent: Mutt/1.5.5.1i X-Bogosity: No, tests=bogofilter, spamicity=0.000595, version=0.16.3 X-archive-position: 7866 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: 1069 Lines: 27 Em Tue, Aug 17, 2004 at 03:59:42PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ escreveu: > In article (at Tue, 17 Aug 2004 02:43:38 -0400 (EDT)), James Morris says: > > It generally seems okay. Just a few things for readability. > > > diff -urN -X dontdiff linux-2.6.8.1-mm1.o/net/core/neighbour.c linux-2.6.8.1-mm1.w/net/core/neighbour.c > > --- linux-2.6.8.1-mm1.o/net/core/neighbour.c 2004-06-16 01:18:56.000000000 -0400 > > +++ linux-2.6.8.1-mm1.w/net/core/neighbour.c 2004-08-17 02:57:22.888296160 -0400 > > @@ -1165,12 +1165,9 @@ > > if (!tbl->kmem_cachep) > > tbl->kmem_cachep = kmem_cache_create(tbl->id, > > tbl->entry_size, > > - 0, SLAB_HWCACHE_ALIGN, > > + 0, SLAB_HWCACHE_ALIGN| > > + SLAB_PANIC, > > I rather prefer > tbl->entry_size, 0, > SLAB_HWCACHE_ALIGN|SLAB_PANIC, I rather prefer: SLAB_HWCACHE_ALIGN | SLAB_PANIC, Regards, - Arnaldo From acme@conectiva.com.br Tue Aug 17 21:26:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 17 Aug 2004 21:26: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 i7I4QpTT031430 for ; Tue, 17 Aug 2004 21:26:51 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 496C547303; Wed, 18 Aug 2004 01:26:44 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id EA99447565 for ; Wed, 18 Aug 2004 01:26:43 -0300 (BRT) Received: (qmail 19049 invoked by uid 0); 18 Aug 2004 05:24:24 -0000 Received: from mapi8.distro.conectiva (HELO oops.kerneljanitors.org) (10.0.16.10) by burns.conectiva with SMTP; 18 Aug 2004 05:24:24 -0000 Received: by oops.kerneljanitors.org (Postfix, from userid 500) id A8B724C816; Wed, 18 Aug 2004 01:28:00 -0300 (BRT) Date: Wed, 18 Aug 2004 01:28:00 -0300 From: Arnaldo Carvalho de Melo To: Christoph Hellwig Cc: James Morris , "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] SLAB_PANIC cleanup Message-ID: <20040818042800.GC1007@conectiva.com.br> References: <20040817100755.A20489@infradead.org> <20040817150739.A22153@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817150739.A22153@infradead.org> X-Url: http://advogato.org/person/acme User-Agent: Mutt/1.5.5.1i X-Bogosity: No, tests=bogofilter, spamicity=0.007542, version=0.16.3 X-archive-position: 7867 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: 942 Lines: 19 Em Tue, Aug 17, 2004 at 03:07:39PM +0100, Christoph Hellwig escreveu: > On Tue, Aug 17, 2004 at 09:38:16AM -0400, James Morris wrote: > > Yes, although I'm not clear on what should be done. Returning an error > > via an initcall does not do anything, so if these were built statically, > > then the kernel would go on running after they failed. This is a general > > problem. e.g. IPv6, which is commonly built as a module, will panic if > > kmem_cache_create() fails during module load in several places. > > The ipv6 behaviour is definnitly bad. OOM situations shouldn't panic > the kernel. > > If something is can be built modular it surely isn't important enough to > panic the kernel on bootup if it can't initialize - after all people can > run a kernel without the module loaded just fine. Agreed, not because it is "not important", but because panicing at module load, even in very rare cases is unnacceptable IMHO. - Arnaldo From boniforti@provincia.verbania.it Wed Aug 18 01:54:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 01:54:55 -0700 (PDT) Received: from msghub.csi.it (msghub.csi.it [158.102.161.51]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7I8smhB030891 for ; Wed, 18 Aug 2004 01:54:49 -0700 Received: from srv-av03.csi.it (srv-av03.csi.it [10.102.241.20]) by msghub.csi.it (Postfix) with SMTP id 338AE1801D for ; Wed, 18 Aug 2004 08:54:36 +0000 (GMT) Received: from unknown(10.167.211.2) by srv-av03.csi.it via csmap id 0c1a1c02_f0f5_11d8_9881_00304824d3de_4279; Wed, 18 Aug 2004 11:00:26 +0200 (CEST) Received: from [10.167.211.11] (pc11 [10.167.211.11]) by server-vco.provincia.verbania.it (8.11.6+Sun/8.11.1) with ESMTP id i7I8sZD04790 for ; Wed, 18 Aug 2004 10:54:35 +0200 (MET DST) Message-ID: <4123194B.9090905@provincia.verbania.it> Date: Wed, 18 Aug 2004 10:54:35 +0200 From: Boniforti Flavio User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Bonding on Linux: some questions. Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7868 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: boniforti@provincia.verbania.it Precedence: bulk X-list: netdev Content-Length: 1528 Lines: 39 Hello! I don't know if I'm talking to the right person, if it's not the case, please redirect me to the right one. So, here we go. I first would like to understand some things about bonding, which I can't find documented anywhere. a) Is bonding in some way dependent on the setup of the switch to which I connect my Linux box? I mean: after I set up bonding on my Linux box, do I also have to do some configuration on the switch? I'm asking this because I read something about "trunking" in relation to bonding, but I didn't get the point at all. b) How is the actual procedure of the bonding activation? As far as I understand it, bond0 should go up, then "ifenslave" the other (two in my case) ethX interfaces. The MAC address of bond0 should be the same of the first slave, while the second slave gets its MAC address also set to the one of the bond0 interface. I hope somebody will answer me and help me in getting things to work correctly. Actually it seems that bonding is working on my system, though I have some doubts because: a) eth1 (second slave) has its own MAC address, not bond0 one's; b) if disconnecting eth1, network still works, but if disconnecting eth0, eth1 is actually set as active interface but no network activity is possible. Thank you very much in advance. Regards, -- ----------------------------------- Boniforti Flavio Provincia del Verbano-Cusio-Ossola Ufficio Informatica Tecnoparco del Lago Maggiore Via dell'Industria, 25 28924 Verbania ----------------------------------- From okir@suse.de Wed Aug 18 02:14:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 02:14:13 -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 i7I9E4vg031548 for ; Wed, 18 Aug 2004 02:14: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 D6624A90E80; Wed, 18 Aug 2004 11:13:52 +0200 (CEST) Date: Wed, 18 Aug 2004 11:13:52 +0200 From: Olaf Kirch To: netdev@oss.sgi.com Cc: netfilter-devel@lists.netfilter.org Subject: [PATCH] Prevent crash on ip_conntrack removal Message-ID: <20040818091352.GB6507@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7869 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: okir@suse.de Precedence: bulk X-list: netdev Content-Length: 4897 Lines: 157 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, here's a patch that keeps us from crashing on removal of ip_conntrack. This problem came up during IBM's testing of SLES. I'm not sure if this issue has been submitted already. Problem description courtesy of David Stevens: It appears that conntrack, when loaded, is queueing the fragments for reassembly pre-routing (ie, when skb->dst is 0) and giving the fully reassembled packet to the pre-routing code which will set skb->dst before using it. IP without conntrack does the queueing of fragments and reassembly post-routing, so skb->dst in that case is set for all fragments and the reassembled packet. In the failure scenario, it appears that conntrack has queued some of the fragments (w/ skb->dst=0, esp. in the offset=0 first fragment) and then the conntrack module is removed. Arrival of a fragment afterward will queue and reassemble the entire packet post-routing, but the first frag still has skb->dst 0, so it'll blow up To fix this, the patch below simply drops such skbs. A different fix could be to change the conntrack module to flush out all unassembled fragments when unloaded; an alternative patch for this is attached as well (this one is completely untested). Cheers Olaf -- Olaf Kirch | The Hardware Gods hate me. okir@suse.de | ---------------+ --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=netfilter-unload-crash Index: v2.6.8/net/ipv4/ip_input.c =================================================================== --- v2.6.8.orig/net/ipv4/ip_input.c +++ v2.6.8/net/ipv4/ip_input.c @@ -177,6 +177,13 @@ int ip_call_ra_chain(struct sk_buff *skb read_unlock(&ip_ra_lock); return 1; } + /* When ip_conntrack gets unloaded, we may be + * left with fragment chains where the first + * fragment has skb->dst = NULL. */ + if (skb->dst == NULL) { + kfree_skb(skb); + return 1; + } } if (last) { struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); @@ -277,6 +284,13 @@ int ip_local_deliver(struct sk_buff *skb skb = ip_defrag(skb); if (!skb) return 0; + /* When ip_conntrack gets unloaded, we may be + * left with fragment chains where the first + * fragment has skb->dst = NULL. */ + if (skb->dst == NULL) { + kfree_skb(skb); + return 0; + } } return NF_HOOK(PF_INET, NF_IP_LOCAL_IN, skb, skb->dev, NULL, --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=conntrack-flush-fragments Alternative fix for the crash on conntrack unload. Simply flush all fragment queues when unloading conntrack_standalone so that there are no partially assembled fragments left with skb->dst == NULL. Index: v2.6.8/include/net/ip.h =================================================================== --- v2.6.8.orig/include/net/ip.h +++ v2.6.8/include/net/ip.h @@ -255,6 +255,7 @@ extern int ip_call_ra_chain(struct sk_bu */ struct sk_buff *ip_defrag(struct sk_buff *skb); +extern void ipfrag_flush(void); extern int ip_frag_nqueues; extern atomic_t ip_frag_mem; Index: v2.6.8/net/ipv4/ip_fragment.c =================================================================== --- v2.6.8.orig/net/ipv4/ip_fragment.c +++ v2.6.8/net/ipv4/ip_fragment.c @@ -239,13 +239,13 @@ static void ipq_kill(struct ipq *ipq) /* Memory limiting on fragments. Evictor trashes the oldest * fragment queue until we are back under the low threshold. */ -static void ip_evictor(void) +static void __ip_evictor(int threshold) { struct ipq *qp; struct list_head *tmp; for(;;) { - if (atomic_read(&ip_frag_mem) <= sysctl_ipfrag_low_thresh) + if (atomic_read(&ip_frag_mem) <= threshold) return; read_lock(&ipfrag_lock); if (list_empty(&ipq_lru_list)) { @@ -267,6 +267,11 @@ static void ip_evictor(void) } } +static inline void ip_evictor(void) +{ + __ip_evictor(sysctl_ipfrag_low_thresh); +} + /* * Oops, a fragment queue timed out. Kill it and send an ICMP reply. */ @@ -677,4 +682,10 @@ void ipfrag_init(void) add_timer(&ipfrag_secret_timer); } +void ipfrag_flush(void) +{ + __ip_evictor(0); +} + EXPORT_SYMBOL(ip_defrag); +EXPORT_SYMBOL(ipfrag_flush); Index: v2.6.8/net/ipv4/netfilter/ip_conntrack_standalone.c =================================================================== --- v2.6.8.orig/net/ipv4/netfilter/ip_conntrack_standalone.c +++ v2.6.8/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -562,6 +562,8 @@ static int init_or_cleanup(int init) nf_unregister_hook(&ip_conntrack_defrag_local_out_ops); cleanup_defragops: nf_unregister_hook(&ip_conntrack_defrag_ops); + /* Frag queues may hold fragments with skb->dst == NULL */ + ipfrag_flush(); cleanup_proc: proc_net_remove("ip_conntrack"); cleanup_init: --3V7upXqbjpZ4EhLz-- From glen.turner@aarnet.edu.au Wed Aug 18 06:18:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 06:18:27 -0700 (PDT) Received: from clix.aarnet.edu.au (clix.aarnet.edu.au [192.94.63.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7IDIGOr012706 for ; Wed, 18 Aug 2004 06:18:19 -0700 Received: from [150.101.246.227] (eth8932.sa.adsl.internode.on.net [150.101.246.227]) (authenticated bits=0) by clix.aarnet.edu.au (8.12.8/8.12.8) with ESMTP id i7IDI7Wo019737 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 18 Aug 2004 23:18:08 +1000 Subject: Re: Bonding on Linux: some questions. From: Glen Turner To: Boniforti Flavio Cc: netdev@oss.sgi.com In-Reply-To: <4123194B.9090905@provincia.verbania.it> References: <4123194B.9090905@provincia.verbania.it> Content-Type: text/plain Organization: Australian Academic and Research Network Message-Id: <1092835086.3103.49.camel@andromache> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 18 Aug 2004 22:48:06 +0930 Content-Transfer-Encoding: 7bit X-MDSA: Yes X-Scanned-By: MIMEDefang 2.39 X-archive-position: 7870 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: glen.turner@aarnet.edu.au Precedence: bulk X-list: netdev Content-Length: 2708 Lines: 69 On Wed, 2004-08-18 at 18:24, Boniforti Flavio wrote: > I first would like to understand some things about bonding, which I > can't find documented anywhere. I found the documentation in /usr/src/linux-.../Documentation/networking/bonding.txt to be very fine. > a) Is bonding in some way dependent on the setup of the switch to which > I connect my Linux box? I mean: after I set up bonding on my Linux box, > do I also have to do some configuration on the switch? I'm asking this > because I read something about "trunking" in relation to bonding, but I > didn't get the point at all. Different switch manufacturers using differing terminology, but "trunking" usually refers to 802.1q or ISL VLANs. You will usually need to do some configuration on the switch. For example, to place the two interfaces into the same 802.3ad "administrative group". If you don't know the 802.3ad terminology then the IEEE's Get802.3 program allows you to download the latest 802.3 standard and it has a perfectly readable description of 802.3ad. For example, on a Cisco CatOS switch to bind ports 1/1 and 2/1, insist that that want to bond, and make the switch the most trusted device for configuration detail (rather than the host): set channelprotocol lacp 1 2 set port lacp-channel 1/1 2/1 set port lacp-channel 1/1 2/1 mode active set port lacp-channel 1/1 port priority 1 set port lacp-channel 2/1 port priority 2 > b) How is the actual procedure of the bonding activation? As far as I > understand it, bond0 should go up, then "ifenslave" the other (two in my > case) ethX interfaces. The MAC address of bond0 should be the same of > the first slave, while the second slave gets its MAC address also set to > the one of the bond0 interface. Ignore the MAC address detail. Look at /proc/net/bonding/bond0 for the operational state. Usually the problem is with /etc/modprobe.conf alias eth0 ... alias eth1 ... install bond0 modprobe bonding mode=802.3ad lacp_rate=fast miimon=100 && modprobe eth0 && modprobe eth1 You then say ifenslave bond0 eth0 ifenslave bond0 eth1 ip link set dev eth0 up ip link set dev eth1 up although all this detail is usually taken care of by the network scripts for your platform. Note that the Fedora Core bounced the link state a few times during setting up the bonding. This can trigger a spanning tree holddown. So you probably also want to activate any "fast spanning tree" option and kill any other delaying protocol negotiations (VTP, etc). To continue the CatOS example: set port 1/1 2/1 host Best of luck, Glen -- Glen Turner Tel: (08) 8303 3936 or +61 8 8303 3936 Australian Academic & Research Network www.aarnet.edu.au From yoshfuji@linux-ipv6.org Wed Aug 18 07:09:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 07:09:07 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7IE91R6014733 for ; Wed, 18 Aug 2004 07:09:02 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id D1C6C33CE5; Wed, 18 Aug 2004 23:09:36 +0900 (JST) Date: Wed, 18 Aug 2004 23:09:36 +0900 (JST) Message-Id: <20040818.230936.59708655.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org, yoshfuji@linux-ipv6.org Subject: [PATCH] XFRM: ICMP{,v6} type/code support (Take 2) (was Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code) From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040809170705.6ab75c5f.davem@redhat.com> References: <20040809175404.301bd60a@localhost> <20040809170705.6ab75c5f.davem@redhat.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: 7872 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: 8870 Lines: 332 Hello. In article <20040809170705.6ab75c5f.davem@redhat.com> (at Mon, 9 Aug 2004 17:07:05 -0700), "David S. Miller" says: > On Mon, 9 Aug 2004 17:54:04 +0900 > Masahide Nakamura wrote: > > > Thinking of raw socket (in outbound case), the patch supports only > > ICMP; it is out of scope such packet as user-land builds non-ICMP data > > (e.g. TCP/UDP) and sends through raw socket. IMO this behavior is > > enough, however does anybody have comments? > > Truly %100 RAW sockets should have their packets untouched by > the kernel. User wants exactly that packet to be sent onto > the wire. Here's the updated version of the patch. Changesets are available at: . Thanks. DIFFSTAT -------- include/net/xfrm.h | 46 ++++++++++++++++++++++++++++++++++++++++---- net/ipv4/raw.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++- net/ipv4/xfrm4_policy.c | 9 ++++++++ net/ipv6/raw.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/xfrm6_policy.c | 10 +++++++++ 5 files changed, 158 insertions(+), 5 deletions(-) CHANGESET --------- ChangeSet@1.1838, 2004-08-18 22:39:42+09:00, yoshfuji@linux-ipv6.org [XFRM] Fix selector comparison against icmp{,v6} flows. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2004-08-18 22:58:51 +09:00 +++ b/include/net/xfrm.h 2004-08-18 22:58:51 +09:00 @@ -462,13 +462,51 @@ return 1; } +static __inline__ +u16 xfrm_flowi_sport(struct flowi *fl) +{ + u16 port; + switch(fl->proto) { + case IPPROTO_TCP: + case IPPROTO_UDP: + port = fl->fl_ip_sport; + break; + case IPPROTO_ICMP: + case IPPROTO_ICMPV6: + port = htons(fl->fl_icmp_type); + break; + default: + port = 0; /*XXX*/ + } + return port; +} + +static __inline__ +u16 xfrm_flowi_dport(struct flowi *fl) +{ + u16 port; + switch(fl->proto) { + case IPPROTO_TCP: + case IPPROTO_UDP: + port = fl->fl_ip_dport; + break; + case IPPROTO_ICMP: + case IPPROTO_ICMPV6: + port = htons(fl->fl_icmp_code); + break; + default: + port = 0; /*XXX*/ + } + return port; +} + static inline int __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl) { return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) && addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) && - !((fl->fl_ip_dport^sel->dport)&sel->dport_mask) && - !((fl->fl_ip_sport^sel->sport)&sel->sport_mask) && + !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) && + !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && (fl->proto == sel->proto || !sel->proto) && (fl->oif == sel->ifindex || !sel->ifindex); } @@ -478,8 +516,8 @@ { return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) && addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) && - !((fl->fl_ip_dport^sel->dport)&sel->dport_mask) && - !((fl->fl_ip_sport^sel->sport)&sel->sport_mask) && + !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) && + !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && (fl->proto == sel->proto || !sel->proto) && (fl->oif == sel->ifindex || !sel->ifindex); } ChangeSet@1.1839, 2004-08-18 22:42:00+09:00, nakam@linux-ipv6.org [IPV6] XFRM: decode icmpv6 session. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c --- a/net/ipv6/xfrm6_policy.c 2004-08-18 22:58:54 +09:00 +++ b/net/ipv6/xfrm6_policy.c 2004-08-18 22:58:54 +09:00 @@ -213,6 +213,16 @@ fl->proto = nexthdr; return; + case IPPROTO_ICMPV6: + if (pskb_may_pull(skb, skb->nh.raw + offset + 2 - skb->data)) { + u8 *icmp = (u8 *)exthdr; + + fl->fl_icmp_type = icmp[0]; + fl->fl_icmp_code = icmp[1]; + } + fl->proto = nexthdr; + return; + /* XXX Why are there these headers? */ case IPPROTO_AH: case IPPROTO_ESP: ChangeSet@1.1840, 2004-08-18 22:43:52+09:00, nakam@linux-ipv6.org [IPV6] XFRM: probe icmpv6 type/code when sending packets via raw socket. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c --- a/net/ipv6/raw.c 2004-08-18 22:58:57 +09:00 +++ b/net/ipv6/raw.c 2004-08-18 22:58:57 +09:00 @@ -555,6 +555,52 @@ IP6_INC_STATS(IPSTATS_MIB_OUTDISCARDS); return err; } + +static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) +{ + struct iovec *iov; + u8 *type = NULL; + u8 *code = NULL; + int probed = 0; + int i; + + if (!msg->msg_iov) + return; + + for (i = 0; i < msg->msg_iovlen; i++) { + iov = &msg->msg_iov[i]; + if (!iov) + continue; + + switch (fl->proto) { + case IPPROTO_ICMPV6: + /* check if one-byte field is readable or not. */ + if (iov->iov_base && iov->iov_len < 1) + break; + + if (!type) { + type = iov->iov_base; + /* check if code field is readable or not. */ + if (iov->iov_len > 1) + code = type + 1; + } else if (!code) + code = iov->iov_base; + + if (type && code) { + fl->fl_icmp_type = *type; + fl->fl_icmp_code = *code; + probed = 1; + } + break; + default: + probed = 1; + break; + } + if (probed) + break; + } +} + static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { @@ -674,6 +720,8 @@ opt = fl6_merge_options(&opt_space, flowlabel, opt); fl.proto = proto; + rawv6_probe_proto_opt(&fl, msg); + ipv6_addr_copy(&fl.fl6_dst, daddr); if (ipv6_addr_any(&fl.fl6_src) && !ipv6_addr_any(&np->saddr)) ipv6_addr_copy(&fl.fl6_src, &np->saddr); ChangeSet@1.1841, 2004-08-18 22:45:29+09:00, nakam@linux-ipv6.org [IPV4] XFRM: decode icmp session. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c --- a/net/ipv4/xfrm4_policy.c 2004-08-18 22:59:00 +09:00 +++ b/net/ipv4/xfrm4_policy.c 2004-08-18 22:59:00 +09:00 @@ -183,6 +183,15 @@ } break; + case IPPROTO_ICMP: + if (pskb_may_pull(skb, xprth + 2 - skb->data)) { + u8 *icmp = xprth; + + fl->fl_icmp_type = icmp[0]; + fl->fl_icmp_code = icmp[1]; + } + break; + case IPPROTO_ESP: if (pskb_may_pull(skb, xprth + 4 - skb->data)) { u32 *ehdr = (u32 *)xprth; ChangeSet@1.1842, 2004-08-18 22:51:21+09:00, nakam@linux-ipv6.org [IPV4] XFRM: probe icmp type/code when sending packets via raw socket. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c --- a/net/ipv4/raw.c 2004-08-18 22:59:03 +09:00 +++ b/net/ipv4/raw.c 2004-08-18 22:59:03 +09:00 @@ -323,6 +323,51 @@ return err; } +static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) +{ + struct iovec *iov; + u8 *type = NULL; + u8 *code = NULL; + int probed = 0; + int i; + + if (!msg->msg_iov) + return; + + for (i = 0; i < msg->msg_iovlen; i++) { + iov = &msg->msg_iov[i]; + if (!iov) + continue; + + switch (fl->proto) { + case IPPROTO_ICMP: + /* check if one-byte field is readable or not. */ + if (iov->iov_base && iov->iov_len < 1) + break; + + if (!type) { + type = iov->iov_base; + /* check if code field is readable or not. */ + if (iov->iov_len > 1) + code = type + 1; + } else if (!code) + code = iov->iov_base; + + if (type && code) { + fl->fl_icmp_type = *type; + fl->fl_icmp_code = *code; + probed = 1; + } + break; + default: + probed = 1; + break; + } + if (probed) + break; + } +} + static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { @@ -429,6 +474,8 @@ .proto = inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol, }; + raw_probe_proto_opt(&fl, msg); + err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); } if (err) ChangeSet@1.1843, 2004-08-18 22:56:49+09:00, yoshfuji@linux-ipv6.org [IPV4] XFRM: don't probe icmp type/code for hdrincl sockets. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c --- a/net/ipv4/raw.c 2004-08-18 22:59:06 +09:00 +++ b/net/ipv4/raw.c 2004-08-18 22:59:06 +09:00 @@ -474,7 +474,8 @@ .proto = inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol, }; - raw_probe_proto_opt(&fl, msg); + if (!inet->hdrincl) + raw_probe_proto_opt(&fl, msg); err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); } -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From wensong@linux-vs.org Wed Aug 18 09:47:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 09:47:22 -0700 (PDT) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7IGlF8w031139 for ; Wed, 18 Aug 2004 09:47:16 -0700 Received: from penguin.linux-vs.org ([211.136.74.15]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i7IGkMMh002522 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 19 Aug 2004 00:46:32 +0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i7IGjP36002738; Thu, 19 Aug 2004 00:45:25 +0800 Date: Thu, 19 Aug 2004 00:45:24 +0800 (CST) From: Wensong Zhang To: Alexandre Cassen cc: lvs-users@linuxvirtualserver.org, , Subject: Re: [PATCH] IPVS syncd zombies fixe In-Reply-To: <6.0.1.1.2.20040817210751.01b951f0@mail> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7873 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: 7054 Lines: 246 Hi Alexandre, Thanks for locating the problem. I don't remember the exact reason that I removed the waitpid call in ipvs syncd in Feburary and considered it is superfluous, maybe because the sys_wait4 is not exported on some architecture. I'll use your program to do a test soon, and see if there is a better solution. Thanks, Wensong On Tue, 17 Aug 2004, Alexandre Cassen wrote: > Hello Wensong, > > I received since last few months lot of bug report from Keepalived users > using VRRP with ipvs syncd option. Finally today, I found time to look at > this issue and have a patch for syncd code. > > While starting a kernel syncd thread, we must reap the fork_sync_thread > since this will produce zombies while returning to main calling point. > Since syncd parent is the init process, we don't need to reap it during the > syncd shutdown but we must reap it at starting time. > > You will find bellow a patch to fixe this and a quick trash C code to argue > and highlight the need. The patch is against 2.6.7, same patch must be > applied to 2.4 branch. > > Best regards, > Alexandre > > > > --[ Patch: Begin Snip ]-- > > diff -urN linux-2.6.7.orig/net/ipv4/ipvs/ip_vs_sync.c > linux-2.6.7/net/ipv4/ipvs/ip_vs_sync.c > --- linux-2.6.7.orig/net/ipv4/ipvs/ip_vs_sync.c 2004-06-16 > 07:18:38.000000000 +0200 > +++ linux-2.6.7/net/ipv4/ipvs/ip_vs_sync.c 2004-08-17 > 18:30:36.143940704 +0200 > @@ -18,9 +18,11 @@ > * messages filtering. > */ > > +#define __KERNEL_SYSCALLS__ /* for waitpid */ > + > #include > #include > -#include > +#include > #include > > #include > @@ -612,6 +614,7 @@ > return len; > } > > +static int errno; > > static DECLARE_WAIT_QUEUE_HEAD(sync_wait); > static pid_t sync_master_pid = 0; > @@ -840,6 +843,7 @@ > int start_sync_thread(int state, char *mcast_ifn, __u8 syncid) > { > DECLARE_COMPLETION(startup); > + int waitpid_result; > pid_t pid; > > if ((state == IP_VS_STATE_MASTER && sync_master_pid) || > @@ -868,6 +872,15 @@ > goto repeat; > } > > + /* > + * We must reap the fork_sync_thread here. Really needed to not > + * produce zombies while returning. > + */ > + if ((waitpid_result = waitpid(pid, NULL, __WCLONE)) != pid) { > + IP_VS_ERR("%s: waitpid(%d,...) failed, errno %d\n", > + __FUNCTION__, pid, -waitpid_result); > + } > + > wait_for_completion(&startup); > > return 0; > > --[ Patch: End Snip ]-- > > > > --[ Quick Code: Begin Snip ]-- > > /* > * Soft: Simple IPVS Syncd probing tool. > * > * Compilation: gcc -I/usr/src/linux/include main.c -o syncd_zombies > * > * Version: $Id: main.c,v 0.0.1 2004/08/17 21:35:41 acassen Exp $ > * > * Authors: Alexandre Cassen, > * > * 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. > * > * 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 (C) 2001-2004 Alexandre Cassen, > */ > > #include > #include > #include > #include > #include > #include > #include > #include > > static struct ip_vs_daemon_user *daemonrule; > static int sockfd = -1; > static void *ipvs_func = NULL; > struct ip_vs_getinfo ipvs_info; > typedef struct ip_vs_daemon_user ipvs_daemon_t; > > int > ipvs_init(void) > { > socklen_t len; > > len = sizeof (ipvs_info); > if ((sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) == -1) > return -1; > > if (getsockopt(sockfd, IPPROTO_IP, IP_VS_SO_GET_INFO, > (char *) &ipvs_info, &len)) > return -1; > > return 0; > } > > int > ipvs_start_daemon(ipvs_daemon_t * dm) > { > ipvs_func = ipvs_start_daemon; > return setsockopt(sockfd, IPPROTO_IP, IP_VS_SO_SET_STARTDAEMON, > (char *) dm, sizeof (*dm)); > } > > extern int > ipvs_stop_daemon(ipvs_daemon_t * dm) > { > ipvs_func = ipvs_stop_daemon; > return setsockopt(sockfd, IPPROTO_IP, IP_VS_SO_SET_STOPDAEMON, > (char *) dm, sizeof (*dm)); > } > > static int > modprobe_ipvs(void) > { > char *argv[] = { "/sbin/modprobe", "-s", "-k", "--", "ip_vs", NULL }; > int child; > int status; > int rc; > > if (!(child = fork())) { > execv(argv[0], argv); > exit(1); > } > > rc = waitpid(child, &status, 0); > if (!WIFEXITED(status) || WEXITSTATUS(status)) > return 1; > return 0; > } > > static void > ipvs_talk(int cmd) > { > int result = -1; > > switch (cmd) { > case IP_VS_SO_SET_STARTDAEMON: > result = ipvs_start_daemon(daemonrule); > break; > case IP_VS_SO_SET_STOPDAEMON: > result = ipvs_stop_daemon(daemonrule); > break; > } > } > > static int > ipvs_start(void) > { > if (ipvs_init()) { > if (modprobe_ipvs() || ipvs_init()) { > printf("IPVS: Can't initialize IPVS !!!\n"); > return -1; > } > } > return 0; > } > > int > ipvs_syncd_cmd(int cmd, char *ifname, int state) > { > memset(daemonrule, 0, sizeof (struct ip_vs_daemon_user)); > daemonrule->state = state; > strncpy(daemonrule->mcast_ifn, ifname, IP_VS_IFNAME_MAXLEN); > ipvs_talk(cmd); > return 0; > } > > int > main(int argc, char **argv) > { > daemonrule = (struct ip_vs_daemon_user *) malloc(sizeof (struct > ip_vs_daemon_user)); > > ipvs_start(); > ipvs_syncd_cmd(IP_VS_SO_SET_STARTDAEMON, "eth0", IP_VS_STATE_MASTER); > ipvs_syncd_cmd(IP_VS_SO_SET_STOPDAEMON, "eth0", IP_VS_STATE_MASTER); > ipvs_syncd_cmd(IP_VS_SO_SET_STARTDAEMON, "eth0", IP_VS_STATE_BACKUP); > ipvs_syncd_cmd(IP_VS_SO_SET_STOPDAEMON, "eth0", IP_VS_STATE_BACKUP); > > free(daemonrule); > > for (;;) { /* Dummy loop */ } > exit(0); > } > > --[ Quick Code: End Snip ]-- > > From davem@redhat.com Wed Aug 18 13:13:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 13:13:43 -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 i7IKDbBa016503 for ; Wed, 18 Aug 2004 13:13:38 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7IKDSe1008208; Wed, 18 Aug 2004 16:13:28 -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 i7IKDSa12576; Wed, 18 Aug 2004 16:13:28 -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 i7IKCZ6R029822; Wed, 18 Aug 2004 16:12:36 -0400 Date: Wed, 18 Aug 2004 13:10:27 -0700 From: "David S. Miller" To: Patrick McHardy Cc: tomasz.paszkowski@e-wro.pl, netdev@oss.sgi.com Subject: Re: [PATCH 2.4] Use double-linked list for dev->qdisc_list Message-Id: <20040818131027.01288786.davem@redhat.com> In-Reply-To: <411DCA88.3080508@trash.net> References: <20040804125926.GA15324@krezus.e-wro.net> <4110E505.1010205@trash.net> <20040804145610.GA21339@krezus.e-wro.net> <20040804134432.40500c15.davem@redhat.com> <41115A37.30806@trash.net> <411DCA88.3080508@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: 7874 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: 337 Lines: 15 On Sat, 14 Aug 2004 10:17:12 +0200 Patrick McHardy wrote: > Patrick McHardy wrote: > > David S. Miller wrote: > > > >> Can someone regenerate this patch with the q_idx fix Patrick > >> just posted added to it? > >> > >> > > Updated patch for 2.4 attached. > > seems like you missed this patch. Sorry, applied :-) From davem@redhat.com Wed Aug 18 14:19:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 14:19:25 -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 i7ILJIRv018054 for ; Wed, 18 Aug 2004 14:19:19 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ILJ2e1024545; Wed, 18 Aug 2004 17:19: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 i7ILJ2a06750; Wed, 18 Aug 2004 17:19: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 i7ILIAas002501; Wed, 18 Aug 2004 17:18:10 -0400 Date: Wed, 18 Aug 2004 14:16:00 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [RFC] netem - enhancement Message-Id: <20040818141600.1fd67e91.davem@redhat.com> In-Reply-To: <20040811123103.620c2a36@dell_ss3.pdx.osdl.net> References: <20040811123103.620c2a36@dell_ss3.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: 7875 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: 654 Lines: 15 On Wed, 11 Aug 2004 12:31:03 -0700 Stephen Hemminger wrote: > This still needs more testing to go into the mainstream but here is the > updated version of netem. It adds: > * distribution table (if any) loaded as part of the configuration > * random packet duplication > * correlated random number's for loss, jitter, duplication > * changing netem parameters doesn't wipe out underlying qdisc > * better random number generator - simple net_random just isn't good enough > > Also more complete comments and attribution. I guess you will soon post an updated version that makes use of the newer net_getrandom() stuff? From davem@redhat.com Wed Aug 18 14:52:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 14:52:12 -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 i7ILq6MO019190 for ; Wed, 18 Aug 2004 14:52:07 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ILofe1031981; Wed, 18 Aug 2004 17:50:46 -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 i7ILoVa17945; Wed, 18 Aug 2004 17:50:31 -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 i7ILncJf019297; Wed, 18 Aug 2004 17:49:39 -0400 Date: Wed, 18 Aug 2004 14:47:28 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: bunk@fs.tum.de, acme@conectiva.com.br, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [2.6 patch] atalk compile errors with SYSCTL=n Message-Id: <20040818144728.5f5734c4.davem@redhat.com> In-Reply-To: <20040811170101.69c140b6@dell_ss3.pdx.osdl.net> References: <20040811224747.GQ26174@fs.tum.de> <20040811170101.69c140b6@dell_ss3.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: 7876 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: 335 Lines: 10 On Wed, 11 Aug 2004 17:01:01 -0700 Stephen Hemminger wrote: > I prefer to have the CONFIG stuff in the header file. > Here is an alternative that rearranges to put all function > prototypes in atalk.h and stubs if necessary. It gets all the #ifdef > CONFIG_ stuff out of the .c files. Applied, thanks Stephen. From davem@redhat.com Wed Aug 18 14:52:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 14:53: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 i7ILqpV5019388 for ; Wed, 18 Aug 2004 14:52:51 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ILpUe1032276; Wed, 18 Aug 2004 17:51:30 -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 i7ILpUa18246; Wed, 18 Aug 2004 17:51:30 -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 i7ILocqG019641; Wed, 18 Aug 2004 17:50:38 -0400 Date: Wed, 18 Aug 2004 14:48:28 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: bunk@fs.tum.de, SteveW@ACM.org, emserrat@geocities.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6: DECNET compile errors with SYSCTL=n Message-Id: <20040818144828.6c65ca36.davem@redhat.com> In-Reply-To: <20040812.094206.42261287.yoshfuji@linux-ipv6.org> References: <20040811224015.GP26174@fs.tum.de> <20040812.094206.42261287.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 i7ILqpV5019388 X-archive-position: 7877 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: 154 Lines: 7 On Thu, 12 Aug 2004 09:42:06 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > Please try this patch. Thanks. Applied. From davem@redhat.com Wed Aug 18 14:58:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 14:58:18 -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 i7ILwCj3019945 for ; Wed, 18 Aug 2004 14:58:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ILvwe1001395; Wed, 18 Aug 2004 17:57:58 -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 i7ILvwa20744; Wed, 18 Aug 2004 17:57:58 -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 i7ILv6F2022910; Wed, 18 Aug 2004 17:57:06 -0400 Date: Wed, 18 Aug 2004 14:54:55 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [XFRM] Kill unused flow_hash Message-Id: <20040818145455.5d58f2fe.davem@redhat.com> In-Reply-To: <20040817013501.GA21685@gondor.apana.org.au> References: <20040817013501.GA21685@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: 7878 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: 217 Lines: 9 On Tue, 17 Aug 2004 11:35:01 +1000 Herbert Xu wrote: > Hi Dave: > > This patch removes a left-over from the days when the flow cache lived > in xfrm_policy.c. Applied, thanks Herbert. From davem@redhat.com Wed Aug 18 14:59:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 14:59:57 -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 i7ILxngC020258 for ; Wed, 18 Aug 2004 14:59:50 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ILxWe1001745; Wed, 18 Aug 2004 17:59: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 i7ILxWa21146; Wed, 18 Aug 2004 17:59:32 -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 i7ILwerj023548; Wed, 18 Aug 2004 17:58:40 -0400 Date: Wed, 18 Aug 2004 14:56:30 -0700 From: "David S. Miller" To: Arnaldo Carvalho de Melo Cc: hch@infradead.org, jmorris@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH] SLAB_PANIC cleanup Message-Id: <20040818145630.2bdd0b24.davem@redhat.com> In-Reply-To: <20040818042800.GC1007@conectiva.com.br> References: <20040817100755.A20489@infradead.org> <20040817150739.A22153@infradead.org> <20040818042800.GC1007@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: 7879 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: 332 Lines: 8 On Wed, 18 Aug 2004 01:28:00 -0300 Arnaldo Carvalho de Melo wrote: > Agreed, not because it is "not important", but because panicing at module > load, even in very rare cases is unnacceptable IMHO. I think even non-modular cases should fail gracefully. If the ipv4 one fails, no ipv4 networking sorry. :-) From davem@redhat.com Wed Aug 18 15:06:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 15:06:57 -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 i7IM6oPK020810 for ; Wed, 18 Aug 2004 15:06:51 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7IM6be1003527; Wed, 18 Aug 2004 18:06: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 i7IM6aa23451; Wed, 18 Aug 2004 18:06:36 -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 i7IM5iI5025967; Wed, 18 Aug 2004 18:05:45 -0400 Date: Wed, 18 Aug 2004 15:03:34 -0700 From: "David S. Miller" To: Herbert Xu Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [IPSEC] Call xfrm6_rcv in xfrm6_tunnel_rcv Message-Id: <20040818150334.0ff3462d.davem@redhat.com> In-Reply-To: <20040817122638.GA1855@gondor.apana.org.au> References: <20040817122638.GA1855@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: 7880 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: 370 Lines: 9 On Tue, 17 Aug 2004 22:26:38 +1000 Herbert Xu wrote: > This patch reuses the code in xfrm6_input.c for receiving xfrm6_tunnel > packets. This removes duplicate code as well as fixing the bugs unique > to xfrm6_tunnel_input. For example, it didn't move the MAC header down. > Nor did it do anything with ECN. Looks great, patch applied. From davem@redhat.com Wed Aug 18 15:28:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 15:28:06 -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 i7IMRxIn024010 for ; Wed, 18 Aug 2004 15:28:00 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7IMRje1007622; Wed, 18 Aug 2004 18:27: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 i7IMRja28570; Wed, 18 Aug 2004 18:27:45 -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 i7IMQrRD001722; Wed, 18 Aug 2004 18:26:54 -0400 Date: Wed, 18 Aug 2004 15:24:42 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: nakam@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH] XFRM: ICMP{,v6} type/code support (Take 2) (was Re: [PATCH][IPSEC] IPsec policy can be matched by ICMP type and code) Message-Id: <20040818152442.42d27cbb.davem@redhat.com> In-Reply-To: <20040818.230936.59708655.yoshfuji@linux-ipv6.org> References: <20040809175404.301bd60a@localhost> <20040809170705.6ab75c5f.davem@redhat.com> <20040818.230936.59708655.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 i7IMRxIn024010 X-archive-position: 7881 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: 411 Lines: 13 On Wed, 18 Aug 2004 23:09:36 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > > Truly %100 RAW sockets should have their packets untouched by > > the kernel. User wants exactly that packet to be sent onto > > the wire. > > Here's the updated version of the patch. > Changesets are available at: > . Pulled, thanks Yoshifuji. From davem@redhat.com Wed Aug 18 17:41:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 17:41:16 -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 i7J0f4lE001723 for ; Wed, 18 Aug 2004 17:41:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7J0efe1001573; Wed, 18 Aug 2004 20:40:41 -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 i7J0efa31616; Wed, 18 Aug 2004 20:40:41 -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 i7J0dmwL012550; Wed, 18 Aug 2004 20:39:49 -0400 Date: Wed, 18 Aug 2004 17:37:36 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Cc: laforge@netfilter.org Subject: Big set of networking updates Message-Id: <20040818173736.7ad8e58a.davem@redhat.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: 7882 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: 26769 Lines: 699 A lot of things are accumulating for 2.6.9-preX while Linus is away. So I figured best to post what I have in my tree so we can begin to weed the problems out. Detailed changelong is attached, and the changes are available in two forms: BK: bk://kernel.bkbits.net/davem/net-2.6 PATCH: ftp://ftp.kernel.org/pub/linux/kernel/people/davem/net-2.6.9.diff.gz Harald, all of your netfilter updates are in here. I had to fixup a bunch of things to get the build and module symbol exports clean. In particular have a look at changesets: 1.1862: [NETFILTER]: Convert SCTP conntrack over to ip_ct_refresh_acct(). 1.1863: [NETFILTER]: Export ip_conntrack_count for ip_conntrack_standalone. 1.1864: [NETFILTER]: Need to export ip_ct_log_invalid to modules. And I put the skb_header_pointer() bits in here too. Enjoy. ChangeSet@1.1807.17.1, 2004-07-24 22:41:57-07:00, laforge@netfilter.org [NETFILTER]: ip_nat_snmp call skb_make_writable() The snmp helper needs an explicit call to skb_ip_make_writable. Please apply. Signed-off-by: James Morris Signed-off-by: Harald Welte Signed-off-by: David S. Miller net/ipv4/netfilter/ip_nat_snmp_basic.c | 3 +++ 1 files changed, 3 insertions(+) ChangeSet@1.1807.17.2, 2004-07-24 22:42:44-07:00, laforge@netfilter.org [NETFILTER]: ipt_ULOG fix for last packet delay The ULOG target used to delay the last packet until another one was received. This patch fixes the issue. Signed-off-by: Ruby Joker Signed-off-by: Harald Welte Signed-off-by: David S. Miller net/ipv4/netfilter/ipt_ULOG.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) ChangeSet@1.1807.17.3, 2004-07-24 22:43:32-07:00, laforge@netfilter.org [NETFILTER]: Use new module_param() api This patch makes all of ipv4/ipv6 netfilter use the 'new' module_param API. Signed-off-by: Rusty Russell Signed-off-by: Harald Welte Signed-off-by: David S. Miller net/ipv4/netfilter/ip_conntrack_amanda.c | 3 ++- net/ipv4/netfilter/ip_conntrack_core.c | 6 +++--- net/ipv4/netfilter/ip_conntrack_ftp.c | 12 ++++++------ net/ipv4/netfilter/ip_conntrack_irc.c | 14 +++++++------- net/ipv4/netfilter/ip_conntrack_tftp.c | 10 +++++----- net/ipv4/netfilter/ip_nat_ftp.c | 10 +++++----- net/ipv4/netfilter/ip_nat_irc.c | 11 +++++------ net/ipv4/netfilter/ip_nat_snmp_basic.c | 3 ++- net/ipv4/netfilter/ip_nat_tftp.c | 10 +++++----- net/ipv4/netfilter/ipt_LOG.c | 2 +- net/ipv4/netfilter/ipt_ULOG.c | 17 +++++++++-------- net/ipv4/netfilter/ipt_recent.c | 11 ++++++----- net/ipv4/netfilter/iptable_filter.c | 3 ++- net/ipv6/netfilter/ip6t_LOG.c | 3 ++- net/ipv6/netfilter/ip6table_filter.c | 3 ++- 15 files changed, 62 insertions(+), 56 deletions(-) ChangeSet@1.1807.17.4, 2004-07-24 22:44:17-07:00, laforge@netfilter.org [NETFILTER]: Fix mutex declaration On Sun, Jun 20, 2004 at 01:23:28PM +0200, Christoph Hellwig wrote: > okay, the gunk we had in arp_tables is in ip6_tables and ip6_tables, > too. Signed-off-by: Christoph Hellwig Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_tables.h | 1 - include/linux/netfilter_ipv6/ip6_tables.h | 4 ---- net/ipv4/netfilter/ip_tables.c | 2 ++ net/ipv6/netfilter/ip6_tables.c | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) ChangeSet@1.1807.17.5, 2004-07-24 22:45:11-07:00, laforge@netfilter.org [NETFILTER]: Use slab cache for ip_conntrack_expect This patch adds a new slab cache (ip_conntrack_expect) for expectations. Signed-off-by: Pablo Neira Signed-off-by: Harald Welte Signed-off-by: David S. Miller net/ipv4/netfilter/ip_conntrack_core.c | 31 ++++++++++++++++++++++--------- 1 files changed, 22 insertions(+), 9 deletions(-) ChangeSet@1.1807.17.6, 2004-07-24 22:45:50-07:00, laforge@netfilter.org [NETFILTER]: Connection based accounting This patch adds a config option to enable per-flow packet and byte accounting to ip_conntrack. Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_conntrack.h | 17 +++++++++++++-- net/ipv4/netfilter/Kconfig | 4 +++ net/ipv4/netfilter/ip_conntrack_amanda.c | 2 - net/ipv4/netfilter/ip_conntrack_core.c | 26 ++++++++++++++++++++---- net/ipv4/netfilter/ip_conntrack_proto_generic.c | 4 +-- net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 2 - net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 2 - net/ipv4/netfilter/ip_conntrack_proto_udp.c | 7 +++--- net/ipv4/netfilter/ip_conntrack_standalone.c | 17 ++++++++++++++- 9 files changed, 66 insertions(+), 15 deletions(-) ChangeSet@1.1807.17.7, 2004-07-24 23:00:49-07:00, laforge@netfilter.org [NETFILTER]: Move /proc/net/ip_conntrack to seq_file This patch makes ip_conntrack use the seq_file API Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_conntrack_protocol.h | 5 net/ipv4/netfilter/ip_conntrack_standalone.c | 297 ++++++++++++------- 2 files changed, 198 insertions(+), 104 deletions(-) ChangeSet@1.1807.17.8, 2004-07-24 23:03:50-07:00, laforge@netfilter.org [NETFILTER]: New ip_sctp match This patch adds ipt_sctp, enabling iptables to match on sctp ports and chunktypes. Signed-off-by: Kiran Kumar Immidi Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ipt_sctp.h | 107 +++++++++++++++++ net/ipv4/netfilter/Kconfig | 4 net/ipv4/netfilter/Makefile | 1 net/ipv4/netfilter/ipt_sctp.c | 201 ++++++++++++++++++++++++++++++++ 4 files changed, 313 insertions(+) ChangeSet@1.1807.17.9, 2004-07-24 23:04:41-07:00, laforge@netfilter.org [NETFILTER]: Make 'helper' list of ip_nat_core static This patch makes the 'helper' symbol static to not pollute the namespace Signed-off-by: Rusty Russell Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_nat_helper.h | 5 +++-- net/ipv4/netfilter/ip_nat_core.c | 11 +---------- net/ipv4/netfilter/ip_nat_helper.c | 13 +++++++++++++ 3 files changed, 17 insertions(+), 12 deletions(-) ChangeSet@1.1807.17.10, 2004-07-24 23:05:28-07:00, laforge@netfilter.org [NETFILTER]: init_conntrack() optimization This patch optimizes the code path during init_conntrack() Signed-off-by: Pablo Neira Signed-off-by: Harald Welte Signed-off-by: David S. Miller net/ipv4/netfilter/ip_conntrack_core.c | 51 ++++++++++++++++++--------------- 1 files changed, 29 insertions(+), 22 deletions(-) ChangeSet@1.1807.17.11, 2004-07-24 23:06:12-07:00, laforge@netfilter.org [NETFILTER]: Move error tracking into conntrack protocol helper This patch moves icmp_error_track out of the generic conntrack core and into the icmp helper, where it really belongs. It also adds some generic infrastructure for logging packets that are 'out of spec'. Signed-off-by: Pablo Neira Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_conntrack_core.h | 20 +- include/linux/netfilter_ipv4/ip_conntrack_protocol.h | 16 + net/ipv4/netfilter/ip_conntrack_core.c | 113 ++------------ net/ipv4/netfilter/ip_conntrack_proto_generic.c | 16 + net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 153 ++++++++++++++++++- net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 16 + net/ipv4/netfilter/ip_conntrack_proto_udp.c | 63 +++++++ net/ipv4/netfilter/ip_conntrack_standalone.c | 16 + net/ipv4/netfilter/ip_fw_compat_masq.c | 7 9 files changed, 299 insertions(+), 121 deletions(-) ChangeSet@1.1807.17.12, 2004-07-24 23:06:51-07:00, laforge@netfilter.org [NETFILTER]: Add conntrack runtime statistics This patch adds some runtime-statistics to the connection tracking core, pretty similar to what 'rtstat' does for the routing cache. This was the last patch in this incremental set. The only thing I still have pending at this time is the tcp window tracking code. Signed-off-by: Martin Josefsson Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_conntrack.h | 20 +++++ net/ipv4/netfilter/ip_conntrack_core.c | 55 ++++++++++++--- net/ipv4/netfilter/ip_conntrack_standalone.c | 96 ++++++++++++++++++++++++++- 3 files changed, 158 insertions(+), 13 deletions(-) ChangeSet@1.1807.17.13, 2004-07-24 23:08:32-07:00, laforge@netfilter.org [NETFILTER]: Add tcp window tracking This is the tcp window tracking patch, incremental to all previous changes. It is now by default enabled (i.e. in 'conservative' mode). If you think it's better to leave it disabled ('liberal' mode), you can change ip_conntrack_tcp_be_liberal to a different default value. Cheers, Signed-off-by: Jozsef Kadlecski Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_conntrack.h | 5 include/linux/netfilter_ipv4/ip_conntrack_tcp.h | 37 net/ipv4/netfilter/ip_conntrack_core.c | 7 net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 1007 +++++++++++++++++++++--- net/ipv4/netfilter/ip_conntrack_standalone.c | 36 5 files changed, 976 insertions(+), 116 deletions(-) ChangeSet@1.1807.17.14, 2004-07-25 16:36:20-07:00, laforge@netfilter.org [NETFILTER]: Missing sysctl.h bits from tcp window tracking changes. Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/sysctl.h | 5 +++++ 1 files changed, 5 insertions(+) ChangeSet@1.1807.17.15, 2004-08-01 19:18:41-07:00, laforge@netfilter.org [NETFILTER]: New ip_conntrack_sctp Incremental to all other patches so far, there is also the new SCTP conntrack helper by Kiran Kumar. Please apply for 2.6.9 ++, thanks. Signed-off-by: Kiran Kumar Immidi Signed-off-by: Harald Welte Signed-off-by: David S. Miller include/linux/netfilter_ipv4/ip_conntrack.h | 2 include/linux/netfilter_ipv4/ip_conntrack_sctp.h | 25 include/linux/netfilter_ipv4/ip_conntrack_tuple.h | 6 include/linux/sysctl.h | 7 net/ipv4/netfilter/Kconfig | 4 net/ipv4/netfilter/Makefile | 3 net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 650 ++++++++++++++++++++++ 7 files changed, 697 insertions(+) ChangeSet@1.1807.17.16, 2004-08-01 19:27:26-07:00, laforge@netfilter.org [NETFILTER]: Fix broken debug assertion This patch fixes some more broken netfilter assertions in 2.6.x. Signed-off-by: Patrick McHardy Signed-off-by: Harald Welte Signed-off-by: David S. Miller net/ipv4/netfilter/ip_nat_rule.c | 3 ++- net/ipv4/netfilter/ipt_MASQUERADE.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) ChangeSet@1.1838, 2004-08-15 19:06:03-07:00, hch@lst.de [ATM]: Missing static in atm. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller net/atm/clip.c | 4 ++-- net/atm/ipcommon.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) ChangeSet@1.1839, 2004-08-15 19:06:49-07:00, hch@lst.de [NET]: Add missing struct net_device forward decl to skbuff.h Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller include/linux/skbuff.h | 2 ++ 1 files changed, 2 insertions(+) ChangeSet@1.1840, 2004-08-15 19:09:07-07:00, kaber@trash.net [RBTREE]: Add rb_last() Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller include/linux/rbtree.h | 1 + lib/rbtree.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) ChangeSet@1.1841, 2004-08-15 19:09:51-07:00, kaber@trash.net [NET_SCHED]: Replace eligible list by rbtree in HFSC scheduler. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 111 +++++++++++++++++++-------------------------------- 1 files changed, 42 insertions(+), 69 deletions(-) ChangeSet@1.1842, 2004-08-15 19:10:33-07:00, kaber@trash.net [NET_SCHED]: Replace actlist by rbtrees in HFSC scheduler. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 182 +++++++++++++++++++++++++-------------------------- 1 files changed, 92 insertions(+), 90 deletions(-) ChangeSet@1.1843, 2004-08-15 19:11:12-07:00, kaber@trash.net [NET_SCHED]: O(1) children vtoff adjustment in HFSC scheduler Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) ChangeSet@1.1844, 2004-08-15 19:30:51-07:00, herbert@gondor.apana.org.au [IPV6]: Add missing XFRM select in Kconfig. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/ipv6/Kconfig | 1 + 1 files changed, 1 insertion(+) ChangeSet@1.1845, 2004-08-15 19:33:16-07:00, kaber@trash.net [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller net/sched/sch_api.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) ChangeSet@1.1846, 2004-08-15 19:38:31-07:00, herbert@gondor.apana.org.au [XFRM_USER]: Fill in x->props algo fields. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/xfrm/xfrm_user.c | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) ChangeSet@1.1847, 2004-08-15 19:41:47-07:00, herbert@gondor.apana.org.au [IPV6]: Fix aalg check in esp. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/ipv6/esp6.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) ChangeSet@1.1849, 2004-08-16 14:09:34-07:00, cp@absolutedigital.net [IPV4]: Delete bogus newline in first TcpExt procsfs line. Signed-off-by: Cal Peake Signed-off-by: David S. Miller net/ipv4/proc.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) ChangeSet@1.1850, 2004-08-16 14:11:08-07:00, hch@lst.de [NET]: Missing header includes and forward declarations. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller include/linux/netlink.h | 1 + include/net/ip6_fib.h | 1 + include/net/ip6_route.h | 2 ++ include/net/neighbour.h | 3 +++ 4 files changed, 7 insertions(+) ChangeSet@1.1851, 2004-08-16 17:03:08-07:00, kaber@trash.net [PKT_SCHED]: Resolve race condition with module unload in qdisc_create() This patch resolves the race condition with module unload in qdisc_create by moving try_module_get up to the first qdisc_lookup_ops call. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller net/sched/sch_api.c | 19 ++++++------------- 1 files changed, 6 insertions(+), 13 deletions(-) ChangeSet@1.1852, 2004-08-16 17:10:00-07:00, kaber@trash.net [PKT_SCHED]: Remove unnecessary memsets in packet schedulers This patch removes some more unnecessary memsets in packet schedulers. The qdisc's private data is already set to 0 in qdisc_create/qdisc_create_dflt. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller net/sched/sch_atm.c | 1 - net/sched/sch_dsmark.c | 2 -- net/sched/sch_hfsc.c | 1 - net/sched/sch_htb.c | 1 - net/sched/sch_ingress.c | 8 -------- 5 files changed, 13 deletions(-) ChangeSet@1.1837.1.1, 2004-08-18 22:39:42+09:00, yoshfuji@linux-ipv6.org [XFRM] Fix selector comparison against icmp{,v6} flows. Signed-off-by: Hideaki YOSHIFUJI include/net/xfrm.h | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 42 insertions(+), 4 deletions(-) ChangeSet@1.1837.1.2, 2004-08-18 22:42:00+09:00, nakam@linux-ipv6.org [IPV6] XFRM: decode icmpv6 session. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI net/ipv6/xfrm6_policy.c | 10 ++++++++++ 1 files changed, 10 insertions(+) ChangeSet@1.1837.1.3, 2004-08-18 22:43:52+09:00, nakam@linux-ipv6.org [IPV6] XFRM: probe icmpv6 type/code when sending packets via raw socket. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI net/ipv6/raw.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+) ChangeSet@1.1837.1.4, 2004-08-18 22:45:29+09:00, nakam@linux-ipv6.org [IPV4] XFRM: decode icmp session. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI net/ipv4/xfrm4_policy.c | 9 +++++++++ 1 files changed, 9 insertions(+) ChangeSet@1.1837.1.5, 2004-08-18 22:51:21+09:00, nakam@linux-ipv6.org [IPV4] XFRM: probe icmp type/code when sending packets via raw socket. Signed-off-by: Masahide Nakamura Signed-off-by: Hideaki YOSHIFUJI net/ipv4/raw.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+) ChangeSet@1.1837.1.6, 2004-08-18 22:56:49+09:00, yoshfuji@linux-ipv6.org [IPV4] XFRM: don't probe icmp type/code for hdrincl sockets. Signed-off-by: Hideaki YOSHIFUJI net/ipv4/raw.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) ChangeSet@1.1853, 2004-08-18 14:28:05-07:00, davem@nuts.davemloft.net [IPV4]: Fix theoretical loop on SMP in ip_evictor(). Snapshot the amount of work to do, and just do it. In this way we avoid a theoretical loop whereby one cpu sits in ip_evictor() tossing fragments while another keeps adding a fragment just as we bring ip_frag_mem down below the low threshold. Signed-off-by: David S. Miller net/ipv4/ip_fragment.c | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) ChangeSet@1.1854, 2004-08-18 14:34:14-07:00, davem@nuts.davemloft.net [IPV6]: ip6_evictor() has same problem as ip_evictor(). Signed-off-by: David S. Miller net/ipv6/reassembly.c | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) ChangeSet@1.1855, 2004-08-18 14:35:21-07:00, shemminger@osdl.org [ATALK]: Fix build with SYSCTL=n Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/linux/atalk.h | 29 ++++++++++++++++++++++++++--- net/appletalk/Makefile | 3 ++- net/appletalk/atalk_proc.c | 13 ------------- net/appletalk/ddp.c | 10 ---------- net/appletalk/sysctl_net_atalk.c | 18 ++---------------- 5 files changed, 30 insertions(+), 43 deletions(-) ChangeSet@1.1856, 2004-08-18 14:36:22-07:00, yoshfuji@linux-ipv6.org [DECONET]: Fix build with SYSCTL=n Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller net/decnet/dn_dev.c | 122 ++++++++++++++++++++++++++-------------------------- 1 files changed, 61 insertions(+), 61 deletions(-) ChangeSet@1.1857, 2004-08-18 14:39:07-07:00, wli@holomorphy.com [RXRPC]: Fix build with SYSCTL=n Signed-off-by: William Lee Irwin III Signed-off-by: David S. Miller include/rxrpc/rxrpc.h | 7 +++++++ 1 files changed, 7 insertions(+) ChangeSet@1.1858, 2004-08-18 14:43:08-07:00, herbert@gondor.apana.org.au [XFRM]: Kill unused flow_hash This patch removes a left-over from the days when the flow cache lived in xfrm_policy.c. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller include/net/xfrm.h | 41 ----------------------------------------- 1 files changed, 41 deletions(-) ChangeSet@1.1859, 2004-08-18 14:51:44-07:00, herbert@gondor.apana.org.au [IPSEC]: Call xfrm6_rcv in xfrm6_tunnel_rcv This patch reuses the code in xfrm6_input.c for receiving xfrm6_tunnel packets. This removes duplicate code as well as fixing the bugs unique to xfrm6_tunnel_input. For example, it didn't move the MAC header down. Nor did it do anything with ECN. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller include/net/xfrm.h | 1 net/ipv6/xfrm6_input.c | 15 +++++++++++--- net/ipv6/xfrm6_tunnel.c | 51 ++---------------------------------------------- 3 files changed, 16 insertions(+), 51 deletions(-) ChangeSet@1.1860, 2004-08-18 15:13:50-07:00, davem@nuts.davemloft.net Merge nuts.davemloft.net:/disk1/BK/xfrm-icmp-2.6 into nuts.davemloft.net:/disk1/BK/net-2.6 include/net/xfrm.h | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 42 insertions(+), 4 deletions(-) ChangeSet@1.1861, 2004-08-18 16:08:44-07:00, davem@nuts.davemloft.net Merge nuts.davemloft.net:/disk1/BK/nf-2.6.9 into nuts.davemloft.net:/disk1/BK/net-2.6 include/linux/sysctl.h | 12 ++++++++++++ net/ipv4/netfilter/ip_nat_snmp_basic.c | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) ChangeSet@1.1862, 2004-08-18 17:07:13-07:00, davem@nuts.davemloft.net [NETFILTER]: Convert SCTP conntrack over to ip_ct_refresh_acct(). Signed-off-by: David S. Miller net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) ChangeSet@1.1863, 2004-08-18 17:09:57-07:00, davem@nuts.davemloft.net [NETFILTER]: Export ip_conntrack_count for ip_conntrack_standalone. Signed-off-by: David S. Miller net/ipv4/netfilter/ip_conntrack_core.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) ChangeSet@1.1864, 2004-08-18 17:11:57-07:00, davem@nuts.davemloft.net [NETFILTER]: Need to export ip_ct_log_invalid to modules. net/ipv4/netfilter/ip_conntrack_standalone.c | 1 + 1 files changed, 1 insertion(+) ChangeSet@1.1865, 2004-08-18 17:15:29-07:00, davem@nuts.davemloft.net [NET]: Add skb_header_pointer, and use it where possible. This greatly improves netfilter performance where the wanted header area is in the linear SKB data area, therefore no copy into the temporary buffer is needed. Signed-off-by: David S. Miller include/linux/skbuff.h | 14 ++ net/bridge/netfilter/ebt_among.c | 49 ++++--- net/bridge/netfilter/ebt_arp.c | 51 ++++---- net/bridge/netfilter/ebt_arpreply.c | 32 +++-- net/bridge/netfilter/ebt_ip.c | 31 ++-- net/bridge/netfilter/ebt_log.c | 54 +++++--- net/bridge/netfilter/ebt_stp.c | 22 ++- net/bridge/netfilter/ebt_vlan.c | 9 - net/core/filter.c | 21 +-- net/core/netfilter.c | 9 - net/ipv4/icmp.c | 29 ++-- net/ipv4/ipvs/ip_vs_core.c | 104 +++++++++------- net/ipv4/ipvs/ip_vs_proto.c | 42 +++--- net/ipv4/ipvs/ip_vs_proto_ah.c | 9 - net/ipv4/ipvs/ip_vs_proto_esp.c | 9 - net/ipv4/ipvs/ip_vs_proto_icmp.c | 33 +++-- net/ipv4/ipvs/ip_vs_proto_tcp.c | 44 ++++--- net/ipv4/ipvs/ip_vs_proto_udp.c | 42 +++--- net/ipv4/ipvs/ip_vs_xmit.c | 9 - net/ipv4/netfilter/ip_conntrack_amanda.c | 12 + net/ipv4/netfilter/ip_conntrack_ftp.c | 31 ++-- net/ipv4/netfilter/ip_conntrack_irc.c | 26 ++-- net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 11 - net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 115 +++++++++--------- net/ipv4/netfilter/ip_conntrack_proto_udp.c | 9 - net/ipv4/netfilter/ip_conntrack_tftp.c | 10 - net/ipv4/netfilter/ip_nat_standalone.c | 10 - net/ipv4/netfilter/ip_nat_tftp.c | 25 ++-- net/ipv4/netfilter/ip_tables.c | 53 +++++--- net/ipv4/netfilter/ipchains_core.c | 42 +++--- net/ipv4/netfilter/ipfwadm_core.c | 42 +++--- net/ipv4/netfilter/ipt_ECN.c | 29 ++-- net/ipv4/netfilter/ipt_LOG.c | 168 ++++++++++++++------------- net/ipv4/netfilter/ipt_REJECT.c | 15 +- net/ipv4/netfilter/ipt_ah.c | 11 + net/ipv4/netfilter/ipt_ecn.c | 17 +- net/ipv4/netfilter/ipt_esp.c | 11 + net/ipv4/netfilter/ipt_multiport.c | 19 +-- net/ipv4/netfilter/ipt_tcpmss.c | 30 +++- net/ipv6/exthdrs_core.c | 27 ++-- net/ipv6/icmp.c | 17 +- net/rxrpc/call.c | 57 ++++----- net/sunrpc/xprt.c | 8 - security/selinux/hooks.c | 72 ++++++----- 44 files changed, 842 insertions(+), 638 deletions(-) From pmeda@akamai.com Wed Aug 18 19:08:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 19:08:29 -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 i7J28Ojg007835 for ; Wed, 18 Aug 2004 19:08:24 -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 i7J28C0Q004379 for ; Wed, 18 Aug 2004 19:08:13 -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 i7J28BTs004377; Wed, 18 Aug 2004 19:08:11 -0700 (PDT) Message-ID: <41240B8B.9A7F6CFF@akamai.com> Date: Wed, 18 Aug 2004 19:08:11 -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: netdev@oss.sgi.com CC: davem@redhat.com, linux-kernel@vger.kernel.org Subject: srtt and rtt_seq out of sync Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 7883 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: 2046 Lines: 53 tcp_init_metrics initialises srtt from route cache. tcp_rtt_estimator has an assumption that whenerver srtt is set, rtt_seq is set. Invariant assumed before(rtt_seq,snd_nxt) is not true most of the time while initailising from cache, so rttvar will not be calcualted for this socket, rto will be wrong for long time. The condition after(send_una, rtt_seq=0) is correct 50% of the time of random send_una. mdev check also resets the rttvar, but it will be slower. One fix is, initialising the rtt_seq in tcp_init_metrics properly. Another fix is, doing the special check like the below to test whether the invariant has failed, i.e. initialised from the route cache. --- net/ipv4/tcp_input.c Tue Jun 15 22:19:43 2004 +++ net/ipv4/tcp_input.c Wed Aug 18 17:36:18 2004 @@ -641,7 +641,7 @@ if (tp->mdev_max > tp->rttvar) tp->rttvar = tp->mdev_max; } - if (after(tp->snd_una, tp->rtt_seq)) { + if (after(tp->snd_una, tp->rtt_seq) || before(tp->snd_nxt, tp->rtt_seq)) if (tp->mdev_max < tp->rttvar) tp->rttvar -= (tp->rttvar-tp->mdev_max)>>2; tp->rtt_seq = tp->snd_nxt; Fix from Dave miller: ===== net/ipv4/tcp_input.c 1.69 vs edited ===== --- 1.69/net/ipv4/tcp_input.c 2004-08-02 17:05:30 -07:00 +++ edited/net/ipv4/tcp_input.c 2004-08-18 17:53:54 -07:00 @@ -852,8 +852,10 @@ * to low value, and then abruptly stops to do it and starts to delay * ACKs, wait for troubles. */ - if (dst_metric(dst, RTAX_RTT) > tp->srtt) + if (dst_metric(dst, RTAX_RTT) > tp->srtt) { tp->srtt = dst_metric(dst, RTAX_RTT); + tp->rtt_seq = tp->snd_nxt; + } if (dst_metric(dst, RTAX_RTTVAR) > tp->mdev) { tp->mdev = dst_metric(dst, RTAX_RTTVAR); tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN); Thanks, Prasanna. From pmeda@akamai.com Wed Aug 18 19:20:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 19:20:41 -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 i7J2KaI2008415 for ; Wed, 18 Aug 2004 19:20:36 -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 i7J2KK0Q004935 for ; Wed, 18 Aug 2004 19:20:20 -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 i7J2KJTs004932; Wed, 18 Aug 2004 19:20:19 -0700 (PDT) Message-ID: <41240E63.CAD19093@akamai.com> Date: Wed, 18 Aug 2004 19:20:19 -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: netdev@oss.sgi.com CC: davem@redhat.com, linux-kernel@vger.kernel.org Subject: ip_evictor can loop Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 7884 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: 6052 Lines: 213 Code has changed in 2.6 here, but still ip_frag_mem is dynamic; While getting and releasing locks, something can be inserted in the lru list, while one item can be deleted in overlapping manner. If the traffic is like there is more traffic coming in than can be freed, then ip_evictor code may loop as long as ip_frag_mem will be more than low threshold. There should be some way of getting out of this loop. If I am not missing something, fixes are 1. Calculating the goal ahead, and accounting the memory freed as return values or arguments from ipq_destroy etc. would be one fix. 2. After calling ip_evictor, ip_defrag() code should make second check on high threshold and should not queue the packet, if we are under attack or pressure. ----- The code is given below ip_fragment.c: /* Memory limiting on fragments. Evictor trashes the oldest * fragment queue until we are back under the low threshold. */ static void ip_evictor(void) { struct ipq *qp; struct list_head *tmp; for(;;) { if (atomic_read(&ip_frag_mem) <= sysctl_ipfrag_low_thresh) return; read_lock(&ipfrag_lock); if (list_empty(&ipq_lru_list)) { read_unlock(&ipfrag_lock); return; } tmp = ipq_lru_list.next; qp = list_entry(tmp, struct ipq, lru_list); atomic_inc(&qp->refcnt); read_unlock(&ipfrag_lock); spin_lock(&qp->lock); if (!(qp->last_in&COMPLETE)) ipq_kill(qp); /* -----> gets write lock ipfrag_lock */ spin_unlock(&qp->lock); ipq_put(qp); IP_INC_STATS_BH(ReasmFails); } } ------ Fix from Dave: I think #1 is the ideal fix. Do you understand that packet processing is dead on the cpu executing this code? That means the worst possible case is that all cpus in the system enter this loop, and they will absolutely make forward progress and eventually bring the value back down under the low threshold. So you'd need a multi-processor system, one cpu sits in the ip_evitor() loop and another gets exactly one fragment each time the first cpu brings the limit below the low threshold. That is the only way to loop because otherwise other cpus will work to lower the IP fragment memory usage below the threshold. I really think systems will get out of this lock-step state very quickly even under enormous packet load. Nevertheless I will add an implementation of #1 in the tree. Something like this: ===== net/ipv4/ip_fragment.c 1.8 vs edited ===== --- 1.8/net/ipv4/ip_fragment.c 2003-05-28 00:49:28 -07:00 +++ edited/net/ipv4/ip_fragment.c 2004-08-18 14:23:59 -07:00 @@ -168,14 +168,18 @@ atomic_t ip_frag_mem = ATOMIC_INIT(0); /* Memory used for fragments */ /* Memory Tracking Functions. */ -static __inline__ void frag_kfree_skb(struct sk_buff *skb) +static __inline__ void frag_kfree_skb(struct sk_buff *skb, int *work) { + if (work) + *work -= skb->truesize; atomic_sub(skb->truesize, &ip_frag_mem); kfree_skb(skb); } -static __inline__ void frag_free_queue(struct ipq *qp) +static __inline__ void frag_free_queue(struct ipq *qp, int *work) { + if (work) + *work -= sizeof(struct ipq); atomic_sub(sizeof(struct ipq), &ip_frag_mem); kfree(qp); } @@ -194,7 +198,7 @@ /* Destruction primitives. */ /* Complete destruction of ipq. */ -static void ip_frag_destroy(struct ipq *qp) +static void ip_frag_destroy(struct ipq *qp, int *work) { struct sk_buff *fp; @@ -206,18 +210,18 @@ while (fp) { struct sk_buff *xp = fp->next; - frag_kfree_skb(fp); + frag_kfree_skb(fp, work); fp = xp; } /* Finally, release the queue descriptor itself. */ - frag_free_queue(qp); + frag_free_queue(qp, work); } -static __inline__ void ipq_put(struct ipq *ipq) +static __inline__ void ipq_put(struct ipq *ipq, int *work) { if (atomic_dec_and_test(&ipq->refcnt)) - ip_frag_destroy(ipq); + ip_frag_destroy(ipq, work); } /* Kill ipq entry. It is not destroyed immediately, @@ -242,10 +246,13 @@ { struct ipq *qp; struct list_head *tmp; + int work; - for(;;) { - if (atomic_read(&ip_frag_mem) <= sysctl_ipfrag_low_thresh) - return; + work = atomic_read(&ip_frag_mem) - sysctl_ipfrag_low_thresh; + if (work <= 0) + return; + + while (work > 0) { read_lock(&ipfrag_lock); if (list_empty(&ipq_lru_list)) { read_unlock(&ipfrag_lock); @@ -261,7 +268,7 @@ ipq_kill(qp); spin_unlock(&qp->lock); - ipq_put(qp); + ipq_put(qp, &work); IP_INC_STATS_BH(IpReasmFails); } } @@ -293,7 +300,7 @@ } out: spin_unlock(&qp->lock); - ipq_put(qp); + ipq_put(qp, NULL); } /* Creation primitives. */ @@ -316,7 +323,7 @@ atomic_inc(&qp->refcnt); write_unlock(&ipfrag_lock); qp_in->last_in |= COMPLETE; - ipq_put(qp_in); + ipq_put(qp_in, NULL); return qp; } } @@ -505,7 +512,7 @@ qp->fragments = next; qp->meat -= free_it->len; - frag_kfree_skb(free_it); + frag_kfree_skb(free_it, NULL); } } @@ -656,7 +663,7 @@ ret = ip_frag_reasm(qp, dev); spin_unlock(&qp->lock); - ipq_put(qp); + ipq_put(qp, NULL); return ret; } ----- Thanks, Prasanna. From davem@redhat.com Wed Aug 18 19:28:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 19:28: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 i7J2SbSQ008837 for ; Wed, 18 Aug 2004 19:28:40 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7J2SUe1032551; Wed, 18 Aug 2004 22:28:30 -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 i7J2SKa02305; Wed, 18 Aug 2004 22:28:20 -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 i7J2RSDV012457; Wed, 18 Aug 2004 22:27:28 -0400 Date: Wed, 18 Aug 2004 19:25:14 -0700 From: "David S. Miller" To: Prasanna Meda Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: ip_evictor can loop Message-Id: <20040818192514.7332af06.davem@redhat.com> In-Reply-To: <41240E63.CAD19093@akamai.com> References: <41240E63.CAD19093@akamai.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: 7885 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: 3219 Lines: 136 BTW, I forgot to mention to Parsanna when I discussed this with him in private that ipv6 has an identical problem since the ipv6 code is derived from the ipv4 stuff. Fix for that one follows. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 14:34:14-07:00 davem@nuts.davemloft.net # [IPV6]: ip6_evictor() has same problem as ip_evictor(). # # Signed-off-by: David S. Miller # # net/ipv6/reassembly.c # 2004/08/18 14:33:54-07:00 davem@nuts.davemloft.net +22 -15 # [IPV6]: ip6_evictor() has same problem as ip_evictor(). # diff -Nru a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c --- a/net/ipv6/reassembly.c 2004-08-18 19:13:13 -07:00 +++ b/net/ipv6/reassembly.c 2004-08-18 19:13:13 -07:00 @@ -195,14 +195,18 @@ atomic_t ip6_frag_mem = ATOMIC_INIT(0); /* Memory Tracking Functions. */ -static inline void frag_kfree_skb(struct sk_buff *skb) +static inline void frag_kfree_skb(struct sk_buff *skb, int *work) { + if (work) + *work -= skb->truesize; atomic_sub(skb->truesize, &ip6_frag_mem); kfree_skb(skb); } -static inline void frag_free_queue(struct frag_queue *fq) +static inline void frag_free_queue(struct frag_queue *fq, int *work) { + if (work) + *work -= sizeof(struct frag_queue); atomic_sub(sizeof(struct frag_queue), &ip6_frag_mem); kfree(fq); } @@ -220,7 +224,7 @@ /* Destruction primitives. */ /* Complete destruction of fq. */ -static void ip6_frag_destroy(struct frag_queue *fq) +static void ip6_frag_destroy(struct frag_queue *fq, int *work) { struct sk_buff *fp; @@ -232,17 +236,17 @@ while (fp) { struct sk_buff *xp = fp->next; - frag_kfree_skb(fp); + frag_kfree_skb(fp, work); fp = xp; } - frag_free_queue(fq); + frag_free_queue(fq, work); } -static __inline__ void fq_put(struct frag_queue *fq) +static __inline__ void fq_put(struct frag_queue *fq, int *work) { if (atomic_dec_and_test(&fq->refcnt)) - ip6_frag_destroy(fq); + ip6_frag_destroy(fq, work); } /* Kill fq entry. It is not destroyed immediately, @@ -264,10 +268,13 @@ { struct frag_queue *fq; struct list_head *tmp; + int work; - for(;;) { - if (atomic_read(&ip6_frag_mem) <= sysctl_ip6frag_low_thresh) - return; + work = atomic_read(&ip6_frag_mem) - sysctl_ip6frag_low_thresh; + if (work <= 0) + return; + + while(work > 0) { read_lock(&ip6_frag_lock); if (list_empty(&ip6_frag_lru_list)) { read_unlock(&ip6_frag_lock); @@ -283,7 +290,7 @@ fq_kill(fq); spin_unlock(&fq->lock); - fq_put(fq); + fq_put(fq, &work); IP6_INC_STATS_BH(IPSTATS_MIB_REASMFAILS); } } @@ -320,7 +327,7 @@ } out: spin_unlock(&fq->lock); - fq_put(fq); + fq_put(fq, NULL); } /* Creation primitives. */ @@ -340,7 +347,7 @@ atomic_inc(&fq->refcnt); write_unlock(&ip6_frag_lock); fq_in->last_in |= COMPLETE; - fq_put(fq_in); + fq_put(fq_in, NULL); return fq; } } @@ -539,7 +546,7 @@ fq->fragments = next; fq->meat -= free_it->len; - frag_kfree_skb(free_it); + frag_kfree_skb(free_it, NULL); } } @@ -734,7 +741,7 @@ ret = ip6_frag_reasm(fq, skbp, nhoffp, dev); spin_unlock(&fq->lock); - fq_put(fq); + fq_put(fq, NULL); return ret; } From davem@redhat.com Wed Aug 18 22:50:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 18 Aug 2004 22:50:56 -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 i7J5ooGR016454 for ; Wed, 18 Aug 2004 22:50:50 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7J5ohe1019290 for ; Thu, 19 Aug 2004 01:50:43 -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 i7J5oca31246 for ; Thu, 19 Aug 2004 01:50:38 -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 i7J5njTC031413 for ; Thu, 19 Aug 2004 01:49:45 -0400 Date: Wed, 18 Aug 2004 22:47:27 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Subject: Update to 2.6.9-pre networking Message-Id: <20040818224727.55e0984e.davem@redhat.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: 7886 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: 3248 Lines: 110 Two bugs fixed: 1) tcp_init_metrics needs to setup rtt_seq 2) ICMP xfrm changes were dereferencing user pointers directly Available at: bk://kernel.bkbits.net/davem/net-2.6 ftp.kernel.org:/pub/linux/kernel/people/davem/net-2.6.7-2.diff.gz Enjoy. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 17:56:52-07:00 davem@nuts.davemloft.net # [TCP]: When fetching srtt from metrics, do not forget to set rtt_seq. # # Otherwise RTT will end up being wrong for a long # time, because tcp_rtt_estimator() requires that # every time srtt is set, rtt_seq is set too. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/08/18 17:55:57-07:00 davem@nuts.davemloft.net +3 -1 # [TCP]: When fetching srtt from metrics, do not forget to set rtt_seq. # diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2004-08-19 05:47:01 -07:00 +++ b/net/ipv4/tcp_input.c 2004-08-19 05:47:01 -07:00 @@ -852,8 +852,10 @@ * to low value, and then abruptly stops to do it and starts to delay * ACKs, wait for troubles. */ - if (dst_metric(dst, RTAX_RTT) > tp->srtt) + if (dst_metric(dst, RTAX_RTT) > tp->srtt) { tp->srtt = dst_metric(dst, RTAX_RTT); + tp->rtt_seq = tp->snd_nxt; + } if (dst_metric(dst, RTAX_RTTVAR) > tp->mdev) { tp->mdev = dst_metric(dst, RTAX_RTTVAR); tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN); # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 22:17:01-07:00 davem@nuts.davemloft.net # [IPV4/IPV6]: Fix direct user pointer deref in xfrm icmp changes. # # Signed-off-by: David S. Miller # # net/ipv6/raw.c # 2004/08/18 22:16:27-07:00 davem@nuts.davemloft.net +4 -4 # [IPV4/IPV6]: Fix direct user pointer deref in xfrm icmp changes. # # net/ipv4/raw.c # 2004/08/18 22:16:27-07:00 davem@nuts.davemloft.net +4 -4 # [IPV4/IPV6]: Fix direct user pointer deref in xfrm icmp changes. # diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c --- a/net/ipv4/raw.c 2004-08-19 05:47:09 -07:00 +++ b/net/ipv4/raw.c 2004-08-19 05:47:09 -07:00 @@ -326,8 +326,8 @@ static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) { struct iovec *iov; - u8 *type = NULL; - u8 *code = NULL; + u8 __user *type = NULL; + u8 __user *code = NULL; int probed = 0; int i; @@ -354,8 +354,8 @@ code = iov->iov_base; if (type && code) { - fl->fl_icmp_type = *type; - fl->fl_icmp_code = *code; + get_user(fl->fl_icmp_type, type); + __get_user(fl->fl_icmp_code, code); probed = 1; } break; diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c --- a/net/ipv6/raw.c 2004-08-19 05:47:09 -07:00 +++ b/net/ipv6/raw.c 2004-08-19 05:47:09 -07:00 @@ -559,8 +559,8 @@ static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) { struct iovec *iov; - u8 *type = NULL; - u8 *code = NULL; + u8 __user *type = NULL; + u8 __user *code = NULL; int probed = 0; int i; @@ -587,8 +587,8 @@ code = iov->iov_base; if (type && code) { - fl->fl_icmp_type = *type; - fl->fl_icmp_code = *code; + get_user(fl->fl_icmp_type, type); + __get_user(fl->fl_icmp_code, code); probed = 1; } break; From laforge@netfilter.org Thu Aug 19 02:44:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 02:44: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 i7J9iDrK028815 for ; Thu, 19 Aug 2004 02:44:14 -0700 Received: from dsl-082-082-102-023.arcor-ip.net ([82.82.102.23] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BxjSn-00037C-Sv; Thu, 19 Aug 2004 11:44:06 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BxjSj-0004yW-U4; Thu, 19 Aug 2004 11:44:01 +0200 Date: Thu, 19 Aug 2004 11:44:01 +0200 From: Harald Welte To: Yasuyuki Kozakai Cc: kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com, David Miller Subject: Re: Do you know about skb_header_pointer() ? Message-ID: <20040819094401.GY3921@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Yasuyuki Kozakai , kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com, David Miller References: <200408190721.QAA02944@toshiba.co.jp> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MdJ3p2aQbVp3YFXz" Content-Disposition: inline In-Reply-To: <200408190721.QAA02944@toshiba.co.jp> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7887 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: 2390 Lines: 66 --MdJ3p2aQbVp3YFXz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Cc'ing davem] On Thu, Aug 19, 2004 at 04:21:19PM +0900, Yasuyuki Kozakai wrote: > According to a message in "netdev" mailing list, skb_header_pointer() wil= l be > introduced in mainline kernel. (see attached message) yes, David Miller did so. =20 If I remember correctly, his reasoning for skb_header_pointer() was that even though we are not guaranteed a completely linear transport layer header, it doesn't really happen at any point in the network stack at this time. I personally still like Yasuyuki's implementation[1] better, especially as long as I'm not convinced that even in the event of IPv6 extension headers, tunnels, ipsec, whaetever we're can still assume that everything up to (and including) tcp option headers is linear. And I still owe Dave some profiles on whether skb_header_pointer() as opoosed to skb_copy_bits() actually still shows up in the profiles or not. I'll do this _right now_ before some customer starts to annoy me again with some stupid problem ;) > If I remember correctly, this approach was rejected in the result of our > discussions. And I sent a patch to this mailing list at 2004/08/08. Yes, I thought your approach is better ;) But maybe I'm just overgeneralizing or trying to be too perfect. Anyway, in the end it's Dave's call. [1] http://lists.netfilter.org/pipermail/netfilter-devel/2004-August/016277.html --=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 --MdJ3p2aQbVp3YFXz 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) iD8DBQFBJHZhXaXGVTD0i/8RAjF7AJ9kc+PqF3NCP29LkJY8+A2+iaTwPACfQc/C cU/CU1EeTYEbrZcwb3w32L4= =0fpc -----END PGP SIGNATURE----- --MdJ3p2aQbVp3YFXz-- From laforge@netfilter.org Thu Aug 19 03:12:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 03:12:17 -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 i7JACAUV030276 for ; Thu, 19 Aug 2004 03:12:11 -0700 Received: from dsl-082-082-102-023.arcor-ip.net ([82.82.102.23] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1Bxjts-0003do-1D; Thu, 19 Aug 2004 12:12:04 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1Bxjtn-00050F-1N; Thu, 19 Aug 2004 12:11:59 +0200 Date: Thu, 19 Aug 2004 12:11:59 +0200 From: Harald Welte To: Olaf Kirch Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, David Miller Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-ID: <20040819101159.GC3921@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Olaf Kirch , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, David Miller References: <20040818091352.GB6507@suse.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xsILJLaVOAbiPmXa" Content-Disposition: inline In-Reply-To: <20040818091352.GB6507@suse.de> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7888 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: 2054 Lines: 60 --xsILJLaVOAbiPmXa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 18, 2004 at 11:13:52AM +0200, Olaf Kirch wrote: > Hi, >=20 > here's a patch that keeps us from crashing on removal of ip_conntrack. > This problem came up during IBM's testing of SLES. Thanks for this detailed bugreport and fix. > I'm not sure if this issue has been submitted already. Not that I'm aware of. > To fix this, the patch below simply drops such skbs. A different fix > could be to change the conntrack module to flush out all unassembled > fragments when unloaded; an alternative patch for this is attached as > well (this one is completely untested). Since I don't want to put any more conntrack-specific code into the core network stack, I'd rather go for the 'alternative patch'. I'm not sure whether it's worth the effort to combine the two, i.e. only flush entries with skb->dst =3D=3D NULL. But especially since module unloading is EXPERIMENTAL anyway, I think it's ok when we completely flush the fragemnt queue. Dave, is this fine with you? What solution would you prefer? > Cheers > Olaf --=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 --xsILJLaVOAbiPmXa 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) iD8DBQFBJHzuXaXGVTD0i/8RAoUwAJ4pt8h/EGR14G0hNFLWKBM4fLXF2ACbBj6N z3ThhO8OwdNK1tSfWX4n/+g= =T3Q9 -----END PGP SIGNATURE----- --xsILJLaVOAbiPmXa-- From herbert@gondor.apana.org.au Thu Aug 19 04:39:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 04:39: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 i7JBd1uo005196 for ; Thu, 19 Aug 2004 04:39: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 1BxlFo-0001lk-00; Thu, 19 Aug 2004 21:38:48 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BxlFi-0004AI-00; Thu, 19 Aug 2004 21:38:42 +1000 Date: Thu, 19 Aug 2004 21:38:41 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [1/2] Use xfrm4_rcv in xfrm4_tunnel Message-ID: <20040819113841.GA13872@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 7890 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: 999 Lines: 37 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: This is a trivial patch to use xfrm4_rcv in xfrm4_tunnel. It doesn't need the extra argument provided by xfrm4_rcv_encap. 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 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=q ===== net/ipv4/xfrm4_tunnel.c 1.17 vs edited ===== --- 1.17/net/ipv4/xfrm4_tunnel.c 2004-08-14 20:59:43 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-19 21:34:39 +10:00 @@ -68,7 +68,7 @@ if (handler && handler->handler(skb) == 0) return 0; - return xfrm4_rcv_encap(skb, 0); + return xfrm4_rcv(skb); } static void ipip_err(struct sk_buff *skb, u32 info) --h31gzZEtNLTqOjlF-- From herbert@gondor.apana.org.au Thu Aug 19 04:41:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 04:41:13 -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 i7JBf461005536 for ; Thu, 19 Aug 2004 04:41:04 -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 1BxlHn-0001s7-00; Thu, 19 Aug 2004 21:40:51 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BxlHm-0004BU-00; Thu, 19 Aug 2004 21:40:50 +1000 Date: Thu, 19 Aug 2004 21:40:50 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [2/2] Modularise xfrm_tunnel Message-ID: <20040819114050.GA16049@gondor.apana.org.au> References: <20040819113841.GA13872@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20040819113841.GA13872@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 7891 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: 6646 Lines: 236 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as modules. This makes sense because they're only used by IPComp/IPIP/IP6Tunnel which are modules themselves. It also means that distros can cut down on there core kernel size when compiling with IPsec support. 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 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== include/net/xfrm.h 1.67 vs edited ===== --- 1.67/include/net/xfrm.h 2004-08-19 20:58:20 +10:00 +++ edited/include/net/xfrm.h 2004-08-19 21:39:53 +10:00 @@ -754,8 +754,6 @@ extern void xfrm4_state_fini(void); extern void xfrm6_state_init(void); extern void xfrm6_state_fini(void); -extern void xfrm6_tunnel_init(void); -extern void xfrm6_tunnel_fini(void); extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *); extern struct xfrm_state *xfrm_state_alloc(void); ===== net/ipv4/Kconfig 1.15 vs edited ===== --- 1.15/net/ipv4/Kconfig 2004-07-12 10:41:39 +10:00 +++ edited/net/ipv4/Kconfig 2004-08-19 21:39:53 +10:00 @@ -187,7 +187,7 @@ config NET_IPIP tristate "IP: tunneling" depends on INET - select XFRM + select INET_TUNNEL ---help--- Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the @@ -351,11 +351,21 @@ config INET_IPCOMP tristate "IP: IPComp transformation" select XFRM + select INET_TUNNEL select CRYPTO select CRYPTO_DEFLATE ---help--- Support for IP Paylod Compression (RFC3173), typically needed for IPsec. + + If unsure, say Y. + +config INET_TUNNEL + tristate "IP: tunnel transformation" + select XFRM + ---help--- + Support for generic IP tunnel transformation, which is required by + the IP tunneling module as well as tunnel mode IPComp. If unsure, say Y. ===== net/ipv4/Makefile 1.24 vs edited ===== --- 1.24/net/ipv4/Makefile 2004-07-24 09:16:23 +10:00 +++ edited/net/ipv4/Makefile 2004-08-19 21:39:53 +10:00 @@ -19,9 +19,10 @@ obj-$(CONFIG_INET_AH) += ah4.o obj-$(CONFIG_INET_ESP) += esp4.o obj-$(CONFIG_INET_IPCOMP) += ipcomp.o +obj-$(CONFIG_INET_TUNNEL) += xfrm4_tunnel.o obj-$(CONFIG_IP_PNP) += ipconfig.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IP_VS) += ipvs/ obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ - xfrm4_tunnel.o xfrm4_output.o + xfrm4_output.o ===== net/ipv4/xfrm4_tunnel.c 1.18 vs edited ===== --- 1.18/net/ipv4/xfrm4_tunnel.c 2004-08-19 21:38:08 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-19 21:39:54 +10:00 @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -43,6 +44,8 @@ return ret; } +EXPORT_SYMBOL(xfrm4_tunnel_register); + int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler) { int ret; @@ -59,6 +62,8 @@ return ret; } + +EXPORT_SYMBOL(xfrm4_tunnel_deregister); static int ipip_rcv(struct sk_buff *skb) { ===== net/ipv6/Kconfig 1.10 vs edited ===== --- 1.10/net/ipv6/Kconfig 2004-08-15 17:42:13 +10:00 +++ edited/net/ipv6/Kconfig 2004-08-19 21:39:54 +10:00 @@ -48,6 +48,7 @@ tristate "IPv6: IPComp transformation" depends on IPV6 select XFRM + select INET6_TUNNEL select CRYPTO select CRYPTO_DEFLATE ---help--- @@ -56,10 +57,21 @@ If unsure, say Y. +config INET6_TUNNEL + tristate "IPv6: tunnel transformation" + depends on IPV6 + select XFRM + ---help--- + Support for generic IPv6-in-IPv6 tunnel transformation, which is + required by the IPv6-in-IPv6 tunneling module as well as tunnel mode + IPComp. + + If unsure, say Y. + config IPV6_TUNNEL tristate "IPv6: IPv6-in-IPv6 tunnel" depends on IPV6 - select XFRM + select INET6_TUNNEL ---help--- Support for IPv6-in-IPv6 tunnels described in RFC 2473. ===== net/ipv6/Makefile 1.19 vs edited ===== --- 1.19/net/ipv6/Makefile 2004-08-02 07:15:02 +10:00 +++ edited/net/ipv6/Makefile 2004-08-19 21:39:54 +10:00 @@ -11,12 +11,13 @@ ip6_flowlabel.o ipv6_syms.o ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ - xfrm6_tunnel.o xfrm6_output.o + xfrm6_output.o ipv6-objs += $(ipv6-y) obj-$(CONFIG_INET6_AH) += ah6.o obj-$(CONFIG_INET6_ESP) += esp6.o obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o +obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o ===== net/ipv6/xfrm6_policy.c 1.21 vs edited ===== --- 1.21/net/ipv6/xfrm6_policy.c 2004-08-02 07:15:03 +10:00 +++ edited/net/ipv6/xfrm6_policy.c 2004-08-19 21:39:54 +10:00 @@ -277,12 +277,10 @@ { xfrm6_policy_init(); xfrm6_state_init(); - xfrm6_tunnel_init(); } void __exit xfrm6_fini(void) { - xfrm6_tunnel_fini(); //xfrm6_input_fini(); xfrm6_policy_fini(); xfrm6_state_fini(); ===== net/ipv6/xfrm6_tunnel.c 1.8 vs edited ===== --- 1.8/net/ipv6/xfrm6_tunnel.c 2004-08-19 20:58:20 +10:00 +++ edited/net/ipv6/xfrm6_tunnel.c 2004-08-19 21:39:54 +10:00 @@ -501,31 +501,32 @@ .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, }; -void __init xfrm6_tunnel_init(void) +static int __init xfrm6_tunnel_init(void) { X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init: can't add xfrm type\n"); - return; + return -EAGAIN; } if (inet6_add_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init(): can't add protocol\n"); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); - return; + return -EAGAIN; } if (xfrm6_tunnel_spi_init() < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init: failed to initialize spi\n"); inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); - return; + return -EAGAIN; } + return 0; } -void __exit xfrm6_tunnel_fini(void) +static void __exit xfrm6_tunnel_fini(void) { X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); @@ -537,3 +538,7 @@ X6TPRINTK1(KERN_ERR "xfrm6_tunnel close: can't remove xfrm type\n"); } + +module_init(xfrm6_tunnel_init); +module_exit(xfrm6_tunnel_fini); +MODULE_LICENSE("GPL"); --4Ckj6UjgE2iN1+kY-- From herbert@gondor.apana.org.au Thu Aug 19 04:44:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 04:44: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 i7JBiEXI005898 for ; Thu, 19 Aug 2004 04:44: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 1BxlKr-0001tx-00; Thu, 19 Aug 2004 21:44:01 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BxlKp-0004DK-00; Thu, 19 Aug 2004 21:43:59 +1000 Date: Thu, 19 Aug 2004 21:43:59 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [2/2] Modularise xfrm_tunnel Message-ID: <20040819114359.GA16189@gondor.apana.org.au> References: <20040819113841.GA13872@gondor.apana.org.au> <20040819114050.GA16049@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <20040819114050.GA16049@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 7892 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: 7252 Lines: 252 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: On Thu, Aug 19, 2004 at 09:40:50PM +1000, herbert wrote: > > This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as > modules. > > This makes sense because they're only used by IPComp/IPIP/IP6Tunnel > which are modules themselves. It also means that distros can cut > down on there core kernel size when compiling with IPsec support. I missed xfrm_export.c in that patch. Here is the corrected version. 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 ===== include/net/xfrm.h 1.67 vs edited ===== --- 1.67/include/net/xfrm.h 2004-08-19 20:58:20 +10:00 +++ edited/include/net/xfrm.h 2004-08-19 21:39:53 +10:00 @@ -754,8 +754,6 @@ extern void xfrm4_state_fini(void); extern void xfrm6_state_init(void); extern void xfrm6_state_fini(void); -extern void xfrm6_tunnel_init(void); -extern void xfrm6_tunnel_fini(void); extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *); extern struct xfrm_state *xfrm_state_alloc(void); ===== net/ipv4/Kconfig 1.15 vs edited ===== --- 1.15/net/ipv4/Kconfig 2004-07-12 10:41:39 +10:00 +++ edited/net/ipv4/Kconfig 2004-08-19 21:39:53 +10:00 @@ -187,7 +187,7 @@ config NET_IPIP tristate "IP: tunneling" depends on INET - select XFRM + select INET_TUNNEL ---help--- Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the @@ -351,11 +351,21 @@ config INET_IPCOMP tristate "IP: IPComp transformation" select XFRM + select INET_TUNNEL select CRYPTO select CRYPTO_DEFLATE ---help--- Support for IP Paylod Compression (RFC3173), typically needed for IPsec. + + If unsure, say Y. + +config INET_TUNNEL + tristate "IP: tunnel transformation" + select XFRM + ---help--- + Support for generic IP tunnel transformation, which is required by + the IP tunneling module as well as tunnel mode IPComp. If unsure, say Y. ===== net/ipv4/Makefile 1.24 vs edited ===== --- 1.24/net/ipv4/Makefile 2004-07-24 09:16:23 +10:00 +++ edited/net/ipv4/Makefile 2004-08-19 21:39:53 +10:00 @@ -19,9 +19,10 @@ obj-$(CONFIG_INET_AH) += ah4.o obj-$(CONFIG_INET_ESP) += esp4.o obj-$(CONFIG_INET_IPCOMP) += ipcomp.o +obj-$(CONFIG_INET_TUNNEL) += xfrm4_tunnel.o obj-$(CONFIG_IP_PNP) += ipconfig.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IP_VS) += ipvs/ obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ - xfrm4_tunnel.o xfrm4_output.o + xfrm4_output.o ===== net/ipv4/xfrm4_tunnel.c 1.18 vs edited ===== --- 1.18/net/ipv4/xfrm4_tunnel.c 2004-08-19 21:38:08 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-19 21:39:54 +10:00 @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -43,6 +44,8 @@ return ret; } +EXPORT_SYMBOL(xfrm4_tunnel_register); + int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler) { int ret; @@ -59,6 +62,8 @@ return ret; } + +EXPORT_SYMBOL(xfrm4_tunnel_deregister); static int ipip_rcv(struct sk_buff *skb) { ===== net/ipv6/Kconfig 1.10 vs edited ===== --- 1.10/net/ipv6/Kconfig 2004-08-15 17:42:13 +10:00 +++ edited/net/ipv6/Kconfig 2004-08-19 21:39:54 +10:00 @@ -48,6 +48,7 @@ tristate "IPv6: IPComp transformation" depends on IPV6 select XFRM + select INET6_TUNNEL select CRYPTO select CRYPTO_DEFLATE ---help--- @@ -56,10 +57,21 @@ If unsure, say Y. +config INET6_TUNNEL + tristate "IPv6: tunnel transformation" + depends on IPV6 + select XFRM + ---help--- + Support for generic IPv6-in-IPv6 tunnel transformation, which is + required by the IPv6-in-IPv6 tunneling module as well as tunnel mode + IPComp. + + If unsure, say Y. + config IPV6_TUNNEL tristate "IPv6: IPv6-in-IPv6 tunnel" depends on IPV6 - select XFRM + select INET6_TUNNEL ---help--- Support for IPv6-in-IPv6 tunnels described in RFC 2473. ===== net/ipv6/Makefile 1.19 vs edited ===== --- 1.19/net/ipv6/Makefile 2004-08-02 07:15:02 +10:00 +++ edited/net/ipv6/Makefile 2004-08-19 21:39:54 +10:00 @@ -11,12 +11,13 @@ ip6_flowlabel.o ipv6_syms.o ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ - xfrm6_tunnel.o xfrm6_output.o + xfrm6_output.o ipv6-objs += $(ipv6-y) obj-$(CONFIG_INET6_AH) += ah6.o obj-$(CONFIG_INET6_ESP) += esp6.o obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o +obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o ===== net/ipv6/xfrm6_policy.c 1.21 vs edited ===== --- 1.21/net/ipv6/xfrm6_policy.c 2004-08-02 07:15:03 +10:00 +++ edited/net/ipv6/xfrm6_policy.c 2004-08-19 21:39:54 +10:00 @@ -277,12 +277,10 @@ { xfrm6_policy_init(); xfrm6_state_init(); - xfrm6_tunnel_init(); } void __exit xfrm6_fini(void) { - xfrm6_tunnel_fini(); //xfrm6_input_fini(); xfrm6_policy_fini(); xfrm6_state_fini(); ===== net/ipv6/xfrm6_tunnel.c 1.8 vs edited ===== --- 1.8/net/ipv6/xfrm6_tunnel.c 2004-08-19 20:58:20 +10:00 +++ edited/net/ipv6/xfrm6_tunnel.c 2004-08-19 21:39:54 +10:00 @@ -501,31 +501,32 @@ .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, }; -void __init xfrm6_tunnel_init(void) +static int __init xfrm6_tunnel_init(void) { X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init: can't add xfrm type\n"); - return; + return -EAGAIN; } if (inet6_add_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init(): can't add protocol\n"); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); - return; + return -EAGAIN; } if (xfrm6_tunnel_spi_init() < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init: failed to initialize spi\n"); inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); - return; + return -EAGAIN; } + return 0; } -void __exit xfrm6_tunnel_fini(void) +static void __exit xfrm6_tunnel_fini(void) { X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); @@ -537,3 +538,7 @@ X6TPRINTK1(KERN_ERR "xfrm6_tunnel close: can't remove xfrm type\n"); } + +module_init(xfrm6_tunnel_init); +module_exit(xfrm6_tunnel_fini); +MODULE_LICENSE("GPL"); ===== net/xfrm/xfrm_export.c 1.4 vs edited ===== --- 1.4/net/xfrm/xfrm_export.c 2004-08-14 20:59:44 +10:00 +++ edited/net/xfrm/xfrm_export.c 2004-08-19 21:39:54 +10:00 @@ -33,8 +33,6 @@ EXPORT_SYMBOL(xfrm_get_acqseq); EXPORT_SYMBOL(xfrm_parse_spi); EXPORT_SYMBOL(xfrm4_rcv); -EXPORT_SYMBOL(xfrm4_tunnel_register); -EXPORT_SYMBOL(xfrm4_tunnel_deregister); EXPORT_SYMBOL(xfrm_register_type); EXPORT_SYMBOL(xfrm_unregister_type); EXPORT_SYMBOL(xfrm_get_type); --sdtB3X0nJg68CQEu-- From laforge@netfilter.org Thu Aug 19 05:15:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 05:16:00 -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 i7JCFsXd007847 for ; Thu, 19 Aug 2004 05:15:55 -0700 Received: from dsl-082-082-102-023.arcor-ip.net ([82.82.102.23] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1Bxlpb-0006Gr-EV; Thu, 19 Aug 2004 14:15:47 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BxlpW-0005Dh-8v; Thu, 19 Aug 2004 14:15:42 +0200 Date: Thu, 19 Aug 2004 14:15:42 +0200 From: Harald Welte To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: Big set of networking updates Message-ID: <20040819121542.GU3921@sunbeam.de.gnumonks.org> References: <20040818173736.7ad8e58a.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RvF2KG9p4DaV8yF8" Content-Disposition: inline In-Reply-To: <20040818173736.7ad8e58a.davem@redhat.com> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7893 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: 2142 Lines: 63 --RvF2KG9p4DaV8yF8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 18, 2004 at 05:37:36PM -0700, David S. Miller wrote: =20 > A lot of things are accumulating for 2.6.9-preX while Linus > is away. So I figured best to post what I have in my tree > so we can begin to weed the problems out. I'll start running and testing those patches. > Detailed changelong is attached, and the changes are available > in two forms: >=20 > BK: bk://kernel.bkbits.net/davem/net-2.6 > PATCH: ftp://ftp.kernel.org/pub/linux/kernel/people/davem/net-2.6.9.diff.= gz >=20 > Harald, all of your netfilter updates are in here. I had to fixup > a bunch of things to get the build and module symbol exports clean. > In particular have a look at changesets: >=20 > 1.1862: [NETFILTER]: Convert SCTP conntrack over to ip_ct_refresh_acct().= =20 > 1.1863: [NETFILTER]: Export ip_conntrack_count for ip_conntrack_standalon= e. > 1.1864: [NETFILTER]: Need to export ip_ct_log_invalid to modules. I trust your decisions ;) Forgive my ignorance, but how can I access those changesets without having to run proprietary bk software (couldn't find it on http://www.bkbit= s.net/ web frontend)? > Enjoy. --=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 --RvF2KG9p4DaV8yF8 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) iD8DBQFBJJnuXaXGVTD0i/8RAhArAJoDDlxL2kf/QJnUiY9qmtj44l0V7wCgsU3M +45z9M9UJGlKr71qMk4jpTg= =gUtL -----END PGP SIGNATURE----- --RvF2KG9p4DaV8yF8-- From sandr8_NOSPAM_@crocetta.org Thu Aug 19 06:58:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 06:58:39 -0700 (PDT) Received: from vsmtp1.tin.it (vsmtp1b.tin.it [212.216.176.141] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7JDwUeG011464 for ; Thu, 19 Aug 2004 06:58:31 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp1.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C68000B2E58; Thu, 19 Aug 2004 15:58:00 +0200 Message-ID: <4124B1E6.3060808@crocetta.org> Date: Thu, 19 Aug 2004 15:57:58 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: should that bugfix wait till 2.6.9? {was Re: Big set of networking updates} References: <20040818173736.7ad8e58a.davem@redhat.com> In-Reply-To: <20040818173736.7ad8e58a.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7894 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 1054 Lines: 26 David S. Miller wrote: >ChangeSet@1.1845, 2004-08-15 19:33:16-07:00, kaber@trash.net > [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() > > Signed-off-by: Patrick McHardy > Signed-off-by: David S. Miller > > net/sched/sch_api.c | 21 +++++++++++++-------- > 1 files changed, 13 insertions(+), 8 deletions(-) > > i was just going to send a similar changeset, since i didn't see any discussion so far about that... this changeset fixes a bug that is in 2.6.8.1 and 2.6.8 as well. today i fixed it on my own too, since it was messing up a lot of things... the handling of the private data belonging to a qdisc was inconsistent. the memory allocated was not the memory used and hence its content could change. even worst what happened with a qdisc that had a pointer in its private data... god knows what was going on... isn't it urgent that people patch their kernel? is it possible for them to wait till 2.6.9? i had oops regarding ext3 before finding and repairing that bug! cheers Alessandro From davem@redhat.com Thu Aug 19 07:19:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:20:05 -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 i7JEJu25012209 for ; Thu, 19 Aug 2004 07:19:59 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JEJZe1019382; Thu, 19 Aug 2004 10:19: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 i7JEJZa21960; Thu, 19 Aug 2004 10:19:35 -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 i7JEIg6I015380; Thu, 19 Aug 2004 10:18:43 -0400 Date: Thu, 19 Aug 2004 07:16:18 -0700 From: "David S. Miller" To: Harald Welte Cc: yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: Do you know about skb_header_pointer() ? Message-Id: <20040819071618.27515547.davem@redhat.com> In-Reply-To: <20040819094401.GY3921@sunbeam.de.gnumonks.org> References: <200408190721.QAA02944@toshiba.co.jp> <20040819094401.GY3921@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: 7895 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: 382 Lines: 10 On Thu, 19 Aug 2004 11:44:01 +0200 Harald Welte wrote: > I personally still like Yasuyuki's implementation[1] better, Thanks for letting me know about this after we agreed upon skb_header_pointer() (or somthing like it) at the networking conference _AND_ I did the full implementation for you Harald. Or did you just learn about Ysauyuki's work recently? From davem@redhat.com Thu Aug 19 07:21:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:21: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 i7JELd9P012410 for ; Thu, 19 Aug 2004 07:21:40 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JELCe1019783; Thu, 19 Aug 2004 10:21:22 -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 i7JEL7a22423; Thu, 19 Aug 2004 10:21:07 -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 i7JEKECn015873; Thu, 19 Aug 2004 10:20:14 -0400 Date: Thu, 19 Aug 2004 07:17:50 -0700 From: "David S. Miller" To: Harald Welte Cc: yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: Do you know about skb_header_pointer() ? Message-Id: <20040819071750.67f0e924.davem@redhat.com> In-Reply-To: <20040819094401.GY3921@sunbeam.de.gnumonks.org> References: <200408190721.QAA02944@toshiba.co.jp> <20040819094401.GY3921@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: 7896 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: 314 Lines: 9 On Thu, 19 Aug 2004 11:44:01 +0200 Harald Welte wrote: > http://lists.netfilter.org/pipermail/netfilter-devel/2004-August/016277.html I totally disagree with this change. The goal was to eliminate any and all linearization done by any part of the networking, especially on output paths. From davem@redhat.com Thu Aug 19 07:22:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:22:25 -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 i7JEMIf0012624 for ; Thu, 19 Aug 2004 07:22:20 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JEM3e1020036; Thu, 19 Aug 2004 10:22:03 -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 i7JEM2a22809; Thu, 19 Aug 2004 10:22: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 i7JELAlK016593; Thu, 19 Aug 2004 10:21:10 -0400 Date: Thu, 19 Aug 2004 07:18:46 -0700 From: "David S. Miller" To: Harald Welte Cc: okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040819071846.2d0d6120.davem@redhat.com> In-Reply-To: <20040819101159.GC3921@sunbeam.de.gnumonks.org> References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@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: 7897 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: 214 Lines: 7 On Thu, 19 Aug 2004 12:11:59 +0200 Harald Welte wrote: > Dave, is this fine with you? What solution would you prefer? I haven't been shown the patches so I can't generate an opinion. :-) From davem@redhat.com Thu Aug 19 07:27:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:27: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 i7JERFlO013187 for ; Thu, 19 Aug 2004 07:27:16 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JEQse1021426; Thu, 19 Aug 2004 10:26:54 -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 i7JEQsa24627; Thu, 19 Aug 2004 10:26:54 -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 i7JEQ1Ua019574; Thu, 19 Aug 2004 10:26:02 -0400 Date: Thu, 19 Aug 2004 07:23:37 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [1/2] Use xfrm4_rcv in xfrm4_tunnel Message-Id: <20040819072337.394abc67.davem@redhat.com> In-Reply-To: <20040819113841.GA13872@gondor.apana.org.au> References: <20040819113841.GA13872@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: 7898 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: 221 Lines: 7 On Thu, 19 Aug 2004 21:38:41 +1000 Herbert Xu wrote: > This is a trivial patch to use xfrm4_rcv in xfrm4_tunnel. It doesn't > need the extra argument provided by xfrm4_rcv_encap. Applied. From davem@redhat.com Thu Aug 19 07:28:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:28:58 -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 i7JESqqL013391 for ; Thu, 19 Aug 2004 07:28:52 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JESfe1021993; Thu, 19 Aug 2004 10:28:41 -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 i7JESfa25397; Thu, 19 Aug 2004 10:28:41 -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 i7JERnMe020794; Thu, 19 Aug 2004 10:27:49 -0400 Date: Thu, 19 Aug 2004 07:25:25 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [2/2] Modularise xfrm_tunnel Message-Id: <20040819072525.430f00bd.davem@redhat.com> In-Reply-To: <20040819114359.GA16189@gondor.apana.org.au> References: <20040819113841.GA13872@gondor.apana.org.au> <20040819114050.GA16049@gondor.apana.org.au> <20040819114359.GA16189@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: 7899 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: 651 Lines: 18 On Thu, 19 Aug 2004 21:43:59 +1000 Herbert Xu wrote: > On Thu, Aug 19, 2004 at 09:40:50PM +1000, herbert wrote: > > > > This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as > > modules. > > > > This makes sense because they're only used by IPComp/IPIP/IP6Tunnel > > which are modules themselves. It also means that distros can cut > > down on there core kernel size when compiling with IPsec support. > > I missed xfrm_export.c in that patch. Here is the corrected version. Looks great, applied. I suppose you're making your way towards proper TOS tunnel handling and the other fixes we spoke of? From davem@redhat.com Thu Aug 19 07:31:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:31:10 -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 i7JEV4gk013852 for ; Thu, 19 Aug 2004 07:31:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JEUke1022807; Thu, 19 Aug 2004 10:30:46 -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 i7JEUka26362; Thu, 19 Aug 2004 10:30:46 -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 i7JETsiI021949; Thu, 19 Aug 2004 10:29:54 -0400 Date: Thu, 19 Aug 2004 07:27:30 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com Subject: Re: Big set of networking updates Message-Id: <20040819072730.55df9bd5.davem@redhat.com> In-Reply-To: <20040819121542.GU3921@sunbeam.de.gnumonks.org> References: <20040818173736.7ad8e58a.davem@redhat.com> <20040819121542.GU3921@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: 7900 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: 3593 Lines: 87 On Thu, 19 Aug 2004 14:15:42 +0200 Harald Welte wrote: > On Wed, Aug 18, 2004 at 05:37:36PM -0700, David S. Miller wrote: > > > 1.1862: [NETFILTER]: Convert SCTP conntrack over to ip_ct_refresh_acct(). > > 1.1863: [NETFILTER]: Export ip_conntrack_count for ip_conntrack_standalone. > > 1.1864: [NETFILTER]: Need to export ip_ct_log_invalid to modules. > > Forgive my ignorance, but how can I access those changesets without > having to run proprietary bk software (couldn't find it on http://www.bkbits.net/ web frontend)? There is a way to get patches on bkbits.net, but not for the trees hosted specifically on kernel.bkbits.net Here are those changes cherry picked out for you Harald. Sorry about that. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 17:07:13-07:00 davem@nuts.davemloft.net # [NETFILTER]: Convert SCTP conntrack over to ip_ct_refresh_acct(). # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_proto_sctp.c # 2004/08/18 17:06:37-07:00 davem@nuts.davemloft.net +1 -1 # [NETFILTER]: Convert SCTP conntrack over to ip_ct_refresh_acct(). # diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c 2004-08-19 07:15:09 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c 2004-08-19 07:15:09 -07:00 @@ -403,7 +403,7 @@ WRITE_UNLOCK(&sctp_lock); } - ip_ct_refresh(conntrack, *sctp_timeouts[newconntrack]); + ip_ct_refresh_acct(conntrack, ctinfo, skb, *sctp_timeouts[newconntrack]); if (oldsctpstate == SCTP_CONNTRACK_COOKIE_ECHOED && CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 17:09:57-07:00 davem@nuts.davemloft.net # [NETFILTER]: Export ip_conntrack_count for ip_conntrack_standalone. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/08/18 17:09:16-07:00 davem@nuts.davemloft.net +4 -1 # [NETFILTER]: Export ip_conntrack_count for ip_conntrack_standalone. # diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c --- a/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-19 07:15:21 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-19 07:15:21 -07:00 @@ -59,7 +59,10 @@ DECLARE_RWLOCK(ip_conntrack_lock); DECLARE_RWLOCK(ip_conntrack_expect_tuple_lock); -static atomic_t ip_conntrack_count = ATOMIC_INIT(0); + +/* ip_conntrack_standalone needs this */ +atomic_t ip_conntrack_count = ATOMIC_INIT(0); +EXPORT_SYMBOL(ip_conntrack_count); void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL; LIST_HEAD(ip_conntrack_expect_list); # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 17:11:57-07:00 davem@nuts.davemloft.net # [NETFILTER]: Need to export ip_ct_log_invalid to modules. # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/18 17:11:36-07:00 davem@nuts.davemloft.net +1 -0 # [NETFILTER]: Need to export ip_ct_log_invalid to modules. # diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-19 07:15:34 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-19 07:15:34 -07:00 @@ -905,3 +905,4 @@ EXPORT_SYMBOL(ip_conntrack_untracked); EXPORT_SYMBOL_GPL(ip_conntrack_find_get); EXPORT_SYMBOL_GPL(ip_conntrack_put); +EXPORT_SYMBOL(ip_ct_log_invalid); From davem@redhat.com Thu Aug 19 07:53:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:53:56 -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 i7JErmYb014539 for ; Thu, 19 Aug 2004 07:53:48 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JErae1029315 for ; Thu, 19 Aug 2004 10:53:36 -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 i7JEraa02638 for ; Thu, 19 Aug 2004 10:53:36 -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 i7JEqhWh002628 for ; Thu, 19 Aug 2004 10:52:44 -0400 Date: Thu, 19 Aug 2004 07:50:19 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Subject: Today's net-2.6.9 update Message-Id: <20040819075019.23ca9e4e.davem@redhat.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: 7901 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: 13380 Lines: 407 Just to include Herbert Xu's xfrm tunnel diffs. If bored, try to see that all combinations of modular vs. non-modular work for the new xfrm tunnel choices. As usual: bk://kernel.bkbits.net/davem/net-2.6 ftp://ftp.kernel.org/pub/linux/kernel/people/davem/net-2.6.9-3.diff.gz Thanks. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/19 07:12:01-07:00 herbert@gondor.apana.org.au # [IPSEC]: Use xfrm4_rcv in xfrm4_tunnel # # This is a trivial patch to use xfrm4_rcv in xfrm4_tunnel. It doesn't # need the extra argument provided by xfrm4_rcv_encap. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_tunnel.c # 2004/08/19 07:11:45-07:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Use xfrm4_rcv in xfrm4_tunnel # # This is a trivial patch to use xfrm4_rcv in xfrm4_tunnel. It doesn't # need the extra argument provided by xfrm4_rcv_encap. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c --- a/net/ipv4/xfrm4_tunnel.c 2004-08-19 07:34:12 -07:00 +++ b/net/ipv4/xfrm4_tunnel.c 2004-08-19 07:34:12 -07:00 @@ -68,7 +68,7 @@ if (handler && handler->handler(skb) == 0) return 0; - return xfrm4_rcv_encap(skb, 0); + return xfrm4_rcv(skb); } static void ipip_err(struct sk_buff *skb, u32 info) # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/19 07:13:27-07:00 herbert@gondor.apana.org.au # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_export.c # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +0 -2 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_tunnel.c # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +10 -5 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +0 -2 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/Makefile # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +2 -1 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/Kconfig # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +13 -1 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_tunnel.c # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +5 -0 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/Makefile # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +2 -1 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/Kconfig # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +11 -1 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +0 -2 # [IPSEC]: Modularise xfrm_tunnel. # # This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as # modules. # # This makes sense because they're only used by IPComp/IPIP/IP6Tunnel # which are modules themselves. It also means that distros can cut # down on there core kernel size when compiling with IPsec support. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2004-08-19 07:34:25 -07:00 +++ b/include/net/xfrm.h 2004-08-19 07:34:25 -07:00 @@ -792,8 +792,6 @@ extern void xfrm4_state_fini(void); extern void xfrm6_state_init(void); extern void xfrm6_state_fini(void); -extern void xfrm6_tunnel_init(void); -extern void xfrm6_tunnel_fini(void); extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *); extern struct xfrm_state *xfrm_state_alloc(void); diff -Nru a/net/ipv4/Kconfig b/net/ipv4/Kconfig --- a/net/ipv4/Kconfig 2004-08-19 07:34:25 -07:00 +++ b/net/ipv4/Kconfig 2004-08-19 07:34:25 -07:00 @@ -187,7 +187,7 @@ config NET_IPIP tristate "IP: tunneling" depends on INET - select XFRM + select INET_TUNNEL ---help--- Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the @@ -351,11 +351,21 @@ config INET_IPCOMP tristate "IP: IPComp transformation" select XFRM + select INET_TUNNEL select CRYPTO select CRYPTO_DEFLATE ---help--- Support for IP Paylod Compression (RFC3173), typically needed for IPsec. + + If unsure, say Y. + +config INET_TUNNEL + tristate "IP: tunnel transformation" + select XFRM + ---help--- + Support for generic IP tunnel transformation, which is required by + the IP tunneling module as well as tunnel mode IPComp. If unsure, say Y. diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile --- a/net/ipv4/Makefile 2004-08-19 07:34:25 -07:00 +++ b/net/ipv4/Makefile 2004-08-19 07:34:25 -07:00 @@ -19,9 +19,10 @@ obj-$(CONFIG_INET_AH) += ah4.o obj-$(CONFIG_INET_ESP) += esp4.o obj-$(CONFIG_INET_IPCOMP) += ipcomp.o +obj-$(CONFIG_INET_TUNNEL) += xfrm4_tunnel.o obj-$(CONFIG_IP_PNP) += ipconfig.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IP_VS) += ipvs/ obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ - xfrm4_tunnel.o xfrm4_output.o + xfrm4_output.o diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c --- a/net/ipv4/xfrm4_tunnel.c 2004-08-19 07:34:25 -07:00 +++ b/net/ipv4/xfrm4_tunnel.c 2004-08-19 07:34:25 -07:00 @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -43,6 +44,8 @@ return ret; } +EXPORT_SYMBOL(xfrm4_tunnel_register); + int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler) { int ret; @@ -59,6 +62,8 @@ return ret; } + +EXPORT_SYMBOL(xfrm4_tunnel_deregister); static int ipip_rcv(struct sk_buff *skb) { diff -Nru a/net/ipv6/Kconfig b/net/ipv6/Kconfig --- a/net/ipv6/Kconfig 2004-08-19 07:34:25 -07:00 +++ b/net/ipv6/Kconfig 2004-08-19 07:34:25 -07:00 @@ -48,6 +48,7 @@ tristate "IPv6: IPComp transformation" depends on IPV6 select XFRM + select INET6_TUNNEL select CRYPTO select CRYPTO_DEFLATE ---help--- @@ -56,10 +57,21 @@ If unsure, say Y. +config INET6_TUNNEL + tristate "IPv6: tunnel transformation" + depends on IPV6 + select XFRM + ---help--- + Support for generic IPv6-in-IPv6 tunnel transformation, which is + required by the IPv6-in-IPv6 tunneling module as well as tunnel mode + IPComp. + + If unsure, say Y. + config IPV6_TUNNEL tristate "IPv6: IPv6-in-IPv6 tunnel" depends on IPV6 - select XFRM + select INET6_TUNNEL ---help--- Support for IPv6-in-IPv6 tunnels described in RFC 2473. diff -Nru a/net/ipv6/Makefile b/net/ipv6/Makefile --- a/net/ipv6/Makefile 2004-08-19 07:34:25 -07:00 +++ b/net/ipv6/Makefile 2004-08-19 07:34:25 -07:00 @@ -11,12 +11,13 @@ ip6_flowlabel.o ipv6_syms.o ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ - xfrm6_tunnel.o xfrm6_output.o + xfrm6_output.o ipv6-objs += $(ipv6-y) obj-$(CONFIG_INET6_AH) += ah6.o obj-$(CONFIG_INET6_ESP) += esp6.o obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o +obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o diff -Nru a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c --- a/net/ipv6/xfrm6_policy.c 2004-08-19 07:34:25 -07:00 +++ b/net/ipv6/xfrm6_policy.c 2004-08-19 07:34:25 -07:00 @@ -287,12 +287,10 @@ { xfrm6_policy_init(); xfrm6_state_init(); - xfrm6_tunnel_init(); } void __exit xfrm6_fini(void) { - xfrm6_tunnel_fini(); //xfrm6_input_fini(); xfrm6_policy_fini(); xfrm6_state_fini(); diff -Nru a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c --- a/net/ipv6/xfrm6_tunnel.c 2004-08-19 07:34:25 -07:00 +++ b/net/ipv6/xfrm6_tunnel.c 2004-08-19 07:34:25 -07:00 @@ -501,31 +501,32 @@ .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, }; -void __init xfrm6_tunnel_init(void) +static int __init xfrm6_tunnel_init(void) { X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init: can't add xfrm type\n"); - return; + return -EAGAIN; } if (inet6_add_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init(): can't add protocol\n"); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); - return; + return -EAGAIN; } if (xfrm6_tunnel_spi_init() < 0) { X6TPRINTK1(KERN_ERR "xfrm6_tunnel init: failed to initialize spi\n"); inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); - return; + return -EAGAIN; } + return 0; } -void __exit xfrm6_tunnel_fini(void) +static void __exit xfrm6_tunnel_fini(void) { X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); @@ -537,3 +538,7 @@ X6TPRINTK1(KERN_ERR "xfrm6_tunnel close: can't remove xfrm type\n"); } + +module_init(xfrm6_tunnel_init); +module_exit(xfrm6_tunnel_fini); +MODULE_LICENSE("GPL"); diff -Nru a/net/xfrm/xfrm_export.c b/net/xfrm/xfrm_export.c --- a/net/xfrm/xfrm_export.c 2004-08-19 07:34:25 -07:00 +++ b/net/xfrm/xfrm_export.c 2004-08-19 07:34:25 -07:00 @@ -33,8 +33,6 @@ EXPORT_SYMBOL(xfrm_get_acqseq); EXPORT_SYMBOL(xfrm_parse_spi); EXPORT_SYMBOL(xfrm4_rcv); -EXPORT_SYMBOL(xfrm4_tunnel_register); -EXPORT_SYMBOL(xfrm4_tunnel_deregister); EXPORT_SYMBOL(xfrm_register_type); EXPORT_SYMBOL(xfrm_unregister_type); EXPORT_SYMBOL(xfrm_get_type); From kaber@trash.net Thu Aug 19 07:56:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 07:56:18 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7JEuB3E014894 for ; Thu, 19 Aug 2004 07:56:12 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id B80B019F33C; Thu, 19 Aug 2004 16:55:59 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id F41D039416D; Thu, 19 Aug 2004 16:55:58 +0200 (CEST) Message-ID: <4124BF7E.7090304@trash.net> Date: Thu, 19 Aug 2004 16:55:58 +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: Harald Welte , okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@sunbeam.de.gnumonks.org> <20040819071846.2d0d6120.davem@redhat.com> In-Reply-To: <20040819071846.2d0d6120.davem@redhat.com> Content-Type: multipart/mixed; boundary="------------040406000802080008010907" X-archive-position: 7902 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: 7030 Lines: 244 This is a multi-part message in MIME format. --------------040406000802080008010907 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David S. Miller wrote: >On Thu, 19 Aug 2004 12:11:59 +0200 >Harald Welte wrote: > > > >>Dave, is this fine with you? What solution would you prefer? >> >> > >I haven't been shown the patches so I can't generate an >opinion. :-) > > These are Olaf's patches. I agree with Harald that the second patch is better. I've fixed it up so it applies with the recent ip_fragment.c changes. --------------040406000802080008010907 Content-Type: text/plain; name="netfilter-unload-crash" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="netfilter-unload-crash" Index: v2.6.8/net/ipv4/ip_input.c =================================================================== --- v2.6.8.orig/net/ipv4/ip_input.c +++ v2.6.8/net/ipv4/ip_input.c @@ -177,6 +177,13 @@ int ip_call_ra_chain(struct sk_buff *skb read_unlock(&ip_ra_lock); return 1; } + /* When ip_conntrack gets unloaded, we may be + * left with fragment chains where the first + * fragment has skb->dst = NULL. */ + if (skb->dst == NULL) { + kfree_skb(skb); + return 1; + } } if (last) { struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); @@ -277,6 +284,13 @@ int ip_local_deliver(struct sk_buff *skb skb = ip_defrag(skb); if (!skb) return 0; + /* When ip_conntrack gets unloaded, we may be + * left with fragment chains where the first + * fragment has skb->dst = NULL. */ + if (skb->dst == NULL) { + kfree_skb(skb); + return 0; + } } return NF_HOOK(PF_INET, NF_IP_LOCAL_IN, skb, skb->dev, NULL, --------------040406000802080008010907 Content-Type: text/plain; name="conntrack-flush-fragments" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="conntrack-flush-fragments" Alternative fix for the crash on conntrack unload. Simply flush all fragment queues when unloading conntrack_standalone so that there are no partially assembled fragments left with skb->dst == NULL. Index: v2.6.8/include/net/ip.h =================================================================== --- v2.6.8.orig/include/net/ip.h +++ v2.6.8/include/net/ip.h @@ -255,6 +255,7 @@ extern int ip_call_ra_chain(struct sk_bu */ struct sk_buff *ip_defrag(struct sk_buff *skb); +extern void ipfrag_flush(void); extern int ip_frag_nqueues; extern atomic_t ip_frag_mem; Index: v2.6.8/net/ipv4/ip_fragment.c =================================================================== --- v2.6.8.orig/net/ipv4/ip_fragment.c +++ v2.6.8/net/ipv4/ip_fragment.c @@ -239,13 +239,13 @@ static void ipq_kill(struct ipq *ipq) /* Memory limiting on fragments. Evictor trashes the oldest * fragment queue until we are back under the low threshold. */ -static void ip_evictor(void) +static void __ip_evictor(int threshold) { struct ipq *qp; struct list_head *tmp; for(;;) { - if (atomic_read(&ip_frag_mem) <= sysctl_ipfrag_low_thresh) + if (atomic_read(&ip_frag_mem) <= threshold) return; read_lock(&ipfrag_lock); if (list_empty(&ipq_lru_list)) { @@ -267,6 +267,11 @@ static void ip_evictor(void) } } +static inline void ip_evictor(void) +{ + __ip_evictor(sysctl_ipfrag_low_thresh); +} + /* * Oops, a fragment queue timed out. Kill it and send an ICMP reply. */ @@ -677,4 +682,10 @@ void ipfrag_init(void) add_timer(&ipfrag_secret_timer); } +void ipfrag_flush(void) +{ + __ip_evictor(0); +} + EXPORT_SYMBOL(ip_defrag); +EXPORT_SYMBOL(ipfrag_flush); Index: v2.6.8/net/ipv4/netfilter/ip_conntrack_standalone.c =================================================================== --- v2.6.8.orig/net/ipv4/netfilter/ip_conntrack_standalone.c +++ v2.6.8/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -562,6 +562,8 @@ static int init_or_cleanup(int init) nf_unregister_hook(&ip_conntrack_defrag_local_out_ops); cleanup_defragops: nf_unregister_hook(&ip_conntrack_defrag_ops); + /* Frag queues may hold fragments with skb->dst == NULL */ + ipfrag_flush(); cleanup_proc: proc_net_remove("ip_conntrack"); cleanup_init: --------------040406000802080008010907 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/08/19 16:51:10+02:00 kaber@coreworks.de # [NETFILTER]: Flush ip fragment queue on conntrack module unload # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/19 16:50:47+02:00 kaber@coreworks.de +2 -0 # [NETFILTER]: Flush ip fragment queue on conntrack module unload # # net/ipv4/ip_fragment.c # 2004/08/19 16:50:47+02:00 kaber@coreworks.de +14 -3 # [NETFILTER]: Flush ip fragment queue on conntrack module unload # # include/net/ip.h # 2004/08/19 16:50:47+02:00 kaber@coreworks.de +1 -0 # [NETFILTER]: Flush ip fragment queue on conntrack module unload # diff -Nru a/include/net/ip.h b/include/net/ip.h --- a/include/net/ip.h 2004-08-19 16:53:39 +02:00 +++ b/include/net/ip.h 2004-08-19 16:53:39 +02:00 @@ -255,6 +255,7 @@ */ struct sk_buff *ip_defrag(struct sk_buff *skb); +extern void ipfrag_flush(void); extern int ip_frag_nqueues; extern atomic_t ip_frag_mem; diff -Nru a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c --- a/net/ipv4/ip_fragment.c 2004-08-19 16:53:38 +02:00 +++ b/net/ipv4/ip_fragment.c 2004-08-19 16:53:38 +02:00 @@ -241,15 +241,15 @@ } /* Memory limiting on fragments. Evictor trashes the oldest - * fragment queue until we are back under the low threshold. + * fragment queue until we are back under the threshold. */ -static void ip_evictor(void) +static void __ip_evictor(int threshold) { struct ipq *qp; struct list_head *tmp; int work; - work = atomic_read(&ip_frag_mem) - sysctl_ipfrag_low_thresh; + work = atomic_read(&ip_frag_mem) - threshold; if (work <= 0) return; @@ -274,6 +274,11 @@ } } +static inline void ip_evictor(void) +{ + __ip_evictor(sysctl_ipfrag_low_thresh); +} + /* * Oops, a fragment queue timed out. Kill it and send an ICMP reply. */ @@ -684,4 +689,10 @@ add_timer(&ipfrag_secret_timer); } +void ipfrag_flush(void) +{ + __ip_evictor(0); +} + EXPORT_SYMBOL(ip_defrag); +EXPORT_SYMBOL(ipfrag_flush); diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-19 16:53:38 +02:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-19 16:53:39 +02:00 @@ -806,6 +806,8 @@ nf_unregister_hook(&ip_conntrack_defrag_local_out_ops); cleanup_defragops: nf_unregister_hook(&ip_conntrack_defrag_ops); + /* Frag queues may hold fragments with skb->dst == NULL */ + ipfrag_flush(); cleanup_proc_stat: proc_net_remove("ip_conntrack_stat"); cleanup_proc_exp: --------------040406000802080008010907-- From davem@redhat.com Thu Aug 19 08:18:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 08:18:07 -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 i7JFHw0o016272 for ; Thu, 19 Aug 2004 08:18:01 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JFHke1005263; Thu, 19 Aug 2004 11:17:46 -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 i7JFHka14391; Thu, 19 Aug 2004 11:17:46 -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 i7JFGrUe017205; Thu, 19 Aug 2004 11:16:53 -0400 Date: Thu, 19 Aug 2004 08:14:28 -0700 From: "David S. Miller" To: Patrick McHardy Cc: laforge@netfilter.org, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040819081428.5243e314.davem@redhat.com> In-Reply-To: <4124BF7E.7090304@trash.net> References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@sunbeam.de.gnumonks.org> <20040819071846.2d0d6120.davem@redhat.com> <4124BF7E.7090304@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: 7903 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: 486 Lines: 13 On Thu, 19 Aug 2004 16:55:58 +0200 Patrick McHardy wrote: > These are Olaf's patches. I agree with Harald that the second > patch is better. I've fixed it up so it applies with the recent > ip_fragment.c changes. I have a better idea. Instead of setting skb->dst to NULL, it should set it to some NULL destination entry which just frees up the packets. Then no special case handling. skb->dst==NULL packets should never get into the fragment queue to begin with. From laforge@netfilter.org Thu Aug 19 09:55:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 09:55:43 -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 i7JGtbhS022978 for ; Thu, 19 Aug 2004 09:55:37 -0700 Received: from dsl-082-082-102-023.arcor-ip.net ([82.82.102.23] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BxqCI-0003fW-15; Thu, 19 Aug 2004 18:55:30 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BxqC9-0005SG-Uf; Thu, 19 Aug 2004 18:55:21 +0200 Date: Thu, 19 Aug 2004 18:55:21 +0200 From: Harald Welte To: "David S. Miller" Cc: yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: Do you know about skb_header_pointer() ? Message-ID: <20040819165521.GV3921@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , "David S. Miller" , yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com References: <200408190721.QAA02944@toshiba.co.jp> <20040819094401.GY3921@sunbeam.de.gnumonks.org> <20040819071618.27515547.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cebYKQG0P13XUdCa" Content-Disposition: inline In-Reply-To: <20040819071618.27515547.davem@redhat.com> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7904 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: 1744 Lines: 50 --cebYKQG0P13XUdCa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 19, 2004 at 07:16:18AM -0700, David S. Miller wrote: > On Thu, 19 Aug 2004 11:44:01 +0200 > Harald Welte wrote: >=20 > > I personally still like Yasuyuki's implementation[1] better, >=20 > Thanks for letting me know about this after we agreed upon > skb_header_pointer() (or somthing like it) at the networking > conference _AND_ I did the full implementation for you Harald. No offence meant, Dave :) I am grateful that you did this work, please don't get me wrong. > Or did you just learn about Ysauyuki's work recently? Yasuyiki's first implementation dates July 29th. =20 The one that I'm referring to was a patch from August 8th. The netconf discussion predates any of this. --=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 --cebYKQG0P13XUdCa 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) iD8DBQFBJNt5XaXGVTD0i/8RAqqbAKCNB5gPoYHCTbGHWgcp897BbPkNCACfeCpH 9c32exKnqh9a/frMA6SOtoI= =oUWg -----END PGP SIGNATURE----- --cebYKQG0P13XUdCa-- From laforge@netfilter.org Thu Aug 19 10:00:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 10:01:00 -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 i7JH0o0M023341 for ; Thu, 19 Aug 2004 10:00:53 -0700 Received: from dsl-082-082-102-023.arcor-ip.net ([82.82.102.23] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BxqHL-0003nw-QC; Thu, 19 Aug 2004 19:00:43 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BxqHI-0005Se-Sp; Thu, 19 Aug 2004 19:00:40 +0200 Date: Thu, 19 Aug 2004 19:00:40 +0200 From: Harald Welte To: "David S. Miller" Cc: yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: Do you know about skb_header_pointer() ? Message-ID: <20040819170040.GW3921@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , "David S. Miller" , yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com References: <200408190721.QAA02944@toshiba.co.jp> <20040819094401.GY3921@sunbeam.de.gnumonks.org> <20040819071750.67f0e924.davem@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NgVbDbWK8YZhIM7w" Content-Disposition: inline In-Reply-To: <20040819071750.67f0e924.davem@redhat.com> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7905 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: 1874 Lines: 53 --NgVbDbWK8YZhIM7w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 19, 2004 at 07:17:50AM -0700, David S. Miller wrote: > On Thu, 19 Aug 2004 11:44:01 +0200 > Harald Welte wrote: >=20 > > http://lists.netfilter.org/pipermail/netfilter-devel/2004-August/016277= =2Ehtml >=20 > I totally disagree with this change. Ok, that's fine with me. Let's stay with the skb_header_pointer(), which by the way [as expected] is not visible on my profile runs. Still, I am curious to know if anyone on one of the Cc'ed mailinglists can imagine a case where parts of the header up and including the tcp options could be non-linear. And no, I do not want to know this in order to say that skb_heder_pointer() is bad. I just want to know, because then we might still need some magic for those cases in order to avoid a case where we end up with per-rule copies or similar stuff again. 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 --NgVbDbWK8YZhIM7w 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) iD8DBQFBJNy4XaXGVTD0i/8RAhmdAJ0Q9BYtbHuvWy/d8aUx2kgnaZv6nACgrvDy Cn9ugff7nwiPePoEsXcDNCY= =e4bT -----END PGP SIGNATURE----- --NgVbDbWK8YZhIM7w-- From hch@lst.de Thu Aug 19 10:06:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 10:06:40 -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 i7JH6UNi023743 for ; Thu, 19 Aug 2004 10:06:34 -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 i7JH6J95028265 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 19 Aug 2004 19:06:19 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7JH6J3F028263; Thu, 19 Aug 2004 19:06:19 +0200 Date: Thu, 19 Aug 2004 19:06:19 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com, stigge@antcom.de Subject: Re: Debian #240812 - tg3 problems with NFS Message-ID: <20040819170619.GA28226@lst.de> References: <20040819161933.GA27114@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040819161933.GA27114@lst.de> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 7906 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: 3129 Lines: 66 Sorry, should have Cc'ed netdev and the submitter On Thu, Aug 19, 2004 at 06:19:33PM +0200, Christoph Hellwig wrote: > Hi Dave, > > I got the following report from Roland Stigge. He later mentioned 2.6.7 > still has this issue. There's also a full trail of the Debian bug at > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=240812, but because > some zealots abused it as flameware about firmware inside drivers that > one is pretty much useless. > > ---------------------------------------------------------------------------- > Hi, > > I always needed to use the separate driver from the bcm5700-source > package for my NIC. tg3 from the current 2.6.4 kernel only works to a > certain extent. I can browse the web (-> HTTP, DNS), ping etc. But NFS > doesn't work. When I mount something, I get the following syslog lines: > > ============================================================================= > Mar 29 13:23:13 atari kernel: nfs warning: mount version older than kernel > Mar 29 13:24:30 atari kernel: nfs: server sbo not responding, still trying > ============================================================================= > > Please note that I get the first line also with bcm5700. The second > line doesn't appear before the volume is already mounted and I cd'd to a > directory inside it. An "ls" makes the second line appear after some > seconds, and the terminal with the "ls" hangs without printing anything > further. > > The attachments in this mail show the kern.log for the bcm5700 and tg3 > case. > > "lspci -vv" says the following: > ============================================================================= > [...] > 0000:02:05.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5702 Gigabit Ethernet (rev 02) > Subsystem: Asustek Computer, Inc.: Unknown device 80a9 > Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- > Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- Latency: 64 (16000ns min), Cache Line > Size: 0x10 (64 bytes) > Interrupt: pin A routed to IRQ 18 > Region 0: Memory at ed800000 (64-bit, non-prefetchable) > [disabled] [size=f1e70000] > Expansion ROM at 00010000 [disabled] > Capabilities: [40] PCI-X non-bridge device. > Command: DPERE- ERO- RBC=0 OST=0 > Status: Bus=255 Dev=31 Func=1 64bit+ 133MHz+ SCD- USC-, DC=simple, DMMRBC=2, DMOST=0, DMCRS=1, RSCEM- > Capabilities: [48] Power Management version 2 > Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+) > Status: D0 PME-Enable+ DSel=0 DScale=1 PME- > Capabilities: [50] Vital Product Data > Capabilities: [58] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable- > Address: dfffffbfedfffcfc Data: fdff > [...] > ============================================================================= > > bootlog for the bcm5700 driver is at: > http://bugs.debian.org/cgi-bin/bugreport.cgi/kern.log.bcm5700?bug=240812&msg=6&att=1 > > bootlog for tg3 is at: > http://bugs.debian.org/cgi-bin/bugreport.cgi/kern.log.tg3?bug=240812&msg=6&att=2 > ---end quoted text--- From davem@redhat.com Thu Aug 19 10:31:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 10:31: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 i7JHVcJu024547 for ; Thu, 19 Aug 2004 10:31:38 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JHVHe1008883; Thu, 19 Aug 2004 13:31:17 -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 i7JHVCa31083; Thu, 19 Aug 2004 13:31:12 -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 i7JHVBNk032671; Thu, 19 Aug 2004 13:31:11 -0400 Date: Thu, 19 Aug 2004 10:27:53 -0700 From: "David S. Miller" To: Harald Welte Cc: yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, kadlec@blackhole.kfki.hu, kisza@securityaudit.hu, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: Do you know about skb_header_pointer() ? Message-Id: <20040819102753.408858e0.davem@redhat.com> In-Reply-To: <20040819170040.GW3921@sunbeam.de.gnumonks.org> References: <200408190721.QAA02944@toshiba.co.jp> <20040819094401.GY3921@sunbeam.de.gnumonks.org> <20040819071750.67f0e924.davem@redhat.com> <20040819170040.GW3921@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: 7907 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: 524 Lines: 16 On Thu, 19 Aug 2004 19:00:40 +0200 Harald Welte wrote: > can imagine a case where parts of the header up and including the tcp > options could be non-linear. A driver could do this, by putting all receive SKB data into pages. I am not aware of any that currently do this. Such a driver would have to be very careful, as things like the ethernet header parsing code on receive is not ready for such things. Things like pskb_may_pull() calls would need to be added to that code for this to work. From davem@redhat.com Thu Aug 19 10:33:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 10:33:16 -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 i7JHXABk024847 for ; Thu, 19 Aug 2004 10:33:10 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7JHX0e1009272; Thu, 19 Aug 2004 13:33:00 -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 i7JHX0a31715; Thu, 19 Aug 2004 13:33:00 -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 i7JHWxoO001088; Thu, 19 Aug 2004 13:33:00 -0400 Date: Thu, 19 Aug 2004 10:29:41 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: netdev@oss.sgi.com, stigge@antcom.de Subject: Re: Debian #240812 - tg3 problems with NFS Message-Id: <20040819102941.70c94182.davem@redhat.com> In-Reply-To: <20040819170619.GA28226@lst.de> References: <20040819161933.GA27114@lst.de> <20040819170619.GA28226@lst.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: 7908 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: 263 Lines: 10 On Thu, 19 Aug 2004 19:06:19 +0200 Christoph Hellwig wrote: > Sorry, should have Cc'ed netdev and the submitter Maybe it's checksum offload related. Try: ethtool -K $(DEVICE_NAME) rx off tx off sg off tso off Does that make the problem go away? From olh@suse.de Thu Aug 19 10:53:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 10:53:08 -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 i7JHr20j025911 for ; Thu, 19 Aug 2004 10:53:03 -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 77EEDAA1715 for ; Thu, 19 Aug 2004 19:50:18 +0200 (CEST) Date: Thu, 19 Aug 2004 19:50:17 +0200 From: Olaf Hering To: netdev@oss.sgi.com Subject: 2.6.8, pppd: Terminating connection due to lack of activity. Message-ID: <20040819175017.GA10513@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: 7909 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: 12946 Lines: 555 Hello, 2.6.8.1 terminates a pppoe connection after 5 minutes, even if there is still activity. This does not happen 2.6.8-rc2-bk13. I'm not sure if it is related to .config option, probably not. There is nothing in the logs, only the kernel was changed. I havent started to look where pppd looks for activity, yet. Is this a known bug? .... Aug 19 17:08:52 ibook pppd[3538]: Plugin rp-pppoe.so loaded. Aug 19 17:08:53 ibook pppd[3538]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.2 Aug 19 17:08:53 ibook pppd[3538]: Plugin passwordfd.so loaded. Aug 19 17:08:53 ibook pppd[3538]: pppd 2.4.2 started by root, uid 0 Aug 19 17:08:53 ibook pppd[3538]: Using interface ppp0 Aug 19 17:08:53 ibook pppd[3538]: Couldn't increase MTU to 1500 Aug 19 17:08:53 ibook pppd[3538]: Couldn't increase MRU to 1500 Aug 19 17:08:53 ibook pppd[3538]: replacing old default route to eth0 [1.1.1.1] Aug 19 17:08:53 ibook pppd[3538]: local IP address 192.168.99.1 Aug 19 17:08:53 ibook pppd[3538]: remote IP address 192.168.99.99 .... CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y CONFIG_PPC=y CONFIG_PPC32=y CONFIG_GENERIC_NVRAM=y CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_HOTPLUG=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_KALLSYMS=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y CONFIG_KMOD=y CONFIG_6xx=y CONFIG_TAU=y CONFIG_PPC601_SYNC_FIX=y CONFIG_PM=y CONFIG_PPC_STD_MMU=y CONFIG_PPC_MULTIPLATFORM=y CONFIG_PPC_CHRP=y CONFIG_PPC_PMAC=y CONFIG_PPC_PREP=y CONFIG_PPC_OF=y CONFIG_PPCBUG_NVRAM=y CONFIG_KERNEL_ELF=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_PROC_DEVICETREE=y CONFIG_GENERIC_ISA_DMA=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_HIGHMEM_START=0xfe000000 CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_TASK_SIZE=0x80000000 CONFIG_BOOT_LOAD=0x00800000 CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=123456 CONFIG_BLK_DEV_INITRD=y CONFIG_IDE=y CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECD=m CONFIG_BLK_DEV_IDEFLOPPY=m CONFIG_IDE_TASK_IOCTL=y CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_IDEPCI=y CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_BLK_DEV_OFFBOARD=y CONFIG_BLK_DEV_GENERIC=y CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_IDEDMA_PCI_AUTO=y CONFIG_BLK_DEV_ADMA=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y CONFIG_BLK_DEV_IDEDMA=y CONFIG_IDEDMA_AUTO=y CONFIG_SCSI=m CONFIG_BLK_DEV_SD=m CONFIG_BLK_DEV_SR=m CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_CHR_DEV_SG=m CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_LOGGING=y CONFIG_SCSI_SPI_ATTRS=m CONFIG_SCSI_QLA2XXX=m CONFIG_SCSI_DEBUG=m CONFIG_SCSI_MAC53C94=m CONFIG_MD=y CONFIG_BLK_DEV_MD=m CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_MIRROR=m CONFIG_DM_ZERO=m CONFIG_IEEE1394=m CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y CONFIG_IEEE1394_CONFIG_ROM_IP1394=y CONFIG_IEEE1394_OHCI1394=m CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m CONFIG_IEEE1394_CMP=m CONFIG_IEEE1394_AMDTP=m CONFIG_ADB=y CONFIG_ADB_CUDA=y CONFIG_ADB_PMU=y CONFIG_PMAC_PBOOK=y CONFIG_PMAC_APM_EMU=y CONFIG_PMAC_BACKLIGHT=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y CONFIG_NET=y CONFIG_PACKET=m CONFIG_PACKET_MMAP=y CONFIG_NETLINK_DEV=m CONFIG_UNIX=m CONFIG_NET_KEY=m CONFIG_INET=y CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_NETFILTER=y CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_LIMIT=m CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_MAC=m CONFIG_IP_NF_MATCH_PKTTYPE=m CONFIG_IP_NF_MATCH_MARK=m CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH_ESP=m CONFIG_IP_NF_MATCH_LENGTH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_TCPMSS=m CONFIG_IP_NF_MATCH_HELPER=m CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m CONFIG_IP_NF_TARGET_NETMAP=m CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_NAT_SNMP_BASIC=m CONFIG_IP_NF_NAT_IRC=m CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_RAW=m CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_REALM=m CONFIG_XFRM=y CONFIG_XFRM_USER=m CONFIG_LLC=m CONFIG_ATALK=m CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y CONFIG_NET_CLS_ROUTE=y CONFIG_NETDEVICES=y CONFIG_TUN=m CONFIG_ETHERTAP=m CONFIG_NET_ETHERNET=y CONFIG_MII=m CONFIG_MACE=m CONFIG_SUNGEM=m CONFIG_PPP=m CONFIG_PPP_MULTILINK=y CONFIG_PPP_FILTER=y CONFIG_PPP_ASYNC=m CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m CONFIG_PPPOE=m CONFIG_INPUT=y CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_JOYDEV=m CONFIG_INPUT_EVDEV=m CONFIG_SOUND_GAMEPORT=y CONFIG_INPUT_KEYBOARD=y CONFIG_INPUT_MOUSE=y CONFIG_INPUT_MISC=y CONFIG_INPUT_UINPUT=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_PMACZILOG=y CONFIG_SERIAL_PMACZILOG_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_WATCHDOG=y CONFIG_SOFT_WATCHDOG=m CONFIG_USBPCWATCHDOG=m CONFIG_NVRAM=y CONFIG_GEN_RTC=y CONFIG_AGP=m CONFIG_AGP_UNINORTH=m CONFIG_DRM=y CONFIG_DRM_R128=m CONFIG_RAW_DRIVER=m CONFIG_MAX_RAW_DEVS=4096 CONFIG_I2C=m CONFIG_I2C_CHARDEV=m CONFIG_I2C_ALGOBIT=m CONFIG_I2C_KEYWEST=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_BT848=m CONFIG_VIDEO_TUNER=m CONFIG_VIDEO_BUF=m CONFIG_VIDEO_BTCX=m CONFIG_VIDEO_IR=m CONFIG_FB=y CONFIG_FB_OF=y CONFIG_FB_PLATINUM=y CONFIG_FB_IMSTT=y CONFIG_FB_ATY128=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y CONFIG_SOUND=m CONFIG_DMASOUND_PMAC=m CONFIG_DMASOUND=m CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_DEBUG_MEMORY=y CONFIG_SND_MPU401_UART=m CONFIG_SND_DUMMY=m CONFIG_SND_VIRMIDI=m CONFIG_SND_MTPAV=m CONFIG_SND_SERIAL_U16550=m CONFIG_SND_MPU401=m CONFIG_SND_POWERMAC=m CONFIG_SND_USB_AUDIO=m CONFIG_USB=m CONFIG_USB_DEVICEFS=y CONFIG_USB_OHCI_HCD=m CONFIG_USB_AUDIO=m CONFIG_USB_BLUETOOTH_TTY=m CONFIG_USB_MIDI=m CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m CONFIG_USB_STORAGE=m CONFIG_USB_STORAGE_RW_DETECT=y CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y CONFIG_USB_STORAGE_DPCM=y CONFIG_USB_STORAGE_HP8200e=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y CONFIG_THRUSTMASTER_FF=y CONFIG_USB_HIDDEV=y CONFIG_USB_AIPTEK=m CONFIG_USB_WACOM=m CONFIG_USB_KBTAB=m CONFIG_USB_POWERMATE=m CONFIG_USB_MTOUCH=m CONFIG_USB_EGALAX=m CONFIG_USB_XPAD=m CONFIG_USB_ATI_REMOTE=m CONFIG_USB_MDC800=m CONFIG_USB_MICROTEK=m CONFIG_USB_HPUSBSCSI=m CONFIG_USB_DABUSB=m CONFIG_USB_VICAM=m CONFIG_USB_DSBR=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m CONFIG_USB_OV511=m CONFIG_USB_PWC=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m CONFIG_USB_CATC=m CONFIG_USB_KAWETH=m CONFIG_USB_PEGASUS=m CONFIG_USB_RTL8150=m CONFIG_USB_USBNET=m CONFIG_USB_ALI_M5632=y CONFIG_USB_AN2720=y CONFIG_USB_BELKIN=y CONFIG_USB_GENESYS=y CONFIG_USB_NET1080=y CONFIG_USB_PL2301=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_ZAURUS=y CONFIG_USB_CDCETHER=y CONFIG_USB_AX8817X=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_VISOR=m CONFIG_USB_SERIAL_IPAQ=m CONFIG_USB_SERIAL_IR=m CONFIG_USB_SERIAL_EDGEPORT=m CONFIG_USB_SERIAL_EDGEPORT_TI=m CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KEYSPAN=m CONFIG_USB_SERIAL_KEYSPAN_MPR=y CONFIG_USB_SERIAL_KEYSPAN_USA28=y CONFIG_USB_SERIAL_KEYSPAN_USA28X=y CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y CONFIG_USB_SERIAL_KEYSPAN_USA19=y CONFIG_USB_SERIAL_KEYSPAN_USA18X=y CONFIG_USB_SERIAL_KEYSPAN_USA19W=y CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y CONFIG_USB_SERIAL_KEYSPAN_USA49W=y CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m CONFIG_USB_SERIAL_OMNINET=m CONFIG_USB_EZUSB=y CONFIG_USB_EMI62=m CONFIG_USB_EMI26=m CONFIG_USB_TIGL=m CONFIG_USB_AUERSWALD=m CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m CONFIG_USB_CYTHERM=m CONFIG_USB_PHIDGETSERVO=m CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT3_FS=m CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_JBD=m CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=m CONFIG_REISERFS_FS_XATTR=y CONFIG_REISERFS_FS_POSIX_ACL=y CONFIG_FS_POSIX_ACL=y CONFIG_ISO9660_FS=m CONFIG_JOLIET=y CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=m CONFIG_UDF_FS=m CONFIG_UDF_NLS=y CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y CONFIG_DEVPTS_FS_XATTR=y CONFIG_TMPFS=y CONFIG_RAMFS=y CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m CONFIG_CRAMFS=m CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=m CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m CONFIG_SUNRPC=m CONFIG_PARTITION_ADVANCED=y CONFIG_OSF_PARTITION=y CONFIG_AMIGA_PARTITION=y CONFIG_ATARI_PARTITION=y CONFIG_MAC_PARTITION=y CONFIG_MSDOS_PARTITION=y CONFIG_BSD_DISKLABEL=y CONFIG_MINIX_SUBPARTITION=y CONFIG_SOLARIS_X86_PARTITION=y CONFIG_UNIXWARE_DISKLABEL=y CONFIG_LDM_PARTITION=y CONFIG_SGI_PARTITION=y CONFIG_ULTRIX_PARTITION=y CONFIG_SUN_PARTITION=y CONFIG_EFI_PARTITION=y CONFIG_NLS=m CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_CODEPAGE_737=m CONFIG_NLS_CODEPAGE_775=m CONFIG_NLS_CODEPAGE_850=m CONFIG_NLS_CODEPAGE_852=m CONFIG_NLS_CODEPAGE_855=m CONFIG_NLS_CODEPAGE_857=m CONFIG_NLS_CODEPAGE_860=m CONFIG_NLS_CODEPAGE_861=m CONFIG_NLS_CODEPAGE_862=m CONFIG_NLS_CODEPAGE_863=m CONFIG_NLS_CODEPAGE_864=m CONFIG_NLS_CODEPAGE_865=m CONFIG_NLS_CODEPAGE_866=m CONFIG_NLS_CODEPAGE_869=m CONFIG_NLS_CODEPAGE_936=m CONFIG_NLS_CODEPAGE_950=m CONFIG_NLS_CODEPAGE_932=m CONFIG_NLS_CODEPAGE_949=m CONFIG_NLS_CODEPAGE_874=m CONFIG_NLS_ISO8859_8=m CONFIG_NLS_CODEPAGE_1250=m CONFIG_NLS_CODEPAGE_1251=m CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_ISO8859_3=m CONFIG_NLS_ISO8859_4=m CONFIG_NLS_ISO8859_5=m CONFIG_NLS_ISO8859_6=m CONFIG_NLS_ISO8859_7=m CONFIG_NLS_ISO8859_9=m CONFIG_NLS_ISO8859_13=m CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m CONFIG_NLS_UTF8=m CONFIG_CRC_CCITT=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m CONFIG_PROFILING=y CONFIG_OPROFILE=m CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m CONFIG_CRYPTO_MD5=m CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m CONFIG_CRYPTO_DES=m CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG From olh@suse.de Thu Aug 19 11:29:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 11:29:30 -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 i7JITNlE028106 for ; Thu, 19 Aug 2004 11:29:24 -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 D30B7AA40AF for ; Thu, 19 Aug 2004 20:28:51 +0200 (CEST) Date: Thu, 19 Aug 2004 20:28:51 +0200 From: Olaf Hering To: netdev@oss.sgi.com Subject: Re: 2.6.8, pppd: Terminating connection due to lack of activity. Message-ID: <20040819182851.GA11063@suse.de> References: <20040819175017.GA10513@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040819175017.GA10513@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: 7910 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: 1331 Lines: 30 On Thu, Aug 19, Olaf Hering wrote: > Hello, > > 2.6.8.1 terminates a pppoe connection after 5 minutes, even if there is > still activity. This does not happen 2.6.8-rc2-bk13. I'm not sure if it > is related to .config option, probably not. > > There is nothing in the logs, only the kernel was changed. Aug 19 20:23:32 ibook kernel: ppp_ioctl(666) pppd(3488):c0,j104988 jiffies 104988 last_xmit 0 last_recv 0 idle.xmit_idle 104 idle.recv_idle 104 HZ 1000 Aug 19 20:26:48 ibook pppd[3488]: Terminating connection due to lack of activity. Aug 19 20:26:48 ibook pppd[3488]: Couldn't increase MTU to 1500 Aug 19 20:26:48 ibook pppd[3488]: Couldn't increase MRU to 1500 Aug 19 20:26:48 ibook kernel: ppp_ioctl(666) pppd(3488):c0,j301149 jiffies 301149 last_xmit 0 last_recv 0 idle.xmit_idle 301 idle.recv_idle 301 HZ 1000 Aug 19 20:26:48 ibook pppd[3488]: Connection terminated. Aug 19 20:26:48 ibook pppd[3488]: Connect time 8.3 minutes. Aug 19 20:26:48 ibook pppd[3488]: Sent 49673 bytes, received 404498 bytes. Aug 19 20:26:50 ibook pppd[3488]: Script /etc/ppp/ip-down finished (pid 8122), status = 0x0 Aug 19 20:27:33 ibook pppd[3488]: Starting link Aug 19 20:27:33 ibook pppd[3488]: PPP session is 1358 last_xmit/last_recv remains zero for some reasons. -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG From olh@suse.de Thu Aug 19 13:27:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 13:28:01 -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 i7JKRskq008743 for ; Thu, 19 Aug 2004 13:27:56 -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 3DE74AA5FB7 for ; Thu, 19 Aug 2004 22:27:42 +0200 (CEST) Date: Thu, 19 Aug 2004 22:27:41 +0200 From: Olaf Hering To: netdev@oss.sgi.com Subject: Re: 2.6.8, pppd: Terminating connection due to lack of activity. Message-ID: <20040819202741.GA12012@suse.de> References: <20040819175017.GA10513@suse.de> <20040819182851.GA11063@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040819182851.GA11063@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: 7911 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: 223 Lines: 10 On Thu, Aug 19, Olaf Hering wrote: > last_xmit/last_recv remains zero for some reasons. Looks like we toasted pppd in suse 9.1. Sorry for the noise... -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG From herbert@gondor.apana.org.au Thu Aug 19 14:31:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 14:31: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 i7JLVbCF010368 for ; Thu, 19 Aug 2004 14:31: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 1BxuVI-0007d5-00; Fri, 20 Aug 2004 07:31:24 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BxuVB-00057E-00; Fri, 20 Aug 2004 07:31:17 +1000 Date: Fri, 20 Aug 2004 07:31:17 +1000 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [2/2] Modularise xfrm_tunnel Message-ID: <20040819213117.GA19625@gondor.apana.org.au> References: <20040819113841.GA13872@gondor.apana.org.au> <20040819114050.GA16049@gondor.apana.org.au> <20040819114359.GA16189@gondor.apana.org.au> <20040819072525.430f00bd.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040819072525.430f00bd.davem@redhat.com> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 7912 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: 404 Lines: 11 On Thu, Aug 19, 2004 at 07:25:25AM -0700, David S. Miller wrote: > > I suppose you're making your way towards proper TOS tunnel handling > and the other fixes we spoke of? The TTL fixes? Yes. -- 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 Thu Aug 19 15:04:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 15:04:15 -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 i7JM46Cr012380 for ; Thu, 19 Aug 2004 15:04: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 1Bxv0c-00089M-00; Fri, 20 Aug 2004 08:03:46 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bxv0Y-0005BC-00; Fri, 20 Aug 2004 08:03:42 +1000 Date: Fri, 20 Aug 2004 08:03:42 +1000 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [2/2] Modularise xfrm_tunnel Message-ID: <20040819220342.GA19894@gondor.apana.org.au> References: <20040819113841.GA13872@gondor.apana.org.au> <20040819114050.GA16049@gondor.apana.org.au> <20040819114359.GA16189@gondor.apana.org.au> <20040819072525.430f00bd.davem@redhat.com> <20040819213117.GA19625@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040819213117.GA19625@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 7913 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: 23 On Fri, Aug 20, 2004 at 07:31:17AM +1000, herbert wrote: > On Thu, Aug 19, 2004 at 07:25:25AM -0700, David S. Miller wrote: > > > > I suppose you're making your way towards proper TOS tunnel handling > > and the other fixes we spoke of? > > The TTL fixes? Yes. I'm also working on a couple of other small things: * ECN updates * IPComp per-cpu scratch/tfm * Check sequence number in ADD_SA/ALLOC_SPI * pskb rollback After that I'd like to look at the MTU stuff. 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 mcgrof@studorgs.rutgers.edu Thu Aug 19 15:54:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 15:54:37 -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 i7JMsVH0013292 for ; Thu, 19 Aug 2004 15:54:31 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id AE407F99BF; Thu, 19 Aug 2004 18:54:24 -0400 (EDT) Date: Thu, 19 Aug 2004 18:54:24 -0400 To: Jeff Garzik Cc: Netdev , prism54-devel@prism54.org Subject: [PATCH 0/3] prism54: remove some module_params, WE17 and initial WPA work Message-ID: <20040819225424.GY6044@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , Netdev , prism54-devel@prism54.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R6sEYoIZpp9JErk7" Content-Disposition: inline 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: 7914 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: 873 Lines: 36 --R6sEYoIZpp9JErk7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jeff, The following patches go ontop of Margit's recent patches which have not yet been integrated by you. These patches add remove some unncessary module_params, adds WE17 support and adds our initial WPA work -- striving to get prism54 wpa_supplicant to work with prism54. Please note that these patches are for *both* 2.6 and 2.4. Thanks, Luis --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --R6sEYoIZpp9JErk7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBJS+gat1JN+IKUl4RAhJwAJ9SCtvXveHFVVizhdVe38pe5s3KlQCgi+9/ sPytIakTScWq0ginITGNeQ4= =7ZfL -----END PGP SIGNATURE----- --R6sEYoIZpp9JErk7-- From mcgrof@studorgs.rutgers.edu Thu Aug 19 16:00:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 16:00:16 -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 i7JN0AFf013621 for ; Thu, 19 Aug 2004 16:00:10 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 139A6F99BF; Thu, 19 Aug 2004 19:00:04 -0400 (EDT) Date: Thu, 19 Aug 2004 19:00:03 -0400 To: Jeff Garzik , Netdev , prism54-devel@prism54.org Subject: [PATCH 1/3] prism54: remove some module_params Message-ID: <20040819230003.GZ6044@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , Netdev , prism54-devel@prism54.org References: <20040819225424.GY6044@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TBNym+cBXeFsS4Vs" Content-Disposition: inline In-Reply-To: <20040819225424.GY6044@ruslug.rutgers.edu> 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: 7915 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: 5183 Lines: 151 --TBNym+cBXeFsS4Vs Content-Type: multipart/mixed; boundary="RDS4xtyBfx+7DiaI" Content-Disposition: inline --RDS4xtyBfx+7DiaI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 2004-08-18 Luis R. Rodriguez * isl_ioctl.c (prism54_mib_init): remove module_param usage and=20 dependency as its unnecessary --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --RDS4xtyBfx+7DiaI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="01-remove-module_params.diff" Content-Transfer-Encoding: quoted-printable diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c linux-2.= 6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-14 16:16= :24.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-= 16 17:39:31.000000000 +0000 @@ -36,38 +36,6 @@ =20 #include /* New driver API */ =20 -static int init_mode =3D CARD_DEFAULT_IW_MODE; -static int init_channel =3D CARD_DEFAULT_CHANNEL; -static int init_wep =3D CARD_DEFAULT_WEP; -static int init_filter =3D CARD_DEFAULT_FILTER; -static int init_authen =3D CARD_DEFAULT_AUTHEN; -static int init_dot1x =3D CARD_DEFAULT_DOT1X; -static int init_conformance =3D CARD_DEFAULT_CONFORMANCE; -static int init_mlme =3D 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: Ma= ster / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not sup= ported 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 0x000= 1: DOT11_AUTH_OS (Default)\n2 0x0002: DOT11_AUTH_SK\n3 0x0003: DOT11_AUTH_B= OTH"); - -module_param(init_dot1x, int, 0); -MODULE_PARM_DESC(init_dot1x, - "\n0: None/not set (Default)\n1: DOT11_DOT1X_AUTHENABLED\n2: DOT11_DOT1= X_KEYTXENABLED"); - -module_param(init_mlme, int, 0); -MODULE_PARM_DESC(init_mlme, - "Sets the MAC layer management entity (MLME) mode of operation,\n0: DOT= 11_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 @@ prism54_mib_mode_helper(islpci_private * void prism54_mib_init(islpci_private *priv) { - u32 t; + u32 channel, authen, wep, filter, dot1x, mlme, conformance, power, mode; struct obj_buffer psm_buffer =3D { .size =3D PSM_BUFFER_SIZE, .addr =3D priv->device_psm_buffer }; =20 - 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 =3D CARD_DEFAULT_CHANNEL; + authen =3D CARD_DEFAULT_AUTHEN; + wep =3D CARD_DEFAULT_WEP; + filter =3D CARD_DEFAULT_FILTER; /* (0) Do not filter un-encrypted data */ + dot1x =3D CARD_DEFAULT_DOT1X;=20 + mlme =3D CARD_DEFAULT_MLME_MODE; + conformance =3D CARD_DEFAULT_CONFORMANCE; + power =3D 127; + mode =3D 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 =3D 127; - mgt_set(priv, OID_INL_OUTPUTPOWER, &t); - - /* Important: we are setting a default wireless mode and we are=20 - * 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 =3D 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); } =20 /* this will be executed outside of atomic context thanks to --RDS4xtyBfx+7DiaI-- --TBNym+cBXeFsS4Vs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBJTDzat1JN+IKUl4RAgnRAJ46BCPB0b2QwMs3qSscLabVitlo0ACfaZBw EDWn4qK7Tsyvjr/RqGOWhRg= =EK89 -----END PGP SIGNATURE----- --TBNym+cBXeFsS4Vs-- From mcgrof@studorgs.rutgers.edu Thu Aug 19 16:03:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 16:03:19 -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 i7JN3C37014025 for ; Thu, 19 Aug 2004 16:03:13 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 89D7EF99BF; Thu, 19 Aug 2004 19:03:06 -0400 (EDT) Date: Thu, 19 Aug 2004 19:03:06 -0400 To: Jeff Garzik , Netdev , prism54-devel@prism54.org Subject: [PATCH 2/3] prism54: add WE17 support Message-ID: <20040819230306.GA6044@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , Netdev , prism54-devel@prism54.org References: <20040819225424.GY6044@ruslug.rutgers.edu> <20040819230003.GZ6044@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YPJ8CVbwFUtL7OFW" Content-Disposition: inline In-Reply-To: <20040819230003.GZ6044@ruslug.rutgers.edu> 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: 7916 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: 5517 Lines: 155 --YPJ8CVbwFUtL7OFW Content-Type: multipart/mixed; boundary="+ZmrHH5cGjskQnY1" Content-Disposition: inline --+ZmrHH5cGjskQnY1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Relies on patches for WE17 from Jean Tourrilhes 2004-08-18 Jean Tourrilhes * isl_ioctl.c, islpci_dev.[ch]: Add support for Wireless Extension 17 * isl_ioctl.c (const struct iw_handler_def prism54_handler_def): Add .spy_= offset=20 only if WE =3D=3D 16 only check as this is being deprecated.=20 --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --+ZmrHH5cGjskQnY1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="02-handle-WIRELESS_EXT17.diff" Content-Transfer-Encoding: quoted-printable diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c linux-2.= 6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-16 18:05= :53.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-= 16 18:02:34.000000000 +0000 @@ -451,6 +451,15 @@ prism54_get_range(struct net_device *nde /* txpower is supported in dBm's */ range->txpower_capa =3D IW_TXPOW_DBM; =20 +#if WIRELESS_EXT > 16 + /* Event capability (kernel + driver) */ + range->event_capa[0] =3D (IW_EVENT_CAPA_K_0 | + IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | + IW_EVENT_CAPA_MASK(SIOCGIWAP)); + range->event_capa[1] =3D IW_EVENT_CAPA_K_1; + range->event_capa[4] =3D IW_EVENT_CAPA_MASK(IWEVCUSTOM); +#endif /* WIRELESS_EXT > 16 */ + if (islpci_get_state(priv) < PRV_STATE_INIT) return 0; =20 @@ -656,19 +665,33 @@ prism54_get_scan(struct net_device *ndev rvalue =3D mgt_get_request(priv, DOT11_OID_NOISEFLOOR, 0, NULL, &r); noise =3D r.u; =20 - /* Ask the device for a list of known bss. We can report at most - * IW_MAX_AP=3D64 to the range struct. But the device won't repport anyth= ing - * if you change the value of IWMAX_BSS=3D24. - */ + /* Ask the device for a list of known bss. + * The old API, using SIOCGIWAPLIST, had a hard limit of IW_MAX_AP=3D64. + * 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=3D24. */ +=09 rvalue |=3D mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); bsslist =3D r.ptr; =20 /* ok now, scan the list and translate its info */ - for (i =3D 0; i < min(IW_MAX_AP, (int) bsslist->nr); i++) + for (i =3D 0; i < (int) bsslist->nr; i++) { current_ev =3D 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) <=3D IW_EV_ADDR_LEN) { + /* Ask user space to try again with a bigger buffer */ + rvalue =3D -E2BIG; + break; + } +#endif /* WIRELESS_EXT > 16 */ + } + kfree(bsslist); dwrq->length =3D (current_ev - extra); dwrq->flags =3D 0; /* todo */ @@ -2222,7 +2245,9 @@ const struct iw_handler_def prism54_hand .standard =3D (iw_handler *) prism54_handler, .private =3D (iw_handler *) prism54_private_handler, .private_args =3D (struct iw_priv_args *) prism54_private_args, +#if WIRELESS_EXT =3D=3D 16 .spy_offset =3D offsetof(islpci_private, spy_data), +#endif /* WIRELESS_EXT =3D=3D 16 */ }; =20 /* For ioctls that don't work with the new API */ diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/islpci_dev.c linux-2= .6.8.1-prism54/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.8.1/drivers/net/wireless/prism54/islpci_dev.c 2004-08-16 14:4= 7:48.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/islpci_dev.c 2004-08= -16 18:10:30.000000000 +0000 @@ -829,6 +829,12 @@ islpci_setup(struct pci_dev *pdev) priv->ndev->type =3D (priv->iw_mode =3D=3D IW_MODE_MONITOR) ? priv->monitor_type : ARPHRD_ETHER; =20 +#if WIRELESS_EXT > 16 + /* Add pointers to enable iwspy support. */ + priv->wireless_data.spy_data =3D &priv->spy_data; + ndev->wireless_data =3D &priv->wireless_data; +#endif /* WIRELESS_EXT > 16 */ + /* save the start and end address of the PCI memory area */ ndev->mem_start =3D (unsigned long) priv->device_base; ndev->mem_end =3D ndev->mem_start + ISL38XX_PCI_MEM_SIZE; diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/islpci_dev.h linux-2= .6.8.1-prism54/drivers/net/wireless/prism54/islpci_dev.h --- linux-2.6.8.1/drivers/net/wireless/prism54/islpci_dev.h 2004-07-01 05:5= 4:35.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/islpci_dev.h 2004-08= -16 18:19:50.000000000 +0000 @@ -100,6 +100,10 @@ typedef struct { =20 struct iw_spy_data spy_data; /* iwspy support */ =20 +#if WIRELESS_EXT > 16 + struct iw_public_data wireless_data; +#endif /* WIRELESS_EXT > 16 */ + int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */ =20 struct islpci_acl acl; --+ZmrHH5cGjskQnY1-- --YPJ8CVbwFUtL7OFW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBJTGqat1JN+IKUl4RAiMsAJ9uB4pq5Nog4TW+DW1aeYJjE3z+XACgmxwl biQNZ1BjuDgKROziki9vcfo= =Jc7+ -----END PGP SIGNATURE----- --YPJ8CVbwFUtL7OFW-- From mcgrof@studorgs.rutgers.edu Thu Aug 19 16:06:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 16:06:08 -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 i7JN5xIT014365 for ; Thu, 19 Aug 2004 16:05:59 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id B77B4F99BF; Thu, 19 Aug 2004 19:05:52 -0400 (EDT) Date: Thu, 19 Aug 2004 19:05:52 -0400 To: Jeff Garzik , Netdev , prism54-devel@prism54.org Subject: [PATCH 3/3] prism54: add initial WPA work Message-ID: <20040819230552.GB6044@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , Netdev , prism54-devel@prism54.org References: <20040819225424.GY6044@ruslug.rutgers.edu> <20040819230003.GZ6044@ruslug.rutgers.edu> <20040819230306.GA6044@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UK1lfQXsnwKrySH9" Content-Disposition: inline In-Reply-To: <20040819230306.GA6044@ruslug.rutgers.edu> 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: 7917 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: 26784 Lines: 891 --UK1lfQXsnwKrySH9 Content-Type: multipart/mixed; boundary="IJAclU0AInkryoed" Content-Disposition: inline --IJAclU0AInkryoed Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please note that this is the initial work to add WPA support for STAs through wpa_supplicant. More work and patches to come soon to complete this work. 2004-08-18 Luis R. Rodriguez Work based on initial patches from Jouni Malinen Initial wpa_supplicant support work: ------------------------------------ * isl_ioctl.c (prism54_process_trap_helper): Start to use mlmeex, start doing what's right for DOT11_OID_AUTHENTICATEEX, DOT11_OID_ASSOCIATEEX, DOT11_OID_ASSOCIATEEX, and DOT11_OID_REASSOCIATEEX * isl_ioctl.c: add temporary structure for wpa_supplicant requests, * isl_ioctl.c: add prism2_ioctl_set_encryption which can probably be remov= ed later * isl_ioctl.c: add prism2_ioctl_set_generic_element (well tested) =09 * isl_ioctl.c: add prism2_ioctl_mlme which should be unnecessary since=20 WE scan should be used by wpa_supplicant =09 * isl_ioctl.c: add prism54_hostapd - this parses wpa_supplicant requests and does the right job for each * isl_ioctl.c (prism54_set_wpa): changed to not use mgt_set/mgt_commit as commit is unecessary. Added proper OID sets to enable/disable WPA. This is called by wpa_supplicant at startup. This should eventually be part of WE18. * isl_ioctl.c (prism54_ioctl): Links wpa_supplicant to prism54 * isl_ioctl.h: defined prism54_set_wpa to allow prism54_hostapd to use * isl_oid.h: add struct obj_attachment for OID OID_TYPE_ATTACH * oid_mgt.c: map OID DOT11_OID_ATTACHMENT to struct obj_attachment * oid_mgt.c (mgt_le_to_cpu, mgt_cpu_to_le): handle endianness for obj_attachment * oid_mgt.c: add mgt_set_varlen, needed for mlmeex as it has a variable size field. * oid_mgt.c: add mgt_unlatch_all, this can be used to force a commit on OIDs: MEDIUMLIMIT, BEACONPERIOD, DTIMPERIOD, ATIMWINDOW, LISTENINTERVAL, FREQUENCY, EXTENDEDRATES These OIDs are "latched". TODO: config mode handling. * oid_mgt.c (mgt_response_to_str): learn to parse OID_TYPE_ATTACH * oid_mgt.h: add mgt_set_varlen, and mgt_unlatch_all --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --IJAclU0AInkryoed Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="03-start_wpa_work.diff" Content-Transfer-Encoding: quoted-printable diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c linux-2.= 6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-16 18:32= :35.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-= 16 19:55:24.000000000 +0000 @@ -1735,11 +1735,13 @@ prism54_process_trap_helper(islpci_priva char *data) { struct obj_mlme *mlme =3D (struct obj_mlme *) data; - size_t len; - u8 *payload, *pos =3D (u8 *) (mlme + 1); - - len =3D pos[0] | (pos[1] << 8); /* little endian data length */ - payload =3D pos + 2; + struct obj_mlmeex *mlmeex =3D (struct obj_mlmeex *) data; + struct obj_mlmeex *confirm; + u8 wpa_ie[MAX_WPA_IE_LEN]; + int wpa_ie_len; + size_t len =3D 0; /* u16, better? */ + u8 *payload =3D 0, *pos =3D 0; + int ret; =20 /* I think all trapable objects are listed here. * Some oids have a EX version. The difference is that they are emitted @@ -1749,9 +1751,14 @@ prism54_process_trap_helper(islpci_priva * suited. We use the more flexible custom event facility. */ =20 + if (oid >=3D DOT11_OID_BEACON) { + len =3D mlmeex->size; + payload =3D pos =3D mlmeex->data; + } + /* I fear prism54_process_bss_data won't work with big endian data */ if ((oid =3D=3D DOT11_OID_BEACON) || (oid =3D=3D DOT11_OID_PROBE)) - prism54_process_bss_data(priv, oid, mlme->address, + prism54_process_bss_data(priv, oid, mlmeex->address, payload, len); =20 mgt_le_to_cpu(isl_oid[oid].flags & OID_FLAG_TYPE, (void *) mlme); @@ -1811,21 +1818,134 @@ prism54_process_trap_helper(islpci_priva =20 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 !=3D IW_MODE_MASTER=20 + && mlmeex->state !=3D DOT11_STATE_AUTHING) + break; + + confirm =3D kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC); + + if (!confirm)=20 + break; + + memcpy(&confirm->address, mlmeex->address, ETH_ALEN); + printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x= :%02x\n",=20 + mlmeex->address[0], + mlmeex->address[1], + mlmeex->address[2], + mlmeex->address[3], + mlmeex->address[4], + mlmeex->address[5] + ); + confirm->id =3D -1; /* or mlmeex->id ? */ + confirm->state =3D 0; /* not used */ + confirm->code =3D 0; + confirm->size =3D 6; + confirm->data[0] =3D 0x00; + confirm->data[1] =3D 0x00; + confirm->data[2] =3D 0x02; + confirm->data[3] =3D 0x00; + confirm->data[4] =3D 0x00; + confirm->data[5] =3D 0x00; + + ret =3D mgt_set_varlen(priv, DOT11_OID_ASSOCIATEEX, confirm, 6); + + kfree(confirm); + if (ret) + return ret; break; =20 case DOT11_OID_DISASSOCIATEEX: - send_formatted_event(priv, "Disassociate request", mlme, 0); + send_formatted_event(priv, "Disassociate request (ex)", mlme, 0); break; =20 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 !=3D IW_MODE_MASTER=20 + && mlmeex->state !=3D DOT11_STATE_AUTHING) + break; + =09 + confirm =3D kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); + + if (!confirm) + break; + + memcpy(&confirm->address, mlmeex->address, ETH_ALEN); + + confirm->id =3D ((struct obj_mlmeex *)mlme)->id; + confirm->state =3D 0; /* not used */ + confirm->code =3D 0; + + wpa_ie_len =3D 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",=20 + mlmeex->address[0], + mlmeex->address[1], + mlmeex->address[2], + mlmeex->address[3], + mlmeex->address[4], + mlmeex->address[5] + ); + kfree(confirm); + break; + } + + confirm->size =3D wpa_ie_len; + memcpy(&confirm->data, wpa_ie, wpa_ie_len); + + mgt_set_varlen(priv, oid, confirm, wpa_ie_len); + + kfree(confirm); + =09 break; =20 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 !=3D IW_MODE_MASTER=20 + && mlmeex->state !=3D DOT11_STATE_ASSOCING) + break; + + confirm =3D kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); + + if (!confirm) + break; + + memcpy(&confirm->address, mlmeex->address, ETH_ALEN); + + confirm->id =3D mlmeex->id; + confirm->state =3D 0; /* not used */ + confirm->code =3D 0; + + wpa_ie_len =3D 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",=20 + mlmeex->address[0], + mlmeex->address[1], + mlmeex->address[2], + mlmeex->address[3], + mlmeex->address[4], + mlmeex->address[5] + ); + kfree(confirm); + break; + } + + confirm->size =3D wpa_ie_len;=20 + memcpy(&confirm->data, wpa_ie, wpa_ie_len); + + mgt_set_varlen(priv, oid, confirm, wpa_ie_len); + + kfree(confirm); + =09 break; =20 default: @@ -1868,23 +1988,367 @@ prism54_set_mac_address(struct net_devic return ret; } =20 +/* 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 =3D 6, + PRISM2_HOSTAPD_SET_GENERIC_ELEMENT =3D 12, + PRISM2_HOSTAPD_MLME =3D 13, + PRISM2_HOSTAPD_SCAN_REQ =3D 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)=20 + * used in ioctl() */ +#define HOSTAP_CRYPT_ALG_NAME_LEN 16 +=09 +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 =3D netdev_priv(dev); + int rvalue =3D 0, force =3D 0; + int authen =3D DOT11_AUTH_OS, invoke =3D 0, exunencrypt =3D 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 =3D param->u.crypt.idx; + int current_index; + struct obj_key key =3D { DOT11_PRIV_TKIP, 0, "" }; + + /* get the current key index */ + rvalue =3D mgt_get_request(priv, DOT11_OID_DEFKEYID, 0, NULL, &r); + current_index =3D r.u; + /* Verify that the key is not marked as invalid */ + if (!(param->u.crypt.flags & IW_ENCODE_NOKEY)) { + key.length =3D 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 =3D=3D 32) + /* we want WPA-PSK */ + key.type =3D DOT11_PRIV_TKIP; + if ((index < 0) || (index > 3)) + /* no index provided use the current one */ + index =3D current_index; + + /* now send the key to the card */ + rvalue |=3D + mgt_set_request(priv, DOT11_OID_DEFKEYX, index, + &key); + } + /* + * If a valid key is set, encryption should be enabled=20 + * (user may turn it off later). + * This is also how "iwconfig ethX key on" works + */ + if ((index =3D=3D current_index) && (key.length > 0)) + force =3D 1; + } else { + int index =3D (param->u.crypt.flags & IW_ENCODE_INDEX) - 1; + if ((index >=3D 0) && (index <=3D 3)) { + /* we want to set the key index */ + rvalue |=3D + 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,=20 + * authen =3D DOT11_AUTH_OS; + * invoke =3D 0; + * exunencrypt =3D 0; */ + } + if (param->u.crypt.flags & IW_ENCODE_OPEN) + /* Encode but accept non-encoded packets. No auth */ + invoke =3D 1; + if ((param->u.crypt.flags & IW_ENCODE_RESTRICTED) || force) { + /* Refuse non-encoded packets. Auth */ + authen =3D DOT11_AUTH_BOTH; + invoke =3D 1; + exunencrypt =3D 1; + } + /* do the change if requested */ + if ((param->u.crypt.flags & IW_ENCODE_MODE) || force) { + rvalue |=3D + mgt_set_request(priv, DOT11_OID_AUTHENABLE, 0, &authen); + rvalue |=3D + mgt_set_request(priv, DOT11_OID_PRIVACYINVOKED, 0, &invoke); + rvalue |=3D + 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 =3D netdev_priv(ndev); + int max_len, len, alen, ret=3D0; + struct obj_attachment *attach; + + len =3D param->u.generic_elem.len; + max_len =3D param_len - PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN; + if (max_len < 0 || max_len < len) + return -EINVAL; + + alen =3D sizeof(*attach) + len; + attach =3D kmalloc(alen, GFP_KERNEL); + if (attach =3D=3D 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 =3D (WLAN_FC_TYPE_MGMT << 2) | + (WLAN_FC_STYPE_ASSOC_REQ << 4); + attach->id =3D -1; + attach->size =3D len; + memcpy(attach->data, param->u.generic_elem.data, len); + + ret =3D mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); + + if (ret =3D=3D 0) { + attach->type =3D (WLAN_FC_TYPE_MGMT << 2) | + (WLAN_FC_STYPE_REASSOC_REQ << 4); + + ret =3D mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); + + if (ret =3D=3D 0)=20 + 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 *par= am) +{ + return -EOPNOTSUPP; +} + +static int +prism2_ioctl_scan_req(struct net_device *ndev, + struct prism2_hostapd_param *param) +{ + islpci_private *priv =3D netdev_priv(ndev); + int i, rvalue; + struct obj_bsslist *bsslist; + u32 noise =3D 0; + char *extra =3D ""; + char *current_ev =3D "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 =3D mgt_get_request(priv, DOT11_OID_NOISEFLOOR, 0, NULL, &r); + noise =3D r.u; + + /* Ask the device for a list of known bss. We can report at most + * IW_MAX_AP=3D64 to the range struct. But the device won't repport anyth= ing + * if you change the value of IWMAX_BSS=3D24. + */ + rvalue |=3D mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); + bsslist =3D r.ptr; + + /* ok now, scan the list and translate its info */ + for (i =3D 0; i < min(IW_MAX_AP, (int) bsslist->nr); i++) + current_ev =3D 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 =3D 0; + u32 uwrq; + + printk(KERN_DEBUG "prism54_hostapd - len=3D%d\n", p->length); + if (p->length < sizeof(struct prism2_hostapd_param) || + p->length > PRISM2_HOSTAPD_MAX_BUF_SIZE || !p->pointer) + return -EINVAL; + + param =3D (struct prism2_hostapd_param *) kmalloc(p->length, GFP_KE= RNEL); + if (param =3D=3D 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 reques= t\n", + ndev->name); + ret =3D 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 =3D 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 =3D prism2_ioctl_mlme(ndev, param); + break; + case PRISM2_HOSTAPD_SCAN_REQ: + printk(KERN_DEBUG "%s: Caught WPA supplicant scan request\n", + ndev->name); + ret =3D 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 =3D 1; + ret =3D 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 =3D 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 th= ough? */ + ret =3D 0; + break; + default: + printk(KERN_DEBUG "%s: Caught a WPA supplicant request that is not= supported\n", + ndev->name); + ret =3D -EOPNOTSUPP; + break; + } + + if (ret =3D=3D 0 && copy_to_user(p->pointer, param, p->length)) + ret =3D -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 =3D netdev_priv(ndev); + u32 mlme, authen, dot1x, filter, wep; =20 - down_write(&priv->mib_sem); + if (islpci_get_state(priv) < PRV_STATE_INIT) + return 0; =20 + wep =3D 1; /* For privacy invoked */ + filter =3D 1; /* Filter out all unencrypted frames */ + dot1x =3D 0x01; /* To enable eap filter */ + mlme =3D DOT11_MLME_EXTENDED; + authen =3D DOT11_AUTH_OS; /* Only WEP uses _SK and _BOTH */ + + down_write(&priv->mib_sem); priv->wpa =3D *uwrq; - if (priv->wpa) { - u32 l =3D DOT11_MLME_EXTENDED; - mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &l); + + switch (priv->wpa) { + default: + case 0: /* Clears/disables WPA and friends */ + wep =3D 0; + filter =3D 0; /* Do not filter un-encrypted data */ + dot1x =3D 0; + mlme =3D DOT11_MLME_AUTO; + printk("%s: Disabling WPA\n", ndev->name); + break; + case 2:=20 + 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); =20 + 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; } =20 @@ -2251,10 +2715,18 @@ const struct iw_handler_def prism54_hand }; =20 -/* For ioctls that don't work with the new API */ +/* For wpa_supplicant */ =20 int prism54_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) { - + struct iwreq *wrq =3D (struct iwreq *) rq; + int ret =3D -1; + switch (cmd) { + case PRISM54_HOSTAPD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + ret =3D prism54_hostapd(ndev, &wrq->u.data); + return ret; + } return -EOPNOTSUPP; } diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.h linux-2.= 6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.h --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.h 2004-05-29 15:06= :49.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.h 2004-08-= 16 18:57:56.000000000 +0000 @@ -48,6 +47,8 @@ size_t prism54_wpa_ie_get(islpci_private int prism54_set_mac_address(struct net_device *, void *); =20 int prism54_ioctl(struct net_device *, struct ifreq *, int); +int prism54_set_wpa(struct net_device *, struct iw_request_info *,=20 + __u32 *, char *); =20 extern const struct iw_handler_def prism54_handler_def; =20 diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_oid.h linux-2.6.= 8.1-prism54/drivers/net/wireless/prism54/isl_oid.h --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_oid.h 2004-05-29 15:06:4= 9.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/isl_oid.h 2004-08-16= 19:01:05.000000000 +0000 @@ -91,6 +90,14 @@ struct obj_frequencies { u16 mhz[0]; } __attribute__ ((packed)); =20 +struct obj_attachment { + char type; + char reserved; + short id; + short size; + char data[0]; +} __attribute__((packed)); + /*=20 * in case everything's ok, the inlined function below will be * optimized away by the compiler... @@ -472,6 +479,7 @@ enum oid_num_t { #define OID_TYPE_MLMEEX 0x09 #define OID_TYPE_ADDR 0x0A #define OID_TYPE_RAW 0x0B +#define OID_TYPE_ATTACH 0x0C =20 /* OID_TYPE_MLMEEX is special because of a variable size field when sendin= g. * Not yet implemented (not used in driver anyway). diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.= 8.1-prism54/drivers/net/wireless/prism54/oid_mgt.c --- linux-2.6.8.1/drivers/net/wireless/prism54/oid_mgt.c 2004-08-14 16:16:2= 4.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/oid_mgt.c 2004-08-16= 19:10:01.000000000 +0000 @@ -201,7 +200,8 @@ struct oid_t isl_oid[] =3D { 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] =3D {0x19000003, 0, + sizeof(struct obj_attachment), OID_TYPE_ATTACH}, OID_STRUCT_C(DOT11_OID_PSMBUFFER, 0x19000004, struct obj_buffer, OID_TYPE_BUFFER), =20 @@ -329,6 +330,12 @@ mgt_le_to_cpu(int type, void *data) mlme->size =3D le16_to_cpu(mlme->size); break; } + case OID_TYPE_ATTACH:{ + struct obj_attachment *attach =3D data; + attach->id =3D le16_to_cpu(attach->id); + attach->size =3D le16_to_cpu(attach->size);;=20 + break; + } case OID_TYPE_SSID: case OID_TYPE_KEY: case OID_TYPE_ADDR: @@ -392,6 +399,12 @@ mgt_cpu_to_le(int type, void *data) mlme->size =3D cpu_to_le16(mlme->size); break; } + case OID_TYPE_ATTACH:{ + struct obj_attachment *attach =3D data; + attach->id =3D cpu_to_le16(attach->id); + attach->size =3D cpu_to_le16(attach->size);;=20 + break; + } case OID_TYPE_SSID: case OID_TYPE_KEY: case OID_TYPE_ADDR: @@ -465,6 +478,42 @@ mgt_set_request(islpci_private *priv, en return ret; } =20 +/* None of these are cached */ +int +mgt_set_varlen(islpci_private *priv, enum oid_num_t n, void *data, int ext= ra_len) +{ + int ret =3D 0; + struct islpci_mgmtframe *response; + int response_op =3D PIMFOR_OP_ERROR; + int dlen; + u32 oid; + + BUG_ON(OID_NUM_LAST <=3D n); + + dlen =3D isl_oid[n].size; + oid =3D isl_oid[n].oid; + + mgt_cpu_to_le(isl_oid[n].flags & OID_FLAG_TYPE, data); + + if (islpci_get_state(priv) >=3D PRV_STATE_READY) { + ret =3D islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, oid, + data, dlen + extra_len, &response); + if (!ret) { + response_op =3D response->header->operation; + islpci_mgt_release(response); + } + if (ret || response_op =3D=3D PIMFOR_OP_ERROR) + ret =3D -EIO; + } else=20 + ret =3D -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 *d= ata, union oid_res_t *res) @@ -673,6 +722,40 @@ mgt_commit(islpci_private *priv) } } =20 +/* 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=20 + * unlatch before though by setting another OID. */ +void +mgt_unlatch_all(islpci_private *priv) +{ + u32 u; + int rvalue =3D 0; + + if (islpci_get_state(priv) < PRV_STATE_INIT) + return; + + u =3D DOT11_OID_SSID; + rvalue =3D mgt_commit_list(priv, &u, 1); + /* Necessary if in MANUAL RUN mode? */ +#if 0 + u =3D OID_INL_MODE; + rvalue |=3D mgt_commit_list(priv, &u, 1); + + u =3D DOT11_OID_MLMEAUTOLEVEL; + rvalue |=3D mgt_commit_list(priv, &u, 1); + + u =3D OID_INL_MODE; + rvalue |=3D 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 .*/ =20 int @@ -773,6 +856,14 @@ mgt_response_to_str(enum oid_num_t n, un mlme->state, mlme->code, mlme->size); } break; + case OID_TYPE_ATTACH:{ + struct obj_attachment *attach =3D r->ptr; + return snprintf(str, PRIV_STR_SIZE, + "id=3D%d\nsize=3D%d\n", + attach->id, + attach->size); + } + break; case OID_TYPE_SSID:{ struct obj_ssid *ssid =3D r->ptr; return snprintf(str, PRIV_STR_SIZE, diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/oid_mgt.h linux-2.6.= 8.1-prism54/drivers/net/wireless/prism54/oid_mgt.h --- linux-2.6.8.1/drivers/net/wireless/prism54/oid_mgt.h 2004-05-29 15:06:4= 9.000000000 +0000 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/oid_mgt.h 2004-08-16= 19:11:14.000000000 +0000 @@ -36,6 +36,8 @@ int channel_of_freq(int); void mgt_le_to_cpu(int, void *); =20 int mgt_set_request(islpci_private *, enum oid_num_t, int, void *); +int mgt_set_varlen(islpci_private *, enum oid_num_t, void *, int); + =20 int mgt_get_request(islpci_private *, enum oid_num_t, int, void *, union oid_res_t *); @@ -47,6 +49,7 @@ void mgt_set(islpci_private *, enum oid_ void mgt_get(islpci_private *, enum oid_num_t, void *); =20 void mgt_commit(islpci_private *); +void mgt_unlatch_all(islpci_private *); =20 int mgt_mlme_answer(islpci_private *); =20 --IJAclU0AInkryoed-- --UK1lfQXsnwKrySH9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBJTJQat1JN+IKUl4RAjpaAJ9dEj4dMHLUug7gfBsUeNH/dg641ACeJaFY s8cwB3/Sla4wKyR4f6DeC6M= =pgGL -----END PGP SIGNATURE----- --UK1lfQXsnwKrySH9-- From mcgrof@studorgs.rutgers.edu Thu Aug 19 16:27:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 16:27:31 -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 i7JNRQ4B018299 for ; Thu, 19 Aug 2004 16:27:27 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 92068F99BF; Thu, 19 Aug 2004 19:27:20 -0400 (EDT) Date: Thu, 19 Aug 2004 19:27:20 -0400 To: Jouni Malinen Cc: hostap , prism54-devel@prism54.org, Jeff Garzik , Netdev Subject: [PATCH] wpa_supplicant: update driver_prism54.c Message-ID: <20040819232720.GD6044@ruslug.rutgers.edu> Mail-Followup-To: Jouni Malinen , hostap , prism54-devel@prism54.org, Jeff Garzik , Netdev Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="j3zO+32zXj6UcJCE" Content-Disposition: inline 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: 7918 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: 954 Lines: 38 --j3zO+32zXj6UcJCE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jouni, the attached patch adds some startup work for wpa_supplicant support for prism54. I just integrated some work for wpa_supplicant support into prism54 CVS and sumbitted to Jeff for inclusion in 2.6 and 2.4. This work is not yet complete but should get the ball rolling for us to complete it. People wishing to help advance this work should check out prism54 CVS and use the attached patch for wpa_supplicant. Thanks, Luis --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --j3zO+32zXj6UcJCE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBJTdYat1JN+IKUl4RAo8zAKCVcsJ3EjQkk6eomTO+uSUdy6NXowCcDooy nZ3olhmg6Kiayep6Fc1pc3c= =CWio -----END PGP SIGNATURE----- --j3zO+32zXj6UcJCE-- From mcgrof@studorgs.rutgers.edu Thu Aug 19 17:10:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 17:11:01 -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 i7K0AtTr019265 for ; Thu, 19 Aug 2004 17:10:55 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id BE989F99BF; Thu, 19 Aug 2004 20:10:48 -0400 (EDT) Date: Thu, 19 Aug 2004 20:10:48 -0400 To: Jouni Malinen , hostap , prism54-devel@prism54.org, Jeff Garzik , Netdev Subject: Re: [PATCH] wpa_supplicant: update driver_prism54.c Message-ID: <20040820001048.GE6044@ruslug.rutgers.edu> Mail-Followup-To: Jouni Malinen , hostap , prism54-devel@prism54.org, Jeff Garzik , Netdev References: <20040819232720.GD6044@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DITGHUV3p5DjDsXt" Content-Disposition: inline In-Reply-To: <20040819232720.GD6044@ruslug.rutgers.edu> 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: 7919 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: 9251 Lines: 340 --DITGHUV3p5DjDsXt Content-Type: multipart/mixed; boundary="7VkxxUl3xUvPtoxk" Content-Disposition: inline --7VkxxUl3xUvPtoxk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Oh yea-- the patch ;) Luis On Thu, Aug 19, 2004 at 07:27:20PM -0400, Luis R. Rodriguez wrote: >=20 > Jouni, >=20 > the attached patch adds some startup work for wpa_supplicant support for > prism54. I just integrated some work for wpa_supplicant support into > prism54 CVS and sumbitted to Jeff for inclusion in 2.6 and 2.4. This > work is not yet complete but should get the ball rolling for us to > complete it. >=20 > People wishing to help advance this work should check out prism54 CVS > and use the attached patch for wpa_supplicant. >=20 > Thanks, >=20 > Luis >=20 > --=20 > GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 5= 25E > _______________________________________________ > HostAP mailing list > HostAP@shmoo.com > http://lists.shmoo.com/mailman/listinfo/hostap --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --7VkxxUl3xUvPtoxk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="prism54-wpa_supplicant.diff" Content-Transfer-Encoding: quoted-printable --- wpa_supplicant/driver_prism54.c.orig Thu Aug 19 19:16:50 2004 +++ wpa_supplicant/driver_prism54.c Thu Aug 19 19:20:47 2004 @@ -1,6 +1,7 @@ /* * WPA Supplicant - driver interaction with Linux Prism54.org driver * Copyright (c) 2003-2004, Jouni Malinen + * Copyright (c) 2004, Luis R. Rodriguez * * 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 @@ -23,25 +24,175 @@ #include "common.h" #include "driver.h" #include "driver_wext.h" +#include "hostap_common.h" #include "wpa_supplicant.h" =20 =20 -static int wpa_driver_prism54_set_wpa(const char *ifname, int enabled) +#define PRISM54_SET_WPA SIOCIWFIRSTPRIV+12 +#define PRISM54_HOSTAPD SIOCIWFIRSTPRIV+25 +#define PRISM54_DROP_UNENCRYPTED SIOCIWFIRSTPRIV+26 + +static int hostapd_ioctl_prism54(const char *, struct prism2_hostapd_param= *, int, int); +static void show_set_key_error(struct prism2_hostapd_param *); + +static int hostapd_ioctl_prism54(const char *dev, + struct prism2_hostapd_param *param, + int len, int show_err) { - /* FIX */ - printf("wpa_driver_prism54_set_wpa - not yet implemented\n"); + int s; + struct iwreq iwr; + + s =3D socket(PF_INET, SOCK_DGRAM, 0); + if (s < 0) { + perror("socket"); + return -1; + } + + memset(&iwr, 0, sizeof(iwr)); + strncpy(iwr.ifr_name, dev, IFNAMSIZ); + iwr.u.data.pointer =3D (caddr_t) param; + iwr.u.data.length =3D len; + + if (ioctl(s, PRISM54_HOSTAPD, &iwr) < 0) { + int ret; + close(s); + ret =3D errno; + if (show_err)=20 + perror("ioctl[PRISM54_HOSTAPD]"); + return ret; + } + close(s); + return 0; } =20 =20 +static int wpa_driver_prism54_set_wpa_ie(const char *ifname, + const char *wpa_ie, + size_t wpa_ie_len) +{ + struct prism2_hostapd_param *param; + int res; + size_t blen =3D PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN + wpa_ie_len; + if (blen < sizeof(*param)) + blen =3D sizeof(*param); + + param =3D (struct prism2_hostapd_param *) malloc(blen); + if (param =3D=3D NULL) + return -1; +=09 + memset(param, 0, blen); + param->cmd =3D PRISM2_HOSTAPD_SET_GENERIC_ELEMENT; + param->u.generic_elem.len =3D wpa_ie_len; + memcpy(param->u.generic_elem.data, wpa_ie, wpa_ie_len); + res =3D hostapd_ioctl_prism54(ifname, param, blen, 1); + + free(param); + + return res; +} + + +/* This is called at wpa_supplicant daemon init time */ +static int wpa_driver_prism54_set_wpa(const char *ifname, int enabled) +{ + struct prism2_hostapd_param *param; + int res; + size_t blen =3D PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN; + if (blen < sizeof(*param)) + blen =3D sizeof(*param); + + param =3D (struct prism2_hostapd_param *) malloc(blen); + if (param =3D=3D NULL) + return -1; + + memset(param, 0, blen); + param->cmd =3D PRISM54_SET_WPA; + param->u.generic_elem.len =3D 0; + res =3D hostapd_ioctl_prism54(ifname, param, blen, 1); + + free(param); + + return res; +} + + static int wpa_driver_prism54_set_key(const char *ifname, wpa_alg alg, unsigned char *addr, int key_idx, int set_tx, u8 *seq, size_t seq_len, u8 *key, size_t key_len) { - /* FIX */ - printf("wpa_driver_prism54_set_key - not yet implemented\n"); - return 0; + struct prism2_hostapd_param *param; + u8 *buf; + size_t blen; + int ret =3D 0; + char *alg_name; + + switch (alg) { + case WPA_ALG_NONE: + alg_name =3D "none"; + return -1; + break; + case WPA_ALG_WEP: + alg_name =3D "WEP"; + return -1; + break; + case WPA_ALG_TKIP: + alg_name =3D "TKIP"; + break; + case WPA_ALG_CCMP: + alg_name =3D "CCMP"; + return -1; + break; + default: + return -1; + } + + wpa_printf(MSG_DEBUG, "%s: alg=3D%s key_idx=3D%d set_tx=3D%d seq_len=3D%d= " + "key_len=3D%d", __FUNCTION__, alg_name, key_idx, set_tx, + seq_len, key_len); + + if (seq_len > 8) + return -2; + + blen =3D sizeof(*param) + key_len; + buf =3D malloc(blen); + if (buf =3D=3D NULL) + return -1; + memset(buf, 0, blen); + + param =3D (struct prism2_hostapd_param *) buf; + param->cmd =3D PRISM2_SET_ENCRYPTION; + /* TODO: In theory, STA in client mode can use five keys; four default + * keys for receiving (with keyidx 0..3) and one individual key for + * both transmitting and receiving (keyidx 0) _unicast_ packets. Now, + * keyidx 0 is reserved for this unicast use and default keys can only + * use keyidx 1..3 (i.e., default key with keyidx 0 is not supported). + * This should be fine for more or less all cases, but for completeness + * sake, the driver could be enhanced to support the missing key. */ +#if 0 + if (addr =3D=3D NULL) + memset(param->sta_addr, 0xff, ETH_ALEN); + else + memcpy(param->sta_addr, addr, ETH_ALEN); +#else + memset(param->sta_addr, 0xff, ETH_ALEN); +#endif + strncpy(param->u.crypt.alg, alg_name, HOSTAP_CRYPT_ALG_NAME_LEN); + param->u.crypt.flags =3D set_tx ? HOSTAP_CRYPT_FLAG_SET_TX_KEY : 0; + param->u.crypt.idx =3D key_idx; + memcpy(param->u.crypt.seq, seq, seq_len); + param->u.crypt.key_len =3D key_len; + memcpy((u8 *) (param + 1), key, key_len); + + if (hostapd_ioctl_prism54(ifname, param, blen, 1)) { + wpa_printf(MSG_WARNING, "Failed to set encryption."); + show_set_key_error(param); + ret =3D -1; + } + free(buf); + + return ret; } =20 =20 @@ -58,10 +209,24 @@ static int wpa_driver_prism54_set_counte static int wpa_driver_prism54_set_drop_unencrypted(const char *ifname, int enabled) { - /* FIX */ - printf("wpa_driver_prism54_set_drop_unencrypted - not yet " - "implemented\n"); - return 0; + struct prism2_hostapd_param *param; + int res; + size_t blen =3D PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN; + if (blen < sizeof(*param)) + blen =3D sizeof(*param); + + param =3D (struct prism2_hostapd_param *) malloc(blen); + if (param =3D=3D NULL) + return -1; + + memset(param, 0, blen); + param->cmd =3D PRISM54_DROP_UNENCRYPTED; + param->u.generic_elem.len =3D 0; + res =3D hostapd_ioctl_prism54(ifname, param, blen, 1); + + free(param); + + return res; } =20 =20 @@ -93,9 +258,8 @@ static int wpa_driver_prism54_associate( { int ret =3D 0; =20 - /* FIX: set wpa_ie */ - printf("wpa_driver_prism54_associate - WPA IE setting not yet " - "implemented\n"); + if (wpa_driver_prism54_set_wpa_ie(ifname, wpa_ie, wpa_ie_len) < 0) + ret =3D -1; if (wpa_driver_wext_set_freq(ifname, freq) < 0) ret =3D -1; if (wpa_driver_wext_set_ssid(ifname, ssid, ssid_len) < 0) @@ -106,6 +270,35 @@ static int wpa_driver_prism54_associate( return ret; } =20 +static void show_set_key_error(struct prism2_hostapd_param *param) +{ + switch (param->u.crypt.err) { + case HOSTAP_CRYPT_ERR_UNKNOWN_ALG: + wpa_printf(MSG_INFO, "Unknown algorithm '%s'.", + param->u.crypt.alg); + wpa_printf(MSG_INFO, "You may need to load kernel module to " + "register that algorithm."); + wpa_printf(MSG_INFO, "E.g., 'modprobe hostap_crypt_wep' for " + "WEP."); + break; + case HOSTAP_CRYPT_ERR_UNKNOWN_ADDR: + wpa_printf(MSG_INFO, "Unknown address " MACSTR ".", + MAC2STR(param->sta_addr)); + break; + case HOSTAP_CRYPT_ERR_CRYPT_INIT_FAILED: + wpa_printf(MSG_INFO, "Crypt algorithm initialization failed."); + break; + case HOSTAP_CRYPT_ERR_KEY_SET_FAILED: + wpa_printf(MSG_INFO, "Key setting failed."); + break; + case HOSTAP_CRYPT_ERR_TX_KEY_SET_FAILED: + wpa_printf(MSG_INFO, "TX key index setting failed."); + break; + case HOSTAP_CRYPT_ERR_CARD_CONF_FAILED: + wpa_printf(MSG_INFO, "Card configuration failed."); + break; + } +} =20 struct wpa_driver_ops wpa_driver_prism54_ops =3D { .get_bssid =3D wpa_driver_wext_get_bssid, --7VkxxUl3xUvPtoxk-- --DITGHUV3p5DjDsXt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBJUGIat1JN+IKUl4RAqO8AJ96UIyzhj6vSBo9BDpKzIBu3MQVdgCgpKH1 uqbkRcQ7emFafLfzSPfKnBY= =HkRm -----END PGP SIGNATURE----- --DITGHUV3p5DjDsXt-- From jm@jm.kir.nu Thu Aug 19 19:48:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 19 Aug 2004 19:48:05 -0700 (PDT) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7K2lxtC022203 for ; Thu, 19 Aug 2004 19:48:00 -0700 Received: from jm by jm.kir.nu with local (Exim 4.34) id 1BxzQT-0001zD-OJ; Thu, 19 Aug 2004 19:46:45 -0700 Date: Thu, 19 Aug 2004 19:46:45 -0700 From: Jouni Malinen To: hostap Cc: prism54-devel@prism54.org, Jeff Garzik , Netdev Subject: Re: [PATCH] wpa_supplicant: update driver_prism54.c Message-ID: <20040820024645.GA7154@jm.kir.nu> Mail-Followup-To: hostap , prism54-devel@prism54.org, Jeff Garzik , Netdev References: <20040819232720.GD6044@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040819232720.GD6044@ruslug.rutgers.edu> User-Agent: Mutt/1.5.6i X-archive-position: 7920 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkmaline@cc.hut.fi Precedence: bulk X-list: netdev Content-Length: 600 Lines: 14 On Thu, Aug 19, 2004 at 07:27:20PM -0400, Luis R. Rodriguez wrote: > the attached patch adds some startup work for wpa_supplicant support for > prism54. I just integrated some work for wpa_supplicant support into > prism54 CVS and sumbitted to Jeff for inclusion in 2.6 and 2.4. This > work is not yet complete but should get the ball rolling for us to > complete it. Thanks, applied to wpa_supplicant CVS. I did not test this yet, but I hope to get some time to test the latest CVS version of the driver at some point. -- Jouni Malinen PGP id EFC895FA From herbert@gondor.apana.org.au Fri Aug 20 01:24:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 01:24: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 i7K8O1Ar003840 for ; Fri, 20 Aug 2004 01:24: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 1By4gS-0003cT-00; Fri, 20 Aug 2004 18:23:36 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1By4gN-0007Ak-00; Fri, 20 Aug 2004 18:23:31 +1000 Date: Fri, 20 Aug 2004 18:23:31 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [IPSEC] Revert pskb change for x->type->output Message-ID: <20040820082331.GA23626@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 7921 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: 14966 Lines: 513 --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: Since skb_checksum_help() has been moved to xfrm[46]_output(), we don't need the sk_buff ** argument in x->type->output anymore. This patch reverts it to a sk_buff *. 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 --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== include/net/xfrm.h 1.68 vs edited ===== --- 1.68/include/net/xfrm.h 2004-08-19 21:44:12 +10:00 +++ edited/include/net/xfrm.h 2004-08-20 18:08:26 +10:00 @@ -216,7 +216,7 @@ void (*destructor)(struct xfrm_state *); int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); - int (*output)(struct sk_buff **pskb); + int (*output)(struct sk_buff *pskb); /* Estimate maximal size of result of transformation of a dgram */ u32 (*get_max_size)(struct xfrm_state *, int size); }; ===== net/ipv4/ah4.c 1.41 vs edited ===== --- 1.41/net/ipv4/ah4.c 2004-08-14 20:59:43 +10:00 +++ edited/net/ipv4/ah4.c 2004-08-20 18:08:27 +10:00 @@ -53,10 +53,10 @@ return 0; } -static int ah_output(struct sk_buff **pskb) +static int ah_output(struct sk_buff *skb) { int err; - struct dst_entry *dst = (*pskb)->dst; + struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; struct iphdr *iph, *top_iph; struct ip_auth_hdr *ah; @@ -66,7 +66,7 @@ char buf[60]; } tmp_iph; - top_iph = (*pskb)->nh.iph; + top_iph = skb->nh.iph; iph = &tmp_iph.iph; iph->tos = top_iph->tos; @@ -85,7 +85,7 @@ ah->nexthdr = top_iph->protocol; top_iph->tos = 0; - top_iph->tot_len = htons((*pskb)->len); + top_iph->tot_len = htons(skb->len); top_iph->frag_off = 0; top_iph->ttl = 0; top_iph->protocol = IPPROTO_AH; @@ -98,7 +98,7 @@ ah->reserved = 0; ah->spi = x->id.spi; ah->seq_no = htonl(++x->replay.oseq); - ahp->icv(ahp, *pskb, ah->auth_data); + ahp->icv(ahp, skb, ah->auth_data); top_iph->tos = iph->tos; top_iph->ttl = iph->ttl; ===== net/ipv4/esp4.c 1.58 vs edited ===== --- 1.58/net/ipv4/esp4.c 2004-08-15 05:57:43 +10:00 +++ edited/net/ipv4/esp4.c 2004-08-20 18:08:27 +10:00 @@ -17,10 +17,10 @@ __u8 proto; }; -int esp_output(struct sk_buff **pskb) +int esp_output(struct sk_buff *skb) { int err; - struct dst_entry *dst = (*pskb)->dst; + struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; struct iphdr *top_iph; struct ip_esp_hdr *esph; @@ -33,13 +33,13 @@ int nfrags; /* Strip IP+ESP header. */ - __skb_pull(*pskb, (*pskb)->h.raw - (*pskb)->data); + __skb_pull(skb, skb->h.raw - skb->data); /* Now skb is pure payload to encrypt */ err = -ENOMEM; /* Round to block size */ - clen = (*pskb)->len; + clen = skb->len; esp = x->data; alen = esp->auth.icv_trunc_len; @@ -49,22 +49,22 @@ if (esp->conf.padlen) clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1); - if ((nfrags = skb_cow_data(*pskb, clen-(*pskb)->len+alen, &trailer)) < 0) + if ((nfrags = skb_cow_data(skb, clen-skb->len+alen, &trailer)) < 0) goto error; /* Fill padding... */ do { int i; - for (i=0; ilen - 2; i++) + for (i=0; ilen - 2; i++) *(u8*)(trailer->tail + i) = i+1; } while (0); - *(u8*)(trailer->tail + clen-(*pskb)->len - 2) = (clen - (*pskb)->len)-2; - pskb_put(*pskb, trailer, clen - (*pskb)->len); + *(u8*)(trailer->tail + clen-skb->len - 2) = (clen - skb->len)-2; + pskb_put(skb, trailer, clen - skb->len); - __skb_push(*pskb, (*pskb)->data - (*pskb)->nh.raw); - top_iph = (*pskb)->nh.iph; - esph = (struct ip_esp_hdr *)((*pskb)->nh.raw + top_iph->ihl*4); - top_iph->tot_len = htons((*pskb)->len + alen); + __skb_push(skb, skb->data - skb->nh.raw); + top_iph = skb->nh.iph; + esph = (struct ip_esp_hdr *)(skb->nh.raw + top_iph->ihl*4); + top_iph->tot_len = htons(skb->len + alen); *(u8*)(trailer->tail - 1) = top_iph->protocol; /* this is non-NULL only with UDP Encapsulation */ @@ -76,7 +76,7 @@ uh = (struct udphdr *)esph; uh->source = encap->encap_sport; uh->dest = encap->encap_dport; - uh->len = htons((*pskb)->len + alen - top_iph->ihl*4); + uh->len = htons(skb->len + alen - top_iph->ihl*4); uh->check = 0; switch (encap->encap_type) { @@ -109,7 +109,7 @@ if (!sg) goto error; } - skb_to_sgvec(*pskb, sg, esph->enc_data+esp->conf.ivlen-(*pskb)->data, clen); + skb_to_sgvec(skb, sg, esph->enc_data+esp->conf.ivlen-skb->data, clen); crypto_cipher_encrypt(tfm, sg, sg, clen); if (unlikely(sg != &esp->sgbuf[0])) kfree(sg); @@ -121,9 +121,9 @@ } if (esp->auth.icv_full_len) { - esp->auth.icv(esp, *pskb, (u8*)esph-(*pskb)->data, + esp->auth.icv(esp, skb, (u8*)esph-skb->data, sizeof(struct ip_esp_hdr) + esp->conf.ivlen+clen, trailer->tail); - pskb_put(*pskb, trailer, alen); + pskb_put(skb, trailer, alen); } ip_send_check(top_iph); ===== net/ipv4/ipcomp.c 1.31 vs edited ===== --- 1.31/net/ipv4/ipcomp.c 2004-08-14 20:59:43 +10:00 +++ edited/net/ipv4/ipcomp.c 2004-08-20 18:08:27 +10:00 @@ -120,20 +120,20 @@ return err; } -static int ipcomp_output(struct sk_buff **pskb) +static int ipcomp_output(struct sk_buff *skb) { int err; - struct dst_entry *dst = (*pskb)->dst; + struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; struct iphdr *iph; struct ip_comp_hdr *ipch; struct ipcomp_data *ipcd = x->data; int hdr_len = 0; - iph = (*pskb)->nh.iph; - iph->tot_len = htons((*pskb)->len); + iph = skb->nh.iph; + iph->tot_len = htons(skb->len); hdr_len = iph->ihl * 4; - if (((*pskb)->len - hdr_len) < ipcd->threshold) { + if ((skb->len - hdr_len) < ipcd->threshold) { /* Don't bother compressing */ if (x->props.mode) { ip_send_check(iph); @@ -141,17 +141,17 @@ goto out_ok; } - if ((skb_is_nonlinear(*pskb) || skb_cloned(*pskb)) && - skb_linearize(*pskb, GFP_ATOMIC) != 0) { + if ((skb_is_nonlinear(skb) || skb_cloned(skb)) && + skb_linearize(skb, GFP_ATOMIC) != 0) { err = -ENOMEM; goto error; } - err = ipcomp_compress(x, *pskb); + err = ipcomp_compress(x, skb); if (err) { if (err == -EMSGSIZE) { if (x->props.mode) { - iph = (*pskb)->nh.iph; + iph = skb->nh.iph; ip_send_check(iph); } goto out_ok; @@ -160,8 +160,8 @@ } /* Install ipcomp header, convert into ipcomp datagram. */ - iph = (*pskb)->nh.iph; - iph->tot_len = htons((*pskb)->len); + iph = skb->nh.iph; + iph->tot_len = htons(skb->len); ipch = (struct ip_comp_hdr *)((char *)iph + iph->ihl * 4); ipch->nexthdr = iph->protocol; ipch->flags = 0; ===== net/ipv4/xfrm4_output.c 1.3 vs edited ===== --- 1.3/net/ipv4/xfrm4_output.c 2004-08-14 20:59:43 +10:00 +++ edited/net/ipv4/xfrm4_output.c 2004-08-20 18:16:45 +10:00 @@ -119,8 +119,7 @@ xfrm4_encap(skb); - err = x->type->output(pskb); - skb = *pskb; + err = x->type->output(skb); if (err) goto error; ===== net/ipv4/xfrm4_tunnel.c 1.19 vs edited ===== --- 1.19/net/ipv4/xfrm4_tunnel.c 2004-08-19 21:44:13 +10:00 +++ edited/net/ipv4/xfrm4_tunnel.c 2004-08-20 18:08:27 +10:00 @@ -9,9 +9,8 @@ #include #include -static int ipip_output(struct sk_buff **pskb) +static int ipip_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct iphdr *iph; iph = skb->nh.iph; ===== net/ipv6/ah6.c 1.41 vs edited ===== --- 1.41/net/ipv6/ah6.c 2004-08-14 20:59:44 +10:00 +++ edited/net/ipv6/ah6.c 2004-08-20 18:08:27 +10:00 @@ -154,11 +154,11 @@ return 0; } -int ah6_output(struct sk_buff **pskb) +int ah6_output(struct sk_buff *skb) { int err; int extlen; - struct dst_entry *dst = (*pskb)->dst; + struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; struct ipv6hdr *top_iph; struct ip_auth_hdr *ah; @@ -170,11 +170,11 @@ char hdrs[0]; } *tmp_ext; - top_iph = (struct ipv6hdr *)(*pskb)->data; - top_iph->payload_len = htons((*pskb)->len - sizeof(*top_iph)); + top_iph = (struct ipv6hdr *)skb->data; + top_iph->payload_len = htons(skb->len - sizeof(*top_iph)); - nexthdr = *(*pskb)->nh.raw; - *(*pskb)->nh.raw = IPPROTO_AH; + nexthdr = *skb->nh.raw; + *skb->nh.raw = IPPROTO_AH; /* When there are no extension headers, we only need to save the first * 8 bytes of the base IP header. @@ -182,7 +182,7 @@ memcpy(tmp_base, top_iph, sizeof(tmp_base)); tmp_ext = NULL; - extlen = (*pskb)->h.raw - (unsigned char *)(top_iph + 1); + extlen = skb->h.raw - (unsigned char *)(top_iph + 1); if (extlen) { extlen += sizeof(*tmp_ext); tmp_ext = kmalloc(extlen, GFP_ATOMIC); @@ -198,7 +198,7 @@ goto error_free_iph; } - ah = (struct ip_auth_hdr *)(*pskb)->h.raw; + ah = (struct ip_auth_hdr *)skb->h.raw; ah->nexthdr = nexthdr; top_iph->priority = 0; @@ -214,7 +214,7 @@ ah->reserved = 0; ah->spi = x->id.spi; ah->seq_no = htonl(++x->replay.oseq); - ahp->icv(ahp, *pskb, ah->auth_data); + ahp->icv(ahp, skb, ah->auth_data); err = 0; ===== net/ipv6/esp6.c 1.40 vs edited ===== --- 1.40/net/ipv6/esp6.c 2004-08-15 17:36:52 +10:00 +++ edited/net/ipv6/esp6.c 2004-08-20 18:08:28 +10:00 @@ -37,11 +37,11 @@ #include #include -int esp6_output(struct sk_buff **pskb) +int esp6_output(struct sk_buff *skb) { int err; int hdr_len; - struct dst_entry *dst = (*pskb)->dst; + struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; struct ipv6hdr *top_iph; struct ipv6_esp_hdr *esph; @@ -54,17 +54,17 @@ int nfrags; esp = x->data; - hdr_len = (*pskb)->h.raw - (*pskb)->data + + hdr_len = skb->h.raw - skb->data + sizeof(*esph) + esp->conf.ivlen; /* Strip IP+ESP header. */ - __skb_pull(*pskb, hdr_len); + __skb_pull(skb, hdr_len); /* Now skb is pure payload to encrypt */ err = -ENOMEM; /* Round to block size */ - clen = (*pskb)->len; + clen = skb->len; alen = esp->auth.icv_trunc_len; tfm = esp->conf.tfm; @@ -73,24 +73,24 @@ if (esp->conf.padlen) clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1); - if ((nfrags = skb_cow_data(*pskb, clen-(*pskb)->len+alen, &trailer)) < 0) { + if ((nfrags = skb_cow_data(skb, clen-skb->len+alen, &trailer)) < 0) { goto error; } /* Fill padding... */ do { int i; - for (i=0; ilen - 2; i++) + for (i=0; ilen - 2; i++) *(u8*)(trailer->tail + i) = i+1; } while (0); - *(u8*)(trailer->tail + clen-(*pskb)->len - 2) = (clen - (*pskb)->len)-2; - pskb_put(*pskb, trailer, clen - (*pskb)->len); + *(u8*)(trailer->tail + clen-skb->len - 2) = (clen - skb->len)-2; + pskb_put(skb, trailer, clen - skb->len); - top_iph = (struct ipv6hdr *)__skb_push(*pskb, hdr_len); - esph = (struct ipv6_esp_hdr *)(*pskb)->h.raw; - top_iph->payload_len = htons((*pskb)->len + alen - sizeof(*top_iph)); - *(u8*)(trailer->tail - 1) = *(*pskb)->nh.raw; - *(*pskb)->nh.raw = IPPROTO_ESP; + top_iph = (struct ipv6hdr *)__skb_push(skb, hdr_len); + esph = (struct ipv6_esp_hdr *)skb->h.raw; + top_iph->payload_len = htons(skb->len + alen - sizeof(*top_iph)); + *(u8*)(trailer->tail - 1) = *skb->nh.raw; + *skb->nh.raw = IPPROTO_ESP; esph->spi = x->id.spi; esph->seq_no = htonl(++x->replay.oseq); @@ -106,7 +106,7 @@ if (!sg) goto error; } - skb_to_sgvec(*pskb, sg, esph->enc_data+esp->conf.ivlen-(*pskb)->data, clen); + skb_to_sgvec(skb, sg, esph->enc_data+esp->conf.ivlen-skb->data, clen); crypto_cipher_encrypt(tfm, sg, sg, clen); if (unlikely(sg != &esp->sgbuf[0])) kfree(sg); @@ -118,9 +118,9 @@ } if (esp->auth.icv_full_len) { - esp->auth.icv(esp, *pskb, (u8*)esph-(*pskb)->data, + esp->auth.icv(esp, skb, (u8*)esph-skb->data, sizeof(struct ipv6_esp_hdr) + esp->conf.ivlen+clen, trailer->tail); - pskb_put(*pskb, trailer, alen); + pskb_put(skb, trailer, alen); } err = 0; ===== net/ipv6/ipcomp6.c 1.22 vs edited ===== --- 1.22/net/ipv6/ipcomp6.c 2004-08-14 20:59:44 +10:00 +++ edited/net/ipv6/ipcomp6.c 2004-08-20 18:08:28 +10:00 @@ -114,10 +114,10 @@ return err; } -static int ipcomp6_output(struct sk_buff **pskb) +static int ipcomp6_output(struct sk_buff *skb) { int err; - struct dst_entry *dst = (*pskb)->dst; + struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; struct ipv6hdr *top_iph; int hdr_len; @@ -126,23 +126,23 @@ int plen, dlen; u8 *start, *scratch = ipcd->scratch; - hdr_len = (*pskb)->h.raw - (*pskb)->data; + hdr_len = skb->h.raw - skb->data; /* check whether datagram len is larger than threshold */ - if (((*pskb)->len - hdr_len) < ipcd->threshold) { + if ((skb->len - hdr_len) < ipcd->threshold) { goto out_ok; } - if ((skb_is_nonlinear(*pskb) || skb_cloned(*pskb)) && - skb_linearize(*pskb, GFP_ATOMIC) != 0) { + if ((skb_is_nonlinear(skb) || skb_cloned(skb)) && + skb_linearize(skb, GFP_ATOMIC) != 0) { err = -ENOMEM; goto error; } /* compression */ - plen = (*pskb)->len - hdr_len; + plen = skb->len - hdr_len; dlen = IPCOMP_SCRATCH_SIZE; - start = (*pskb)->h.raw; + start = skb->h.raw; err = crypto_comp_compress(ipcd->tfm, start, plen, scratch, &dlen); if (err) { @@ -152,18 +152,18 @@ goto out_ok; } memcpy(start + sizeof(struct ip_comp_hdr), scratch, dlen); - pskb_trim(*pskb, hdr_len + dlen + sizeof(struct ip_comp_hdr)); + pskb_trim(skb, hdr_len + dlen + sizeof(struct ip_comp_hdr)); /* insert ipcomp header and replace datagram */ - top_iph = (struct ipv6hdr *)(*pskb)->data; + top_iph = (struct ipv6hdr *)skb->data; - top_iph->payload_len = htons((*pskb)->len - sizeof(struct ipv6hdr)); + top_iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); ipch = (struct ipv6_comp_hdr *)start; - ipch->nexthdr = *(*pskb)->nh.raw; + ipch->nexthdr = *skb->nh.raw; ipch->flags = 0; ipch->cpi = htons((u16 )ntohl(x->id.spi)); - *(*pskb)->nh.raw = IPPROTO_COMP; + *skb->nh.raw = IPPROTO_COMP; out_ok: err = 0; ===== net/ipv6/xfrm6_output.c 1.3 vs edited ===== --- 1.3/net/ipv6/xfrm6_output.c 2004-08-14 20:59:44 +10:00 +++ edited/net/ipv6/xfrm6_output.c 2004-08-20 18:17:01 +10:00 @@ -113,8 +113,7 @@ xfrm6_encap(skb); - err = x->type->output(pskb); - skb = *pskb; + err = x->type->output(skb); if (err) goto error; ===== net/ipv6/xfrm6_tunnel.c 1.9 vs edited ===== --- 1.9/net/ipv6/xfrm6_tunnel.c 2004-08-19 21:44:13 +10:00 +++ edited/net/ipv6/xfrm6_tunnel.c 2004-08-20 18:08:28 +10:00 @@ -343,9 +343,8 @@ EXPORT_SYMBOL(xfrm6_tunnel_free_spi); -static int xfrm6_tunnel_output(struct sk_buff **pskb) +static int xfrm6_tunnel_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct ipv6hdr *top_iph; top_iph = (struct ipv6hdr *)skb->data; --ew6BAiZeqk4r7MaW-- From mtk-lists@gmx.net Fri Aug 20 07:00:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 07:00:52 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7KE0iva017817 for ; Fri, 20 Aug 2004 07:00:45 -0700 Received: (qmail 18960 invoked by uid 0); 20 Aug 2004 14:00:32 -0000 Received: from 62.245.207.82 by www70.gmx.net with HTTP; Fri, 20 Aug 2004 16:00:33 +0200 (MEST) Date: Fri, 20 Aug 2004 16:00:33 +0200 (MEST) From: "Michael T Kerrisk" To: netdev@oss.sgi.com Cc: michael.kerrisk@gmx.net MIME-Version: 1.0 Subject: TCP_CORK 200ms maximum cork time -- expected behaviour? X-Priority: 3 (Normal) X-Authenticated: #18454895 Message-ID: <18686.1093010433@www70.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-archive-position: 7922 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mtk-lists@gmx.net Precedence: bulk X-list: netdev Content-Length: 9696 Lines: 354 Gidday, I tried posting this several weeks back, but got no response. I'll try again, this time with programs (see below) that demonstrate (also see below) what I’m seeing. The TCP_CORK socket option allows us to perform multiple write()s (or send()s or sendfile()s) while delaying the transmission of an outgoing TCP segment until the option is disabled (or a segment MSS is filled or the socket is closed). All is fine and good, but there's one point I'm puzzled about: even when TCP_CORK is set, buffered data will still be transmitted after a 200 millisecond delay (the delay counts from the time that the first corked byte was written), **even if TCP_CORK is still set**. So, I'm wondering: 1. Is this intended behaviour, or simply an outgrowth of the combined implementations of TCP_CORK and TCP_NAGLE_OFF? 2. If it's intended behaviour, what is the rationale for the ceiling time on corking? I first observed this behaviour quite some time back, but I've verified that it is still current (2.4.26 and 2.6.8.1 kernels). (In passing: of course, similar behaviour occurs with MSG_MORE on TCP sockets.) Here's what I see using my two test programs: tcp_cork_receive port This binds to a port, accepts a connection and then reads blocks displaying them along with the time that the read() completed. tcp_cork_send [options] server port num-writes buf-size Connect to server/port, perform specified number ('num-writes') of writes, each containing 'buf-size' bytes. By default, this program enables TCP_CORK on the socket. Various options are provided, but the only one needed for the test is '-d usecs' which specifies a number of microseconds to usleep() between writes. In the following (run on 2.6.8.1), tcp_cork_send is used to write 100 bytes, one at a time, with a 10 millisecond delay between writes: $ ./tcp_cork_receive 9999 & [1] 8868 $ ./tcp_cork_send -d 10000 localhost 9999 100 1 [PID 8868] 1093009988.950: Receiver accepted connecton [PID 8869] 1093009988.951: Enabled TCP_CORK [PID 8869] 1093009988.951: TCP_CORK=1 [PID 8868] 1093009989.152: [received 17 bytes] [PID 8868] 1093009989.359: [received 17 bytes] [PID 8868] 1093009989.563: [received 17 bytes] [PID 8868] 1093009989.767: [received 17 bytes] [PID 8868] 1093009989.971: [received 17 bytes] [PID 8869] 1093009990.154: Completed writes [PID 8868] 1093009990.155: [received 15 bytes] [1]+ Done ./tcp_cork_receive 9999 The "received" messages appear every 200 milliseconds, even though the sender did not disable TCP_CORK. Based on what I’d read/heard about TCP_CORK, I would have expected to see only one "received" after the sender had closed the socket. But, instead, there is clearly a 200 millisecond ceiling on corkage. Cheers, Michael /* tcp_cork_receive.c */ #include #include #include #include #include #include #include #include #include #define errMsg(msg) { perror(msg); } #define errExit(msg) { perror(msg); exit(EXIT_FAILURE); } #define usageErr(msg, progName) \ { fprintf(stderr, "Usage: "); \ fprintf(stderr, msg, progName); \ exit(EXIT_FAILURE); } static void traceInfo(void) { struct timeval tv; if (gettimeofday(&tv, NULL) == -1) errExit("gettimeofday"); printf("[PID %ld] %8.3f: ", (long) getpid(), tv.tv_sec + tv.tv_usec / 1000000.0); } /* traceInfo */ int main(int argc, char *argv[]) { int lfd, sfd; ssize_t numRead; #define BUF_SIZE 100000 char buf[BUF_SIZE]; int optval; struct sockaddr_in svaddr; if (argc != 2 || strcmp(argv[1], "--help") == 0) { fprintf(stderr, "%s port\n", argv[0]); exit(EXIT_FAILURE); } lfd = socket(AF_INET, SOCK_STREAM, 0); if (lfd == -1) errExit("socket"); memset(&svaddr, 0, sizeof(struct sockaddr_in)); svaddr.sin_family = AF_INET; svaddr.sin_port = htons(atoi(argv[1])); svaddr.sin_addr.s_addr = htonl(INADDR_ANY); optval = 1; if (setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) == -1) errExit("setsockopt"); if (bind(lfd, (struct sockaddr *) &svaddr, sizeof(struct sockaddr_in)) == -1) errExit("bind"); if (listen(lfd, 5) == -1) errExit("listen"); sfd = accept(lfd, NULL, NULL); if (sfd == -1) errExit("accept"); traceInfo(); printf("Receiver accepted connecton\n"); for (;;) { numRead = read(sfd, buf, BUF_SIZE); if (numRead == -1) errExit("read"); if (numRead == 0) break; traceInfo(); /* printf("[received %d bytes] %.*s\n", numRead, (int) numRead, buf); */ printf("[received %d bytes]\n", numRead); } close(lfd); close(sfd); exit(EXIT_SUCCESS); } /* main */ /* tcp_cork_send.c */ #define _XOPEN_SOURCE 500 #include #include #include #include #include #include #include #include #include #include "inet_sockets.h" typedef enum { FALSE, TRUE } Boolean; #define errMsg(msg) { perror(msg); } #define errExit(msg) { perror(msg); exit(EXIT_FAILURE); } #define fatalErr(msg) { fprintf(stderr, "%s\n", msg); \ exit(EXIT_FAILURE); } static void traceInfo(void) { struct timeval tv; if (gettimeofday(&tv, NULL) == -1) errExit("gettimeofday"); printf("[PID %ld] %8.3f: ", (long) getpid(), tv.tv_sec + tv.tv_usec / 1000000.0); } /* traceInfo */ static void usageError(char *progName, char *msg) { if (msg != NULL) fprintf(stderr, "%s\n", msg); fprintf(stderr, "%s [options] server port num-write buf-size\n" "\tnum-write Number of writes\n" "\tbuf-size Size of buffer for each write\n" "\tOptions are:\n" "\t\t-d usecs Microsecs delay between each write\n" "\t\t-n Don't enable TCP_CORK before writes\n" "\t\t-s nsecs Sleep for 'nsecs' seconds before closing socket\n" "\t\t-u Disable TCP_CORK immediately after sending\n" "\t\t-v Verbose reporting of (delayed) writes\n" , progName); exit(EXIT_FAILURE); } /* usageError */ int main(int argc, char *argv[]) { int numWrites, j, sfd; useconds_t delayUsecs; size_t bufSize; char *buf; int optval; int opt; int finalSleepSecs; Boolean nocork, uncork, verbose; socklen_t optlen; struct sockaddr_in svaddr; struct hostent *h; struct in_addr **addrpp; nocork = FALSE; uncork = FALSE; verbose = FALSE; finalSleepSecs = 0; delayUsecs = 0; while ((opt = getopt(argc, argv, "d:us:vn")) != -1) { switch (opt) { case 'u': uncork = TRUE; break; case 's': finalSleepSecs = atoi(optarg); break; case 'n': nocork = TRUE; break; case 'v': verbose = TRUE; break; case 'd': delayUsecs = atoi(optarg); break; default: usageError(argv[0], "Bad option"); } /* switch */ } /* while */ if (nocork && uncork) fatalErr("Can't specify both -n and -u options"); if (argc != optind + 4 || strcmp(argv[optind], "--help") == 0) usageError(argv[0], NULL); numWrites = atoi(argv[optind + 2]); bufSize = atoi(argv[optind + 3]); buf = malloc(bufSize); for (j = 0; j < bufSize; j++) buf[j] = 'a' + j % 26; sfd = socket(AF_INET, SOCK_STREAM, 0); if (sfd == -1) errExit("socket"); memset(&svaddr, 0, sizeof(struct sockaddr_in)); svaddr.sin_family = AF_INET; svaddr.sin_port = htons(atoi(argv[optind + 1])); h = gethostbyname(argv[optind]); if (h == NULL) fatalErr("host lookup failed (gethostbyname())"); addrpp = (struct in_addr **) h->h_addr_list; svaddr.sin_addr.s_addr = (*addrpp)->s_addr; if (connect(sfd, (struct sockaddr *) &svaddr, sizeof(struct sockaddr_in)) == -1) errExit("connect"); if (!nocork) { optval = 1; if (setsockopt(sfd, IPPROTO_TCP, TCP_CORK, &optval, sizeof(optval)) == -1) errExit("setsockopt"); traceInfo(); printf("Enabled TCP_CORK\n"); } optlen = sizeof(optval); if (getsockopt(sfd, IPPROTO_TCP, TCP_CORK, &optval, &optlen) == -1) errExit("getsockopt"); traceInfo(); printf("TCP_CORK=%d\n", optval); for (j = 0; j < numWrites; j++) { if (write(sfd, buf, bufSize) != bufSize) errExit("write"); if (delayUsecs > 0) { if (verbose) { traceInfo(); printf("sleep %d\n", j); } usleep(delayUsecs); } } traceInfo(); printf("Completed writes\n"); if (uncork) { traceInfo(); printf("Disabling TCP_CORK\n"); optval = 0; if (setsockopt(sfd, IPPROTO_TCP, TCP_CORK, &optval, sizeof(optval)) == -1) errExit("setsockopt"); } if (finalSleepSecs > 0) { traceInfo(); printf("Sleeping\n"); sleep(finalSleepSecs); } close(sfd); exit(EXIT_SUCCESS); } /* main */ -- Michael Kerrisk mtk-lists@gmx.net Supergünstige DSL-Tarife + WLAN-Router für 0,- EUR* Jetzt zu GMX wechseln und sparen http://www.gmx.net/de/go/dsl From yoshfuji@linux-ipv6.org Fri Aug 20 09:30:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 09:31:03 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KGUve0025630 for ; Fri, 20 Aug 2004 09:30:58 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 90E7733CE6; Sat, 21 Aug 2004 01:31:32 +0900 (JST) Date: Sat, 21 Aug 2004 01:31:25 +0900 (JST) Message-Id: <20040821.013125.74566317.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] [IPV6] use offsetof(). 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: 7923 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: 2043 Lines: 75 Hello. D: use offsetof(). Signed-off-by: Hideaki YOSHIFUJI ===== net/ipv6/ip6_fib.c 1.26 vs edited ===== --- 1.26/net/ipv6/ip6_fib.c 2004-07-30 07:30:01 +09:00 +++ edited/net/ipv6/ip6_fib.c 2004-08-21 01:19:44 +09:00 @@ -514,7 +514,7 @@ int err = -ENOMEM; fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr), - rt->rt6i_dst.plen, (u8*) &rt->rt6i_dst - (u8*) rt); + rt->rt6i_dst.plen, offsetof(struct rt6_info, rt6i_dst)); if (fn == NULL) goto out; @@ -550,7 +550,7 @@ sn = fib6_add_1(sfn, &rt->rt6i_src.addr, sizeof(struct in6_addr), rt->rt6i_src.plen, - (u8*) &rt->rt6i_src - (u8*) rt); + offsetof(struct rt6_info, rt6i_src)); if (sn == NULL) { /* If it is failed, discard just allocated @@ -571,7 +571,7 @@ } else { sn = fib6_add_1(fn->subtree, &rt->rt6i_src.addr, sizeof(struct in6_addr), rt->rt6i_src.plen, - (u8*) &rt->rt6i_src - (u8*) rt); + offsetof(struct rt6_info, rt6i_src)); if (sn == NULL) goto st_failure; @@ -680,14 +680,13 @@ struct in6_addr *saddr) { struct lookup_args args[2]; - struct rt6_info *rt = NULL; struct fib6_node *fn; - args[0].offset = (u8*) &rt->rt6i_dst - (u8*) rt; + args[0].offset = offsetof(struct rt6_info, rt6i_dst); args[0].addr = daddr; #ifdef CONFIG_IPV6_SUBTREES - args[1].offset = (u8*) &rt->rt6i_src - (u8*) rt; + args[1].offset = offsetof(struct rt6_info, rt6i_src); args[1].addr = saddr; #endif @@ -739,11 +738,10 @@ struct in6_addr *daddr, int dst_len, struct in6_addr *saddr, int src_len) { - struct rt6_info *rt = NULL; struct fib6_node *fn; fn = fib6_locate_1(root, daddr, dst_len, - (u8*) &rt->rt6i_dst - (u8*) rt); + offsetof(struct rt6_info, rt6i_dst)); #ifdef CONFIG_IPV6_SUBTREES if (src_len) { @@ -752,7 +750,7 @@ fn = fn->subtree; if (fn) fn = fib6_locate_1(fn, saddr, src_len, - (u8*) &rt->rt6i_src - (u8*) rt); + offsetof(struct rt6_info, rt6i_src)); } #endif From yoshfuji@linux-ipv6.org Fri Aug 20 09:34:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 09:34:08 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KGY36V025973 for ; Fri, 20 Aug 2004 09:34:03 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 4811C33CE6; Sat, 21 Aug 2004 01:34:40 +0900 (JST) Date: Sat, 21 Aug 2004 01:34:34 +0900 (JST) Message-Id: <20040821.013434.102361441.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] [IPV6] reability improvement 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: 7924 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: 737 Lines: 23 Hello. D: Improve readability. Signed-off-by: Hideaki YOSHIFUJI ===== net/ipv6/ip6_flowlabel.c 1.15 vs edited ===== --- 1.15/net/ipv6/ip6_flowlabel.c 2004-07-08 07:49:52 +09:00 +++ edited/net/ipv6/ip6_flowlabel.c 2004-08-21 01:18:30 +09:00 @@ -538,7 +538,8 @@ /* Do not check for fault */ if (!freq.flr_label) - copy_to_user(optval + ((u8*)&freq.flr_label - (u8*)&freq), &fl->label, sizeof(fl->label)); + copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label, + &fl->label, sizeof(fl->label)); sfl1->fl = fl; sfl1->next = np->ipv6_fl_list; -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From zhikui.chen@rus.uni-stuttgart.de Fri Aug 20 10:19:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 10:19:15 -0700 (PDT) Received: from uni-stuttgart.de (mbox.rus.uni-stuttgart.de [129.69.1.9]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KHJ8cd028252; Fri, 20 Aug 2004 10:19:09 -0700 Received: from [129.69.30.152] (HELO rus.uni-stuttgart.de) by uni-stuttgart.de (CommuniGate Pro SMTP 4.0.3) with ESMTP id 8560537; Fri, 20 Aug 2004 19:19:01 +0200 Message-ID: <41263245.8050305@rus.uni-stuttgart.de> Date: Fri, 20 Aug 2004 19:17:57 +0200 From: Zhikui Chen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com, majordomo@oss.sgi.com Subject: An issue on one network development. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7925 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: zhikui.chen@rus.uni-stuttgart.de Precedence: bulk X-list: netdev Content-Length: 1605 Lines: 50 Dear all, HELP! I am writing a DCCP code in Linux kernel 2.6.6, I met a problem, which bored me about two weeks. Hope you to give me some hints, thanks in advance. The problem is on structure sock in dccp_lookup_listen of dccp_lookup. When dccp_rcv (similar to udp_rcv and TCP_*_rcv) called dccp_v4_lookup( similar to TCP_v4_lookup), the dccp_v4_lookup will call dccp_v4_lookup_listen. Running is dead when the 7th line is implemented, I checked, problem is from sk=__sk_head(head). And I also checked the printed value of __sk_head(head) is correct. The other way, I changed the first line as struct sock *sk; (remove "=NULL"), running is dead here. I doubt the problem belongs to memory. My dccp_v4_lookup is so that: static inline struct sock *dccp_v4_lookup_listen(u32 daddr, u16 dport,int dif) { struct sock *sk = NULL; struct hlist_head *head; read_lock(&dccp_lhash_lock); head = &dccp_hash[ntohs(dport) & (DCCP_HTABLE_SIZE - 1)]; if (!hlist_empty(head)) { struct inet_opt *inet = inet_sk(sk = __sk_head(head)); if (inet->num == ntohs(dport) && !(sk->sk_node.next && (!inet->rcv_saddr || inet->rcv_saddr == daddr) && (sk->sk_family == PF_INET || !ipv6_only_sock(sk)) && !sk->sk_bound_dev_if) goto sherry_cache; printk("dccp_v4_lookup_listen: sk:%x\n",(__sk_head(head))); //sk = __dccp_v4_lookup_listen(head, daddr, ntohs(dport), dif); } if (sk) { sherry_cache: sock_hold(sk); } read_unlock(&dccp_lhash_lock); return (sk); } Best regards, Zhikui Chen In stuttgart university. From jlcooke@certainkey.com Fri Aug 20 11:07:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 11:07:44 -0700 (PDT) Received: from certainkey.com (104.engsoc.carleton.ca [134.117.69.104] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KI7Y8Z000300 for ; Fri, 20 Aug 2004 11:07:35 -0700 Received: from jlcooke by certainkey.com with local (Exim 3.36 #1 (Debian)) id 1ByDg8-00071y-00; Fri, 20 Aug 2004 13:59:52 -0400 Date: Fri, 20 Aug 2004 13:59:52 -0400 From: Jean-Luc Cooke To: Stephen Hemminger Cc: "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-ID: <20040820175952.GI5806@certainkey.com> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7926 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jlcooke@certainkey.com Precedence: bulk X-list: netdev Content-Length: 3998 Lines: 124 Is there a reason why get_random_bytes() is unsuitable? Keeping the number of PRNGs in the kernel to a minimum should a goal we can all share. JLC On Thu, Aug 12, 2004 at 10:48:35AM -0700, Stephen Hemminger wrote: > While doing the network emulator, I discovered that the default net_random() > is too stupid, and get_random_bytes() is more than needed. Rather than put > another function in just for sch_netem, how about making net_random() smarter? > The tin-hat crowd already replace net_random() with get_random_bytes anyway. > > Here is a proposed alternative to use a longer period PRNG for net_random(). > The choice of TT800 was because it was freely available, had a long period, > was fast and relatively small footprint. The existing net_random() was not > really thread safe, but was immune to thread corruption. > > Signed-off-by: Stephen Hemminger > > diff -Nru a/net/core/utils.c b/net/core/utils.c > --- a/net/core/utils.c 2004-08-12 10:40:05 -07:00 > +++ b/net/core/utils.c 2004-08-12 10:40:05 -07:00 > @@ -2,6 +2,7 @@ > * Generic address resultion entity > * > * Authors: > + * net_random update to TT800 Stephen Hemminger > * net_random Alan Cox > * net_ratelimit Andy Kleen > * > @@ -23,6 +24,7 @@ > #include > #include > > +#ifdef CONFIG_EMBEDDED > static unsigned long net_rand_seed = 152L; > > unsigned long net_random(void) > @@ -34,8 +36,79 @@ > void net_srandom(unsigned long entropy) > { > net_rand_seed ^= entropy; > + net_random(); > +} > +#else > +/* > + * This is the TT800 twisted Global Finite Shift Register random number > + * generator originally by M. Matsumoto, email: matumoto@math.keio.ac.jp. > + * July 8th 1996 Version > + * > + * See: ACM Transactions on Modelling and Computer Simulation, > + * Vol. 4, No. 3, 1994, pages 254-266. > + * > + * It has a large period 2^800 and good distribution properties > + * up to dimension 25, and passes statistical tests. > + * > + * Don't use for cryptographic purposes, see get_random_bytes instead. > + */ > +#define N 25 > +#define M 7 > + > +static unsigned long net_rand_seed[N] = { > + 0x95f24dab, 0x0b685215, 0xe76ccae7, 0xaf3ec239, 0x715fad23, > + 0x24a590ad, 0x69e4b5ef, 0xbf456141, 0x96bc1b7b, 0xa7bdf825, > + 0xc1de75b7, 0x8858a9c9, 0x2da87693, 0xb657f9dd, 0xffdc8a9f, > + 0x8121da71, 0x8b823ecb, 0x885d05f5, 0x4e20cd47, 0x5a9ad5d9, > + 0x512c0c03, 0xea857ccd, 0x4cc1d30f, 0x8891a8a1, 0xa6b7aadb > +}; > + > +static spinlock_t net_random_lock = SPIN_LOCK_UNLOCKED; > + > +unsigned long net_random(void) > +{ > + unsigned long y; > + unsigned long flags; > + static int k; > + static const unsigned long mag01[2]={ 0x0, 0x8ebfd028 }; > +#define X net_rand_seed > + > + /* generate N words at one time */ > + spin_lock_irqsave(&net_random_lock, flags); > + if (k == N) { > + int kk; > + for (kk=0; kk< N - M; kk++) { > + X[kk] = X[kk+M] ^ (X[kk] >> 1) ^ mag01[X[kk] % 2]; > + } > + > + for (; kk < N; kk++) { > + X[kk] = X[kk+(M-N)] ^ (X[kk] >> 1) ^ mag01[X[kk] % 2]; > + } > + k = 0; > + } > + > + y = X[k]; > + y ^= (y << 7) & 0x2b5b2500; /* s and b, magic vectors */ > + y ^= (y << 15) & 0xdb8b0000; /* t and c, magic vectors */ > + > + /* > + * the following line was added by Makoto Matsumoto in the 1996 version > + * to improve lower bit's corellation. > + * Delete this line to o use the code published in 1994. > + */ > + y ^= (y >> 16); /* added to the 1994 version */ > + k++; > + spin_unlock_irqrestore(&net_random_lock, flags); > +#undef X > + return y; > +} > + > +void net_srandom(unsigned long entropy) > +{ > + net_rand_seed[0] ^= entropy; > net_random(); > } > +#endif > > int net_msg_cost = 5*HZ; > int net_msg_burst = 10; > - > 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@redhat.com Fri Aug 20 11:48:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 11:48: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 i7KImOBn001288 for ; Fri, 20 Aug 2004 11:48:24 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7KIlBe1029622; Fri, 20 Aug 2004 14:47:11 -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 i7KIlBa14331; Fri, 20 Aug 2004 14:47:11 -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 i7KIl9kJ027782; Fri, 20 Aug 2004 14:47:10 -0400 Date: Fri, 20 Aug 2004 11:47:10 -0700 From: "David S. Miller" To: Jean-Luc Cooke Cc: shemminger@osdl.org, alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040820114710.39023b20.davem@redhat.com> In-Reply-To: <20040820175952.GI5806@certainkey.com> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.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: 7927 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: 319 Lines: 10 On Fri, 20 Aug 2004 13:59:52 -0400 Jean-Luc Cooke wrote: > Is there a reason why get_random_bytes() is unsuitable? > > Keeping the number of PRNGs in the kernel to a minimum should a goal we can > all share. Too expensive, this routine will get called potentially multiple times per packet. From adilger@clusterfs.com Fri Aug 20 12:00:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 12:00:18 -0700 (PDT) Received: from moraine.clusterfs.com (moraine.clusterfs.com [66.246.132.190]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KJ0ARC001868 for ; Fri, 20 Aug 2004 12:00:11 -0700 Received: from schnapps.adilger.int (localhost.localdomain [127.0.0.1]) by moraine.clusterfs.com (Postfix) with ESMTP id 6399331009E; Fri, 20 Aug 2004 14:59:58 -0400 (EDT) Received: by schnapps.adilger.int (Postfix, from userid 1000) id B8A14180DC; Fri, 20 Aug 2004 12:59:56 -0600 (MDT) Date: Fri, 20 Aug 2004 12:59:56 -0600 From: Andreas Dilger To: Jean-Luc Cooke Cc: Stephen Hemminger , "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-ID: <20040820185956.GV8967@schnapps.adilger.int> Mail-Followup-To: Jean-Luc Cooke , Stephen Hemminger , "David S. Miller" , Alan Cox , Theodore Ts'o , netdev@oss.sgi.com, linux-kernel@vger.kernel.org References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="o0y1lerN6xYE2ROn" Content-Disposition: inline In-Reply-To: <20040820175952.GI5806@certainkey.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/0D35BED6 X-GPG-Fingerprint: 7A37 5D79 BF1B CECA D44F 8A29 A488 39F5 0D35 BED6 X-archive-position: 7928 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: adilger@clusterfs.com Precedence: bulk X-list: netdev Content-Length: 1235 Lines: 42 --o0y1lerN6xYE2ROn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 20, 2004 13:59 -0400, Jean-Luc Cooke wrote: > Is there a reason why get_random_bytes() is unsuitable? >=20 > Keeping the number of PRNGs in the kernel to a minimum should a goal we c= an > all share. For some uses a decent PRNG is enough, and the overhead of get_random_bytes= () is much too high. We've needed something like this for a long time (someth= ing that gives decenly uniform numbers) and hacks to use useconds/cycles/etc do not cut it. I for one welcome a simple in-kernel interface to e.g. get_urandom_bytes() (or net_random() as this is maybe inappropriately called) that is only pseudo-random but fast and efficient. Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/ --o0y1lerN6xYE2ROn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFBJkospIg59Q01vtYRAl5VAKCVp4g4/om0QnxQyojGH+LNyAp7kgCfVgWa f2ociyLHiIpWvcmGR1Lnb7Y= =xfaR -----END PGP SIGNATURE----- --o0y1lerN6xYE2ROn-- From root@chaos.analogic.com Fri Aug 20 12:23:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 12:23:12 -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 i7KJN4IG005916 for ; Fri, 20 Aug 2004 12:23:05 -0700 Received: (from root@localhost) by chaos.analogic.com (8.11.0.Beta3(chaos.analogic.com)/8.12.0.A) id i7KJM9p25349; Fri, 20 Aug 2004 15:22:09 -0400 Date: Fri, 20 Aug 2004 15:22:09 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: Andreas Dilger cc: Jean-Luc Cooke , Stephen Hemminger , "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, Linux kernel Subject: Re: [RFC] enhanced version of net_random() In-Reply-To: <20040820185956.GV8967@schnapps.adilger.int> Message-ID: References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1678434306-395776424-1093029729=:25319" X-archive-position: 7929 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: 3865 Lines: 83 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. --1678434306-395776424-1093029729=:25319 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 20 Aug 2004, Andreas Dilger wrote: > On Aug 20, 2004 13:59 -0400, Jean-Luc Cooke wrote: > > Is there a reason why get_random_bytes() is unsuitable? > > > > Keeping the number of PRNGs in the kernel to a minimum should a goal we can > > all share. > > For some uses a decent PRNG is enough, and the overhead of get_random_bytes() > is much too high. We've needed something like this for a long time (something > that gives decenly uniform numbers) and hacks to use useconds/cycles/etc do > not cut it. I for one welcome a simple in-kernel interface to > e.g. get_urandom_bytes() (or net_random() as this is maybe inappropriately > called) that is only pseudo-random but fast and efficient. > > Cheers, Andreas > -- > Andreas Dilger The attached code will certainly work on Intel machines. It is in the public domain, having been modified by myself to produce a very long sequence... I wouldn't suggest converting it to 'C' because the rotation takes many CPU instructions when one tries to do the test, shift, and OR in 'C', Cheers, Dick Johnson Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips). Note 96.31% of all statistics are fiction. --1678434306-395776424-1093029729=:25319 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="rnd.S" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="rnd.S" DQojLT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09 LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tDQojDQojICAgRmls ZSBybmQuUyAgICAgICAgICAgIENyZWF0ZWQgMDQtRkVCLTE5OTkgICAgICAg IFJpY2hhcmQgQi4gSm9obnNvbg0KIw0KIyAgIFNpbXBsZSByYW5kb20gbnVt YmVyIGdlbmVyYXRvci4gQmFzZWQgdXBvbiBBbGFuIFIuIE1pbGxlcidzDQoj ICAgYWxnb3JpdGhtLiBQcm9mZXNzb3Igb2YgTWV0YWxsdXJneSwgVW5pdmVy c2l0eSBvZiBOZXcgTWV4aWNvDQojICAgSW5zdGl0dXRlIG9mIE1pbmluZyBh bmQgVGVjaG5vbG9neSwgY2lyY2EgMTk4MC4gUHVibGlzaGVkDQojICAgSW4g dGhlIDgwODAvWi04MCBBc3NlbWJseSBMYW5ndWFnZSBtYW51YWwgaGUgd3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CXhvcmwJ JWVkeCwgJWVkeA0KCWRpdmwJRElWSVNSKCVlc3ApDQoJbW92bAklZWR4LCAl ZWF4DQoJcG9wbAklZWJ4DQogICAgICAgIHJldA0KLmVuZA0KIy09LT0tPS09 LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0t PS09LT0tPS09LT0tPS09LT0tPS09LQ0KIy09LT0tPS09LT0tPS09LT0tPS09 LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0t PS09LT0tPS09LQ0KIy09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09 LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LQ0K --1678434306-395776424-1093029729=:25319-- From davem@redhat.com Fri Aug 20 12:48:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 12:49: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 i7KJmuXj006609 for ; Fri, 20 Aug 2004 12:48:56 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7KJmPe1014938; Fri, 20 Aug 2004 15:48:25 -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 i7KJmPa04230; Fri, 20 Aug 2004 15:48:25 -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 i7KJmNcw028994; Fri, 20 Aug 2004 15:48:24 -0400 Date: Fri, 20 Aug 2004 12:48:23 -0700 From: "David S. Miller" To: root@chaos.analogic.com Cc: adilger@clusterfs.com, jlcooke@certainkey.com, shemminger@osdl.org, alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040820124823.071ac1d9.davem@redhat.com> In-Reply-To: References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> 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: 7930 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: 578 Lines: 16 On Fri, 20 Aug 2004 15:22:09 -0400 (EDT) "Richard B. Johnson" wrote: > The attached code will certainly work on Intel machines. It is > in the public domain, having been modified by myself to produce > a very long sequence... How long a period does it have? The one we're adding to the networking has one which is 2^88. > I wouldn't suggest converting it to 'C' because the rotation > takes many CPU instructions when one tries to do the test, shift, > and OR in 'C', You only need 2 'shifts' and an 'or' to do a rotate in C. No tests are needed. From jlcooke@certainkey.com Fri Aug 20 13:00:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 13:01:00 -0700 (PDT) Received: from certainkey.com (104.engsoc.carleton.ca [134.117.69.104] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KK0sfq007413 for ; Fri, 20 Aug 2004 13:00:55 -0700 Received: from jlcooke by certainkey.com with local (Exim 3.36 #1 (Debian)) id 1ByFRe-0007JA-00; Fri, 20 Aug 2004 15:53:02 -0400 Date: Fri, 20 Aug 2004 15:53:02 -0400 From: Jean-Luc Cooke To: "David S. Miller" Cc: root@chaos.analogic.com, adilger@clusterfs.com, shemminger@osdl.org, alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-ID: <20040820195302.GK5806@certainkey.com> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> <20040820124823.071ac1d9.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040820124823.071ac1d9.davem@redhat.com> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 7931 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jlcooke@certainkey.com Precedence: bulk X-list: netdev Content-Length: 910 Lines: 27 If speed is what you want, and you want a period > 2^N. Then a single get_rand_bytes() to fill a seed of a simple LFSR might do. Seed value will be N+1 bits long. Rochard's PRNG does not have a period > 2^32, that's for sure. JLC On Fri, Aug 20, 2004 at 12:48:23PM -0700, David S. Miller wrote: > On Fri, 20 Aug 2004 15:22:09 -0400 (EDT) > "Richard B. Johnson" wrote: > > > The attached code will certainly work on Intel machines. It is > > in the public domain, having been modified by myself to produce > > a very long sequence... > > How long a period does it have? The one we're adding to the > networking has one which is 2^88. > > > I wouldn't suggest converting it to 'C' because the rotation > > takes many CPU instructions when one tries to do the test, shift, > > and OR in 'C', > > You only need 2 'shifts' and an 'or' to do a rotate in C. > No tests are needed. From sandr8@crocetta.org Fri Aug 20 13:29:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 13:29:22 -0700 (PDT) Received: from vsmtp2.tin.it (smtp.virgilio.it [212.216.176.142] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7KKTCG1008334 for ; Fri, 20 Aug 2004 13:29:14 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp2.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8CBC000D7C50; Fri, 20 Aug 2004 22:28:38 +0200 Message-ID: <41265EF2.3000703@crocetta.org> Date: Fri, 20 Aug 2004 22:28:34 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Morton CC: Con Kolivas , linux-kernel@vger.kernel.org, kernel@gentoo.org, lartc@mailman.ds9a.nl, netdev@oss.sgi.com Subject: Re: [PATCH] bio_uncopy_user mem leak References: <1092909598.8364.5.camel@localhost> <412489E5.7000806@kolivas.org> <1092923494.12138.1667.camel@watt.suse.com> <20040819195521.GC12363@tpkurt.garloff.de> <41256DC9.7070500@kolivas.org> <20040819233155.68c1411e.akpm@osdl.org> In-Reply-To: <20040819233155.68c1411e.akpm@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7932 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8@crocetta.org Precedence: bulk X-list: netdev Content-Length: 799 Lines: 19 Andrew Morton wrote: >Con Kolivas wrote: > >Uh, I guess that depends on how rested Linus feels when he returns. I >think there's a fairly significant networking fix too. As I said: we'll see > is that the one related to the qdisc private data alignment? if not, that one would be a urgent one too imho... i got many oops from the ext3 commit and this because all of the schedulers in the 2.6.8 and 2.6.8.1 traffic control suite are accessing data at slightly wrong positions. this because if any discipline different from pfifo fast is used, the kmalloc()ed memory is aligned in the old way, but then it is used in the new one. the results could be catastrophic whenever the accessed data is a pointer and the memory referenced is written to. :-\ Alessandro Salvatori From davem@redhat.com Fri Aug 20 14:09:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 14:09: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 i7KL9bc3009685 for ; Fri, 20 Aug 2004 14:09:37 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7KL9Ne1003456; Fri, 20 Aug 2004 17:09:23 -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 i7KL9Na31915; Fri, 20 Aug 2004 17:09:23 -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 i7KL9LL4030918; Fri, 20 Aug 2004 17:09:22 -0400 Date: Fri, 20 Aug 2004 14:09:20 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [IPSEC] Revert pskb change for x->type->output Message-Id: <20040820140920.48834389.davem@redhat.com> In-Reply-To: <20040820082331.GA23626@gondor.apana.org.au> References: <20040820082331.GA23626@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: 7933 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: 282 Lines: 8 On Fri, 20 Aug 2004 18:23:31 +1000 Herbert Xu wrote: > Since skb_checksum_help() has been moved to xfrm[46]_output(), we don't > need the sk_buff ** argument in x->type->output anymore. This patch > reverts it to a sk_buff *. Works for me, applied. From davem@redhat.com Fri Aug 20 14:10:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 14:10: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 i7KLAXUm009957 for ; Fri, 20 Aug 2004 14:10:33 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7KLAPe1003750; Fri, 20 Aug 2004 17:10:25 -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 i7KLAOa32315; Fri, 20 Aug 2004 17:10:24 -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 i7KLANJd031307; Fri, 20 Aug 2004 17:10:24 -0400 Date: Fri, 20 Aug 2004 14:10:22 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH] [IPV6] use offsetof(). Message-Id: <20040820141022.6624f413.davem@redhat.com> In-Reply-To: <20040821.013125.74566317.yoshfuji@linux-ipv6.org> References: <20040821.013125.74566317.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 i7KLAXUm009957 X-archive-position: 7934 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: 153 Lines: 7 On Sat, 21 Aug 2004 01:31:25 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > D: use offsetof(). Applied, thank you. From davem@redhat.com Fri Aug 20 14:11:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 14:11:32 -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 i7KLBRee010372 for ; Fri, 20 Aug 2004 14: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.10/8.12.10) with ESMTP id i7KLBJe1004061; Fri, 20 Aug 2004 17:11:19 -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 i7KLBJa32712; Fri, 20 Aug 2004 17:11:19 -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 i7KLBIbb031784; Fri, 20 Aug 2004 17:11:18 -0400 Date: Fri, 20 Aug 2004 14:11:16 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH] [IPV6] reability improvement Message-Id: <20040820141116.6e0eab05.davem@redhat.com> In-Reply-To: <20040821.013434.102361441.yoshfuji@linux-ipv6.org> References: <20040821.013434.102361441.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 i7KLBRee010372 X-archive-position: 7935 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: 147 Lines: 7 On Sat, 21 Aug 2004 01:34:34 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > D: Improve readability. Applied. From rlrevell@joe-job.com Fri Aug 20 14:24:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 14:24: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 i7KLOKQg011009 for ; Fri, 20 Aug 2004 14:24:21 -0700 Received: (qmail 27062 invoked from network); 20 Aug 2004 21:24:13 -0000 Received: from unknown (HELO ?192.168.2.102?) (207.245.115.154) by mustang with SMTP; 20 Aug 2004 21:24:13 -0000 Subject: Re: [RFC] enhanced version of net_random() From: Lee Revell To: Andreas Dilger Cc: Jean-Luc Cooke , Stephen Hemminger , "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, linux-kernel In-Reply-To: <20040820185956.GV8967@schnapps.adilger.int> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> Content-Type: text/plain Message-Id: <1093037055.10063.192.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 20 Aug 2004 17:24:15 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7936 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: 975 Lines: 24 On Fri, 2004-08-20 at 14:59, Andreas Dilger wrote: > On Aug 20, 2004 13:59 -0400, Jean-Luc Cooke wrote: > > Is there a reason why get_random_bytes() is unsuitable? > > > > Keeping the number of PRNGs in the kernel to a minimum should a goal we can > > all share. > > For some uses a decent PRNG is enough, and the overhead of get_random_bytes() > is much too high. Agreed. I have numbers to support the above. > We've needed something like this for a long time (something > that gives decenly uniform numbers) and hacks to use useconds/cycles/etc do > not cut it. I for one welcome a simple in-kernel interface to > e.g. get_urandom_bytes() (or net_random() as this is maybe inappropriately > called) that is only pseudo-random but fast and efficient. One problem is that AIUI, we incur this overhead even if a hardware RNG is present. This does not seem right. Hardware RNGs are increasingly common, Linux supports hardware RNGs from AMD, Intel, and VIA. Lee From davem@redhat.com Fri Aug 20 14:55:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 14:55:17 -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 i7KLt4ob012276 for ; Fri, 20 Aug 2004 14:55:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7KLswe1013966 for ; Fri, 20 Aug 2004 17:54:58 -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 i7KLswa13392 for ; Fri, 20 Aug 2004 17:54:58 -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 i7KLsuj3014087 for ; Fri, 20 Aug 2004 17:54:57 -0400 Date: Fri, 20 Aug 2004 14:54:54 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Subject: Todays net-2.6 update Message-Id: <20040820145454.36484216.davem@redhat.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: multipart/mixed; boundary="Multipart=_Fri__20_Aug_2004_14_54_54_-0700_SQ5qVP4sJKd_/hzR" X-archive-position: 7937 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: 758 Lines: 30 This is a multi-part message in MIME format. --Multipart=_Fri__20_Aug_2004_14_54_54_-0700_SQ5qVP4sJKd_/hzR Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit At the usual spots: bk://kernel.bkbits.net/davem/net-2.6 ftp.kernel.org:/pub/linux/kernel/people/davem/net-2.6.9-4.gz And relative diff attached. This one is a little large. Main things: 1) inetdev RCU locking 2) Kill IP_ROUTE_NAT code. It's been broken from mid-2.5.x and if someone is interested in making it work again they can easily resurrect the code. 3) Enhanced net_random() from Stephen Hemminger. 4) Several routing and device handling fixes in ipv6 from Yoshifuji-san. Enjoy. --Multipart=_Fri__20_Aug_2004_14_54_54_-0700_SQ5qVP4sJKd_/hzR-- From acme@conectiva.com.br Fri Aug 20 16:31:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 16:31:45 -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 i7KNVdZH017863 for ; Fri, 20 Aug 2004 16:31:41 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id CB50E47841; Fri, 20 Aug 2004 20:31:28 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 911E9474D7 for ; Fri, 20 Aug 2004 20:31:28 -0300 (BRT) Received: (qmail 16701 invoked by uid 0); 21 Aug 2004 00:29:10 -0000 Received: from mapi8.distro.conectiva (HELO oops.kerneljanitors.org) (10.0.16.10) by burns.conectiva with SMTP; 21 Aug 2004 00:29:10 -0000 Received: by oops.kerneljanitors.org (Postfix, from userid 500) id 2CDF42C02E; Fri, 20 Aug 2004 20:32:52 -0300 (BRT) Date: Fri, 20 Aug 2004 20:32:52 -0300 From: Arnaldo Carvalho de Melo To: Zhikui Chen Cc: netdev@oss.sgi.com Subject: Re: An issue on one network development. Message-ID: <20040820233251.GH24215@conectiva.com.br> References: <41263245.8050305@rus.uni-stuttgart.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41263245.8050305@rus.uni-stuttgart.de> X-Url: http://advogato.org/person/acme User-Agent: Mutt/1.5.5.1i X-Bogosity: No, tests=bogofilter, spamicity=0.089029, version=0.16.3 X-archive-position: 7938 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: 556 Lines: 17 Em Fri, Aug 20, 2004 at 07:17:57PM +0200, Zhikui Chen escreveu: > Dear all, > > HELP! > > I am writing a DCCP code in Linux kernel 2.6.6, I met a problem, which > bored me about two weeks. Hope you to give me some hints, thanks in > advance. The problem is on structure sock in dccp_lookup_listen of > dccp_lookup. We should talk then, I'm doing the same 8) I'll take a look at what you have if you point me to the right direction, my code is at bk://kernel.bkbits.net/acme/dccp-2.6, but is still in the TCPfication skeleton right now. - Arnaldo From acme@conectiva.com.br Fri Aug 20 16:34:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 16:34:47 -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 i7KNYcBA018213 for ; Fri, 20 Aug 2004 16:34:43 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 95C7E4784F; Fri, 20 Aug 2004 20:34:24 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 10F3A47857 for ; Fri, 20 Aug 2004 20:34:23 -0300 (BRT) Received: (qmail 16906 invoked by uid 0); 21 Aug 2004 00:32:00 -0000 Received: from mapi8.distro.conectiva (HELO oops.kerneljanitors.org) (10.0.16.10) by burns.conectiva with SMTP; 21 Aug 2004 00:32:00 -0000 Received: by oops.kerneljanitors.org (Postfix, from userid 500) id DB1122C02E; Fri, 20 Aug 2004 20:35:42 -0300 (BRT) Date: Fri, 20 Aug 2004 20:35:42 -0300 From: Arnaldo Carvalho de Melo To: Zhikui Chen Cc: netdev@oss.sgi.com Subject: Re: An issue on one network development. Message-ID: <20040820233542.GI24215@conectiva.com.br> References: <41263245.8050305@rus.uni-stuttgart.de> <20040820233251.GH24215@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040820233251.GH24215@conectiva.com.br> X-Url: http://advogato.org/person/acme User-Agent: Mutt/1.5.5.1i X-Bogosity: No, tests=bogofilter, spamicity=0.259770, version=0.16.3 X-archive-position: 7939 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: 799 Lines: 21 Em Fri, Aug 20, 2004 at 08:32:52PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Aug 20, 2004 at 07:17:57PM +0200, Zhikui Chen escreveu: > > Dear all, > > > > HELP! > > > > I am writing a DCCP code in Linux kernel 2.6.6, I met a problem, which > > bored me about two weeks. Hope you to give me some hints, thanks in > > advance. The problem is on structure sock in dccp_lookup_listen of > > dccp_lookup. > > We should talk then, I'm doing the same 8) > > I'll take a look at what you have if you point me to the right direction, > my code is at bk://kernel.bkbits.net/acme/dccp-2.6, but is still in the > TCPfication skeleton right now. Ah, I started this from the work done by Patrick McManus, but now I'm mostly rewriting it, this weekend I'll get back to it, I hope 8) - Arnaldo From alan@lxorguk.ukuu.org.uk Fri Aug 20 17:57:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 17:58:00 -0700 (PDT) Received: from localhost.localdomain (the-village.bc.nu [81.2.110.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7L0vr1C020121 for ; Fri, 20 Aug 2004 17:57:54 -0700 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.11/8.12.11) with ESMTP id i7KNt6D0031906; Sat, 21 Aug 2004 00:55:06 +0100 Received: (from alan@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id i7KNt34H031905; Sat, 21 Aug 2004 00:55:03 +0100 X-Authentication-Warning: localhost.localdomain: alan set sender to alan@lxorguk.ukuu.org.uk using -f Subject: Re: [RFC] enhanced version of net_random() From: Alan Cox To: Lee Revell Cc: Andreas Dilger , Jean-Luc Cooke , Stephen Hemminger , "David S. Miller" , "Theodore Ts'o" , netdev@oss.sgi.com, Linux Kernel Mailing List In-Reply-To: <1093037055.10063.192.camel@krustophenia.net> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> <1093037055.10063.192.camel@krustophenia.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1093046100.31904.0.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Sat, 21 Aug 2004 00:55:01 +0100 X-archive-position: 7940 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: alan@lxorguk.ukuu.org.uk Precedence: bulk X-list: netdev Content-Length: 351 Lines: 8 On Gwe, 2004-08-20 at 22:24, Lee Revell wrote: > One problem is that AIUI, we incur this overhead even if a hardware RNG > is present. This does not seem right. Hardware RNGs are increasingly > common, Linux supports hardware RNGs from AMD, Intel, and VIA. Hardware RNG's are actually fairly slow and thus are better as sources to perturb a PRNG. From cranium2003@yahoo.com Fri Aug 20 22:46:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 22:46:38 -0700 (PDT) Received: from web41403.mail.yahoo.com (web41403.mail.yahoo.com [66.218.93.69]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7L5kWWT029608 for ; Fri, 20 Aug 2004 22:46:33 -0700 Message-ID: <20040821054621.95115.qmail@web41403.mail.yahoo.com> Received: from [203.199.141.99] by web41403.mail.yahoo.com via HTTP; Fri, 20 Aug 2004 22:46:21 PDT Date: Fri, 20 Aug 2004 22:46:21 -0700 (PDT) From: cranium2003 Subject: modifying tcp/ip stack To: net dev Cc: linux net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 7941 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cranium2003@yahoo.com Precedence: bulk X-list: netdev Content-Length: 933 Lines: 30 Hello, I want to modify existing protocol stack as given below. What exactly i want to do is that i want to add a new protocol headerin between IP and ETHERNET header. I want to implement packet structure as (Ethernet header +MY header + IP header +TCP header + PAYLOAD) that mean when packet comes from NIC it should first remove MY header in my routine then IP header in ip_input.c file. Also at transmitting end packet at IP layer with (IP header + TCP header +PAYLOAD)structure passed to ip_output.c then given to my routine for adding a new protocol header on that packetand then to Ethernet layer. I want your help to know what changes i require to do in kernel 2.4.24 to achieve this? Please kindly reply me. Thaking you. Regards, Parag. __________________________________ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com From rddunlap@osdl.org Fri Aug 20 23:31:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 20 Aug 2004 23:31:58 -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 i7L6Vq5T030674 for ; Fri, 20 Aug 2004 23:31:52 -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 i7L6VZ103167; Fri, 20 Aug 2004 23:31:35 -0700 Date: Fri, 20 Aug 2004 23:21:19 -0700 From: "Randy.Dunlap" To: Cc: jgarzik@pobox.com, netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel Message-Id: <20040820232119.0b53148a.rddunlap@osdl.org> In-Reply-To: <001401c48194$62497260$9610100a@S2IOtech.com> References: <001401c48194$62497260$9610100a@S2IOtech.com> 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: 7942 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: 3554 Lines: 130 On Fri, 13 Aug 2004 17:19:36 -0700 Ravinandan Arakali wrote: | Hi Jeff et al, | We gained immensely from your code review comments last time when we | submitted the S2io driver. | Attached is a patch(use with -p1 option from /usr/src/ | directory) on the current driver | in the 2.6 kernel. Please review the code changes and reply with your | valuable comments. | | Briefly, some of the main features in this patch: | | 1. Support for IBM PowerPC platform. | 2. Support for NAPI. | 3. More efficient allocation of Transmit blocks. | 4. Multi-buffer mode for improved Receive performance. | 4. Following bug fixes: | a. Race condition when trying to down interface during traffic. | b. Fix for bringup problems with SuSE9 on IA64 system. for s2io.c:::::::::: 0. Renames a bunch of functions. It would be helpful (for patch reviewers) to separate this into functional patch sets. That way, things like function renames (and kerneldoc style function comment blocks -- which are much better, thanks -- wouldn't get in the way of reviewing the meat of the patch. a. It needs some fixups for coding style. Current s2io.c has these right, but the patch messes them up: use a space after "if" and "for", not "if(" or "for(" b. This code fragment (done 2 times): + int tmp = config->TxCfg[i].FifoLen / lst_per_page; + int tmp1 = config->TxCfg[i].FifoLen % lst_per_page; + int page_num = tmp1? (tmp+1) : tmp; looks like a familiar idiom to me: #define container_index(len, per_each) ((len + per_each - 1) / per_each) page_num = container_index(config->TxCfg[i].FifoLen, lst_per_page); c. in this code fragment: + 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,"Malloc failed for TxDL\n"); Using "Malloc" here would be confusing to me, but it's DBG_PRINT(), so.... + return -ENOMEM; + } + memset(tmp_v, 0, PAGE_SIZE); memset() is done by the alloc call. d. long comment format in Linux is: /* * begin here * more comment * still more * end here */ e. s/chachelines/cachelines/ (or /cache lines/) f. There are several function description blocks where the function name in the comment block does not match the actual coded function name. g. check the return type and comment: + * Return value : + * void. */ + int s2io_ethtool_gset( h. read_eeprom(): + * Return value: + * -1 on failure and the value read from the Eeprom if successful. so read_eeprom() doesn't distinguish between reading 0xff ff ff ff and an error? i. write_eeprom(): probably returns 0 on success, not '0': + * Return value: + * '0' on success, -1 on failure. Just remove the ' marks. (in multiple places) j. Please use tabs instead of spaces (e.g., 8 spaces at beginning of some lines). k. in check parameter values: + if ((shared_splits > 31)) { + printk("shared_splits can exceed 31\n"); ? cannot ?? + if (rmac_util_period > 0xF) { + printk("rmac_util_period can exceed 15\n"); ? cannot ?? + if (tmac_util_period > 0xF) { + printk("tmac_util_period can exceed 15\n"); ? cannot ?? for s2io.h::::::::::::::::; 1. It would be nice (desirable, preferred) to remove all of those typedefs, similar to the way that you changed FuncTionNames and comments. 2. +#define SIZE_OF_BLOCK 4096 Is this size strictly device specific, and not architecture related? -- ~Randy From greearb@candelatech.com Sat Aug 21 00:02:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 00:02: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 i7L722ZS031408 for ; Sat, 21 Aug 2004 00:02:02 -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 i7L7IbSb030387; Sat, 21 Aug 2004 00:18:37 -0700 Message-ID: <4126F363.9070205@candelatech.com> Date: Sat, 21 Aug 2004 00:01:55 -0700 From: Ben Greear Organization: Candela Technologies 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: cranium2003 CC: net dev Subject: Re: modifying tcp/ip stack References: <20040821054621.95115.qmail@web41403.mail.yahoo.com> In-Reply-To: <20040821054621.95115.qmail@web41403.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7943 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: 1164 Lines: 43 cranium2003 wrote: > Hello, > I want to modify existing protocol stack as > given below. > What exactly i want to do is that i want to > add a new protocol headerin between IP and ETHERNET > header. > I want to implement packet structure as > (Ethernet header +MY header + IP header +TCP header + > PAYLOAD) that mean when packet comes from NIC it > should first remove MY header in my routine then IP > header in ip_input.c file. > Also at transmitting end packet at IP layer > with (IP header + TCP header +PAYLOAD)structure passed > to ip_output.c then given to my routine for adding a > new protocol header on that packetand then to Ethernet > layer. > I want your help to know what changes i > require to do in kernel 2.4.24 to achieve this? > Please kindly reply me. 802.1Q vlan code does this. See net/8021q/* Ben > Thaking you. > > Regards, > Parag. > > > > __________________________________ > Do you Yahoo!? > Y! Messenger - Communicate in real time. Download now. > http://messenger.yahoo.com > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From max@stro.at Sat Aug 21 01:36:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 01:36:54 -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 i7L8al5U003810 for ; Sat, 21 Aug 2004 01:36:48 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id B26255C00A; Sat, 21 Aug 2004 10:36:39 +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 24399-10; Sat, 21 Aug 2004 10:36:39 +0200 (CEST) Received: from sputnik (M769P020.adsl.highway.telekom.at [62.47.128.20]) by baikonur.stro.at (Postfix) with ESMTP id 18D765C008; Sat, 21 Aug 2004 10:36:39 +0200 (CEST) Received: from max by sputnik with local (Exim 4.34) id 1ByRMd-0001dK-OR; Sat, 21 Aug 2004 10:36:39 +0200 Date: Sat, 21 Aug 2004 10:36:39 +0200 From: maximilian attems To: Jay Bourque Cc: kernel-janitors@lists.osdl.org, netdev@oss.sgi.com Subject: Re: [Kernel-janitors] ip_gre.c: update last_rx after netif_rx Message-ID: <20040821083639.GA1827@stro.at> Mail-Followup-To: Jay Bourque , kernel-janitors@lists.osdl.org, netdev@oss.sgi.com References: <411E62D3.8070808@uranium235.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <411E62D3.8070808@uranium235.org> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 7944 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 Content-Length: 1008 Lines: 35 On Sat, 14 Aug 2004, Jay Bourque wrote: > Fix to update last_rx after netif_rx > This is my first patch so I'd appreciate any feedback. > > -Jay > > --- linux-2.6.8.1/net/ipv4/ip_gre.c Sat Aug 14 05:55:48 2004 > +++ linux-2.6.8.1/net/ipv4/ip_gre.c.new Sat Aug 14 12:17:16 2004 > @@ -646,6 +646,7 @@ int ipgre_rcv(struct sk_buff *skb) > nf_reset(skb); > ipgre_ecn_decapsulate(iph, skb); > netif_rx(skb); > + tunnel->dev->last_rx = jiffies; > read_unlock(&ipgre_lock); > return(0); > } doesn't look complete, see patch below, but please read on: the kj todo has an entry about "update last_rx after netif_rx", i wonder what that timestamping is good for, and newer sources 2.4.27 and 2.6.8 show 2 occurences of last_rx. patches doing that are for young 2.4: http://seclists.org/linux-kernel/2001/Feb/4846.html i presume that this task is outdated, thanks for putting light on that. -- maks kernel janitor http://janitor.kernelnewbies.org/ From hno@marasystems.com Sat Aug 21 03:23:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 03:23:14 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [213.150.153.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7LAN8xO007418 for ; Sat, 21 Aug 2004 03:23:09 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i7LAMl817232; Sat, 21 Aug 2004 12:22:47 +0200 Date: Sat, 21 Aug 2004 12:22:47 +0200 (CEST) From: Henrik Nordstrom To: cranium2003 cc: net dev , linux net Subject: Re: modifying tcp/ip stack In-Reply-To: <20040821054621.95115.qmail@web41403.mail.yahoo.com> Message-ID: References: <20040821054621.95115.qmail@web41403.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 7945 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: 842 Lines: 22 On Fri, 20 Aug 2004, cranium2003 wrote: > What exactly i want to do is that i want to > add a new protocol headerin between IP and ETHERNET > header. From my understanding this is best done in two pieces: a) A virtual network driver which adds your protocol header and then hands off the packet to the intended destination device. b) A net net_protocol which parses your protocol header and then hands off the packets to the next layer (IP or whatever). Alternatively it can be a added as a packet_type to the device using dev_add_pack() which steals the packet from the original device and then reinjects them as coming from your device after processing your protocol header. It may also be possible using the xfrm framework in 2.6 without using any of the above, but I am not familiar with how this works. Regards Henrik From kaber@trash.net Sat Aug 21 05:43:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 05:43:54 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7LChjqU013989 for ; Sat, 21 Aug 2004 05:43:46 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 8113A19F33C; Sat, 21 Aug 2004 14:43:33 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 965CE394175; Sat, 21 Aug 2004 14:43:32 +0200 (CEST) Message-ID: <41274373.1020001@trash.net> Date: Sat, 21 Aug 2004 14:43: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]: Mark some xfrm-functions/data static Content-Type: multipart/mixed; boundary="------------090909020708040803030009" X-archive-position: 7946 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: 10040 Lines: 342 This is a multi-part message in MIME format. --------------090909020708040803030009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch marks some xfrm-functions/data static. --------------090909020708040803030009 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/08/21 14:23:10+02:00 kaber@coreworks.de # [XFRM]: mark some functions/data static # # Signed-off-by: Patrick McHardy # # net/ipv6/xfrm6_policy.c # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +7 -7 # [XFRM]: mark some functions/data static # # net/ipv6/esp6.c # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +7 -7 # [XFRM]: mark some functions/data static # # net/ipv6/ah6.c # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +5 -5 # [XFRM]: mark some functions/data static # # net/ipv4/xfrm4_policy.c # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +6 -6 # [XFRM]: mark some functions/data static # # net/ipv4/esp4.c # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +6 -6 # [XFRM]: mark some functions/data static # # net/ipv4/ah4.c # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +2 -2 # [XFRM]: mark some functions/data static # # include/net/xfrm.h # 2004/08/21 14:22:47+02:00 kaber@coreworks.de +0 -2 # [XFRM]: mark some functions/data static # diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2004-08-21 14:38:16 +02:00 +++ b/include/net/xfrm.h 2004-08-21 14:38:16 +02:00 @@ -848,8 +848,6 @@ #endif void xfrm_policy_init(void); -void xfrm4_policy_init(void); -void xfrm6_policy_init(void); struct xfrm_policy *xfrm_policy_alloc(int gfp); extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); diff -Nru a/net/ipv4/ah4.c b/net/ipv4/ah4.c --- a/net/ipv4/ah4.c 2004-08-21 14:38:16 +02:00 +++ b/net/ipv4/ah4.c 2004-08-21 14:38:16 +02:00 @@ -116,7 +116,7 @@ return err; } -int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) +static int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) { int ah_hlen; struct iphdr *iph; @@ -184,7 +184,7 @@ return -EINVAL; } -void ah4_err(struct sk_buff *skb, u32 info) +static void ah4_err(struct sk_buff *skb, u32 info) { struct iphdr *iph = (struct iphdr*)skb->data; struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+(iph->ihl<<2)); diff -Nru a/net/ipv4/esp4.c b/net/ipv4/esp4.c --- a/net/ipv4/esp4.c 2004-08-21 14:38:16 +02:00 +++ b/net/ipv4/esp4.c 2004-08-21 14:38:16 +02:00 @@ -17,7 +17,7 @@ __u8 proto; }; -int esp_output(struct sk_buff *skb) +static int esp_output(struct sk_buff *skb) { int err; struct dst_entry *dst = skb->dst; @@ -139,7 +139,7 @@ * expensive, so we only support truncated data, which is the recommended * and common case. */ -int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) +static int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) { struct iphdr *iph; struct ip_esp_hdr *esph; @@ -246,7 +246,7 @@ return -EINVAL; } -int esp_post_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) +static int esp_post_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) { if (x->encap) { @@ -320,7 +320,7 @@ return mtu + x->props.header_len + esp->auth.icv_trunc_len; } -void esp4_err(struct sk_buff *skb, u32 info) +static void esp4_err(struct sk_buff *skb, u32 info) { struct iphdr *iph = (struct iphdr*)skb->data; struct ip_esp_hdr *esph = (struct ip_esp_hdr*)(skb->data+(iph->ihl<<2)); @@ -338,7 +338,7 @@ xfrm_state_put(x); } -void esp_destroy(struct xfrm_state *x) +static void esp_destroy(struct xfrm_state *x) { struct esp_data *esp = x->data; @@ -364,7 +364,7 @@ kfree(esp); } -int esp_init_state(struct xfrm_state *x, void *args) +static int esp_init_state(struct xfrm_state *x, void *args) { struct esp_data *esp = NULL; diff -Nru a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c --- a/net/ipv4/xfrm4_policy.c 2004-08-21 14:38:16 +02:00 +++ b/net/ipv4/xfrm4_policy.c 2004-08-21 14:38:16 +02:00 @@ -12,8 +12,8 @@ #include #include -extern struct dst_ops xfrm4_dst_ops; -extern struct xfrm_policy_afinfo xfrm4_policy_afinfo; +static struct dst_ops xfrm4_dst_ops; +static struct xfrm_policy_afinfo xfrm4_policy_afinfo; static struct xfrm_type_map xfrm4_type_map = { .lock = RW_LOCK_UNLOCKED }; @@ -243,7 +243,7 @@ path->ops->update_pmtu(path, mtu); } -struct dst_ops xfrm4_dst_ops = { +static struct dst_ops xfrm4_dst_ops = { .family = AF_INET, .protocol = __constant_htons(ETH_P_IP), .gc = xfrm4_garbage_collect, @@ -252,7 +252,7 @@ .entry_size = sizeof(struct xfrm_dst), }; -struct xfrm_policy_afinfo xfrm4_policy_afinfo = { +static struct xfrm_policy_afinfo xfrm4_policy_afinfo = { .family = AF_INET, .lock = RW_LOCK_UNLOCKED, .type_map = &xfrm4_type_map, @@ -263,12 +263,12 @@ .decode_session = _decode_session4, }; -void __init xfrm4_policy_init(void) +static void __init xfrm4_policy_init(void) { xfrm_policy_register_afinfo(&xfrm4_policy_afinfo); } -void __exit xfrm4_policy_fini(void) +static void __exit xfrm4_policy_fini(void) { xfrm_policy_unregister_afinfo(&xfrm4_policy_afinfo); } diff -Nru a/net/ipv6/ah6.c b/net/ipv6/ah6.c --- a/net/ipv6/ah6.c 2004-08-21 14:38:16 +02:00 +++ b/net/ipv6/ah6.c 2004-08-21 14:38:16 +02:00 @@ -154,7 +154,7 @@ return 0; } -int ah6_output(struct sk_buff *skb) +static int ah6_output(struct sk_buff *skb) { int err; int extlen; @@ -229,7 +229,7 @@ return err; } -int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) +static int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) { /* * Before process AH @@ -319,8 +319,8 @@ return -EINVAL; } -void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, - int type, int code, int offset, __u32 info) +static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, + int type, int code, int offset, __u32 info) { struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset); @@ -448,7 +448,7 @@ .flags = INET6_PROTO_NOPOLICY, }; -int __init ah6_init(void) +static int __init ah6_init(void) { if (xfrm_register_type(&ah6_type, AF_INET6) < 0) { printk(KERN_INFO "ipv6 ah init: can't add xfrm type\n"); diff -Nru a/net/ipv6/esp6.c b/net/ipv6/esp6.c --- a/net/ipv6/esp6.c 2004-08-21 14:38:16 +02:00 +++ b/net/ipv6/esp6.c 2004-08-21 14:38:16 +02:00 @@ -37,7 +37,7 @@ #include #include -int esp6_output(struct sk_buff *skb) +static int esp6_output(struct sk_buff *skb) { int err; int hdr_len; @@ -129,7 +129,7 @@ return err; } -int esp6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) +static int esp6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) { struct ipv6hdr *iph; struct ipv6_esp_hdr *esph; @@ -252,8 +252,8 @@ return mtu + x->props.header_len + esp->auth.icv_full_len; } -void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, - int type, int code, int offset, __u32 info) +static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, + int type, int code, int offset, __u32 info) { struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; struct ipv6_esp_hdr *esph = (struct ipv6_esp_hdr*)(skb->data+offset); @@ -272,7 +272,7 @@ xfrm_state_put(x); } -void esp6_destroy(struct xfrm_state *x) +static void esp6_destroy(struct xfrm_state *x) { struct esp_data *esp = x->data; @@ -298,7 +298,7 @@ kfree(esp); } -int esp6_init_state(struct xfrm_state *x, void *args) +static int esp6_init_state(struct xfrm_state *x, void *args) { struct esp_data *esp = NULL; @@ -402,7 +402,7 @@ .flags = INET6_PROTO_NOPOLICY, }; -int __init esp6_init(void) +static int __init esp6_init(void) { if (xfrm_register_type(&esp6_type, AF_INET6) < 0) { printk(KERN_INFO "ipv6 esp init: can't add xfrm type\n"); diff -Nru a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c --- a/net/ipv6/xfrm6_policy.c 2004-08-21 14:38:16 +02:00 +++ b/net/ipv6/xfrm6_policy.c 2004-08-21 14:38:16 +02:00 @@ -17,12 +17,12 @@ #include #include -extern struct dst_ops xfrm6_dst_ops; -extern struct xfrm_policy_afinfo xfrm6_policy_afinfo; +static struct dst_ops xfrm6_dst_ops; +static struct xfrm_policy_afinfo xfrm6_policy_afinfo; static struct xfrm_type_map xfrm6_type_map = { .lock = RW_LOCK_UNLOCKED }; -int xfrm6_dst_lookup(struct xfrm_dst **dst, struct flowi *fl) +static int xfrm6_dst_lookup(struct xfrm_dst **dst, struct flowi *fl) { int err = 0; *dst = (struct xfrm_dst*)ip6_route_output(NULL, fl); @@ -253,7 +253,7 @@ return; } -struct dst_ops xfrm6_dst_ops = { +static struct dst_ops xfrm6_dst_ops = { .family = AF_INET6, .protocol = __constant_htons(ETH_P_IPV6), .gc = xfrm6_garbage_collect, @@ -262,7 +262,7 @@ .entry_size = sizeof(struct xfrm_dst), }; -struct xfrm_policy_afinfo xfrm6_policy_afinfo = { +static struct xfrm_policy_afinfo xfrm6_policy_afinfo = { .family = AF_INET6, .lock = RW_LOCK_UNLOCKED, .type_map = &xfrm6_type_map, @@ -273,12 +273,12 @@ .decode_session = _decode_session6, }; -void __init xfrm6_policy_init(void) +static void __init xfrm6_policy_init(void) { xfrm_policy_register_afinfo(&xfrm6_policy_afinfo); } -void __exit xfrm6_policy_fini(void) +static void __exit xfrm6_policy_fini(void) { xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo); } --------------090909020708040803030009-- From kaber@trash.net Sat Aug 21 08:10:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 08:10:39 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7LFAXUQ018285 for ; Sat, 21 Aug 2004 08:10:34 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 45D9C19F33C; Sat, 21 Aug 2004 17:10:22 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 71234394175; Sat, 21 Aug 2004 17:10:21 +0200 (CEST) Message-ID: <412765DC.30600@trash.net> Date: Sat, 21 Aug 2004 17:10:20 +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: laforge@netfilter.org, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@sunbeam.de.gnumonks.org> <20040819071846.2d0d6120.davem@redhat.com> <4124BF7E.7090304@trash.net> <20040819081428.5243e314.davem@redhat.com> In-Reply-To: <20040819081428.5243e314.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7947 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: 455 Lines: 16 David S. Miller wrote: >I have a better idea. > >Instead of setting skb->dst to NULL, it should set it to some >NULL destination entry which just frees up the packets. Then >no special case handling. skb->dst==NULL packets should never >get into the fragment queue to begin with. > The problem is that conntrack unload can cause packets without a dst_entry to appear in ip_local_deliver, which is already after the call to dst_input. Regards Patrick From olh@suse.de Sat Aug 21 08:49:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 08:49:25 -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 i7LFnJ60023231 for ; Sat, 21 Aug 2004 08:49: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 18682ABE73D; Sat, 21 Aug 2004 17:49:07 +0200 (CEST) Date: Sat, 21 Aug 2004 17:49:06 +0200 From: Olaf Hering To: Jeff Garzik , netdev@oss.sgi.com Subject: [PATCH] remove old version check from mac8390 Message-ID: <20040821154906.GA14498@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: 7949 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: 725 Lines: 23 This 'netdevice' define will end up in the 'tags' file. Its not used, so just remove it. diff -p -purN linux-2.6.8.1.kaputt/drivers/net/mac8390.c linux-2.6.8.1/drivers/net/mac8390.c --- linux-2.6.8.1.kaputt/drivers/net/mac8390.c 2004-08-14 12:55:33.000000000 +0200 +++ linux-2.6.8.1/drivers/net/mac8390.c 2004-08-21 17:45:12.000000000 +0200 @@ -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 */ -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG From vrsbs@derbian.org Sat Aug 21 14:04:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 14:04:32 -0700 (PDT) Received: from mail.derbian.org (mail@derbian.fi [213.139.167.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7LL4QLH032151 for ; Sat, 21 Aug 2004 14:04:26 -0700 Received: from vrsbs by mail.derbian.org with local (Exim 4.34) id 1Byd29-0002Og-Pr; Sun, 22 Aug 2004 00:04:17 +0300 Date: Sun, 22 Aug 2004 00:04:17 +0300 From: Joonas Kortesalmi To: netdev@oss.sgi.com Subject: Oops: Process zebra, EIP is at fib_create_info+0x22b/0x580 Message-ID: <20040821210417.GA8844@hamsu.derbian.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 7950 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vrsbs@derbian.org Precedence: bulk X-list: netdev Content-Length: 1953 Lines: 48 Running 2.6.8.1 and got a nice Oops from zebra (quagga). After this, nothing routing-related worked. traceroute went to unin- terruptible sleep, ip route get printed nothing and hanged... Perhaps it's worth having a look so potential bug doesn't get into 2.6.9? I'm not subscribed on the list and used a temporary account to avoid too much spam but I will receive the mails for a few weeks or so. -- clip -- Unable to handle kernel paging request at virtual address 042454df printing eip: c02e39eb *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[] Not tainted EFLAGS: 00010206 (2.6.8.1) EIP is at fib_create_info+0x22b/0x580 eax: 00000011 ebx: ff0d7448 ecx: 0424548b edx: c3fa06bc esi: 0424548b edi: c3fa06b4 ebp: c1167a3c esp: c2577c14 ds: 007b es: 007b ss: 0068 Process zebra (pid: 2748, threadinfo=c2576000 task=c2575810) Stack: 00000001 0424548b c11679e0 00000000 00000001 ffffffea c2577cd0 c2577cd0 c38f2c40 c02e4fe8 c10d0c90 c2577cd0 c10d0c80 c2577c6c c02b2833 00f1a8c0 00876260 00000001 00000018 c3f84680 c38f2c40 c3f846c4 c1876260 00f1a8c0 Call Trace: [] fn_hash_insert+0xa8/0x4a0 [] netlink_unicast+0x53/0xb0 [] inet_rtm_newroute+0x53/0x70 [] rtnetlink_rcv+0x2bf/0x390 [] memcpy_toiovec+0x2d/0x60 [] netlink_data_ready+0x54/0x60 [] netlink_sendskb+0x1f/0x40 [] netlink_sendmsg+0x1ef/0x2d0 [] sock_sendmsg+0x93/0xb0 [] memcpy_toiovec+0x2d/0x60 [] skb_copy_datagram_iovec+0x41/0x1e0 [] kfree_skbmem+0x17/0x20 [] copy_from_user+0x2e/0x60 [] verify_iovec+0x31/0x90 [] sys_sendmsg+0x153/0x1b0 [] copy_to_user+0x2d/0x40 [] copy_from_user+0x2e/0x60 [] sys_socketcall+0x192/0x1b0 [] syscall_call+0x7/0xb Code: 8b 59 54 3b 1c 24 74 6e 8b 74 24 04 8b 36 89 74 24 04 85 f6 -- clip -- From romieu@fr.zoreil.com Sat Aug 21 16:45:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 16:46: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 i7LNjrcp005308 for ; Sat, 21 Aug 2004 16:45:54 -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 i7LNhD45013586; Sun, 22 Aug 2004 01:43:13 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7LNhCqq013585; Sun, 22 Aug 2004 01:43:12 +0200 Date: Sun, 22 Aug 2004 01:43:12 +0200 From: Francois Romieu To: Ravinandan Arakali Cc: jgarzik@pobox.com, netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel Message-ID: <20040821234312.GA10959@electric-eye.fr.zoreil.com> References: <001401c48194$62497260$9610100a@S2IOtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001401c48194$62497260$9610100a@S2IOtech.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7951 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: 2598 Lines: 85 diff -Naur orig/drivers/net/s2io.c new/drivers/net/s2io.c --- orig/drivers/net/s2io.c 2004-08-06 06:55:01.000000000 -0700 +++ new/drivers/net/s2io.c 2004-08-06 06:58:44.000000000 -0700 [...] @@ -432,14 +507,29 @@ 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->MaxTxDs); + lst_per_page = PAGE_SIZE / lst_size; + + for(i=0; iTxFIFONum; i++) { + int tmp = config->TxCfg[i].FifoLen / lst_per_page; + int tmp1 = config->TxCfg[i].FifoLen % lst_per_page; + int page_num = tmp1?(tmp+1) : tmp; + for(j=0; jlist_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]); } -> Give it more room and avoid some arithmetic: for (i = 0; i < config->TxFIFONum; i++) { int blk, blk_max = config->TxCfg[i].FifoLen; for (blk = 0; blk < blk_max; blk += lst_per_page) { struct list_info_hold *lih = &nic->list_info[i][blk]; if (!lih->list_virt_addr) break; pci_free_consistent(nic->pdev, PAGE_SIZE, lih->list_virt_addr, lih->list_phy_addr); } kfree(nic->list_info[i]); } [...] @@ -858,22 +963,57 @@ 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)); + } -> (internal parser panic) keep 'mc_pause_threshold_q0q3' on its containing struct line ? -> May be it's not worth it but you can save an iteration: val64 = (u64) 0xFF00 | nic->mac_control.mc_pause_threshold_q0q3; val64 |= val64 << 16; val64 |= val64 << 32; You can wrap the whole thing behind an inlined function if it tends to appear several times. -- Ueimor From nuno.silva@vgertech.com Sat Aug 21 19:13:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 19:14:02 -0700 (PDT) Received: from puma-vgertech.no-ip.com (postfix@[82.154.232.61]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7M2Drt0007753 for ; Sat, 21 Aug 2004 19:13:55 -0700 Received: from [10.0.2.15] (puma [10.0.2.15]) by puma-vgertech.no-ip.com (Postfix) with ESMTP id 590566A8291; Sun, 22 Aug 2004 03:13:55 +0100 (WEST) Message-ID: <41280163.1050508@vgertech.com> Date: Sun, 22 Aug 2004 03:13:55 +0100 From: Nuno Silva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040528 Thunderbird/0.6 Mnenhy/0.6.0.103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Cc: "Vladimir B. Savkin" , netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 References: <411BC284.6080807@vgertech.com> <20040813080334.GA13337@tentacle.sectorb.msk.ru> <411D2625.2070908@vgertech.com> In-Reply-To: <411D2625.2070908@vgertech.com> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------060601080403090305050202" X-archive-position: 7952 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nuno.silva@vgertech.com Precedence: bulk X-list: netdev Content-Length: 4392 Lines: 142 This is a multi-part message in MIME format. --------------060601080403090305050202 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Nuno Silva wrote: > Vladimir B. Savkin wrote: > | On Thu, Aug 12, 2004 at 08:18:28PM +0100, Nuno Silva wrote: > | > |>Hi! > |> > |>With 2.6.8-rc4-bk1 I get "Aug 12 17:33:10 puma kernel: > |>unregister_netdevice: waiting for ppp0 to become free. Usage count = 1" > |>in the logs after pppd exit. > |> > |>Also, the box won't reboot and print that message forever in the > |>console. sysrq-U && sysrq-R did it :-) > |> > |>The last version I tried was 2.6.8-rc2-bk11 and, wrt this prob, is > |>running fine. So, the problem is in that window and the changelog for > |>rc4 mentions something about ppp: > |>http://kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.8-rc4 > |> > |>If someone requires more information or tests feel free to ask! > | > | > | I saw this too, with 2.6.7-rc3-mm1. > | I have discovered that it happens because of idle TCP socket > | holds a reference to a network device. > | After killing associated process, device was freed immediately. > | > > I waited for 5 mins before sysrq-U && sysrq-R. > Anyway, if I 'killall pppd' and then issue 'ifconfig -a' the ifconfig > command will hang. > > This didn't happen with 2.6.8-rc2-bk11 (the one I'm running now), so > something changed... I'm I the only one with ppp/pppd/pppoe who tried > 2.6.8-rc4-bk1? :-) Any success reports? > OK, I just tested again and the problem persists. However this time I had some spare moments so I rebooted a few times to isolate the problem. The problem is in the QoS code. If I start ppp whithout the /etc/ppp/ip-up.d/wshaper script everything is fine. If I try the wshaper.htb it's also fine. So, I'd say that the problem is in the CBQ section. This time I waited for 1 hour and got hundreds of "unregister_netdevice: waiting for ppp0 to become free. Usage count = 1" in the console/syslog. pppd eats 99% CPU. ifconfig freezes. Even reboot isn't possible without sysrq's help. This problem was introduced between 2.6.8-rc2-bk11 and 2.6.8-rc4-bk1 and always happens. Right now I'm testing with 2.6.8.1 with a patch from Mr. Miller -- "cacheline-align qdisc data in qdisc_create()" (attached). If someone needs more details feel free to ask! Regards, Nuno Silva --------------060601080403090305050202 Content-Type: text/x-patch; name="qdisc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qdisc.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/15 19:33:16-07:00 kaber@trash.net # [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/08/15 19:32:59-07:00 kaber@trash.net +13 -8 # [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-19 07:33:10 -07:00 +++ b/net/sched/sch_api.c 2004-08-19 07:33:10 -07:00 @@ -389,7 +389,8 @@ { int err; struct rtattr *kind = tca[TCA_KIND-1]; - struct Qdisc *sch = NULL; + void *p = NULL; + struct Qdisc *sch; struct Qdisc_ops *ops; int size; @@ -407,12 +408,18 @@ if (ops == NULL) goto err_out; - size = sizeof(*sch) + ops->priv_size; + /* ensure that the Qdisc and the private data are 32-byte aligned */ + size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); + size += ops->priv_size + QDISC_ALIGN_CONST; - sch = kmalloc(size, GFP_KERNEL); + p = kmalloc(size, GFP_KERNEL); err = -ENOBUFS; - if (!sch) + if (!p) goto err_out; + memset(p, 0, size); + sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); + sch->padded = (char *)sch - (char *)p; /* Grrr... Resolve race condition with module unload */ @@ -420,8 +427,6 @@ if (ops != qdisc_lookup_ops(kind)) goto err_out; - memset(sch, 0, size); - INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); @@ -470,8 +475,8 @@ err_out: *errp = err; - if (sch) - kfree(sch); + if (p) + kfree(p); return NULL; } --------------060601080403090305050202-- From davem@redhat.com Sat Aug 21 22:15:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 22:15: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 i7M5Fd0v014623 for ; Sat, 21 Aug 2004 22:15:40 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7M5FXe1019065; Sun, 22 Aug 2004 01:15:33 -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 i7M5FXa10353; Sun, 22 Aug 2004 01:15:33 -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 i7M5FV2b016026; Sun, 22 Aug 2004 01:15:31 -0400 Date: Sat, 21 Aug 2004 22:15:02 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Mark some xfrm-functions/data static Message-Id: <20040821221502.7d8f3156.davem@redhat.com> In-Reply-To: <41274373.1020001@trash.net> References: <41274373.1020001@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: 7954 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: 151 Lines: 6 On Sat, 21 Aug 2004 14:43:31 +0200 Patrick McHardy wrote: > This patch marks some xfrm-functions/data static. Looks good, applied. From davem@redhat.com Sat Aug 21 22:14:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 22:14:36 -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 i7M5ETof014431 for ; Sat, 21 Aug 2004 22:14:30 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7M5EFe1018900; Sun, 22 Aug 2004 01:14: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 i7M5EFa10189; Sun, 22 Aug 2004 01:14:15 -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 i7M5EDQ6015802; Sun, 22 Aug 2004 01:14:13 -0400 Date: Sat, 21 Aug 2004 22:13:44 -0700 From: "David S. Miller" To: Patrick McHardy Cc: laforge@netfilter.org, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040821221344.6dbc98ed.davem@redhat.com> In-Reply-To: <412765DC.30600@trash.net> References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@sunbeam.de.gnumonks.org> <20040819071846.2d0d6120.davem@redhat.com> <4124BF7E.7090304@trash.net> <20040819081428.5243e314.davem@redhat.com> <412765DC.30600@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: 7953 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: 965 Lines: 26 On Sat, 21 Aug 2004 17:10:20 +0200 Patrick McHardy wrote: > David S. Miller wrote: > > >I have a better idea. > > > >Instead of setting skb->dst to NULL, it should set it to some > >NULL destination entry which just frees up the packets. Then > >no special case handling. skb->dst==NULL packets should never > >get into the fragment queue to begin with. > > > The problem is that conntrack unload can cause packets without a > dst_entry to appear in ip_local_deliver, which is already after > the call to dst_input. How can it call ip_local_deliver() without a valid skb->dst? That function is only invoked via skb->dst->input(skb) which by implication means that skb->dst is non-NULL. Actually there is a call via ip_mr_input() but that code also has a precondition that skb->dst is non-NULL too. I say this due to the unchecked skb->dst accesses it makes early on. Please explain. I don't question that it happens, just show me how :-) From davem@redhat.com Sat Aug 21 22:18:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 22:18: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 i7M5IiWo015081 for ; Sat, 21 Aug 2004 22:18:46 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7M5IXe1019417; Sun, 22 Aug 2004 01:18:33 -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 i7M5INa10882; Sun, 22 Aug 2004 01:18:23 -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 i7M5ILIH016871; Sun, 22 Aug 2004 01:18:21 -0400 Date: Sat, 21 Aug 2004 22:17:51 -0700 From: "David S. Miller" To: Joonas Kortesalmi Cc: netdev@oss.sgi.com Subject: Re: Oops: Process zebra, EIP is at fib_create_info+0x22b/0x580 Message-Id: <20040821221751.547feefe.davem@redhat.com> In-Reply-To: <20040821210417.GA8844@hamsu.derbian.fi> References: <20040821210417.GA8844@hamsu.derbian.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: 7955 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: 209 Lines: 6 On Sun, 22 Aug 2004 00:04:17 +0300 Joonas Kortesalmi wrote: > Running 2.6.8.1 and got a nice Oops from zebra (quagga). Can you figure out where exactly this OOPS is in fib_create_info()? From davem@redhat.com Sat Aug 21 22:25:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 21 Aug 2004 22:25: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 i7M5PgvE015485 for ; Sat, 21 Aug 2004 22:25:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7M5PZe1020342; Sun, 22 Aug 2004 01:25: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 i7M5PZa12022; Sun, 22 Aug 2004 01:25:35 -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 i7M5PX7J018193; Sun, 22 Aug 2004 01:25:33 -0400 Date: Sat, 21 Aug 2004 22:25:03 -0700 From: "David S. Miller" To: Nuno Silva Cc: linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 Message-Id: <20040821222503.51268490.davem@redhat.com> In-Reply-To: <41280163.1050508@vgertech.com> References: <411BC284.6080807@vgertech.com> <20040813080334.GA13337@tentacle.sectorb.msk.ru> <411D2625.2070908@vgertech.com> <41280163.1050508@vgertech.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: 7956 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: 337 Lines: 8 On Sun, 22 Aug 2004 03:13:55 +0100 Nuno Silva wrote: > This problem was introduced between 2.6.8-rc2-bk11 and 2.6.8-rc4-bk1 and > always happens. Right now I'm testing with 2.6.8.1 with a patch from Mr. > Miller -- "cacheline-align qdisc data in qdisc_create()" (attached). Does that patch fix the problem? From nuno.silva@vgertech.com Sun Aug 22 01:02:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 01:02:18 -0700 (PDT) Received: from puma-vgertech.no-ip.com (postfix@[82.154.232.92]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7M826hJ021381 for ; Sun, 22 Aug 2004 01:02:07 -0700 Received: from [10.0.2.15] (puma [10.0.2.15]) by puma-vgertech.no-ip.com (Postfix) with ESMTP id 5F5F3DA8159; Sun, 22 Aug 2004 09:02:02 +0100 (WEST) Message-ID: <412852FA.70801@vgertech.com> Date: Sun, 22 Aug 2004 09:02:02 +0100 From: Nuno Silva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040528 Thunderbird/0.6 Mnenhy/0.6.0.103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 References: <411BC284.6080807@vgertech.com> <20040813080334.GA13337@tentacle.sectorb.msk.ru> <411D2625.2070908@vgertech.com> <41280163.1050508@vgertech.com> <20040821222503.51268490.davem@redhat.com> In-Reply-To: <20040821222503.51268490.davem@redhat.com> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------080409040605070903040809" X-archive-position: 7957 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nuno.silva@vgertech.com Precedence: bulk X-list: netdev Content-Length: 17185 Lines: 290 This is a multi-part message in MIME format. --------------080409040605070903040809 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David S. Miller wrote: | On Sun, 22 Aug 2004 03:13:55 +0100 | Nuno Silva wrote: | | |>This problem was introduced between 2.6.8-rc2-bk11 and 2.6.8-rc4-bk1 and |>always happens. Right now I'm testing with 2.6.8.1 with a patch from Mr. |>Miller -- "cacheline-align qdisc data in qdisc_create()" (attached). | | | Does that patch fix the problem? | Hi! No, but that patch is necessary for me to use QoS at all, or the kernel oopses. I was refering to that patch for you to know that's not the same problem. Sorry for not being 100% clear. If you want to freeze your networking :-) you can do this: remove pppd (or adjust the ppp0 interface name later) # killall pppd # sleep 10 make a fony connection to 1.1.1.2 using /dev/null #pppd /dev/null connect /bin/true persist demand 1.1.1.1:1.1.1.2 # sleep 1 add a CBQ root to ppp0 (or ppp1, if you didn't killall and have another running) # tc qdisc add dev ppp0 root handle 1: cbq avpkt 1000 bandwidth 10mbit ping the fony remote: # ping 1.1.1.2 kill pppd #killall pppd Now check dmesg, you should get "unregister_netdevice: waiting for ppp0 to become free. Usage count = 1" Another remark: In single user mode pppd died and system load is 0. In initlevel 3, pppd eats all my CPU... Don't know why. Right now I'm testing 2.6.8.1-ck3 (because of that can't-burn-cdrom thing and other stuff) so the attached /proc/config.gz is somewhat non-vanilla, but this happens with 2.6.8-rc4-bk1[*] and above. [*] this version is "bad" and 2.6.8-rc2-bk11 is "good". Didn't test with rc3... As you can see in the .config I'm using the OLD POLICER. As always, please request more info if you need it! :-) Regards, Nuno Silva -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBKFL5OPig54MP17wRAsHeAJ4nZFSW7nat0/aahUokzriHIueO5wCgqPCM EogRAFF/jofq4kN609j6dFc= =1HPc -----END PGP SIGNATURE----- --------------080409040605070903040809 Content-Type: application/x-gzip; name="config.gz" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="config.gz" H4sIAIvIJkECA4xcS3PbuLLez69Q1SxuUpWZ6GXFPlVZgCAoYUQQMADqkQ1LYzOO7siWjyzP xP/+NPiQABKUZ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1UBdrJn/oLuZOlcq8AitkrMjXTnfj8OUC S7r82FsvRdJ4jYF09BPNHcYnexz9PN7/R4qFXvv17zDiJt2VsTRoXpLeyeoQcoOodXfxHrYf QXwwKmiED01QG/89roCtTLKO4QOwsCCn3ww1SHiEa9U72eIoZAEwvcODm7H3ataUAlX0ffN7 tmvQSXxYU8SRo5FjuhPNYFpgSmcOm3w8pQ+T9inA35QYJglqzf0d7/u3l/P1NzmMJjfna1VT 9xd8+f18vfyovRD1Y2zxECfZkda/xZsJGhgVNKZDA4be1IDNtMT4QoMJlNxHenhGfSEa2KNx bxtsJQL3ZVuNOT/ERhxjyEgOJQ3O/KyaOXpd8Jm9mRHVeXOf6fmmrt5Auy27oweK3QfWMavU jww5bJ/w0ir1MGtrkroT2zVUpTfnBefvL8eX36OXy9v1/HSSet+tXJdThwCRH1EQ+aopod99 AoZTR66qQLUPwFG84jHqcfgOIo0SCH//P1Rtkdu7oAAA --------------080409040605070903040809-- From herbert@gondor.apana.org.au Sun Aug 22 01:07:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 01:07: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 i7M87je7021755 for ; Sun, 22 Aug 2004 01:07:48 -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 1BynNM-0006pZ-00; Sun, 22 Aug 2004 18:06:52 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BynNG-0007qB-00; Sun, 22 Aug 2004 18:06:46 +1000 From: Herbert Xu To: davem@redhat.com (David S. Miller) Subject: Re: Oops: Process zebra, EIP is at fib_create_info+0x22b/0x580 Cc: vrsbs@derbian.org, netdev@oss.sgi.com Organization: Core In-Reply-To: <20040821221751.547feefe.davem@redhat.com> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Sun, 22 Aug 2004 18:06:46 +1000 X-archive-position: 7958 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: 908 Lines: 24 David S. Miller wrote: > On Sun, 22 Aug 2004 00:04:17 +0300 > Joonas Kortesalmi wrote: > >> Running 2.6.8.1 and got a nice Oops from zebra (quagga). > > Can you figure out where exactly this OOPS is in fib_create_info()? This is very similar to the report in the message titled "2.6.8 + sargs = pb" where fib_info_list was corrupted. In fact, the corrupted fib_next value here is exactly the same as the other report. Not only that, the value appears to be a valid i386 instruction possibly coming from somewhere else in net/ipv4 code. Do you know of any changes between 2.6.7 and 2.6.8 that might impact on the FIB stuff? Any locking changes? 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 Aug 22 01:15:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 01:15: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 i7M8FCvs022537 for ; Sun, 22 Aug 2004 01:15: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 1BynV7-0006tq-00; Sun, 22 Aug 2004 18:14:53 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BynUy-0007t1-00; Sun, 22 Aug 2004 18:14:44 +1000 From: Herbert Xu To: nuno.silva@vgertech.com (Nuno Silva) Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 Cc: linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com, kaber@trash.net Organization: Core In-Reply-To: <41280163.1050508@vgertech.com> X-Newsgroups: apana.lists.os.linux.kernel,apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Sun, 22 Aug 2004 18:14:44 +1000 X-archive-position: 7959 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: 670 Lines: 21 Nuno Silva wrote: > > The problem is in the QoS code. If I start ppp whithout the OK, this appears to be due to the changeset titled [PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callback It adds a reference to dev. I don't see any code that cleans up that reference when the dev goes down. So someone needs to add that similar to the code in net/core/dst.c. Patrick, could you please have a look at this? 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 kaber@trash.net Sun Aug 22 05:40:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 05:40:20 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MCeAXZ005865 for ; Sun, 22 Aug 2004 05:40:11 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id F332C19F33C; Sun, 22 Aug 2004 14:39:58 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 0558B394179; Sun, 22 Aug 2004 14:39:57 +0200 (CEST) Message-ID: <4128941D.9030000@trash.net> Date: Sun, 22 Aug 2004 14:39: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: Herbert Xu , Nuno Silva , linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------040809050802040307090201" X-archive-position: 7961 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: 4174 Lines: 180 This is a multi-part message in MIME format. --------------040809050802040307090201 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Herbert Xu wrote: >Nuno Silva wrote: > > >>The problem is in the QoS code. If I start ppp whithout the >> >> > >OK, this appears to be due to the changeset titled > >[PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callback > >It adds a reference to dev. > >I don't see any code that cleans up that reference when the dev goes >down. So someone needs to add that similar to the code in net/core/dst.c. > >Patrick, could you please have a look at this? > > The reference is dropped in __qdisc_destroy. The problem lies in the CBQ qdisc, it doesn't destroy the root-class and leaks the inner qdisc. These two patches for 2.4 and 2.6 fix the problem. Regards Patrick --------------040809050802040307090201 Content-Type: text/x-patch; name="01-2.4-cbq-leaks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-2.4-cbq-leaks.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/22 14:37:58+02:00 kaber@coreworks.de # [PKT_SCHED]: Fix class leak in CBQ scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_cbq.c # 2004/08/22 14:37:27+02:00 kaber@coreworks.de +8 -6 # [PKT_SCHED]: Fix class leak in CBQ scheduler # diff -Nru a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c --- a/net/sched/sch_cbq.c 2004-08-22 14:38:18 +02:00 +++ b/net/sched/sch_cbq.c 2004-08-22 14:38:18 +02:00 @@ -1712,15 +1712,18 @@ } } -static void cbq_destroy_class(struct cbq_class *cl) +static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl) { + struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + cbq_destroy_filters(cl); qdisc_destroy(cl->q); qdisc_put_rtab(cl->R_tab); #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&cl->stats); #endif - kfree(cl); + if (cl != &q->link) + kfree(cl); } static void @@ -1743,8 +1746,7 @@ for (cl = q->classes[h]; cl; cl = next) { next = cl->next; - if (cl != &q->link) - cbq_destroy_class(cl); + cbq_destroy_class(sch, cl); } } @@ -1766,7 +1768,7 @@ spin_unlock_bh(&sch->dev->queue_lock); #endif - cbq_destroy_class(cl); + cbq_destroy_class(sch, cl); } } @@ -2000,7 +2002,7 @@ sch_tree_unlock(sch); if (--cl->refcnt == 0) - cbq_destroy_class(cl); + cbq_destroy_class(sch, cl); return 0; } --------------040809050802040307090201 Content-Type: text/x-patch; name="01-2.6-cbq-leaks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-2.6-cbq-leaks.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/22 14:30:32+02:00 kaber@coreworks.de # [PKT_SCHED]: Fix class leak in CBQ scheduler # # Signed-off-by: Patrick McHardy # # net/sched/sch_cbq.c # 2004/08/22 14:30:13+02:00 kaber@coreworks.de +8 -6 # [PKT_SCHED]: Fix class leak in CBQ scheduler # diff -Nru a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c --- a/net/sched/sch_cbq.c 2004-08-22 14:33:59 +02:00 +++ b/net/sched/sch_cbq.c 2004-08-22 14:33:59 +02:00 @@ -1746,15 +1746,18 @@ } } -static void cbq_destroy_class(struct cbq_class *cl) +static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl) { + struct cbq_sched_data *q = qdisc_priv(sch); + cbq_destroy_filters(cl); qdisc_destroy(cl->q); qdisc_put_rtab(cl->R_tab); #ifdef CONFIG_NET_ESTIMATOR qdisc_kill_estimator(&cl->stats); #endif - kfree(cl); + if (cl != &q->link) + kfree(cl); } static void @@ -1777,8 +1780,7 @@ for (cl = q->classes[h]; cl; cl = next) { next = cl->next; - if (cl != &q->link) - cbq_destroy_class(cl); + cbq_destroy_class(sch, cl); } } @@ -1799,7 +1801,7 @@ spin_unlock_bh(&sch->dev->queue_lock); #endif - cbq_destroy_class(cl); + cbq_destroy_class(sch, cl); } } @@ -2035,7 +2037,7 @@ sch_tree_unlock(sch); if (--cl->refcnt == 0) - cbq_destroy_class(cl); + cbq_destroy_class(sch, cl); return 0; } --------------040809050802040307090201-- From kaber@trash.net Sun Aug 22 05:42:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 05:42:58 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MCgmU9006108 for ; Sun, 22 Aug 2004 05:42:49 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 4B74319F33C; Sun, 22 Aug 2004 14:42:37 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 71EC9394179; Sun, 22 Aug 2004 14:42:36 +0200 (CEST) Message-ID: <412894BB.9090906@trash.net> Date: Sun, 22 Aug 2004 14:42:35 +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]: Missing dev_put in qdisc_create error path Content-Type: multipart/mixed; boundary="------------060307060803070800080802" X-archive-position: 7962 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: 1755 Lines: 69 This is a multi-part message in MIME format. --------------060307060803070800080802 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch fixes missing dev_puts in qdisc_create and qdisc_create_dflt error paths. Regards Patrick --------------060307060803070800080802 Content-Type: text/x-patch; name="02-2.6-dev-leaks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02-2.6-dev-leaks.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/22 14:33:26+02:00 kaber@coreworks.de # [PKT_SCHED]: Missing dev_put in error path # # Signed-off-by: Patrick McHardy # # net/sched/sch_generic.c # 2004/08/22 14:33:06+02:00 kaber@coreworks.de +1 -0 # [PKT_SCHED]: Missing dev_put in error path # # net/sched/sch_api.c # 2004/08/22 14:33:06+02:00 kaber@coreworks.de +3 -1 # [PKT_SCHED]: Missing dev_put in error path # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-22 14:34:34 +02:00 +++ b/net/sched/sch_api.c 2004-08-22 14:34:34 +02:00 @@ -441,7 +441,7 @@ handle = qdisc_alloc_handle(dev); err = -ENOMEM; if (handle == 0) - goto err_out2; + goto err_out3; } if (handle == TC_H_INGRESS) @@ -464,6 +464,8 @@ #endif return sch; } +err_out3: + dev_put(dev); err_out2: module_put(ops->owner); err_out: diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-08-22 14:34:34 +02:00 +++ b/net/sched/sch_generic.c 2004-08-22 14:34:34 +02:00 @@ -415,6 +415,7 @@ if (!ops->init || ops->init(sch, NULL) == 0) return sch; + dev_put(dev); kfree(p); return NULL; } --------------060307060803070800080802-- From kaber@trash.net Sun Aug 22 05:58:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 05:58:22 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MCwFBi006702 for ; Sun, 22 Aug 2004 05:58:15 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id D5FB219F33C; Sun, 22 Aug 2004 14:58:02 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 1B591394179; Sun, 22 Aug 2004 14:58:02 +0200 (CEST) Message-ID: <41289859.2040803@trash.net> Date: Sun, 22 Aug 2004 14:58:01 +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: laforge@netfilter.org, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@sunbeam.de.gnumonks.org> <20040819071846.2d0d6120.davem@redhat.com> <4124BF7E.7090304@trash.net> <20040819081428.5243e314.davem@redhat.com> <412765DC.30600@trash.net> <20040821221344.6dbc98ed.davem@redhat.com> In-Reply-To: <20040821221344.6dbc98ed.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7963 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: 1221 Lines: 37 David S. Miller wrote: >On Sat, 21 Aug 2004 17:10:20 +0200 >Patrick McHardy wrote: > >>The problem is that conntrack unload can cause packets without a >>dst_entry to appear in ip_local_deliver, which is already after >>the call to dst_input. >> >> > >How can it call ip_local_deliver() without a valid skb->dst? >That function is only invoked via skb->dst->input(skb) which >by implication means that skb->dst is non-NULL. > >Actually there is a call via ip_mr_input() but that code also >has a precondition that skb->dst is non-NULL too. I say this >due to the unchecked skb->dst accesses it makes early on. > >Please explain. I don't question that it happens, just show >me how :-) > > The first fragment (offset=0) is given to ip_defrag by conntrack at PRE_ROUTING, without a dst_entry. Then conntrack is unloaded. Further fragments are now queued in ip_local_deliver. When the packet is reassembled and "continues" its way from ip_local_deliver, it doesn't have a dst_entry. The opposite way is of course also possible, packets queued in ip_local_deliver can jump and appear in the PRE_ROUTING hook when conntrack is loaded, but that way doesn't seem to cause problems. Regards Patrick From lista4@comhem.se Sun Aug 22 08:04:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 08:04:57 -0700 (PDT) Received: from av11-1-sn4.m-sp.skanova.net (av11-1-sn4.m-sp.skanova.net [81.228.10.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MF4mdO009343 for ; Sun, 22 Aug 2004 08:04:49 -0700 Received: by av11-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 7F41537E45; Sun, 22 Aug 2004 17:04:36 +0200 (CEST) Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av11-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 6D55737E44; Sun, 22 Aug 2004 17:04:36 +0200 (CEST) Received: from d1o404.telia.com (d1o404.telia.com [195.67.199.131]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 1901B37E42; Sun, 22 Aug 2004 17:04:36 +0200 (CEST) Received: by d1o404.telia.com (8.11.1/8.10.1) id i7MF4Z719895; Sun, 22 Aug 2004 17:04:35 +0200 (CEST) Date: Sun, 22 Aug 2004 17:04:35 +0200 (CEST) Message-Id: <200408221504.i7MF4Z719895@d1o404.telia.com> X-Authentication-Warning: d1o404.telia.com: www set sender to lista4@comhem.se using -f From: "Voluspa" Reply-To: "Voluspa" To: linux-kernel@vger.kernel.org Cc: netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 X-Mailer: SF Webmail X-SF-webmail-clientstamp: [213.64.150.229] 2004-08-22 17:04:35 X-archive-position: 7964 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lista4@comhem.se Precedence: bulk X-list: netdev Content-Length: 3127 Lines: 88 Greetings, NOTE I wrote the text below just prior to the posting of 01-2.6-cbq-leaks.diff but applying it doesn't change the situation here. I still get the same Oops as below. Slight changes in memory address but the Call Trace is identical. So, different problem? ENDNOTE Yes, saw the same thing on eth0 but had a confusing time to catch a clean error situation. Having been used to stable kernels for a long time I've disabled all debugging options and compile for size. So when 2.6.8[.1] threw an Oops at the end of every "shutdown -r now" the feedback was useless ("halt" gave no Oops). What looked to be the same Oops came when doing a "rmmod 8139too". 2.6.7 has no such issues. Turning on CONFIG_KALLSYMS (and CONFIG_CC_OPTIMIZE_FOR_SIZE off), with CONFIG_FRAME_POINTER, a slew of other debug options and the CONFIG_MAGIC_SYSRQ, hid the Oops and gave the result Nuno Silva has described. To make a long story short, I didn't trust my very old system enough to report. But now I've seen the QoS/wshaper connection and achieved a good Oops with only CONFIG_KALLSYMS and CONFIG_FRAME_POINTER set. Typing it here in case it has some kind of value (hand-copied): [...] Unmounting local filesystems... Flushing filesystem buffers... Please stand by while rebooting... Unable to handle kernel paging request at virtual address 8bc289a9 printing eip: c02ae9c0 *pde = 00000000 Ooops: 0000 [#1] PREEMPT Modules linked in: 8139too crc32 CPU: 0 EIP: 0060:[] Not tainted EFLAGS: 00010286 (2.6.8-debug) EIP is at fib_sync_down+0x50/0xb0 eax: cfaee800 ebx: 948bff0d ecx: 8bc28955 edx: c0267eb8 esi: 00000001 edi: 00000000 ebp: cf0a1ea4 esp: cf0a1e8c de: 007b es: 007b ss: 0068 Process reboot (pid: 151, threadinfo=cf0a1000 task=cfa3e090) Stack: 000000ff 00000001 cfaee800 cfaee800 cfaee800 00000002 cf0a1eb0 c02ad8d1 c033affc cf0a1ebc c02ad9b9 c033affc cf0a1ed0 c0121508 cfaee800 00000002 00001003 cf0a1ee0 c025dadf cfaee800 00000002 cf0a1ef8 c025ef32 00000000 Call Trace: [] show_stack+0x7a/0x90 [] show_registers+0x149/0x1a0 [] die+0x8d/0x100 [] do_page_fault+0x1e5/0x569 [] error_code+0x2d/0x38 [] fib_disable_ip+0x11/0x30 [] fib_netdev_event+0x69/0x80 [] notifier_call_chain+0x28/0x50 [] dev_close+0x8f/0xa0 [] dev_change_flags+0x52/0x120 [] devinet_ioctl+0x245/0x590 [] inet_ioctl+0x63/0xb0 [] sock_ioctl+0xe2/0x230 [] sys_ioctl+0x105/0x260 [] syscall_call+0x7/0xb Code: 8b 41 54 85 c0 74 19 8d 51 58 31 f6 8b 5a 04 f6 c3 01 74 2c /etc/rc.d/rc.6: line 49: 151 Segmentation fault /sbin/reboot -d -f -i INIT: no more processes left in this runlevel <5>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). --endOops-- The -i parametre to reboot (which is a symlink to halt) means to shut down all network interfaces. My halt command doesn't use the -i, hence the lack of Oops. Mvh Mats Johannesson From ak@suse.de Sun Aug 22 08:06:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 08:06:34 -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 i7MF6Jrd009563 for ; Sun, 22 Aug 2004 08:06:21 -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 444C6AC90E3; Sun, 22 Aug 2004 17:04:20 +0200 (CEST) Date: Sun, 22 Aug 2004 17:04:14 +0200 From: Andi Kleen To: "David S. Miller" Cc: root@chaos.analogic.com, adilger@clusterfs.com, jlcooke@certainkey.com, shemminger@osdl.org, alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040822170414.3ecab1e5.ak@suse.de> In-Reply-To: <20040820124823.071ac1d9.davem@redhat.com> References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> <20040820124823.071ac1d9.davem@redhat.com> 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: 7965 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: 442 Lines: 14 On Fri, 20 Aug 2004 12:48:23 -0700 "David S. Miller" wrote: > > I wouldn't suggest converting it to 'C' because the rotation > > takes many CPU instructions when one tries to do the test, shift, > > and OR in 'C', > > You only need 2 'shifts' and an 'or' to do a rotate in C. > No tests are needed. gcc is clever enough to detect the common C patterns for rotate and generate a real ROL when the CPU supports it. -Andi From mcgrof@studorgs.rutgers.edu Sun Aug 22 08:15:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 08:15:33 -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 i7MFFSKv010214 for ; Sun, 22 Aug 2004 08:15:29 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id C62A1F9DF7; Sun, 22 Aug 2004 11:15:21 -0400 (EDT) Date: Sun, 22 Aug 2004 11:15:21 -0400 To: Jeff Garzik Cc: Netdev , prism54-devel@prism54.org, Jouni Malinen Subject: [PATCH] prism54: fix wpa_supplicant frequency parsing Message-ID: <20040822151521.GB22126@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , Netdev , prism54-devel@prism54.org, Jouni Malinen Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ycz6tD7Th1CMF4v7" Content-Disposition: inline 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: 7966 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: 2520 Lines: 83 --Ycz6tD7Th1CMF4v7 Content-Type: multipart/mixed; boundary="4ZLFUWh1odzi/v6L" Content-Disposition: inline --4ZLFUWh1odzi/v6L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jeff, the attached patch fixes wpa_supplicant frequency parsing as it relies on frequency and not channel. With this patch both channel and frequency are shown in a scan (iwlist eth0 scan). This patch goes on top of my previo= us set of patches (and before that ontop of Margit's patches, which you have not yet committed). This goes for 2.6 and 2.4.=20 2004-08-22 Luis R. Rodriguez This work fixes wpa_supplicant frequency parsing. iwlist eth0 scan will now show channel and frequency. * isl_ioctl (prism54_get_freq): use fwrq->e=3D6 as default * isl_ioctl (prism54_translate_bss): no need now of=20 channel_of_freq, and use fwrq->e=3D6 as default Luis --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --4ZLFUWh1odzi/v6L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="freq.diff" Content-Transfer-Encoding: quoted-printable diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c linux-2.= 6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-18 14:15= :13.000000000 -0400 +++ linux-2.6.8.1-prism54/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-= 22 09:08:37.000000000 -0400 @@ -303,7 +303,7 @@ prism54_get_freq(struct net_device *ndev fwrq->i =3D r.u; rvalue |=3D mgt_get_request(priv, DOT11_OID_FREQUENCY, 0, NULL, &r); fwrq->m =3D r.u; - fwrq->e =3D 3; + fwrq->e =3D 6; =20 return rvalue; } @@ -604,8 +604,8 @@ prism54_translate_bss(struct net_device=20 current_ev =3D iwe_stream_add_point(current_ev, end_buf, &iwe, NULL); =20 /* Add frequency. (short) bss->channel is the frequency in MHz */ - iwe.u.freq.m =3D channel_of_freq(bss->channel); - iwe.u.freq.e =3D 0; + iwe.u.freq.m =3D bss->channel; + iwe.u.freq.e =3D 6; iwe.cmd =3D SIOCGIWFREQ; current_ev =3D iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); --4ZLFUWh1odzi/v6L-- --Ycz6tD7Th1CMF4v7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBKLiJat1JN+IKUl4RAlL9AJwIPCZlXTDsTwAui5q1FQlAKH6WbQCcC+QX 2drL/YlkzJw0TAnJMQmEOm0= =0euk -----END PGP SIGNATURE----- --Ycz6tD7Th1CMF4v7-- From hadi@cyberus.ca Sun Aug 22 08:17:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 08:17:37 -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 i7MFHVgv010546 for ; Sun, 22 Aug 2004 08:17:32 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1Byu5z-0003FB-94 for netdev@oss.sgi.com; Sun, 22 Aug 2004 11:17:23 -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 1Byu5t-0002L4-V1; Sun, 22 Aug 2004 11:17:18 -0400 Subject: Billing 1: WAS (Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <41220AEA.20409@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093187835.1042.95.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Aug 2004 11:17:15 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7967 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: 972 Lines: 28 Apologies for latency - was busy at (my real) work. Let me break this email into several ones since it is getting long. On Tue, 2004-08-17 at 09:40, sandr8 wrote: > something like enqueue(dev) that will indirectly call dev->qdisc->enqueue > and handle in that single place that stuff that does not fit well in > net/core/dev.c Enqueue of _root_ qdisc is the place to do it. Maybe even dev.c calls to it. Lets defer this to the next email. Let me say this: I am happy with Haralds billing patch which is already in as is. In other words, although there is an accounting discrepancy it is not that big. What does that mean? unbilling is not something to rush in and patch in if its going to have an impact on other pieces. It doesnt matter whether it goes in in 2.6.20 or doesnt even go in as far as i am concerned. However this shouldnt dicourage you because you have actually opened an issue we need to resolve. So please keep up the discussions. cheers, jamal From hadi@cyberus.ca Sun Aug 22 08:38:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 08:38:22 -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 i7MFcIDb014383 for ; Sun, 22 Aug 2004 08:38:18 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1ByuQ5-0002V3-Ky for netdev@oss.sgi.com; Sun, 22 Aug 2004 11:38:09 -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 1ByuQ3-0003eO-7h; Sun, 22 Aug 2004 11:38:07 -0400 Subject: Billing 2: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <41220AEA.20409@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093189084.1039.137.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Aug 2004 11:38:05 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7968 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: 2119 Lines: 52 On Tue, 2004-08-17 at 09:40, sandr8 wrote: > jamal wrote: > >Dropping packets at the policer is policy definition. Dropping packets > >at the qdisc due to full queue is an accident. An accident that in > >a good system shouldnt happen. > > > why it should not happen in a good system? > it is an accident that is a sympthom of something. when we > encounter that accident we detect that "sympthom" at the > scheduler. the way the scheduler reacts to that sympthom > is imho part of the policy. By "good system" i mean one with no resource bottlenecks or one that deals elegantly deals with bottlenecks. 1) A packet that is dropped because a queue is found to be full on enqueue() is an exception handling. Typically such a drop is a result of a bottleneck. In this specific case more than likely a bus overload (at least where i have seen it 100% of the time). My talk at SUCON will touch on some experiences in this area. In such a case you want the top layer to treat such behavior differently by perhaps backing off for a short while - i.e this is an internal resource congestion. Thats why TCP needs to be lied to with _BYPASS. 2) I see that as different from policing or firewalling where i have actually managed the resource myself and told the system to drop the packet. Essentially in #1 i am providing more intelligence to TCP so it can do smarter congestion control than it would have done otherwise (suing whatever std congestion algorithms ask it to). This is extremely valuable (and i think Linux is the only OS which does this). In #2 i dont want TCP to bypass its standard congestion control algorithm;at some point it discovers it and thinks theres congestion on the network - we just dont help. Not sure if that makes sense. > i'm somehow advocating that > the policer is something more than the mere filter, but the > filter + that part of the scheduler that decides what to drop... > from that viewpoint there is no big difference between > the filter drop and the "accidental drop" performed > nevertheless in compliance with a given policy. Refer to what i said above. cheers, jamal From kaber@trash.net Sun Aug 22 08:50:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 08:50:38 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MFoXMv014819 for ; Sun, 22 Aug 2004 08:50:33 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 6EFA819F33C; Sun, 22 Aug 2004 17:50:21 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 9A2AB39417B; Sun, 22 Aug 2004 17:50:20 +0200 (CEST) Message-ID: <4128C0BB.9060503@trash.net> Date: Sun, 22 Aug 2004 17:50: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: Voluspa Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 References: <200408221504.i7MF4Z719895@d1o404.telia.com> In-Reply-To: <200408221504.i7MF4Z719895@d1o404.telia.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7969 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: 462 Lines: 18 Voluspa wrote: >Greetings, > >NOTE >I wrote the text below just prior to the posting of >01-2.6-cbq-leaks.diff but applying it doesn't change the >situation here. I still get the same Oops as below. Slight >changes in memory address but the Call Trace is identical. >So, different problem? >ENDNOTE > Yes, your problem is a different one, but looks related to the one in the thread "Oops: Process zebra, EIP is at fib_create_info+0x22b/0x580". Regards Patrick From hadi@cyberus.ca Sun Aug 22 09:12:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 09:12:24 -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 i7MGCIYq015802 for ; Sun, 22 Aug 2004 09:12:18 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1Byuwz-0000jW-Ry for netdev@oss.sgi.com; Sun, 22 Aug 2004 12:12:09 -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 1Byuwx-0005qE-4u; Sun, 22 Aug 2004 12:12:07 -0400 Subject: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <41220AEA.20409@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093191124.1043.206.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Aug 2004 12:12:04 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7970 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: 4065 Lines: 99 On Tue, 2004-08-17 at 09:40, sandr8 wrote: > jamal wrote: > > >Yes, this is a hard question. Did you see the suggestion i proposed > >to Harald? > > > > > if it is the centralization of the stats with the reason code that, > for what concerns the ACCT, says wheter to bill or unbill i > think it is _really_ great :) > still, for what concerns the multiple interface delivery of the > same packet i don't see how it would be solved... Such packets are cloned or copied. I am going to assume the contrack data remains intact in both cases. LaForge? BTW, although i mentioned the multiple interfaces as an issue - thinking a little more i see retransmissions from TCP as well (when enqueue drops because of full queue) being a problem. Haralds patch bills in that case as well for each retransmitted packet that gets dropped because of full Q. So best place to really unbill is at the qdisc level. The only place for now i see that happening is in the case of drops i.e sch->stats.drops++ The dev.c area after enqueue() attempt is a more dangerous place to do it at (incase the skb doesnt exist because something freed it when enqueue was called. Also because thats one area open for returning more intelligent congestion level indicating codes) > would there be any magic to have some conntrack data per device > without having to execute the actual tracking twice but without locking > the whole conntrack either? That is the challenge at the moment. For starters i dont see it as an issue right now to do locking. Its a cost for the feature since Haralds patch is in. In the future we should make accounting a feature that could be turned on despite contracking and skbs should carry an accounting metadata with them. > what could be the "magic" to let the > conntrack do the hard work just once and handle the additional traffic > policing information separately, in an other data structure that is > mantained > on a device basis? that could also be the place where to count how much > a given flow is backlogged on a given interface... which could help in > choosing the dropping action... sorry, am i going too much further? No i think your idea is valuable. The challenge is say you have a million connections, then do you have a million locks (one per structure)? I think we could reduce it by having a pool of stats sharing a lock (maybe by placing them in a shared hash table with each bucket having a lock). You cant have too many locks and you cant have too few ;-> On your qdisc you say: > > > it is not ready, but to say it shortly, i'm trying to serve first who > has been > _served_ the less. > > from the first experiments i have made this behaves pretty well and smootly, > but i've noticed that _not_ unbilling can be pretty unfair towards udp > flows, > since they always keep sending. If qdisc drops on full Q and unbills i think it should work, no? If it drops because they abused a bandwidth level, shouldnt you punish them still? I think you should, but your mileage may vary. Note you also dont want to unbill more than once. If not maybe you can introduce something on the skb to indicate unbilling-happened (if done by policer) so root qdisc doesnt unbill again. I think the issue starts with defining what resource is being accounted for. In my view, you are accounting for both CPU and bandwidth. Lets start by asking What is the resource being accounted for? > it simply has a priority dequeue that is manained ordered on the > attained service. > if no drop occours, then accounting before enqueueing simply forecasts > the service > that will have been attained up to the packet currenlty being enqueued > when it will > be dequeued. [ much easier to code than to say... ] I think i understand. A packet that gets enqueued is _guaranteed_ to be transmitted unless overulled by admin policy. Ok, how about the idea of adding skb->unbilled which gets set when unbilling happens (in the aggregated stats_incr()). skb->unbilled gets zeroed at the root qdisc after return from enqueueing. cheers, jamal From margitsw@t-online.de Sun Aug 22 10:52:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 10:53:03 -0700 (PDT) Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MHqwSO017838 for ; Sun, 22 Aug 2004 10:52:59 -0700 Received: from fwd02.aul.t-online.de by mailout05.sul.t-online.com with smtp id 1BywWR-00054G-02; Sun, 22 Aug 2004 19:52:51 +0200 Received: from margit.t-online.de (G0SqToZa8eQw7IYxc3TuFF-cYBt3U5Cr+JCz1JXxarRKWxWrQfUyw7@[217.255.119.240]) by fwd02.sul.t-online.com with esmtp id 1BywWE-1V8d3Q0; Sun, 22 Aug 2004 19:52:38 +0200 Message-Id: <5.1.0.14.2.20040822195310.00b023e8@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 22 Aug 2004 19:53:48 +0200 To: netdev@oss.sgi.com From: margitsw@t-online.de (Margit Schubert-While) Subject: prism54: fix wpa_supplicant frequency parsing Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: G0SqToZa8eQw7IYxc3TuFF-cYBt3U5Cr+JCz1JXxarRKWxWrQfUyw7 X-archive-position: 7971 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: 182 Lines: 8 Eeek, iwconfig now shows : Mode:Managed Frequency:2462GHz Access Point: 00:09:5B:D0:34:BC instead of : Mode:Managed Frequency:2.462GHz Access Point: 00:09:5B:D0:34:BC Margit From garzik@havoc.gtf.org Sun Aug 22 14:05:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 14:05:21 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7ML5GYC024907 for ; Sun, 22 Aug 2004 14:05:16 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id B16BC7439; Sun, 22 Aug 2004 17:03:35 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7ML3ZG7006964; Sun, 22 Aug 2004 17:03:35 -0400 Date: Sun, 22 Aug 2004 17:03:35 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [BK PATCHES] large 2.6.x net driver update Message-ID: <20040822210335.GA6888@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: 7973 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: 7200 Lines: 192 Yep, all this has been waiting for -rc to end. This stuff has been simmering in -mm, sometimes for quite a while. Please do a bk pull bk://gkernel.bkbits.net/netdev-2.6 This will update the following files: include/asm-mips/mv64340.h | 1039 ------------ MAINTAINERS | 2 arch/mips/configs/jaguar-atx_defconfig | 8 arch/mips/configs/ocelot_c_defconfig | 2 arch/mips/momentum/jaguar_atx/prom.c | 4 arch/mips/momentum/ocelot_c/prom.c | 6 drivers/net/8139too.c | 4 drivers/net/8390.c | 36 drivers/net/8390.h | 12 drivers/net/Kconfig | 45 drivers/net/Makefile | 5 drivers/net/acenic.c | 156 - drivers/net/acenic.h | 2 drivers/net/e100.c | 89 - drivers/net/e1000/e1000.h | 24 drivers/net/e1000/e1000_ethtool.c | 146 + drivers/net/e1000/e1000_hw.c | 16 drivers/net/e1000/e1000_hw.h | 3 drivers/net/e1000/e1000_main.c | 486 +++--- drivers/net/e1000/e1000_param.c | 46 drivers/net/eepro100.c | 17 drivers/net/epic100.c | 426 +++-- drivers/net/gianfar.c | 1864 +++++++++++++++++++++++ drivers/net/gianfar.h | 535 ++++++ drivers/net/gianfar_ethtool.c | 525 ++++++ drivers/net/gianfar_phy.c | 661 ++++++++ drivers/net/gianfar_phy.h | 213 ++ drivers/net/gt64240eth.h | 402 +++++ drivers/net/gt96100eth.c | 119 - drivers/net/mv643xx_eth.c | 2646 +++++++++++++++++++++++++++++++++ drivers/net/mv643xx_eth.h | 601 +++++++ drivers/net/natsemi.c | 15 drivers/net/r8169.c | 655 +++++--- drivers/net/sk98lin/h/skdrv2nd.h | 54 drivers/net/sk98lin/skaddr.c | 4 drivers/net/sk98lin/skge.c | 742 +++------ drivers/net/via-rhine.c | 691 ++++---- drivers/net/via-velocity.c | 566 +++---- drivers/net/via-velocity.h | 4 drivers/net/wireless/airport.c | 34 drivers/net/wireless/hermes.c | 12 drivers/net/wireless/hermes.h | 133 + drivers/net/wireless/hermes_rid.h | 99 - drivers/net/wireless/ieee802_11.h | 1 drivers/net/wireless/orinoco.c | 2483 +++++++++++++++--------------- drivers/net/wireless/orinoco.h | 36 drivers/net/wireless/orinoco_cs.c | 70 drivers/net/wireless/orinoco_pci.c | 52 drivers/net/wireless/orinoco_plx.c | 203 +- drivers/net/wireless/orinoco_tmd.c | 56 include/linux/mii.h | 3 include/linux/mv643xx.h | 1039 ++++++++++++ include/linux/pci_ids.h | 1 53 files changed, 12411 insertions(+), 4682 deletions(-) through these ChangeSets: : o update gianfar ethernet driver : o natsemi netpoll support Adrian Bunk: o 2.6.8-rc1-mm1: 8139too: uninline rtl8139_start_thread Andrew Morton: o via-velocity warning fixes o fix via-velocity oopses Christoph Hellwig: o remove dead code from mv64340_eth o fix compiler warnings in mv64340_eth o allow modular mv64340_eth o convert skge to pci_driver API (2nd try) David Gibson: o orinoco merge preliminaries - update authorship information o orinoco merge preliminaries - more HW data o orinoco merge preliminaries - don't typedef structs o orinoco merge preliminaries - remove unneeded #includes o orinoco merge preliminaries - use name/version macros o orinoco merge preliminaries - miscelaneous o orinoco merge preliminaries - make things static o orinoco merge preliminaries - use BUG_ON() o orinoco merge preliminaries - comment/whitespace/spelling updates o orinoco merge preliminaries - spam stoppers o orinoco merge preliminaries - use ARRAY_SIZE() o orinoco merge preliminaries - use ALIGN() o orinoco merge preliminaries - use netdev_priv() o orinoco merge preliminaries - rearrange code o orinoco merge preliminaries - squash backwards compatibility Domen Puncer: o remove old ifdefs net/eepro100.c François Romieu: o via-velocity: use common crc16 code for WOL o via-velocity: unneeded forward declarations o via-velocity: ordering of Rx descriptors operations o via-velocity: Rx copybreak o via-velocity: Rx buffers allocation rework o via-velocity: velocity_receive_frame diets o via-velocity: uniformize use of OWNED_BY_NIC o via-velocity: PCI ID move o r8169: tx lock removal o r8169: gcc bug workaround o r8169: initial link setup rework o r8169: link handling and phy reset rework o r8169: ethtool .get_{settings/link} o r8169: ethtool .set_settings o r8169: janitoring o r8169: cosmetic renaming of a register o r8169: napi support o epic100: code removal in irq handler o epic100: spin_unlock_irqrestore avoidance o [netdrvr epic100] napi fixes o [netdrvr epic100] napi 3/3 - transmit path o [netdrvr epic100] napi 2/3 - receive path o [netdrvr epic100] napi 1/3 - just shuffle some code around o [netdrvr epic100] minor cleanups Ganesh Venkatesan: o e100 - driver version update o e100 - Auto MDI/MDI-X support o e100 - Support to load device firmware o e100 - fix stat counters rx_length_error and rx_over_errors o e100 - Support for Intel(R) PRO/100 VE Network Connection (82562) adapter o e100 - restore speed/duplex/autoneg settings after the completion of the diagnostic tests o e1000 - white space and related cleanup o e1000 - suspend/resume fix from alex@zodiac.dasalias.org o e1000 - more DPRINTK messages to syslog o e1000 - add compiler hints (likely/unlikely), check o e1000 - Shutdown PHY while bringing the interface o e1000 - Use pci_dma_sync_single_[for_device|for_cpu] o e1000 - include work down in tx path to decide when o e1000 - Avoid infinite loop while trying to o e1000 - TSO fixes (in preparation for IPv6 TSO) o e1000 - Use vmalloc for data structures not shared o e1000 - Enable TSO o e1000 - ethtool support (register dump, interrupt Herbert Xu: o Fix successive calls to spin_lock_irqsave in sk98lin Kumar Gala: o add new ethernet driver 'gianfar' Margit Schubert-While: o prism54 Clean up dev ids totally Mika Kukkonen: o Fix warnings drivers/net/sk98lin/skaddr.c Paul Gortmaker: o Remove obsolete code in 8390 driver Ralf Bächle: o GT96100 update o [netdrvr mv643xx] rename from mv64340 to mv643xx o New driver for MV64340 GigE Roger Luethi: o Add WOL support o Small fixes and clean-up o Media mode rewrite o Fix Tx engine race for good o Remove options, full_duplex parameters o Rewrite PHY detection o Remove lingering PHY special casing o fix mc_filter on big-endian arch o Restructure reset code Scott Feldman: o e100: use NAPI mode all the time Stephen Hemminger: o acenic - don't print eth%d in messages o module_param for acenic o [sparse] minor #if complaint From jgarzik@pobox.com Sun Aug 22 14:04:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 14:04: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 i7ML4Gnx024721 for ; Sun, 22 Aug 2004 14:04: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 1ByzVW-0002Wd-8o; Sun, 22 Aug 2004 22:04:06 +0100 Message-ID: <41290A39.5020107@pobox.com> Date: Sun, 22 Aug 2004 17:03:53 -0400 From: Jeff Garzik 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: Andy Fleming CC: Andy Fleming , Kumar Gala , "" , jamal , "" , Christoph Hellwig Subject: Re: [RFR] gianfar ethernet driver References: <89563A5C-CFAE-11D8-BA44-000393C30512@freescale.com> <1089170282.1038.80.camel@jzny.localdomain> <20040707032913.GA1822@havoc.gtf.org> <20040802231112.GA890@havoc.gtf.org> <4819CC65-E4DB-11D8-999F-000393C30512@freescale.com> <5016F2DB-E66A-11D8-B1F6-000393C30512@freescale.com> In-Reply-To: <5016F2DB-E66A-11D8-B1F6-000393C30512@freescale.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7972 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 romieu@fr.zoreil.com Sun Aug 22 14:42:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 14:42:14 -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 i7MLg8Ld026037 for ; Sun, 22 Aug 2004 14:42:09 -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 i7MLds45030465; Sun, 22 Aug 2004 23:39:54 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7MLdsN0030464; Sun, 22 Aug 2004 23:39:54 +0200 Date: Sun, 22 Aug 2004 23:39:54 +0200 From: Francois Romieu To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: [DESC 2.6.8.1-mm4] 8139too patches Message-ID: <20040822213954.GA29997@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: 7974 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: 684 Lines: 20 As Jeff pointed out, there was a flaw in the 8139too patches that I have submitted earlier. They are included in -mm as: 8139too-rx-fifo-overflow-recovery.patch 8139too: Rx fifo/overflow recovery 8139too-be-sure-to-progress-durin-rtl8139_rx.patch 8139too: be sure to progress durin rtl8139_rx() The initial issue which led to these patch was reported by Pasi Sjoholm on l-k/netdev. The brokenness that Jeff outlined was actually reported by Jurriaan later. Both have confirmed that the new version of the 8139too patches fix the original issue where it appeared and does not introduce new pesky behavior. Please replace the two patches with the two following ones. -- Ueimor From romieu@fr.zoreil.com Sun Aug 22 14:46:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 14:46:10 -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 i7MLk2fA026400 for ; Sun, 22 Aug 2004 14:46:03 -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 i7MLhb45030529; Sun, 22 Aug 2004 23:43:37 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7MLhaZq030528; Sun, 22 Aug 2004 23:43:37 +0200 Date: Sun, 22 Aug 2004 23:43:36 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 2/2] 8139too: be sure to progress during rtl8139_rx() Message-ID: <20040822214336.GB30478@electric-eye.fr.zoreil.com> References: <20040822213954.GA29997@electric-eye.fr.zoreil.com> <20040822214208.GA30478@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822214208.GA30478@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7975 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: 2020 Lines: 68 If the Rx buffer gets corrupted or the FIFO hangs in new interesting ways, this code prevents the driver from looping in ksoftirqd context without making any progress. Signed-off-by: Francois Romieu diff -puN drivers/net/8139too.c~8139too-20 drivers/net/8139too.c --- linux-2.6.8.1/drivers/net/8139too.c~8139too-20 2004-08-22 23:25:16.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/8139too.c 2004-08-22 23:25:16.000000000 +0200 @@ -593,6 +593,7 @@ struct rtl8139_private { int time_to_die; struct mii_if_info mii; unsigned int regs_len; + unsigned long fifo_copy_timeout; }; MODULE_AUTHOR ("Jeff Garzik "); @@ -1955,7 +1956,7 @@ static int rtl8139_rx(struct net_device unsigned int rx_size = 0; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," - " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, + " free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); @@ -1993,10 +1994,24 @@ static int rtl8139_rx(struct net_device * since EarlyRx is disabled. */ if (unlikely(rx_size == 0xfff0)) { + if (!tp->fifo_copy_timeout) + tp->fifo_copy_timeout = jiffies + 2; + else if (time_after(jiffies, tp->fifo_copy_timeout)) { + DPRINTK ("%s: hung FIFO. Reset.", dev->name); + rx_size = 0; + goto no_early_rx; + } + if (netif_msg_intr(tp)) { + printk(KERN_DEBUG "%s: fifo copy in progress.", + dev->name); + } tp->xstats.early_rx++; break; } +no_early_rx: + tp->fifo_copy_timeout = 0; + /* If Rx err or invalid rx_size/rx_status received * (which happens if we get lost in the ring), * Rx process gets reset, so we abort any further @@ -2057,6 +2072,14 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; + + /* + * The receive buffer should be mostly empty. + * Tell NAPI to reenable the Rx irq. + */ + if (tp->fifo_copy_timeout) + received = budget; + out: return received; } _ From romieu@fr.zoreil.com Sun Aug 22 14:46:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 14:46: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 i7MLk2ER026401 for ; Sun, 22 Aug 2004 14:46:03 -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 i7MLg845030522; Sun, 22 Aug 2004 23:42:08 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7MLg8Qa030521; Sun, 22 Aug 2004 23:42:08 +0200 Date: Sun, 22 Aug 2004 23:42:08 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 1/2] 8139too: Rx fifo/overflow recovery Message-ID: <20040822214208.GA30478@electric-eye.fr.zoreil.com> References: <20040822213954.GA29997@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822213954.GA29997@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 7976 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: 3125 Lines: 108 This patch allows to update the interrupt status register after an Rx overflow or a Rx fifo error even when the Rx buffer contains no packet. The update must be kept in the packet processing loop to prevent an Rx error storm. As an interesting behavior, the status of the interrupt status register must not be read early. Signed-off-by: Francois Romieu diff -puN drivers/net/8139too.c~8139too-10 drivers/net/8139too.c --- linux-2.6.8.1/drivers/net/8139too.c~8139too-10 2004-08-22 23:25:16.000000000 +0200 +++ linux-2.6.8.1-romieu/drivers/net/8139too.c 2004-08-22 23:25:16.000000000 +0200 @@ -1927,6 +1927,24 @@ static __inline__ void wrap_copy(struct } #endif +static void rtl8139_isr_ack(struct rtl8139_private *tp) +{ + void *ioaddr = tp->mmio_addr; + u16 status; + + status = RTL_R16 (IntrStatus) & RxAckBits; + + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; + } + RTL_W16_F (IntrStatus, RxAckBits); + } +} + static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { @@ -1934,6 +1952,7 @@ static int rtl8139_rx(struct net_device int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + unsigned int rx_size = 0; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, @@ -1944,10 +1963,8 @@ static int rtl8139_rx(struct net_device && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; - unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1977,7 +1994,7 @@ static int rtl8139_rx(struct net_device */ if (unlikely(rx_size == 0xfff0)) { tp->xstats.early_rx++; - goto done; + break; } /* If Rx err or invalid rx_size/rx_status received @@ -1989,7 +2006,8 @@ static int rtl8139_rx(struct net_device (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2025,19 +2043,11 @@ static int rtl8139_rx(struct net_device cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); - } + rtl8139_isr_ack(tp); } - done: + if (unlikely(!received || rx_size == 0xfff0)) + rtl8139_isr_ack(tp); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2047,6 +2057,7 @@ static int rtl8139_rx(struct net_device #endif tp->cur_rx = cur_rx; +out: return received; } _ From jgarzik@pobox.com Sun Aug 22 15:51:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 15:51: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 i7MMpjGa028131 for ; Sun, 22 Aug 2004 15:51: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 1Bz1BZ-00054E-Ro; Sun, 22 Aug 2004 23:51:38 +0100 Message-ID: <4129236E.9020205@pobox.com> Date: Sun, 22 Aug 2004 18:51:26 -0400 From: Jeff Garzik 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: Netdev CC: Linux Kernel , David Woodhouse Subject: Trivial IPv6-for-Fedora HOWTO Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7977 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: 4327 Lines: 113 So, thanks to David Woodhouse for showing me how to do this. IPv6 appears to be very, very close to a Just Works(tm) state. These instructions are for Fedora Core 2 users, and describe how to set up IPv6 automatically tunnelling (6to4) on an IPv4 network. If you are stuck on an IPv4-only network (like most of us), this enables communication with IPv6 hosts quickly, easily, and transparently. (this HOWTO is archived at http://yyz.us/ipv6-fc2-howto.html) Simple setup: 1) Append to /etc/sysconfig/network NETWORKING_IPV6=yes IPV6_DEFAULTDEV=tun6to4 2) Append to /etc/sysconfig/ifcfg-eth0 IPV6INIT=yes IPV6TO4INIT=yes 3) Reboot or restart your network interface. That's it! If you have an iptables ipv4 firewall, you'll want to F1) allow ipv6 tunnelled packets to pass through to ip6tables, by allowing protocol 41 iptables -A block -p 41 -j ACCEPT ("block" is a custom chain on my firewall) F2) duplicate your ipv4 firewall rules for ipv6, using ip6tables. Some things, like masquerade, are not applicable to ipv6. If you have an ipv4 NATing firewall, which serves as a router for a local network, you'll want to set up radvd and routing rules, so that your hosts autoconfigure ipv6 automatically based on your router's advertisements, and also so that your hosts truly speak native ipv6 without tunneling [the router does the tunnel wrap/unwrap]. R1.1) in /etc/radvd.conf, set "interface ethX" to reflect your router's local LAN interface (eth1 on my own firewall). R1.2) in radvd.conf, comment out "example of a standard prefix" prefix {} block R1.3) in radvd.conf, edit the line "prefix 0:0:0:1234::/64" and change "1234" to a network number of your choice. R1.4) in radvd.conf, edit line "Base6to4Interface ppp0" to reflect the interface doing the 6to4 tunnelling (eth0 on my own firewall). R2) add routing rules for the local network. # ip -6 route add 2002:184a:9ba9:1010::/64 dev eth1 # ip -6 addr add 2002:184a:9ba9:1010::1 dev eth1 You cat get the 2002:... address (your 6to4 address, formed from your ipv4 address) from your ifconfig. In this example, "eth1" is my local LAN interface. eth0 is the interface to my ISP (DSL modem). Here is what my ifconfig output looks like, after everything is set up on my router/firewall: eth0 Link encap:Ethernet HWaddr 00:00:21:DE:DE:B5 inet addr:24.74.155.XXX Bcast:255.255.255.255 Mask:255.255.248.0 inet6 addr: fe80::200:21ff:fede:deb5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8759136 errors:0 dropped:0 overruns:0 frame:0 TX packets:2238155 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1647432957 (1571.1 Mb) TX bytes:166256535 (158.5 Mb) Interrupt:209 Base address:0x8c00 eth1 Link encap:Ethernet HWaddr 00:C0:9F:39:CD:B0 inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0 inet6 addr: 2002:184a:9ab9:110::1/128 Scope:Global inet6 addr: 2002:184a:9ab9:110:2c0:9fff:fe39:cdb0/64 Scope:Global inet6 addr: fe80::2c0:9fff:fe39:cdb0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9073144 errors:0 dropped:0 overruns:0 frame:0 TX packets:10916350 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1820645725 (1736.3 Mb) TX bytes:3611957866 (3444.6 Base address:0xece0 Memory:fe3e0000-fe400000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:440 errors:0 dropped:0 overruns:0 frame:0 TX packets:440 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:54209 (52.9 Kb) TX bytes:54209 (52.9 Kb) tun6to4 Link encap:IPv6-in-IPv4 inet6 addr: 2002:184a:9ab9::1/16 Scope:Global UP RUNNING NOARP MTU:1480 Metric:1 RX packets:1520 errors:0 dropped:0 overruns:0 frame:0 TX packets:1614 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:886384 (865.6 Kb) TX bytes:224041 (218.7 Kb) From paul@fraser.ipv6.net.au Sun Aug 22 16:08:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 16:08:52 -0700 (PDT) Received: from vscan02.westnet.com.au (vscan02.westnet.com.au [203.10.1.132]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7MN8gCt028665 for ; Sun, 22 Aug 2004 16:08:43 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 0288F11A6F2; Mon, 23 Aug 2004 07:08:30 +0800 (WST) Received: from [10.0.1.1] (dsl-202-173-146-76.qld.westnet.com.au [202.173.146.76]) by vscan02.westnet.com.au (Postfix) with ESMTP id 91E9811A6ED; Mon, 23 Aug 2004 07:08:28 +0800 (WST) Message-ID: <4129276A.4090001@fraser.ipv6.net.au> Date: Mon, 23 Aug 2004 09:08:26 +1000 From: Paul Fraser User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040819) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik Cc: Netdev , Linux Kernel , David Woodhouse Subject: Re: Trivial IPv6-for-Fedora HOWTO References: <4129236E.9020205@pobox.com> In-Reply-To: <4129236E.9020205@pobox.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7978 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: paul@fraser.ipv6.net.au Precedence: bulk X-list: netdev Content-Length: 5109 Lines: 130 You can also get an IPv6 tunnel at http://tunnelbroker.ipv6.net.au/ that will give you your own IPv6 tunnel and allocation. This isn't just an Australian site either - you can get either AU or US tunnels, and you can apply and use it anywhere in the world. Cheers, Paul Fraser paul@fraser.ipv6.net.au Jeff Garzik wrote: > > So, thanks to David Woodhouse for showing me how to do this. IPv6 > appears to be very, very close to a Just Works(tm) state. > > These instructions are for Fedora Core 2 users, and describe how to set > up IPv6 automatically tunnelling (6to4) on an IPv4 network. If you are > stuck on an IPv4-only network (like most of us), this enables > communication with IPv6 hosts quickly, easily, and transparently. > > (this HOWTO is archived at http://yyz.us/ipv6-fc2-howto.html) > > > Simple setup: > > 1) Append to /etc/sysconfig/network > > NETWORKING_IPV6=yes > IPV6_DEFAULTDEV=tun6to4 > > 2) Append to /etc/sysconfig/ifcfg-eth0 > > IPV6INIT=yes > IPV6TO4INIT=yes > > 3) Reboot or restart your network interface. > > That's it! > > > > If you have an iptables ipv4 firewall, you'll want to > > F1) allow ipv6 tunnelled packets to pass through to ip6tables, by > allowing protocol 41 > > iptables -A block -p 41 -j ACCEPT > ("block" is a custom chain on my firewall) > > F2) duplicate your ipv4 firewall rules for ipv6, using ip6tables. Some > things, like masquerade, are not applicable to ipv6. > > > > If you have an ipv4 NATing firewall, which serves as a router for a > local network, you'll want to set up radvd and routing rules, so that > your hosts autoconfigure ipv6 automatically based on your router's > advertisements, and also so that your hosts truly speak native ipv6 > without tunneling [the router does the tunnel wrap/unwrap]. > > R1.1) in /etc/radvd.conf, set "interface ethX" to reflect your router's > local LAN interface (eth1 on my own firewall). > > R1.2) in radvd.conf, comment out "example of a standard prefix" prefix > {} block > > R1.3) in radvd.conf, edit the line "prefix 0:0:0:1234::/64" and change > "1234" to a network number of your choice. > > R1.4) in radvd.conf, edit line "Base6to4Interface ppp0" to reflect the > interface doing the 6to4 tunnelling (eth0 on my own firewall). > > R2) add routing rules for the local network. > > # ip -6 route add 2002:184a:9ba9:1010::/64 dev eth1 > # ip -6 addr add 2002:184a:9ba9:1010::1 dev eth1 > > You cat get the 2002:... address (your 6to4 address, formed from your > ipv4 address) from your ifconfig. In this example, "eth1" is my local > LAN interface. eth0 is the interface to my ISP (DSL modem). > > Here is what my ifconfig output looks like, after everything is set up > on my router/firewall: > > eth0 Link encap:Ethernet HWaddr 00:00:21:DE:DE:B5 > inet addr:24.74.155.XXX Bcast:255.255.255.255 Mask:255.255.248.0 > inet6 addr: fe80::200:21ff:fede:deb5/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:8759136 errors:0 dropped:0 overruns:0 frame:0 > TX packets:2238155 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:1647432957 (1571.1 Mb) TX bytes:166256535 (158.5 Mb) > Interrupt:209 Base address:0x8c00 > > eth1 Link encap:Ethernet HWaddr 00:C0:9F:39:CD:B0 > inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0 > inet6 addr: 2002:184a:9ab9:110::1/128 Scope:Global > inet6 addr: 2002:184a:9ab9:110:2c0:9fff:fe39:cdb0/64 Scope:Global > inet6 addr: fe80::2c0:9fff:fe39:cdb0/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:9073144 errors:0 dropped:0 overruns:0 frame:0 > TX packets:10916350 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:1820645725 (1736.3 Mb) TX bytes:3611957866 (3444.6 > Base address:0xece0 Memory:fe3e0000-fe400000 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > inet6 addr: ::1/128 Scope:Host > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:440 errors:0 dropped:0 overruns:0 frame:0 > TX packets:440 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:54209 (52.9 Kb) TX bytes:54209 (52.9 Kb) > > tun6to4 Link encap:IPv6-in-IPv4 > inet6 addr: 2002:184a:9ab9::1/16 Scope:Global > UP RUNNING NOARP MTU:1480 Metric:1 > RX packets:1520 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1614 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:886384 (865.6 Kb) TX bytes:224041 (218.7 Kb) > > - > 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 jgarzik@pobox.com Sun Aug 22 16:22:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 16:22: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 i7MNMLIJ032375 for ; Sun, 22 Aug 2004 16:22: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 1Bz1fB-0005mt-4q; Mon, 23 Aug 2004 00:22:13 +0100 Message-ID: <41292A9A.4010007@pobox.com> Date: Sun, 22 Aug 2004 19:22:02 -0400 From: Jeff Garzik 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: Paul Fraser CC: Netdev , Linux Kernel , David Woodhouse Subject: Re: Trivial IPv6-for-Fedora HOWTO References: <4129236E.9020205@pobox.com> <4129276A.4090001@fraser.ipv6.net.au> In-Reply-To: <4129276A.4090001@fraser.ipv6.net.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7979 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: 600 Lines: 16 Paul Fraser wrote: > You can also get an IPv6 tunnel at http://tunnelbroker.ipv6.net.au/ that > will give you your own IPv6 tunnel and allocation. This isn't just an > Australian site either - you can get either AU or US tunnels, and you > can apply and use it anywhere in the world. Agreed, but the point of my post (and 6to4 in general) is that -- like the general theme of IPv6 itself -- using 6to4 under Fedora Core 2 works automatically. No need to worry about logging into a tunnel broker, and no need to worry about traffic with other 6to4 sites being sub-optimally routed. Jeff From alan@lxorguk.ukuu.org.uk Sun Aug 22 17:09:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 17:09:15 -0700 (PDT) Received: from localhost.localdomain (the-village.bc.nu [81.2.110.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7N098E7000886 for ; Sun, 22 Aug 2004 17:09:09 -0700 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.11/8.12.11) with ESMTP id i7MN6T3w025184; Mon, 23 Aug 2004 00:06:29 +0100 Received: (from alan@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id i7MN6RXH025183; Mon, 23 Aug 2004 00:06:27 +0100 X-Authentication-Warning: localhost.localdomain: alan set sender to alan@lxorguk.ukuu.org.uk using -f Subject: Re: Trivial IPv6-for-Fedora HOWTO From: Alan Cox To: Paul Fraser Cc: Jeff Garzik , Netdev , Linux Kernel Mailing List , David Woodhouse In-Reply-To: <4129276A.4090001@fraser.ipv6.net.au> References: <4129236E.9020205@pobox.com> <4129276A.4090001@fraser.ipv6.net.au> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1093215974.25181.0.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 23 Aug 2004 00:06:25 +0100 X-archive-position: 7980 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: alan@lxorguk.ukuu.org.uk Precedence: bulk X-list: netdev Content-Length: 485 Lines: 12 On Llu, 2004-08-23 at 00:08, Paul Fraser wrote: > You can also get an IPv6 tunnel at http://tunnelbroker.ipv6.net.au/ that > will give you your own IPv6 tunnel and allocation. This isn't just an > Australian site either - you can get either AU or US tunnels, and you > can apply and use it anywhere in the world. Quite a few ISP's will do actual IPv6 or tunnels. In the UK anyone with ADSL can switch provider to aaisp.net and get an IPv6 range and IPv6 tunnel for example. Alan From herbert@gondor.apana.org.au Sun Aug 22 19:05:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 19:05:37 -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 i7N25P5F003687 for ; Sun, 22 Aug 2004 19:05: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 1Bz4Ck-0004vG-00; Mon, 23 Aug 2004 12:05:02 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1Bz4Cc-00011R-00; Mon, 23 Aug 2004 12:04:54 +1000 From: Herbert Xu To: herbert@gondor.apana.org.au (Herbert Xu) Subject: Re: Oops: Process zebra, EIP is at fib_create_info+0x22b/0x580 Cc: davem@redhat.com, vrsbs@derbian.org, 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.26-1-686-smp (i686)) Message-Id: Date: Mon, 23 Aug 2004 12:04:54 +1000 X-archive-position: 7981 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: 460 Lines: 14 Herbert Xu wrote: > > Do you know of any changes between 2.6.7 and 2.6.8 that might impact > on the FIB stuff? Any locking changes? Actually, this looks like the qdisc align bug that Patrick fixed a week ago. 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 davem@redhat.com Sun Aug 22 21:48:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 21:48:27 -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 i7N4mLen010959 for ; Sun, 22 Aug 2004 21:48:22 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7N4m7e1023826; Mon, 23 Aug 2004 00:48:07 -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 i7N4m7a26989; Mon, 23 Aug 2004 00:48:07 -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 i7N4m3hZ002302; Mon, 23 Aug 2004 00:48:04 -0400 Date: Sun, 22 Aug 2004 21:47:46 -0700 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, nuno.silva@vgertech.com, linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 Message-Id: <20040822214746.1efb3682.davem@redhat.com> In-Reply-To: <4128941D.9030000@trash.net> References: <4128941D.9030000@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: 7982 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: 874 Lines: 30 On Sun, 22 Aug 2004 14:39:57 +0200 Patrick McHardy wrote: > Herbert Xu wrote: > > >Nuno Silva wrote: > > > > > >>The problem is in the QoS code. If I start ppp whithout the > >> > >> > > > >OK, this appears to be due to the changeset titled > > > >[PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callback > > > >It adds a reference to dev. > > > >I don't see any code that cleans up that reference when the dev goes > >down. So someone needs to add that similar to the code in net/core/dst.c. > > > >Patrick, could you please have a look at this? > > > The reference is dropped in __qdisc_destroy. The problem lies in the CBQ > qdisc, it doesn't destroy the root-class and leaks the inner qdisc. These > two patches for 2.4 and 2.6 fix the problem. Awesome, good detective work guys. Patch applied, thanks. From davem@redhat.com Sun Aug 22 21:50:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 21:50:12 -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 i7N4o8Pt011186 for ; Sun, 22 Aug 2004 21:50:08 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7N4o1e1024231; Mon, 23 Aug 2004 00:50:01 -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 i7N4o1a27247; Mon, 23 Aug 2004 00:50:01 -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 i7N4nwwA002559; Mon, 23 Aug 2004 00:49:58 -0400 Date: Sun, 22 Aug 2004 21:49:40 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Missing dev_put in qdisc_create error path Message-Id: <20040822214940.59309136.davem@redhat.com> In-Reply-To: <412894BB.9090906@trash.net> References: <412894BB.9090906@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: 7983 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: 192 Lines: 7 On Sun, 22 Aug 2004 14:42:35 +0200 Patrick McHardy wrote: > This patch fixes missing dev_puts in qdisc_create and > qdisc_create_dflt error paths. Applied, thanks Patrick. From davem@redhat.com Sun Aug 22 22:04:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 22 Aug 2004 22:04:16 -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 i7N548rr011886 for ; Sun, 22 Aug 2004 22:04:08 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7N53qe1026893; Mon, 23 Aug 2004 01:03:52 -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 i7N53qa29253; Mon, 23 Aug 2004 01:03:52 -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 i7N53nsU004541; Mon, 23 Aug 2004 01:03:49 -0400 Date: Sun, 22 Aug 2004 22:03:31 -0700 From: "David S. Miller" To: Patrick McHardy Cc: laforge@netfilter.org, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040822220331.561fc276.davem@redhat.com> In-Reply-To: <41289859.2040803@trash.net> References: <20040818091352.GB6507@suse.de> <20040819101159.GC3921@sunbeam.de.gnumonks.org> <20040819071846.2d0d6120.davem@redhat.com> <4124BF7E.7090304@trash.net> <20040819081428.5243e314.davem@redhat.com> <412765DC.30600@trash.net> <20040821221344.6dbc98ed.davem@redhat.com> <41289859.2040803@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: 7984 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: 671 Lines: 17 On Sun, 22 Aug 2004 14:58:01 +0200 Patrick McHardy wrote: > The first fragment (offset=0) is given to ip_defrag by conntrack > at PRE_ROUTING, without a dst_entry. Then conntrack is unloaded. > Further fragments are now queued in ip_local_deliver. When the > packet is reassembled and "continues" its way from > ip_local_deliver, it doesn't have a dst_entry. > > The opposite way is of course also possible, packets queued in > ip_local_deliver can jump and appear in the PRE_ROUTING hook > when conntrack is loaded, but that way doesn't seem to cause > problems. Thanks for the explanation Patrick. Let me brain storm on this on Monday (tomorrow). From sandr8_NOSPAM_@crocetta.org Mon Aug 23 02:34:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 02:34:31 -0700 (PDT) Received: from vsmtp2.tin.it (vsmtp2alice.tin.it [212.216.176.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7N9YORU021937 for ; Mon, 23 Aug 2004 02:34:25 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp2.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8CBC0010E4E0; Mon, 23 Aug 2004 11:33:19 +0200 Message-ID: <4129B9DF.8030402@crocetta.org> Date: Mon, 23 Aug 2004 11:33:19 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: Billing 1: WAS (Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093187835.1042.95.camel@jzny.localdomain> In-Reply-To: <1093187835.1042.95.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7985 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 1402 Lines: 45 jamal wrote: >Apologies for latency - was busy at (my real) work. > > you don't have to apologize for that :) it's something everybody can easily understand :) >Let me break this email into several ones since it is getting long. > >On Tue, 2004-08-17 at 09:40, sandr8 wrote: > > >>something like enqueue(dev) that will indirectly call dev->qdisc->enqueue >>and handle in that single place that stuff that does not fit well in >>net/core/dev.c >> >> > >Enqueue of _root_ qdisc is the place to do it. >Maybe even dev.c calls to it. Lets defer this to the next email. > > then i should add some code in every qdisc that can be root and execute it only if it is actually root? isn't it more complex? >Let me say this: >I am happy with Haralds billing patch which is already in as is. >In other words, although there is an accounting discrepancy it is not >that big. >What does that mean? unbilling is not something to rush in and patch in >if its going to have an impact on other pieces. It doesnt matter whether >it goes in in 2.6.20 or doesnt even go in as far as i am concerned. >However this shouldnt dicourage you because you have actually opened an >issue we need to resolve. So please keep up the discussions. > > sure, for the time being i thought to simply concentrate on the rest and maintain it as indipendent as possible from the choice that will be taken. cheers alessandro From sandr8_NOSPAM_@crocetta.org Mon Aug 23 02:40:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 02:40:08 -0700 (PDT) Received: from vsmtp1.tin.it (vsmtp1b.tin.it [212.216.176.141] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7N9e0aX022360 for ; Mon, 23 Aug 2004 02:40:01 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp1.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C680010F1FC; Mon, 23 Aug 2004 11:39:05 +0200 Message-ID: <4129BB3A.9000007@crocetta.org> Date: Mon, 23 Aug 2004 11:39:06 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> In-Reply-To: <1093191124.1043.206.camel@jzny.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7986 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 7449 Lines: 193 jamal wrote: >On Tue, 2004-08-17 at 09:40, sandr8 wrote: > > >>jamal wrote: >> >> > > > >>>Yes, this is a hard question. Did you see the suggestion i proposed >>>to Harald? >>> >>if it is the centralization of the stats with the reason code that, >>for what concerns the ACCT, says wheter to bill or unbill i >>think it is _really_ great :) >>still, for what concerns the multiple interface delivery of the >>same packet i don't see how it would be solved... >> >> > >Such packets are cloned or copied. I am going to assume the contrack >data remains intact in both cases. LaForge? >BTW, although i mentioned the multiple interfaces as an issue - thinking >a little more i see retransmissions from TCP as well (when enqueue drops >because of full queue) being a problem. > > imho, the point maybe is that a scheduler should work at layer 3, am i wrong? i mean: i made the same question to myself and answered that the right level should be the third... this would account for tcp retransmissions as well as forward error corrections packets added by some application on top of udp, or retrasmissions by applications on udp... or... whatever... maybe my reasoning is less foggy if i first answer to an other question: >I think the issue starts with defining what resource is being accounted >for. In my view, you are accounting for both CPU and bandwidth. >Lets start by asking What is the resource being accounted for? > > i would like to account for the number of bytes sent to the wire on behalf of each flow :) >Haralds patch bills in that case as well for each retransmitted packet >that gets dropped because of full Q. >So best place to really unbill is at the qdisc level. >The only place for now i see that happening is in the case of drops >i.e sch->stats.drops++ >The dev.c area after enqueue() attempt is a more dangerous place to do >it at (incase the skb doesnt exist because something freed it when >enqueue was called. Also because thats one area open for returning more >intelligent congestion level indicating codes) > > this seems not to be possible, afaik, with that patch i wrote. the only skbs that are freed are those that are internally allocated. and the only kfree_skb() that can happen on skbs that are enqueued in dev.c should be those in case od a TC_ACT_QUEUED or TC_ACT_STOLEN, where they should just decrement the user counter. i say "should" since this is the most reasonable assumption i managed to make, but this is your field and you definitely know it much better than me :) in that case, btw, dev.c doesn't get any drop return code... if a drop return code is given, the packet is not freed internally, but only "externally". (for the "where"... the question is open in "billing 1") where could a skb be freed then? [ i'm not insisting with that patch, i'm just trying to say that, if i don't rave, it should not be dangerous to do that after the enqueue()... then, it's just that for the moment i can't immagine a different way to do things in that place :) yes, there could be a slight variation with a skb_get() right before the enqueue and all the kfree_skb() at their place inside the code, but then somewhere we should always add a kfree_skb... ouch... and we would need a by ref skb anyway to get the packet that has been dropped and if it's not the same as the enqueued one also the enqueued one should pass through one more kfree_skb()... horrible, more complex and slower i'd say... ] >>would there be any magic to have some conntrack data per device >>without having to execute the actual tracking twice but without locking >>the whole conntrack either? >> >> > >That is the challenge at the moment. >For starters i dont see it as an issue right now to do locking. >Its a cost for the feature since Haralds patch is in. > >In the future we should make accounting a feature that could be turned >on despite contracking and skbs should carry an accounting metadata with >them. > > i need to think thoroughly on it... depending on where that information is kept, the complexity of some operations can change a lot... and i should not only egoistically think to the operations i need but look at it from the outside to have a less partisan viewpoint on the problem and find the most generally good solution possible. >>what could be the "magic" to let the >>conntrack do the hard work just once and handle the additional traffic >>policing information separately, in an other data structure that is >>mantained >>on a device basis? that could also be the place where to count how much >>a given flow is backlogged on a given interface... which could help in >>choosing the dropping action... sorry, am i going too much further? >> >> >No i think your idea is valuable. >The challenge is say you have a million connections, then do you >have a million locks (one per structure)? I think we could reduce it >by having a pool of stats sharing a lock (maybe by placing them in a >shared hash table with each bucket having a lock). > > yeah, that could be the right compromise :) >You cant have too many locks and you cant have too few ;-> > > >On your qdisc you say: > >>it is not ready, but to say it shortly, i'm trying to serve first who >>has been _served_ the less. >> >>from the first experiments i have made this behaves pretty well and smootly, >>but i've noticed that _not_ unbilling can be pretty unfair towards udp >>flows, >>since they always keep sending. >> >> > >If qdisc drops on full Q and unbills i think it should work, no? > > this is the case. i could do it on my own from inside my code, but then i would "pollute" the information seen from other parts of the kernel code and i would introduce a _new_ unfairness between those flows that pass though my qdisc and those that don't... to sum it up... it would be pretty unclean >If it drops because they abused a bandwidth level, shouldnt you punish >them still? I think you should, but your mileage may vary. >Note you also dont want to unbill more than once. If not maybe you can >introduce something on the skb to indicate unbilling-happened (if done >by policer) so root qdisc doesnt unbill again. > > you are thinking in that perspective because of tcp? as i said above, i would stop at layer 3... btw, if i don't misunderstand what you mean, i guess it's when tcp is retransmitting that that field should somehow be set... is it as feasible when we are not on an end-point as when we are an endpoint? btw, we should then do the same with the other protocols and, for example with udp, it would become application dependent... a suicide? >>it simply has a priority dequeue that is manained ordered on the >>attained service. >>if no drop occours, then accounting before enqueueing simply forecasts >>the service >>that will have been attained up to the packet currenlty being enqueued >>when it will >>be dequeued. [ much easier to code than to say... ] >> >> > >I think i understand. >A packet that gets enqueued is _guaranteed_ to be transmitted unless >overulled by admin policy. >Ok, how about the idea of adding skb->unbilled which gets set when >unbilling happens (in the aggregated stats_incr()). skb->unbilled gets >zeroed at the root qdisc after return from enqueueing. > > sorry?? i'm lost... maybe there's something implied i can't get... do you agree it's not the same skb that will be re-billed afterwards? >cheers, >jamal > ciao Alessandro :) From hadi@cyberus.ca Mon Aug 23 04:39:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 04:39:11 -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 i7NBd4V8030497 for ; Mon, 23 Aug 2004 04:39:04 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1BzDA6-0007qj-0q for netdev@oss.sgi.com; Mon, 23 Aug 2004 07:38:54 -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 1BzDA2-00037G-VS; Mon, 23 Aug 2004 07:38:51 -0400 Subject: Re: Billing 3-1: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <4129BB3A.9000007@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093261128.1044.759.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 23 Aug 2004 07:38:49 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7987 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: 2344 Lines: 59 On Mon, 2004-08-23 at 05:39, sandr8 wrote: > jamal wrote: > > >On Tue, 2004-08-17 at 09:40, sandr8 wrote: > > > > > >Such packets are cloned or copied. I am going to assume the contrack > >data remains intact in both cases. LaForge? > >BTW, although i mentioned the multiple interfaces as an issue - thinking > >a little more i see retransmissions from TCP as well (when enqueue drops > >because of full queue) being a problem. > > > > > imho, the point maybe is that a scheduler should work at layer 3, > am i wrong? > i mean: i made the same question to myself and answered that > the right level should be the third... this would account for tcp > retransmissions as well as forward error corrections packets > added by some application on top of udp, or retrasmissions by > applications on udp... or... whatever... Maybe state oughta be carried somehow from where the packets "starts" (eg application/L4 level) or ingress of system. This may complicate things - will need a lot more thinking (but is worth thinking about). > maybe my reasoning is less foggy if i first answer to an other > question: > > >I think the issue starts with defining what resource is being accounted > >for. In my view, you are accounting for both CPU and bandwidth. > >Lets start by asking What is the resource being accounted for? > > > > > i would like to account for the number of bytes sent to the wire > on behalf of each flow :) Ok, in this case, retransmissions have to be unbilled. To rewind to what i said a few emails ago: The best place to bill is by looking at what comes out of the box;-> Ok, we dont have that luxury in this case. So the next best place is to do it at the qdisc level. Because only at that level do you know for sure if packets made it out or not. Since contracking already does the job of marking the flow, then thats the second part of your requirement "on behalf of each flow". What we are doing now is hacking around to try and reduce the injustice. Conclusion: The current way of billing is _wrong_. The better way is to have contracking just mark and the qdisc decide on billing or unbilling. Have a billing table somewhere indexed by flow that increments these stats. For now i think that focussing on just sch.drops++ in case of full queue will help. Let me cut email here for readability. cheers, jamal From hadi@cyberus.ca Mon Aug 23 04:58:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 04:58:37 -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 i7NBwU5o032674 for ; Mon, 23 Aug 2004 04:58:31 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1BzDSu-0005pB-SH for netdev@oss.sgi.com; Mon, 23 Aug 2004 07:58:20 -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 1BzDSs-0004uN-RW; Mon, 23 Aug 2004 07:58:19 -0400 Subject: Re: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <4129BB3A.9000007@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093262296.1040.778.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 23 Aug 2004 07:58:17 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7988 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: 4493 Lines: 103 On Mon, 2004-08-23 at 05:39, sandr8 wrote: > jamal wrote: > >Haralds patch bills in that case as well for each retransmitted packet > >that gets dropped because of full Q. > >So best place to really unbill is at the qdisc level. > >The only place for now i see that happening is in the case of drops > >i.e sch->stats.drops++ > >The dev.c area after enqueue() attempt is a more dangerous place to do > >it at (incase the skb doesnt exist because something freed it when > >enqueue was called. Also because thats one area open for returning more > >intelligent congestion level indicating codes) > > > > > this seems not to be possible, afaik, with that patch i wrote. the only > skbs that are freed are those that are internally allocated. and the > only kfree_skb() that can happen on skbs that are enqueued in dev.c > should be those in case od a TC_ACT_QUEUED or TC_ACT_STOLEN, > where they should just decrement the user counter. i say "should" since > this is the most reasonable assumption i managed to make, but > this is your field and you definitely know it much better than me :) > in that case, btw, dev.c doesn't get any drop return code... > > if a drop return code is given, the packet is not freed internally, but > only "externally". (for the "where"... the question is open in "billing 1") > > where could a skb be freed then? Let me layout a few things: ..-->classification --> tcaction return code1 --> enqueue return code2 ...(packet may be freed here)--> dev.c The rules are: 1) A qdisc receiving a STOLEN/QUEUED/SHOT signal from the classification result (return code 1) MUST free the packet and immediately stop processing that packet. The infrastructure code will clone packets if they want to steal or queue it. Infact the skbs flow may even change during this path (eg packet rewritten) Billing issues: In such a case multiple packets may be later reinjected (after replicating the one that was stolen) which totaly bypass contracking code. Multiple packets may make it out to the wire. You need to find a way to bill them ;-> (opposite of what you are trying to do). 2)Return code (return code 2) of qdisc from enqueue function need to be dealt with care if the packet is localy generated so it doesnt confuse TCP (SCTP and DCCP sound like two other protocols that could be added) Here we have two paths: i) policy dropped packets. Billing issues: You want to unbill dropped but not stolen packets. ii) packets that are dropped because of a full Q should continue to return a XMIT_DROP. Billing: MUST unbill. Again as above shows, billing would work better at the qdisc level. > [ i'm not insisting with that patch, i'm just trying to say that, if i don't > rave, it should not be dangerous to do that after the enqueue()... > then, it's just that for the moment i can't immagine a different > way to do things in that place :) yes, there could be a slight > variation with a skb_get() right before the enqueue and all the > kfree_skb() at their place inside the code, but then somewhere > we should always add a kfree_skb... ouch... and we would need > a by ref skb anyway to get the packet that has been dropped > and if it's not the same as the enqueued one also the enqueued > one should pass through one more kfree_skb()... horrible, more > complex and slower i'd say... ] Linux is being efficient by sharing skbs. One of the most expensive things in a stack is copying packets around (which is avoided). If this was a simple system where allocating and freeing can be mapped to exactly a flow then what you suggest can be done. In Linux you cant. > >> > >That is the challenge at the moment. > >For starters i dont see it as an issue right now to do locking. > >Its a cost for the feature since Haralds patch is in. > > > >In the future we should make accounting a feature that could be turned > >on despite contracking and skbs should carry an accounting metadata with > >them. > > > > > i need to think thoroughly on it... depending on where that information is > kept, the complexity of some operations can change a lot... and i should > not only egoistically think to the operations i need but look at it from the > outside to have a less partisan viewpoint on the problem and find the > most generally good solution possible. I am begining to think that all contrack should do is mark the packets then let the qdisc take care of things. Cutting email here, since another topic below and this email is too long. cheers, jamal From sandr8_NOSPAM_@crocetta.org Mon Aug 23 05:05:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 05:05:25 -0700 (PDT) Received: from vsmtp14.tin.it (vsmtp14.tin.it [212.216.176.118]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7NC5JTY000656 for ; Mon, 23 Aug 2004 05:05:20 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp14.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8D0E000F4871; Mon, 23 Aug 2004 14:04:23 +0200 Message-ID: <4129DD47.5030807@crocetta.org> Date: Mon, 23 Aug 2004 14:04:23 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: Billing 3-1: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> <1093261128.1044.759.camel@jzny.localdomain> In-Reply-To: <1093261128.1044.759.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7989 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 2615 Lines: 71 jamal wrote: >On Mon, 2004-08-23 at 05:39, sandr8 wrote: > > >>jamal wrote: >> >> >Ok, in this case, retransmissions have to be unbilled. >To rewind to what i said a few emails ago: >The best place to bill is by looking at what comes out of the box;-> >Ok, we dont have that luxury in this case. So the next best place >is to do it at the qdisc level. Because only at that level do you >know for sure if packets made it out or not. >Since contracking already does the job of marking the flow, then >thats the second part of your requirement "on behalf of each flow". >What we are doing now is hacking around to try and reduce the injustice. > >Conclusion: The current way of billing is _wrong_. The better way is to >have contracking just mark and the qdisc decide on billing or unbilling. >Have a billing table somewhere indexed by flow that increments these >stats. > >For now i think that focussing on just sch.drops++ in case of full >queue will help. > >Let me cut email here for readability. > > so, maybe we are saying the same thing but in different words :) if we blindly look at layer 3 and unbill when a packet is dropped, then the retransmission is already unbilled :) it will be billed when it takes place, but the first transmission that underwent a drop has been unbilled and hence we are square. this without looking at layer 4. what i was thinking about was mimicking the conntracking at a device level, having per each device a singleton object that has the same buckets as the connection tracking. it could store a lot of interesting information that would augment queuing disciplines to better share the pain of drops and also to perform per-connection head drops instead of connection-unaware tail-drop. this would improve fairness and shorten the time tcp sources need to get the feedback, in a better way than random early drop does. having this structure at a device level would be an answer for the issue of packets cloned to multiple interfaces, as we would be augmented to perform a separate accounting for each interface (which seems, afaik, reasonable... in most cases we would account on a single interface, and we also should likely get less hash collisions... no more than in the centralized conntrack). furthermore, the per-bucket lock you suggested, that should be a good compromise, would also not "interfere" from one interface to the other one. well... maybe as soon as enqueues and dequeues on the same device stay serialized (thanks to dev->queue_lock) we should not need that further lock either. does it make sense? >cheers, >jamal > ciao ciao! alessandro From hadi@cyberus.ca Mon Aug 23 05:15:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 05:15: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 i7NCFG4X001184 for ; Mon, 23 Aug 2004 05:15:16 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1BzDj8-00082T-6P for netdev@oss.sgi.com; Mon, 23 Aug 2004 08:15:06 -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 1BzDj4-0006Kb-U6; Mon, 23 Aug 2004 08:15:03 -0400 Subject: Re: Billing 3-3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <4129BB3A.9000007@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093263300.1039.797.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 23 Aug 2004 08:15:00 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7990 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: 1325 Lines: 40 On Mon, 2004-08-23 at 05:39, sandr8 wrote: >jamal wrote: Let me just get to the bottom of your email: [..] > >A packet that gets enqueued is _guaranteed_ to be transmitted unless > >overulled by admin policy. > >Ok, how about the idea of adding skb->unbilled which gets set when > >unbilling happens (in the aggregated stats_incr()). skb->unbilled gets > >zeroed at the root qdisc after return from enqueueing. > > > > > sorry?? i'm lost... maybe there's something implied i can't get... > do you agree it's not the same skb that will be re-billed > afterwards? Sure, its a cloned packet - from a billing perspective we can look at it as a different flow. Contrack bills, qdisc unbills. What i meant is packet still flowing within the qdisc infrastructure. what i drew as: ..-->classification --> tcaction return code1 --> enqueue return code2 ...(packet may be freed here)--> dev.c Thats the only place i see skb->unbilled as useful. So: all components need to increment their won proivate stats and should call stats_incr() but only the first one gets to unbill; eg if action calls stats_incr to indicate drop; you unbill. When qdisc enqueue calls stats_incr with a drop reason, you dont want to unbill again. We could talk in more details about code after - just discussing concepts right now. cheers, jamal From sandr8_NOSPAM_@crocetta.org Mon Aug 23 05:28:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 05:28:21 -0700 (PDT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7NCSDX5001789 for ; Mon, 23 Aug 2004 05:28:14 -0700 Received: from [192.168.107.56] (193.55.113.196) by vsmtp3.tin.it (7.0.027) (authenticated as sandr8@virgilio.it) id 411B8C17001118EB; Mon, 23 Aug 2004 14:27:14 +0200 Message-ID: <4129E2A2.2050500@crocetta.org> Date: Mon, 23 Aug 2004 14:27:14 +0200 From: sandr8 User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> <1093262296.1040.778.camel@jzny.localdomain> In-Reply-To: <1093262296.1040.778.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7991 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sandr8_NOSPAM_@crocetta.org Precedence: bulk X-list: netdev Content-Length: 5306 Lines: 143 jamal wrote: >Let me layout a few things: > > ..-->classification --> tcaction >return code1 --> enqueue >return code2 ...(packet may be freed here)--> dev.c > >The rules are: >1) A qdisc receiving a STOLEN/QUEUED/SHOT signal from the classification >result (return code 1) MUST free the packet and immediately stop >processing that packet. >The infrastructure code will clone packets if they want to steal or >queue it. Infact the skbs flow may even change during this path (eg >packet rewritten) >Billing issues: In such a case multiple packets may be later reinjected >(after replicating the one that was stolen) which totaly bypass >contracking code. Multiple packets may make it out to the wire. >You need to find a way to bill them ;-> (opposite of what you are trying >to do). > > i don't know the code that does that, since afaik it was not yet there in 2.6.8... if it is, please tell me because i'm eager to have a full viewpoint of the forthcoming packet action framework :) >2)Return code (return code 2) of qdisc from enqueue function need to be >dealt with care if the packet is localy generated so it doesnt confuse >TCP (SCTP and DCCP sound like two other protocols that could be added) > >Here we have two paths: >i) policy dropped packets. >Billing issues: You want to unbill dropped but not stolen packets. > >ii) packets that are dropped because of a full Q should continue to >return a XMIT_DROP. >Billing: MUST unbill. > >Again as above shows, billing would work better at the qdisc level. > > yes, sure... but for the moment i personally don't know which path STOLEN and QUEUED packets will follow... it's not a reproach :) it's just that i simply can't know for the moment, but i don't want to make you hurry, i perfectly understand that you've got plenty of things to do :) >>[ i'm not insisting with that patch, i'm just trying to say that, if i don't >>rave, it should not be dangerous to do that after the enqueue()... >>then, it's just that for the moment i can't immagine a different >>way to do things in that place :) yes, there could be a slight >>variation with a skb_get() right before the enqueue and all the >>kfree_skb() at their place inside the code, but then somewhere >>we should always add a kfree_skb... ouch... and we would need >>a by ref skb anyway to get the packet that has been dropped >>and if it's not the same as the enqueued one also the enqueued >>one should pass through one more kfree_skb()... horrible, more >>complex and slower i'd say... ] >> >> > >Linux is being efficient by sharing skbs. One of the most expensive >things in a stack is copying packets around (which is avoided). >If this was a simple system where allocating and freeing can be mapped >to exactly a flow then what you suggest can be done. In Linux you cant. > > > in that patch i was not copying them... just passing them by reference through a "struct sk_buff ** const skb" parameter. what is the difference from before...? calling: before) when calling we passed a pointer on the stack. now) when calling we pass a pointer on the stack returning: before) when returning we didn't tell the caller which packet was dropped now) when returning we tell the sender which packet is not queued or is thrown away from our queue to make place for the packet enqueued. what happens on the stack now? for the calling: more or less the same as before :) for the returning... 1) the external pointer is const, cannot be changed. this is good to avoid stupid bugs. 2) being the external pointer const, the internal one always lays in the stack frame of the outmost caller of an enqueue operation. hust the external one is passed to callees. when a requeue operation is called, that pointer nevertheless stays in the stack frame of the outmost caller of an enqueue operation. that's to say: it never moves from the stack of the caller of dev->qdisc->enqueue()... [in that case it was dev.c, but maybe it would be nicer to have it in a sort of dev->enqueue() that would have to do with device level conntracking]. additional cost for the function calling? z-e-r-o !!! :) performance issues? maybe some improvement due to the elimination of many internal jumps and conditions. furthermore, telling the caller the packet that we chose to drop allows it to reshape it without the need for every qdisc to recur too any callback function. >>>That is the challenge at the moment. >>>For starters i dont see it as an issue right now to do locking. >>>Its a cost for the feature since Haralds patch is in. >>> >>>In the future we should make accounting a feature that could be turned >>>on despite contracking and skbs should carry an accounting metadata with >>>them. >>> >>> >>> >>> >>i need to think thoroughly on it... depending on where that information is >>kept, the complexity of some operations can change a lot... and i should >>not only egoistically think to the operations i need but look at it from the >>outside to have a less partisan viewpoint on the problem and find the >>most generally good solution possible. >> >> > >I am begining to think that all contrack should do is mark the packets >then let the qdisc take care of things. > >Cutting email here, since another topic below and this email is too >long. > >cheers, >jamal > > ciao :) From hadi@cyberus.ca Mon Aug 23 05:31:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 05:31:31 -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 i7NCVPgd002115 for ; Mon, 23 Aug 2004 05:31:25 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1BzDyl-0008Ln-JI for netdev@oss.sgi.com; Mon, 23 Aug 2004 08:31: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 1BzDyj-0008Du-G5; Mon, 23 Aug 2004 08:31:13 -0400 Subject: Re: Billing 3-1: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <4129DD47.5030807@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> <1093261128.1044.759.camel@jzny.localdomain> <4129DD47.5030807@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093264271.1040.813.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 23 Aug 2004 08:31:11 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 7992 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: 2749 Lines: 75 On Mon, 2004-08-23 at 08:04, sandr8 wrote: > jamal wrote: > > so, maybe we are saying the same thing but in different words :) Probably ;-> > if we blindly look at layer 3 and unbill when a packet is dropped, > then the retransmission is already unbilled :) > it will be billed when it takes place, but the first transmission that > underwent a drop has been unbilled and hence we are square. > this without looking at layer 4. Agreed. > what i was thinking about was mimicking the conntracking at > a device level, having per each device a singleton object that > has the same buckets as the connection tracking. it could > store a lot of interesting information that would augment queuing > disciplines to better share the pain of drops and also to perform > per-connection head drops instead of connection-unaware > tail-drop. This connection exists today in the form of marking. Let conmtracking mark then use fw classifier at the qdisc. If i am not mistaken theres something more powerful these days called conmarking. Now if you did it like that then you dont need Haralds code and it will be much easier to maintain (refer to my earlier email). > this would improve fairness and shorten the time tcp sources > need to get the feedback, in a better way than random early > drop does. Contracking is a horrible performance pig. I dont even turn it on. Dont make it a requirement to turn it on. > having this structure at a device level would be an answer > for the issue of packets cloned to multiple interfaces, as we > would be augmented to perform a separate accounting for > each interface (which seems, afaik, reasonable... in most > cases we would account on a single interface, and we also > should likely get less hash collisions... no more than in the > centralized conntrack). Heres a thought: Make it a tc action. --> netfilter: contrack --> conmark --> qdisc: classify via fw -> billing action bill --------> attach table index + lock to skb --------> deal with any unfairness on enqueue by using index --------> and fine grained lock found in skb on skb freeing make sure you delete the index and lock. On cloning, what to do? Note i do plan to have a contracking action at the qdisc level. Let me know if that is useful to you then i can prioritize. > furthermore, the per-bucket lock you suggested, that should > be a good compromise, would also not "interfere" from one > interface to the other one. well... maybe as soon as enqueues > and dequeues on the same device stay serialized (thanks to > dev->queue_lock) we should not need that further lock > either. Possibly yes. > does it make sense? I think it does. Make sure you double check the rules i posted earlier. cheers, jamal From shemminger@osdl.org Mon Aug 23 10:06:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 10:06: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 i7NH6hKb014826 for ; Mon, 23 Aug 2004 10:06:43 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7NH5l126212; Mon, 23 Aug 2004 10:05:47 -0700 Date: Mon, 23 Aug 2004 10:05:47 -0700 From: Stephen Hemminger To: root@chaos.analogic.com Cc: Andreas Dilger , Jean-Luc Cooke , "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, Linux kernel Subject: Re: [RFC] enhanced version of net_random() Message-Id: <20040823100547.33b7a448@dell_ss3.pdx.osdl.net> In-Reply-To: References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 7993 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: 2509 Lines: 66 > The attached code will certainly work on Intel machines. It is > in the public domain, having been modified by myself to produce > a very long sequence... > > I wouldn't suggest converting it to 'C' because the rotation > takes many CPU instructions when one tries to do the test, shift, > and OR in 'C', > > Cheers, > Dick Johnson > Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips). > Note 96.31% of all statistics are fiction. > > My choice of PRNG was not random. I am not a mathematician (IANAM), but what I was looking for was: + well researched + fast + good distribution + small seed (since per cpu) + Free and open The second version uses tausworthe because it was the fastest in the GNU scientific library and had good properties. See: http://www1.physik.tu-muenchen.de/~gammel/matpack/html/LibDoc/Numbers/Random.html ---------- Returns integer pseudorandom numbers uniformly distributed within [0,4294967295]. The period length is approximately 288 (which is 3*1026). This is Pierre L'Ecuyer's 1996 three-component Tausworthe generator "taus88" This generator is very fast and passes all standard statistical tests. P. L'Ecuyer, Maximally equidistributed combined Tausworthe generators, Mathematics of Computation 65, 203-213 (1996), see Figure 4. P. L'Ecuyer, Random number generation, chapter 4 of the Handbook on Simulation, Ed. Jerry Banks, Wiley, 1997. -------- http://www.gnu.org/software/gsl/manual/gsl-ref_17.html Performance The following table shows the relative performance of a selection the available random number generators. The fastest simulation quality generators are taus, gfsr4 and mt19937. The generators which offer the best mathematically-proven quality are those based on the RANLUX algorithm. 1754 k ints/sec, 870 k doubles/sec, taus 1613 k ints/sec, 855 k doubles/sec, gfsr4 1370 k ints/sec, 769 k doubles/sec, mt19937 565 k ints/sec, 571 k doubles/sec, ranlxs0 400 k ints/sec, 405 k doubles/sec, ranlxs1 490 k ints/sec, 389 k doubles/sec, mrg 407 k ints/sec, 297 k doubles/sec, ranlux 243 k ints/sec, 254 k doubles/sec, ranlxd1 251 k ints/sec, 253 k doubles/sec, ranlxs2 238 k ints/sec, 215 k doubles/sec, cmrg 247 k ints/sec, 198 k doubles/sec, ranlux389 141 k ints/sec, 140 k doubles/sec, ranlxd2 1852 k ints/sec, 935 k doubles/sec, ran3 813 k ints/sec, 575 k doubles/sec, ran0 787 k ints/sec, 476 k doubles/sec, ran1 379 k ints/sec, 292 k doubles/sec, ran2 From kaber@trash.net Mon Aug 23 10:11:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 10:11:23 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7NHBHNE015307 for ; Mon, 23 Aug 2004 10:11:18 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 83EC919F33C; Mon, 23 Aug 2004 19:11:03 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 400963941CE; Mon, 23 Aug 2004 19:11:02 +0200 (CEST) Message-ID: <412A2525.9010606@trash.net> Date: Mon, 23 Aug 2004 19:11:01 +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: Voluspa Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 References: <200408221504.i7MF4Z719895@d1o404.telia.com> In-Reply-To: <200408221504.i7MF4Z719895@d1o404.telia.com> Content-Type: multipart/mixed; boundary="------------090406090109010602040601" X-archive-position: 7994 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: 5525 Lines: 187 This is a multi-part message in MIME format. --------------090406090109010602040601 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Voluspa wrote: >Greetings, > >NOTE >I wrote the text below just prior to the posting of >01-2.6-cbq-leaks.diff but applying it doesn't change the >situation here. I still get the same Oops as below. Slight >changes in memory address but the Call Trace is identical. >So, different problem? >ENDNOTE > > Did you also apply this patch ? If not, please try it and tell us if it helps. Regards Patrick >Yes, saw the same thing on eth0 but had a confusing time to catch a >clean error situation. Having been used to stable kernels for a long >time I've disabled all debugging options and compile for size. So >when 2.6.8[.1] threw an Oops at the end of every "shutdown -r now" >the feedback was useless ("halt" gave no Oops). What looked to be >the same Oops came when doing a "rmmod 8139too". 2.6.7 has no such >issues. > >Turning on CONFIG_KALLSYMS (and CONFIG_CC_OPTIMIZE_FOR_SIZE off), with >CONFIG_FRAME_POINTER, a slew of other debug options and the >CONFIG_MAGIC_SYSRQ, hid the Oops and gave the result Nuno Silva >has described. > >To make a long story short, I didn't trust my very old system enough >to report. > >But now I've seen the QoS/wshaper connection and achieved a good Oops >with only CONFIG_KALLSYMS and CONFIG_FRAME_POINTER set. > >Typing it here in case it has some kind of value (hand-copied): > >[...] >Unmounting local filesystems... >Flushing filesystem buffers... >Please stand by while rebooting... >Unable to handle kernel paging request at virtual address 8bc289a9 > printing eip: >c02ae9c0 >*pde = 00000000 >Ooops: 0000 [#1] >PREEMPT >Modules linked in: 8139too crc32 >CPU: 0 >EIP: 0060:[] Not tainted >EFLAGS: 00010286 (2.6.8-debug) >EIP is at fib_sync_down+0x50/0xb0 >eax: cfaee800 ebx: 948bff0d ecx: 8bc28955 edx: c0267eb8 >esi: 00000001 edi: 00000000 ebp: cf0a1ea4 esp: cf0a1e8c >de: 007b es: 007b ss: 0068 >Process reboot (pid: 151, threadinfo=cf0a1000 task=cfa3e090) >Stack: >000000ff 00000001 cfaee800 cfaee800 cfaee800 00000002 cf0a1eb0 c02ad8d1 >c033affc cf0a1ebc c02ad9b9 c033affc cf0a1ed0 c0121508 cfaee800 00000002 >00001003 cf0a1ee0 c025dadf cfaee800 00000002 cf0a1ef8 c025ef32 00000000 >Call Trace: > [] show_stack+0x7a/0x90 > [] show_registers+0x149/0x1a0 > [] die+0x8d/0x100 > [] do_page_fault+0x1e5/0x569 > [] error_code+0x2d/0x38 > [] fib_disable_ip+0x11/0x30 > [] fib_netdev_event+0x69/0x80 > [] notifier_call_chain+0x28/0x50 > [] dev_close+0x8f/0xa0 > [] dev_change_flags+0x52/0x120 > [] devinet_ioctl+0x245/0x590 > [] inet_ioctl+0x63/0xb0 > [] sock_ioctl+0xe2/0x230 > [] sys_ioctl+0x105/0x260 > [] syscall_call+0x7/0xb >Code: 8b 41 54 85 c0 74 19 8d 51 58 31 f6 8b 5a 04 f6 c3 01 74 2c >/etc/rc.d/rc.6: line 49: 151 Segmentation fault /sbin/reboot -d -f -i >INIT: no more processes left in this runlevel ><5>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). >--endOops-- > >The -i parametre to reboot (which is a symlink to halt) means to shut >down all network interfaces. My halt command doesn't use the -i, hence >the lack of Oops. > >Mvh >Mats Johannesson > > > > > --------------090406090109010602040601 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/08/15 19:33:16-07:00 kaber@trash.net # [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/08/15 19:32:59-07:00 kaber@trash.net +13 -8 # [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c 2004-08-23 19:06:53 +02:00 +++ b/net/sched/sch_api.c 2004-08-23 19:06:53 +02:00 @@ -389,7 +389,8 @@ { int err; struct rtattr *kind = tca[TCA_KIND-1]; - struct Qdisc *sch = NULL; + void *p = NULL; + struct Qdisc *sch; struct Qdisc_ops *ops; int size; @@ -407,12 +408,18 @@ if (ops == NULL) goto err_out; - size = sizeof(*sch) + ops->priv_size; + /* ensure that the Qdisc and the private data are 32-byte aligned */ + size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); + size += ops->priv_size + QDISC_ALIGN_CONST; - sch = kmalloc(size, GFP_KERNEL); + p = kmalloc(size, GFP_KERNEL); err = -ENOBUFS; - if (!sch) + if (!p) goto err_out; + memset(p, 0, size); + sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) + & ~QDISC_ALIGN_CONST); + sch->padded = (char *)sch - (char *)p; /* Grrr... Resolve race condition with module unload */ @@ -420,8 +427,6 @@ if (ops != qdisc_lookup_ops(kind)) goto err_out; - memset(sch, 0, size); - INIT_LIST_HEAD(&sch->list); skb_queue_head_init(&sch->q); @@ -470,8 +475,8 @@ err_out: *errp = err; - if (sch) - kfree(sch); + if (p) + kfree(p); return NULL; } --------------090406090109010602040601-- From nuno.silva@vgertech.com Mon Aug 23 10:56:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 10:56:32 -0700 (PDT) Received: from puma-vgertech.no-ip.com (postfix@[82.154.233.158]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7NHuPDc016720 for ; Mon, 23 Aug 2004 10:56:26 -0700 Received: from [10.0.2.15] (puma [10.0.2.15]) by puma-vgertech.no-ip.com (Postfix) with ESMTP id AB13CDA8208; Mon, 23 Aug 2004 18:56:22 +0100 (WEST) Message-ID: <412A2FC5.8090402@vgertech.com> Date: Mon, 23 Aug 2004 18:56:21 +0100 From: Nuno Silva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040528 Thunderbird/0.6 Mnenhy/0.6.0.103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Patrick McHardy Cc: "David S. Miller" , Herbert Xu , linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 References: <4128941D.9030000@trash.net> In-Reply-To: <4128941D.9030000@trash.net> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 7995 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nuno.silva@vgertech.com Precedence: bulk X-list: netdev Content-Length: 1181 Lines: 45 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick McHardy wrote: | Herbert Xu wrote: | |> Nuno Silva wrote: |> |> |>> The problem is in the QoS code. If I start ppp whithout the |> |> |> OK, this appears to be due to the changeset titled |> |> [PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callback |> |> It adds a reference to dev. |> |> I don't see any code that cleans up that reference when the dev goes |> down. So someone needs to add that similar to the code in |> net/core/dst.c. |> |> Patrick, could you please have a look at this? |> |> | The reference is dropped in __qdisc_destroy. The problem lies in the CBQ | qdisc, it doesn't destroy the root-class and leaks the inner qdisc. These | two patches for 2.4 and 2.6 fix the problem. Hi! Just to give some feedback: IT WORKS! Thanks! Didn't try with 2.4, but it works very well with 2.6.8.1. Thanks again, Nuno Silva -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBKi/FOPig54MP17wRAiYBAJ41ZGzauhY6dDVtylWkLSD3V+vx9QCgteNF 21sEmv0wqP+9hdnXEc4DNBE= =ByPY -----END PGP SIGNATURE----- From root@chaos.analogic.com Mon Aug 23 11:10:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 11:10:27 -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 i7NIAJ7J017392 for ; Mon, 23 Aug 2004 11:10:20 -0700 Received: (from root@localhost) by chaos.analogic.com (8.11.0.Beta3(chaos.analogic.com)/8.12.0.A) id i7NI9RY08697; Mon, 23 Aug 2004 14:09:27 -0400 Date: Mon, 23 Aug 2004 14:09:27 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: Stephen Hemminger cc: Andreas Dilger , Jean-Luc Cooke , "David S. Miller" , Alan Cox , "Theodore Ts'o" , netdev@oss.sgi.com, Linux kernel Subject: Re: [RFC] enhanced version of net_random() In-Reply-To: <20040823100547.33b7a448@dell_ss3.pdx.osdl.net> Message-ID: References: <20040812104835.3b179f5a@dell_ss3.pdx.osdl.net> <20040820175952.GI5806@certainkey.com> <20040820185956.GV8967@schnapps.adilger.int> <20040823100547.33b7a448@dell_ss3.pdx.osdl.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7996 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: 3844 Lines: 95 On Mon, 23 Aug 2004, Stephen Hemminger wrote: > > > The attached code will certainly work on Intel machines. It is > > in the public domain, having been modified by myself to produce > > a very long sequence... > > > > I wouldn't suggest converting it to 'C' because the rotation > > takes many CPU instructions when one tries to do the test, shift, > > and OR in 'C', > > > > My choice of PRNG was not random. I am not a mathematician (IANAM), > but what I was looking for was: > > + well researched > + fast > + good distribution > + small seed (since per cpu) > + Free and open > > The second version uses tausworthe because it was the fastest in the GNU scientific > library and had good properties. > > See: > > http://www1.physik.tu-muenchen.de/~gammel/matpack/html/LibDoc/Numbers/Random.html > ---------- > Returns integer pseudorandom numbers uniformly distributed within [0,4294967295]. > The period length is approximately 288 (which is 3*1026). > > This is Pierre L'Ecuyer's 1996 three-component Tausworthe generator "taus88" > > This generator is very fast and passes all standard statistical tests. > > P. L'Ecuyer, Maximally equidistributed combined Tausworthe generators, Mathematics of Computation 65, 203-213 (1996), see Figure 4. > P. L'Ecuyer, Random number generation, chapter 4 of the Handbook on Simulation, Ed. Jerry Banks, Wiley, 1997. > -------- > http://www.gnu.org/software/gsl/manual/gsl-ref_17.html > > Performance > The following table shows the relative performance of a selection the available random number generators. The fastest simulation quality generators are taus, gfsr4 and mt19937. The generators which offer the best mathematically-proven quality are those based on the RANLUX algorithm. > > 1754 k ints/sec, 870 k doubles/sec, taus > 1613 k ints/sec, 855 k doubles/sec, gfsr4 > 1370 k ints/sec, 769 k doubles/sec, mt19937 > 565 k ints/sec, 571 k doubles/sec, ranlxs0 > 400 k ints/sec, 405 k doubles/sec, ranlxs1 > 490 k ints/sec, 389 k doubles/sec, mrg > 407 k ints/sec, 297 k doubles/sec, ranlux > 243 k ints/sec, 254 k doubles/sec, ranlxd1 > 251 k ints/sec, 253 k doubles/sec, ranlxs2 > 238 k ints/sec, 215 k doubles/sec, cmrg > 247 k ints/sec, 198 k doubles/sec, ranlux389 > 141 k ints/sec, 140 k doubles/sec, ranlxd2 > > 1852 k ints/sec, 935 k doubles/sec, ran3 > 813 k ints/sec, 575 k doubles/sec, ran0 > 787 k ints/sec, 476 k doubles/sec, ran1 > 379 k ints/sec, 292 k doubles/sec, ran2 The rnd that I submitted is fast. That's all. For communications it has been found to be good enough. Remember the saying; "Better is the enemy of good enough". It obviously can't have a period of better than 2^32 and, in fact, it has a period of: 4294896635 [0xfffeebfb]. This generates 199,962,632 integers per second on this 2.8 GHz machine. This is a callable procedure that uses a pointer to private data. The speed could be improved if this overhead is not required. The distribution has also been found to be good enough for spread- spectrum use. There are no missing codes although a sorted- list of return values will show that there are some values (codes) that are generated close together, in other words some people expect that if you get a return code of '1', the next one won't be '2', but something "very far away". This generator seems to work more like "real world" noise sources except that such noise sources may give you duplicate values, which this won't. Depending upon how much time you wish to waste for making it better than "good enough", this can be cascaded to give a period of any length (you use one generator to produce the "magic number" for another, etc.) Cheers, Dick Johnson Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips). Note 96.31% of all statistics are fiction. From mcgrof@studorgs.rutgers.edu Mon Aug 23 13:25:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 13:25:26 -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 i7NKPIdu029628 for ; Mon, 23 Aug 2004 13:25:21 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id D70E8F99BD; Mon, 23 Aug 2004 16:25:11 -0400 (EDT) Date: Mon, 23 Aug 2004 16:25:11 -0400 To: Margit Schubert-While Cc: netdev@oss.sgi.com Subject: Re: prism54: fix wpa_supplicant frequency parsing Message-ID: <20040823202511.GG22126@ruslug.rutgers.edu> Mail-Followup-To: Margit Schubert-While , netdev@oss.sgi.com References: <5.1.0.14.2.20040822195310.00b023e8@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.20040822195310.00b023e8@pop.t-online.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: 7997 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: 479 Lines: 13 On Sun, Aug 22, 2004 at 07:53:48PM +0200, Margit Schubert-While wrote: > Eeek, iwconfig now shows : > Mode:Managed Frequency:2462GHz Access Point: 00:09:5B:D0:34:BC > instead of : > Mode:Managed Frequency:2.462GHz Access Point: 00:09:5B:D0:34:BC Sorry, the first change was unnecessary, the second was. Fixed in CVS, now all displays nice (iwconfig, iwlist eth0 scan, iwlist eth0 freq). Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From max@stro.at Mon Aug 23 13:36:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 13:36:54 -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 i7NKami6030163 for ; Mon, 23 Aug 2004 13:36:48 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id CB5005C00B; Mon, 23 Aug 2004 22:36:39 +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 17876-07; Mon, 23 Aug 2004 22:36:39 +0200 (CEST) Received: from sputnik (unknown [62.47.134.134]) by baikonur.stro.at (Postfix) with ESMTP id 477F15C009; Mon, 23 Aug 2004 22:36:39 +0200 (CEST) Received: from max by sputnik with local (Exim 4.34) id 1BzLYW-0001dk-Vl; Mon, 23 Aug 2004 22:36:41 +0200 Date: Mon, 23 Aug 2004 22:36:40 +0200 From: max attems To: Jay Bourque , kernel-janitors@lists.osdl.org, netdev@oss.sgi.com Subject: Re: [Kernel-janitors] ip_gre.c: update last_rx after netif_rx Message-ID: <20040823203640.GF1805@stro.at> Mail-Followup-To: Jay Bourque , kernel-janitors@lists.osdl.org, netdev@oss.sgi.com References: <411E62D3.8070808@uranium235.org> <20040821083639.GA1827@stro.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040821083639.GA1827@stro.at> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 7998 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 Content-Length: 526 Lines: 26 hello jay, On Sat, 21 Aug 2004, maximilian attems wrote: > On Sat, 14 Aug 2004, Jay Bourque wrote: > > > Fix to update last_rx after netif_rx > > This is my first patch so I'd appreciate any feedback. > > > > -Jay .. > i presume that this task is outdated, well nobody is really interested in aboves issue, thanks for bringing up that old dust, task removed from kernel janitor TODO. please choose another item of the kj TODO list? happy to read you soon. -- maks kernel janitor http://janitor.kernelnewbies.org/ From mcgrof@studorgs.rutgers.edu Mon Aug 23 13:36:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 13:37:06 -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 i7NKaw8p030217 for ; Mon, 23 Aug 2004 13:36:59 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id BE898F99BD; Mon, 23 Aug 2004 16:36:51 -0400 (EDT) Date: Mon, 23 Aug 2004 16:36:51 -0400 To: Jeff Garzik Cc: Netdev , prism54-devel@prism54.org, Jouni Malinen Subject: [PATCH] prism54: fix iwconfig freq listing Message-ID: <20040823203651.GH22126@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , Netdev , prism54-devel@prism54.org, Jouni Malinen Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KIzF6Cje4W/osXrF" Content-Disposition: inline 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: 7999 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: 1762 Lines: 63 --KIzF6Cje4W/osXrF Content-Type: multipart/mixed; boundary="K/NRh952CO+2tg14" Content-Disposition: inline --K/NRh952CO+2tg14 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jeff, my previous patch fixed iwlist eth0 scan listing for frequencies but broke iwconfig freq listing. I shouldn't have done the first change. This reverts it. Sorry for the trouble all. 2004-08-23 Luis R. Rodriguez * isl_ioctl.c (prism54_get_freq): reverted change to=20 use frwq->e as 6. This is the mantissa, setting it to 3. The other change was correct. --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --K/NRh952CO+2tg14 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="freq2.diff" Content-Transfer-Encoding: quoted-printable diff -Naurp linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c linux-2.= 6.8.1-wpa/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.8.1/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-23 00:31= :36.000000000 -0400 +++ linux-2.6.8.1-wpa/drivers/net/wireless/prism54/isl_ioctl.c 2004-08-23 0= 0:17:19.000000000 -0400 @@ -303,7 +303,7 @@ prism54_get_freq(struct net_device *ndev fwrq->i =3D r.u; rvalue |=3D mgt_get_request(priv, DOT11_OID_FREQUENCY, 0, NULL, &r); fwrq->m =3D r.u; - fwrq->e =3D 6; + fwrq->e =3D 3; =20 return rvalue; } --K/NRh952CO+2tg14-- --KIzF6Cje4W/osXrF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBKlVjat1JN+IKUl4RAgskAJ4iVbenOnRZ0dk88QCBW4l9ms0Y2wCgrkMP zOxZ1XO7zsJ444ZeKAs8F0U= =5XKm -----END PGP SIGNATURE----- --KIzF6Cje4W/osXrF-- From tgraf@suug.ch Mon Aug 23 13:51:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 13:51: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 i7NKp3cw031081 for ; Mon, 23 Aug 2004 13:51: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 553EB68; Mon, 23 Aug 2004 22:50:32 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 541191C0E7; Mon, 23 Aug 2004 22:51:14 +0200 (CEST) Date: Mon, 23 Aug 2004 22:51:14 +0200 From: Thomas Graf To: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-ID: <20040823205114.GB19921@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 8000 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: 1540 Lines: 56 Hello Introduces a new rtnetlink link message attribute to provide txqlen value via RTM_GETLINK and adds support for setting MTU and txqlen via RTM_SETLINK. First step to supersede ioctl network link configuration with rtnetlink equivalent. Thomas --- 1.19/net/core/rtnetlink.c Thu Apr 29 01:04:48 2004 +++ 1.20/net/core/rtnetlink.c Sun Aug 22 18:11:03 2004 @@ -175,6 +175,7 @@ r->ifi_flags |= IFF_RUNNING; RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name); + RTA_PUT(skb, IFLA_TXQLEN, sizeof(unsigned long), &dev->tx_queue_len); if (dev->addr_len) { RTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr); RTA_PUT(skb, IFLA_BROADCAST, dev->addr_len, dev->broadcast); @@ -268,6 +269,23 @@ goto out; memcpy(dev->broadcast, RTA_DATA(ida[IFLA_BROADCAST - 1]), dev->addr_len); + } + + if (ida[IFLA_MTU - 1]) { + if (ida[IFLA_MTU - 1]->rta_len != RTA_LENGTH(sizeof(unsigned))) + goto out; + err = dev_set_mtu(dev, *((unsigned *) RTA_DATA(ida[IFLA_MTU - 1]))); + + if (err) + goto out; + + } + + if (ida[IFLA_TXQLEN - 1]) { + if (ida[IFLA_TXQLEN - 1]->rta_len != RTA_LENGTH(sizeof(unsigned long))) + goto out; + + dev->tx_queue_len = *((unsigned long *) RTA_DATA(ida[IFLA_TXQLEN - 1])); } err = 0; --- 1.33/include/linux/rtnetlink.h Mon Apr 5 23:41:40 2004 +++ 1.34/include/linux/rtnetlink.h Sun Aug 22 18:11:03 2004 @@ -540,6 +540,7 @@ IFLA_QDISC, IFLA_STATS, IFLA_COST, + IFLA_TXQLEN, #define IFLA_COST IFLA_COST IFLA_PRIORITY, #define IFLA_PRIORITY IFLA_PRIORITY From shemminger@osdl.org Mon Aug 23 13:53:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 13:53: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 i7NKrYWO031422 for ; Mon, 23 Aug 2004 13:53:35 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7NKrL108803; Mon, 23 Aug 2004 13:53:21 -0700 Date: Mon, 23 Aug 2004 13:53:21 -0700 From: Stephen Hemminger To: netdev@oss.sgi.com, lartc@mailman.ds9a.nl, linux-net@vger.kernel.org Subject: [announce] iproute2 for 2.6.8 (and 2.4.27) Message-Id: <20040823135321.23194fee@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8001 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: 663 Lines: 15 This version supports: * changes 'tc' for latest netem * hfsc/sc patch from Patrick * packet classification action from Jamal * copies of critical tc/netlink API headers so the command can be built on older systems. Only auto-configuration left is ATM. The versioning scheme is to label the highest version of kernel used. It should build and run on older systems as well, but obviously can't support stuff your kernel doesn't have. So if a new feature (like netem scheduler) got added in 2.6.8 kernel, then you would need the corresponding iproute2 to use it. Available at: http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.8-040823.tar.gz From tgraf@suug.ch Mon Aug 23 14:16:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 14:16:05 -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 i7NLFx2X032369 for ; Mon, 23 Aug 2004 14:15: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 B824A68; Mon, 23 Aug 2004 23:15:29 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id B79B31C0E7; Mon, 23 Aug 2004 23:16:11 +0200 (CEST) Date: Mon, 23 Aug 2004 23:16:11 +0200 From: Thomas Graf To: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: [RFC/PATCH] Add support for setting net_device flags via RTM_SETLINK Message-ID: <20040823211611.GC19921@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 8002 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: 1633 Lines: 57 Hello The patch below extends RTM_SETLINK to change net_device flags if a new value is provided via ifinfomsg and modifies the way flags are shown to userspace to maintain balance and only show flags which can be modified (as in ioctl handlers): The change in behaviour: old: r->ifi_flags = dev->flags; if (!netif_running(dev) || !netif_carrier_ok(dev)) r->ifi_flags &= ~IFF_RUNNING; else r->ifi_flags |= IFF_RUNNING; new: flags = (dev->flags & ~(IFF_PROMISC | IFF_ALLMULTI | IFF_RUNNING)) | (dev->gflags & (IFF_PROMISC | IFF_ALLMULTI)); if (netif_running(dev) && netif_carrier_ok(dev)) flags |= IFF_RUNNING; I will implement the 2 hidden flags IFF_PROMISC and IFF_ALLMULTI as separate message attributes (IFLA_PROMISC and IFLA_ALLMULTI) as soon as I get some comments on this idea. --- 1.20/net/core/rtnetlink.c Sun Aug 22 18:11:03 2004 +++ 1.21/net/core/rtnetlink.c Mon Aug 23 22:32:39 2004 @@ -166,14 +166,9 @@ r->ifi_family = AF_UNSPEC; r->ifi_type = dev->type; r->ifi_index = dev->ifindex; - r->ifi_flags = dev->flags; + r->ifi_flags = dev_get_flags(dev); r->ifi_change = change; - if (!netif_running(dev) || !netif_carrier_ok(dev)) - r->ifi_flags &= ~IFF_RUNNING; - else - r->ifi_flags |= IFF_RUNNING; - RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name); RTA_PUT(skb, IFLA_TXQLEN, sizeof(unsigned long), &dev->tx_queue_len); if (dev->addr_len) { @@ -246,6 +241,9 @@ return -ENODEV; err = -EINVAL; + + if (ifm->ifi_flags) + dev_change_flags(dev, ifm->ifi_flags); if (ida[IFLA_ADDRESS - 1]) { if (!dev->set_mac_address) { From dlstevens@us.ibm.com Mon Aug 23 14:18:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 14:18:53 -0700 (PDT) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.133]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7NLIide032716 for ; Mon, 23 Aug 2004 14:18:47 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7NLIQu3321058; Mon, 23 Aug 2004 17:18:26 -0400 Received: from d03nm121.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7NLIP6d342416; Mon, 23 Aug 2004 15:18:25 -0600 In-Reply-To: <41289859.2040803@trash.net> To: Patrick McHardy Cc: "David S. Miller" , laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de MIME-Version: 1.0 Subject: Re: [PATCH] Prevent crash on ip_conntrack removal X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Mon, 23 Aug 2004 14:18:24 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.51HF338 | June 21, 2004) at 08/23/2004 15:18:26, Serialize complete at 08/23/2004 15:18:26 Content-Type: text/plain; charset="US-ASCII" X-archive-position: 8003 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dlstevens@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 922 Lines: 19 BTW, since some of the frags (esp. the one that triggers the problem) are added post-routing, a valid dst is available. It just isn't the first frag in the particular scenario. So, one solution would be to set skb->dst for the head (if NULL) based on a non-null fragment skb->dst. I believe that would prevent the problem case without dropping the fragment, since it'll be processed post-routing only if one of the frags is. When I was looking at it, I wondered if conntrack really has a need to reassemble itself, though. Couldn't it let IP do the reassembling and just ignore offset != 0 frags? The offset==0 frags will have enough protocol header to identify by port (a requirement for ICMP). But I don't know this code well enough to know if conntrack does actually need to reassemble for some good reason. Superficially, I wouldn't think there'd be a reason for it. +-DLS From tgr@reeler.org Mon Aug 23 15:05:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:05:22 -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 i7NM5GaY001710 for ; Mon, 23 Aug 2004 15:05:17 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1BzMvu-0007Pk-6x; Tue, 24 Aug 2004 00:04:54 +0200 Date: Tue, 24 Aug 2004 00:04:54 +0200 From: Thomas Graf To: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: Re: [RFC/PATCH] Add support for setting net_device flags via RTM_SETLINK Message-ID: <20040823220454.GO31616@rei.reeler.org> References: <20040823211611.GC19921@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823211611.GC19921@postel.suug.ch> X-archive-position: 8004 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: 312 Lines: 8 * Thomas Graf <20040823211611.GC19921@postel.suug.ch> 2004-08-23 23:16 > I will implement the 2 hidden flags IFF_PROMISC and IFF_ALLMULTI as separate > message attributes (IFLA_PROMISC and IFLA_ALLMULTI) as soon as I get some > comments on this idea. Ignore the above statement, it's nonsense. Sorry. Thomas From lista4@comhem.se Mon Aug 23 15:31:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:31:35 -0700 (PDT) Received: from av13-1-sn4.m-sp.skanova.net (av13-1-sn4.m-sp.skanova.net [81.228.10.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7NMVURY002702 for ; Mon, 23 Aug 2004 15:31:30 -0700 Received: by av13-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 8D9CB37E43; Tue, 24 Aug 2004 00:31:14 +0200 (CEST) Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av13-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 7EFAC37E42; Tue, 24 Aug 2004 00:31:14 +0200 (CEST) Received: from d1o408.telia.com (d1o408.telia.com [195.67.227.81]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 4C4C537E44; Tue, 24 Aug 2004 00:31:14 +0200 (CEST) Received: by d1o408.telia.com (8.11.1/8.10.1) id i7NMVEh13558; Tue, 24 Aug 2004 00:31:14 +0200 (CEST) Date: Tue, 24 Aug 2004 00:31:14 +0200 (CEST) Message-Id: <200408232231.i7NMVEh13558@d1o408.telia.com> X-Authentication-Warning: d1o408.telia.com: www set sender to lista4@comhem.se using -f From: "Voluspa" Reply-To: "Voluspa" To: "Patrick McHardy" Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 X-Mailer: SF Webmail X-SF-webmail-clientstamp: [213.64.150.229] 2004-08-24 00:31:14 X-archive-position: 8005 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lista4@comhem.se Precedence: bulk X-list: netdev Content-Length: 566 Lines: 30 citerar Patrick McHardy: > Did you also apply this patch ? If not, please try it and tell us > if it helps. No, haven't seen that one before. Ok, results: 01-2.6-cbq-leaks.diff aka [PKT_SCHED]: Fix class leak in CBQ scheduler plus [PKT_SCHED]: cacheline-align qdisc data in qdisc_create() _Clean environment_ "shutdown -r now": OK "rmmod 8139too" : OK _QoS through wshaper script_ "shutdown -r now": OK "rmmod 8139too" : OK _Compiled kernel for size, no debugging_ Rest of my modules loaded. As above: OK and OK Nice work. Thanks. Mvh Mats Johannesson From romieu@fr.zoreil.com Mon Aug 23 15:42:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:42:17 -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 i7NMgBYf003570 for ; Mon, 23 Aug 2004 15:42:12 -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 i7NMf045020725; Tue, 24 Aug 2004 00:41:00 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMf0LN020724; Tue, 24 Aug 2004 00:41:00 +0200 Date: Tue, 24 Aug 2004 00:41:00 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [DESC 2.6.8.1-mm4] r8169 patches Message-ID: <20040823224100.GA14680@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: 8006 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: 540 Lines: 17 Here comes a new serie of r8169 related patches which should allow the motivated users to experiment new features, namely: - Rx/Tx checksum offload; - vlan support; - better ethtool integration. Tx code apart, the changes exhibit some strong similarity with the 8139cp driver. I have not done vlan-dedicated test and there are no figures to highlight any performance improvement. The code does not crash in a (really slow) debug enabled -mm kernel and it does not seem to add huge leak. Remarks/comments/test reports welcome. -- Ueimor From romieu@fr.zoreil.com Mon Aug 23 15:46:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:46: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 i7NMk50n004012 for ; Mon, 23 Aug 2004 15:46: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 i7NMiP45020939; Tue, 24 Aug 2004 00:44:25 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMiPBP020938; Tue, 24 Aug 2004 00:44:25 +0200 Date: Tue, 24 Aug 2004 00:44:25 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 1/11] r8169: add ethtool_ops.{get_regs_len/get_regs} Message-ID: <20040823224425.GA20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823224100.GA14680@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8007 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: 3032 Lines: 87 - ethtool_ops.{get_regs_len/get_regs} for r8169; - fix a dubious check: datasheet v1.21 claims on p.44 that io/memory space is exactly 256 bytes wide; - use SET_ETHTOOL_OPS(). Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-000 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-000 2004-08-23 23:29:58.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:29:58.000000000 +0200 @@ -99,6 +99,7 @@ static int multicast_filter_limit = 32; #define RxPacketMaxSize 0x0800 /* Maximum size supported is 16K-1 */ #define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */ +#define R8169_REGS_SIZE 256 #define R8169_NAPI_WEIGHT 64 #define NUM_TX_DESC 64 /* Number of Tx descriptor registers */ #define NUM_RX_DESC 256 /* Number of Rx descriptor registers */ @@ -106,7 +107,6 @@ static int multicast_filter_limit = 32; #define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc)) #define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc)) -#define RTL_MIN_IO_SIZE 0x80 #define RTL8169_TX_TIMEOUT (6*HZ) #define RTL8169_PHY_TIMEOUT (10*HZ) @@ -508,6 +508,11 @@ static void rtl8169_get_drvinfo(struct n strcpy(info->bus_info, pci_name(tp->pci_dev)); } +static int rtl8169_get_regs_len(struct net_device *dev) +{ + return R8169_REGS_SIZE; +} + static int rtl8169_set_speed_tbi(struct net_device *dev, u8 autoneg, u16 speed, u8 duplex) { @@ -671,12 +676,27 @@ static int rtl8169_get_settings(struct n return 0; } +static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs, + void *p) +{ + struct rtl8169_private *tp = netdev_priv(dev); + unsigned long flags; + + if (regs->len > R8169_REGS_SIZE) + regs->len = R8169_REGS_SIZE; + + spin_lock_irqsave(&tp->lock, flags); + memcpy_fromio(p, tp->mmio_addr, regs->len); + spin_unlock_irqrestore(&tp->lock, flags); +} static struct ethtool_ops rtl8169_ethtool_ops = { .get_drvinfo = rtl8169_get_drvinfo, + .get_regs_len = rtl8169_get_regs_len, .get_link = ethtool_op_get_link, .get_settings = rtl8169_get_settings, .set_settings = rtl8169_set_settings, + .get_regs = rtl8169_get_regs, }; static void rtl8169_write_gmii_reg_bit(void *ioaddr, int reg, int bitnum, @@ -968,7 +988,7 @@ rtl8169_init_board(struct pci_dev *pdev, goto err_out_disable; } // check for weird/broken PCI region reporting - if (mmio_len < RTL_MIN_IO_SIZE) { + if (mmio_len < R8169_REGS_SIZE) { printk(KERN_ERR PFX "Invalid PCI region size(s), aborting\n"); rc = -ENODEV; goto err_out_disable; @@ -1105,7 +1125,7 @@ rtl8169_init_one(struct pci_dev *pdev, c dev->open = rtl8169_open; dev->hard_start_xmit = rtl8169_start_xmit; dev->get_stats = rtl8169_get_stats; - dev->ethtool_ops = &rtl8169_ethtool_ops; + SET_ETHTOOL_OPS(dev, &rtl8169_ethtool_ops); dev->stop = rtl8169_close; dev->tx_timeout = rtl8169_tx_timeout; dev->set_multicast_list = rtl8169_set_rx_mode; _ From romieu@fr.zoreil.com Mon Aug 23 15:46:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:46: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 i7NMk6Uj004013 for ; Mon, 23 Aug 2004 15:46: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 i7NMjn45020947; Tue, 24 Aug 2004 00:45:49 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMjmf7020946; Tue, 24 Aug 2004 00:45:48 +0200 Date: Tue, 24 Aug 2004 00:45:48 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 2/11] r8169: per device receive buffer size Message-ID: <20040823224548.GB20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823224425.GA20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8008 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: 4685 Lines: 154 Turn the Rx receive buffer size into a per device variable. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-010 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-010 2004-08-23 23:29:59.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:29:59.000000000 +0200 @@ -341,6 +341,7 @@ struct rtl8169_private { dma_addr_t RxPhyAddr; struct sk_buff *Rx_skbuff[NUM_RX_DESC]; /* Rx data buffers */ struct sk_buff *Tx_skbuff[NUM_TX_DESC]; /* Tx data buffers */ + unsigned rx_buf_sz; struct timer_list timer; u16 cp_cmd; u16 intr_mask; @@ -1056,6 +1057,8 @@ rtl8169_init_board(struct pci_dev *pdev, } tp->chipset = i; + tp->rx_buf_sz = RX_BUF_SIZE; + *ioaddr_out = ioaddr; *dev_out = dev; return 0; @@ -1377,46 +1380,48 @@ static inline void rtl8169_make_unusable desc->status &= ~cpu_to_le32(OWNbit | RsvdMask); } -static void rtl8169_free_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff, - struct RxDesc *desc) +static void rtl8169_free_rx_skb(struct rtl8169_private *tp, + struct sk_buff **sk_buff, struct RxDesc *desc) { - pci_unmap_single(pdev, le64_to_cpu(desc->addr), RX_BUF_SIZE, + struct pci_dev *pdev = tp->pci_dev; + + pci_unmap_single(pdev, le64_to_cpu(desc->addr), tp->rx_buf_sz, PCI_DMA_FROMDEVICE); dev_kfree_skb(*sk_buff); *sk_buff = NULL; rtl8169_make_unusable_by_asic(desc); } -static inline void rtl8169_return_to_asic(struct RxDesc *desc) +static inline void rtl8169_return_to_asic(struct RxDesc *desc, int rx_buf_sz) { - desc->status |= cpu_to_le32(OWNbit + RX_BUF_SIZE); + desc->status |= cpu_to_le32(OWNbit + rx_buf_sz); } -static inline void rtl8169_give_to_asic(struct RxDesc *desc, dma_addr_t mapping) +static inline void rtl8169_give_to_asic(struct RxDesc *desc, dma_addr_t mapping, + int rx_buf_sz) { desc->addr = cpu_to_le64(mapping); - desc->status |= cpu_to_le32(OWNbit + RX_BUF_SIZE); + desc->status |= cpu_to_le32(OWNbit + rx_buf_sz); } -static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct net_device *dev, - struct sk_buff **sk_buff, struct RxDesc *desc) +static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff, + struct RxDesc *desc, int rx_buf_sz) { struct sk_buff *skb; dma_addr_t mapping; int ret = 0; - skb = dev_alloc_skb(RX_BUF_SIZE); + skb = dev_alloc_skb(rx_buf_sz); if (!skb) goto err_out; - skb->dev = dev; skb_reserve(skb, 2); *sk_buff = skb; - mapping = pci_map_single(pdev, skb->tail, RX_BUF_SIZE, + mapping = pci_map_single(pdev, skb->tail, rx_buf_sz, PCI_DMA_FROMDEVICE); - rtl8169_give_to_asic(desc, mapping); + rtl8169_give_to_asic(desc, mapping, rx_buf_sz); out: return ret; @@ -1433,7 +1438,7 @@ static void rtl8169_rx_clear(struct rtl8 for (i = 0; i < NUM_RX_DESC; i++) { if (tp->Rx_skbuff[i]) { - rtl8169_free_rx_skb(tp->pci_dev, tp->Rx_skbuff + i, + rtl8169_free_rx_skb(tp, tp->Rx_skbuff + i, tp->RxDescArray + i); } } @@ -1450,8 +1455,8 @@ static u32 rtl8169_rx_fill(struct rtl816 if (tp->Rx_skbuff[i]) continue; - ret = rtl8169_alloc_rx_skb(tp->pci_dev, dev, tp->Rx_skbuff + i, - tp->RxDescArray + i); + ret = rtl8169_alloc_rx_skb(tp->pci_dev, tp->Rx_skbuff + i, + tp->RxDescArray + i, tp->rx_buf_sz); if (ret < 0) break; } @@ -1646,8 +1651,7 @@ rtl8169_tx_interrupt(struct net_device * } static inline int rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size, - struct RxDesc *desc, - struct net_device *dev) + struct RxDesc *desc, int rx_buf_sz) { int ret = -1; @@ -1656,11 +1660,10 @@ static inline int rtl8169_try_rx_copy(st skb = dev_alloc_skb(pkt_size + 2); if (skb) { - skb->dev = dev; skb_reserve(skb, 2); eth_copy_and_sum(skb, sk_buff[0]->tail, pkt_size, 0); *sk_buff = skb; - rtl8169_return_to_asic(desc); + rtl8169_return_to_asic(desc, rx_buf_sz); ret = 0; } } @@ -1707,17 +1710,19 @@ rtl8169_rx_interrupt(struct net_device * pci_dma_sync_single_for_cpu(tp->pci_dev, - le64_to_cpu(desc->addr), RX_BUF_SIZE, + le64_to_cpu(desc->addr), tp->rx_buf_sz, PCI_DMA_FROMDEVICE); - if (rtl8169_try_rx_copy(&skb, pkt_size, desc, dev)) { + if (rtl8169_try_rx_copy(&skb, pkt_size, desc, + tp->rx_buf_sz)) { pci_action = pci_unmap_single; tp->Rx_skbuff[entry] = NULL; } pci_action(tp->pci_dev, le64_to_cpu(desc->addr), - RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + tp->rx_buf_sz, PCI_DMA_FROMDEVICE); + skb->dev = dev; skb_put(skb, pkt_size); skb->protocol = eth_type_trans(skb, dev); rtl8169_rx_skb(skb); _ From romieu@fr.zoreil.com Mon Aug 23 15:50:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:50: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 i7NMo8fC004699 for ; Mon, 23 Aug 2004 15:50:11 -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 i7NMl745021044; Tue, 24 Aug 2004 00:47:07 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMl6LN021043; Tue, 24 Aug 2004 00:47:06 +0200 Date: Tue, 24 Aug 2004 00:47:06 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 3/11] r8169: code cleanup Message-ID: <20040823224706.GC20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823224548.GB20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8010 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: 5348 Lines: 185 Cleanup/code removal: - MAX_ETH_FRAME_SIZE is not used; - removal of assertion for impossible condition (if it happens, it will _not_ take long to notice anyway) - introduce rtl8169_release_board() to factor out some code; - rtl8169_init_board: - some variables are not really needed nor do they help read the code; - more explicit name for label; - tp->{Rx/Tx}DescArray: no need to zeroize coherent DMA mapping. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-020 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-020 2004-08-23 23:29:59.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:29:59.000000000 +0200 @@ -87,9 +87,6 @@ static int multicast_filter_limit = 32; /* MAC address length*/ #define MAC_ADDR_LEN 6 -/* max supported gigabit ethernet frame size -- must be at least (dev->mtu+14+4).*/ -#define MAX_ETH_FRAME_SIZE 1536 - #define TX_FIFO_THRESH 256 /* In bytes */ #define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */ @@ -928,28 +925,31 @@ static inline void rtl8169_request_timer add_timer(timer); } +static void rtl8169_release_board(struct pci_dev *pdev, struct net_device *dev, + void *ioaddr) +{ + iounmap(ioaddr); + pci_release_regions(pdev); + pci_disable_device(pdev); + free_netdev(dev); +} + static int __devinit rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, void **ioaddr_out) { - void *ioaddr = NULL; + void *ioaddr; struct net_device *dev; struct rtl8169_private *tp; - unsigned long mmio_start, mmio_end, mmio_flags, mmio_len; - int rc, i, acpi_idle_state = 0, pm_cap; + int rc = -ENOMEM, i, acpi_idle_state = 0, pm_cap; - - assert(pdev != NULL); assert(ioaddr_out != NULL); - *ioaddr_out = NULL; - *dev_out = NULL; - // dev zeroed in alloc_etherdev dev = alloc_etherdev(sizeof (*tp)); if (dev == NULL) { printk(KERN_ERR PFX "unable to alloc new ethernet\n"); - return -ENOMEM; + goto err_out; } SET_MODULE_OWNER(dev); @@ -960,7 +960,7 @@ rtl8169_init_board(struct pci_dev *pdev, rc = pci_enable_device(pdev); if (rc) { printk(KERN_ERR PFX "%s: enable failure\n", pdev->slot_name); - goto err_out; + goto err_out_free_dev; } /* save power state before pci_enable_device overwrites it */ @@ -976,20 +976,15 @@ rtl8169_init_board(struct pci_dev *pdev, goto err_out_free_res; } - mmio_start = pci_resource_start(pdev, 1); - mmio_end = pci_resource_end(pdev, 1); - mmio_flags = pci_resource_flags(pdev, 1); - mmio_len = pci_resource_len(pdev, 1); - // make sure PCI base addr 1 is MMIO - if (!(mmio_flags & IORESOURCE_MEM)) { + if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { printk(KERN_ERR PFX "region #1 not an MMIO resource, aborting\n"); rc = -ENODEV; goto err_out_disable; } // check for weird/broken PCI region reporting - if (mmio_len < R8169_REGS_SIZE) { + if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) { printk(KERN_ERR PFX "Invalid PCI region size(s), aborting\n"); rc = -ENODEV; goto err_out_disable; @@ -1020,7 +1015,7 @@ rtl8169_init_board(struct pci_dev *pdev, pci_set_master(pdev); // ioremap MMIO region - ioaddr = ioremap(mmio_start, mmio_len); + ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE); if (ioaddr == NULL) { printk(KERN_ERR PFX "cannot remap MMIO, aborting\n"); rc = -EIO; @@ -1061,7 +1056,8 @@ rtl8169_init_board(struct pci_dev *pdev, *ioaddr_out = ioaddr; *dev_out = dev; - return 0; +out: + return rc; err_out_free_res: pci_release_regions(pdev); @@ -1069,16 +1065,19 @@ err_out_free_res: err_out_disable: pci_disable_device(pdev); -err_out: +err_out_free_dev: free_netdev(dev); - return rc; +err_out: + *ioaddr_out = NULL; + *dev_out = NULL; + goto out; } static int __devinit rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { struct net_device *dev = NULL; - struct rtl8169_private *tp = NULL; + struct rtl8169_private *tp; void *ioaddr = NULL; static int board_idx = -1; static int printed_version = 0; @@ -1102,8 +1101,6 @@ rtl8169_init_one(struct pci_dev *pdev, c tp = dev->priv; assert(ioaddr != NULL); - assert(dev != NULL); - assert(tp != NULL); if (RTL_R8(PHYstatus) & TBI_Enable) { tp->set_speed = rtl8169_set_speed_tbi; @@ -1148,10 +1145,7 @@ rtl8169_init_one(struct pci_dev *pdev, c rc = register_netdev(dev); if (rc) { - iounmap(ioaddr); - pci_release_regions(pdev); - pci_disable_device(pdev); - free_netdev(dev); + rtl8169_release_board(pdev, dev, ioaddr); return rc; } @@ -1207,11 +1201,7 @@ rtl8169_remove_one(struct pci_dev *pdev) assert(tp != NULL); unregister_netdev(dev); - iounmap(tp->mmio_addr); - pci_release_regions(pdev); - - pci_disable_device(pdev); - free_netdev(dev); + rtl8169_release_board(pdev, dev, tp->mmio_addr); pci_set_drvdata(pdev, NULL); } @@ -1474,8 +1464,6 @@ static int rtl8169_init_ring(struct net_ tp->cur_rx = tp->dirty_rx = 0; tp->cur_tx = tp->dirty_tx = 0; - memset(tp->TxDescArray, 0x0, NUM_TX_DESC * sizeof (struct TxDesc)); - memset(tp->RxDescArray, 0x0, NUM_RX_DESC * sizeof (struct RxDesc)); memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *)); memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); _ From romieu@fr.zoreil.com Mon Aug 23 15:50:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:50:20 -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 i7NMo8AP004700 for ; Mon, 23 Aug 2004 15:50:12 -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 i7NMnR45021052; Tue, 24 Aug 2004 00:49:27 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMnRCP021051; Tue, 24 Aug 2004 00:49:27 +0200 Date: Tue, 24 Aug 2004 00:49:27 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 5/11] r8169: bump version number Message-ID: <20040823224927.GE20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823224813.GD20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8011 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: 1422 Lines: 41 Help reviewers realize that the in-kernel driver has evolved lately. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-040 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-040 2004-08-23 23:30:00.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:00.000000000 +0200 @@ -6,6 +6,7 @@ History: Feb 4 2002 - created initially by ShuChen . May 20 2002 - Add link status force-mode and TBI mode support. + 2004 - Massive updates. See kernel SCM system for details. ========================================================================= 1. [DEPRECATED: use ethtool instead] The media can be forced in 5 modes. Command: 'insmod r8169 media = SET_MEDIA' @@ -32,6 +33,14 @@ VERSION 1.2 <2002/11/30> - Use ether_crc in stock kernel (linux/crc32.h) - Copy mc_filter setup code from 8139cp (includes an optimization, and avoids set_bit use) + +VERSION 1.6LK <2004/04/14> + + - Merge of Realtek's version 1.6 + - Conversion to DMA API + - Suspend/resume + - Endianness + - Misc Rx/Tx bugs */ #include @@ -47,7 +56,7 @@ VERSION 1.2 <2002/11/30> #include -#define RTL8169_VERSION "1.2" +#define RTL8169_VERSION "1.6LK" #define MODULENAME "r8169" #define RTL8169_DRIVER_NAME MODULENAME " Gigabit Ethernet driver " RTL8169_VERSION #define PFX MODULENAME ": " _ From romieu@fr.zoreil.com Mon Aug 23 15:50:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:50: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 i7NMo8aL004698 for ; Mon, 23 Aug 2004 15:50:11 -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 i7NMmE45021048; Tue, 24 Aug 2004 00:48:14 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMmDee021047; Tue, 24 Aug 2004 00:48:13 +0200 Date: Tue, 24 Aug 2004 00:48:13 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 4/11] r8169: enable MWI Message-ID: <20040823224813.GD20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823224706.GC20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8009 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: 2129 Lines: 81 - enable Memory Write and Invalidate (disabled after reset); - fix wrong goto. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-030 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-030 2004-08-23 23:30:00.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:00.000000000 +0200 @@ -32,7 +32,6 @@ VERSION 1.2 <2002/11/30> - Use ether_crc in stock kernel (linux/crc32.h) - Copy mc_filter setup code from 8139cp (includes an optimization, and avoids set_bit use) - */ #include @@ -963,6 +962,10 @@ rtl8169_init_board(struct pci_dev *pdev, goto err_out_free_dev; } + rc = pci_set_mwi(pdev); + if (rc < 0) + goto err_out_disable; + /* save power state before pci_enable_device overwrites it */ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); if (pm_cap) { @@ -973,7 +976,7 @@ rtl8169_init_board(struct pci_dev *pdev, } else { printk(KERN_ERR PFX "Cannot find PowerManagement capability, aborting.\n"); - goto err_out_free_res; + goto err_out_mwi; } // make sure PCI base addr 1 is MMIO @@ -981,20 +984,20 @@ rtl8169_init_board(struct pci_dev *pdev, printk(KERN_ERR PFX "region #1 not an MMIO resource, aborting\n"); rc = -ENODEV; - goto err_out_disable; + goto err_out_mwi; } // check for weird/broken PCI region reporting if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) { printk(KERN_ERR PFX "Invalid PCI region size(s), aborting\n"); rc = -ENODEV; - goto err_out_disable; + goto err_out_mwi; } rc = pci_request_regions(pdev, MODULENAME); if (rc) { printk(KERN_ERR PFX "%s: could not request regions.\n", pdev->slot_name); - goto err_out_disable; + goto err_out_mwi; } tp->cp_cmd = PCIMulRW | RxChkSum; @@ -1011,7 +1014,6 @@ rtl8169_init_board(struct pci_dev *pdev, } - // enable PCI bus-mastering pci_set_master(pdev); // ioremap MMIO region @@ -1062,6 +1064,9 @@ out: err_out_free_res: pci_release_regions(pdev); +err_out_mwi: + pci_clear_mwi(pdev); + err_out_disable: pci_disable_device(pdev); _ From romieu@fr.zoreil.com Mon Aug 23 15:54:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:54:17 -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 i7NMsAiL005701 for ; Mon, 23 Aug 2004 15:54:11 -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 i7NMra45021264; Tue, 24 Aug 2004 00:53:36 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMrZs1021263; Tue, 24 Aug 2004 00:53:35 +0200 Date: Tue, 24 Aug 2004 00:53:35 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 7/11] r8169: comment a gcc 2.95.x bug Message-ID: <20040823225335.GG20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823225120.GF20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8012 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: 733 Lines: 19 gcc 2.95.3 bug has been experienced on gcc 2.95.4. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-070 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-070 2004-08-23 23:30:03.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:03.000000000 +0200 @@ -1575,7 +1575,7 @@ rtl8169_start_xmit(struct sk_buff *skb, tp->Tx_skbuff[entry] = skb; tp->TxDescArray[entry].addr = cpu_to_le64(mapping); - /* anti gcc 2.95.3 bugware */ + /* anti gcc 2.95.[3/4] bugware - do not merge these lines */ status = DescOwn | FirstFrag | LastFrag | len | (RingEnd * !((entry + 1) % NUM_TX_DESC)); tp->TxDescArray[entry].opts1 = cpu_to_le32(status); _ From romieu@fr.zoreil.com Mon Aug 23 15:54:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:54:18 -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 i7NMs9h6005698 for ; Mon, 23 Aug 2004 15:54:11 -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 i7NMpK45021256; Tue, 24 Aug 2004 00:51:20 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMpK1g021255; Tue, 24 Aug 2004 00:51:20 +0200 Date: Tue, 24 Aug 2004 00:51:20 +0200 From: Francois Romieu To: jgarzik@pobox.comr Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 6/11] r8169: sync the names of a few bits with the 8139cp driver Message-ID: <20040823225120.GF20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823224927.GE20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8013 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: 3667 Lines: 123 Sync the names of the descriptor with these which are used in the 8139cp driver. Though not exactly identical the descriptors are forward compatible. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-060 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-060 2004-08-23 23:30:01.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:01.000000000 +0200 @@ -308,23 +308,23 @@ enum RTL8169_register_content { }; enum _DescStatusBit { - OWNbit = 0x80000000, - EORbit = 0x40000000, - FSbit = 0x20000000, - LSbit = 0x10000000, + DescOwn = (1 << 31), /* Descriptor is owned by NIC */ + RingEnd = (1 << 30), /* End of descriptor ring */ + FirstFrag = (1 << 29), /* First segment of a packet */ + LastFrag = (1 << 28), /* Final segment of a packet */ }; #define RsvdMask 0x3fffc000 struct TxDesc { - u32 status; - u32 vlan_tag; + u32 opts1; + u32 opts2; u64 addr; }; struct RxDesc { - u32 status; - u32 vlan_tag; + u32 opts1; + u32 opts2; u64 addr; }; @@ -1381,7 +1381,7 @@ rtl8169_hw_start(struct net_device *dev) static inline void rtl8169_make_unusable_by_asic(struct RxDesc *desc) { desc->addr = 0x0badbadbadbadbadull; - desc->status &= ~cpu_to_le32(OWNbit | RsvdMask); + desc->opts1 &= ~cpu_to_le32(DescOwn | RsvdMask); } static void rtl8169_free_rx_skb(struct rtl8169_private *tp, @@ -1398,14 +1398,14 @@ static void rtl8169_free_rx_skb(struct r static inline void rtl8169_return_to_asic(struct RxDesc *desc, int rx_buf_sz) { - desc->status |= cpu_to_le32(OWNbit + rx_buf_sz); + desc->opts1 |= cpu_to_le32(DescOwn + rx_buf_sz); } static inline void rtl8169_give_to_asic(struct RxDesc *desc, dma_addr_t mapping, int rx_buf_sz) { desc->addr = cpu_to_le64(mapping); - desc->status |= cpu_to_le32(OWNbit + rx_buf_sz); + desc->opts1 |= cpu_to_le32(DescOwn + rx_buf_sz); } static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff, @@ -1469,7 +1469,7 @@ static u32 rtl8169_rx_fill(struct rtl816 static inline void rtl8169_mark_as_last_descriptor(struct RxDesc *desc) { - desc->status |= cpu_to_le32(EORbit); + desc->opts1 |= cpu_to_le32(RingEnd); } static int rtl8169_init_ring(struct net_device *dev) @@ -1565,7 +1565,7 @@ rtl8169_start_xmit(struct sk_buff *skb, len = ETH_ZLEN; } - if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) { + if (!(le32_to_cpu(tp->TxDescArray[entry].opts1) & DescOwn)) { dma_addr_t mapping; u32 status; @@ -1576,9 +1576,9 @@ rtl8169_start_xmit(struct sk_buff *skb, tp->TxDescArray[entry].addr = cpu_to_le64(mapping); /* anti gcc 2.95.3 bugware */ - status = OWNbit | FSbit | LSbit | len | - (EORbit * !((entry + 1) % NUM_TX_DESC)); - tp->TxDescArray[entry].status = cpu_to_le32(status); + status = DescOwn | FirstFrag | LastFrag | len | + (RingEnd * !((entry + 1) % NUM_TX_DESC)); + tp->TxDescArray[entry].opts1 = cpu_to_le32(status); RTL_W8(TxPoll, 0x40); //set polling bit @@ -1628,8 +1628,8 @@ rtl8169_tx_interrupt(struct net_device * u32 status; rmb(); - status = le32_to_cpu(tp->TxDescArray[entry].status); - if (status & OWNbit) + status = le32_to_cpu(tp->TxDescArray[entry].opts1); + if (status & DescOwn) break; /* FIXME: is it really accurate for TxErr ? */ @@ -1692,9 +1692,9 @@ rtl8169_rx_interrupt(struct net_device * u32 status; rmb(); - status = le32_to_cpu(tp->RxDescArray[entry].status); + status = le32_to_cpu(tp->RxDescArray[entry].opts1); - if (status & OWNbit) + if (status & DescOwn) break; if (status & RxRES) { printk(KERN_INFO "%s: Rx ERROR!!!\n", dev->name); _ From romieu@fr.zoreil.com Mon Aug 23 15:58:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:58:17 -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 i7NMw8ia006417 for ; Mon, 23 Aug 2004 15:58:09 -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 i7NMvD45021501; Tue, 24 Aug 2004 00:57:13 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMvDMY021500; Tue, 24 Aug 2004 00:57:13 +0200 Date: Tue, 24 Aug 2004 00:57:13 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 10/11] r8169: Rx checksum support Message-ID: <20040823225713.GJ20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> <20040823225620.GI20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823225620.GI20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8016 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: 3009 Lines: 103 Rx IP checksumming support. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-100 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-100 2004-08-23 23:30:08.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:08.000000000 +0200 @@ -320,6 +320,19 @@ enum _DescStatusBit { IPCS = (1 << 18), /* Calculate IP checksum */ UDPCS = (1 << 17), /* Calculate UDP/IP checksum */ TCPCS = (1 << 16), /* Calculate TCP/IP checksum */ + + /* Rx private */ + PID1 = (1 << 18), /* Protocol ID bit 1/2 */ + PID0 = (1 << 17), /* Protocol ID bit 2/2 */ + +#define RxProtoUDP (PID1) +#define RxProtoTCP (PID0) +#define RxProtoIP (PID1 | PID0) +#define RxProtoMask RxProtoIP + + IPFail = (1 << 16), /* IP checksum failed */ + UDPFail = (1 << 15), /* UDP/IP checksum failed */ + TCPFail = (1 << 14), /* TCP/IP checksum failed */ }; #define RsvdMask 0x3fffc000 @@ -623,6 +636,34 @@ static int rtl8169_set_settings(struct n return ret; } +static u32 rtl8169_get_rx_csum(struct net_device *dev) +{ + struct rtl8169_private *tp = netdev_priv(dev); + + return !!(tp->cp_cmd & RxChkSum); +} + +static int rtl8169_set_rx_csum(struct net_device *dev, u32 data) +{ + struct rtl8169_private *tp = netdev_priv(dev); + void *ioaddr = tp->mmio_addr; + unsigned long flags; + + spin_lock_irqsave(&tp->lock, flags); + + if (data) + tp->cp_cmd |= RxChkSum; + else + tp->cp_cmd &= ~RxChkSum; + + RTL_W16(CPlusCmd, tp->cp_cmd); + RTL_R16(CPlusCmd); + + spin_unlock_irqrestore(&tp->lock, flags); + + return 0; +} + static void rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd) { struct rtl8169_private *tp = netdev_priv(dev); @@ -716,6 +757,8 @@ static struct ethtool_ops rtl8169_ethtoo .get_link = ethtool_op_get_link, .get_settings = rtl8169_get_settings, .set_settings = rtl8169_set_settings, + .get_rx_csum = rtl8169_get_rx_csum, + .set_rx_csum = rtl8169_set_rx_csum, .get_tx_csum = ethtool_op_get_tx_csum, .set_tx_csum = ethtool_op_set_tx_csum, .get_sg = ethtool_op_get_sg, @@ -1746,6 +1789,19 @@ rtl8169_tx_interrupt(struct net_device * } } +static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc) +{ + u32 opts1 = desc->opts1; + u32 status = opts1 & RxProtoMask; + + if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || + ((status == RxProtoUDP) && !(opts1 & UDPFail)) || + ((status == RxProtoIP) && !(opts1 & IPFail))) + skb->ip_summed = CHECKSUM_UNNECESSARY; + else + skb->ip_summed = CHECKSUM_NONE; +} + static inline int rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size, struct RxDesc *desc, int rx_buf_sz) { @@ -1804,7 +1860,8 @@ rtl8169_rx_interrupt(struct net_device * void (*pci_action)(struct pci_dev *, dma_addr_t, size_t, int) = pci_dma_sync_single_for_device; - + rtl8169_rx_csum(skb, desc); + pci_dma_sync_single_for_cpu(tp->pci_dev, le64_to_cpu(desc->addr), tp->rx_buf_sz, PCI_DMA_FROMDEVICE); _ From romieu@fr.zoreil.com Mon Aug 23 15:58:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:58:15 -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 i7NMw7fE006415 for ; Mon, 23 Aug 2004 15:58:08 -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 i7NMt645021489; Tue, 24 Aug 2004 00:55:06 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMt50f021488; Tue, 24 Aug 2004 00:55:05 +0200 Date: Tue, 24 Aug 2004 00:55:05 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 8/11] r8169: Tx checksum offload Message-ID: <20040823225505.GH20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823225335.GG20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8015 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: 8755 Lines: 314 SG and IP checksumming support on output. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-080 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-080 2004-08-23 23:30:04.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:04.000000000 +0200 @@ -51,6 +51,9 @@ VERSION 1.6LK <2004/04/14> #include #include #include +#include +#include +#include #include #include @@ -312,6 +315,11 @@ enum _DescStatusBit { RingEnd = (1 << 30), /* End of descriptor ring */ FirstFrag = (1 << 29), /* First segment of a packet */ LastFrag = (1 << 28), /* Final segment of a packet */ + + /* Tx private */ + IPCS = (1 << 18), /* Calculate IP checksum */ + UDPCS = (1 << 17), /* Calculate UDP/IP checksum */ + TCPCS = (1 << 16), /* Calculate TCP/IP checksum */ }; #define RsvdMask 0x3fffc000 @@ -328,6 +336,12 @@ struct RxDesc { u64 addr; }; +struct ring_info { + struct sk_buff *skb; + u32 len; + u8 __pad[sizeof(void *) - sizeof(u32)]; +}; + struct rtl8169_private { void *mmio_addr; /* memory map physical address */ struct pci_dev *pci_dev; /* Index of PCI device */ @@ -345,7 +359,7 @@ struct rtl8169_private { dma_addr_t TxPhyAddr; dma_addr_t RxPhyAddr; struct sk_buff *Rx_skbuff[NUM_RX_DESC]; /* Rx data buffers */ - struct sk_buff *Tx_skbuff[NUM_TX_DESC]; /* Tx data buffers */ + struct ring_info tx_skb[NUM_TX_DESC]; /* Tx data buffers */ unsigned rx_buf_sz; struct timer_list timer; u16 cp_cmd; @@ -702,6 +716,10 @@ static struct ethtool_ops rtl8169_ethtoo .get_link = ethtool_op_get_link, .get_settings = rtl8169_get_settings, .set_settings = rtl8169_set_settings, + .get_tx_csum = ethtool_op_get_tx_csum, + .set_tx_csum = ethtool_op_set_tx_csum, + .get_sg = ethtool_op_get_sg, + .set_sg = ethtool_op_set_sg, .get_regs = rtl8169_get_regs, }; @@ -1479,7 +1497,7 @@ static int rtl8169_init_ring(struct net_ tp->cur_rx = tp->dirty_rx = 0; tp->cur_tx = tp->dirty_tx = 0; - memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *)); + memset(tp->tx_skb, 0x0, NUM_TX_DESC * sizeof(struct ring_info)); memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); if (rtl8169_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC) @@ -1494,33 +1512,38 @@ err_out: return -ENOMEM; } -static void rtl8169_unmap_tx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff, +static void rtl8169_unmap_tx_skb(struct pci_dev *pdev, struct ring_info *tx_skb, struct TxDesc *desc) { - u32 len = sk_buff[0]->len; + unsigned int len = tx_skb->len; - pci_unmap_single(pdev, le64_to_cpu(desc->addr), - len < ETH_ZLEN ? ETH_ZLEN : len, PCI_DMA_TODEVICE); + pci_unmap_single(pdev, le64_to_cpu(desc->addr), len, PCI_DMA_TODEVICE); desc->addr = 0x00; - *sk_buff = NULL; + tx_skb->len = 0; } -static void -rtl8169_tx_clear(struct rtl8169_private *tp) +static void rtl8169_tx_clear(struct rtl8169_private *tp) { - int i; + unsigned int i; - tp->cur_tx = 0; - for (i = 0; i < NUM_TX_DESC; i++) { - struct sk_buff *skb = tp->Tx_skbuff[i]; + for (i = tp->dirty_tx; i < tp->dirty_tx + NUM_TX_DESC; i++) { + unsigned int entry = i % NUM_TX_DESC; + struct ring_info *tx_skb = tp->tx_skb + entry; + unsigned int len = tx_skb->len; - if (skb) { - rtl8169_unmap_tx_skb(tp->pci_dev, tp->Tx_skbuff + i, - tp->TxDescArray + i); - dev_kfree_skb(skb); + if (len) { + struct sk_buff *skb = tx_skb->skb; + + rtl8169_unmap_tx_skb(tp->pci_dev, tx_skb, + tp->TxDescArray + entry); + if (skb) { + dev_kfree_skb(skb); + tx_skb->skb = NULL; + } tp->stats.tx_dropped++; } } + tp->cur_tx = tp->dirty_tx = 0; } static void @@ -1550,51 +1573,121 @@ rtl8169_tx_timeout(struct net_device *de netif_wake_queue(dev); } -static int -rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) +static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb, + u32 opts1) +{ + struct skb_shared_info *info = skb_shinfo(skb); + unsigned int cur_frag, entry; + struct TxDesc *txd; + + entry = tp->cur_tx; + for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) { + skb_frag_t *frag = info->frags + cur_frag; + dma_addr_t mapping; + u32 status, len; + void *addr; + + entry = (entry + 1) % NUM_TX_DESC; + + txd = tp->TxDescArray + entry; + len = frag->size; + addr = ((void *) page_address(frag->page)) + frag->page_offset; + mapping = pci_map_single(tp->pci_dev, addr, len, PCI_DMA_TODEVICE); + + /* anti gcc 2.95.3 bugware (sic) */ + status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC)); + + txd->opts1 = cpu_to_le32(status); + txd->addr = cpu_to_le64(mapping); + + tp->tx_skb[entry].len = len; + } + + if (cur_frag) { + tp->tx_skb[entry].skb = skb; + txd->opts1 |= cpu_to_le32(LastFrag); + } + + return cur_frag; +} + +static inline u32 rtl8169_tx_csum(struct sk_buff *skb) +{ + if (skb->ip_summed == CHECKSUM_HW) { + const struct iphdr *ip = skb->nh.iph; + + if (ip->protocol == IPPROTO_TCP) + return IPCS | TCPCS; + else if (ip->protocol == IPPROTO_UDP) + return IPCS | UDPCS; + BUG(); + } + return 0; +} + +static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct rtl8169_private *tp = netdev_priv(dev); + unsigned int frags, entry = tp->cur_tx % NUM_TX_DESC; + struct TxDesc *txd = tp->TxDescArray + entry; void *ioaddr = tp->mmio_addr; - unsigned int entry = tp->cur_tx % NUM_TX_DESC; - u32 len = skb->len; + dma_addr_t mapping; + u32 status, len; + u32 opts1; + + if (unlikely(tp->cur_tx - tp->dirty_tx < skb_shinfo(skb)->nr_frags)) { + netif_stop_queue(dev); + printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", + dev->name); + return 1; + } + + if (unlikely(le32_to_cpu(txd->opts1) & DescOwn)) + goto err_drop; + + opts1 = DescOwn | rtl8169_tx_csum(skb); + + frags = rtl8169_xmit_frags(tp, skb, opts1); + if (frags) { + len = skb_headlen(skb); + opts1 |= FirstFrag; + } else { + len = skb->len; + + if (unlikely(len < ETH_ZLEN)) { + skb = skb_padto(skb, ETH_ZLEN); + if (!skb) + goto err_update_stats; + len = ETH_ZLEN; + } - if (unlikely(skb->len < ETH_ZLEN)) { - skb = skb_padto(skb, ETH_ZLEN); - if (!skb) - goto err_update_stats; - len = ETH_ZLEN; + opts1 |= FirstFrag | LastFrag; + tp->tx_skb[entry].skb = skb; } - - if (!(le32_to_cpu(tp->TxDescArray[entry].opts1) & DescOwn)) { - dma_addr_t mapping; - u32 status; - mapping = pci_map_single(tp->pci_dev, skb->data, len, - PCI_DMA_TODEVICE); + mapping = pci_map_single(tp->pci_dev, skb->data, len, PCI_DMA_TODEVICE); - tp->Tx_skbuff[entry] = skb; - tp->TxDescArray[entry].addr = cpu_to_le64(mapping); + tp->tx_skb[entry].len = len; + txd->addr = cpu_to_le64(mapping); - /* anti gcc 2.95.[3/4] bugware - do not merge these lines */ - status = DescOwn | FirstFrag | LastFrag | len | - (RingEnd * !((entry + 1) % NUM_TX_DESC)); - tp->TxDescArray[entry].opts1 = cpu_to_le32(status); - - RTL_W8(TxPoll, 0x40); //set polling bit + wmb(); - dev->trans_start = jiffies; + /* anti gcc 2.95.3 bugware (sic) */ + status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC)); + txd->opts1 = cpu_to_le32(status); - tp->cur_tx++; - smp_wmb(); - } else - goto err_drop; + dev->trans_start = jiffies; - if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) { - u32 dirty = tp->dirty_tx; - + tp->cur_tx += frags + 1; + + smp_wmb(); + + RTL_W8(TxPoll, 0x40); //set polling bit + + if (tp->cur_tx - tp->dirty_tx < MAX_SKB_FRAGS) { netif_stop_queue(dev); smp_rmb(); - if (dirty != tp->dirty_tx) + if (tp->cur_tx - tp->dirty_tx >= MAX_SKB_FRAGS) netif_wake_queue(dev); } @@ -1624,7 +1717,8 @@ rtl8169_tx_interrupt(struct net_device * while (tx_left > 0) { unsigned int entry = dirty_tx % NUM_TX_DESC; - struct sk_buff *skb = tp->Tx_skbuff[entry]; + struct ring_info *tx_skb = tp->tx_skb + entry; + u32 len = tx_skb->len; u32 status; rmb(); @@ -1632,14 +1726,15 @@ rtl8169_tx_interrupt(struct net_device * if (status & DescOwn) break; - /* FIXME: is it really accurate for TxErr ? */ - tp->stats.tx_bytes += skb->len >= ETH_ZLEN ? - skb->len : ETH_ZLEN; + tp->stats.tx_bytes += len; tp->stats.tx_packets++; - rtl8169_unmap_tx_skb(tp->pci_dev, tp->Tx_skbuff + entry, - tp->TxDescArray + entry); - dev_kfree_skb_irq(skb); - tp->Tx_skbuff[entry] = NULL; + + rtl8169_unmap_tx_skb(tp->pci_dev, tx_skb, tp->TxDescArray + entry); + + if (status & LastFrag) { + dev_kfree_skb_irq(tx_skb->skb); + tx_skb->skb = NULL; + } dirty_tx++; tx_left--; } _ From romieu@fr.zoreil.com Mon Aug 23 15:58:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 15:58:14 -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 i7NMw6Bt006412 for ; Mon, 23 Aug 2004 15:58: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 i7NMuK45021496; Tue, 24 Aug 2004 00:56:20 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMuKKq021495; Tue, 24 Aug 2004 00:56:20 +0200 Date: Tue, 24 Aug 2004 00:56:20 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 9/11] r8169: advertise DMA to high memory Message-ID: <20040823225620.GI20726@electric-eye.fr.zoreil.com> References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823225505.GH20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8014 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: 921 Lines: 31 Advertise the ability to DMA to high memory. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-090 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-090 2004-08-23 23:30:06.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:30:06.000000000 +0200 @@ -1029,10 +1029,10 @@ rtl8169_init_board(struct pci_dev *pdev, tp->cp_cmd = PCIMulRW | RxChkSum; - if ((sizeof(dma_addr_t) > 32) && - !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) + if ((sizeof(dma_addr_t) > 32) && !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { tp->cp_cmd |= PCIDAC; - else { + dev->features |= NETIF_F_HIGHDMA; + } else { rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (rc < 0) { printk(KERN_ERR PFX "DMA configuration failed.\n"); @@ -1040,7 +1040,6 @@ rtl8169_init_board(struct pci_dev *pdev, } } - pci_set_master(pdev); // ioremap MMIO region _ From romieu@fr.zoreil.com Mon Aug 23 16:01:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 16:02:10 -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 i7NN1vdw007391 for ; Mon, 23 Aug 2004 16:01: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 i7NMx645021729; Tue, 24 Aug 2004 00:59:06 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7NMx62k021728; Tue, 24 Aug 2004 00:59:06 +0200 Date: Tue, 24 Aug 2004 00:59:06 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: [PATCH 2.6.8.1-mm4 11/11] r8169: vlan support Message-ID: <20040823225821.GK20726@electric-eye.fr.zoreil.com> References: <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> <20040823225620.GI20726@electric-eye.fr.zoreil.com> <20040823225713.GJ20726@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040823225713.GJ20726@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8017 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: 6128 Lines: 211 802.1Q support. Mostly stolen from the 8139cp.c driver. The relevant registers and descriptors bits are identical for both chipsets. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-110 drivers/net/r8169.c --- linux-2.6.8.1/drivers/net/r8169.c~r8169-110 2004-08-23 23:31:33.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/r8169.c 2004-08-23 23:31:33.000000000 +0200 @@ -50,6 +50,7 @@ VERSION 1.6LK <2004/04/14> #include #include #include +#include #include #include #include @@ -78,9 +79,11 @@ VERSION 1.6LK <2004/04/14> #ifdef CONFIG_R8169_NAPI #define rtl8169_rx_skb netif_receive_skb +#define rtl8169_rx_hwaccel_skb vlan_hwaccel_rx #define rtl8169_rx_quota(count, quota) min(count, quota) #else #define rtl8169_rx_skb netif_rx +#define rtl8169_rx_hwaccel_skb vlan_hwaccel_receive_skb #define rtl8169_rx_quota(count, quota) count #endif @@ -320,6 +323,7 @@ enum _DescStatusBit { IPCS = (1 << 18), /* Calculate IP checksum */ UDPCS = (1 << 17), /* Calculate UDP/IP checksum */ TCPCS = (1 << 16), /* Calculate TCP/IP checksum */ + TxVlanTag = (1 << 17), /* Add VLAN tag */ /* Rx private */ PID1 = (1 << 18), /* Protocol ID bit 1/2 */ @@ -333,6 +337,7 @@ enum _DescStatusBit { IPFail = (1 << 16), /* IP checksum failed */ UDPFail = (1 << 15), /* UDP/IP checksum failed */ TCPFail = (1 << 14), /* TCP/IP checksum failed */ + RxVlanTag = (1 << 16), /* VLAN tag available */ }; #define RsvdMask 0x3fffc000 @@ -379,7 +384,9 @@ struct rtl8169_private { u16 intr_mask; int phy_auto_nego_reg; int phy_1000_ctrl_reg; - +#ifdef CONFIG_R8169_VLAN + struct vlan_group *vlgrp; +#endif int (*set_speed)(struct net_device *, u8 autoneg, u16 speed, u8 duplex); void (*get_settings)(struct net_device *, struct ethtool_cmd *); void (*phy_reset_enable)(void *); @@ -664,6 +671,77 @@ static int rtl8169_set_rx_csum(struct ne return 0; } +#ifdef CONFIG_R8169_VLAN + +static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, + struct sk_buff *skb) +{ + return (tp->vlgrp && vlan_tx_tag_present(skb)) ? + TxVlanTag | cpu_to_be16(vlan_tx_tag_get(skb)) : 0x00; +} + +static void rtl8169_vlan_rx_register(struct net_device *dev, + struct vlan_group *grp) +{ + struct rtl8169_private *tp = netdev_priv(dev); + void *ioaddr = tp->mmio_addr; + unsigned long flags; + + spin_lock_irqsave(&tp->lock, flags); + tp->vlgrp = grp; + tp->cp_cmd |= RxVlan; + RTL_W16(CPlusCmd, tp->cp_cmd); + RTL_R16(CPlusCmd); + spin_unlock_irqrestore(&tp->lock, flags); +} + +static void rtl8169_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) +{ + struct rtl8169_private *tp = netdev_priv(dev); + void *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); +} + +static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, + struct sk_buff *skb) +{ + u32 opts2 = desc->opts2; + int ret; + + if (tp->vlgrp && (opts2 & RxVlanTag)) { + rtl8169_rx_hwaccel_skb(skb, tp->vlgrp, + be16_to_cpu(opts2 & 0xffff)); + ret = 0; + } else + ret = -1; + desc->opts2 = 0; + return ret; +} + +#else /* !CONFIG_R8169_VLAN */ + +static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, + struct sk_buff *skb) +{ + return 0; +} + +static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, + struct sk_buff *skb) +{ + return -1; +} + +#endif + static void rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd) { struct rtl8169_private *tp = netdev_priv(dev); @@ -1072,6 +1150,8 @@ 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) > 32) && !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { tp->cp_cmd |= PCIDAC; dev->features |= NETIF_F_HIGHDMA; @@ -1206,11 +1286,19 @@ rtl8169_init_one(struct pci_dev *pdev, c dev->watchdog_timeo = RTL8169_TX_TIMEOUT; dev->irq = pdev->irq; dev->base_addr = (unsigned long) ioaddr; + #ifdef CONFIG_R8169_NAPI dev->poll = rtl8169_poll; dev->weight = R8169_NAPI_WEIGHT; printk(KERN_INFO PFX "NAPI enabled\n"); #endif + +#ifdef CONFIG_R8169_VLAN + dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + dev->vlan_rx_register = rtl8169_vlan_rx_register; + dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid; +#endif + tp->intr_mask = 0xffff; tp->pci_dev = pdev; tp->mmio_addr = ioaddr; @@ -1560,6 +1648,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->opts2 = 0x00; desc->addr = 0x00; tx_skb->len = 0; } @@ -1711,6 +1800,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); wmb(); @@ -1878,7 +1968,9 @@ rtl8169_rx_interrupt(struct net_device * skb->dev = dev; skb_put(skb, pkt_size); skb->protocol = eth_type_trans(skb, dev); - rtl8169_rx_skb(skb); + + if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) + rtl8169_rx_skb(skb); dev->last_rx = jiffies; tp->stats.rx_bytes += pkt_size; diff -puN drivers/net/Kconfig~r8169-110 drivers/net/Kconfig --- linux-2.6.8.1/drivers/net/Kconfig~r8169-110 2004-08-23 23:31:33.000000000 +0200 +++ linux-2.6.8.1-fr/drivers/net/Kconfig 2004-08-23 23:31:33.000000000 +0200 @@ -2061,6 +2061,15 @@ config R8169_NAPI If in doubt, say N. +config R8169_VLAN + bool "VLAN support" + depends on R8169 && VLAN_8021Q + ---help--- + Say Y here for the r8169 driver to support the functions required + by the kernel 802.1Q code. + + If in doubt, say Y. + config SK98LIN tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" depends on PCI _ From kaber@trash.net Mon Aug 23 17:45:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 17:46:05 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7O0jvj3013842; Mon, 23 Aug 2004 17:45:58 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 1A88119F33C; Tue, 24 Aug 2004 02:45:45 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 363063941F6; Tue, 24 Aug 2004 02:45:42 +0200 (CEST) Message-ID: <412A8FB5.4080700@trash.net> Date: Tue, 24 Aug 2004 02:45:41 +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 Stevens Cc: "David S. Miller" , laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8019 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: 1284 Lines: 32 David Stevens wrote: >BTW, since some of the frags (esp. the one that triggers the problem) >are added post-routing, a valid dst is available. It just isn't the first >frag in the particular scenario. > >So, one solution would be to set skb->dst for the head (if NULL) based >on a non-null fragment skb->dst. I believe that would prevent the problem >case without dropping the fragment, since it'll be processed post-routing >only if one of the frags is. > > The fragments which jumped from PRE_ROUTING to ip_local_deliver will miss ip options processing. >When I was looking at it, I wondered if conntrack really has a need to >reassemble itself, though. Couldn't it let IP do the reassembling and >just ignore offset != 0 frags? The offset==0 frags will have enough >protocol header to identify by port (a requirement for ICMP). But I don't >know this code well enough to know if conntrack does actually need >to reassemble for some good reason. Superficially, I wouldn't think >there'd be a reason for it. > > The NAT code needs to handle all fragments, so they can't be skipped. Handling fragments in conntrack and NAT would be possible without helpers, but to scan for patterns in fragments you need state for each fragmented packet for each connection. Regards Patrick From niv@us.ibm.com Mon Aug 23 17:45:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 17:45:28 -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 i7O0jDal013752 for ; Mon, 23 Aug 2004 17:45:22 -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 i7O0iqDD657496; Mon, 23 Aug 2004 20:44:52 -0400 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7O0io6d403740; Mon, 23 Aug 2004 18:44:51 -0600 Message-ID: <412A8FA0.1010707@us.ibm.com> Date: Mon, 23 Aug 2004 17:45:20 -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: David Stevens CC: Patrick McHardy , "David S. Miller" , laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8018 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: 775 Lines: 22 David Stevens wrote: > So, one solution would be to set skb->dst for the head (if NULL) based > on a non-null fragment skb->dst. I believe that would prevent the problem > case without dropping the fragment, since it'll be processed post-routing > only if one of the frags is. This would be more performant than dropping the frags, and requiring a retransmit (or lack thereof, depending on protocol). > When I was looking at it, I wondered if conntrack really has a need to > reassemble itself, though. Couldn't it let IP do the reassembling and I asked Harald this when I met him last, and he said it does need to. So I don't think this (having conntrack reassemble) is avoidable, unfortunately. Of course, fragmentation, on the other hand, :), ... thanks, Nivedita From niv@us.ibm.com Mon Aug 23 17:53:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 17:53:20 -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 i7O0rFhJ014579 for ; Mon, 23 Aug 2004 17:53:16 -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 i7O0r3DD672782; Mon, 23 Aug 2004 20:53:03 -0400 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7O0r26d407512; Mon, 23 Aug 2004 18:53:03 -0600 Message-ID: <412A918B.6020005@us.ibm.com> Date: Mon, 23 Aug 2004 17:53:31 -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: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: Todays net-2.6 update References: <20040820145454.36484216.davem@redhat.com> In-Reply-To: <20040820145454.36484216.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8020 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: 489 Lines: 17 David S. Miller wrote: > At the usual spots: > > bk://kernel.bkbits.net/davem/net-2.6 > ftp.kernel.org:/pub/linux/kernel/people/davem/net-2.6.9-4.gz Dave, thanks for the patch, it will help us to test latest code. I have a request though - we're trying to stretch limited resources, and there are lot of trees to test amongst a small pool of hardware. Would it be possible to have your tree get sucked into Andrew's -mm tree so we could whack at both in one swoop? thanks, Nivedita From davem@redhat.com Mon Aug 23 18:17:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 18:17: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 i7O1HDXk015905 for ; Mon, 23 Aug 2004 18:17:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7O1H5e1003318; Mon, 23 Aug 2004 21:17:05 -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 i7O1H0a27301; Mon, 23 Aug 2004 21:17:00 -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 i7O1GhWP004860; Mon, 23 Aug 2004 21:16:58 -0400 Date: Mon, 23 Aug 2004 18:16:08 -0700 From: "David S. Miller" To: Nivedita Singhvi Cc: netdev@oss.sgi.com Subject: Re: Todays net-2.6 update Message-Id: <20040823181608.263ec99e.davem@redhat.com> In-Reply-To: <412A918B.6020005@us.ibm.com> References: <20040820145454.36484216.davem@redhat.com> <412A918B.6020005@us.ibm.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: 8021 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: 908 Lines: 24 On Mon, 23 Aug 2004 17:53:31 -0700 Nivedita Singhvi wrote: > David S. Miller wrote: > > > At the usual spots: > > > > bk://kernel.bkbits.net/davem/net-2.6 > > ftp.kernel.org:/pub/linux/kernel/people/davem/net-2.6.9-4.gz > > Dave, thanks for the patch, it will help us to test > latest code. I have a request though - we're trying to > stretch limited resources, and there are lot of trees > to test amongst a small pool of hardware. Would it be > possible to have your tree get sucked into Andrew's > -mm tree so we could whack at both in one swoop? Not useful, when Linus is around my tree goes to his usually within 24 hours. The only reason I was doing these patches was because Linus was on vacation for a week. I'm not going to do them anymore, and just push to Linus daily or bi-aily. That way my work will end up in the -mm tree automagically as Andrew syncs up with Linus. From herbert@gondor.apana.org.au Mon Aug 23 19:31:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 19:31: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 i7O2VVNw018251 for ; Mon, 23 Aug 2004 19:31: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 1BzR44-0007wM-00; Tue, 24 Aug 2004 12:29:36 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BzR1C-0000c4-00; Tue, 24 Aug 2004 12:26:38 +1000 From: Herbert Xu To: tgraf@suug.ch (Thomas Graf) Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Organization: Core In-Reply-To: <20040823205114.GB19921@postel.suug.ch> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Tue, 24 Aug 2004 12:26:38 +1000 X-archive-position: 8022 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: 435 Lines: 13 Thomas Graf wrote: > > + RTA_PUT(skb, IFLA_TXQLEN, sizeof(unsigned long), &dev->tx_queue_len); Please use a fixed width type like u32. Keep in mind that the ioctl version is exporting an int. 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 jgarzik@pobox.com Mon Aug 23 23:07:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 23:08: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 i7O67ns5027419 for ; Mon, 23 Aug 2004 23:07: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 1BzUT6-00030R-BL; Tue, 24 Aug 2004 07:07:41 +0100 Message-ID: <412ADB20.5000901@pobox.com> Date: Tue, 24 Aug 2004 02:07:28 -0400 From: Jeff Garzik 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: Netdev , "David S. Miller" CC: Linux Kernel Subject: IPv6 oops on ifup in latest BK Content-Type: multipart/mixed; boundary="------------090707010506030608080205" X-archive-position: 8023 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: 43571 Lines: 1569 This is a multi-part message in MIME format. --------------090707010506030608080205 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Poo. You guys are no fun. I _just_ got my home network up on IPv6, and the latest 'bk pull' breaks it (IOW, a change in the latest 24 hours). Right after I post http://yyz.us/ipv6-fc2-howto.html too ;-) Attached minicom.cap.txt gives the ksymoops output and dmesg output. Appears to die in ipv6_get_hoplimit. Jeff --------------090707010506030608080205 Content-Type: text/plain; name="lspci.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lspci.txt" 00:00.0 Host bridge: Intel Corp. 82875P Memory Controller Hub (rev 02) 00:01.0 PCI bridge: Intel Corp. 82875P Processor to AGP Controller (rev 02) 00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1 (rev 02) 00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2 (rev 02) 00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02) 00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB/ER Hub interface to PCI Bridge (rev c2) 00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Bridge (rev 02) 00:1f.1 IDE interface: Intel Corp. 82801EB/ER (ICH5/ICH5R) Ultra ATA 100 Storage Controller (rev 02) 00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) Serial ATA 150 Storage Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02) 01:00.0 VGA compatible controller: nVidia Corporation NV18GL [Quadro4 380 XGL] (rev a2) 05:02.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5782 Gigabit Ethernet (rev 02) 05:0a.0 RAID bus controller: Silicon Image, Inc. (formerly CMD Technology Inc) Adaptec AAR-1210SA SATA HostRAID Controller (rev 02) --------------090707010506030608080205 Content-Type: text/plain; name="minicom.cap.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="minicom.cap.txt" Linux version 2.6.8.1 (jgarzik@sata.normnet.org) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 SMP Tue Aug 24 01:50:52 EDT 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009e000 (usable) BIOS-e820: 000000000009e000 - 00000000000a0000 (reserved) BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000003fff0000 (usable) BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved) BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved) Warning only 896MB will be used. Use a HIGHMEM enabled kernel. 896MB LOWMEM available. found SMP MP-table at 000f8d90 DMI 2.3 present. ACPI: RSDP (v000 COMPAQ ) @ 0x000e9e10 ACPI: RSDT (v001 COMPAQ CPQ0063 0x20031217 0x00000000) @ 0x000e5640 ACPI: FADT (v001 COMPAQ CANTERW 0x00000001 0x00000000) @ 0x000e56ec ACPI: SSDT (v001 COMPAQ PROJECT 0x00000001 MSFT 0x0100000e) @ 0x000e6579 ACPI: MADT (v001 COMPAQ CANTERW 0x00000001 0x00000000) @ 0x000e5760 ACPI: ASF! (v016 COMPAQ CANTERW 0x00000001 0x00000000) @ 0x000e57c8 ACPI: DSDT (v001 COMPAQ DSDT 0x00000001 MSFT 0x0100000e) @ 0x00000000 ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) Processor #0 15:2 APIC version 20 ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled) Processor #1 15:2 APIC version 20 ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1]) ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0]) IOAPIC[0]: apic_id 1 already used, trying 2 IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23 ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) Enabling APIC mode: Flat. Using 1 I/O APICs Using ACPI (MADT) for SMP configuration information Built 1 zonelists Kernel command line: ro root=LABEL=/ nogui console=ttyS0 Initializing CPU#0 PID hash table entries: 4096 (order 12: 32768 bytes) Detected 2394.365 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) Memory: 904580k/917504k available (2481k kernel code, 12184k reserved, 826k data, 192k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay loop... 4718.59 BogoMIPS Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: Trace cache: 12K uops, L1 D cache: 8K CPU: L2 cache: 512K CPU: Physical Processor ID: 0 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. CPU0: Intel P4/Xeon Extended MCE MSRs (12) available CPU0: Thermal monitoring enabled Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Checking 'hlt' instruction... OK. tbxface-0117 [02] acpi_load_tables : ACPI Tables successfully acquired Parsing all Control Methods:............................................................. Table [DSDT](id F005) - 143 Objects with 17 Devices 61 Methods 2 Regions Parsing all Control Methods:.................................................................................... Table [SSDT](id F003) - 316 Objects with 25 Devices 84 Methods 10 Regions ACPI Namespace successfully loaded at root c0495f9c evxfevnt-0093 [03] acpi_enable : Transition to ACPI mode successful CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09 per-CPU timeslice cutoff: 1462.92 usecs. task migration cache decay timeout: 2 msecs. Booting processor 1/1 eip 3000 Initializing CPU#1 Calibrating delay loop... 4784.12 BogoMIPS CPU: Trace cache: 12K uops, L1 D cache: 8K CPU: L2 cache: 512K CPU: Physical Processor ID: 0 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#1. CPU1: Intel P4/Xeon Extended MCE MSRs (12) available CPU1: Thermal monitoring enabled CPU1: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09 Total of 2 processors activated (9502.72 BogoMIPS). ENABLING IO-APIC IRQs ..TIMER: vector=0x31 pin1=2 pin2=-1 checking TSC synchronization across 2 CPUs: passed. Brought up 2 CPUs checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 134k freed NET: Registered protocol family 16 PCI: Using configuration type 1 mtrr: v2.0 (20020519) ACPI: Subsystem revision 20040715 evgpeblk-0980 [07] ev_create_gpe_block : GPE 00 to 1F [_GPE] 4 regs at 000000000000F828 on int 0x9 evgpeblk-0989 [07] ev_create_gpe_block : Found 7 Wake, Enabled 0 Runtime GPEs in this block Completing Region/Field/Buffer/Package initialization:........................................................ Initialized 12/12 Regions 0/0 Fields 39/39 Buffers 5/15 Packages (468 nodes) Executing all Device _STA and_INI methods:.............................................. 46 Devices found containing: 46 _STA, 2 _INI methods ACPI: Interpreter enabled ACPI: Using IOAPIC for interrupt routing ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 14 15) ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 7 10 11 14 15) ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 *10 11 14 15) ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 *11 14 15) ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 *11 14 15) ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 *5 6 7 10 11 14 15) ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 *11 14 15) ACPI: PCI Root Bridge [PCI0] (00:00) PCI: Probing PCI hardware (bus 00) PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1 PCI: Transparent bridge - 0000:00:1e.0 SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub PCI: Using ACPI for IRQ routing ACPI: PCI interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 169 ACPI: PCI interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 177 ACPI: PCI interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 185 ACPI: PCI interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 193 ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 185 ACPI: PCI interrupt 0000:00:1f.2[A] -> GSI 18 (level, low) -> IRQ 185 ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 17 (level, low) -> IRQ 201 ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 20 (level, low) -> IRQ 209 ACPI: PCI interrupt 0000:05:02.0[A] -> GSI 17 (level, low) -> IRQ 201 ACPI: PCI interrupt 0000:05:0a.0[A] -> GSI 21 (level, low) -> IRQ 217 get_random_bytes called before random driver initialization Machine check exception polling timer started. Initializing Cryptographic API ACPI: Power Button (FF) [PWRF] ACPI: Processor [CPU0] (supports C1, 8 throttling states) ACPI: Processor [CPU1] (supports C1, 8 throttling states) Real Time Clock Driver v1.12 Linux agpgart interface v0.100 (c) Dave Jones agpgart: Detected an Intel i875 Chipset. agpgart: Maximum main memory to use for agp memory: 816M agpgart: AGP aperture is 256M @ 0xe0000000 Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A Using anticipatory io scheduler Floppy drive(s): fd0 is 1.44M FDC 0 is a post-1991 82077 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx ICH5: IDE controller at PCI slot 0000:00:1f.1 PCI: Enabling device 0000:00:1f.1 (0005 -> 0007) ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 185 ICH5: chipset revision 2 ICH5: not 100% native mode: will probe irqs later ide0: BM-DMA at 0x24c0-0x24c7, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0x24c8-0x24cf, BIOS settings: hdc:DMA, hdd:pio hda: MAXTOR 6L080J4, ATA DISK drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 hdc: HL-DT-ST CD-ROM GCR-8480B, ATAPI CD/DVD-ROM drive ide1 at 0x170-0x177,0x376 on irq 15 hda: max request size: 128KiB hda: 156301488 sectors (80026 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(100) hda: cache flushes supported hda: hda1 hda2 hda3 hda4 < hda5 hda6 > hdc: ATAPI 48X CD-ROM drive, 128kB Cache, DMA Uniform CD-ROM driver Revision: 3.20 ACPI: PCI interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 193 ehci_hcd 0000:00:1d.7: EHCI Host Controller ehci_hcd 0000:00:1d.7: irq 193, pci mem f8846000 ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10 hub 1-0:1.0: USB hub found hub 1-0:1.0: 8 ports detected USB Universal Host Controller Interface driver v2.2 ACPI: PCI interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 169 uhci_hcd 0000:00:1d.0: UHCI Host Controller hub 1-0:1.0: over-current change on port 7 uhci_hcd 0000:00:1d.0: irq 169, io base 00002440 uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2 hub 2-0:1.0: USB hub found hub 2-0:1.0: 2 ports detected ACPI: PCI interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 177 uhci_hcd 0000:00:1d.1: UHCI Host Controller uhci_hcd 0000:00:1d.1: irq 177, io base 00002460 uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3 hub 3-0:1.0: USB hub found hub 3-0:1.0: 2 ports detected ACPI: PCI interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 185 uhci_hcd 0000:00:1d.2: UHCI Host Controller uhci_hcd 0000:00:1d.2: irq 185, io base 00002480 uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4 hub 4-0:1.0: USB hub found hub 4-0:1.0: 2 ports detected Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. mice: PS/2 mouse device common for all mice input: PC Speaker serio: i8042 AUX port at 0x60,0x64 irq 12 input: ImPS/2 Generic Wheel Mouse on isa0060/serio1 serio: i8042 KBD port at 0x60,0x64 irq 1 input: AT Translated Set 2 keyboard on isa0060/serio0 NET: Registered protocol family 26 NET: Registered protocol family 2 IP: routing cache hash table of 8192 buckets, 64Kbytes TCP: Hash tables configured (established 262144 bind 65536) Initializing IPsec netlink socket NET: Registered protocol family 1 NET: Registered protocol family 10 IPv6 over IPv4 tunneling driver NET: Registered protocol family 17 p4-clockmod: P4/Xeon(TM) CPU On-Demand Clock Modulation available Software Suspend has malfunctioning SMP support. Disabled :( ACPI: (supports S0 S1 S3 S4 S5) ACPI wakeup devices: PCI0 HUB COM1 COM2 USB1 USB2 USB3 USB4 EUSB PBTN BIOS EDD facility v0.16 2004-Jun-25, 3 devices found RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem). Red Hat nash verACPI: PCI interrupt 0000:00:1f.2[A] -> GSI 18 (level, low) -> IRQ 185 sion 3.5.22 starata1: SATA max UDMA/133 cmd 0x24F0 ctl 0x280A bmdma 0x24D0 irq 185 ting Mounted /pata2: SATA max UDMA/133 cmd 0x24F8 ctl 0x280E bmdma 0x24D8 irq 185 roc filesystem Mounting sysfs Loading libata.ko module Loading ata_piix.ko module ata1: dev 0 ATA, max UDMA/100, 160836480 sectors: lba48 ata1: dev 0 configured for UDMA/100 scsi0 : ata_piix ata2: SATA port has no device. scsi1 : ata_piix Vendor: ATA Model: HDS722580VLSA80 Rev: V32O Type: Direct-Access ANSI SCSI revision: 05 SCSI device sda: 160836480 512-byte hdwr sectors (82348 MB) SCSI device sda: drive cache: write back sda: sda1 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0 Loading sata_silACPI: PCI interrupt 0000:05:0a.0[A] -> GSI 21 (level, low) -> IRQ 217 .ko module ata3: SATA max UDMA/100 cmd 0xF8848080 ctl 0xF884808A bmdma 0xF8848000 irq 217 ata4: SATA max UDMA/100 cmd 0xF88480C0 ctl 0xF88480CA bmdma 0xF8848008 irq 217 ata3: dev 0 ATA, max UDMA/133, 488281250 sectors: lba48 ata3: dev 0 configured for UDMA/100 scsi2 : sata_sil ata4: no device found (phy stat 00000000) scsi3 : sata_sil Vendor: ATA Model: Maxtor 6Y250M0 Rev: YAR5 Type: Direct-Access ANSI SCSI revision: 05 SCSI device sdb: 488281250 512-byte hdwr sectors (250000 MB) SCSI device sdb: drive cache: write back sdb: sdb1 Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0 Attached scsi generic sg1 at scsi2, channel 0, id 0, lun 0, type 0 Creating block devices Creating root device Mounting root filesystemkjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. Freeing unused kernel memory: 192k freed INIT: version 2.85 booting Welcome to Fedora Core Press 'I' to enter interactive startup. Configuring kernel parameters: [ OK ] Setting clock (utc): Tue Aug 24 01:56:50 EDT 2004 [ OK ] Setting hostname sata.normnet.org: [ OK ] Checking root filesystem [/sbin/fsck.ext2 (1) -- /initrd//dev/root] fsck.ext2 -a /initrd//dev/root /: clean, 73444/1026144 files, 236057/2048752 blocks [ OK ] Remounting root filesystem in read-write mode: [ OK ] Activating swap partitions: [ OK ] Checking filesystems Checking all file systems. [/sbin/fsck.ext2 (1) -- /boot] fsck.ext2 -a /dev/hda1 [/sbin/fsck.ext3 (2) -- /spare] fsck.ext3 -a /dev/sda1 /boot: clean, 141/102144 files, 23372/204112 blocks (check in 5 mounts) [/sbin/fsck.ext2 (2) -- /garz] fsck.ext2 -a /dev/hda6 /garz: clean, 12567/6914048 files, 2153558/13817782 blocks [/sbin/fsck.ext3 (2) -- /usr] fsck.ext3 -a /dev/hda3 /usr: clean, 163902/1605632 files, 914627/3211110 blocks /dev/sda1: clean, 305705/10059776 files, 6641691/20103331 blocks [ OK ] Mounting local filesystems: [ OK ] Enabling swap space: [ OK ] INIT: Entering runlevel: 3 Entering non-interactive startup Applying Intel IA32 Microcode update: [ OK ] Setting network parameters: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] Unable to handle kernel NULL pointer dereference at virtual address 000000f0 printing eip: *pde = 00000000 Oops: 0000 [#1] SMP Modules linked in: tg3 battery sata_sil ata_piix libata CPU: 1 EIP: 0060:[] Not tainted VLI EFLAGS: 00010216 (2.6.8.1) EIP is at ipv6_get_hoplimit+0x20/0x5e eax: 00000000 ebx: 00000040 ecx: f7091cbc edx: 00000000 esi: f7091cbc edi: f7a51f3c ebp: f7091c2c esp: f7091bd4 ds: 007b es: 007b ss: 0068 Process ip (pid: 783, threadinfo=f7090000 task=f708f140) Stack: f7f98200 f7a51f2c c0332a41 00000000 c0142fdc f707cce0 f7804538 00000000 00001000 00000000 00000000 f7a51e80 f7091cbc f7f98200 f7091cbc f7091c2c f7f98200 f7f98200 c0333c71 f7091c2c f7f98200 f7091cbc 00000000 00000000 Call Trace: [] ip6_route_add+0x38c/0x634 [] vma_prio_tree_insert+0x29/0x54 [] inet6_rtm_newroute+0x47/0x5b [] clear_user+0x33/0x46<6>tg3: eth0: Link is up at 1000 Mbps, full duplex. tg3: eth0: Flow control is on for TX and on for RX. [] rtnetlink_rcv+0x2ba/0x374 [] create_elf_tables+0x398/0x407 [] netlink_data_ready+0x62/0x6a [] netlink_sendskb+0x9e/0xa0 [] netlink_sendmsg+0x205/0x2f4 [] sock_sendmsg+0xa5/0xbf [] do_page_cache_readahead+0xa9/0x179 [] update_atime+0x92/0xd5 [] verify_iovec+0x3c/0x94 [] sys_sendmsg+0x189/0x1e6 [] do_no_page+0x63/0x2ed [] handle_mm_fault+0xf4/0x163 [] do_page_fault+0x141/0x544 [] __sock_create+0xc6/0x1ed [] copy_from_user+0x42/0x6e [] sys_socketcall+0x236/0x254 [] do_gettimeofday+0x1e/0xba [] do_page_fault+0x0/0x544 [] error_code+0x2d/0x38 [] sysenter_past_esp+0x52/0x71 Code: c3 89 14 24 e8 e8 82 ff ff eb ec 83 ec 08 b8 6c 45 3f c0 89 5c 24 04 8b 1d c4 45 3f c0 f0 83 28 01 0f 88 1e 25 00 00 8b 44 24 0c <8b> 90 f0 00 00 00 85 d2 74 04 f0 ff 42 68 f0 ff 05 6c 45 3f c0 /etc/sysconfig/network-scripts/init.ipv6-global: line 184: 783 Segmentation fault LC_ALL=C /sbin/ip $options --------------090707010506030608080205 Content-Type: text/plain; name="config.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="config.txt" # # Automatically generated make config: don't edit # Linux kernel version: 2.6.8.1 # Tue Aug 24 01:45:22 2004 # CONFIG_X86=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_GENERIC_ISA_DMA=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y # CONFIG_CLEAN_COMPILE is not set CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=16 CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # 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 # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=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=y CONFIG_HPET_EMULATE_RTC=y CONFIG_SMP=y CONFIG_NR_CPUS=4 CONFIG_SCHED_SMT=y # CONFIG_PREEMPT is not set 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=m CONFIG_X86_CPUID=m # # Firmware Drivers # CONFIG_EDD=y 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 is not set CONFIG_HAVE_DEC_LOCK=y # CONFIG_REGPARM is not set # # Power management options (ACPI, APM) # CONFIG_PM=y CONFIG_SOFTWARE_SUSPEND=y # CONFIG_PM_DISK is not set # # 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=m 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=y 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=y # CONFIG_CPU_FREQ_PROC_INTF is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y # CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_TABLE=y # # CPUFreq processor drivers # CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set # CONFIG_X86_POWERNOW_K6 is not set # CONFIG_X86_POWERNOW_K7 is not set # CONFIG_X86_POWERNOW_K8 is not set # CONFIG_X86_GX_SUSPMOD is not set # CONFIG_X86_SPEEDSTEP_CENTRINO is not set CONFIG_X86_SPEEDSTEP_ICH=y # CONFIG_X86_SPEEDSTEP_SMI is not set CONFIG_X86_P4_CLOCKMOD=y CONFIG_X86_SPEEDSTEP_LIB=y # CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set # CONFIG_X86_LONGRUN is not set # CONFIG_X86_LONGHAUL 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=y # CONFIG_PCI_GOANY is not set CONFIG_PCI_DIRECT=y CONFIG_PCI_MSI=y # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set CONFIG_ISA=y # CONFIG_EISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set # # PCMCIA/CardBus support # # CONFIG_PCMCIA is not set CONFIG_PCMCIA_PROBE=y # # PCI Hotplug Support # # CONFIG_HOTPLUG_PCI is not set # # Executable file formats # CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=m CONFIG_BINFMT_MISC=m # # Device Drivers # # # Generic Driver Options # CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Plug and Play support # # CONFIG_PNP is not set # # Block devices # CONFIG_BLK_DEV_FD=y # CONFIG_BLK_DEV_XD 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=m # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_BLK_DEV_INITRD=y # CONFIG_LBD is not set # # 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 is not set 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=y CONFIG_IDE_TASKFILE_IO=y # # IDE chipset support/bugfixes # # CONFIG_IDE_GENERIC is not set # 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 is not set # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_RZ1000 is not set 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_ADMA=y # 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=y # 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 is not set # 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_IDE_CHIPSETS 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=y CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_CHR_DEV_SG=y # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # CONFIG_SCSI_MULTI_LUN=y CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_LOGGING=y # # 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_7000FASST is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 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_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_MEGARAID is not set CONFIG_SCSI_SATA=y CONFIG_SCSI_SATA_SVW=m CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m CONFIG_SCSI_SATA_SIL=m CONFIG_SCSI_SATA_SIS=m CONFIG_SCSI_SATA_VIA=m CONFIG_SCSI_SATA_VITESSE=m # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 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_GENERIC_NCR5380 is not set # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS 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_SEAGATE is not set # CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set # CONFIG_SCSI_ULTRASTOR is not set # CONFIG_SCSI_NSP32 is not set CONFIG_SCSI_DEBUG=m # # Old CD-ROM drivers (not SCSI, not IDE) # # CONFIG_CD_NO_IDESCSI 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=y 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=y CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y CONFIG_INET_TUNNEL=y CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y CONFIG_INET6_AH=y CONFIG_INET6_ESP=y CONFIG_INET6_IPCOMP=y CONFIG_INET6_TUNNEL=y # CONFIG_IPV6_TUNNEL is not set # CONFIG_NETFILTER is not set CONFIG_XFRM=y CONFIG_XFRM_USER=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_LLC=y CONFIG_LLC2=y # 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=m # 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 is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_ETHERTAP 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 # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # # Tulip family network device support # CONFIG_NET_TULIP=y # CONFIG_DE2104X is not set # CONFIG_TULIP is not set # CONFIG_DE4X5 is not set # CONFIG_WINBOND_840 is not set # CONFIG_DM9102 is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set # CONFIG_HP100 is not set # CONFIG_NET_ISA 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_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_CS89x0 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=m # CONFIG_NE2K_PCI is not set CONFIG_8139CP=m CONFIG_8139TOO=m # CONFIG_8139TOO_PIO is not set CONFIG_8139TOO_TUNE_TWISTER=y # CONFIG_8139TOO_8129 is not set # CONFIG_8139_OLD_RX_RESET is not set CONFIG_SIS900=m CONFIG_EPIC100=m CONFIG_SUNDANCE=m CONFIG_SUNDANCE_MMIO=y # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_VIA_VELOCITY is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=m CONFIG_E1000_NAPI=y # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set CONFIG_R8169=m CONFIG_R8169_NAPI=y # CONFIG_SK98LIN is not set CONFIG_TIGON3=m # # 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_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=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 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_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y CONFIG_INPUT_PCSPKR=y # CONFIG_INPUT_UINPUT 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=y # CONFIG_SERIAL_8250_ACPI is not set CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_EXTENDED=y # CONFIG_SERIAL_8250_MANY_PORTS is not set CONFIG_SERIAL_8250_SHARE_IRQ=y # CONFIG_SERIAL_8250_DETECT_IRQ is not set # CONFIG_SERIAL_8250_MULTIPORT is not set # CONFIG_SERIAL_8250_RSA is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_QIC02_TAPE 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=m CONFIG_RTC=y # 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_FTAPE is not set CONFIG_AGP=y # CONFIG_AGP_ALI is not set # CONFIG_AGP_ATI is not set # CONFIG_AGP_AMD is not set # CONFIG_AGP_AMD64 is not set CONFIG_AGP_INTEL=y # CONFIG_AGP_INTEL_MCH is not set # CONFIG_AGP_NVIDIA is not set # CONFIG_AGP_SIS is not set # CONFIG_AGP_SWORKS is not set # CONFIG_AGP_VIA is not set # CONFIG_AGP_EFFICEON is not set # CONFIG_DRM is not set # CONFIG_MWAVE is not set # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y # CONFIG_HPET_RTC_IRQ is not set CONFIG_HPET_MMAP=y # 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_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # # Sound # CONFIG_SOUND=y # # Advanced Linux Sound Architecture # # CONFIG_SND is not set # # Open Sound System # CONFIG_SOUND_PRIME=y # CONFIG_SOUND_BT878 is not set # CONFIG_SOUND_CMPCI is not set # CONFIG_SOUND_EMU10K1 is not set # CONFIG_SOUND_FUSION is not set # CONFIG_SOUND_CS4281 is not set # CONFIG_SOUND_ES1370 is not set # CONFIG_SOUND_ES1371 is not set # CONFIG_SOUND_ESSSOLO1 is not set # CONFIG_SOUND_MAESTRO is not set # CONFIG_SOUND_MAESTRO3 is not set CONFIG_SOUND_ICH=m # CONFIG_SOUND_SONICVIBES is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set # CONFIG_SOUND_VIA82CXXX is not set # CONFIG_SOUND_OSS is not set # CONFIG_SOUND_ALI5455 is not set # CONFIG_SOUND_FORTE is not set # CONFIG_SOUND_RME96XX is not set # CONFIG_SOUND_AD1980 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 # # 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 is not set CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set CONFIG_USB_STORAGE_RW_DETECT=y # CONFIG_USB_STORAGE_DATAFAB is not set CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y CONFIG_USB_STORAGE_DPCM=y # CONFIG_USB_STORAGE_HP8200e is not set CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y # # USB Human Interface Devices (HID) # CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y # CONFIG_HID_FF is not set # CONFIG_USB_HIDDEV is not set # # USB HID Boot Protocol drivers # # CONFIG_USB_KBD is not set # CONFIG_USB_MOUSE 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 is not set # 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 # # # 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 is not set # CONFIG_USB_PHIDGETSERVO is not set # 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=y CONFIG_EXT2_FS_POSIX_ACL=y # CONFIG_EXT2_FS_SECURITY is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y # CONFIG_EXT3_FS_SECURITY is not set CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y # 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=m # # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=m CONFIG_JOLIET=y # CONFIG_ZISOFS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m # CONFIG_VFAT_FS is not set CONFIG_FAT_DEFAULT_CODEPAGE=437 # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY 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=y CONFIG_NFS_V3=y CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y CONFIG_RPCSEC_GSS_SPKM3=y # CONFIG_SMB_FS 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=m # 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=y 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=m # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=y # # Profiling support # # CONFIG_PROFILING is not set # # Kernel hacking # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_INFO is not set # CONFIG_FRAME_POINTER is not set CONFIG_EARLY_PRINTK=y # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y # # Security options # # CONFIG_SECURITY is not set # # Cryptographic options # CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_SERPENT is not set CONFIG_CRYPTO_AES_586=y # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set CONFIG_CRYPTO_DEFLATE=y # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set # # Library routines # # CONFIG_CRC_CCITT is not set CONFIG_CRC32=m # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_X86_SMP=y CONFIG_X86_HT=y CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y CONFIG_PC=y --------------090707010506030608080205-- From davem@redhat.com Mon Aug 23 23:51:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Aug 2004 23:51:53 -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 i7O6pkUK028739 for ; Mon, 23 Aug 2004 23:51:46 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7O6pUe1005727; Tue, 24 Aug 2004 02:51:30 -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 i7O6pPa06886; Tue, 24 Aug 2004 02:51:25 -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 i7O6pLb5028816; Tue, 24 Aug 2004 02:51:22 -0400 Date: Mon, 23 Aug 2004 23:51:23 -0700 From: "David S. Miller" To: Jeff Garzik Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: IPv6 oops on ifup in latest BK Message-Id: <20040823235123.71f18c04.davem@redhat.com> In-Reply-To: <412ADB20.5000901@pobox.com> References: <412ADB20.5000901@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: 8024 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: 987 Lines: 41 On Tue, 24 Aug 2004 02:07:28 -0400 Jeff Garzik wrote: > Attached minicom.cap.txt gives the ksymoops output and dmesg output. > Appears to die in ipv6_get_hoplimit. Yoshifuji-san, it is rt6i_dev changes. The problem is that ipv6_get_hoplimit() gets called with NULL dev. I believe it is an error in the logic for RTCF_REJECT processing. If user does not specify a specific device index, and this is RTCF_REJECT, then we will end up with dev being NULL. It is this piece of code in ip6_route_add(): if (dev && dev != &loopback_dev) { It does not handle the case where dev == NULL correctly. Original code did do the right thing: if (dev) dev_put(dev); dev = &loopback_dev; dev_hold(dev); Maybe new code should be something like: if (dev && dev != &loopback_dev) { dev_put(dev); in6_dev_put(idev); } dev = &loopback_dev; dev_hold(dev); idev = in6_dev_get(dev); if (!idev) { err = -ENODEV; goto out; } What do you think? From herbert@gondor.apana.org.au Tue Aug 24 00:34:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 00:34: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 i7O7YYlv000690 for ; Tue, 24 Aug 2004 00:34: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 1BzVop-0001AN-00; Tue, 24 Aug 2004 17:34:11 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BzVoY-00018s-00; Tue, 24 Aug 2004 17:33:54 +1000 From: Herbert Xu To: davem@redhat.com (David S. Miller) Subject: Re: IPv6 oops on ifup in latest BK Cc: jgarzik@pobox.com, yoshfuji@linux-ipv6.org, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Organization: Core In-Reply-To: <20040823235123.71f18c04.davem@redhat.com> X-Newsgroups: apana.lists.os.linux.kernel,apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Tue, 24 Aug 2004 17:33:54 +1000 X-archive-position: 8025 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: 1022 Lines: 39 David S. Miller wrote: > > Maybe new code should be something like: > > if (dev && dev != &loopback_dev) { You want if (dev) { here. > dev_put(dev); > in6_dev_put(idev); > } > dev = &loopback_dev; > dev_hold(dev); > idev = in6_dev_get(dev); > if (!idev) { > err = -ENODEV; > goto out; > } > > What do you think? Yes this would work. But I think Yoshifuji-san is trying to avoid the unnecessary put/get in the case where dev is already loopback_dev. So something like this might work: if (dev != &loopback_dev) { if (dev) { dev_put(dev); in6_dev_put(idev); } ... } -- 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 Aug 24 01:21:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 01:21:38 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7O8LSbJ002262 for ; Tue, 24 Aug 2004 01:21:30 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 620DB33CE6; Tue, 24 Aug 2004 17:22:08 +0900 (JST) Date: Tue, 24 Aug 2004 17:22:07 +0900 (JST) Message-Id: <20040824.172207.109934952.yoshfuji@linux-ipv6.org> To: davem@redhat.com, jgarzik@pobox.com Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, yoshfuji@linux-ipv6.org Subject: Re: IPv6 oops on ifup in latest BK From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040823235123.71f18c04.davem@redhat.com> References: <412ADB20.5000901@pobox.com> <20040823235123.71f18c04.davem@redhat.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: 8026 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: 1425 Lines: 47 In article <20040823235123.71f18c04.davem@redhat.com> (at Mon, 23 Aug 2004 23:51:23 -0700), "David S. Miller" says: > > Attached minicom.cap.txt gives the ksymoops output and dmesg output. > > Appears to die in ipv6_get_hoplimit. > > Yoshifuji-san, it is rt6i_dev changes. The problem is that > ipv6_get_hoplimit() gets called with NULL dev. : > It is this piece of code in ip6_route_add(): > > if (dev && dev != &loopback_dev) { > > It does not handle the case where dev == NULL correctly. > Original code did do the right thing: > > if (dev) > dev_put(dev); > dev = &loopback_dev; > dev_hold(dev); Good catch and spotting. Please try this patch. Thank you. ===== net/ipv6/route.c 1.88 vs edited ===== --- 1.88/net/ipv6/route.c 2004-08-17 11:25:06 +09:00 +++ edited/net/ipv6/route.c 2004-08-24 17:09:10 +09:00 @@ -820,9 +820,12 @@ */ if ((rtmsg->rtmsg_flags&RTF_REJECT) || (dev && (dev->flags&IFF_LOOPBACK) && !(addr_type&IPV6_ADDR_LOOPBACK))) { - if (dev && dev != &loopback_dev) { - dev_put(dev); - in6_dev_put(idev); + /* hold loopback dev/idev if we haven't done so. */ + if (dev != &loopback_dev) { + if (dev) { + dev_put(dev); + in6_dev_put(idev); + } dev = &loopback_dev; dev_hold(dev); idev = in6_dev_get(dev); -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From okir@suse.de Tue Aug 24 02:06:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 02:06:36 -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 i7O96SHU003515 for ; Tue, 24 Aug 2004 02:06:29 -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 1EA57ADE9F4; Tue, 24 Aug 2004 11:06:16 +0200 (CEST) Date: Tue, 24 Aug 2004 11:06:15 +0200 From: Olaf Kirch To: usagi-users@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Merging USAGI patches into mainline Message-ID: <20040824090615.GD505@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 8027 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: okir@suse.de Precedence: bulk X-list: netdev Content-Length: 213 Lines: 10 Hi all, Is there any timeline or process to push USAGI patches into mainline? Is there any way to help with this process? Olaf -- Olaf Kirch | The Hardware Gods hate me. okir@suse.de | ---------------+ From tgraf@suug.ch Tue Aug 24 02:49:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 02:49: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 i7O9nhBN007286 for ; Tue, 24 Aug 2004 02:49: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 7BF4268; Tue, 24 Aug 2004 11:49:10 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id C20AA1C0E7; Tue, 24 Aug 2004 11:49:52 +0200 (CEST) Date: Tue, 24 Aug 2004 11:49:52 +0200 From: Thomas Graf To: Herbert Xu Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-ID: <20040824094952.GF21073@postel.suug.ch> References: <20040823205114.GB19921@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-archive-position: 8028 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: 699 Lines: 18 * Herbert Xu 2004-08-24 12:26 > Thomas Graf wrote: > > > > + RTA_PUT(skb, IFLA_TXQLEN, sizeof(unsigned long), &dev->tx_queue_len); > > Please use a fixed width type like u32. I used the same type as it is stored in struct net_device to avoid data loss on certain architectures. Due to the fact that the size of the attribute is provided to the userspace receiver, no guessing is involved. Using u32 would mean to do an unnecessary cast. > Keep in mind that the ioctl version is exporting an int. Yes, but the size of ivalue is also dependent on the architecture and the cast to int is done for compatibility reasons. Thomas From herbert@gondor.apana.org.au Tue Aug 24 03:18:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 03:18: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 i7OAIBHl011876 for ; Tue, 24 Aug 2004 03:18: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 1BzYMS-0002Of-00; Tue, 24 Aug 2004 20:17:04 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BzYMJ-000208-00; Tue, 24 Aug 2004 20:16:55 +1000 From: Herbert Xu To: tgraf@suug.ch (Thomas Graf) Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Cc: herbert@gondor.apana.org.au, davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Organization: Core In-Reply-To: <20040824094952.GF21073@postel.suug.ch> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Tue, 24 Aug 2004 20:16:55 +1000 X-archive-position: 8029 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 Thomas Graf wrote: > * Herbert Xu 2004-08-24 12:26 >> Thomas Graf wrote: >> > >> > + RTA_PUT(skb, IFLA_TXQLEN, sizeof(unsigned long), &dev->tx_queue_len); >> >> Please use a fixed width type like u32. > > I used the same type as it is stored in struct net_device to avoid data > loss on certain architectures. Due to the fact that the size of the > attribute is provided to the userspace receiver, no guessing is involved. > Using u32 would mean to do an unnecessary cast. Please think about the meaning of the value. Is anyone going to have a queue bigger than 2^32? And if the answer is yes, then please use u64. -- 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 Tue Aug 24 03:28:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 03:28:11 -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 i7OAS3Ol012339 for ; Tue, 24 Aug 2004 03:28:04 -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 1BzYWq-0003PV-A2; Tue, 24 Aug 2004 11:27:49 +0100 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.41) id 1BzYWn-0000nD-TG; Tue, 24 Aug 2004 11:27:45 +0100 Date: Tue, 24 Aug 2004 11:27:44 +0100 From: Russell King To: Linux Kernel List Cc: netdev@oss.sgi.com Subject: [PATCH] 2.6.9-rc1 compile fix: ip_conntrack_proto_udp.c / ip_conntrack_proto_icmp.c Message-ID: <20040824112744.B23041@flint.arm.linux.org.uk> Mail-Followup-To: Linux Kernel List , netdev@oss.sgi.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: 8030 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 These seem to suffer from the same problem that ip_conntrack_proto_tcp.c does (see Felipe Alfaro Solana recent mail on lkml.) net/ipv4/netfilter/ip_conntrack_proto_udp.c: In function `udp_error': net/ipv4/netfilter/ip_conntrack_proto_udp.c:120: error: `NF_IP_PRE_ROUTING' undeclared (first use in this function) net/ipv4/netfilter/ip_conntrack_proto_udp.c:120: error: (Each undeclared identifier is reported only once net/ipv4/netfilter/ip_conntrack_proto_udp.c:120: error: for each function it appears in.) and: net/ipv4/netfilter/ip_conntrack_proto_icmp.c: In function `icmp_error_message': net/ipv4/netfilter/ip_conntrack_proto_icmp.c:180: error: `NF_IP_LOCAL_OUT' undeclared (first use in this function) net/ipv4/netfilter/ip_conntrack_proto_icmp.c:180: error: (Each undeclared identifier is reported only once net/ipv4/netfilter/ip_conntrack_proto_icmp.c:180: error: for each function it appears in.) net/ipv4/netfilter/ip_conntrack_proto_icmp.c: In function `icmp_error': net/ipv4/netfilter/ip_conntrack_proto_icmp.c:216: error: `NF_IP_PRE_ROUTING' undeclared (first use in this function) diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej orig/net/ipv4/netfilter/ip_conntrack_proto_udp.c linux/net/ipv4/netfilter/ip_conntrack_proto_udp.c --- orig/net/ipv4/netfilter/ip_conntrack_proto_udp.c Tue Aug 24 09:57:21 2004 +++ linux/net/ipv4/netfilter/ip_conntrack_proto_udp.c Tue Aug 24 11:22:48 2004 @@ -14,6 +14,7 @@ #include #include #include +#include #include unsigned long ip_ct_udp_timeout = 30*HZ; diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej orig/net/ipv4/netfilter/ip_conntrack_proto_icmp.c linux/net/ipv4/netfilter/ip_conntrack_proto_icmp.c --- orig/net/ipv4/netfilter/ip_conntrack_proto_icmp.c Tue Aug 24 09:57:21 2004 +++ linux/net/ipv4/netfilter/ip_conntrack_proto_icmp.c Tue Aug 24 11:24:27 2004 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include -- 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 herbert@gondor.apana.org.au Tue Aug 24 03:57:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 03:57: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 i7OAv7av013939 for ; Tue, 24 Aug 2004 03:57: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 1BzYyq-0002lR-00; Tue, 24 Aug 2004 20:56:44 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BzYyn-0002ex-00; Tue, 24 Aug 2004 20:56:41 +1000 Date: Tue, 24 Aug 2004 20:56:41 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [IPSEC] Set TTL from route Message-ID: <20040824105641.GA10202@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: 8031 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 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: Here is the promised patch that sets the TTL from the route parameter. I decided against adding an option to inherit the TTL like IPIP/GRE as I think that it doesn't really make sense with IPsec. But it can be easily added later if someone needs it. This isn't completely right when nested tunnels are involved. The TTL for intervening tunnels should be set from the routes to the intervening nodes. But fixing that involves using information that isn't currently in the bundle. I'll revisit this once the MTU stuff is fixed since that'll also involving adding the intervening routes to the bundle. 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/xfrm4_output.c 1.4 vs edited ===== --- 1.4/net/ipv4/xfrm4_output.c 2004-08-20 20:39:43 +10:00 +++ edited/net/ipv4/xfrm4_output.c 2004-08-24 20:03:26 +10:00 @@ -58,8 +58,7 @@ if (!top_iph->frag_off) __ip_select_ident(top_iph, dst, 0); - /* TTL disclosed */ - top_iph->ttl = iph->ttl; + top_iph->ttl = dst_path_metric(dst, RTAX_HOPLIMIT); top_iph->saddr = x->props.saddr.a4; top_iph->daddr = x->id.daddr.a4; ===== net/ipv6/xfrm6_output.c 1.4 vs edited ===== --- 1.4/net/ipv6/xfrm6_output.c 2004-08-20 20:39:43 +10:00 +++ edited/net/ipv6/xfrm6_output.c 2004-08-24 20:52:19 +10:00 @@ -64,7 +64,7 @@ top_iph->flow_lbl[1] = iph->flow_lbl[1]; top_iph->flow_lbl[2] = iph->flow_lbl[2]; top_iph->nexthdr = IPPROTO_IPV6; - top_iph->hop_limit = iph->hop_limit; + top_iph->hop_limit = dst_path_metric(dst, RTAX_HOPLIMIT); ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); } --Dxnq1zWXvFF0Q93v-- From herbert@gondor.apana.org.au Tue Aug 24 04:05:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 04:06: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 i7OB5rYI014829 for ; Tue, 24 Aug 2004 04:05:54 -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 1BzZ7O-0002oM-00; Tue, 24 Aug 2004 21:05:34 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BzZ7M-0002lC-00; Tue, 24 Aug 2004 21:05:32 +1000 Date: Tue, 24 Aug 2004 21:05:32 +1000 To: "David S. Miller" , jmorris@redhat.com, netdev@oss.sgi.com Subject: RFC: pskb_expand_head instead of skb_copy in skb_checksum_help Message-ID: <20040824110532.GA10241@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8032 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 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: Here is the patch that you wanted to shoot holes at :) The idea is simple. None of the callers of skb_checksum are passing it skb's which are shared. They may be cloned however. But the application checksum is always in the skb header so there is no need to linearise it. Supposing all these assumptions are correct, then we can avoid the overhead of skb_copy() and get away with pskb_expand_head(). 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 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/core/dev.c 1.155 vs edited ===== --- 1.155/net/core/dev.c 2004-07-31 07:23:04 +10:00 +++ edited/net/core/dev.c 2004-08-24 20:59:57 +10:00 @@ -1144,16 +1144,10 @@ goto out; } - if (skb_shared(*pskb) || skb_cloned(*pskb)) { - struct sk_buff *newskb = skb_copy(*pskb, GFP_ATOMIC); - if (!newskb) { - ret = -ENOMEM; + if (skb_cloned(*pskb)) { + ret = pskb_expand_head(*pskb, 0, 0, GFP_ATOMIC); + if (ret) goto out; - } - if ((*pskb)->sk) - skb_set_owner_w(newskb, (*pskb)->sk); - kfree_skb(*pskb); - *pskb = newskb; } if (offset > (int)(*pskb)->len) --/9DWx/yDrRhgMJTb-- From tgraf@suug.ch Tue Aug 24 05:04:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 05:04:36 -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 i7OC4Ta8019824 for ; Tue, 24 Aug 2004 05:04: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 C15DE68; Tue, 24 Aug 2004 14:03:59 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 839481C0E7; Tue, 24 Aug 2004 14:04:42 +0200 (CEST) Date: Tue, 24 Aug 2004 14:04:42 +0200 From: Thomas Graf To: Herbert Xu Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-ID: <20040824120442.GA21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-archive-position: 8033 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 * Herbert Xu 2004-08-24 20:16 > Please think about the meaning of the value. Is anyone going to have a queue > bigger than 2^32? > > And if the answer is yes, then please use u64. Can you please explain the actual reason for using a fixed width type when all existing numeric attributes use arch depedent types? I agree with you, if it happens to be the reason, that it is easier for a userspace application to use fixed width types but we should change it for all attributes if the decision is made for this one. I have more patches in my queue which would throw up the same question again. Therefore I'd like to see it discussed now and a decision to be made whether to use fixed width types or not. Thomas From yoshfuji@linux-ipv6.org Tue Aug 24 07:03:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 07:03:36 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7OE3TQu026235 for ; Tue, 24 Aug 2004 07:03:29 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 4425133CE5; Tue, 24 Aug 2004 23:04:09 +0900 (JST) Date: Tue, 24 Aug 2004 23:04:09 +0900 (JST) Message-Id: <20040824.230409.21312009.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: [PATCH] add SCTP to xfrm_flowi_{sport,dport}() 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: 8034 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. (I'm not sure if ipsec is fully supported for sctp, but anyway,) I should not have made regression here. Thanks. --yoshfuji ===== include/net/xfrm.h 1.66 vs edited ===== --- 1.66/include/net/xfrm.h 2004-08-22 14:00:07 +09:00 +++ edited/include/net/xfrm.h 2004-08-24 22:55:30 +09:00 @@ -428,6 +428,7 @@ switch(fl->proto) { case IPPROTO_TCP: case IPPROTO_UDP: + case IPPROTO_SCTP: port = fl->fl_ip_sport; break; case IPPROTO_ICMP: @@ -447,6 +448,7 @@ switch(fl->proto) { case IPPROTO_TCP: case IPPROTO_UDP: + case IPPROTO_SCTP: port = fl->fl_ip_dport; break; case IPPROTO_ICMP: -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From tgraf@suug.ch Tue Aug 24 09:24:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 09:24: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 i7OGOnsK009324 for ; Tue, 24 Aug 2004 09:24: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 1B40768; Tue, 24 Aug 2004 18:24:19 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id B39461C0E7; Tue, 24 Aug 2004 18:25:01 +0200 (CEST) Date: Tue, 24 Aug 2004 18:25:01 +0200 From: Thomas Graf To: Herbert Xu Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-ID: <20040824162501.GI21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-archive-position: 8035 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 * Herbert Xu 2004-08-24 20:16 > Please think about the meaning of the value. Is anyone going to have a queue > bigger than 2^32? > > And if the answer is yes, then please use u64. Here's a new patch with all discussed changes integrated. I don't have enough cycles to split it all up again. Introduces IFLA_TXQLEN and IFLA_MAP to support accessing ifmap and txqlen via RTM_(SET|GET)LINK. Converts IFLA_MTU, IFLA_LINK and IFLA_MASTER from arch dependent types to fixed width types. Adds a IFLA_MTU handler for RTM_SETLINK to support changing the MTU via RTM_SETLINK. Adds a handler for ifi_flags to support changing net_device flags via RTM_SETLINK and changes RTM_GETLINK to be symmetric with RTM_SETLINK like in ioctl handlers. Thomas --- 1.19/net/core/rtnetlink.c Thu Apr 29 01:04:48 2004 +++ 1.27/net/core/rtnetlink.c Tue Aug 24 18:16:40 2004 @@ -166,31 +166,53 @@ r->ifi_family = AF_UNSPEC; r->ifi_type = dev->type; r->ifi_index = dev->ifindex; - r->ifi_flags = dev->flags; + r->ifi_flags = dev_get_flags(dev); r->ifi_change = change; - if (!netif_running(dev) || !netif_carrier_ok(dev)) - r->ifi_flags &= ~IFF_RUNNING; - else - r->ifi_flags |= IFF_RUNNING; - RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name); + + if (1) { + u32 txqlen = dev->tx_queue_len; + RTA_PUT(skb, IFLA_TXQLEN, sizeof(txqlen), &txqlen); + } + + if (1) { + struct ifmap map = { + .mem_start = dev->mem_start, + .mem_end = dev->mem_end, + .base_addr = dev->base_addr, + .irq = dev->irq, + .dma = dev->dma, + .port = dev->if_port, + }; + RTA_PUT(skb, IFLA_MAP, sizeof(map), &map); + } + if (dev->addr_len) { RTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr); RTA_PUT(skb, IFLA_BROADCAST, dev->addr_len, dev->broadcast); } + if (1) { - unsigned mtu = dev->mtu; + u32 mtu = dev->mtu; RTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu); } - if (dev->ifindex != dev->iflink) - RTA_PUT(skb, IFLA_LINK, sizeof(int), &dev->iflink); + + if (dev->ifindex != dev->iflink) { + u32 iflink = dev->iflink; + RTA_PUT(skb, IFLA_LINK, sizeof(iflink), &iflink); + } + if (dev->qdisc_sleeping) RTA_PUT(skb, IFLA_QDISC, strlen(dev->qdisc_sleeping->ops->id) + 1, dev->qdisc_sleeping->ops->id); - if (dev->master) - RTA_PUT(skb, IFLA_MASTER, sizeof(int), &dev->master->ifindex); + + if (dev->master) { + u32 master = dev->master->ifindex; + RTA_PUT(skb, IFLA_MASTER, sizeof(master), &master); + } + if (dev->get_stats) { unsigned long *stats = (unsigned long*)dev->get_stats(dev); if (stats) { @@ -246,6 +268,30 @@ err = -EINVAL; + if (ifm->ifi_flags) + dev_change_flags(dev, ifm->ifi_flags); + + if (ida[IFLA_MAP - 1]) { + if (!dev->set_config) { + err = -EOPNOTSUPP; + goto out; + } + + if (!netif_device_present(dev)) { + err = -ENODEV; + goto out; + } + + if (ida[IFLA_MAP - 1]->rta_len != RTA_LENGTH(sizeof(struct ifmap))) + goto out; + + err = dev->set_config(dev, (struct ifmap *) + RTA_DATA(ida[IFLA_MAP - 1])); + + if (err) + goto out; + } + if (ida[IFLA_ADDRESS - 1]) { if (!dev->set_mac_address) { err = -EOPNOTSUPP; @@ -268,6 +314,23 @@ goto out; memcpy(dev->broadcast, RTA_DATA(ida[IFLA_BROADCAST - 1]), dev->addr_len); + } + + if (ida[IFLA_MTU - 1]) { + if (ida[IFLA_MTU - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + err = dev_set_mtu(dev, *((u32 *) RTA_DATA(ida[IFLA_MTU - 1]))); + + if (err) + goto out; + + } + + if (ida[IFLA_TXQLEN - 1]) { + if (ida[IFLA_TXQLEN - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + + dev->tx_queue_len = *((u32 *) RTA_DATA(ida[IFLA_TXQLEN - 1])); } err = 0; From davem@redhat.com Tue Aug 24 10:32:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 10:32: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 i7OHWfBD011486 for ; Tue, 24 Aug 2004 10:32:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OHWLS0006877; Tue, 24 Aug 2004 13:32:21 -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 i7OHWGa21995; Tue, 24 Aug 2004 13:32:16 -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 i7OHWC9T007204; Tue, 24 Aug 2004 13:32:12 -0400 Date: Tue, 24 Aug 2004 10:32:05 -0700 From: "David S. Miller" To: Thomas Graf Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-Id: <20040824103205.1ea9c999.davem@redhat.com> In-Reply-To: <20040824120442.GA21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824120442.GA21296@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: 8036 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 Tue, 24 Aug 2004 14:04:42 +0200 Thomas Graf wrote: > * Herbert Xu 2004-08-24 20:16 > > Please think about the meaning of the value. Is anyone going to have a queue > > bigger than 2^32? > > > > And if the answer is yes, then please use u64. > > Can you please explain the actual reason for using a fixed width > type when all existing numeric attributes use arch depedent types? Because otherwise things will break and explode for 32-bit binaries running on 64-bit kernels, which is the situation for the majority of userland on some platforms. We have a compatability layer to translate 32-bit system call structures to/from 64-bit data types. But such a scheme does not work for things like netlink sockets where it is the data stream via read/write calls that contains the structures. Also, we eventually want to be able to transmit netlink messages over real networks to remote clients. Therefore, like any other real network protocol, we should use fixed sized types in the data. Stop bickering and use a u32, or I'll make that change for you :-) From davem@redhat.com Tue Aug 24 10:33:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 10:33:23 -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 i7OHXHhN011561 for ; Tue, 24 Aug 2004 10:33:18 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OHX3S0006964; Tue, 24 Aug 2004 13:33:03 -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 i7OHX2a22169; Tue, 24 Aug 2004 13:33: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 i7OHWxpK007389; Tue, 24 Aug 2004 13:32:59 -0400 Date: Tue, 24 Aug 2004 10:32:52 -0700 From: "David S. Miller" To: Thomas Graf Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-Id: <20040824103252.1b593e68.davem@redhat.com> In-Reply-To: <20040824162501.GI21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824162501.GI21296@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: 8037 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 Tue, 24 Aug 2004 18:25:01 +0200 Thomas Graf wrote: > * Herbert Xu 2004-08-24 20:16 > > Please think about the meaning of the value. Is anyone going to have a queue > > bigger than 2^32? > > > > And if the answer is yes, then please use u64. > > Here's a new patch with all discussed changes integrated. I don't have enough > cycles to split it all up again. This patch only contained net/core/rtnetlink.c changes, where is the rest? From dcn@sgi.com Tue Aug 24 11:01:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:01:45 -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 i7OI1eBf012695 for ; Tue, 24 Aug 2004 11:01:40 -0700 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i7OJ6WR8008661 for ; Tue, 24 Aug 2004 12:06:33 -0700 Received: from sgi.com (aqua.americas.sgi.com [128.162.233.32]) by flecktone.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i7OI0WOV45762665; Tue, 24 Aug 2004 13:00:32 -0500 (CDT) Received: by sgi.com (Postfix, from userid 144) id 1DEFB1BE17; Tue, 24 Aug 2004 13:00:31 -0500 (CDT) Date: Tue, 24 Aug 2004 13:00:30 -0500 To: netdev@oss.sgi.com, linux-ia64@vger.kernel.org Subject: [PATCH 0/4] SGI Altix cross partition functionality (1st revision) Message-ID: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> User-Agent: nail 10.6 11/15/03 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: dcn@sgi.com (Dean Nelson) X-archive-position: 8038 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcn@sgi.com Precedence: bulk X-list: netdev Terminology The term 'partition', adopted by the SGI hardware designers and which perculated up into the software, is used in reference to a single SSI when multiple SSIs are running on a single Altix. An Altix running multiple SSIs is said to be 'partitioned', whereas one that is running only a single SSI is said to be 'unpartitioned'. The term '[a]cross partition' refers to a functionality that spans between two SSIs on a multi-SSI Altix. ('XP' is its abbreviation.) Introduction This feature provides cross partition functionality when running multiple partitions on a single SGI Altix. This functionality includes such things as a pseudo-ethernet driver and memory sharing, which are provided by functional support modules that sit on top of a low-level communication module. The communication module provides channels for point-to-point communication between the partitions. There is support for eight channels between any two partitions (currently only two channels are in use, the remainder are available for possible future expansion). A functional support module uses the same channel number for all of its cross partition communication across the entire Altix. There is a shim module that acts as an interface between the functional support modules and the communication module. Its sole purpose is to allow for the communication module to be rmmod'd/insmod'd without 'disturbing' the functional support modules and the user processes utilizing them. The shim module has also proven itself to be invaluable for debugging. This feature is being submitted as four separate quilt patches: exports - symbols that need to be exported for XP[C|NET] XP - shim module XPC - cross partition (low-level) communication module XPNET - cross partition pseudo-ethernet driver functional support module The XPC patch is dependent on the SGI fetchop driver patch to be applied first. The SGI fetchop driver patch is being pushed out to the community separately by Robin Holt. The XPC patch is also dependent on bte_copy(). This function activates the SGI Altix's Block Transfer Engine (BTE). [ The netdev folks only need to review the XPNET patch. ] From shemminger@osdl.org Tue Aug 24 11:07:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:07:39 -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 i7OI7UGT013119 for ; Tue, 24 Aug 2004 11:07:31 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7OI7B123529; Tue, 24 Aug 2004 11:07:11 -0700 Date: Tue, 24 Aug 2004 11:07:11 -0700 From: Stephen Hemminger To: "David S. Miller" , netdev@oss.sgi.com Subject: [PATCH 2.6] deliver_skb cleanup Message-Id: <20040824110711.3a1782d7@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8039 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 Cleanup of deliver_skb: get rid of unused argument and use it in the NET_CLS_ACT hook. Signed-off-by: Stephen Hemminger diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-08-24 11:05:51 -07:00 +++ b/net/core/dev.c 2004-08-24 11:05:51 -07:00 @@ -1676,7 +1676,7 @@ } static __inline__ int deliver_skb(struct sk_buff *skb, - struct packet_type *pt_prev, int last) + struct packet_type *pt_prev) { atomic_inc(&skb->users); return pt_prev->func(skb, skb->dev, pt_prev); @@ -1691,7 +1691,7 @@ { int ret = NET_RX_DROP; if (pt_prev) - ret = deliver_skb(skb, pt_prev, 0); + ret = deliver_skb(skb, pt_prev); return ret; } @@ -1791,15 +1791,14 @@ list_for_each_entry_rcu(ptype, &ptype_all, list) { if (!ptype->dev || ptype->dev == skb->dev) { if (pt_prev) - ret = deliver_skb(skb, pt_prev, 0); + ret = deliver_skb(skb, pt_prev); pt_prev = ptype; } } #ifdef CONFIG_NET_CLS_ACT if (pt_prev) { - atomic_inc(&skb->users); - ret = pt_prev->func(skb, skb->dev, pt_prev); + ret = deliver_skb(skb, pt_prev); pt_prev = NULL; /* noone else should process this after*/ } else { skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); @@ -1826,7 +1825,7 @@ if (ptype->type == type && (!ptype->dev || ptype->dev == skb->dev)) { if (pt_prev) - ret = deliver_skb(skb, pt_prev, 0); + ret = deliver_skb(skb, pt_prev); pt_prev = ptype; } } From tgraf@suug.ch Tue Aug 24 11:08:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:08: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 i7OI8EQM013297 for ; Tue, 24 Aug 2004 11:08:15 -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 E019768; Tue, 24 Aug 2004 20:07:44 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 03ECD1C0E7; Tue, 24 Aug 2004 20:08:25 +0200 (CEST) Date: Tue, 24 Aug 2004 20:08:25 +0200 From: Thomas Graf To: "David S. Miller" Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-ID: <20040824180825.GJ21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824162501.GI21296@postel.suug.ch> <20040824103252.1b593e68.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040824103252.1b593e68.davem@redhat.com> X-archive-position: 8040 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 * David S. Miller <20040824103252.1b593e68.davem@redhat.com> 2004-08-24 10:32 > On Tue, 24 Aug 2004 18:25:01 +0200 > Thomas Graf wrote: > > > * Herbert Xu 2004-08-24 20:16 > > > Please think about the meaning of the value. Is anyone going to have a queue > > > bigger than 2^32? > > > > > > And if the answer is yes, then please use u64. > > > > Here's a new patch with all discussed changes integrated. I don't have enough > > cycles to split it all up again. > > This patch only contained net/core/rtnetlink.c changes, where is > the rest? Sorry, the complete patch again: --- 1.19/net/core/rtnetlink.c Thu Apr 29 01:04:48 2004 +++ 1.27/net/core/rtnetlink.c Tue Aug 24 18:16:40 2004 @@ -166,31 +166,53 @@ r->ifi_family = AF_UNSPEC; r->ifi_type = dev->type; r->ifi_index = dev->ifindex; - r->ifi_flags = dev->flags; + r->ifi_flags = dev_get_flags(dev); r->ifi_change = change; - if (!netif_running(dev) || !netif_carrier_ok(dev)) - r->ifi_flags &= ~IFF_RUNNING; - else - r->ifi_flags |= IFF_RUNNING; - RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name); + + if (1) { + u32 txqlen = dev->tx_queue_len; + RTA_PUT(skb, IFLA_TXQLEN, sizeof(txqlen), &txqlen); + } + + if (1) { + struct ifmap map = { + .mem_start = dev->mem_start, + .mem_end = dev->mem_end, + .base_addr = dev->base_addr, + .irq = dev->irq, + .dma = dev->dma, + .port = dev->if_port, + }; + RTA_PUT(skb, IFLA_MAP, sizeof(map), &map); + } + if (dev->addr_len) { RTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr); RTA_PUT(skb, IFLA_BROADCAST, dev->addr_len, dev->broadcast); } + if (1) { - unsigned mtu = dev->mtu; + u32 mtu = dev->mtu; RTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu); } - if (dev->ifindex != dev->iflink) - RTA_PUT(skb, IFLA_LINK, sizeof(int), &dev->iflink); + + if (dev->ifindex != dev->iflink) { + u32 iflink = dev->iflink; + RTA_PUT(skb, IFLA_LINK, sizeof(iflink), &iflink); + } + if (dev->qdisc_sleeping) RTA_PUT(skb, IFLA_QDISC, strlen(dev->qdisc_sleeping->ops->id) + 1, dev->qdisc_sleeping->ops->id); - if (dev->master) - RTA_PUT(skb, IFLA_MASTER, sizeof(int), &dev->master->ifindex); + + if (dev->master) { + u32 master = dev->master->ifindex; + RTA_PUT(skb, IFLA_MASTER, sizeof(master), &master); + } + if (dev->get_stats) { unsigned long *stats = (unsigned long*)dev->get_stats(dev); if (stats) { @@ -246,6 +268,30 @@ err = -EINVAL; + if (ifm->ifi_flags) + dev_change_flags(dev, ifm->ifi_flags); + + if (ida[IFLA_MAP - 1]) { + if (!dev->set_config) { + err = -EOPNOTSUPP; + goto out; + } + + if (!netif_device_present(dev)) { + err = -ENODEV; + goto out; + } + + if (ida[IFLA_MAP - 1]->rta_len != RTA_LENGTH(sizeof(struct ifmap))) + goto out; + + err = dev->set_config(dev, (struct ifmap *) + RTA_DATA(ida[IFLA_MAP - 1])); + + if (err) + goto out; + } + if (ida[IFLA_ADDRESS - 1]) { if (!dev->set_mac_address) { err = -EOPNOTSUPP; @@ -268,6 +314,23 @@ goto out; memcpy(dev->broadcast, RTA_DATA(ida[IFLA_BROADCAST - 1]), dev->addr_len); + } + + if (ida[IFLA_MTU - 1]) { + if (ida[IFLA_MTU - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + err = dev_set_mtu(dev, *((u32 *) RTA_DATA(ida[IFLA_MTU - 1]))); + + if (err) + goto out; + + } + + if (ida[IFLA_TXQLEN - 1]) { + if (ida[IFLA_TXQLEN - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + + dev->tx_queue_len = *((u32 *) RTA_DATA(ida[IFLA_TXQLEN - 1])); } err = 0; --- 1.33/include/linux/rtnetlink.h Mon Apr 5 23:41:40 2004 +++ 1.35/include/linux/rtnetlink.h Tue Aug 24 20:06:53 2004 @@ -540,6 +540,8 @@ IFLA_QDISC, IFLA_STATS, IFLA_COST, + IFLA_TXQLEN, + IFLA_MAP, #define IFLA_COST IFLA_COST IFLA_PRIORITY, #define IFLA_PRIORITY IFLA_PRIORITY From tgraf@suug.ch Tue Aug 24 11:14:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:14: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 i7OIErHT013945 for ; Tue, 24 Aug 2004 11:14: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 1C45B68; Tue, 24 Aug 2004 20:14:24 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 3377C1C0E7; Tue, 24 Aug 2004 20:15:07 +0200 (CEST) Date: Tue, 24 Aug 2004 20:15:07 +0200 From: Thomas Graf To: "David S. Miller" Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-ID: <20040824181507.GK21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824120442.GA21296@postel.suug.ch> <20040824103205.1ea9c999.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040824103205.1ea9c999.davem@redhat.com> X-archive-position: 8041 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 * David S. Miller <20040824103205.1ea9c999.davem@redhat.com> 2004-08-24 10:32 > On Tue, 24 Aug 2004 14:04:42 +0200 > Thomas Graf wrote: > > > * Herbert Xu 2004-08-24 20:16 > > > Please think about the meaning of the value. Is anyone going to have a queue > > > bigger than 2^32? > > > > > > And if the answer is yes, then please use u64. > > > > Can you please explain the actual reason for using a fixed width > > type when all existing numeric attributes use arch depedent types? > > Because otherwise things will break and explode for 32-bit > binaries running on 64-bit kernels, which is the situation > for the majority of userland on some platforms. > Also, we eventually want to be able to transmit netlink > messages over real networks to remote clients. Which would be no problem as the size of the attribute is available to userspace. > Therefore, like any other real network protocol, we should > use fixed sized types in the data. I'm fine with that, as long as it's done the same way for all attributes. From dcn@sgi.com Tue Aug 24 11:22:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:22:39 -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 i7OIMWRv014424 for ; Tue, 24 Aug 2004 11:22:32 -0700 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i7OJRP6V014386 for ; Tue, 24 Aug 2004 12:27:25 -0700 Received: from sgi.com (aqua.americas.sgi.com [128.162.233.32]) by flecktone.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i7OIMOOV45779216; Tue, 24 Aug 2004 13:22:24 -0500 (CDT) Received: by sgi.com (Postfix, from userid 144) id 263F41BDE6; Tue, 24 Aug 2004 13:22:22 -0500 (CDT) Date: Tue, 24 Aug 2004 13:22:22 -0500 From: Dean Nelson To: linux-ia64@vger.kernel.org, netdev@oss.sgi.com Subject: [PATCH 1/4] SGI Altix cross partition functionality (1st revision) Message-ID: <20040824182222.GA13961@sgi.com> References: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> User-Agent: Mutt/1.5.6i X-archive-position: 8042 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcn@sgi.com Precedence: bulk X-list: netdev This patch exports the symbols needed by XP[C|NET]. Signed-off-by: Dean Nelson Index: bk-linux-2.6/arch/ia64/kernel/smpboot.c =================================================================== --- bk-linux-2.6.orig/arch/ia64/kernel/smpboot.c 2004-08-23 14:38:36.000000000 -0500 +++ bk-linux-2.6/arch/ia64/kernel/smpboot.c 2004-08-24 07:29:11.000000000 -0500 @@ -498,6 +498,7 @@ EXPORT_SYMBOL(cpu_to_node_map); /* which logical CPUs are on which nodes */ cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; +EXPORT_SYMBOL(node_to_cpu_mask); /* * Build cpu to node mapping and initialize the per node cpu masks. Index: bk-linux-2.6/arch/ia64/sn/kernel/setup.c =================================================================== --- bk-linux-2.6.orig/arch/ia64/sn/kernel/setup.c 2004-08-23 14:38:37.000000000 -0500 +++ bk-linux-2.6/arch/ia64/sn/kernel/setup.c 2004-08-24 07:29:11.000000000 -0500 @@ -50,6 +50,7 @@ #include DEFINE_PER_CPU(struct pda_s, pda_percpu); +EXPORT_PER_CPU_SYMBOL(pda_percpu); #define MAX_PHYS_MEMORY (1UL << 49) /* 1 TB */ @@ -65,8 +66,11 @@ unsigned long sn_rtc_cycles_per_second; partid_t sn_partid = -1; +EXPORT_SYMBOL(sn_partid); char sn_system_serial_number_string[128]; +EXPORT_SYMBOL(sn_system_serial_number_string); u64 sn_partition_serial_number; +EXPORT_SYMBOL(sn_partition_serial_number); short physical_node_map[MAX_PHYSNODE_ID]; Index: bk-linux-2.6/kernel/sched.c =================================================================== --- bk-linux-2.6.orig/kernel/sched.c 2004-08-23 14:39:35.000000000 -0500 +++ bk-linux-2.6/kernel/sched.c 2004-08-24 07:29:11.000000000 -0500 @@ -2814,6 +2814,7 @@ { return setscheduler(pid, policy, param); } +EXPORT_SYMBOL(sys_sched_setscheduler); /** * sys_sched_setparam - set/change the RT priority of a thread Index: bk-linux-2.6/mm/page_alloc.c =================================================================== --- bk-linux-2.6.orig/mm/page_alloc.c 2004-08-23 14:38:16.000000000 -0500 +++ bk-linux-2.6/mm/page_alloc.c 2004-08-24 07:29:11.000000000 -0500 @@ -40,6 +40,7 @@ unsigned long totalhigh_pages; long nr_swap_pages; int numnodes = 1; +EXPORT_SYMBOL(numnodes); int sysctl_lower_zone_protection = 0; EXPORT_SYMBOL(totalram_pages); Index: bk-linux-2.6/include/asm-ia64/sn/sn_sal.h =================================================================== --- bk-linux-2.6.orig/include/asm-ia64/sn/sn_sal.h 2004-08-23 14:40:00.000000000 -0500 +++ bk-linux-2.6/include/asm-ia64/sn/sn_sal.h 2004-08-24 07:29:11.000000000 -0500 @@ -494,7 +494,8 @@ ia64_sn_partition_serial_get(void) { struct ia64_sal_retval ret_stuff; - SAL_CALL(ret_stuff, SN_SAL_PARTITION_SERIAL_GET, 0, 0, 0, 0, 0, 0, 0); + ia64_sal_oemcall_reentrant(&ret_stuff, SN_SAL_PARTITION_SERIAL_GET, 0, + 0, 0, 0, 0, 0, 0); if (ret_stuff.status != 0) return 0; return ret_stuff.v0; @@ -502,11 +503,10 @@ static inline u64 sn_partition_serial_number_val(void) { - if (sn_partition_serial_number) { - return(sn_partition_serial_number); - } else { - return(sn_partition_serial_number = ia64_sn_partition_serial_get()); + if (unlikely(sn_partition_serial_number == 0)) { + sn_partition_serial_number = ia64_sn_partition_serial_get(); } + return sn_partition_serial_number; } /* @@ -517,8 +517,8 @@ ia64_sn_sysctl_partition_get(nasid_t nasid) { struct ia64_sal_retval ret_stuff; - SAL_CALL(ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, - 0, 0, 0, 0, 0, 0); + ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, + 0, 0, 0, 0, 0, 0); if (ret_stuff.status != 0) return INVALID_PARTID; return ((partid_t)ret_stuff.v0); @@ -532,11 +532,38 @@ static inline partid_t sn_local_partid(void) { - if (sn_partid < 0) { - return (sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id()))); - } else { - return sn_partid; + if (unlikely(sn_partid < 0)) { + sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id())); } + return sn_partid; +} + +/* + * Returns the physical address of the partition's reserved page through + * an iterative number of calls. + * + * On first call, 'cookie' and 'len' should be set to 0, and 'addr' + * set to the nasid of the partition whose reserved page's address is + * being sought. + * On subsequent calls, pass the values, that were passed back on the + * previous call. + * + * While the return status equals SALRET_MORE_PASSES, keep calling + * this function after first copying 'len' bytes starting at 'addr' + * into 'buf'. Once the return status equals SALRET_OK, 'addr' will + * be the physical address of the partition's reserved page. If the + * return status equals neither of these, an error as occurred. + */ +static inline s64 +sn_partition_reserved_page_pa(u64 buf, u64 *cookie, u64 *addr, u64 *len) +{ + struct ia64_sal_retval rv; + ia64_sal_oemcall_reentrant(&rv, SN_SAL_GET_PARTITION_ADDR, *cookie, + *addr, buf, *len, 0, 0, 0); + *cookie = rv.v0; + *addr = rv.v1; + *len = rv.v2; + return rv.status; } /* @@ -558,8 +585,8 @@ sn_register_xp_addr_region(u64 paddr, u64 len, int operation) { struct ia64_sal_retval ret_stuff; - SAL_CALL(ret_stuff, SN_SAL_XP_ADDR_REGION, paddr, len, (u64)operation, - 0, 0, 0, 0); + ia64_sal_oemcall(&ret_stuff, SN_SAL_XP_ADDR_REGION, paddr, len, + (u64)operation, 0, 0, 0, 0); return ret_stuff.status; } @@ -583,8 +610,8 @@ } else { call = SN_SAL_NO_FAULT_ZONE_PHYSICAL; } - SAL_CALL(ret_stuff, call, start_addr, end_addr, return_addr, (u64)1, - 0, 0, 0); + ia64_sal_oemcall(&ret_stuff, call, start_addr, end_addr, return_addr, + (u64)1, 0, 0, 0); return ret_stuff.status; } @@ -605,8 +632,8 @@ sn_change_coherence(u64 *new_domain, u64 *old_domain) { struct ia64_sal_retval ret_stuff; - SAL_CALL(ret_stuff, SN_SAL_COHERENCE, new_domain, old_domain, 0, 0, - 0, 0, 0); + ia64_sal_oemcall(&ret_stuff, SN_SAL_COHERENCE, (u64)new_domain, + (u64)old_domain, 0, 0, 0, 0, 0); return ret_stuff.status; } @@ -625,8 +652,8 @@ cnodeid = nasid_to_cnodeid(get_node_number(paddr)); spin_lock(&NODEPDA(cnodeid)->bist_lock); local_irq_save(irq_flags); - SAL_CALL_NOLOCK(ret_stuff, SN_SAL_MEMPROTECT, paddr, len, nasid_array, - perms, 0, 0, 0); + ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, + (u64)nasid_array, perms, 0, 0, 0); local_irq_restore(irq_flags); spin_unlock(&NODEPDA(cnodeid)->bist_lock); return ret_stuff.status; From dcn@sgi.com Tue Aug 24 11:23:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:24:01 -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 i7OINrDS014706 for ; Tue, 24 Aug 2004 11:23:53 -0700 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i7OJSkff014744 for ; Tue, 24 Aug 2004 12:28:47 -0700 Received: from sgi.com (aqua.americas.sgi.com [128.162.233.32]) by flecktone.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i7OINkOV45773454; Tue, 24 Aug 2004 13:23:46 -0500 (CDT) Received: by sgi.com (Postfix, from userid 144) id 19F971BDE6; Tue, 24 Aug 2004 13:23:45 -0500 (CDT) Date: Tue, 24 Aug 2004 13:23:44 -0500 From: Dean Nelson To: linux-ia64@vger.kernel.org, netdev@oss.sgi.com Subject: [PATCH 2/4] SGI Altix cross partition functionality (1st revision) Message-ID: <20040824182344.GB13961@sgi.com> References: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> User-Agent: Mutt/1.5.6i X-archive-position: 8043 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcn@sgi.com Precedence: bulk X-list: netdev This patch contains the shim module (XP) which interfaces between the communication module (XPC) and the functional support modules (like XPNET). Signed-off-by: Dean Nelson Index: linux/arch/ia64/Kconfig =================================================================== --- linux.orig/arch/ia64/Kconfig 2004-08-17 13:31:26.000000000 -0500 +++ linux/arch/ia64/Kconfig 2004-08-23 11:39:50.000000000 -0500 @@ -189,6 +189,16 @@ depends on !IA64_HP_SIM default y +config IA64_SGI_SN_XPC + tristate "Support DMA Messaging between SGI machines" + depends on FETCHOP + help + An SGI machine can be divided into multiple Single System + Images which act independently of each other and have + hardware based memory protection from the others. Enabling + this feature will allow limited communication between + those System Images without allowing write access. + config IA64_SGI_SN_SIM bool "SGI Medusa Simulator Support" depends on IA64_SGI_SN2 Index: linux/arch/ia64/sn/kernel/Makefile =================================================================== --- linux.orig/arch/ia64/sn/kernel/Makefile 2004-06-16 00:18:59.000000000 -0500 +++ linux/arch/ia64/sn/kernel/Makefile 2004-08-23 10:55:03.000000000 -0500 @@ -9,3 +9,5 @@ obj-y += probe.o setup.o bte.o irq.o mca.o idle.o sn2/ obj-$(CONFIG_IA64_GENERIC) += machvec.o +obj-$(CONFIG_IA64_SGI_SN_XPC) += xp.o +xp-y := xp_main.o xp_kdb.o xp_nofault.o Index: linux/arch/ia64/sn/kernel/xp_main.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux/arch/ia64/sn/kernel/xp_main.c 2004-08-23 10:55:03.000000000 -0500 @@ -0,0 +1,358 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved. + */ + + +/* + * Cross Partition (XP) base. + * + * XP provides a base from which its users can interact + * with XPC, yet not be dependent on XPC. + * + */ + + +#include +#include +#include +#include +#include +#include + + +/* + * xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level + * users of XPC. + */ +struct xpc_registration xpc_registrations[XPC_NCHANNELS]; + + +/* + * Initialize the XPC interface to inidicate that XPC isn't loaded. + */ +static enum xpc_retval xpc_notloaded(void) { return xpcNotLoaded; } + +struct xpc_interface xpc_interface = { + (void (*)(int)) xpc_notloaded, + (void (*)(int)) xpc_notloaded, + (enum xpc_retval (*)(partid_t, int, u32, void **)) xpc_notloaded, + (enum xpc_retval (*)(partid_t, int, void *)) xpc_notloaded, + (enum xpc_retval (*)(partid_t, int, void *, xpc_notify_func, void *)) + xpc_notloaded, + (void (*)(partid_t, int, void *)) xpc_notloaded, + (enum xpc_retval (*)(partid_t, void *)) xpc_notloaded +}; + + +char * +xpc_get_ascii_reason_code(enum xpc_retval reason) +{ + switch (reason) { + case xpcSuccess: return ""; + case xpcNotConnected: return "xpcNotConnected"; + case xpcConnected: return "xpcConnected"; + case xpcRETIRED1: return "xpcRETIRED1"; + case xpcMsgReceived: return "xpcMsgReceived"; + case xpcMsgDelivered: return "xpcMsgDelivered"; + case xpcRETIRED2: return "xpcRETIRED2"; + case xpcNoWait: return "xpcNoWait"; + case xpcRetry: return "xpcRetry"; + case xpcTimeout: return "xpcTimeout"; + case xpcInterrupted: return "xpcInterrupted"; + case xpcUnequalMsgSizes: return "xpcUnequalMsgSizes"; + case xpcInvalidAddress: return "xpcInvalidAddress"; + case xpcNoMemory: return "xpcNoMemory"; + case xpcLackOfResources: return "xpcLackOfResources"; + case xpcUnregistered: return "xpcUnregistered"; + case xpcAlreadyRegistered: return "xpcAlreadyRegistered"; + case xpcPartitionDown: return "xpcPartitionDown"; + case xpcNotLoaded: return "xpcNotLoaded"; + case xpcUnloading: return "xpcUnloading"; + case xpcBadMagic: return "xpcBadMagic"; + case xpcReactivating: return "xpcReactivating"; + case xpcUnregistering: return "xpcUnregistering"; + case xpcOtherUnregistering: return "xpcOtherUnregistering"; + case xpcCloneKThread: return "xpcCloneKThread"; + case xpcCloneKThreadFailed: return "xpcCloneKThreadFailed"; + case xpcNoHeartbeat: return "xpcNoHeartbeat"; + case xpcPioReadError: return "xpcPioReadError"; + case xpcPhysAddrRegFailed: return "xpcPhysAddrRegFailed"; + case xpcBteDirectoryError: return "xpcBteDirectoryError"; + case xpcBtePoisonError: return "xpcBtePoisonError"; + case xpcBteWriteError: return "xpcBteWriteError"; + case xpcBteAccessError: return "xpcBteAccessError"; + case xpcBtePWriteError: return "xpcBtePWriteError"; + case xpcBtePReadError: return "xpcBtePReadError"; + case xpcBteTimeOutError: return "xpcBteTimeOutError"; + case xpcBteXtalkError: return "xpcBteXtalkError"; + case xpcBteNotAvailable: return "xpcBteNotAvailable"; + case xpcBteUnmappedError: return "xpcBteUnmappedError"; + case xpcBadVersion: return "xpcBadVersion"; + case xpcVarsNotSet: return "xpcVarsNotSet"; + case xpcNoRsvdPageAddr: return "xpcNoRsvdPageAddr"; + case xpcInvalidPartid: return "xpcInvalidPartid"; + case xpcLocalPartid: return "xpcLocalPartid"; + case xpcUnknownReason: return "xpcUnknownReason"; + default: return "undefined reason code"; + } +} + + +static void +xp_init_xpc(void) +{ + extern void xp_kdb_register(void); + int ch_number; + + + xp_kdb_register(); + + /* initialize the connection registration semaphores */ + for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) { + sema_init(&xpc_registrations[ch_number].sema, 1); /* mutex */ + } +} + + +static void +xp_exit_xpc(void) +{ + extern void xp_kdb_unregister(void); + + + xp_kdb_unregister(); +} + + +/* + * XPC calls this when it (the XPC module) has been loaded. + */ +void +xpc_set_interface(void (*connect)(int), + void (*disconnect)(int), + enum xpc_retval (*allocate)(partid_t, int, u32, void **), + enum xpc_retval (*send)(partid_t, int, void *), + enum xpc_retval (*send_notify)(partid_t, int, void *, + xpc_notify_func, void *), + void (*received)(partid_t, int, void *), + enum xpc_retval (*partid_to_nasids)(partid_t, void *)) +{ + xpc_interface.connect = connect; + xpc_interface.disconnect = disconnect; + xpc_interface.allocate = allocate; + xpc_interface.send = send; + xpc_interface.send_notify = send_notify; + xpc_interface.received = received; + xpc_interface.partid_to_nasids = partid_to_nasids; +} + + +/* + * XPC calls this when it (the XPC module) is being unloaded. + */ +void +xpc_clear_interface(void) +{ + xpc_interface.connect = (void (*)(int)) xpc_notloaded; + xpc_interface.disconnect = (void (*)(int)) xpc_notloaded; + xpc_interface.allocate = (enum xpc_retval (*)(partid_t, int, u32, + void **)) xpc_notloaded; + xpc_interface.send = (enum xpc_retval (*)(partid_t, int, void *)) + xpc_notloaded; + xpc_interface.send_notify = (enum xpc_retval (*)(partid_t, int, void *, + xpc_notify_func, void *)) xpc_notloaded; + xpc_interface.received = (void (*)(partid_t, int, void *)) + xpc_notloaded; + xpc_interface.partid_to_nasids = (enum xpc_retval (*)(partid_t, void *)) + xpc_notloaded; +} + + +/* + * Register for automatic establishment of a channel connection whenever + * a partition comes up. + * + * Arguments: + * + * ch_number - channel # to register for connection. + * func - function to call for asynchronous notification of channel + * state changes (i.e., connection, disconnection, error) and + * the arrival of incoming messages. + * key - pointer to optional user-defined value that gets passed back + * to the user on any callouts made to func. + * payload_size - size in bytes of the XPC message's payload area which + * contains a user-defined message. The user should make + * this large enough to hold their largest message. + * nentries - max #of XPC message entries a message queue can contain. + * The actual number, which is determined when a connection + * is established and may be less then requested, will be + * passed to the user via the xpcConnected callout. + * assigned_limit - max number of kthreads allowed to be processing + * messages (per connection) at any given instant. + * idle_limit - max number of kthreads allowed to be idle at any given + * instant. + */ +enum xpc_retval +xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, + u16 nentries, u32 assigned_limit, u32 idle_limit) +{ + struct xpc_registration *registration; + + + DBUG_ON(ch_number < 0 || ch_number >= XPC_NCHANNELS); + DBUG_ON(payload_size == 0 || nentries == 0); + DBUG_ON(func == NULL); + DBUG_ON(assigned_limit == 0 || idle_limit > assigned_limit); + + registration = &xpc_registrations[ch_number]; + + if (down_interruptible(®istration->sema) != 0) { + return xpcInterrupted; + } + + /* if XPC_CHANNEL_REGISTERED(ch_number) */ + if (registration->func != NULL) { + up(®istration->sema); + return xpcAlreadyRegistered; + } + + /* register the channel for connection */ + registration->msg_size = XPC_MSG_SIZE(payload_size); + registration->nentries = nentries; + registration->assigned_limit = assigned_limit; + registration->idle_limit = idle_limit; + registration->key = key; + registration->func = func; + + up(®istration->sema); + + xpc_interface.connect(ch_number); + + return xpcSuccess; +} + + +/* + * Remove the registration for automatic connection of the specified channel + * when a partition comes up. + * + * Before returning this xpc_disconnect() will wait for all connections on the + * specified channel have been closed/torndown. So the caller can be assured + * that they will not be receiving any more callouts from XPC to their + * function registered via xpc_connect(). + * + * Arguments: + * + * ch_number - channel # to unregister. + */ +void +xpc_disconnect(int ch_number) +{ + struct xpc_registration *registration; + + + DBUG_ON(ch_number < 0 || ch_number >= XPC_NCHANNELS); + + registration = &xpc_registrations[ch_number]; + + /* + * We've decided not to make this a down_interruptible(), since we + * figured XPC's users will just turn around and call xpc_disconnect() + * again anyways, so we might as well wait, if need be. + */ + down(®istration->sema); + + /* if !XPC_CHANNEL_REGISTERED(ch_number) */ + if (registration->func == NULL) { + up(®istration->sema); + return; + } + + /* remove the connection registration for the specified channel */ + registration->func = NULL; + registration->key = NULL; + registration->nentries = 0; + registration->msg_size = 0; + registration->assigned_limit = 0; + registration->idle_limit = 0; + + xpc_interface.disconnect(ch_number); + + up(®istration->sema); + + return; +} + + +int __init +xp_init(void) +{ + int ret; + int (* pior_func)(void *) = xp_nofault_PIOR; + int (* pior_err_func)(void) = xp_error_PIOR; + + + if (!ia64_platform_is("sn2")) { + return -ENODEV; + } + + + /* + * Register a nofault code region which performs a cross-partition + * PIO read. If the PIO read times out, the MCA handler will consume + * the error and return to a kernel-provided instruction to indicate + * an error. This PIO read exists because it is guaranteed to timeout + * if the destination is down (AMO operations do not timeout on at + * least some CPUs on Shubs <= v1.2, which unfortunately we have to + * work around). + */ + if ((ret = sn_register_nofault_code(*(u64 *) pior_func, + *(u64 *) pior_err_func, + *(u64 *) pior_err_func, 1, 1)) != 0) { + printk(KERN_ERR "XP: can't register nofault code, error=%d\n", + ret); + } + + + xp_init_xpc(); + + return 0; +} +module_init(xp_init); + + +void __exit +xp_exit(void) +{ + int (* pior_func)(void *) = xp_nofault_PIOR; + int (* pior_err_func)(void) = xp_error_PIOR; + + + xp_exit_xpc(); + + + /* unregister the PIO nofault code region */ + (void) sn_register_nofault_code(*(u64 *) pior_func, + *(u64 *) pior_err_func, + *(u64 *) pior_err_func, 1, 0); +} +module_exit(xp_exit); + + +MODULE_AUTHOR("Silicon Graphics, Inc."); +MODULE_DESCRIPTION("Cross Partition (XP) base"); +MODULE_LICENSE("GPL"); + +EXPORT_SYMBOL(xp_nofault_PIOR); +EXPORT_SYMBOL(xpc_get_ascii_reason_code); +EXPORT_SYMBOL(xpc_registrations); +EXPORT_SYMBOL(xpc_interface); +EXPORT_SYMBOL(xpc_clear_interface); +EXPORT_SYMBOL(xpc_set_interface); +EXPORT_SYMBOL(xpc_connect); +EXPORT_SYMBOL(xpc_disconnect); + Index: linux/arch/ia64/sn/kernel/xp_nofault.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux/arch/ia64/sn/kernel/xp_nofault.S 2004-08-23 10:55:03.000000000 -0500 @@ -0,0 +1,31 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved. + */ + + +/* + * The xp_nofault_PIOR function takes a pointer to a remote PIO register + * and attempts to load and consume a value from it. This function + * will be registered as a nofault code block. In the event that the + * PIO read fails, the MCA handler will force the error to look + * corrected and vector to the xp_error_PIOR which will return an error. + * + * extern int xp_nofault_PIOR(void *remote_register); + */ + + .global xp_nofault_PIOR +xp_nofault_PIOR: + mov r8=r0 // Stage a success return value + ld8.acq r9=[r32];; // PIO Read the specified register + adds r9=1,r9 // Add to force a consume + br.ret.sptk.many b0;; // Return success + + .global xp_error_PIOR +xp_error_PIOR: + mov r8=1 // Return value of 1 + br.ret.sptk.many b0;; // Return failure + Index: linux/include/asm-ia64/sn/xp.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux/include/asm-ia64/sn/xp.h 2004-08-23 10:55:03.000000000 -0500 @@ -0,0 +1,426 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2004 Silicon Graphics, Inc. All rights reserved. + */ + + +/* + * External Cross Partition (XP) structures and defines. + */ + + +#ifndef _ASM_IA64_SN_XP_H +#define _ASM_IA64_SN_XP_H + + +#include +#include +#include +#include +#include + + +#ifdef USE_DBUG_ON +#define DBUG_ON(condition) BUG_ON(condition) +#else +#define DBUG_ON(condition) +#endif + + +/* + * Define the number of u64s required to represent all the C-brick nasids + * as a bitmap. The cross-partition kernel modules deal only with + * C-brick nasids, thus the need for bitmaps which don't account for + * odd-numbered (non C-brick) nasids. + */ +#define XP_MAX_NASIDS (MAX_NASIDS / 2) +#define XP_NUM_NASID_WORDS ((XP_MAX_NASIDS + 63)/ 64) + + +/* + * Wrapper for bte_copy() that should it return a failure status will retry + * the bte_copy() once in the hope that the failure was due to a temporary + * aberration (i.e., the link going down temporarily). + * + * See bte_copy for definition of the input parameters. + * + * Note: xp_bte_copy() should never be called while holding a spinlock. + */ +static inline bte_result_t +xp_bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) +{ + bte_result_t ret; + + + ret = bte_copy(src, dest, len, mode, notification); + + if (ret != BTE_SUCCESS) { + if (!in_interrupt()) { + cond_resched(); + } + ret = bte_copy(src, dest, len, mode, notification); + } + + return ret; +} + + +/* + * XPC establishes channel connections between the local partition and any + * other partition that is currently up. Over these channels, kernel-level + * `users' can communicate with their counterparts on the other partitions. + * + * The maxinum number of channels is limited to eight. For performance reasons, + * the internal cross partition structures require sixteen bytes per channel, + * and eight allows all of this interface-shared info to fit in one cache line. + * + * XPC_NCHANNELS reflects the total number of channels currently defined. + * If the need for additional channels arises, one can simply increase + * XPC_NCHANNELS accordingly. If the day should come where that number + * exceeds the MAXIMUM number of channels allowed (eight), then one will need + * to make changes to the XPC code to allow for this. + */ +#define XPC_MEM_CHANNEL 0 /* memory channel number */ +#define XPC_NET_CHANNEL 1 /* network channel number */ + +#define XPC_NCHANNELS 2 /* #of defined channels */ +#define XPC_MAX_NCHANNELS 8 /* max #of channels allowed */ + +#if XPC_NCHANNELS > XPC_MAX_NCHANNELS +#error XPC_NCHANNELS exceeds MAXIMUM allowed. +#endif + + +/* + * The format of an XPC message is as follows: + * + * +-------+--------------------------------+ + * | flags |////////////////////////////////| + * +-------+--------------------------------+ + * | message # | + * +----------------------------------------+ + * | payload (user-defined message) | + * | | + * : + * | | + * +----------------------------------------+ + * + * The size of the payload is defined by the user via xpc_connect(). A user- + * defined message resides in the payload area. + * + * The user should have no dealings with the message header, but only the + * message's payload. When a message entry is allocated (via xpc_allocate()) + * a pointer to the payload area is returned and not the actual beginning of + * the XPC message. The user then constructs a message in the payload area + * and passes that pointer as an argument on xpc_send() or xpc_send_notify(). + * + * The size of a message entry (within a message queue) must be a cacheline + * sized multiple in order to facilitate the BTE transfer of messages from one + * message queue to another. A macro, XPC_MSG_SIZE(), is provided for the user + * that wants to fit as many msg entries as possible in a given memory size + * (e.g. a memory page). + */ +struct xpc_msg { + u8 flags; /* FOR XPC INTERNAL USE ONLY */ + u8 reserved[7]; /* FOR XPC INTERNAL USE ONLY */ + s64 number; /* FOR XPC INTERNAL USE ONLY */ + + u64 payload; /* user defined portion of message */ +}; + + +#define XPC_MSG_PAYLOAD_OFFSET (u64) (&((struct xpc_msg *)0)->payload) +#define XPC_MSG_SIZE(_payload_size) \ + L1_CACHE_ALIGN(XPC_MSG_PAYLOAD_OFFSET + (_payload_size)) + + +/* + * Define the return values and values passed to user's callout functions. + * (It is important to add new value codes at the end just preceding + * xpcUnknownReason, which must have the highest numerical value.) + */ +enum xpc_retval { + xpcSuccess = 0, + + xpcNotConnected, /* 1: channel is not connected */ + xpcConnected, /* 2: channel connected (opened) */ + xpcRETIRED1, /* 3: (formerly xpcDisconnected) */ + + xpcMsgReceived, /* 4: message received */ + xpcMsgDelivered, /* 5: message delivered and acknowledged */ + + xpcRETIRED2, /* 6: (formerly xpcTransferFailed) */ + + xpcNoWait, /* 7: operation would require wait */ + xpcRetry, /* 8: retry operation */ + xpcTimeout, /* 9: timeout in xpc_allocate_msg_wait() */ + xpcInterrupted, /* 10: interrupted wait */ + + xpcUnequalMsgSizes, /* 11: message size disparity between sides */ + xpcInvalidAddress, /* 12: invalid address */ + + xpcNoMemory, /* 13: no memory available for XPC structures */ + xpcLackOfResources, /* 14: insufficient resources for operation */ + xpcUnregistered, /* 15: channel is not registered */ + xpcAlreadyRegistered, /* 16: channel is already registered */ + + xpcPartitionDown, /* 17: remote partition is down */ + xpcNotLoaded, /* 18: XPC module is not loaded */ + xpcUnloading, /* 19: this side is unloading XPC module */ + + xpcBadMagic, /* 20: XPC MAGIC string not found */ + + xpcReactivating, /* 21: remote partition was reactivated */ + + xpcUnregistering, /* 22: this side is unregistering channel */ + xpcOtherUnregistering, /* 23: other side is unregistering channel */ + + xpcCloneKThread, /* 24: cloning kernel thread */ + xpcCloneKThreadFailed, /* 25: cloning kernel thread failed */ + + xpcNoHeartbeat, /* 26: remote partition has no heartbeat */ + + xpcPioReadError, /* 27: PIO read error */ + xpcPhysAddrRegFailed, /* 28: registration of phys addr range failed */ + + xpcBteDirectoryError, /* 29: maps to BTEFAIL_DIR */ + xpcBtePoisonError, /* 30: maps to BTEFAIL_POISON */ + xpcBteWriteError, /* 31: maps to BTEFAIL_WERR */ + xpcBteAccessError, /* 32: maps to BTEFAIL_ACCESS */ + xpcBtePWriteError, /* 33: maps to BTEFAIL_PWERR */ + xpcBtePReadError, /* 34: maps to BTEFAIL_PRERR */ + xpcBteTimeOutError, /* 35: maps to BTEFAIL_TOUT */ + xpcBteXtalkError, /* 36: maps to BTEFAIL_XTERR */ + xpcBteNotAvailable, /* 37: maps to BTEFAIL_NOTAVAIL */ + xpcBteUnmappedError, /* 38: unmapped BTEFAIL_ error */ + + xpcBadVersion, /* 39: bad version number */ + xpcVarsNotSet, /* 40: the XPC variables are not set up */ + xpcNoRsvdPageAddr, /* 41: unable to get rsvd page's phys addr */ + xpcInvalidPartid, /* 42: invalid partition ID */ + xpcLocalPartid, /* 43: local partition ID */ + + xpcUnknownReason /* 44: unknown reason -- must be last in list */ +}; + + +/* + * Define the callout function types used by XPC to update the user on + * connection activity and state changes (via the user function registered by + * xpc_connect()) and to notify them of messages received and delivered (via + * the user function registered by xpc_send_notify()). + * + * The two function types are xpc_channel_func and xpc_notify_func and + * both share the following arguments, with the exception of "data", which + * only xpc_channel_func has. + * + * Arguments: + * + * reason - reason code. (See following table.) + * partid - partition ID associated with condition. + * ch_number - channel # associated with condition. + * data - pointer to optional data. (See following table.) + * key - pointer to optional user-defined value provided as the "key" + * argument to xpc_connect() or xpc_send_notify(). + * + * In the following table the "Optional Data" column applies to callouts made + * to functions registered by xpc_connect(). A "NA" in that column indicates + * that this reason code can be passed to functions registered by + * xpc_send_notify() (i.e. they don't have data arguments). + * + * Also, the first three reason codes in the following table indicate + * success, whereas the others indicate failure. When a failure reason code + * is received, one can assume that the channel is not connected. + * + * + * Reason Code | Cause | Optional Data + * =====================+================================+===================== + * xpcConnected | connection has been established| max #of entries + * | to the specified partition on | allowed in message + * | the specified channel | queue + * ---------------------+--------------------------------+--------------------- + * xpcMsgReceived | an XPC message arrived from | address of payload + * | the specified partition on the | + * | specified channel | [the user must call + * | | xpc_received() when + * | | finished with the + * | | payload] + * ---------------------+--------------------------------+--------------------- + * xpcMsgDelivered | notification that the message | NA + * | was delivered to the intended | + * | recipient and that they have | + * | acknowledged its receipt by | + * | calling xpc_received() | + * =====================+================================+===================== + * xpcUnequalMsgSizes | can't connect to the specified | NULL + * | partition on the specified | + * | channel because of mismatched | + * | message sizes | + * ---------------------+--------------------------------+--------------------- + * xpcNoMemory | insufficient memory avaiable | NULL + * | to allocate message queue | + * ---------------------+--------------------------------+--------------------- + * xpcLackOfResources | lack of resources to create | NULL + * | the necessary kthreads to | + * | support the channel | + * ---------------------+--------------------------------+--------------------- + * xpcUnregistering | this side's user has | NULL or NA + * | unregistered by calling | + * | xpc_disconnect() | + * ---------------------+--------------------------------+--------------------- + * xpcOtherUnregistering| the other side's user has | NULL or NA + * | unregistered by calling | + * | xpc_disconnect() | + * ---------------------+--------------------------------+--------------------- + * xpcNoHeartbeat | the other side's XPC is no | NULL or NA + * | longer heartbeating | + * | | + * ---------------------+--------------------------------+--------------------- + * xpcUnloading | this side's XPC module is | NULL or NA + * | being unloaded | + * | | + * ---------------------+--------------------------------+--------------------- + * xpcOtherUnloading | the other side's XPC module is | NULL or NA + * | is being unloaded | + * | | + * ---------------------+--------------------------------+--------------------- + * xpcPioReadError | xp_nofault_PIOR() returned an | NULL or NA + * | error while sending an IPI | + * | | + * ---------------------+--------------------------------+--------------------- + * xpcInvalidAddress | the address either received or | NULL or NA + * | sent by the specified partition| + * | is invalid | + * ---------------------+--------------------------------+--------------------- + * xpcBteNotAvailable | attempt to pull data from the | NULL or NA + * xpcBtePoisonError | specified partition over the | + * xpcBteWriteError | specified channel via a | + * xpcBteAccessError | bte_copy() failed | + * xpcBteTimeOutError | | + * xpcBteXtalkError | | + * xpcBteDirectoryError | | + * xpcBteGenericError | | + * xpcBteUnmappedError | | + * ---------------------+--------------------------------+--------------------- + * xpcUnknownReason | the specified channel to the | NULL or NA + * | specified partition was | + * | unavailable for unknown reasons| + * =====================+================================+===================== + */ + +typedef void (*xpc_channel_func)(enum xpc_retval reason, partid_t partid, + int ch_number, void *data, void *key); + +typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid, + int ch_number, void *key); + + +/* + * The following is a registration entry. There is a global array of these, + * one per channel. It is used to record the connection registration made + * by the users of XPC. As long as a registration entry exists, for any + * partition that comes up, XPC will attempt to establish a connection on + * that channel. Notification that a connection has been made will occur via + * the xpc_channel_func function. + */ +struct xpc_registration { + + struct semaphore sema; + + /* + * Function to call when aynchronous notification is required for + * such events as, a connection established/lost, or an incomming + * message received, or an error condition encountered. A non-NULL + * func field indicates that there is an active registration for + * the channel. + */ + xpc_channel_func func; + void *key; /* pointer to user's key */ + + u16 nentries; /* #of msg entries in local msg queue */ + u16 msg_size; /* message queue's message size */ + u32 assigned_limit; /* limit on #of assigned kthreads */ + u32 idle_limit; /* limit on #of idle kthreads */ +} ____cacheline_aligned; + + +#define XPC_CHANNEL_REGISTERED(_c) (xpc_registrations[_c].func != NULL) + + +/* the following are valid xpc_allocate() flags */ +#define XPC_WAIT 0 /* wait flag */ +#define XPC_NOWAIT 1 /* no wait flag */ + + +struct xpc_interface { + void (*connect)(int); + void (*disconnect)(int); + enum xpc_retval (*allocate)(partid_t, int, u32, void **); + enum xpc_retval (*send)(partid_t, int, void *); + enum xpc_retval (*send_notify)(partid_t, int, void *, + xpc_notify_func, void *); + void (*received)(partid_t, int, void *); + enum xpc_retval (*partid_to_nasids)(partid_t, void *); +}; + + +extern struct xpc_interface xpc_interface; + +extern void xpc_set_interface(void (*)(int), + void (*)(int), + enum xpc_retval (*)(partid_t, int, u32, void **), + enum xpc_retval (*)(partid_t, int, void *), + enum xpc_retval (*)(partid_t, int, void *, xpc_notify_func, + void *), + void (*)(partid_t, int, void *), + enum xpc_retval (*)(partid_t, void *)); +extern void xpc_clear_interface(void); + + +extern enum xpc_retval xpc_connect(int, xpc_channel_func, void *, u16, + u16, u32, u32); +extern void xpc_disconnect(int); + +static inline enum xpc_retval +xpc_allocate(partid_t partid, int ch_number, u32 flags, void **payload) +{ + return xpc_interface.allocate(partid, ch_number, flags, payload); +} + +static inline enum xpc_retval +xpc_send(partid_t partid, int ch_number, void *payload) +{ + return xpc_interface.send(partid, ch_number, payload); +} + +static inline enum xpc_retval +xpc_send_notify(partid_t partid, int ch_number, void *payload, + xpc_notify_func func, void *key) +{ + return xpc_interface.send_notify(partid, ch_number, payload, func, key); +} + +static inline void +xpc_received(partid_t partid, int ch_number, void *payload) +{ + return xpc_interface.received(partid, ch_number, payload); +} + +static inline enum xpc_retval +xpc_partid_to_nasids(partid_t partid, void *nasids) +{ + return xpc_interface.partid_to_nasids(partid, nasids); +} + + +extern char *xpc_get_ascii_reason_code(enum xpc_retval); + +extern int xp_nofault_PIOR(void *); +extern int xp_error_PIOR(void); + + +#endif /* _ASM_IA64_SN_XP_H */ + Index: linux/arch/ia64/sn/kernel/xp_kdb.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux/arch/ia64/sn/kernel/xp_kdb.c 2004-08-23 10:55:03.000000000 -0500 @@ -0,0 +1,109 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved. + */ + + +/* + * Cross Partition (XP) base kdb support. + * + * This is the part of XP that provides kdb functions for + * debugging purposes. + * + */ + + +#include +#ifdef CONFIG_KDB +#include +#include +#endif +#include + + +#ifdef CONFIG_KDB + +static void +xpc_kdb_print_users(struct xpc_registration *registration, int ch_number) +{ + kdb_printf("xpc_registrations[channel=%d] (0x%p):\n", ch_number, + (void *) registration); + + kdb_printf("\t&sema=0x%p\n", (void *) ®istration->sema); + kdb_printf("\tfunc=0x%p\n", (void *) registration->func); + kdb_printf("\tkey=0x%p\n", registration->key); + kdb_printf("\tnentries=%d\n", registration->nentries); + kdb_printf("\tmsg_size=%d\n", registration->msg_size); + kdb_printf("\tassigned_limit=%d\n", registration->assigned_limit); + kdb_printf("\tidle_limit=%d\n", registration->idle_limit); +} + + +/* + * Display current XPC users who have registered via xpc_connect(). + * + * xpcusers [ ] + */ +static int +xpc_kdb_users(int argc, const char **argv, const char **envp, + struct pt_regs *regs) +{ + extern struct xpc_registration xpc_registrations[]; + int ret; + struct xpc_registration *registration; + int ch_number; + + + if (argc > 1) { + return KDB_ARGCOUNT; + + } else if (argc == 1) { + ret = kdbgetularg(argv[1], (unsigned long *) &ch_number); + if (ret) { + return ret; + } + if (ch_number < 0 || ch_number >= XPC_NCHANNELS) { + kdb_printf("invalid channel #\n"); + return KDB_BADINT; + } + registration = &xpc_registrations[ch_number]; + xpc_kdb_print_users(registration, ch_number); + + } else { + for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) { + registration = &xpc_registrations[ch_number]; + + /* if !XPC_CHANNEL_REGISTERED(ch_number) */ + if (registration->func == NULL) { + continue; + } + xpc_kdb_print_users(registration, ch_number); + } + } + return 0; +} + +#endif /* CONFIG_KDB */ + + +void +xp_kdb_register(void) +{ +#ifdef CONFIG_KDB + (void) kdb_register("xpcusers", xpc_kdb_users, "[ ]", + "Display struct xpc_registration entries", 0); +#endif /* CONFIG_KDB */ +} + + +void +xp_kdb_unregister(void) +{ +#ifdef CONFIG_KDB + (void) kdb_unregister("xpcusers"); +#endif /* CONFIG_KDB */ +} + From dcn@sgi.com Tue Aug 24 11:26:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:26:36 -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 i7OIQSkt015172 for ; Tue, 24 Aug 2004 11:26:30 -0700 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i7OJVLFb015407 for ; Tue, 24 Aug 2004 12:31:21 -0700 Received: from sgi.com (aqua.americas.sgi.com [128.162.233.32]) by flecktone.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i7OIQKOV45794187; Tue, 24 Aug 2004 13:26:20 -0500 (CDT) Received: by sgi.com (Postfix, from userid 144) id A4B231BDE6; Tue, 24 Aug 2004 13:26:19 -0500 (CDT) Date: Tue, 24 Aug 2004 13:26:19 -0500 From: Dean Nelson To: linux-ia64@vger.kernel.org, netdev@oss.sgi.com Subject: [PATCH 3/4] SGI Altix cross partition functionality (1st revision) Message-ID: <20040824182619.GC13961@sgi.com> References: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> User-Agent: Mutt/1.5.6i X-archive-position: 8044 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcn@sgi.com Precedence: bulk X-list: netdev --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This patch contains the communication module (XPC) for cross partition communication on a partitioned SGI Altix. Signed-off-by: Dean Nelson --sm4nu43k4a2Rpi4c Content-Type: application/x-gunzip Content-Disposition: attachment; filename="patch-3.gz" Content-Transfer-Encoding: base64 H4sICBZ5K0EAA3BhdGNoLTMArFt7d9q4tv+bfgqt9q4TaF5A0kymmWYNJSTlnAQYSNrTO6fL y9gieGJsj2WScmfmfva795ZkycYkaecyj4Cl/dOWtN+S+5HPv75lYRAtv+67qTffD9yjw30R 7d/xNOLh/pV7x2dByF+8+/ufF7u7u3KovTgNbh8dr9ZuNg93m8e77QPW/PFt683bw+O9pv6w 3eabZvPF9vb2M1gvQR203h78uAb1889st9XaOWDb8P837OefX7B4+tvuf9W7w8F5/8Lpd44O nYveoDfudxuMPtvv2ML15vfc24urek8u+s5k4Px71G3UoO/XBLt9TXZXNfi8xQfOwg2ivRi/ 3flT+SWKZ+4yzKDv9jMgceht+GOBegbVy2E9x5u7EayK+pW4aRZkQQz9XvSfkgEcZv7/JgD7 Pr/fj5ZhWGv9+ENzt9mCf1mz+Zb+tfZlG///xBYTZ8/e3+YOoLZ2fjz+Efd3e//1i232ml3P A8FQThj8Fcvpb9zLWBazbM5ZxtOFYG7kMy+OfFowweIZtV0MbtgFj3jqhmy0nIaBR3CXgccj wfcYm3BOHQn7ZXc4+twfXLxkQURPcZOYH6QwWpyuJCgwgLMM7jlBzeKULeKUM59nbhCKPXxK Ld04WYEGzTNW9xoM588mAXAQR+widZN54Ikd1o884KIThmyMXQUbc8HTe+4Tzv6LbfxHLUI3 jYVgIy0VMMBisYwCz6VfdRQ4JrJ06WXLlMsVAdkHIoP1KpiBIM2YktSB86/eeNC7RGF1PkAz tAUR39QsESIvXPqc/SR3HKYzC2735qfrTUEEW5Muk6yyVayEl4WVTSB8sEGlJlcs9pPbzJ2G VS0gbl54J5ZJEqfl8VT7jGfePE6qYNPY40LEaTXhV0lj7QSs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BPO PcLX4vyWwNcSqWCB6Ivha7cV8WbLA0XScNRap7gWm1fhGdCC9YZz07OE2GEHQzQtg0SKGaNn 3fIHtjAxW/w/awzTPO7fwxbmTjVbdH91ZEci2J9lYP9OkI4g49Py5iJ+sNtDm38r56pWgXob LVpLsZ4R45kn+M6YXC+CbgfcxDLY7ZDBCGxeSXZisxZtCZ9/Q7ClOVJpsCVVOhXEJWhYGyGX imlFOIZ5UGzXMTib+nNZKr0BCRaTuSS34OqZiXhkVnr01Lr48EyBQgg4JCCW4KPeB6bHUPWI amYLsJrQyf8HCX8z+iuyAgA= --sm4nu43k4a2Rpi4c-- From dcn@sgi.com Tue Aug 24 11:27:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:28:02 -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 i7OIRsAR015499 for ; Tue, 24 Aug 2004 11:27:55 -0700 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by omx1.americas.sgi.com (8.12.10/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i7OIRl0f000978 for ; Tue, 24 Aug 2004 13:27:47 -0500 Received: from sgi.com (aqua.americas.sgi.com [128.162.233.32]) by flecktone.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i7OIRlOV45768804; Tue, 24 Aug 2004 13:27:47 -0500 (CDT) Received: by sgi.com (Postfix, from userid 144) id 3C4A71BDE6; Tue, 24 Aug 2004 13:27:46 -0500 (CDT) Date: Tue, 24 Aug 2004 13:27:46 -0500 From: Dean Nelson To: linux-ia64@vger.kernel.org, netdev@oss.sgi.com Subject: [PATCH 4/4] SGI Altix cross partition functionality (1st revision) Message-ID: <20040824182746.GD13961@sgi.com> References: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> User-Agent: Mutt/1.5.6i X-archive-position: 8045 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcn@sgi.com Precedence: bulk X-list: netdev This patch contains the cross partition pseudo-ethernet driver (XPNET) functional support module. Signed-off-by: Dean Nelson Index: bk-linux-2.6/arch/ia64/Kconfig =================================================================== --- bk-linux-2.6.orig/arch/ia64/Kconfig 2004-08-24 07:36:43.000000000 -0500 +++ bk-linux-2.6/arch/ia64/Kconfig 2004-08-24 07:38:23.000000000 -0500 @@ -199,6 +199,16 @@ this feature will allow limited communication between those System Images without allowing write access. +config IA64_SGI_SN_XPNET + tristate "SGI DMA pseudo-ethernet driver" + depends on IA64_SGI_SN_XPC + help + An SGI machine can be divided into multiple Single System + Images which act independently of each other and have + hardware based memory protection from the others. Enabling + this feature will produce a network adapter that can be + used to communicate directly between SSIs. + config IA64_SGI_SN_SIM bool "SGI Medusa Simulator Support" depends on IA64_SGI_SN2 Index: bk-linux-2.6/arch/ia64/sn/kernel/Makefile =================================================================== --- bk-linux-2.6.orig/arch/ia64/sn/kernel/Makefile 2004-08-24 07:38:21.000000000 -0500 +++ bk-linux-2.6/arch/ia64/sn/kernel/Makefile 2004-08-24 07:38:23.000000000 -0500 @@ -13,3 +13,4 @@ xp-y := xp_main.o xp_kdb.o xp_nofault.o obj-$(CONFIG_IA64_SGI_SN_XPC) += xpc.o xpc-y := xpc_main.o xpc_kdb.o xpc_channel.o xpc_partition.o +obj-$(CONFIG_IA64_SGI_SN_XPNET) += xpnet.o Index: bk-linux-2.6/arch/ia64/sn/kernel/xpnet.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ bk-linux-2.6/arch/ia64/sn/kernel/xpnet.c 2004-08-24 09:18:54.000000000 -0500 @@ -0,0 +1,714 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1999,2001-2004 Silicon Graphics, Inc. All rights reserved. + */ + + +/* + * Cross Partition Network Interface (XPNET) support + * + * XPNET provides a virtual network layered on top of the Cross + * Partition communication layer. + * + * XPNET provides direct point-to-point and broadcast-like support + * for an ethernet-like device. The ethernet broadcast medium is + * replaced with a point-to-point message structure which passes + * pointers to a DMA-capable block that a remote partition should + * retrieve and pass to the upper level networking layer. + * + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * The message payload transferred by XPC. + * + * buf_pa is the physical address where the DMA should pull from. + * + * NOTE: for performance reasons, buf_pa should _ALWAYS_ begin on a + * cacheline boundary. To accomplish this, we record the number of + * bytes from the beginning of the first cacheline to the first useful + * byte of the skb (leadin_ignore) and the number of bytes from the + * last useful byte of the skb to the end of the last cacheline + * (tailout_ignore). + * + * size is the number of bytes to transfer which includes the skb->len + * (useful bytes of the senders skb) plus the leadin and tailout + */ +struct xpnet_message { + u16 version; /* Version for this message */ + u16 embedded_bytes; /* #of bytes embedded in XPC message */ + u32 magic; /* Special number indicating this is xpnet */ + u64 buf_pa; /* phys address of buffer to retrieve */ + u32 size; /* #of bytes in buffer */ + u8 leadin_ignore; /* #of bytes to ignore at the beginning */ + u8 tailout_ignore; /* #of bytes to ignore at the end */ + unsigned char data; /* body of small packets */ +}; + +/* + * Determine the size of our message, the cacheline aligned size, + * and then the number of message will request from XPC. + * + * XPC expects each message to exist in an individual cacheline. + */ +#define XPNET_MSG_SIZE (L1_CACHE_BYTES - XPC_MSG_PAYLOAD_OFFSET) +#define XPNET_MSG_DATA_MAX \ + (XPNET_MSG_SIZE - (u64)(&((struct xpnet_message *)0)->data)) +#define XPNET_MSG_ALIGNED_SIZE (L1_CACHE_ALIGN(XPNET_MSG_SIZE)) +#define XPNET_MSG_NENTRIES (PAGE_SIZE / XPNET_MSG_ALIGNED_SIZE) + + +#define XPNET_MAX_KTHREADS (XPNET_MSG_NENTRIES + 1) +#define XPNET_MAX_IDLE_KTHREADS (XPNET_MSG_NENTRIES + 1) + +/* + * Version number of XPNET implementation. XPNET can always talk to versions + * with same major #, and never talk to versions with a different version. + */ +#define _XPNET_VERSION(_major, _minor) (((_major) << 4) | (_minor)) +#define XPNET_VERSION_MAJOR(_v) ((_v) >> 4) +#define XPNET_VERSION_MINOR(_v) ((_v) & 0xf) + +#define XPNET_VERSION _XPNET_VERSION(1,0) /* version 1.0 */ +#define XPNET_VERSION_EMBED _XPNET_VERSION(1,1) /* version 1.1 */ +#define XPNET_MAGIC 0x88786984 /* "XNET" */ + +#define XPNET_VALID_MSG(_m) \ + ((XPNET_VERSION_MAJOR(_m->version) == XPNET_VERSION_MAJOR(XPNET_VERSION)) \ + && (msg->magic == XPNET_MAGIC)) + +#define XPNET_DEVICE_NAME "xp0" + + +/* + * When messages are queued with xpc_send_notify, a kmalloc'd buffer + * of the following type is passed as a notification cookie. When the + * notification function is called, we use the cookie to decide + * whether all outstanding message sends have completed. The skb can + * then be released. + */ +struct xpnet_pending_msg { + struct list_head free_list; + struct sk_buff *skb; + atomic_t use_count; +}; + +/* driver specific structure pointed to by the device structure */ +struct xpnet_dev_private { + struct net_device_stats stats; +}; + +struct net_device *xpnet_device; + +/* + * When we are notified of other partitions activating, we add them to + * our bitmask of partitions to which we broadcast. + */ +static u64 xpnet_broadcast_partitions; +/* protect above */ +static spinlock_t xpnet_broadcast_lock = SPIN_LOCK_UNLOCKED; + +/* + * Since the Block Transfer Engine (BTE) is being used for the transfer + * and it relies upon cache-line size transfers, we need to reserve at + * least one cache-line for head and tail alignment. The BTE is + * limited to 8MB transfers. + * + * Testing has shown that changing MTU to greater than 64KB has no effect + * on TCP as the two sides negotiate a Max Segment Size that is limited + * to 64K. Other protocols May use packets greater than this, but for + * now, the default is 64KB. + */ +#define XPNET_MAX_MTU (0x800000UL - L1_CACHE_BYTES) +/* 32KB has been determined to be the ideal */ +#define XPNET_DEF_MTU (0x8000UL) + + +/* + * The partition id is encapsulated in the MAC address. The following + * define locates the octet the partid is in. + */ +#define XPNET_PARTID_OCTET 1 +#define XPNET_LICENSE_OCTET 2 + + +/* + * Define the XPNET debug device structure that is to be used with dev_dbg(), + * dev_err(), dev_warn(), and dev_info(). + */ +struct device_driver xpnet_dbg_name = { + .name = "xpnet" +}; + +struct device xpnet_dbg_subname = { + .bus_id = {0}, /* set to "" */ + .driver = &xpnet_dbg_name +}; + +struct device *xpnet = &xpnet_dbg_subname; + +/* + * Packet was recevied by XPC and forwarded to us. + */ +static void +xpnet_receive(partid_t partid, int channel, struct xpnet_message *msg) +{ + struct sk_buff *skb; + bte_result_t bret; + struct xpnet_dev_private *priv = + (struct xpnet_dev_private *) xpnet_device->priv; + + + if (!XPNET_VALID_MSG(msg)) { + /* + * Packet with a different XPC version. Ignore. + */ + xpc_received(partid, channel, (void *) msg); + + priv->stats.rx_errors++; + + return; + } + dev_dbg(xpnet, "received 0x%lx, %d, %d, %d\n", msg->buf_pa, msg->size, + msg->leadin_ignore, msg->tailout_ignore); + + + /* reserve an extra cache line */ + skb = dev_alloc_skb(msg->size + L1_CACHE_BYTES); + if (!skb) { + dev_err(xpnet, "failed on dev_alloc_skb(%d)\n", + msg->size + L1_CACHE_BYTES); + + xpc_received(partid, channel, (void *) msg); + + priv->stats.rx_errors++; + + return; + } + + /* + * The allocated skb has some reserved space. + * In order to use bte_copy, we need to get the + * skb->data pointer moved forward. + */ + skb_reserve(skb, (L1_CACHE_BYTES - ((u64)skb->data & + (L1_CACHE_BYTES - 1)) + + msg->leadin_ignore)); + + /* + * Update the tail pointer to indicate data actually + * transferred. + */ + skb_put(skb, (msg->size - msg->leadin_ignore - msg->tailout_ignore)); + + /* + * Move the data over from the the other side. + */ + if ((XPNET_VERSION_MINOR(msg->version) == 1) && + (msg->embedded_bytes != 0)) { + dev_dbg(xpnet, "copying embedded message. memcpy(0x%p, 0x%p, " + "%lu)\n", skb->data, &msg->data, + (size_t) msg->embedded_bytes); + + memcpy(skb->data, &msg->data, (size_t) msg->embedded_bytes); + } else { + dev_dbg(xpnet, "transferring buffer to the skb->data area;\n\t" + "bte_copy(0x%p, 0x%p, %hu)\n", (void *)msg->buf_pa, + (void *)__pa((u64)skb->data & ~(L1_CACHE_BYTES - 1)), + msg->size); + + bret = bte_copy(msg->buf_pa, + __pa((u64)skb->data & ~(L1_CACHE_BYTES - 1)), + msg->size, (BTE_NOTIFY | BTE_WACQUIRE), NULL); + + if (bret != BTE_SUCCESS) { + // >>> Need better way of cleaning skb. Currently skb + // >>> appears in_use and we can't just call + // >>> dev_kfree_skb. + dev_err(xpnet, "bte_copy(0x%p, 0x%p, 0x%hx) returned " + "error=0x%x\n", (void *)msg->buf_pa, + (void *)__pa((u64)skb->data & + ~(L1_CACHE_BYTES - 1)), + msg->size, bret); + + xpc_received(partid, channel, (void *) msg); + + priv->stats.rx_errors++; + + return; + } + } + + dev_dbg(xpnet, "head=0x%p skb->data=0x%p skb->tail=0x%p " + "skb->end=0x%p skb->len=%d\n", (void *) skb->head, + (void *) skb->data, (void *) skb->tail, (void *) skb->end, + skb->len); + + skb->dev = xpnet_device; + skb->protocol = eth_type_trans(skb, xpnet_device); + skb->ip_summed = CHECKSUM_UNNECESSARY; + + dev_dbg(xpnet, "passing skb to network layer; \n\tskb->head=0x%p " + "skb->data=0x%p skb->tail=0x%p skb->end=0x%p skb->len=%d\n", + (void *) skb->head, (void *) skb->data, (void *) skb->tail, + (void *) skb->end, skb->len); + + + priv->stats.rx_packets++; + priv->stats.rx_bytes += skb->len + ETH_HLEN; + + netif_rx_ni(skb); + xpc_received(partid, channel, (void *) msg); +} + + +/* + * This is the handler which XPC calls during any sort of change in + * state or message reception on a connection. + */ +static void +xpnet_connection_activity(enum xpc_retval reason, partid_t partid, int channel, + void *data, void *key) +{ + long bp; + + + DBUG_ON(partid <= 0 || partid >= MAX_PARTITIONS); + DBUG_ON(channel != XPC_NET_CHANNEL); + + switch(reason) { + case xpcMsgReceived: /* message received */ + DBUG_ON(data == NULL); + + xpnet_receive(partid, channel, (struct xpnet_message *) data); + break; + + case xpcConnected: /* connection completed to a partition */ + spin_lock_bh(&xpnet_broadcast_lock); + xpnet_broadcast_partitions |= 1UL << (partid -1 ); + bp = xpnet_broadcast_partitions; + spin_unlock_bh(&xpnet_broadcast_lock); + + netif_carrier_on(xpnet_device); + + dev_dbg(xpnet, "%s connection created to partition %d; " + "xpnet_broadcast_partitions=0x%lx\n", + xpnet_device->name, partid, bp); + break; + + default: + spin_lock_bh(&xpnet_broadcast_lock); + xpnet_broadcast_partitions &= ~(1UL << (partid -1 )); + bp = xpnet_broadcast_partitions; + spin_unlock_bh(&xpnet_broadcast_lock); + + if (bp == 0) { + netif_carrier_off(xpnet_device); + } + + dev_dbg(xpnet, "%s disconnected from partition %d; " + "xpnet_broadcast_partitions=0x%lx\n", + xpnet_device->name, partid, bp); + break; + + } +} + + +static int +xpnet_dev_open(struct net_device *dev) +{ + enum xpc_retval ret; + + + dev_dbg(xpnet, "calling xpc_connect(%d, 0x%p, NULL, %ld, %ld, %d, " + "%d)\n", XPC_NET_CHANNEL, xpnet_connection_activity, + XPNET_MSG_SIZE, XPNET_MSG_NENTRIES, XPNET_MAX_KTHREADS, + XPNET_MAX_IDLE_KTHREADS); + + ret = xpc_connect(XPC_NET_CHANNEL, xpnet_connection_activity, NULL, + XPNET_MSG_SIZE, XPNET_MSG_NENTRIES, + XPNET_MAX_KTHREADS, XPNET_MAX_IDLE_KTHREADS); + if (ret != xpcSuccess) { + dev_err(xpnet, "ifconfig up of %s failed on XPC connect, " + "ret=%d\n", dev->name, ret); + + return -ENOMEM; + } + + dev_dbg(xpnet, "ifconfig up of %s; XPC connected\n", dev->name); + + return 0; +} + + +static int +xpnet_dev_stop(struct net_device *dev) +{ + xpc_disconnect(XPC_NET_CHANNEL); + + dev_dbg(xpnet, "ifconfig down of %s; XPC disconnected\n", dev->name); + + return 0; +} + + +static int +xpnet_dev_change_mtu(struct net_device *dev, int new_mtu) +{ + /* 68 comes from min TCP+IP+MAC header */ + if ((new_mtu < 68) || (new_mtu > XPNET_MAX_MTU)) { + dev_err(xpnet, "ifconfig %s mtu %d failed; value must be " + "between 68 and %ld\n", dev->name, new_mtu, + XPNET_MAX_MTU); + return -EINVAL; + } + + dev->mtu = new_mtu; + dev_dbg(xpnet, "ifconfig %s mtu set to %d\n", dev->name, new_mtu); + return 0; +} + + +/* + * Required for the net_device structure. + */ +static int +xpnet_dev_set_config(struct net_device *dev, struct ifmap *new_map) +{ + return 0; +} + + +/* + * Return statistics to the caller. + */ +static struct net_device_stats * +xpnet_dev_get_stats(struct net_device *dev) +{ + struct xpnet_dev_private *priv; + + + priv = (struct xpnet_dev_private *) dev->priv; + + return &priv->stats; +} + + +/* + * Notification that the other end has received the message and + * DMA'd the skb information. At this point, they are done with + * our side. When all recipients are done processing, we + * release the skb and then release our pending message structure. + */ +static void +xpnet_send_completed(enum xpc_retval reason, partid_t partid, int channel, + void *__qm) +{ + struct xpnet_pending_msg *queued_msg = + (struct xpnet_pending_msg *) __qm; + + + DBUG_ON(queued_msg == NULL); + + dev_dbg(xpnet, "message to %d notified with reason %d\n", + partid, reason); + + if (atomic_dec_return(&queued_msg->use_count) == 0) { + dev_dbg(xpnet, "all acks for skb->head=-x%p\n", + (void *) queued_msg->skb->head); + + dev_kfree_skb_any(queued_msg->skb); + kfree(queued_msg); + } +} + + +/* + * Network layer has formatted a packet (skb) and is ready to place it + * "on the wire". Prepare and send an xpnet_message to all partitions + * which have connected with us and are targets of this packet. + * + * MAC-NOTE: For the XPNET driver, the MAC address contains the + * destination partition_id. If the destination partition id word + * is 0xff, this packet is to broadcast to all partitions. + */ +static int +xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct xpnet_pending_msg *queued_msg; + enum xpc_retval ret; + struct xpnet_message *msg; + u64 start_addr, end_addr; + long dp; + u8 second_mac_octet; + partid_t dest_partid; + struct xpnet_dev_private *priv; + u16 embedded_bytes; + + + priv = (struct xpnet_dev_private *) dev->priv; + + + dev_dbg(xpnet, ">skb->head=0x%p skb->data=0x%p skb->tail=0x%p " + "skb->end=0x%p skb->len=%d\n", (void *) skb->head, + (void *) skb->data, (void *) skb->tail, (void *) skb->end, + skb->len); + + + /* + * The xpnet_pending_msg tracks how many outstanding + * xpc_send_notifies are relying on this skb. When none + * remain, release the skb. + */ + queued_msg = kmalloc(sizeof(struct xpnet_pending_msg), GFP_ATOMIC); + if (queued_msg == NULL) { + dev_warn(xpnet, "failed to kmalloc %ld bytes; dropping " + "packet\n", sizeof(struct xpnet_pending_msg)); + + priv->stats.tx_errors++; + + return -ENOMEM; + } + + + /* get the beginning of the first cacheline and end of last */ + start_addr = ((u64) skb->data & ~(L1_CACHE_BYTES - 1)); + end_addr = L1_CACHE_ALIGN((u64) skb->tail); + + /* calculate how many bytes to embed in the XPC message */ + embedded_bytes = 0; + if (unlikely(skb->len <= XPNET_MSG_DATA_MAX)) { + /* skb->data does fit so embed */ + embedded_bytes = skb->len; + } + + + /* + * Since the send occurs asynchronously, we set the count to one + * and begin sending. Any sends that happen to complete before + * we are done sending will not free the skb. We will be left + * with that task during exit. This also handles the case of + * a packet destined for a partition which is no longer up. + */ + atomic_set(&queued_msg->use_count, 1); + queued_msg->skb = skb; + + + second_mac_octet = skb->data[XPNET_PARTID_OCTET]; + if (second_mac_octet == 0xff) { + /* we are being asked to broadcast to all partitions */ + dp = xpnet_broadcast_partitions; + } else if (second_mac_octet != 0) { + dp = xpnet_broadcast_partitions & + (1UL << (second_mac_octet - 1)); + } else { + /* 0 is an invalid partid. Ignore */ + dp = 0; + } + dev_dbg(xpnet, "destination Partitions mask (dp) = 0x%lx\n", dp); + + /* + * If we wanted to allow promiscous mode to work like an + * unswitched network, this would be a good point to OR in a + * mask of partitions which should be receiving all packets. + */ + + /* + * Main send loop. + */ + for (dest_partid = 1; dp && dest_partid < MAX_PARTITIONS; + dest_partid++) { + + + if (!(dp & (1UL << (dest_partid - 1)))) { + /* not destined for this partition */ + continue; + } + + /* remove this partition from the destinations mask */ + dp &= ~(1UL << (dest_partid - 1)); + + + /* found a partition to send to */ + + ret = xpc_allocate(dest_partid, XPC_NET_CHANNEL, + XPC_NOWAIT, (void **)&msg); + if (unlikely(ret != xpcSuccess)) { + continue; + } + + msg->embedded_bytes = embedded_bytes; + if (unlikely(embedded_bytes != 0)) { + msg->version = XPNET_VERSION_EMBED; + dev_dbg(xpnet, "calling memcpy(0x%p, 0x%p, 0x%lx)\n", + &msg->data, skb->data, (size_t) embedded_bytes); + memcpy(&msg->data, skb->data, (size_t) embedded_bytes); + } else { + msg->version = XPNET_VERSION; + } + msg->magic = XPNET_MAGIC; + msg->size = end_addr - start_addr; + msg->leadin_ignore = (u64) skb->data - start_addr; + msg->tailout_ignore = end_addr - (u64) skb->tail; + msg->buf_pa = __pa(start_addr); + + dev_dbg(xpnet, "sending XPC message to %d:%d\nmsg->buf_pa=" + "0x%lx, msg->size=%u, msg->leadin_ignore=%u, " + "msg->tailout_ignore=%u\n", dest_partid, + XPC_NET_CHANNEL, msg->buf_pa, msg->size, + msg->leadin_ignore, msg->tailout_ignore); + + + atomic_inc(&queued_msg->use_count); + + ret = xpc_send_notify(dest_partid, XPC_NET_CHANNEL, msg, + xpnet_send_completed, queued_msg); + if (unlikely(ret != xpcSuccess)) { + atomic_dec(&queued_msg->use_count); + continue; + } + + } + + if (atomic_dec_return(&queued_msg->use_count) == 0) { + dev_dbg(xpnet, "no partitions to receive packet destined for " + "%d\n", dest_partid); + + + dev_kfree_skb(skb); + kfree(queued_msg); + } + + priv->stats.tx_packets++; + priv->stats.tx_bytes += skb->len; + + return 0; +} + + +/* + * Deal with transmit timeouts coming from the network layer. + */ +static void +xpnet_dev_tx_timeout (struct net_device *dev) +{ + struct xpnet_dev_private *priv; + + + priv = (struct xpnet_dev_private *) dev->priv; + + priv->stats.tx_errors++; + return; +} + + +static int __init +xpnet_init(void) +{ + int i; + u32 license_num; + int result = -ENOMEM; + + + dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME); + + /* + * use ether_setup() to init the majority of our device + * structure and then override the necessary pieces. + */ + xpnet_device = alloc_netdev(sizeof(struct xpnet_dev_private), + XPNET_DEVICE_NAME, ether_setup); + if (xpnet_device == NULL) { + return -ENOMEM; + } + + netif_carrier_off(xpnet_device); + + xpnet_device->mtu = XPNET_DEF_MTU; + xpnet_device->change_mtu = xpnet_dev_change_mtu; + xpnet_device->open = xpnet_dev_open; + xpnet_device->get_stats = xpnet_dev_get_stats; + xpnet_device->stop = xpnet_dev_stop; + xpnet_device->hard_start_xmit = xpnet_dev_hard_start_xmit; + xpnet_device->tx_timeout = xpnet_dev_tx_timeout; + xpnet_device->set_config = xpnet_dev_set_config; + + /* + * Multicast assumes the LSB of the first octet is set for multicast + * MAC addresses. We chose the first octet of the MAC to be unlikely + * to collide with any vendor's officially issued MAC. + */ + xpnet_device->dev_addr[0] = 0xfe; + xpnet_device->dev_addr[XPNET_PARTID_OCTET] = sn_local_partid(); + license_num = sn_partition_serial_number_val(); + for (i = 3; i >= 0; i--) { + xpnet_device->dev_addr[XPNET_LICENSE_OCTET + i] = + license_num & 0xff; + license_num = license_num >> 8; + } + + /* + * ether_setup() sets this to a multicast device. We are + * really not supporting multicast at this time. + */ + xpnet_device->flags &= ~IFF_MULTICAST; + + /* + * No need to checksum as it is a DMA transfer. The BTE will + * report an error if the data is not retrievable and the + * packet will be dropped. + */ + xpnet_device->features = NETIF_F_NO_CSUM | NETIF_F_HIGHDMA; + + result = register_netdev(xpnet_device); + if (result != 0) { + free_netdev(xpnet_device); + } + + return result; +} +module_init(xpnet_init); + + +static void __exit +xpnet_exit(void) +{ + dev_info(xpnet, "unregistering network device %s\n", + xpnet_device[0].name); + + unregister_netdev(xpnet_device); + + free_netdev(xpnet_device); +} +module_exit(xpnet_exit); + + +MODULE_AUTHOR("Silicon Graphics, Inc."); +MODULE_DESCRIPTION("Cross Partition Network adapter (XPNET)"); +MODULE_LICENSE("GPL"); + From galak@somerset.sps.mot.com Tue Aug 24 11:33:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:33:49 -0700 (PDT) Received: from motgate4.mot.com (motgate4.mot.com [144.189.100.102]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7OIXhXY015915 for ; Tue, 24 Aug 2004 11:33:44 -0700 Received: from az33exr03.mot.com (az33exr03.mot.com [10.64.251.233]) by motgate4.mot.com (Motorola/Motgate4) with ESMTP id i7OIXaNb008181 for ; Tue, 24 Aug 2004 11:33:36 -0700 (MST) Received: from postal.somerset.sps.mot.com (postal.somerset.sps.mot.com [163.12.132.5]) by az33exr03.mot.com (Motorola/az33exr03) with ESMTP id i7OIXHr4031796 for ; Tue, 24 Aug 2004 13:33:21 -0500 Received: from blarg.somerset.sps.mot.com (blarg.somerset.sps.mot.com [163.12.112.65]) by postal.somerset.sps.mot.com (8.11.0/8.11.0) with ESMTP id i7OIXW826073; Tue, 24 Aug 2004 13:33:32 -0500 (CDT) Received: from blarg.somerset.sps.mot.com (localhost.localdomain [127.0.0.1]) by blarg.somerset.sps.mot.com (8.12.8/8.11.0) with ESMTP id i7OIXWOQ022269; Tue, 24 Aug 2004 13:33:32 -0500 Received: from localhost (galak@localhost) by blarg.somerset.sps.mot.com (8.12.8/8.12.8/Submit) with ESMTP id i7OIXVmC022265; Tue, 24 Aug 2004 13:33:31 -0500 Date: Tue, 24 Aug 2004 13:33:31 -0500 (CDT) From: Kumar Gala To: akpm@osdl.org, cc: linux-kernel@vger.kernel.org, Subject: [PATCH][netdrv gianfar] fix printk output Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8046 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: galak@somerset.sps.mot.com Precedence: bulk X-list: netdev Andrew, Fix usage of printk on the output of mac address. Signed-off-by: Kumar Gala -- diff -Nru a/drivers/net/gianfar.c b/drivers/net/gianfar.c --- a/drivers/net/gianfar.c 2004-08-24 13:28:18 -05:00 +++ b/drivers/net/gianfar.c 2004-08-24 13:28:18 -05:00 @@ -307,8 +307,8 @@ /* Print out the device info */ printk(KERN_INFO DEVICE_NAME, dev->name); for (idx = 0; idx < 6; idx++) - printk(KERN_INFO "%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); - printk(KERN_INFO "\n"); + printk("%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); + printk("\n"); /* Even more device info helps when determining which kernel */ /* provided which set of benchmarks. Since this is global for all */ From shemminger@osdl.org Tue Aug 24 11:35:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:36: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 i7OIZvap016252 for ; Tue, 24 Aug 2004 11:35:57 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7OIZb128770; Tue, 24 Aug 2004 11:35:37 -0700 Date: Tue, 24 Aug 2004 11:35:37 -0700 From: Stephen Hemminger To: Jamal Hadi Salim , "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] deliver_skb cleanup Message-Id: <20040824113537.68c570fe@dell_ss3.pdx.osdl.net> In-Reply-To: <20040824110711.3a1782d7@dell_ss3.pdx.osdl.net> References: <20040824110711.3a1782d7@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8047 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 Another cleanup in netif_receive_skb. Move rcu_read_lock up a little, since it needs to be done in both branches anyway. Also whitespace fix. Signed-off-by: Stephen Hemminger diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-08-24 11:34:41 -07:00 +++ b/net/core/dev.c 2004-08-24 11:34:41 -07:00 @@ -1779,15 +1779,16 @@ skb->mac_len = skb->nh.raw - skb->mac.raw; pt_prev = NULL; + + rcu_read_lock(); + #ifdef CONFIG_NET_CLS_ACT if (skb->tc_verd & TC_NCLS) { skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); - rcu_read_lock(); goto ncls; } - #endif +#endif - rcu_read_lock(); list_for_each_entry_rcu(ptype, &ptype_all, list) { if (!ptype->dev || ptype->dev == skb->dev) { if (pt_prev) From davem@redhat.com Tue Aug 24 11:37:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:37: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 i7OIb1b3016574 for ; Tue, 24 Aug 2004 11:37:02 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OIaqS0026207; Tue, 24 Aug 2004 14:36:52 -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 i7OIala14360; Tue, 24 Aug 2004 14:36:47 -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 i7OIahUe009404; Tue, 24 Aug 2004 14:36:44 -0400 Date: Tue, 24 Aug 2004 11:36:35 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, yoshfuji@linux-ipv6.org Subject: Re: IPv6 oops on ifup in latest BK Message-Id: <20040824113635.3b1a17e5.davem@redhat.com> In-Reply-To: <20040824.172207.109934952.yoshfuji@linux-ipv6.org> References: <412ADB20.5000901@pobox.com> <20040823235123.71f18c04.davem@redhat.com> <20040824.172207.109934952.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 i7OIb1b3016574 X-archive-position: 8048 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 Tue, 24 Aug 2004 17:22:07 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > Good catch and spotting. Please try this patch. > Thank you. Applied, thank you. From laforge@netfilter.org Tue Aug 24 11:38:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:39: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 i7OIcvXc016918 for ; Tue, 24 Aug 2004 11:38:57 -0700 Received: from dsl-082-083-225-139.arcor-ip.net ([82.83.225.139] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BzgC0-0002R4-Qo; Tue, 24 Aug 2004 20:38:48 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BzgBu-0001BF-SU; Tue, 24 Aug 2004 20:38:42 +0200 Date: Tue, 24 Aug 2004 20:38:42 +0200 From: Harald Welte To: jamal Cc: sandr8 , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: Billing 1: WAS (Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , Message-ID: <20040824183842.GN26877@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , jamal , sandr8 , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093187835.1042.95.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fwVzdwcpG0LlK9IO" Content-Disposition: inline In-Reply-To: <1093187835.1042.95.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8049 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 --fwVzdwcpG0LlK9IO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 22, 2004 at 11:17:15AM -0400, jamal wrote: > Apologies for latency - was busy at (my real) work. Same for me, sorry. > Let me say this: > I am happy with Haralds billing patch which is already in as is. > In other words, although there is an accounting discrepancy it is not > that big. > What does that mean? unbilling is not something to rush in and patch in > if its going to have an impact on other pieces. It doesnt matter whether > it goes in in 2.6.20 or doesnt even go in as far as i am concerned.=20 Same to me, although I wold have used a less explicit wording ;) > cheers, > jamal --=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 --fwVzdwcpG0LlK9IO 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) iD8DBQFBK4syXaXGVTD0i/8RAoIjAJ9ejc6i+d+pNmmqvOc8/OmTYHrm9ACfX4EP OlSRvn9HS+uADLSNvSics34= =ibQN -----END PGP SIGNATURE----- --fwVzdwcpG0LlK9IO-- From laforge@netfilter.org Tue Aug 24 11:46:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:46: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 i7OIklcY017405 for ; Tue, 24 Aug 2004 11:46:48 -0700 Received: from dsl-082-083-225-139.arcor-ip.net ([82.83.225.139] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BzgJc-0002cC-75; Tue, 24 Aug 2004 20:46:40 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BzgJY-0001Bo-Ho; Tue, 24 Aug 2004 20:46:36 +0200 Date: Tue, 24 Aug 2004 20:46:36 +0200 From: Harald Welte To: jamal Cc: sandr8 , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , Message-ID: <20040824184636.GO26877@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , jamal , sandr8 , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dsOl/BEZn+65LpCE" Content-Disposition: inline In-Reply-To: <1093191124.1043.206.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8050 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 --dsOl/BEZn+65LpCE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 22, 2004 at 12:12:04PM -0400, jamal wrote: > On Tue, 2004-08-17 at 09:40, sandr8 wrote: > > jamal wrote: >=20 > >=20 > > >Yes, this is a hard question. Did you see the suggestion i proposed > > >to Harald? > > > =20 > > > > > if it is the centralization of the stats with the reason code that, > > for what concerns the ACCT, says wheter to bill or unbill i > > think it is _really_ great :) > > still, for what concerns the multiple interface delivery of the > > same packet i don't see how it would be solved... >=20 > Such packets are cloned or copied. I am going to assume the contrack > data remains intact in both cases. LaForge? Yes. But still it is a question of viewpoint what kind of behaviour is correct. Let's say a single packet is accounted in ct_acct, and then sent to multiple interfaces, where on more than one of them it gets unbilled. So we add once, but 'unbill' (i prefer the term subtract) more than once. In the end the ct_acct counter will be less than when it first encountered the packet. > In the future we should make accounting a feature that could be turned > on despite contracking and skbs should carry an accounting metadata with > them.=20 I don't really understand what you want to say. You want accounting that is not conntrack-based? well, then you should maybe look at one of the many methods, ranging from iptables rule counters to the ipt_acc= t match/target, nacctd, pcap-mmap, PF_RING, ULOG-based, ... btw, they all account the amount of RX packet on inbound interface and do not 'unbill' ;) --=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 --dsOl/BEZn+65LpCE 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) iD8DBQFBK40MXaXGVTD0i/8RApHRAKCkt2kS0F9JoAHYtzbIqcynD8NJhACeMfyt DHIoInreEpH9ib3We5AXGk0= =u83r -----END PGP SIGNATURE----- --dsOl/BEZn+65LpCE-- From davem@redhat.com Tue Aug 24 11:47:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:47: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 i7OIlYMR017580 for ; Tue, 24 Aug 2004 11:47:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OIlJS0029624; Tue, 24 Aug 2004 14:47:19 -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 i7OIlJa18354; Tue, 24 Aug 2004 14:47:19 -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 i7OIlGtc015059; Tue, 24 Aug 2004 14:47:16 -0400 Date: Tue, 24 Aug 2004 11:47:08 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com, kaber@trash.net Subject: Re: [IPSEC] Set TTL from route Message-Id: <20040824114708.729c5355.davem@redhat.com> In-Reply-To: <20040824105641.GA10202@gondor.apana.org.au> References: <20040824105641.GA10202@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: 8051 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 Tue, 24 Aug 2004 20:56:41 +1000 Herbert Xu wrote: > Here is the promised patch that sets the TTL from the route parameter. > I decided against adding an option to inherit the TTL like IPIP/GRE > as I think that it doesn't really make sense with IPsec. But it > can be easily added later if someone needs it. I think we want to add this at some point. > This isn't completely right when nested tunnels are involved. The > TTL for intervening tunnels should be set from the routes to the > intervening nodes. But fixing that involves using information that > isn't currently in the bundle. I'll revisit this once the MTU stuff > is fixed since that'll also involving adding the intervening routes > to the bundle. Looks great, patch applied. Patrick McHardy was thinking of looking into the MTU issues after he finished up some netfilter IPSEC patches he's been working on. Perhaps you can work together with him :) From davem@redhat.com Tue Aug 24 11:49:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:49: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 i7OInAxa018037 for ; Tue, 24 Aug 2004 11:49:10 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OIn1S0029986; Tue, 24 Aug 2004 14:49:01 -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 i7OImua18812; Tue, 24 Aug 2004 14:48: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 i7OImqgo015687; Tue, 24 Aug 2004 14:48:53 -0400 Date: Tue, 24 Aug 2004 11:48:45 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH] add SCTP to xfrm_flowi_{sport,dport}() Message-Id: <20040824114845.497eadb2.davem@redhat.com> In-Reply-To: <20040824.230409.21312009.yoshfuji@linux-ipv6.org> References: <20040824.230409.21312009.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 i7OInAxa018037 X-archive-position: 8052 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 Tue, 24 Aug 2004 23:04:09 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > (I'm not sure if ipsec is fully supported for sctp, but anyway,) It should work. It should have xfrm checks in sctp input path and everything. Well, at least I cannot think of reason why it should not work :) > I should not have made regression here. Patch applied, thank you. From davem@redhat.com Tue Aug 24 11:56:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:56:20 -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 i7OIuEDK018436 for ; Tue, 24 Aug 2004 11:56:14 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OItrS0031827; Tue, 24 Aug 2004 14:55:53 -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 i7OItra21160; Tue, 24 Aug 2004 14:55:53 -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 i7OItn3p018410; Tue, 24 Aug 2004 14:55:50 -0400 Date: Tue, 24 Aug 2004 11:55:41 -0700 From: "David S. Miller" To: Herbert Xu Cc: jmorris@redhat.com, netdev@oss.sgi.com Subject: Re: RFC: pskb_expand_head instead of skb_copy in skb_checksum_help Message-Id: <20040824115541.52955b2a.davem@redhat.com> In-Reply-To: <20040824110532.GA10241@gondor.apana.org.au> References: <20040824110532.GA10241@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: 8053 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 Tue, 24 Aug 2004 21:05:32 +1000 Herbert Xu wrote: > The idea is simple. None of the callers of skb_checksum are passing it > skb's which are shared. They may be cloned however. But the application > checksum is always in the skb header so there is no need to linearise it. What about looping back of multicast packets via netif_rx(), is that handled correctly too? I only mention it because that is the case that causes problems elsewhere. I'm going to think over this later today some more. From laforge@netfilter.org Tue Aug 24 11:57:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 11:57:22 -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 i7OIvG5Z018612 for ; Tue, 24 Aug 2004 11:57:16 -0700 Received: from dsl-082-083-225-139.arcor-ip.net ([82.83.225.139] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BzgTk-0002qg-Lv; Tue, 24 Aug 2004 20:57:08 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1BzgTf-0001CU-5e; Tue, 24 Aug 2004 20:57:03 +0200 Date: Tue, 24 Aug 2004 20:57:03 +0200 From: Harald Welte To: jamal Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail Message-ID: <20040824185703.GP26877@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , jamal , sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <411CCB98.4080904@crocetta.org> <1092518370.2876.3.camel@jzny.localdomain> <20040816073530.GI15418@sunbeam2> <1092662998.2874.102.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OxpcHoRZqvs6WvX3" Content-Disposition: inline In-Reply-To: <1092662998.2874.102.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8054 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 --OxpcHoRZqvs6WvX3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 16, 2004 at 09:29:59AM -0400, jamal wrote: > > some later data. It SHOULD not care whether this later data for the > > same flow has bigger or smaller byte/packet counters. [and > > it is very unlikely that the total will be lower, since then in the > > timeframe [snapshot, terminations] more packets have to be dropped than > > accepted. Still, if this is documented with ctnetlink I'm perfectly > > fine which such behaviour. >=20 > I am too. Good stuff. > I think 99.9% of accounting would be happy with getting data after the > call is done; the other 0.01% may have to live with extra packets later > which undo things.=20 > Are you working on something along the IPFIX protocol for transport? Yes, I am working on the next generation of ulogd (ulogd-2). It will allow you to stack multiple plugins on top of each other, such as: ctnetlink -> ipfix or=20 ulog -> packet parser -> flow_aggrgation -> ipfix=20 or even exporting per-packet data in ipfix=20 ulog -> packet parser -> ipfix It's far from complete, but I'm almost finished with the core and can start to write the plugins: http://svn.gnumonks.org/branches/ulog/ulogd2/ > Let me think about it. > Clearly the best place to account for things is on the wire once the > packet has left the box ;->=20 This is arguable. Why not once the packet was receieved on the incoming wire? If you are Ingress router of your network, your ISP bills you for the amout of traffic it sends to your ingress router. OTOTH, for egress traffic I agree. > How open are you to move accounting further down? My thoughts > are along the lines of incrementing the contrack counters at the qdisc > level. Since you transport after the structure has been deleted, it > should work out fine and fair billing will be taken care of. Sure, it can be done... but you need to grab ip_conntrack_lock in order to do so. > Has someone done experimented and figured how expensive it would be to > do it at the qdisc level? Note, you can probably have a low level > grained lock just for stats. It doesn't help. Currently we still have one global rwlock for all conntrack's. There are patches for per-bucket locking. =20 But well, as long as the usage count of ip_conntrack doesn't drop to zero (which we're guaranteed since our skb still references it), and we don't need to walk the hash table, we don't actually need to grab ip_conntrack_lock. A seperate accounting lock would be possible. Somebody needs to implement this and run profiles... > INC_STATS is generic (goes in the generic stats code in attached patch) > and will have an ifdef for contrack billing (which includes unbilling > depending on reason code). Reason code could be results that are now > returned. > As an example NET_XMIT_DROP is definetely unbilling while > NET_XMIT_SUCCESS implies bill.=20 sounds fine to me. But this basically means that we would hide conntrack counters behind generic API - the counters themselves are stored in our own data structure. > cheers, > jamal --=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 --OxpcHoRZqvs6WvX3 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) iD8DBQFBK49/XaXGVTD0i/8RAh/fAJ9JZbKBMZlTS3f8WfMq+/tlPt0EQQCgspwE 6qpNZFQE59h2CBTfKOI2OoY= =pyjO -----END PGP SIGNATURE----- --OxpcHoRZqvs6WvX3-- From SRS0+0dd0482e1a6199b78781+366+infradead.org+hch@phoenix.srs.infradead.org Tue Aug 24 12:13:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 12:13:58 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7OJDqub019602 for ; Tue, 24 Aug 2004 12:13:53 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1Bzgjn-0008Ly-Jq; Tue, 24 Aug 2004 20:13:43 +0100 Date: Tue, 24 Aug 2004 20:13:43 +0100 From: Christoph Hellwig To: Dean Nelson Cc: linux-ia64@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH 1/4] SGI Altix cross partition functionality (1st revision) Message-ID: <20040824201343.A32110@infradead.org> References: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> <20040824182222.GA13961@sgi.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: <20040824182222.GA13961@sgi.com>; from dcn@sgi.com on Tue, Aug 24, 2004 at 01:22:22PM -0500 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 8055 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 > --- bk-linux-2.6.orig/kernel/sched.c 2004-08-23 14:39:35.000000000 -0500 > +++ bk-linux-2.6/kernel/sched.c 2004-08-24 07:29:11.000000000 -0500 > @@ -2814,6 +2814,7 @@ > { > return setscheduler(pid, policy, param); > } > +EXPORT_SYMBOL(sys_sched_setscheduler); As said previously you're not supposed to mess with this one. > long nr_swap_pages; > int numnodes = 1; > +EXPORT_SYMBOL(numnodes); Looing at the two routines that use this I think those two should always go into the core kernel code. That way you also get rid of the pda_percpu export. From SRS0+0dd0482e1a6199b78781+366+infradead.org+hch@phoenix.srs.infradead.org Tue Aug 24 12:17:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 12:17:49 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7OJHgM4020049 for ; Tue, 24 Aug 2004 12:17:43 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1BzgnV-0008MT-QW; Tue, 24 Aug 2004 20:17:33 +0100 Date: Tue, 24 Aug 2004 20:17:33 +0100 From: Christoph Hellwig To: Dean Nelson Cc: linux-ia64@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH 2/4] SGI Altix cross partition functionality (1st revision) Message-ID: <20040824201733.B32110@infradead.org> References: <412B823E.mailxAMX1HROPJ@aqua.americas.sgi.com> <20040824182344.GB13961@sgi.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: <20040824182344.GB13961@sgi.com>; from dcn@sgi.com on Tue, Aug 24, 2004 at 01:23:44PM -0500 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 8056 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 Tue, Aug 24, 2004 at 01:23:44PM -0500, Dean Nelson wrote: > This patch contains the shim module (XP) which interfaces between the > communication module (XPC) and the functional support modules (like XPNET). > > Signed-off-by: Dean Nelson > > > Index: linux/arch/ia64/Kconfig > =================================================================== > --- linux.orig/arch/ia64/Kconfig 2004-08-17 13:31:26.000000000 -0500 > +++ linux/arch/ia64/Kconfig 2004-08-23 11:39:50.000000000 -0500 > @@ -189,6 +189,16 @@ > depends on !IA64_HP_SIM > default y > > +config IA64_SGI_SN_XPC > + tristate "Support DMA Messaging between SGI machines" Why do you have three different option when the only way they're usefull is to have all three enabled at the same time. Also as I mentioned previously please merge at least xp and xpc into a single module. > + depends on FETCHOP Please make sure the fetchop driver is at least posted publically before submitting anything that depends on it. > +xp-y := xp_main.o xp_kdb.o xp_nofault.o Please kill all the kdb hooks for mainline submission. > + case xpcMsgReceived: return "xpcMsgReceived"; > + case xpcMsgDelivered: return "xpcMsgDelivered"; Please don't add strerror-lookalikes to the kernel. > + for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) { > + sema_init(&xpc_registrations[ch_number].sema, 1); /* mutex */ > + } A single mutex wouldn't do it? It doesn't exactly look like it's used in fast-paths > + */ > + if ((ret = sn_register_nofault_code(*(u64 *) pior_func, > + *(u64 *) pior_err_func, > + *(u64 *) pior_err_func, 1, 1)) != 0) { Is the strange casting really unavoidable? From tgraf@suug.ch Tue Aug 24 13:46:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 13:47: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 i7OKkqsa025676 for ; Tue, 24 Aug 2004 13: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 937D168; Tue, 24 Aug 2004 22:46:22 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id E6D3D1C0E7; Tue, 24 Aug 2004 22:47:04 +0200 (CEST) Date: Tue, 24 Aug 2004 22:47:04 +0200 From: Thomas Graf To: "David S. Miller" Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: [RFC/PATCH] Convert architecture dependent rtnetlink attribute to fixed sized ones Message-ID: <20040824204704.GM21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824120442.GA21296@postel.suug.ch> <20040824103205.1ea9c999.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040824103205.1ea9c999.davem@redhat.com> X-archive-position: 8057 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 * David S. Miller <20040824103205.1ea9c999.davem@redhat.com> 2004-08-24 10:32 > Because otherwise things will break and explode for 32-bit > binaries running on 64-bit kernels, which is the situation > for the majority of userland on some platforms. Below is a patch which fixes some of the obvious architecture dependent and easy to fix attributes. But there are dozens more of them such as the int in struct tcf_police. Is it really worth changing all of them and probably a few userspace applications just to make it easier for them because they won't have to check size for some of the attributes anymore? On top of that, most of the ...->rta_len != RTA_LENGTH(struct XXX) checks in RTM_* handlers will fail anyway if there is a int-size mismatch between kernel and userspace. --- 1.17/net/sched/sch_atm.c Sat Feb 21 03:48:58 2004 +++ 1.18/net/sched/sch_atm.c Tue Aug 24 22:19:23 2004 @@ -639,7 +639,7 @@ RTA_PUT(skb,TCA_ATM_HDR,flow->hdr_len,flow->hdr); if (flow->vcc) { struct sockaddr_atmpvc pvc; - int state; + u32 state; pvc.sap_family = AF_ATMPVC; pvc.sap_addr.itf = flow->vcc->dev ? flow->vcc->dev->number : -1; --- 1.4/net/sched/police.c Sun Sep 28 19:00:40 2003 +++ 1.5/net/sched/police.c Tue Aug 24 22:19:23 2004 @@ -237,8 +237,10 @@ else memset(&opt.peakrate, 0, sizeof(opt.peakrate)); RTA_PUT(skb, TCA_POLICE_TBF, sizeof(opt), &opt); - if (p->result) - RTA_PUT(skb, TCA_POLICE_RESULT, sizeof(int), &p->result); + if (p->result) { + u32 result = p->result; + RTA_PUT(skb, TCA_POLICE_RESULT, sizeof(u32), &result); + } #ifdef CONFIG_NET_ESTIMATOR if (p->ewma_rate) RTA_PUT(skb, TCA_POLICE_AVRATE, 4, &p->ewma_rate); --- 1.7/net/sched/cls_tcindex.c Sat Feb 21 03:37:25 2004 +++ 1.8/net/sched/cls_tcindex.c Tue Aug 24 22:19:23 2004 @@ -432,12 +432,15 @@ rta = (struct rtattr *) b; RTA_PUT(skb,TCA_OPTIONS,0,NULL); if (!fh) { + u32 hash = p->hash; + u32 shift = p->shift; + u32 fall_through = p->fall_through; t->tcm_handle = ~0; /* whatever ... */ - RTA_PUT(skb,TCA_TCINDEX_HASH,sizeof(p->hash),&p->hash); + RTA_PUT(skb,TCA_TCINDEX_HASH,sizeof(u32),&hash); RTA_PUT(skb,TCA_TCINDEX_MASK,sizeof(p->mask),&p->mask); - RTA_PUT(skb,TCA_TCINDEX_SHIFT,sizeof(p->shift),&p->shift); - RTA_PUT(skb,TCA_TCINDEX_FALL_THROUGH,sizeof(p->fall_through), - &p->fall_through); + RTA_PUT(skb,TCA_TCINDEX_SHIFT,sizeof(u32),&shift); + RTA_PUT(skb,TCA_TCINDEX_FALL_THROUGH,sizeof(u32), + &fall_through); } else { if (p->perfect) { t->tcm_handle = r-p->perfect; --- 1.7/net/sched/cls_route.c Sat Feb 21 03:37:25 2004 +++ 1.8/net/sched/cls_route.c Tue Aug 24 22:19:23 2004 @@ -567,8 +567,10 @@ RTA_PUT(skb, TCA_ROUTE4_TO, sizeof(id), &id); } if (f->handle&0x80000000) { - if ((f->handle>>16) != 0xFFFF) - RTA_PUT(skb, TCA_ROUTE4_IIF, sizeof(f->iif), &f->iif); + if ((f->handle>>16) != 0xFFFF) { + u32 iif = f->iif; + RTA_PUT(skb, TCA_ROUTE4_IIF, sizeof(u32), &iif); + } } else { id = f->id>>16; RTA_PUT(skb, TCA_ROUTE4_FROM, sizeof(id), &id); --- 1.67/net/ipv6/route.c Tue Feb 24 00:11:22 2004 +++ 1.68/net/ipv6/route.c Tue Aug 24 22:19:23 2004 @@ -1532,8 +1532,10 @@ goto rtattr_failure; if (rt->u.dst.neighbour) RTA_PUT(skb, RTA_GATEWAY, 16, &rt->u.dst.neighbour->primary_key); - if (rt->u.dst.dev) - RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->rt6i_dev->ifindex); + if (rt->u.dst.dev) { + u32 oif = rt->rt6i_dev->ifindex; + RTA_PUT(skb, RTA_OIF, sizeof(u32), &oif); + } RTA_PUT(skb, RTA_PRIORITY, 4, &rt->rt6i_metric); ci.rta_lastuse = jiffies_to_clock_t(jiffies - rt->u.dst.lastuse); if (rt->rt6i_expires) --- 1.98/net/ipv6/addrconf.c Mon Apr 5 23:41:40 2004 +++ 1.99/net/ipv6/addrconf.c Tue Aug 24 22:19:23 2004 @@ -2819,8 +2819,10 @@ RTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr); RTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu); - if (dev->ifindex != dev->iflink) - RTA_PUT(skb, IFLA_LINK, sizeof(int), &dev->iflink); + if (dev->ifindex != dev->iflink) { + u32 link = dev->iflink; + RTA_PUT(skb, IFLA_LINK, sizeof(u32), &link); + } subattr = (struct rtattr*)skb->tail; --- 1.80/net/ipv4/route.c Fri Apr 30 01:26:35 2004 +++ 1.81/net/ipv4/route.c Tue Aug 24 22:19:23 2004 @@ -2291,8 +2291,10 @@ r->rtm_src_len = 32; RTA_PUT(skb, RTA_SRC, 4, &rt->fl.fl4_src); } - if (rt->u.dst.dev) - RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->u.dst.dev->ifindex); + if (rt->u.dst.dev) { + u32 oif = rt->u.dst.dev->ifindex; + RTA_PUT(skb, RTA_OIF, 4, &oif); + } #ifdef CONFIG_NET_CLS_ROUTE if (rt->u.dst.tclassid) RTA_PUT(skb, RTA_FLOW, 4, &rt->u.dst.tclassid); @@ -2345,7 +2347,10 @@ } } else #endif - RTA_PUT(skb, RTA_IIF, sizeof(int), &rt->fl.iif); + if (1) { + u32 iif = rt->fl.iif; + RTA_PUT(skb, RTA_IIF, sizeof(u32), &iif); + } } nlh->nlmsg_len = skb->tail - b; --- 1.6/net/decnet/dn_table.c Tue May 6 09:58:43 2003 +++ 1.7/net/decnet/dn_table.c Tue Aug 24 22:19:23 2004 @@ -296,8 +296,10 @@ if (fi->fib_nhs == 1) { if (fi->fib_nh->nh_gw) RTA_PUT(skb, RTA_GATEWAY, 2, &fi->fib_nh->nh_gw); - if (fi->fib_nh->nh_oif) - RTA_PUT(skb, RTA_OIF, sizeof(int), &fi->fib_nh->nh_oif); + if (fi->fib_nh->nh_oif) { + u32 oif = fi->fib_nh->nh_oif; + RTA_PUT(skb, RTA_OIF, sizeof(u32), &oif); + } } if (fi->fib_nhs > 1) { struct rtnexthop *nhp; From jmorris@redhat.com Tue Aug 24 13:53:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 13:53:43 -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 i7OKraZO026151 for ; Tue, 24 Aug 2004 13:53:37 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OKrMS0003722; Tue, 24 Aug 2004 16:53:22 -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 i7OKrHa02333; Tue, 24 Aug 2004 16:53:17 -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 i7OKrHtM003253; Tue, 24 Aug 2004 16:53:17 -0400 Date: Tue, 24 Aug 2004 16:53:16 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: "David S. Miller" cc: Herbert Xu , Subject: Re: RFC: pskb_expand_head instead of skb_copy in skb_checksum_help In-Reply-To: <20040824115541.52955b2a.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8058 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 Tue, 24 Aug 2004, David S. Miller wrote: > On Tue, 24 Aug 2004 21:05:32 +1000 > Herbert Xu wrote: > > > The idea is simple. None of the callers of skb_checksum are passing it > > skb's which are shared. They may be cloned however. But the application > > checksum is always in the skb header so there is no need to linearise it. > > What about looping back of multicast packets via netif_rx(), > is that handled correctly too? They are clones. I can easily regression test it if needed. - James -- James Morris From dlstevens@us.ibm.com Tue Aug 24 14:28:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 14:28:42 -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 i7OLSR0r027183 for ; Tue, 24 Aug 2004 14:28:37 -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 i7OLSAmL736978; Tue, 24 Aug 2004 17:28:10 -0400 Received: from d03nm121.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7OLS9xs167700; Tue, 24 Aug 2004 15:28:09 -0600 In-Reply-To: <412A8FB5.4080700@trash.net> To: Patrick McHardy Cc: "David S. Miller" , laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de MIME-Version: 1.0 Subject: Re: [PATCH] Prevent crash on ip_conntrack removal X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Tue, 24 Aug 2004 15:28:07 -0600 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.51HF338 | June 21, 2004) at 08/24/2004 15:28:09, Serialize complete at 08/24/2004 15:28:09 Content-Type: text/plain; charset="US-ASCII" X-archive-position: 8060 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dlstevens@us.ibm.com Precedence: bulk X-list: netdev Then it appears that simply dropping the packet when the skb->dst == 0 isn't quite right, since per-frag option processing wouldn't be done in the case where conntrack is removed, but the first frag does have skb->dst set (but not some of the others). In that case, it appears that conntrack needs to flush the entire frag queue when it's unloaded. That shouldn't happen much, so maybe that's not such a bad idea. +-DLS From afleming@freescale.com Tue Aug 24 14:28:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 14:28:24 -0700 (PDT) Received: from motgate8.mot.com (motgate8.mot.com [129.188.136.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7OLSI5F027175 for ; Tue, 24 Aug 2004 14:28:18 -0700 Received: from az33exr01.mot.com (az33exr01.mot.com [10.64.251.231]) by motgate8.mot.com (Motorola/Motgate8) with ESMTP id i7OLTCGU025633 for ; Tue, 24 Aug 2004 14:29:12 -0700 (MST) Received: from [10.82.17.240] ([10.82.17.240]) by az33exr01.mot.com (Motorola/az33exr01) with ESMTP id i7OLKHQ1027179 for ; Tue, 24 Aug 2004 16:20:17 -0500 Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: <7A755E44-F614-11D8-942E-000393C30512@freescale.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: netdev@oss.sgi.com From: Andy Fleming Subject: DHCP and keventd Date: Tue, 24 Aug 2004 16:28:02 -0500 X-Mailer: Apple Mail (2.618) X-archive-position: 8059 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: afleming@freescale.com Precedence: bulk X-list: netdev I'm having issues with using DHCP and nfs at boot time on my 85xx system, using the gianfar ethernet driver. Currently, the gianfar driver handles changes in link status through either an interrupt or a timer, depending on the board configuration. My board is using interrupts, but I have tried using the timer, and had the same problem. Anyway, whenever a phy interrupt or timer fires, it calls schedule_work() to do the actual PHY reads and writes in a non-interrupt thread. However, when DHCP is coming up during boot to get the IP for loading NFS, the driver has yet to find out the link state from the PHY, and the work thread it schedules doesn't get activated until after the DHCP request times out. My current theory is that keventd is not active, or that it is locked out during DHCP's send loop. I have confirmed that the interrupt is called, but my worker function is not called until the 30 seconds have expired. Fortunately, after the timeout, the link is seen to be up, and when it tries again, it succeeds, so this isn't a HUGE thing, but it seems wrong to me to have to wait so long for the board to boot. 1) Has anyone else had this problem with another driver? I saw in the source that the eepro100 had a problem which sounded similar. If any one else has seen this, how did you solve it? 2) Is this a kernel bug, or a bug in my driver? The driver is in drivers/net/gianfar.c (at least, the parts that matter are). 3) Any suggestions? Andy Fleming PowerPC Software Enablement Freescale Semiconductor, Inc. From herbert@gondor.apana.org.au Tue Aug 24 14:35:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 14:35: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 i7OLZJje027891 for ; Tue, 24 Aug 2004 14:35:20 -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 1Bziwc-0000JD-00; Wed, 25 Aug 2004 07:35:06 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1BziwY-0003kc-00; Wed, 25 Aug 2004 07:35:02 +1000 Date: Wed, 25 Aug 2004 07:35:02 +1000 To: "David S. Miller" Cc: netdev@oss.sgi.com, kaber@trash.net Subject: Re: [IPSEC] Set TTL from route Message-ID: <20040824213502.GA14404@gondor.apana.org.au> References: <20040824105641.GA10202@gondor.apana.org.au> <20040824114708.729c5355.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040824114708.729c5355.davem@redhat.com> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8061 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 Tue, Aug 24, 2004 at 11:47:08AM -0700, David S. Miller wrote: > > Patrick McHardy was thinking of looking into the MTU issues > after he finished up some netfilter IPSEC patches he's been > working on. Perhaps you can work together with him :) Sure. I'd also like to see the netfilter stuff integrated ASAP. 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 hch@lst.de Tue Aug 24 14:40:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 14:40:53 -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 i7OLemus028310 for ; Tue, 24 Aug 2004 14:40: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 i7OLea95027948 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 24 Aug 2004 23:40:36 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7OLeZI0027946; Tue, 24 Aug 2004 23:40:35 +0200 Date: Tue, 24 Aug 2004 23:40:35 +0200 From: Christoph Hellwig To: Manish_Lachwani@pmc-sierra.com Cc: netdev@oss.sgi.com Subject: [PATCH] small MV643xx fixes Message-ID: <20040824214035.GA27932@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: 8062 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 - kill an unused variable in mv64340_eth_remove - kill pointer arithmetics on integers sillyness - don't include - it's unessecary and mips-specific --- 1.6/drivers/net/mv643xx_eth.c 2004-07-14 20:59:24 +02:00 +++ edited/drivers/net/mv643xx_eth.c 2004-08-24 14:00:58 +02:00 @@ -1403,8 +1403,6 @@ static void mv64340_eth_remove(struct net_device *dev) { - struct mv64340_private *mp = netdev_priv(dev); - unregister_netdev(dev); flush_scheduled_work(); free_netdev(dev); @@ -1739,12 +1737,12 @@ /* Assignment of Tx CTRP of given queue */ tx_curr_desc = mp->tx_curr_desc_q; MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num), - (struct eth_tx_desc *) mp->tx_desc_dma + tx_curr_desc); + mp->tx_desc_dma + tx_curr_desc * sizeof(struct eth_tx_desc)); /* Assignment of Rx CRDP of given queue */ rx_curr_desc = mp->rx_curr_desc_q; MV_WRITE(MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num), - (struct eth_rx_desc *) mp->rx_desc_dma + rx_curr_desc); + mp->rx_desc_dma + rx_curr_desc * sizeof(struct eth_rx_desc)); /* Add the assigned Ethernet address to the port's address table */ eth_port_uc_addr_set(mp->port_num, mp->port_mac_addr); @@ -2355,8 +2353,10 @@ first_chip_ptr = MV_READ(MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(mp->port_num)); /* Apply send command */ - if (first_chip_ptr == 0x00000000) - MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), (struct eth_tx_desc *) mp->tx_desc_dma + tx_first_desc); + if (first_chip_ptr == 0x00000000) { + MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), + mp->tx_desc_dma + tx_first_desc * sizeof(struct eth_tx_desc)); + } ETH_ENABLE_TX_QUEUE(mp->port_num); --- 1.6/include/linux/mv643xx.h 2004-07-27 19:45:06 +02:00 +++ edited/include/linux/mv643xx.h 2004-08-24 13:42:29 +02:00 @@ -13,7 +13,6 @@ #ifndef __ASM_MV64340_H #define __ASM_MV64340_H -#include #include /****************************************/ From davem@redhat.com Tue Aug 24 15:44:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 15:44:46 -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 i7OMidpa030061 for ; Tue, 24 Aug 2004 15:44:40 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OMiLS0005658; Tue, 24 Aug 2004 18:44:21 -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 i7OMiGa08571; Tue, 24 Aug 2004 18:44:16 -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 i7OMiBEx014732; Tue, 24 Aug 2004 18:44:12 -0400 Date: Tue, 24 Aug 2004 15:44:00 -0700 From: "David S. Miller" To: Thomas Graf Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [RFC/PATCH] Convert architecture dependent rtnetlink attribute to fixed sized ones Message-Id: <20040824154400.73d8f176.davem@redhat.com> In-Reply-To: <20040824204704.GM21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824120442.GA21296@postel.suug.ch> <20040824103205.1ea9c999.davem@redhat.com> <20040824204704.GM21296@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: 8063 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 Tue, 24 Aug 2004 22:47:04 +0200 Thomas Graf wrote: > Below is a patch which fixes some of the obvious architecture > dependent and easy to fix attributes. But there are dozens more of > them such as the int in struct tcf_police. 'int' happens to be fine, since it is the same size on 32-bit vs. 64-bit systems. The conversion to explicitly sized types is a nice cleanup, thanks. From davem@redhat.com Tue Aug 24 17:17:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 17:17:46 -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 i7P0HdDf006616 for ; Tue, 24 Aug 2004 17:17:40 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7P0HPS0025399; Tue, 24 Aug 2004 20:17:25 -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 i7P0HP300653; Tue, 24 Aug 2004 20:17:25 -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 i7P0HLHk012267; Tue, 24 Aug 2004 20:17:22 -0400 Date: Tue, 24 Aug 2004 17:17:09 -0700 From: "David S. Miller" To: Herbert Xu Cc: jmorris@redhat.com, netdev@oss.sgi.com Subject: Re: RFC: pskb_expand_head instead of skb_copy in skb_checksum_help Message-Id: <20040824171709.57a613bd.davem@redhat.com> In-Reply-To: <20040824110532.GA10241@gondor.apana.org.au> References: <20040824110532.GA10241@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: 8064 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 Tue, 24 Aug 2004 21:05:32 +1000 Herbert Xu wrote: > Here is the patch that you wanted to shoot holes at :) > > The idea is simple. None of the callers of skb_checksum are passing it > skb's which are shared. They may be cloned however. But the application > checksum is always in the skb header so there is no need to linearise it. > > Supposing all these assumptions are correct, then we can avoid the overhead > of skb_copy() and get away with pskb_expand_head(). I'm going to apply this. If your assertion is wrong, then the skb_shared() BUG() will trigger in pskb_expand_head() and we will know :-) From davem@redhat.com Tue Aug 24 17:24:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 17:24:26 -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 i7P0OKUg007133 for ; Tue, 24 Aug 2004 17:24:21 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7P0O9S0027073; Tue, 24 Aug 2004 20:24:09 -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 i7P0O9302155; Tue, 24 Aug 2004 20:24:09 -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 i7P0O5bT014241; Tue, 24 Aug 2004 20:24:06 -0400 Date: Tue, 24 Aug 2004 17:23:53 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] deliver_skb cleanup Message-Id: <20040824172353.52bb3a29.davem@redhat.com> In-Reply-To: <20040824110711.3a1782d7@dell_ss3.pdx.osdl.net> References: <20040824110711.3a1782d7@dell_ss3.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: 8065 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 Tue, 24 Aug 2004 11:07:11 -0700 Stephen Hemminger wrote: > Cleanup of deliver_skb: get rid of unused argument and use it > in the NET_CLS_ACT hook. Looks good, applied. From davem@redhat.com Tue Aug 24 17:26:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 17:26: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 i7P0Q12R007473 for ; Tue, 24 Aug 2004 17:26:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7P0PqS0027491; Tue, 24 Aug 2004 20:25:52 -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 i7P0Pq302569; Tue, 24 Aug 2004 20:25:52 -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 i7P0Pkjt014870; Tue, 24 Aug 2004 20:25:47 -0400 Date: Tue, 24 Aug 2004 17:25:34 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: hadi@znyx.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] deliver_skb cleanup Message-Id: <20040824172534.6f508ea9.davem@redhat.com> In-Reply-To: <20040824113537.68c570fe@dell_ss3.pdx.osdl.net> References: <20040824110711.3a1782d7@dell_ss3.pdx.osdl.net> <20040824113537.68c570fe@dell_ss3.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: 8066 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 Tue, 24 Aug 2004 11:35:37 -0700 Stephen Hemminger wrote: > Another cleanup in netif_receive_skb. Move rcu_read_lock up a little, > since it needs to be done in both branches anyway. Also whitespace fix. Also applied, thanks Stephen. From davem@redhat.com Tue Aug 24 17:35:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 24 Aug 2004 17:35: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 i7P0ZG0C008268 for ; Tue, 24 Aug 2004 17:35:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7P0YrS0029376; Tue, 24 Aug 2004 20:34:53 -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 i7P0Yr304808; Tue, 24 Aug 2004 20:34:53 -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 i7P0YnGT017238; Tue, 24 Aug 2004 20:34:49 -0400 Date: Tue, 24 Aug 2004 17:34:37 -0700 From: "David S. Miller" To: Thomas Graf Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK Message-Id: <20040824173437.453fd7b0.davem@redhat.com> In-Reply-To: <20040824180825.GJ21296@postel.suug.ch> References: <20040824094952.GF21073@postel.suug.ch> <20040824162501.GI21296@postel.suug.ch> <20040824103252.1b593e68.davem@redhat.com> <20040824180825.GJ21296@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: 8067 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 Tue, 24 Aug 2004 20:08:25 +0200 Thomas Graf wrote: > --- 1.33/include/linux/rtnetlink.h Mon Apr 5 23:41:40 2004 > +++ 1.35/include/linux/rtnetlink.h Tue Aug 24 20:06:53 2004 > @@ -540,6 +540,8 @@ > IFLA_QDISC, > IFLA_STATS, > IFLA_COST, > + IFLA_TXQLEN, > + IFLA_MAP, > #define IFLA_COST IFLA_COST > IFLA_PRIORITY, > #define IFLA_PRIORITY IFLA_PRIORITY You cannot add new IFLA_* numbers to the middle of the enumeration, that changes the subsequent existing IFLA_* values which are hard-coded in userspace applications. I've fixed this and applied your patch, thanks Thomas. Could you please provide a 2.4.x version? From hadi@cyberus.ca Wed Aug 25 04:34:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 04:35:00 -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 i7PBYrMp010360 for ; Wed, 25 Aug 2004 04:34:53 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1Bzw39-0008A9-8q for netdev@oss.sgi.com; Wed, 25 Aug 2004 07:34: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 1Bzw31-0008Rm-IJ; Wed, 25 Aug 2004 07:34:35 -0400 Subject: Re: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: sandr8 Cc: Harald Welte , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <4129E2A2.2050500@crocetta.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <4129BB3A.9000007@crocetta.org> <1093262296.1040.778.camel@jzny.localdomain> <4129E2A2.2050500@crocetta.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093433673.1040.147.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Aug 2004 07:34:33 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8068 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 Mon, 2004-08-23 at 08:27, sandr8 wrote: > jamal wrote: > > >Let me layout a few things: > > > > ..-->classification --> tcaction > >return code1 --> enqueue > >return code2 ...(packet may be freed here)--> dev.c > > > >The rules are: [..] > > > i don't know the code that does that, since afaik it > was not yet there in 2.6.8... if it is, please tell me > because i'm eager to have a full viewpoint of the > forthcoming packet action framework :) Look at the policer as an example - already in the kernel. It may decide to shoot a packet. The framework is already in since pre-2.6.8. My goal was to wait and have it stabilize i.e no complaints and then start sending patches for new actions. I can send you a few if you want to scrutinize (although to understand the rules posted you dont need to see the patches) > >Again as above shows, billing would work better at the qdisc level. > > > > > yes, sure... > but for the moment i personally don't know which path > STOLEN and QUEUED packets will follow... it's not > a reproach :) it's just that i simply can't know for the > moment, but i don't want to make you hurry, i perfectly > understand that you've got plenty of things to do :) > Let me know if you want me to send you an action or two ;-> > > > >Linux is being efficient by sharing skbs. One of the most expensive > >things in a stack is copying packets around (which is avoided). > >If this was a simple system where allocating and freeing can be mapped > >to exactly a flow then what you suggest can be done. In Linux you cant. > > > > > > > in that patch i was not copying them... just passing them by reference > through a > "struct sk_buff ** const skb" parameter. > > what is the difference from before...? > > calling: > before) when calling we passed a pointer on the stack. > now) when calling we pass a pointer on the stack > > returning: > before) when returning we didn't tell the caller which > packet was dropped > now) when returning we tell the sender which packet > is not queued or is thrown away from our queue to > make place for the packet enqueued. The issue i had was two fold: 1) If you plan is to change things in the skb you have to remember that you must copy or clone them (because you dont know who else is holding references to the skb and for what purpose) in which case the skb you manipulate is different from the one you passed. i.e no need to pass the reference to achieve that 2) You are making a lot of changes to pass **skb in order to achieve your goal which doesnt seem strong to begin with. > what happens on the stack now? > > for the calling: more or less the same as before :) > for the returning... > > 1) the external pointer is const, cannot be changed. this > is good to avoid stupid bugs. > 2) being the external pointer const, the internal one always > lays in the stack frame of the outmost caller of an enqueue > operation. hust the external one is passed to callees. when > a requeue operation is called, that pointer nevertheless stays > in the stack frame of the outmost caller of an enqueue > operation. that's to say: it never moves from the stack of the > caller of dev->qdisc->enqueue()... [in that case it was dev.c, > but maybe it would be nicer to have it in a sort of > dev->enqueue() that would have to do with device level > conntracking]. > > additional cost for the function calling? z-e-r-o !!! :) > performance issues? maybe some improvement due > to the elimination of many internal jumps and conditions. > > furthermore, telling the caller the packet that we chose to > drop allows it to reshape it without the need for every > qdisc to recur too any callback function. I didnt quiet parse what you said above - we may be saying the same thing again. Did my last email (where we seem to sync) cover this? cheers, jamal From hadi@cyberus.ca Wed Aug 25 04:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 04:51:14 -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 i7PBp8mP011069 for ; Wed, 25 Aug 2004 04:51:08 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1BzwIs-0006xj-Bk for netdev@oss.sgi.com; Wed, 25 Aug 2004 07:50:58 -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 1BzwIn-0001Pg-P9; Wed, 25 Aug 2004 07:50:54 -0400 Subject: Re: Billing 3: WAS(Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , From: jamal Reply-To: hadi@cyberus.ca To: Harald Welte Cc: sandr8 , devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <20040824184636.GO26877@sunbeam.de.gnumonks.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <20040816072032.GH15418@sunbeam2> <1092661235.2874.71.camel@jzny.localdomain> <4120D068.2040608@crocetta.org> <1092743526.1038.47.camel@jzny.localdomain> <41220AEA.20409@crocetta.org> <1093191124.1043.206.camel@jzny.localdomain> <20040824184636.GO26877@sunbeam.de.gnumonks.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093434651.1039.182.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Aug 2004 07:50:51 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8069 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 Tue, 2004-08-24 at 14:46, Harald Welte wrote: > On Sun, Aug 22, 2004 at 12:12:04PM -0400, jamal wrote: > > Such packets are cloned or copied. I am going to assume the contrack > > data remains intact in both cases. LaForge? > > Yes. But still it is a question of viewpoint what kind of behaviour is > correct. Let's say a single packet is accounted in ct_acct, and then > sent to multiple interfaces, where on more than one of them it gets > unbilled. So we add once, but 'unbill' (i prefer the term subtract) > more than once. In the end the ct_acct counter will be less than when > it first encountered the packet. > These are some of the challenges i posed to Allesandro as well. > > In the future we should make accounting a feature that could be turned > > on despite contracking and skbs should carry an accounting metadata with > > them. > > I don't really understand what you want to say. You want accounting > that is not conntrack-based? well, then you should maybe look at > one of the many methods, ranging from iptables rule counters to the > ipt_acct match/target, nacctd, pcap-mmap, PF_RING, ULOG-based, ... > The discussion with fairness lead to my assertion above. None of the above take care of fairness factor that Alessandro is trying to achieve. So my thinking is if we wanna fix the unbill problem, why not address the whole issue and get accounting to be an embedded piece. > btw, they all account the amount of RX packet on inbound interface and > do not 'unbill' ;) I suspect in such a case you have a passive box which just gets a copy of the packet from the wire ;-> Someone else in the real box where the packet gets forwarded will drop the packet and it will still be paid for ;-> In the case of what you have introduced though, you are billing for localy generated packets as well (if i am not mistaken this is where the issues are). In general i dont think we need to be 100% accurate. PSAMP for example operates by merely sampling i.e not taking a precise measurement. People have written tons of papers to prove it was good enuf. cheers, jamal From hadi@cyberus.ca Wed Aug 25 05:12:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 05:12:29 -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 i7PCCKhC011946 for ; Wed, 25 Aug 2004 05:12:20 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1BzwdO-0006St-PJ for netdev@oss.sgi.com; Wed, 25 Aug 2004 08:12: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 1BzwdL-0003EQ-RT; Wed, 25 Aug 2004 08:12:08 -0400 Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail From: jamal Reply-To: hadi@cyberus.ca To: Harald Welte Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org In-Reply-To: <20040824185703.GP26877@sunbeam.de.gnumonks.org> References: <411C0FCE.9060906@crocetta.org> <1092401484.1043.30.camel@jzny.localdomain> <411CCB98.4080904@crocetta.org> <1092518370.2876.3.camel@jzny.localdomain> <20040816073530.GI15418@sunbeam2> <1092662998.2874.102.camel@jzny.localdomain> <20040824185703.GP26877@sunbeam.de.gnumonks.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093435925.1039.221.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Aug 2004 08:12:05 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8070 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 Tue, 2004-08-24 at 14:57, Harald Welte wrote: > On Mon, Aug 16, 2004 at 09:29:59AM -0400, jamal wrote: > Yes, I am working on the next generation of ulogd (ulogd-2). It will > allow you to stack multiple plugins on top of each other, such as: > > ctnetlink -> ipfix > > or > > ulog -> packet parser -> flow_aggrgation -> ipfix > > or even exporting per-packet data in ipfix > > ulog -> packet parser -> ipfix > > It's far from complete, but I'm almost finished with the core and can > start to write the plugins: > http://svn.gnumonks.org/branches/ulog/ulogd2/ cool. Looks nice. > > Let me think about it. > > Clearly the best place to account for things is on the wire once the > > packet has left the box ;-> > > This is arguable. Why not once the packet was receieved on the incoming > wire? If you are Ingress router of your network, your ISP bills you for > the amout of traffic it sends to your ingress router. > > OTOTH, for egress traffic I agree. I think maybe the issue is to define what the end goal is. For a passive box getting copies of the packets on the wire, ingress would be fine. Unfairness would still be there incase the forwarding box (not the accounting box) actually immediately drops the packet that has already been accounted for. OTOH, in what you have introduced you are also accounting for localy generated packets in a box that is not dedicatedfor just accounting. In such a case, we can (if the cost of making the change is acceptable) make more intelligent decisions. > > How open are you to move accounting further down? My thoughts > > are along the lines of incrementing the contrack counters at the qdisc > > level. Since you transport after the structure has been deleted, it > > should work out fine and fair billing will be taken care of. > > Sure, it can be done... but you need to grab ip_conntrack_lock in order > to do so. Suggestion is you just do the marking, let the qdisc do the accounting on possibly independent accounting table with much more fine grained locks. > > Has someone done experimented and figured how expensive it would be to > > do it at the qdisc level? Note, you can probably have a low level > > grained lock just for stats. > > It doesn't help. Currently we still have one global rwlock for all > conntrack's. There are patches for per-bucket locking. > > But well, as long as the usage count of ip_conntrack doesn't drop to > zero (which we're guaranteed since our skb still references it), and we > don't need to walk the hash table, we don't actually need to grab > ip_conntrack_lock. A seperate accounting lock would be possible. > > Somebody needs to implement this and run profiles... > We should probably avoid this approach totaly if we are going to do all that work. > > INC_STATS is generic (goes in the generic stats code in attached patch) > > and will have an ifdef for contrack billing (which includes unbilling > > depending on reason code). Reason code could be results that are now > > returned. > > As an example NET_XMIT_DROP is definetely unbilling while > > NET_XMIT_SUCCESS implies bill. > > sounds fine to me. But this basically means that we would hide > conntrack counters behind generic API - the counters themselves are > stored in our own data structure. > yes, that would also be a good starting compromise. I am begining to question the wisdom of "fixing" this. The clear solution is to have the contracking code do nothing other than mark the packets. This is the most valuable thing we can get out of contracking. Let the tc bits do the accounting. You can still transport this over ctnetlink. There will somehow need to be signaling as well from contrack to indicate addition or deletion of marks (other alternative is to have admin select marks). Of course all this is a big bait so we can have the energetic Alessandro do all the work ;-> cheers, jamal From hch@lst.de Wed Aug 25 07:48:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 07:48:27 -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 i7PEmJAk000853 for ; Wed, 25 Aug 2004 07:48:20 -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 i7PEm995010504 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 25 Aug 2004 16:48:09 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7PEm8sx010502; Wed, 25 Aug 2004 16:48:08 +0200 Date: Wed, 25 Aug 2004 16:48:08 +0200 From: Christoph Hellwig To: Kristine Diana Daniels , 267342@bugs.debian.org Cc: netdev@oss.sgi.com Subject: Re: Bug#267342: kernel-image-2.6.8-1-686-smp: TCP/IP strangeness in 2.6.8 Message-ID: <20040825144808.GA10396@lst.de> References: <20040822021929.E9D04212D@maus.private.neotoma.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822021929.E9D04212D@maus.private.neotoma.org> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 8071 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 Could it be possible OpenBSD doesn't properly deal with the tcp window scaling changes in 2.6.8? (http://lwn.net/Articles/92727/) On Sat, Aug 21, 2004 at 10:19:29PM -0400, Kristine Diana Daniels wrote: > Package: kernel-image-2.6.8-1-686-smp > Version: 2.6.8-1 > Severity: important > > I have noticed strangeness with the 2.6.8 kernel on both 686-smp > and k7. > 1) rsync from 2.6.8 to a 2.6.7 host hangs. > 2) ssh from 2.6.8 to a 2.6.7 host hangs. > 3) nntp from 2.6.8 hangs for 52 seconds before proceeding. > 4) ssh from Openbsd to 2.6.8 hangs after SSH2_MSG_KEX_DH_GEX_REQUEST > > In 1-2 the network topology is as follows > 2.6.8host <-ethernet-> OpenBSD <-openvpn-> OpenBSD <-ethernet-> 2.6.7host > In 3 the network topology is as follows > 2.6.8host <-ethernet-> OpenBSD <-openvpn-> OpenBSD <-internet-> nntp-server > In 4 the network topology is as follows > 2.6.8host <-ethernet-> OpenBSD > > In all instances OpenBSD is OpenBSD 3.5+Security updates from up to July. > The problem does not exhibit itsself with 2.6.7. > > Attached are tcpdumps taken from openbsd and linux for both 2.6.7 and 2.6.8 > of the conversation for nntp. > tcpdumps for the ssh transactions are available upon request. > Snapshot of /proc/sys/net/ipv4 also available upon request. > > -- System Information: > Debian Release: 3.1 > APT prefers unstable > APT policy: (500, 'unstable'), (500, 'testing') > Architecture: i386 (i686) > Kernel: Linux 2.6.8-1-686-smp > Locale: LANG=en_US, LC_CTYPE=en_US > > Versions of packages kernel-image-2.6.8-1-686-smp depends on: > ii coreutils [fileutils] 5.2.1-2 The GNU core utilities > ii fileutils 5.2.1-2 The GNU file management utilities > ii initrd-tools 0.1.73 tools to create initrd image for p > ii module-init-tools 3.1-pre5-6 tools for managing Linux kernel mo > > -- no debconf information From hch@lst.de Wed Aug 25 07:49:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 07:49:10 -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 i7PEn4ZT000938 for ; Wed, 25 Aug 2004 07:49:05 -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 i7PEmt95010534 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 25 Aug 2004 16:48:55 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7PEmtAa010532; Wed, 25 Aug 2004 16:48:55 +0200 Date: Wed, 25 Aug 2004 16:48:55 +0200 From: Christoph Hellwig To: Kristine Diana Daniels , 267342@bugs.debian.org Cc: netdev@oss.sgi.com Subject: Re: Bug#267342: kernel-image-2.6.8-1-686-smp: /proc/sys/net/ipv4/tcp_default_win_scale offers a fix Message-ID: <20040825144855.GB10396@lst.de> References: <20040822024009.EA88B9E0@maus.private.neotoma.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822024009.EA88B9E0@maus.private.neotoma.org> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 8072 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 On Sat, Aug 21, 2004 at 10:40:09PM -0400, Kristine Diana Daniels wrote: > Package: kernel-image-2.6.8-1-686-smp > Version: 2.6.8-1 > Followup-For: Bug #267342 > > > putting values less than or equal to 6 in > /proc/sys/net/ipv4/tcp_default_win_scale > resolves the nntp issue. > putting values less than or equial to 3 in > /proc/sys/net/ipv4/tcp_default_win_scale > resolves the ssh from openbsd issue. > > This was tested from a 2.6.8-1-k7 system Urgg, I should have read this earlies. Seems like OpenBSD is indeed buggy. From zhikui.chen@rus.uni-stuttgart.de Wed Aug 25 09:48:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 09:48:22 -0700 (PDT) Received: from uni-stuttgart.de (mbox.rus.uni-stuttgart.de [129.69.1.9]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7PGm8qt010768 for ; Wed, 25 Aug 2004 09:48:15 -0700 Received: from [129.69.30.152] (HELO rus.uni-stuttgart.de) by uni-stuttgart.de (CommuniGate Pro SMTP 4.0.3) with ESMTP id 8687568; Wed, 25 Aug 2004 18:48:00 +0200 Message-ID: <412CC269.8080907@rus.uni-stuttgart.de> Date: Wed, 25 Aug 2004 18:46:33 +0200 From: Zhikui Chen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dccp@ietf.org, netdev@oss.sgi.com Subject: HELP for dccp implementation. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8073 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: zhikui.chen@rus.uni-stuttgart.de Precedence: bulk X-list: netdev Hi, dear all I could not assign __sk_head(head) value to sk in lookup_listen. I have writen the partial code for receive the request packet at server accodring to kernel TCP stuff, which is almost closed to TCP stuff. Anyone can tell me the reason or any hints? Thanks in advance. The details is following: The server for receiveing request packet firstly has following steps: 1. Initialize dccp sock, 2. dccp bind 3. get_port 3. hash 4. accpet and waiting packet 5. calling dccp_rcv to get packet ( I have checked dccp_rcv got the request packet). 6. to get sk value by call dccp_lookup 7 .... My problem is still in geting sk value, The follwing is my printing out: Aug 25 09:28:38 localhost kernel: DCCP: Hash tables configured (established 262144 bind 65536) dccp_init_sock: dccp_sock_init_common: allocated cctp successfully allocated pkt vectors successfully dccp_bind. New dccp_get_port start.65536 New dccp_get_port start.else:start db not found. bind hash add:sk:ee9fbc00,node:0,snum:7000 New dccp_get_port start.OK. sk:ee9fbc00,node:0 New dccp_get_port start.65536 New dccp_get_port start.else:start hlist_empty(&db->owners) not empty. New dccp_get_port start.OK. sk:ee9fbc00,node:ee5a0444 __dccp_v4_hash, list:c04eb670,num:7000,c0558780 __dccp_v4_hash, list:c04eb670,sk:ee9fbc00 dccp_accept start.7000,sk->sk_family=2,sk->sk_state=1,sk:ee9fbc00 dccp_accept 1 ..flags=2 dccp_accept 2 .. dccp_accept 3 ..timeo=2147483647,sk:ee9fbc00 wait_for_incoming_connection: dccp wait for connect start!sk:ee9fbc00 dccp wait for connect start!..sk:ee9fbc00 dccp_rcv start.ee9d3580 dccp_rcv: sk->sk_state=0, type=0,dh->dport=22555 dccp_v4_lookup __dccp_v4_lookup. dccp_v4_lookup_connection. hash 13291 dccp_v4_lookup_connection. head:f7619f58,node:eeaf5834,sk:ee9d3580 dccp_v4_lookup_connection. head:f7619f58,node:,sk:0 dccp_bhash_size: 65536,ntohs(dport):7000 first of head is not empty dccp_v4_lookup_listen: head: c04eb670,c0558780,__sk_head(head):ee9fbc00 dccp_v4_lookup_listen:sk: 0 dccp_rcv: unable to find socket() At print out, dccp_bind did not call get_port and inet_sk(sk) is assigned a port number which is 7000 from application. For printing __sk_head(head):ee9fbc00, I let sk = NULL in the dccp_v4_lookup_listen. HASH_TABLE = 32 or 128 I have the same result. And the source code is enclosed. Best regards, Zhikui ------------------------------------------------------------------------ struct dccp_hashinfo __cacheline_aligned dccp_hashinfo = { .__dccp_lhash_lock = RW_LOCK_UNLOCKED, .__dccp_lhash_users = ATOMIC_INIT(0), .__dccp_lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.__dccp_lhash_wait), .__dccp_portalloc_lock = SPIN_LOCK_UNLOCKED }; struct sockaddr_dccp { struct sockaddr_in in; __u32 service; }; static __inline__ int dccp_hashfn(__u32 laddr, __u16 lport, __u32 faddr, __u16 fport) { int h = (laddr ^ lport) ^ (faddr ^ fport); h ^= h >> 16; h ^= h >> 8; return h & (dccp_ehash_size - 1);; } static __inline__ int dccp_sk_hashfn(struct sock *sk) { struct inet_opt *inet = inet_sk(sk); __u32 laddr = inet->rcv_saddr; __u16 lport = inet->num; __u32 faddr = inet->daddr; __u16 fport = inet->dport; return dccp_hashfn(laddr, lport, faddr, fport); } kmem_cache_t *dccp_bucket_cachep; struct dccp_bind_bucket *dccp_bucket_create(struct dccp_bind_hashbucket *head, unsigned short snum) { struct dccp_bind_bucket *db = kmem_cache_alloc(dccp_bucket_cachep, SLAB_ATOMIC); if (db) { db->port = snum; db->fastreuse = 0; INIT_HLIST_HEAD(&db->owners); hlist_add_head(&db->node, &head->chain); } return db; } void dccp_bucket_destroy(struct dccp_bind_bucket *db) { if (hlist_empty(&db->owners)) { __hlist_del(&db->node); kmem_cache_free(dccp_bucket_cachep, db); } } /******************************************************************************/ static int parse_uaddr(struct sockaddr *uaddr, int addr_len, struct sockaddr_in **iaddr, struct sockaddr_dccp **dccp_addr){ if(addr_len < sizeof(struct sockaddr_in)) return -1; if(addr_len >= sizeof(struct sockaddr_dccp)){ *dccp_addr = (struct sockaddr_dccp *)uaddr; *iaddr = &((*dccp_addr)->in); }else{ *dccp_addr = NULL; *iaddr = (struct sockaddr_in *)uaddr; } return 0; } /******************************************************************************/ /* refer to net/ipv4/af_inet.c:inet_bind() */ static int dccp_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len){ printk("dccp_bind.\n"); struct sockaddr_in *iaddr; struct sockaddr_dccp *dccp_addr; struct inet_opt *inet = inet_sk(sk); int addr_type; int err; unsigned short port; if(parse_uaddr(uaddr, addr_len, &iaddr, &dccp_addr)) return -EINVAL; addr_type = inet_addr_type(iaddr->sin_addr.s_addr); if( inet->freebind == 0 && iaddr->sin_addr.s_addr != INADDR_ANY && addr_type != RTN_LOCAL && addr_type != RTN_MULTICAST && addr_type != RTN_BROADCAST) return -EADDRNOTAVAIL; port = ntohs(iaddr->sin_port); if(port && port < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) return -EACCES; lock_sock(sk); if(sk->sk_state != DCCP_STATE_CLOSED) ERR(-EISCONN); if(inet->num) ERR(-EINVAL); inet->rcv_saddr = inet->saddr = iaddr->sin_addr.s_addr; if(addr_type == RTN_MULTICAST || addr_type == RTN_BROADCAST) inet->saddr = 0; if(dccp_addr) dccp_sk(sk)->service = dccp_addr->service; else dccp_sk(sk)->service = 0; /*Note if we comment sk_port->getport() function calling, we should assign a local listen port number for building a listen hash and adding hash to node.*/ /* if(sk->sk_prot->get_port(sk, port) != 0){ inet->saddr = inet->rcv_saddr = 0; ERR(-EADDRINUSE); } */ if(inet->rcv_saddr) sk->sk_userlocks |= SOCK_BINDADDR_LOCK; if(port) sk->sk_userlocks |= SOCK_BINDPORT_LOCK; inet->num = port;/*added 24.08.04, Note if we comment sk_port->getport() function calling, we should assign a local listen port number for building a listen hash and adding hash to node.*/ inet->dport = inet->daddr = 0; sk_dst_reset(sk); err = 0; out: release_sock(sk); return err; } void dccp_bind_hash(struct sock *sk, struct dccp_bind_bucket *db, unsigned short snum) { inet_sk(sk)->num = snum; sk_add_bind_node(sk, &db->owners); dccp_sk(sk)->bind_hash = db; } static inline int dccp_bind_conflict(struct sock *sk, struct dccp_bind_bucket *db) { printk("dccp_bind_conflict is called.\n"); const u32 sk_rcv_saddr = dccp_v4_rcv_saddr(sk); struct sock *sk2; struct hlist_node *node; int reuse = sk->sk_reuse; sk_for_each_bound(sk2, node, &db->owners) { if (sk != sk2 && !dccp_v6_ipv6only(sk2) && (!sk->sk_bound_dev_if || !sk2->sk_bound_dev_if || sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) { if (!reuse || !sk2->sk_reuse || sk2->sk_state == DCCP_STATE_LISTEN) { const u32 sk2_rcv_saddr = dccp_v4_rcv_saddr(sk2); if (!sk2_rcv_saddr || !sk_rcv_saddr || sk2_rcv_saddr == sk_rcv_saddr) break; } } } return node != NULL; } /* Obtain a reference to a local port for the given sock, * if snum is zero it means select any available local port. */ static int dccp_get_port(struct sock *sk, unsigned short snum) { printk("New dccp_get_port start.%d, inet_sk(sk)->num=%d\n",dccp_bhash_size,inet_sk(sk)->num); struct dccp_bind_hashbucket *head; struct hlist_node *node; struct dccp_bind_bucket *db; int ret; if(inet_sk(sk)->num !=snum) snum=inet_sk(sk)->num; local_bh_disable(); if (!snum) { int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; int rover; spin_lock(&dccp_portalloc_lock); rover = dccp_port_rover; do { printk("New dccp_get_port start.rover:%d\n",rover); rover++; if (rover < low || rover > high) rover = low; head = &dccp_bhash[dccp_bhashfn(rover)]; spin_lock(&head->lock); db_for_each(db, node, &head->chain) if (db->port == rover) goto next; break; next: spin_unlock(&head->lock); } while (--remaining > 0); dccp_port_rover = rover; spin_unlock(&dccp_portalloc_lock); /* Exhausted local port range during search? */ ret = 1; if (remaining <= 0) goto fail; /* OK, here is the one we will use. HEAD is * non-NULL and we hold it's mutex. */ printk("New dccp_get_port start.if:OK\n"); snum = rover; } else { printk("New dccp_get_port start.else:start\n"); head = &dccp_bhash[dccp_bhashfn(snum)]; spin_lock(&head->lock); db_for_each(db, node, &head->chain) if (db->port == snum) goto db_found; } db = NULL; goto db_not_found; db_found: if (!hlist_empty(&db->owners)) { printk("hlist_empty(&db->owners) not empty.\n"); if (sk->sk_reuse > 1) goto success; if (db->fastreuse > 0 && sk->sk_reuse && sk->sk_state != DCCP_STATE_LISTEN) { goto success; } else { ret = 1; if (dccp_bind_conflict(sk, db)) goto fail_unlock; } } db_not_found: printk("db not found.\n"); ret = 1; if (!db && (db = dccp_bucket_create(head, snum)) == NULL) goto fail_unlock; if (hlist_empty(&db->owners)) { if (sk->sk_reuse && sk->sk_state != DCCP_STATE_LISTEN) db->fastreuse = 1; else db->fastreuse = 0; } else if (db->fastreuse && (!sk->sk_reuse || sk->sk_state == DCCP_STATE_LISTEN)) db->fastreuse = 0; success: if (!dccp_sk(sk)->bind_hash){ dccp_bind_hash(sk, db, snum); printk("bind hash add:sk:%x,node:%x,snum:%d\n",sk,node,snum); } BUG_TRAP(dccp_sk(sk)->bind_hash == db); ret = 0; fail_unlock: spin_unlock(&head->lock); fail: local_bh_enable(); printk("New dccp_get_port start.OK. sk:%x,node:%x\n",sk,node); return ret; } /*****************************************************************************/ static int wait_for_incoming_connection(struct sock *sk, long timeo) { printk("wait_for_incoming_connection: \n"); DECLARE_WAITQUEUE(wait, current); int err; struct dccp_opt *tp = dccp_sk(sk); /* * True wake-one mechanism for incoming connections: only * one process gets woken up, not the 'whole herd'. * Since we do not 'race & poll' for established sockets * anymore, the common case will execute the loop only once. * * Subtle issue: "add_wait_queue_exclusive()" will be added * after any current non-exclusive waiters, and we know that * it will always _stay_ after any new non-exclusive waiters * because all non-exclusive waiters are added at the * beginning of the wait-queue. As such, it's ok to "drop" * our exclusiveness temporarily when we get woken up without * having to remove and re-insert us on the wait queue. */ add_wait_queue_exclusive(sk->sk_sleep, &wait); printk("dccp wait for connect start!sk:%x\n",sk); for (;;) { current->state = TASK_INTERRUPTIBLE; release_sock(sk); printk("dccp wait for connect start!..sk:%x\n",sk); if (tp->accept_queue == NULL){ timeo = schedule_timeout(timeo); } printk("dccp wait for connect start .1!sk_state=%d, sk_family=%d\n",sk->sk_state,sk->sk_family); lock_sock(sk); err = 0; if (tp->accept_queue){ break; } err = -EINVAL; printk("dccp wait for connect start .1!sk_state=%d, sk_family=%d\n",sk->sk_state,sk->sk_family); if (sk->sk_state != DCCP_STATE_LISTEN){ printk("dccp wait for connect start .01!sk_state=%d\n",sk->sk_state); break; } err = sock_intr_errno(timeo); printk("dccp wait for connect start .2!\n"); if (signal_pending(current)){ break; } err = -EAGAIN; if (!timeo) break; } printk("dccp wait for connect end!\n"); current->state = TASK_RUNNING; remove_wait_queue(sk->sk_sleep, &wait); printk("dccp wait for connect end ok err=%d\n",err); return err; } struct sock *dccp_accept(struct sock *sk, int flags, int *err){ struct dccp_opt *tp = dccp_sk(sk); int error; struct sock *newsk = NULL; lock_sock(sk); printk("dccp_accept start.%d,sk->sk_family=%d,sk->sk_state=%d,sk:%x\n",inet_sk(sk)->num,sk->sk_family,sk->sk_state,sk); /* this socket must be listening */ error = -EINVAL; printk("dccp_accept 1 ..flags=%d\n",flags); if(sk->sk_state != DCCP_STATE_LISTEN) goto out; printk("dccp_accept 2 ..\n"); /* Find already established connection */ if(!tp->accept_queue){ long timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); printk("dccp_accept 3 ..timeo=%d,sk:%x\n",timeo,sk); error = -EAGAIN; if(!timeo) goto out; error = wait_for_incoming_connection(sk, timeo); // error = wait_for_connection(sk, timeo); printk("dccp_accept 4 ..\n"); //sleep(1000); if(error) goto out; BUG_TRAP(tp->accept_queue); } printk("dccp_accept 5 ..\n"); newsk = tp->accept_queue; tp->accept_queue = sk_next(newsk);//newsk->sk_bind_next; if(tp->accept_queue == NULL) tp->accept_queue_tail = NULL; BUG_TRAP(sk->sk_ack_backlog); sk->sk_ack_backlog -- ; /* since we are removing one */ dccp_sk(newsk)->flag_hashandle = 1; #if 0 /* remove from accept queue, will be referenced by socket */ sock_put(newsk); /* removed from the queue */ sock_hold(newsk); #endif error = 0; out: printk("dccp_accept 6 ..err=%d\n",err); release_sock(sk); *err = error; return newsk; } void dccp_listen_wlock(void) { write_lock(&dccp_lhash_lock); if (atomic_read(&dccp_lhash_users)) { DEFINE_WAIT(wait); for (;;) { prepare_to_wait_exclusive(&dccp_lhash_wait, &wait, TASK_UNINTERRUPTIBLE); if (!atomic_read(&dccp_lhash_users)) break; write_unlock_bh(&dccp_lhash_lock); schedule(); write_lock_bh(&dccp_lhash_lock); } finish_wait(&dccp_lhash_wait, &wait); } } static __inline__ void __dccp_v4_hash(struct sock *sk, const int listen_possible) { struct hlist_head *list; rwlock_t *lock; BUG_TRAP(sk_unhashed(sk)); if (listen_possible && sk->sk_state == DCCP_STATE_LISTEN) { list = &dccp_listening_hash[dccp_sk_listen_hashfn(sk)]; printk("__dccp_v4_hash, list:%x,num:%d,%x\n",list,inet_sk(sk)->num,&dccp_hash[inet_sk(sk)->num & (DCCP_HTABLE_SIZE - 1)]); lock = &dccp_lhash_lock; dccp_listen_wlock(); } else { list = &dccp_ehash[(sk->sk_hashent = dccp_sk_hashfn(sk))].chain; lock = &dccp_ehash[sk->sk_hashent].lock; write_lock(lock); } __sk_add_node(sk, list); sock_prot_inc_use(sk->sk_prot); write_unlock(lock); if (listen_possible && sk->sk_state == DCCP_STATE_LISTEN) wake_up(&dccp_lhash_wait); printk("__dccp_v4_hash, list:%x,sk:%x\n",list,sk); } static void dccp_v4_hash(struct sock *sk) { if (sk->sk_state != DCCP_STATE_CLOSED) { local_bh_disable(); __dccp_v4_hash(sk, 1); local_bh_enable(); } } void dccp_unhash(struct sock *sk) { rwlock_t *lock; if (sk_unhashed(sk)) goto ende; if (sk->sk_state == DCCP_STATE_LISTEN) { local_bh_disable(); dccp_listen_wlock(); lock = &dccp_lhash_lock; } else { struct dccp_ehash_bucket *head = &dccp_ehash[sk->sk_hashent]; lock = &head->lock; write_lock_bh(&head->lock); } if (__sk_del_node_init(sk)) sock_prot_dec_use(sk->sk_prot); write_unlock_bh(lock); ende: if (sk->sk_state == DCCP_STATE_LISTEN) wake_up(&dccp_lhash_wait); } /*****************************************************************************/ static struct sock *__dccp_v4_lookup_listen(struct hlist_head *head, u32 daddr, unsigned short hnum, int dif) { struct sock *result = NULL, *sk; struct hlist_node *node; int score, hiscore; printk("__dccp_v4_lookup_listen: sk:%x,node:%x,head:%x,sk_state:%d\n",sk,node,head,sk->sk_state); hiscore=-1; sk_for_each(sk, node, head) { struct inet_opt *inet = inet_sk(sk); if (inet->num == hnum && !ipv6_only_sock(sk)) { __u32 rcv_saddr = inet->rcv_saddr; score = (sk->sk_family == PF_INET ? 1 : 0); if (rcv_saddr) { if (rcv_saddr != daddr) continue; score+=2; } if (sk->sk_bound_dev_if) { if (sk->sk_bound_dev_if != dif) continue; score+=2; } if (score == 5) return sk; if (score > hiscore) { hiscore = score; result = sk; } } } printk("dccp_v4_lookup_listen:sk:%x,result:%x\n",sk,result); return result; } /* Optimize the common listener case. */ inline struct sock *dccp_v4_lookup_listen(u32 daddr, u16 hnum,int dif) { struct sock *sk = NULL; struct hlist_head *head; read_lock(&dccp_lhash_lock); printk("dccp_bhash_size: %d,ntohs(dport):%d\n",dccp_bhash_size,hnum); head = &dccp_listening_hash[dccp_lhashfn(hnum)]; if(head->first) printk("first of head is not empty\n"); printk("dccp_v4_lookup_listen: head: %x,%x,__sk_head(head):%x\n",head,&dccp_hash[hnum & (DCCP_HTABLE_SIZE - 1)],__sk_head(head)); if (!hlist_empty(head)) { struct inet_opt *inet = inet_sk((sk = __sk_head(head))); printk("dccp_v4_lookup_listen:sk: %x\n",sk); if (inet->num == hnum && !sk->sk_node.next && (!inet->rcv_saddr || inet->rcv_saddr == daddr) && (sk->sk_family == PF_INET || !ipv6_only_sock(sk)) && !sk->sk_bound_dev_if) goto sherry_cache; sk = __dccp_v4_lookup_listen(head, daddr, hnum, dif); } else printk("hlist_empty(head) is empty.\n"); if (sk) { sherry_cache: sock_hold(sk); } printk("dccp_v4_lookup_listen:sk: %x\n",sk); read_unlock(&dccp_lhash_lock); return sk; } /*****************************************************************************/ static inline struct sock *dccp_v4_lookup_connection(u32 saddr, u16 sport, u32 daddr, u16 hnum, int dif){ printk("dccp_v4_lookup_connection.\n"); struct dccp_ehash_bucket *head; DCCP_V4_ADDR_COOKIE(acookie, saddr, daddr) __u32 ports = DCCP_COMBINED_PORTS(sport, hnum); struct sock *sk; struct hlist_node *node; int hash = dccp_hashfn(daddr, hnum, saddr, sport); printk("hash %d\n",hash); head = &dccp_ehash[hash]; printk("dccp_v4_lookup_connection. head:%x,node:%x,sk:%x\n",head,node,sk); read_lock(&head->lock); sk_for_each(sk, node, &head->chain) { if (DCCP_IPV4_MATCH(sk, acookie, saddr, daddr, ports, dif)) goto hit; } sk_for_each(sk, node, &(head + dccp_ehash_size)->chain) { if (DCCP_IPV4_DW_MATCH(sk, acookie, saddr, daddr, ports, dif)) goto hit; } sk = NULL; out: read_unlock(&head->lock); printk("dccp_v4_lookup_connection. head:%x,node:,sk:%x\n",head,sk); return sk; hit: sock_hold(sk); goto out; } /*****************************************************************************/ static inline struct sock *__dccp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport,int dif){ printk("__dccp_v4_lookup.\n"); struct sock *sk = dccp_v4_lookup_connection(saddr, sport, daddr, ntohs(dport), dif); return sk ? : dccp_v4_lookup_listen(daddr, ntohs(dport),dif); } inline struct sock *dccp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif) { printk("dccp_v4_lookup\n"); struct sock *sk; local_bh_disable(); sk = __dccp_v4_lookup(saddr, sport, daddr, dport, dif); local_bh_enable(); return sk; } Best regards, Zhikui From hadi@cyberus.ca Wed Aug 25 10:26:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 10:26: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 i7PHQ595012360 for ; Wed, 25 Aug 2004 10:26:06 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C01X2-0007Cw-JZ for netdev@oss.sgi.com; Wed, 25 Aug 2004 13:25:56 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1C01Wy-0001GR-0v; Wed, 25 Aug 2004 13:25:52 -0400 Subject: Re: HELP for dccp implementation. From: jamal Reply-To: hadi@cyberus.ca To: Zhikui Chen Cc: dccp@ietf.org, netdev@oss.sgi.com, acme@conectiva.com.br In-Reply-To: <412CC269.8080907@rus.uni-stuttgart.de> References: <412CC269.8080907@rus.uni-stuttgart.de> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093454747.1034.85.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Aug 2004 13:25:48 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8074 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 Hi there, Could you please work with Arnaldo Carvalho de Melo since he is already working on this - this way we could have a coherent implementation. He is quiet knowledgeable on the internals of Linux and you could bring in the protocol expertise. cheers, jamal On Wed, 2004-08-25 at 12:46, Zhikui Chen wrote: > Hi, dear all > > I could not assign __sk_head(head) value to sk in lookup_listen. > > I have writen the partial code for receive the request packet at server > accodring to kernel TCP stuff, which is almost closed to TCP stuff. > > Anyone can tell me the reason or any hints? Thanks in advance. > > The details is following: > > The server for receiveing request packet firstly has following steps: > 1. Initialize dccp sock, > 2. dccp bind > 3. get_port > 3. hash > 4. accpet and waiting packet > 5. calling dccp_rcv to get packet ( I have checked dccp_rcv got the > request packet). > 6. to get sk value by call dccp_lookup > 7 .... > > My problem is still in geting sk value, The follwing is my printing out: > > Aug 25 09:28:38 localhost kernel: DCCP: Hash tables configured > (established 262144 bind 65536) > > dccp_init_sock: > dccp_sock_init_common: > allocated cctp successfully > allocated pkt vectors successfully > dccp_bind. > New dccp_get_port start.65536 > New dccp_get_port start.else:start > db not found. > bind hash add:sk:ee9fbc00,node:0,snum:7000 > New dccp_get_port start.OK. sk:ee9fbc00,node:0 > New dccp_get_port start.65536 > New dccp_get_port start.else:start > hlist_empty(&db->owners) not empty. > New dccp_get_port start.OK. sk:ee9fbc00,node:ee5a0444 > __dccp_v4_hash, list:c04eb670,num:7000,c0558780 > __dccp_v4_hash, list:c04eb670,sk:ee9fbc00 > dccp_accept start.7000,sk->sk_family=2,sk->sk_state=1,sk:ee9fbc00 > dccp_accept 1 ..flags=2 > dccp_accept 2 .. > dccp_accept 3 ..timeo=2147483647,sk:ee9fbc00 > wait_for_incoming_connection: > dccp wait for connect start!sk:ee9fbc00 > dccp wait for connect start!..sk:ee9fbc00 > dccp_rcv start.ee9d3580 > dccp_rcv: sk->sk_state=0, type=0,dh->dport=22555 > dccp_v4_lookup > __dccp_v4_lookup. > dccp_v4_lookup_connection. > hash 13291 > dccp_v4_lookup_connection. head:f7619f58,node:eeaf5834,sk:ee9d3580 > dccp_v4_lookup_connection. head:f7619f58,node:,sk:0 > dccp_bhash_size: 65536,ntohs(dport):7000 > first of head is not empty > dccp_v4_lookup_listen: head: c04eb670,c0558780,__sk_head(head):ee9fbc00 > dccp_v4_lookup_listen:sk: 0 > dccp_rcv: unable to find socket() > > At print out, dccp_bind did not call get_port and inet_sk(sk) is > assigned a port number which is 7000 from application. > > For printing __sk_head(head):ee9fbc00, I let sk = NULL in the > dccp_v4_lookup_listen. > HASH_TABLE = 32 or 128 I have the same result. > And the source code is enclosed. > > Best regards, > > Zhikui > > ------------------------------------------------------------------------ > > struct dccp_hashinfo __cacheline_aligned dccp_hashinfo = { > .__dccp_lhash_lock = RW_LOCK_UNLOCKED, > .__dccp_lhash_users = ATOMIC_INIT(0), > .__dccp_lhash_wait > = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.__dccp_lhash_wait), > .__dccp_portalloc_lock = SPIN_LOCK_UNLOCKED > }; > > > > > struct sockaddr_dccp { > struct sockaddr_in in; > __u32 service; > }; > > static __inline__ int dccp_hashfn(__u32 laddr, __u16 lport, > __u32 faddr, __u16 fport) > { > int h = (laddr ^ lport) ^ (faddr ^ fport); > h ^= h >> 16; > h ^= h >> 8; > return h & (dccp_ehash_size - 1);; > } > > static __inline__ int dccp_sk_hashfn(struct sock *sk) > { > struct inet_opt *inet = inet_sk(sk); > __u32 laddr = inet->rcv_saddr; > __u16 lport = inet->num; > __u32 faddr = inet->daddr; > __u16 fport = inet->dport; > > return dccp_hashfn(laddr, lport, faddr, fport); > } > > kmem_cache_t *dccp_bucket_cachep; > > struct dccp_bind_bucket *dccp_bucket_create(struct dccp_bind_hashbucket *head, > unsigned short snum) > { > struct dccp_bind_bucket *db = kmem_cache_alloc(dccp_bucket_cachep, > SLAB_ATOMIC); > if (db) { > db->port = snum; > db->fastreuse = 0; > INIT_HLIST_HEAD(&db->owners); > hlist_add_head(&db->node, &head->chain); > } > return db; > } > > void dccp_bucket_destroy(struct dccp_bind_bucket *db) > { > if (hlist_empty(&db->owners)) { > __hlist_del(&db->node); > kmem_cache_free(dccp_bucket_cachep, db); > } > } > > /******************************************************************************/ > > static int parse_uaddr(struct sockaddr *uaddr, int addr_len, struct sockaddr_in **iaddr, struct sockaddr_dccp **dccp_addr){ > if(addr_len < sizeof(struct sockaddr_in)) return -1; > if(addr_len >= sizeof(struct sockaddr_dccp)){ > *dccp_addr = (struct sockaddr_dccp *)uaddr; > *iaddr = &((*dccp_addr)->in); > }else{ > *dccp_addr = NULL; > *iaddr = (struct sockaddr_in *)uaddr; > } > return 0; > } > > /******************************************************************************/ > /* refer to net/ipv4/af_inet.c:inet_bind() */ > static int dccp_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len){ > printk("dccp_bind.\n"); > struct sockaddr_in *iaddr; > struct sockaddr_dccp *dccp_addr; > struct inet_opt *inet = inet_sk(sk); > int addr_type; > int err; > unsigned short port; > > if(parse_uaddr(uaddr, addr_len, &iaddr, &dccp_addr)) return -EINVAL; > > addr_type = inet_addr_type(iaddr->sin_addr.s_addr); > if( inet->freebind == 0 > && iaddr->sin_addr.s_addr != INADDR_ANY && addr_type != RTN_LOCAL > && addr_type != RTN_MULTICAST && addr_type != RTN_BROADCAST) > return -EADDRNOTAVAIL; > > port = ntohs(iaddr->sin_port); > if(port && port < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) > return -EACCES; > > lock_sock(sk); > > if(sk->sk_state != DCCP_STATE_CLOSED) ERR(-EISCONN); > > if(inet->num) ERR(-EINVAL); > > inet->rcv_saddr = inet->saddr = iaddr->sin_addr.s_addr; > if(addr_type == RTN_MULTICAST || addr_type == RTN_BROADCAST) > inet->saddr = 0; > > if(dccp_addr) dccp_sk(sk)->service = dccp_addr->service; > else dccp_sk(sk)->service = 0; > /*Note if we comment sk_port->getport() function calling, we should assign a local listen port number for building a listen hash and adding hash to node.*/ > /* > if(sk->sk_prot->get_port(sk, port) != 0){ > inet->saddr = inet->rcv_saddr = 0; > ERR(-EADDRINUSE); > } > */ > if(inet->rcv_saddr) sk->sk_userlocks |= SOCK_BINDADDR_LOCK; > if(port) sk->sk_userlocks |= SOCK_BINDPORT_LOCK; > inet->num = port;/*added 24.08.04, Note if we comment sk_port->getport() function calling, we should assign a local listen port number for building a listen hash and adding hash to node.*/ > inet->dport = inet->daddr = 0; > sk_dst_reset(sk); > err = 0; > out: > release_sock(sk); > return err; > } > > void dccp_bind_hash(struct sock *sk, struct dccp_bind_bucket *db, > unsigned short snum) > { > inet_sk(sk)->num = snum; > sk_add_bind_node(sk, &db->owners); > dccp_sk(sk)->bind_hash = db; > } > > static inline int dccp_bind_conflict(struct sock *sk, struct dccp_bind_bucket *db) > { > printk("dccp_bind_conflict is called.\n"); > const u32 sk_rcv_saddr = dccp_v4_rcv_saddr(sk); > struct sock *sk2; > struct hlist_node *node; > int reuse = sk->sk_reuse; > > sk_for_each_bound(sk2, node, &db->owners) { > if (sk != sk2 && > !dccp_v6_ipv6only(sk2) && > (!sk->sk_bound_dev_if || > !sk2->sk_bound_dev_if || > sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) { > if (!reuse || !sk2->sk_reuse || > sk2->sk_state == DCCP_STATE_LISTEN) { > const u32 sk2_rcv_saddr = dccp_v4_rcv_saddr(sk2); > if (!sk2_rcv_saddr || !sk_rcv_saddr || > sk2_rcv_saddr == sk_rcv_saddr) > break; > } > } > } > return node != NULL; > } > > /* Obtain a reference to a local port for the given sock, > * if snum is zero it means select any available local port. > */ > static int dccp_get_port(struct sock *sk, unsigned short snum) > { > printk("New dccp_get_port start.%d, inet_sk(sk)->num=%d\n",dccp_bhash_size,inet_sk(sk)->num); > struct dccp_bind_hashbucket *head; > > struct hlist_node *node; > struct dccp_bind_bucket *db; > int ret; > > if(inet_sk(sk)->num !=snum) > snum=inet_sk(sk)->num; > local_bh_disable(); > if (!snum) { > int low = sysctl_local_port_range[0]; > int high = sysctl_local_port_range[1]; > int remaining = (high - low) + 1; > int rover; > > spin_lock(&dccp_portalloc_lock); > rover = dccp_port_rover; > do { > printk("New dccp_get_port start.rover:%d\n",rover); > rover++; > if (rover < low || rover > high) > rover = low; > head = &dccp_bhash[dccp_bhashfn(rover)]; > spin_lock(&head->lock); > db_for_each(db, node, &head->chain) > if (db->port == rover) > goto next; > break; > next: > spin_unlock(&head->lock); > } while (--remaining > 0); > dccp_port_rover = rover; > spin_unlock(&dccp_portalloc_lock); > > /* Exhausted local port range during search? */ > ret = 1; > if (remaining <= 0) > goto fail; > > /* OK, here is the one we will use. HEAD is > * non-NULL and we hold it's mutex. > */ > printk("New dccp_get_port start.if:OK\n"); > snum = rover; > } else { > printk("New dccp_get_port start.else:start\n"); > head = &dccp_bhash[dccp_bhashfn(snum)]; > spin_lock(&head->lock); > db_for_each(db, node, &head->chain) > if (db->port == snum) > goto db_found; > } > db = NULL; > goto db_not_found; > db_found: > if (!hlist_empty(&db->owners)) { > printk("hlist_empty(&db->owners) not empty.\n"); > if (sk->sk_reuse > 1) > goto success; > if (db->fastreuse > 0 && > sk->sk_reuse && sk->sk_state != DCCP_STATE_LISTEN) { > goto success; > } else { > ret = 1; > if (dccp_bind_conflict(sk, db)) > goto fail_unlock; > } > } > db_not_found: > printk("db not found.\n"); > ret = 1; > if (!db && (db = dccp_bucket_create(head, snum)) == NULL) > goto fail_unlock; > if (hlist_empty(&db->owners)) { > if (sk->sk_reuse && sk->sk_state != DCCP_STATE_LISTEN) > db->fastreuse = 1; > else > db->fastreuse = 0; > } else if (db->fastreuse && > (!sk->sk_reuse || sk->sk_state == DCCP_STATE_LISTEN)) > db->fastreuse = 0; > success: > if (!dccp_sk(sk)->bind_hash){ > dccp_bind_hash(sk, db, snum); > printk("bind hash add:sk:%x,node:%x,snum:%d\n",sk,node,snum); > } > BUG_TRAP(dccp_sk(sk)->bind_hash == db); > ret = 0; > > fail_unlock: > spin_unlock(&head->lock); > fail: > local_bh_enable(); > printk("New dccp_get_port start.OK. sk:%x,node:%x\n",sk,node); > return ret; > } > /*****************************************************************************/ > static int wait_for_incoming_connection(struct sock *sk, long timeo) > { > printk("wait_for_incoming_connection: \n"); > DECLARE_WAITQUEUE(wait, current); > int err; > struct dccp_opt *tp = dccp_sk(sk); > > /* > * True wake-one mechanism for incoming connections: only > * one process gets woken up, not the 'whole herd'. > * Since we do not 'race & poll' for established sockets > * anymore, the common case will execute the loop only once. > * > * Subtle issue: "add_wait_queue_exclusive()" will be added > * after any current non-exclusive waiters, and we know that > * it will always _stay_ after any new non-exclusive waiters > * because all non-exclusive waiters are added at the > * beginning of the wait-queue. As such, it's ok to "drop" > * our exclusiveness temporarily when we get woken up without > * having to remove and re-insert us on the wait queue. > */ > add_wait_queue_exclusive(sk->sk_sleep, &wait); > printk("dccp wait for connect start!sk:%x\n",sk); > for (;;) { > current->state = TASK_INTERRUPTIBLE; > release_sock(sk); > printk("dccp wait for connect start!..sk:%x\n",sk); > if (tp->accept_queue == NULL){ > timeo = schedule_timeout(timeo); > } > printk("dccp wait for connect start .1!sk_state=%d, sk_family=%d\n",sk->sk_state,sk->sk_family); > lock_sock(sk); > err = 0; > if (tp->accept_queue){ > break; > } > err = -EINVAL; > printk("dccp wait for connect start .1!sk_state=%d, sk_family=%d\n",sk->sk_state,sk->sk_family); > if (sk->sk_state != DCCP_STATE_LISTEN){ > printk("dccp wait for connect start .01!sk_state=%d\n",sk->sk_state); > break; > } > err = sock_intr_errno(timeo); > printk("dccp wait for connect start .2!\n"); > if (signal_pending(current)){ > break; > } > err = -EAGAIN; > if (!timeo) > break; > } > printk("dccp wait for connect end!\n"); > current->state = TASK_RUNNING; > remove_wait_queue(sk->sk_sleep, &wait); > printk("dccp wait for connect end ok err=%d\n",err); > return err; > } > > struct sock *dccp_accept(struct sock *sk, int flags, int *err){ > struct dccp_opt *tp = dccp_sk(sk); > int error; > struct sock *newsk = NULL; > > lock_sock(sk); > > printk("dccp_accept start.%d,sk->sk_family=%d,sk->sk_state=%d,sk:%x\n",inet_sk(sk)->num,sk->sk_family,sk->sk_state,sk); > /* this socket must be listening */ > error = -EINVAL; > printk("dccp_accept 1 ..flags=%d\n",flags); > if(sk->sk_state != DCCP_STATE_LISTEN) > goto out; > printk("dccp_accept 2 ..\n"); > > /* Find already established connection */ > if(!tp->accept_queue){ > long timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); > printk("dccp_accept 3 ..timeo=%d,sk:%x\n",timeo,sk); > > error = -EAGAIN; > if(!timeo) > goto out; > > error = wait_for_incoming_connection(sk, timeo); > // error = wait_for_connection(sk, timeo); > printk("dccp_accept 4 ..\n"); > //sleep(1000); > if(error) goto out; > BUG_TRAP(tp->accept_queue); > } > printk("dccp_accept 5 ..\n"); > newsk = tp->accept_queue; > tp->accept_queue = sk_next(newsk);//newsk->sk_bind_next; > if(tp->accept_queue == NULL) tp->accept_queue_tail = NULL; > BUG_TRAP(sk->sk_ack_backlog); > sk->sk_ack_backlog -- ; /* since we are removing one */ > dccp_sk(newsk)->flag_hashandle = 1; > #if 0 > /* remove from accept queue, will be referenced by socket */ > sock_put(newsk); /* removed from the queue */ > sock_hold(newsk); > #endif > > error = 0; > out: > printk("dccp_accept 6 ..err=%d\n",err); > release_sock(sk); > *err = error; > return newsk; > } > > void dccp_listen_wlock(void) > { > write_lock(&dccp_lhash_lock); > > if (atomic_read(&dccp_lhash_users)) { > DEFINE_WAIT(wait); > > for (;;) { > prepare_to_wait_exclusive(&dccp_lhash_wait, > &wait, TASK_UNINTERRUPTIBLE); > if (!atomic_read(&dccp_lhash_users)) > break; > write_unlock_bh(&dccp_lhash_lock); > schedule(); > write_lock_bh(&dccp_lhash_lock); > } > > finish_wait(&dccp_lhash_wait, &wait); > } > } > > static __inline__ void __dccp_v4_hash(struct sock *sk, const int listen_possible) > { > struct hlist_head *list; > rwlock_t *lock; > > BUG_TRAP(sk_unhashed(sk)); > if (listen_possible && sk->sk_state == DCCP_STATE_LISTEN) { > list = &dccp_listening_hash[dccp_sk_listen_hashfn(sk)]; > > printk("__dccp_v4_hash, list:%x,num:%d,%x\n",list,inet_sk(sk)->num,&dccp_hash[inet_sk(sk)->num & (DCCP_HTABLE_SIZE - 1)]); > lock = &dccp_lhash_lock; > dccp_listen_wlock(); > } else { > list = &dccp_ehash[(sk->sk_hashent = dccp_sk_hashfn(sk))].chain; > lock = &dccp_ehash[sk->sk_hashent].lock; > write_lock(lock); > } > __sk_add_node(sk, list); > sock_prot_inc_use(sk->sk_prot); > write_unlock(lock); > if (listen_possible && sk->sk_state == DCCP_STATE_LISTEN) > wake_up(&dccp_lhash_wait); > printk("__dccp_v4_hash, list:%x,sk:%x\n",list,sk); > } > > static void dccp_v4_hash(struct sock *sk) > { > if (sk->sk_state != DCCP_STATE_CLOSED) { > local_bh_disable(); > __dccp_v4_hash(sk, 1); > local_bh_enable(); > } > } > > void dccp_unhash(struct sock *sk) > { > rwlock_t *lock; > > if (sk_unhashed(sk)) > goto ende; > > if (sk->sk_state == DCCP_STATE_LISTEN) { > local_bh_disable(); > dccp_listen_wlock(); > lock = &dccp_lhash_lock; > } else { > struct dccp_ehash_bucket *head = &dccp_ehash[sk->sk_hashent]; > lock = &head->lock; > write_lock_bh(&head->lock); > } > > if (__sk_del_node_init(sk)) > sock_prot_dec_use(sk->sk_prot); > write_unlock_bh(lock); > > ende: > if (sk->sk_state == DCCP_STATE_LISTEN) > wake_up(&dccp_lhash_wait); > } > > /*****************************************************************************/ > static struct sock *__dccp_v4_lookup_listen(struct hlist_head *head, u32 daddr, > unsigned short hnum, int dif) > { > struct sock *result = NULL, *sk; > struct hlist_node *node; > int score, hiscore; > > printk("__dccp_v4_lookup_listen: sk:%x,node:%x,head:%x,sk_state:%d\n",sk,node,head,sk->sk_state); > hiscore=-1; > sk_for_each(sk, node, head) { > struct inet_opt *inet = inet_sk(sk); > > if (inet->num == hnum && !ipv6_only_sock(sk)) { > __u32 rcv_saddr = inet->rcv_saddr; > > score = (sk->sk_family == PF_INET ? 1 : 0); > if (rcv_saddr) { > if (rcv_saddr != daddr) > continue; > score+=2; > } > if (sk->sk_bound_dev_if) { > if (sk->sk_bound_dev_if != dif) > continue; > score+=2; > } > if (score == 5) > return sk; > if (score > hiscore) { > hiscore = score; > result = sk; > } > } > } > printk("dccp_v4_lookup_listen:sk:%x,result:%x\n",sk,result); > return result; > } > > /* Optimize the common listener case. */ > inline struct sock *dccp_v4_lookup_listen(u32 daddr, u16 hnum,int dif) > { > struct sock *sk = NULL; > struct hlist_head *head; > > read_lock(&dccp_lhash_lock); > printk("dccp_bhash_size: %d,ntohs(dport):%d\n",dccp_bhash_size,hnum); > head = &dccp_listening_hash[dccp_lhashfn(hnum)]; > > if(head->first) > printk("first of head is not empty\n"); > > printk("dccp_v4_lookup_listen: head: %x,%x,__sk_head(head):%x\n",head,&dccp_hash[hnum & (DCCP_HTABLE_SIZE - 1)],__sk_head(head)); > > if (!hlist_empty(head)) { > struct inet_opt *inet = inet_sk((sk = __sk_head(head))); > printk("dccp_v4_lookup_listen:sk: %x\n",sk); > > if (inet->num == hnum && !sk->sk_node.next && > (!inet->rcv_saddr || inet->rcv_saddr == daddr) && > (sk->sk_family == PF_INET || !ipv6_only_sock(sk)) && > !sk->sk_bound_dev_if) > goto sherry_cache; > sk = __dccp_v4_lookup_listen(head, daddr, hnum, dif); > } > else > printk("hlist_empty(head) is empty.\n"); > if (sk) { > sherry_cache: > sock_hold(sk); > } > printk("dccp_v4_lookup_listen:sk: %x\n",sk); > read_unlock(&dccp_lhash_lock); > return sk; > } > > > /*****************************************************************************/ > > static inline struct sock *dccp_v4_lookup_connection(u32 saddr, u16 sport, u32 daddr, u16 hnum, int dif){ > printk("dccp_v4_lookup_connection.\n"); > struct dccp_ehash_bucket *head; > DCCP_V4_ADDR_COOKIE(acookie, saddr, daddr) > __u32 ports = DCCP_COMBINED_PORTS(sport, hnum); > struct sock *sk; > struct hlist_node *node; > int hash = dccp_hashfn(daddr, hnum, saddr, sport); > printk("hash %d\n",hash); > head = &dccp_ehash[hash]; > printk("dccp_v4_lookup_connection. head:%x,node:%x,sk:%x\n",head,node,sk); > read_lock(&head->lock); > sk_for_each(sk, node, &head->chain) { > if (DCCP_IPV4_MATCH(sk, acookie, saddr, daddr, ports, dif)) > goto hit; > } > > sk_for_each(sk, node, &(head + dccp_ehash_size)->chain) { > if (DCCP_IPV4_DW_MATCH(sk, acookie, saddr, daddr, ports, dif)) > goto hit; > } > sk = NULL; > out: > read_unlock(&head->lock); > printk("dccp_v4_lookup_connection. head:%x,node:,sk:%x\n",head,sk); > return sk; > hit: > sock_hold(sk); > goto out; > } > > /*****************************************************************************/ > > static inline struct sock *__dccp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport,int dif){ > printk("__dccp_v4_lookup.\n"); > > struct sock *sk = dccp_v4_lookup_connection(saddr, sport, daddr, ntohs(dport), dif); > return sk ? : dccp_v4_lookup_listen(daddr, ntohs(dport),dif); > } > > inline struct sock *dccp_v4_lookup(u32 saddr, u16 sport, u32 daddr, > u16 dport, int dif) > { > printk("dccp_v4_lookup\n"); > struct sock *sk; > > local_bh_disable(); > sk = __dccp_v4_lookup(saddr, sport, daddr, dport, dif); > local_bh_enable(); > > return sk; > } > > Best regards, > > Zhikui > > > From shemminger@osdl.org Wed Aug 25 10:53:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 10:54: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 i7PHrwQf014134 for ; Wed, 25 Aug 2004 10:53:59 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PHre117808; Wed, 25 Aug 2004 10:53:40 -0700 Date: Wed, 25 Aug 2004 10:53:39 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (1/4) netem - update API for new features Message-Id: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8075 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 Extend netem options to support new features. Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h 2004-08-24 14:43:33 -07:00 +++ b/include/linux/pkt_sched.h 2004-08-24 14:43:33 -07:00 @@ -401,7 +401,8 @@ #define TCA_ATM_MAX TCA_ATM_STATE -/* Network emulator */ +/* Network section */ + struct tc_netem_qopt { __u32 latency; /* added delay (us) */ @@ -409,6 +410,13 @@ __u32 loss; /* random packet loss (0=none ~0=100%) */ __u32 gap; /* re-ordering gap (0 for delay all) */ __u32 duplicate; /* random packet dup (0=none ~0=100%) */ - __u32 jitter; /* random jitter in latency (us) */ + __u32 jitter; /* delay sigma (us) */ + + __u32 delay_corr; /* delay correllation (0=none ~0=100%) */ + __u32 loss_corr; /* packet loss correllation (0=none ~0=100%) */ + __u32 dup_corr; /* duplicate correlation (0=none ~0=100%) */ + + __s16 delay_dist[0]; /* delay distribution table (optional) */ +#define TCA_NETEM_TABLEFACTOR 8192 }; #endif From shemminger@osdl.org Wed Aug 25 10:57:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 10:57: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 i7PHvj0J014560 for ; Wed, 25 Aug 2004 10:57:45 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PHvQ118512; Wed, 25 Aug 2004 10:57:26 -0700 Date: Wed, 25 Aug 2004 10:57:26 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (2/4) netem - comment update Message-Id: <20040825105726.5742246e@dell_ss3.pdx.osdl.net> In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8076 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 Update comments in netem. Signed-off-by: Stephen Hemminger diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-24 14:43:05 -07:00 +++ b/net/sched/sch_netem.c 2004-08-24 14:43:05 -07:00 @@ -6,6 +6,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Many of the algorithms and ideas for this came from + * NIST Net which is not copyrighted. + * * Authors: Stephen Hemminger * Catalin(ux aka Dino) BOIE */ @@ -22,11 +25,31 @@ #include -/* Network emulator - * - * This scheduler can alters spacing and order - * Similar to NISTnet and BSD Dummynet. - */ +/* Network Emulation Queuing algorithm. + ==================================== + + Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based + Network Emulation Tool + [2] Luigi Rizzo, DummyNet for FreeBSD + + ---------------------------------------------------------------- + + This started out as a simple way to delay outgoing packets to + test TCP but has grown to include most of the functionality + of a full blown network emulator like NISTnet. It can delay + packets and add random jitter (and correlation). The random + distribution can be loaded from a table as well to provide + normal, Pareto, or experimental curves. Packet loss, + duplication, and reordering can also be emulated. + + This qdisc does not do classification that can be handled in + layering other disciplines. It does not need to do bandwidth + control either since that can be handled by using token + bucket or other rate control. + + The simulator is limited by the Linux timer resolution + and will create packet bursts on the HZ boundary (1ms). +*/ struct netem_sched_data { struct Qdisc *qdisc; From shemminger@osdl.org Wed Aug 25 10:59:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 10:59: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 i7PHxOww014865 for ; Wed, 25 Aug 2004 10:59:24 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PHx6118652; Wed, 25 Aug 2004 10:59:06 -0700 Date: Wed, 25 Aug 2004 10:59:06 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (3/4) netem - support packet duplication Message-Id: <20040825105906.2f192f28@dell_ss3.pdx.osdl.net> In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8077 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 Add support for duplicating packets. Signed-off-by: Stephen Hemminger diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-24 16:58:13 -07:00 +++ b/net/sched/sch_netem.c 2004-08-24 16:58:13 -07:00 @@ -62,6 +62,7 @@ u32 counter; u32 gap; u32 jitter; + u32 duplicate; }; /* Time stamp put into socket buffer control block */ @@ -624,22 +625,13 @@ /* Enqueue packets with underlying discipline (fifo) * but mark them with current time first. */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static int netem_add_packet(struct Qdisc *sch, struct sk_buff *skb) { struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; long delay; - pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); - - /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { - sch->stats.drops++; - return 0; /* lie about loss so TCP doesn't know */ - } - - /* If doing simple delay then gap == 0 so all packets * go into the delayed holding queue * otherwise if doing out of order only "1 out of gap" @@ -671,7 +663,7 @@ sch->q.qlen++; sch->stats.bytes += skb->len; sch->stats.packets++; - return 0; + return NET_XMIT_SUCCESS; } sch->stats.drops++; @@ -679,6 +671,31 @@ return NET_XMIT_DROP; } +static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct netem_sched_data *q = qdisc_priv(sch); + + pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); + + /* Random packet drop 0 => none, ~0 => all */ + if (q->loss && q->loss >= net_random()) { + pr_debug("netem_enqueue: random loss\n"); + sch->stats.drops++; + return 0; /* lie about loss so TCP doesn't know */ + } + + /* Random duplication */ + if (q->duplicate && q->duplicate >= net_random()) { + struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); + + pr_debug("netem_enqueue: dup %p\n", skb2); + if (skb2) + netem_add_packet(sch, skb2); + } + + return netem_add_packet(sch, skb); +} + /* Requeue packets but don't change time stamp */ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) { @@ -806,6 +823,7 @@ q->limit = qopt->limit; q->gap = qopt->gap; q->loss = qopt->loss; + q->duplicate = qopt->duplicate; } sch_tree_unlock(sch); @@ -849,6 +867,7 @@ qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; + qopt.duplicate = q->duplicate; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); From shemminger@osdl.org Wed Aug 25 11:01:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 11:01: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 i7PI1Rb5015218 for ; Wed, 25 Aug 2004 11:01:27 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PI18118974; Wed, 25 Aug 2004 11:01:08 -0700 Date: Wed, 25 Aug 2004 11:01:08 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] (4/4) netem - change parameters shouldn't destroy child qdisc Message-Id: <20040825110108.6a79216a@dell_ss3.pdx.osdl.net> In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8078 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 Fix netem to allow changing parameters without zapping the underlying qdisc. Signed-off-by: Stephen Hemminger diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-24 16:58:27 -07:00 +++ b/net/sched/sch_netem.c 2004-08-24 16:58:27 -07:00 @@ -795,37 +795,17 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); - struct tc_netem_qopt *qopt = RTA_DATA(opt); - struct Qdisc *child; - int ret; + const struct tc_netem_qopt *qopt = RTA_DATA(opt); if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL; - child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); - if (!child) - return -EINVAL; - - ret = set_fifo_limit(child, qopt->limit); - if (ret) { - qdisc_destroy(child); - return ret; - } - - sch_tree_lock(sch); - if (child) { - child = xchg(&q->qdisc, child); - if (child != &noop_qdisc) - qdisc_destroy(child); - - q->latency = qopt->latency; - q->jitter = qopt->jitter; - q->limit = qopt->limit; - q->gap = qopt->gap; - q->loss = qopt->loss; - q->duplicate = qopt->duplicate; - } - sch_tree_unlock(sch); + q->latency = qopt->latency; + q->jitter = qopt->jitter; + q->limit = qopt->limit; + q->gap = qopt->gap; + q->loss = qopt->loss; + q->duplicate = qopt->duplicate; return 0; } @@ -833,19 +813,42 @@ static int netem_init(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); + const struct tc_netem_qopt *qopt; + int ret; - if (!opt) + if (!opt || opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL; skb_queue_head_init(&q->delayed); - q->qdisc = &noop_qdisc; - init_timer(&q->timer); q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; - return netem_change(sch, opt); + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (!q->qdisc) { + pr_debug("netem: qdisc create failed\n"); + return -ENOMEM; + } + + qopt = RTA_DATA(opt); + ret = set_fifo_limit(q->qdisc, qopt->limit); + if (ret) { + pr_debug("netem: can't set fifo limit\n"); + goto error; + } + + ret = netem_change(sch, opt); + if (ret) { + pr_debug("netem: change failed\n"); + goto error; + } + + return 0; + + error: + qdisc_destroy(q->qdisc); + return ret; } static void netem_destroy(struct Qdisc *sch) @@ -862,6 +865,7 @@ unsigned char *b = skb->tail; struct tc_netem_qopt qopt; + memset(&qopt, 0, sizeof(qopt)); qopt.latency = q->latency; qopt.jitter = q->jitter; qopt.limit = q->limit; From shemminger@osdl.org Wed Aug 25 11:08:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 11:08:43 -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 i7PI8XGo015653 for ; Wed, 25 Aug 2004 11:08:34 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PI8C120848; Wed, 25 Aug 2004 11:08:12 -0700 Date: Wed, 25 Aug 2004 11:08:12 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] netem - configurable distributions Message-Id: <20040825110812.74b56329@dell_ss3.pdx.osdl.net> In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8079 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 Instead of the hard coded normal distribution, allow the distribution table to be loaded by tc. The new version of tc/netem loads the data from a file. Signed-off-by: Stephen Hemminger diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-25 11:08:08 -07:00 +++ b/net/sched/sch_netem.c 2004-08-25 11:08:08 -07:00 @@ -63,6 +63,12 @@ u32 gap; u32 jitter; u32 duplicate; + + struct dtable { + u32 size; + struct rcu_head rcu; + s16 table[0]; + } *distribution; struct crndstate { unsigned long last; @@ -103,556 +109,35 @@ return answer; } -/* This is the distribution table for the normal distribution produced - * with NISTnet tools. - * The entries represent a scaled inverse of the cumulative distribution - * function. - */ -#define TABLESIZE 2048 -#define TABLEFACTOR 8192 - -static const short disttable[TABLESIZE] = { - -31473, -26739, -25226, -24269, - -23560, -22993, -22518, -22109, - -21749, -21426, -21133, -20865, - -20618, -20389, -20174, -19972, - -19782, -19601, -19430, -19267, - -19112, -18962, -18819, -18681, - -18549, -18421, -18298, -18178, - -18062, -17950, -17841, -17735, - -17632, -17532, -17434, -17339, - -17245, -17155, -17066, -16979, - -16894, -16811, -16729, -16649, - -16571, -16494, -16419, -16345, - -16272, -16201, -16130, -16061, - -15993, -15926, -15861, -15796, - -15732, -15669, -15607, -15546, - -15486, -15426, -15368, -15310, - -15253, -15196, -15140, -15086, - -15031, -14977, -14925, -14872, - -14821, -14769, -14719, -14669, - -14619, -14570, -14522, -14473, - -14426, -14379, -14332, -14286, - -14241, -14196, -14150, -14106, - -14062, -14019, -13976, -13933, - -13890, -13848, -13807, -13765, - -13724, -13684, -13643, -13604, - -13564, -13525, -13486, -13447, - -13408, -13370, -13332, -13295, - -13258, -13221, -13184, -13147, - -13111, -13075, -13040, -13004, - -12969, -12934, -12899, -12865, - -12830, -12796, -12762, -12729, - -12695, -12662, -12629, -12596, - -12564, -12531, -12499, -12467, - -12435, -12404, -12372, -12341, - -12310, -12279, -12248, -12218, - -12187, -12157, -12127, -12097, - -12067, -12038, -12008, -11979, - -11950, -11921, -11892, -11863, - -11835, -11806, -11778, -11750, - -11722, -11694, -11666, -11639, - -11611, -11584, -11557, -11530, - -11503, -11476, -11450, -11423, - -11396, -11370, -11344, -11318, - -11292, -11266, -11240, -11214, - -11189, -11164, -11138, -11113, - -11088, -11063, -11038, -11013, - -10988, -10964, -10939, -10915, - -10891, -10866, -10843, -10818, - -10794, -10770, -10747, -10723, - -10700, -10676, -10652, -10630, - -10606, -10583, -10560, -10537, - -10514, -10491, -10469, -10446, - -10424, -10401, -10378, -10356, - -10334, -10312, -10290, -10267, - -10246, -10224, -10202, -10180, - -10158, -10137, -10115, -10094, - -10072, -10051, -10030, -10009, - -9988, -9967, -9945, -9925, - -9904, -9883, -9862, -9842, - -9821, -9800, -9780, -9760, - -9739, -9719, -9699, -9678, - -9658, -9638, -9618, -9599, - -9578, -9559, -9539, -9519, - -9499, -9480, -9461, -9441, - -9422, -9402, -9383, -9363, - -9344, -9325, -9306, -9287, - -9268, -9249, -9230, -9211, - -9192, -9173, -9155, -9136, - -9117, -9098, -9080, -9062, - -9043, -9025, -9006, -8988, - -8970, -8951, -8933, -8915, - -8897, -8879, -8861, -8843, - -8825, -8807, -8789, -8772, - -8754, -8736, -8718, -8701, - -8683, -8665, -8648, -8630, - -8613, -8595, -8578, -8561, - -8543, -8526, -8509, -8492, - -8475, -8458, -8441, -8423, - -8407, -8390, -8373, -8356, - -8339, -8322, -8305, -8289, - -8272, -8255, -8239, -8222, - -8206, -8189, -8172, -8156, - -8140, -8123, -8107, -8090, - -8074, -8058, -8042, -8025, - -8009, -7993, -7977, -7961, - -7945, -7929, -7913, -7897, - -7881, -7865, -7849, -7833, - -7817, -7802, -7786, -7770, - -7754, -7739, -7723, -7707, - -7692, -7676, -7661, -7645, - -7630, -7614, -7599, -7583, - -7568, -7553, -7537, -7522, - -7507, -7492, -7476, -7461, - -7446, -7431, -7416, -7401, - -7385, -7370, -7356, -7340, - -7325, -7311, -7296, -7281, - -7266, -7251, -7236, -7221, - -7207, -7192, -7177, -7162, - -7148, -7133, -7118, -7104, - -7089, -7075, -7060, -7046, - -7031, -7016, -7002, -6988, - -6973, -6959, -6944, -6930, - -6916, -6901, -6887, -6873, - -6859, -6844, -6830, -6816, - -6802, -6788, -6774, -6760, - -6746, -6731, -6717, -6704, - -6690, -6675, -6661, -6647, - -6633, -6620, -6606, -6592, - -6578, -6564, -6550, -6537, - -6523, -6509, -6495, -6482, - -6468, -6454, -6441, -6427, - -6413, -6400, -6386, -6373, - -6359, -6346, -6332, -6318, - -6305, -6291, -6278, -6264, - -6251, -6238, -6224, -6211, - -6198, -6184, -6171, -6158, - -6144, -6131, -6118, -6105, - -6091, -6078, -6065, -6052, - -6039, -6025, -6012, -5999, - -5986, -5973, -5960, -5947, - -5934, -5921, -5908, -5895, - -5882, -5869, -5856, -5843, - -5830, -5817, -5804, -5791, - -5779, -5766, -5753, -5740, - -5727, -5714, -5702, -5689, - -5676, -5663, -5650, -5638, - -5625, -5612, -5600, -5587, - -5575, -5562, -5549, -5537, - -5524, -5512, -5499, -5486, - -5474, -5461, -5449, -5436, - -5424, -5411, -5399, -5386, - -5374, -5362, -5349, -5337, - -5324, -5312, -5299, -5287, - -5275, -5263, -5250, -5238, - -5226, -5213, -5201, -5189, - -5177, -5164, -5152, -5140, - -5128, -5115, -5103, -5091, - -5079, -5067, -5055, -5043, - -5030, -5018, -5006, -4994, - -4982, -4970, -4958, -4946, - -4934, -4922, -4910, -4898, - -4886, -4874, -4862, -4850, - -4838, -4826, -4814, -4803, - -4791, -4778, -4767, -4755, - -4743, -4731, -4719, -4708, - -4696, -4684, -4672, -4660, - -4649, -4637, -4625, -4613, - -4601, -4590, -4578, -4566, - -4554, -4543, -4531, -4520, - -4508, -4496, -4484, -4473, - -4461, -4449, -4438, -4427, - -4415, -4403, -4392, -4380, - -4368, -4357, -4345, -4334, - -4322, -4311, -4299, -4288, - -4276, -4265, -4253, -4242, - -4230, -4219, -4207, -4196, - -4184, -4173, -4162, -4150, - -4139, -4128, -4116, -4105, - -4094, -4082, -4071, -4060, - -4048, -4037, -4026, -4014, - -4003, -3992, -3980, -3969, - -3958, -3946, -3935, -3924, - -3913, -3901, -3890, -3879, - -3868, -3857, -3845, -3834, - -3823, -3812, -3801, -3790, - -3779, -3767, -3756, -3745, - -3734, -3723, -3712, -3700, - -3689, -3678, -3667, -3656, - -3645, -3634, -3623, -3612, - -3601, -3590, -3579, -3568, - -3557, -3545, -3535, -3524, - -3513, -3502, -3491, -3480, - -3469, -3458, -3447, -3436, - -3425, -3414, -3403, -3392, - -3381, -3370, -3360, -3348, - -3337, -3327, -3316, -3305, - -3294, -3283, -3272, -3262, - -3251, -3240, -3229, -3218, - -3207, -3197, -3185, -3175, - -3164, -3153, -3142, -3132, - -3121, -3110, -3099, -3088, - -3078, -3067, -3056, -3045, - -3035, -3024, -3013, -3003, - -2992, -2981, -2970, -2960, - -2949, -2938, -2928, -2917, - -2906, -2895, -2885, -2874, - -2864, -2853, -2842, -2832, - -2821, -2810, -2800, -2789, - -2778, -2768, -2757, -2747, - -2736, -2725, -2715, -2704, - -2694, -2683, -2673, -2662, - -2651, -2641, -2630, -2620, - -2609, -2599, -2588, -2578, - -2567, -2556, -2546, -2535, - -2525, -2515, -2504, -2493, - -2483, -2472, -2462, -2451, - -2441, -2431, -2420, -2410, - -2399, -2389, -2378, -2367, - -2357, -2347, -2336, -2326, - -2315, -2305, -2295, -2284, - -2274, -2263, -2253, -2243, - -2232, -2222, -2211, -2201, - -2191, -2180, -2170, -2159, - -2149, -2139, -2128, -2118, - -2107, -2097, -2087, -2076, - -2066, -2056, -2046, -2035, - -2025, -2014, -2004, -1994, - -1983, -1973, -1963, -1953, - -1942, -1932, -1921, -1911, - -1901, -1891, -1880, -1870, - -1860, -1849, -1839, -1829, - -1819, -1808, -1798, -1788, - -1778, -1767, -1757, -1747, - -1736, -1726, -1716, -1706, - -1695, -1685, -1675, -1665, - -1654, -1644, -1634, -1624, - -1613, -1603, -1593, -1583, - -1573, -1563, -1552, -1542, - -1532, -1522, -1511, -1501, - -1491, -1481, -1471, -1461, - -1450, -1440, -1430, -1420, - -1409, -1400, -1389, -1379, - -1369, -1359, -1348, -1339, - -1328, -1318, -1308, -1298, - -1288, -1278, -1267, -1257, - -1247, -1237, -1227, -1217, - -1207, -1196, -1186, -1176, - -1166, -1156, -1146, -1135, - -1126, -1115, -1105, -1095, - -1085, -1075, -1065, -1055, - -1044, -1034, -1024, -1014, - -1004, -994, -984, -974, - -964, -954, -944, -933, - -923, -913, -903, -893, - -883, -873, -863, -853, - -843, -833, -822, -812, - -802, -792, -782, -772, - -762, -752, -742, -732, - -722, -712, -702, -691, - -682, -671, -662, -651, - -641, -631, -621, -611, - -601, -591, -581, -571, - -561, -551, -541, -531, - -521, -511, -501, -491, - -480, -471, -460, -451, - -440, -430, -420, -410, - -400, -390, -380, -370, - -360, -350, -340, -330, - -320, -310, -300, -290, - -280, -270, -260, -250, - -240, -230, -220, -210, - -199, -190, -179, -170, - -159, -150, -139, -129, - -119, -109, -99, -89, - -79, -69, -59, -49, - -39, -29, -19, -9, - 1, 11, 21, 31, - 41, 51, 61, 71, - 81, 91, 101, 111, - 121, 131, 141, 152, - 161, 172, 181, 192, - 202, 212, 222, 232, - 242, 252, 262, 272, - 282, 292, 302, 312, - 322, 332, 342, 352, - 362, 372, 382, 392, - 402, 412, 422, 433, - 442, 453, 462, 473, - 483, 493, 503, 513, - 523, 533, 543, 553, - 563, 573, 583, 593, - 603, 613, 623, 633, - 643, 653, 664, 673, - 684, 694, 704, 714, - 724, 734, 744, 754, - 764, 774, 784, 794, - 804, 815, 825, 835, - 845, 855, 865, 875, - 885, 895, 905, 915, - 925, 936, 946, 956, - 966, 976, 986, 996, - 1006, 1016, 1026, 1037, - 1047, 1057, 1067, 1077, - 1087, 1097, 1107, 1117, - 1128, 1138, 1148, 1158, - 1168, 1178, 1188, 1198, - 1209, 1219, 1229, 1239, - 1249, 1259, 1269, 1280, - 1290, 1300, 1310, 1320, - 1330, 1341, 1351, 1361, - 1371, 1381, 1391, 1402, - 1412, 1422, 1432, 1442, - 1452, 1463, 1473, 1483, - 1493, 1503, 1513, 1524, - 1534, 1544, 1554, 1565, - 1575, 1585, 1595, 1606, - 1616, 1626, 1636, 1647, - 1656, 1667, 1677, 1687, - 1697, 1708, 1718, 1729, - 1739, 1749, 1759, 1769, - 1780, 1790, 1800, 1810, - 1821, 1831, 1841, 1851, - 1862, 1872, 1883, 1893, - 1903, 1913, 1923, 1934, - 1944, 1955, 1965, 1975, - 1985, 1996, 2006, 2016, - 2027, 2037, 2048, 2058, - 2068, 2079, 2089, 2099, - 2110, 2120, 2130, 2141, - 2151, 2161, 2172, 2182, - 2193, 2203, 2213, 2224, - 2234, 2245, 2255, 2265, - 2276, 2286, 2297, 2307, - 2318, 2328, 2338, 2349, - 2359, 2370, 2380, 2391, - 2401, 2412, 2422, 2433, - 2443, 2454, 2464, 2475, - 2485, 2496, 2506, 2517, - 2527, 2537, 2548, 2559, - 2569, 2580, 2590, 2601, - 2612, 2622, 2632, 2643, - 2654, 2664, 2675, 2685, - 2696, 2707, 2717, 2728, - 2738, 2749, 2759, 2770, - 2781, 2791, 2802, 2813, - 2823, 2834, 2845, 2855, - 2866, 2877, 2887, 2898, - 2909, 2919, 2930, 2941, - 2951, 2962, 2973, 2984, - 2994, 3005, 3015, 3027, - 3037, 3048, 3058, 3069, - 3080, 3091, 3101, 3113, - 3123, 3134, 3145, 3156, - 3166, 3177, 3188, 3199, - 3210, 3220, 3231, 3242, - 3253, 3264, 3275, 3285, - 3296, 3307, 3318, 3329, - 3340, 3351, 3362, 3373, - 3384, 3394, 3405, 3416, - 3427, 3438, 3449, 3460, - 3471, 3482, 3493, 3504, - 3515, 3526, 3537, 3548, - 3559, 3570, 3581, 3592, - 3603, 3614, 3625, 3636, - 3647, 3659, 3670, 3681, - 3692, 3703, 3714, 3725, - 3736, 3747, 3758, 3770, - 3781, 3792, 3803, 3814, - 3825, 3837, 3848, 3859, - 3870, 3881, 3893, 3904, - 3915, 3926, 3937, 3949, - 3960, 3971, 3983, 3994, - 4005, 4017, 4028, 4039, - 4051, 4062, 4073, 4085, - 4096, 4107, 4119, 4130, - 4141, 4153, 4164, 4175, - 4187, 4198, 4210, 4221, - 4233, 4244, 4256, 4267, - 4279, 4290, 4302, 4313, - 4325, 4336, 4348, 4359, - 4371, 4382, 4394, 4406, - 4417, 4429, 4440, 4452, - 4464, 4475, 4487, 4499, - 4510, 4522, 4533, 4545, - 4557, 4569, 4581, 4592, - 4604, 4616, 4627, 4639, - 4651, 4663, 4674, 4686, - 4698, 4710, 4722, 4734, - 4746, 4758, 4769, 4781, - 4793, 4805, 4817, 4829, - 4841, 4853, 4865, 4877, - 4889, 4900, 4913, 4925, - 4936, 4949, 4961, 4973, - 4985, 4997, 5009, 5021, - 5033, 5045, 5057, 5070, - 5081, 5094, 5106, 5118, - 5130, 5143, 5155, 5167, - 5179, 5191, 5204, 5216, - 5228, 5240, 5253, 5265, - 5278, 5290, 5302, 5315, - 5327, 5340, 5352, 5364, - 5377, 5389, 5401, 5414, - 5426, 5439, 5451, 5464, - 5476, 5489, 5502, 5514, - 5527, 5539, 5552, 5564, - 5577, 5590, 5603, 5615, - 5628, 5641, 5653, 5666, - 5679, 5691, 5704, 5717, - 5730, 5743, 5756, 5768, - 5781, 5794, 5807, 5820, - 5833, 5846, 5859, 5872, - 5885, 5897, 5911, 5924, - 5937, 5950, 5963, 5976, - 5989, 6002, 6015, 6028, - 6042, 6055, 6068, 6081, - 6094, 6108, 6121, 6134, - 6147, 6160, 6174, 6187, - 6201, 6214, 6227, 6241, - 6254, 6267, 6281, 6294, - 6308, 6321, 6335, 6348, - 6362, 6375, 6389, 6403, - 6416, 6430, 6443, 6457, - 6471, 6485, 6498, 6512, - 6526, 6540, 6554, 6567, - 6581, 6595, 6609, 6623, - 6637, 6651, 6665, 6679, - 6692, 6706, 6721, 6735, - 6749, 6763, 6777, 6791, - 6805, 6819, 6833, 6848, - 6862, 6876, 6890, 6905, - 6919, 6933, 6948, 6962, - 6976, 6991, 7005, 7020, - 7034, 7049, 7064, 7078, - 7093, 7107, 7122, 7136, - 7151, 7166, 7180, 7195, - 7210, 7225, 7240, 7254, - 7269, 7284, 7299, 7314, - 7329, 7344, 7359, 7374, - 7389, 7404, 7419, 7434, - 7449, 7465, 7480, 7495, - 7510, 7526, 7541, 7556, - 7571, 7587, 7602, 7618, - 7633, 7648, 7664, 7680, - 7695, 7711, 7726, 7742, - 7758, 7773, 7789, 7805, - 7821, 7836, 7852, 7868, - 7884, 7900, 7916, 7932, - 7948, 7964, 7981, 7997, - 8013, 8029, 8045, 8061, - 8078, 8094, 8110, 8127, - 8143, 8160, 8176, 8193, - 8209, 8226, 8242, 8259, - 8276, 8292, 8309, 8326, - 8343, 8360, 8377, 8394, - 8410, 8428, 8444, 8462, - 8479, 8496, 8513, 8530, - 8548, 8565, 8582, 8600, - 8617, 8634, 8652, 8670, - 8687, 8704, 8722, 8740, - 8758, 8775, 8793, 8811, - 8829, 8847, 8865, 8883, - 8901, 8919, 8937, 8955, - 8974, 8992, 9010, 9029, - 9047, 9066, 9084, 9103, - 9121, 9140, 9159, 9177, - 9196, 9215, 9234, 9253, - 9272, 9291, 9310, 9329, - 9349, 9368, 9387, 9406, - 9426, 9445, 9465, 9484, - 9504, 9524, 9544, 9563, - 9583, 9603, 9623, 9643, - 9663, 9683, 9703, 9723, - 9744, 9764, 9785, 9805, - 9826, 9846, 9867, 9888, - 9909, 9930, 9950, 9971, - 9993, 10013, 10035, 10056, - 10077, 10099, 10120, 10142, - 10163, 10185, 10207, 10229, - 10251, 10273, 10294, 10317, - 10339, 10361, 10384, 10406, - 10428, 10451, 10474, 10496, - 10519, 10542, 10565, 10588, - 10612, 10635, 10658, 10682, - 10705, 10729, 10752, 10776, - 10800, 10824, 10848, 10872, - 10896, 10921, 10945, 10969, - 10994, 11019, 11044, 11069, - 11094, 11119, 11144, 11169, - 11195, 11221, 11246, 11272, - 11298, 11324, 11350, 11376, - 11402, 11429, 11456, 11482, - 11509, 11536, 11563, 11590, - 11618, 11645, 11673, 11701, - 11728, 11756, 11785, 11813, - 11842, 11870, 11899, 11928, - 11957, 11986, 12015, 12045, - 12074, 12104, 12134, 12164, - 12194, 12225, 12255, 12286, - 12317, 12348, 12380, 12411, - 12443, 12475, 12507, 12539, - 12571, 12604, 12637, 12670, - 12703, 12737, 12771, 12804, - 12839, 12873, 12907, 12942, - 12977, 13013, 13048, 13084, - 13120, 13156, 13192, 13229, - 13267, 13304, 13341, 13379, - 13418, 13456, 13495, 13534, - 13573, 13613, 13653, 13693, - 13734, 13775, 13817, 13858, - 13901, 13943, 13986, 14029, - 14073, 14117, 14162, 14206, - 14252, 14297, 14343, 14390, - 14437, 14485, 14533, 14582, - 14631, 14680, 14731, 14782, - 14833, 14885, 14937, 14991, - 15044, 15099, 15154, 15210, - 15266, 15324, 15382, 15441, - 15500, 15561, 15622, 15684, - 15747, 15811, 15877, 15943, - 16010, 16078, 16148, 16218, - 16290, 16363, 16437, 16513, - 16590, 16669, 16749, 16831, - 16915, 17000, 17088, 17177, - 17268, 17362, 17458, 17556, - 17657, 17761, 17868, 17977, - 18090, 18207, 18328, 18452, - 18581, 18715, 18854, 18998, - 19149, 19307, 19472, 19645, - 19828, 20021, 20226, 20444, - 20678, 20930, 21204, 21503, - 21835, 22206, 22630, 23124, - 23721, 24478, 25529, 27316, -}; - -/* tabledist - return a pseudo-randomly distributed value with mean mu and +/* table_dist - return a pseudo-randomly distributed value with mean mu and * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static inline int tabledist(int mu, int sigma) +static int table_dist(const struct dtable *dist, + struct crndstate *state, + int mu, int sigma) { - int x; - int index; - int sigmamod, sigmadiv; + int t, x; + unsigned long rnd; if (sigma == 0) return mu; + + rnd = get_crandom(state); - index = (net_random() & (TABLESIZE-1)); - sigmamod = sigma%TABLEFACTOR; - sigmadiv = sigma/TABLEFACTOR; - x = sigmamod*disttable[index]; + /* default uniform distribution */ + if (dist == NULL) + return (rnd % (2*sigma)) - sigma + mu; + + t = dist->table[rnd % dist->size]; + x = (sigma % TCA_NETEM_TABLEFACTOR) * t; if (x >= 0) - x += TABLEFACTOR/2; + x += TCA_NETEM_TABLEFACTOR/2; else - x -= TABLEFACTOR/2; + x -= TCA_NETEM_TABLEFACTOR/2; - x /= TABLEFACTOR; - x += sigmadiv*disttable[index]; - x += mu; - return x; + return (x + sigma * t)/TCA_NETEM_TABLEFACTOR + mu; } /* Enqueue packets with underlying discipline (fifo) @@ -683,10 +168,14 @@ q->counter = 0; PSCHED_GET_TIME(now); - if (q->jitter) - delay = tabledist(q->latency, q->jitter); - else - delay = q->latency; + + rcu_read_lock(); + delay = table_dist(rcu_dereference(q->distribution), + &q->delay_cor, q->latency, q->jitter); + rcu_read_unlock(); + + pr_debug("netem_enqueue: delay %ld (mu=%u sigma=%u)\n", + delay, q->latency, q->jitter); PSCHED_TADD2(now, delay, cb->time_to_send); @@ -825,13 +314,50 @@ return ret; } +static struct dtable *new_dtable(int size, const __s16 *data) +{ + struct dtable *d; + int i; + + d = kmalloc(sizeof(*d) + size*sizeof(d->table[0]), GFP_KERNEL); + if (d) { + d->size = size; + for (i = 0; i < size; i++) + d->table[i] = data[i]; + } + return d; +} + +static void dtable_rcu_free(struct rcu_head *rcu) +{ + kfree(container_of(rcu, struct dtable, rcu)); +} + static int netem_change(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); const struct tc_netem_qopt *qopt = RTA_DATA(opt); + long data_size = opt->rta_len - RTA_LENGTH(sizeof(*qopt)); + struct dtable *dt; + + if (data_size < 0) { + pr_debug("netem: requested options < current api\n"); + return -EINVAL; + } - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) + data_size /= sizeof(qopt->delay_dist[0]); + if (data_size > 16384) { + pr_debug("netem: bad distribution data size\n"); return -EINVAL; + } + + if (data_size > 0) { + dt = new_dtable(data_size, qopt->delay_dist); + if (!dt) + return -ENOMEM; + } else + dt = NULL; + q->latency = qopt->latency; q->jitter = qopt->jitter; @@ -840,6 +366,11 @@ q->loss = qopt->loss; q->duplicate = qopt->duplicate; + /* handle race with enqueue and change? */ + dt = xchg(&q->distribution, dt); + if (dt) + call_rcu(&dt->rcu, dtable_rcu_free); + init_crandom(&q->delay_cor, qopt->delay_corr); init_crandom(&q->loss_cor, qopt->loss_corr); init_crandom(&q->dup_cor, qopt->dup_corr); @@ -861,7 +392,8 @@ q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; - + q->distribution = NULL; + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); if (!q->qdisc) { pr_debug("netem: qdisc create failed\n"); @@ -893,12 +425,14 @@ struct netem_sched_data *q = qdisc_priv(sch); del_timer_sync(&q->timer); + + kfree(q->distribution); qdisc_destroy(q->qdisc); } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = qdisc_priv(sch); + const struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; struct tc_netem_qopt qopt; @@ -913,6 +447,7 @@ qopt.loss_corr = q->loss_cor.rho; qopt.dup_corr = q->dup_cor.rho; + /* don't dump out distribution table */ RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); return skb->len; From acme@conectiva.com.br Wed Aug 25 12:12:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 12:12:08 -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 i7PJBwSY017896 for ; Wed, 25 Aug 2004 12:12:02 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id CD5C6474F7; Wed, 25 Aug 2004 16:11:41 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 86850474EC for ; Wed, 25 Aug 2004 16:11:41 -0300 (BRT) Received: (qmail 2871 invoked by uid 0); 25 Aug 2004 20:09:24 -0000 Received: from mapi8.distro.conectiva (HELO oops.kerneljanitors.org) (10.0.16.10) by burns.conectiva with SMTP; 25 Aug 2004 20:09:24 -0000 Received: from toy.kerneljanitors.org (brinquedo [192.168.0.2]) by oops.kerneljanitors.org (Postfix) with ESMTP id 7F28F14004; Wed, 25 Aug 2004 16:13:15 -0300 (BRT) Date: Wed, 25 Aug 2004 16:11:38 -0300 From: Arnaldo Carvalho de Melo To: hadi@cyberus.ca Cc: zhikui.chen@rus.uni-stuttgart.de, dccp@ietf.org, netdev@oss.sgi.com Subject: Re: HELP for dccp implementation. Message-Id: <20040825161138.2ca50411.acme@conectiva.com.br> In-Reply-To: <1093454747.1034.85.camel@jzny.localdomain> References: <412CC269.8080907@rus.uni-stuttgart.de> <1093454747.1034.85.camel@jzny.localdomain> Organization: Ghost Protocols Inc. X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-conectiva-linux-gnu) X-URL: http://advogato.org/person/acme Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.002285, version=0.16.3 X-archive-position: 8080 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 On 25 Aug 2004 13:25:48 -0400 jamal wrote: > Hi there, > > Could you please work with > Arnaldo Carvalho de Melo since he is > already working on this - this way we could have a coherent > implementation. > He is quiet knowledgeable on the internals of Linux and you could bring > in the protocol expertise. > Thanks Jamal, we're talking already, its just that I'm lately busy with some other stuff. > cheers, > jamal From shemminger@osdl.org Wed Aug 25 13:50:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 13:51:01 -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 i7PKopw3027252 for ; Wed, 25 Aug 2004 13:50:51 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PKoQ120989; Wed, 25 Aug 2004 13:50:27 -0700 Date: Wed, 25 Aug 2004 13:50:26 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] netem -- update to match new 2.6 version Message-Id: <20040825135026.4ae68f8d@dell_ss3.pdx.osdl.net> In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8081 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 combines the previous 5 changes to netem for 2.6 to support duplication, correlation and distribution tables. Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h 2004-08-25 13:46:01 -07:00 +++ b/include/linux/pkt_sched.h 2004-08-25 13:46:01 -07:00 @@ -432,7 +432,8 @@ #define TCA_ATM_MAX TCA_ATM_STATE -/* Network emulator */ +/* Network section */ + struct tc_netem_qopt { __u32 latency; /* added delay (us) */ @@ -440,7 +441,14 @@ __u32 loss; /* random packet loss (0=none ~0=100%) */ __u32 gap; /* re-ordering gap (0 for delay all) */ __u32 duplicate; /* random packet dup (0=none ~0=100%) */ - __u32 jitter; /* random jitter in latency (us) */ + __u32 jitter; /* delay sigma (us) */ + + __u32 delay_corr; /* delay correllation (0=none ~0=100%) */ + __u32 loss_corr; /* packet loss correllation (0=none ~0=100%) */ + __u32 dup_corr; /* duplicate correlation (0=none ~0=100%) */ + + __s16 delay_dist[0]; /* delay distribution table (optional) */ +#define TCA_NETEM_TABLEFACTOR 8192 }; #endif diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-25 13:46:01 -07:00 +++ b/net/sched/sch_netem.c 2004-08-25 13:46:01 -07:00 @@ -6,6 +6,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Many of the algorithms and ideas for this came from + * NIST Net which is not copyrighted. + * * Authors: Stephen Hemminger * Catalin(ux aka Dino) BOIE */ @@ -23,11 +26,31 @@ #include -/* Network emulator - * - * This scheduler can alters spacing and order - * Similar to NISTnet and BSD Dummynet. - */ +/* Network Emulation Queuing algorithm. + ==================================== + + Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based + Network Emulation Tool + [2] Luigi Rizzo, DummyNet for FreeBSD + + ---------------------------------------------------------------- + + This started out as a simple way to delay outgoing packets to + test TCP but has grown to include most of the functionality + of a full blown network emulator like NISTnet. It can delay + packets and add random jitter (and correlation). The random + distribution can be loaded from a table as well to provide + normal, Pareto, or experimental curves. Packet loss, + duplication, and reordering can also be emulated. + + This qdisc does not do classification that can be handled in + layering other disciplines. It does not need to do bandwidth + control either since that can be handled by using token + bucket or other rate control. + + The simulator is limited by the Linux timer resolution + and will create packet bursts on the HZ boundary (1ms). +*/ struct netem_sched_data { struct Qdisc *qdisc; @@ -40,6 +63,17 @@ u32 counter; u32 gap; u32 jitter; + u32 duplicate; + + struct dtable { + u32 size; + s16 table[0]; + } *distribution; + + struct crndstate { + unsigned long last; + unsigned long rho; + } delay_cor, loss_cor, dup_cor; }; /* Time stamp put into socket buffer control block */ @@ -47,577 +81,75 @@ psched_time_t time_to_send; }; -/* This is the distribution table for the normal distribution produced - * with NISTnet tools. - * The entries represent a scaled inverse of the cumulative distribution - * function. +/* init_crandom - initialize correlated random number generator + * Use entropy source for initial seed. */ -#define TABLESIZE 2048 -#define TABLEFACTOR 8192 +static void init_crandom(struct crndstate *state, unsigned long rho) +{ + state->rho = rho; + state->last = net_random(); +} -static const short disttable[TABLESIZE] = { - -31473, -26739, -25226, -24269, - -23560, -22993, -22518, -22109, - -21749, -21426, -21133, -20865, - -20618, -20389, -20174, -19972, - -19782, -19601, -19430, -19267, - -19112, -18962, -18819, -18681, - -18549, -18421, -18298, -18178, - -18062, -17950, -17841, -17735, - -17632, -17532, -17434, -17339, - -17245, -17155, -17066, -16979, - -16894, -16811, -16729, -16649, - -16571, -16494, -16419, -16345, - -16272, -16201, -16130, -16061, - -15993, -15926, -15861, -15796, - -15732, -15669, -15607, -15546, - -15486, -15426, -15368, -15310, - -15253, -15196, -15140, -15086, - -15031, -14977, -14925, -14872, - -14821, -14769, -14719, -14669, - -14619, -14570, -14522, -14473, - -14426, -14379, -14332, -14286, - -14241, -14196, -14150, -14106, - -14062, -14019, -13976, -13933, - -13890, -13848, -13807, -13765, - -13724, -13684, -13643, -13604, - -13564, -13525, -13486, -13447, - -13408, -13370, -13332, -13295, - -13258, -13221, -13184, -13147, - -13111, -13075, -13040, -13004, - -12969, -12934, -12899, -12865, - -12830, -12796, -12762, -12729, - -12695, -12662, -12629, -12596, - -12564, -12531, -12499, -12467, - -12435, -12404, -12372, -12341, - -12310, -12279, -12248, -12218, - -12187, -12157, -12127, -12097, - -12067, -12038, -12008, -11979, - -11950, -11921, -11892, -11863, - -11835, -11806, -11778, -11750, - -11722, -11694, -11666, -11639, - -11611, -11584, -11557, -11530, - -11503, -11476, -11450, -11423, - -11396, -11370, -11344, -11318, - -11292, -11266, -11240, -11214, - -11189, -11164, -11138, -11113, - -11088, -11063, -11038, -11013, - -10988, -10964, -10939, -10915, - -10891, -10866, -10843, -10818, - -10794, -10770, -10747, -10723, - -10700, -10676, -10652, -10630, - -10606, -10583, -10560, -10537, - -10514, -10491, -10469, -10446, - -10424, -10401, -10378, -10356, - -10334, -10312, -10290, -10267, - -10246, -10224, -10202, -10180, - -10158, -10137, -10115, -10094, - -10072, -10051, -10030, -10009, - -9988, -9967, -9945, -9925, - -9904, -9883, -9862, -9842, - -9821, -9800, -9780, -9760, - -9739, -9719, -9699, -9678, - -9658, -9638, -9618, -9599, - -9578, -9559, -9539, -9519, - -9499, -9480, -9461, -9441, - -9422, -9402, -9383, -9363, - -9344, -9325, -9306, -9287, - -9268, -9249, -9230, -9211, - -9192, -9173, -9155, -9136, - -9117, -9098, -9080, -9062, - -9043, -9025, -9006, -8988, - -8970, -8951, -8933, -8915, - -8897, -8879, -8861, -8843, - -8825, -8807, -8789, -8772, - -8754, -8736, -8718, -8701, - -8683, -8665, -8648, -8630, - -8613, -8595, -8578, -8561, - -8543, -8526, -8509, -8492, - -8475, -8458, -8441, -8423, - -8407, -8390, -8373, -8356, - -8339, -8322, -8305, -8289, - -8272, -8255, -8239, -8222, - -8206, -8189, -8172, -8156, - -8140, -8123, -8107, -8090, - -8074, -8058, -8042, -8025, - -8009, -7993, -7977, -7961, - -7945, -7929, -7913, -7897, - -7881, -7865, -7849, -7833, - -7817, -7802, -7786, -7770, - -7754, -7739, -7723, -7707, - -7692, -7676, -7661, -7645, - -7630, -7614, -7599, -7583, - -7568, -7553, -7537, -7522, - -7507, -7492, -7476, -7461, - -7446, -7431, -7416, -7401, - -7385, -7370, -7356, -7340, - -7325, -7311, -7296, -7281, - -7266, -7251, -7236, -7221, - -7207, -7192, -7177, -7162, - -7148, -7133, -7118, -7104, - -7089, -7075, -7060, -7046, - -7031, -7016, -7002, -6988, - -6973, -6959, -6944, -6930, - -6916, -6901, -6887, -6873, - -6859, -6844, -6830, -6816, - -6802, -6788, -6774, -6760, - -6746, -6731, -6717, -6704, - -6690, -6675, -6661, -6647, - -6633, -6620, -6606, -6592, - -6578, -6564, -6550, -6537, - -6523, -6509, -6495, -6482, - -6468, -6454, -6441, -6427, - -6413, -6400, -6386, -6373, - -6359, -6346, -6332, -6318, - -6305, -6291, -6278, -6264, - -6251, -6238, -6224, -6211, - -6198, -6184, -6171, -6158, - -6144, -6131, -6118, -6105, - -6091, -6078, -6065, -6052, - -6039, -6025, -6012, -5999, - -5986, -5973, -5960, -5947, - -5934, -5921, -5908, -5895, - -5882, -5869, -5856, -5843, - -5830, -5817, -5804, -5791, - -5779, -5766, -5753, -5740, - -5727, -5714, -5702, -5689, - -5676, -5663, -5650, -5638, - -5625, -5612, -5600, -5587, - -5575, -5562, -5549, -5537, - -5524, -5512, -5499, -5486, - -5474, -5461, -5449, -5436, - -5424, -5411, -5399, -5386, - -5374, -5362, -5349, -5337, - -5324, -5312, -5299, -5287, - -5275, -5263, -5250, -5238, - -5226, -5213, -5201, -5189, - -5177, -5164, -5152, -5140, - -5128, -5115, -5103, -5091, - -5079, -5067, -5055, -5043, - -5030, -5018, -5006, -4994, - -4982, -4970, -4958, -4946, - -4934, -4922, -4910, -4898, - -4886, -4874, -4862, -4850, - -4838, -4826, -4814, -4803, - -4791, -4778, -4767, -4755, - -4743, -4731, -4719, -4708, - -4696, -4684, -4672, -4660, - -4649, -4637, -4625, -4613, - -4601, -4590, -4578, -4566, - -4554, -4543, -4531, -4520, - -4508, -4496, -4484, -4473, - -4461, -4449, -4438, -4427, - -4415, -4403, -4392, -4380, - -4368, -4357, -4345, -4334, - -4322, -4311, -4299, -4288, - -4276, -4265, -4253, -4242, - -4230, -4219, -4207, -4196, - -4184, -4173, -4162, -4150, - -4139, -4128, -4116, -4105, - -4094, -4082, -4071, -4060, - -4048, -4037, -4026, -4014, - -4003, -3992, -3980, -3969, - -3958, -3946, -3935, -3924, - -3913, -3901, -3890, -3879, - -3868, -3857, -3845, -3834, - -3823, -3812, -3801, -3790, - -3779, -3767, -3756, -3745, - -3734, -3723, -3712, -3700, - -3689, -3678, -3667, -3656, - -3645, -3634, -3623, -3612, - -3601, -3590, -3579, -3568, - -3557, -3545, -3535, -3524, - -3513, -3502, -3491, -3480, - -3469, -3458, -3447, -3436, - -3425, -3414, -3403, -3392, - -3381, -3370, -3360, -3348, - -3337, -3327, -3316, -3305, - -3294, -3283, -3272, -3262, - -3251, -3240, -3229, -3218, - -3207, -3197, -3185, -3175, - -3164, -3153, -3142, -3132, - -3121, -3110, -3099, -3088, - -3078, -3067, -3056, -3045, - -3035, -3024, -3013, -3003, - -2992, -2981, -2970, -2960, - -2949, -2938, -2928, -2917, - -2906, -2895, -2885, -2874, - -2864, -2853, -2842, -2832, - -2821, -2810, -2800, -2789, - -2778, -2768, -2757, -2747, - -2736, -2725, -2715, -2704, - -2694, -2683, -2673, -2662, - -2651, -2641, -2630, -2620, - -2609, -2599, -2588, -2578, - -2567, -2556, -2546, -2535, - -2525, -2515, -2504, -2493, - -2483, -2472, -2462, -2451, - -2441, -2431, -2420, -2410, - -2399, -2389, -2378, -2367, - -2357, -2347, -2336, -2326, - -2315, -2305, -2295, -2284, - -2274, -2263, -2253, -2243, - -2232, -2222, -2211, -2201, - -2191, -2180, -2170, -2159, - -2149, -2139, -2128, -2118, - -2107, -2097, -2087, -2076, - -2066, -2056, -2046, -2035, - -2025, -2014, -2004, -1994, - -1983, -1973, -1963, -1953, - -1942, -1932, -1921, -1911, - -1901, -1891, -1880, -1870, - -1860, -1849, -1839, -1829, - -1819, -1808, -1798, -1788, - -1778, -1767, -1757, -1747, - -1736, -1726, -1716, -1706, - -1695, -1685, -1675, -1665, - -1654, -1644, -1634, -1624, - -1613, -1603, -1593, -1583, - -1573, -1563, -1552, -1542, - -1532, -1522, -1511, -1501, - -1491, -1481, -1471, -1461, - -1450, -1440, -1430, -1420, - -1409, -1400, -1389, -1379, - -1369, -1359, -1348, -1339, - -1328, -1318, -1308, -1298, - -1288, -1278, -1267, -1257, - -1247, -1237, -1227, -1217, - -1207, -1196, -1186, -1176, - -1166, -1156, -1146, -1135, - -1126, -1115, -1105, -1095, - -1085, -1075, -1065, -1055, - -1044, -1034, -1024, -1014, - -1004, -994, -984, -974, - -964, -954, -944, -933, - -923, -913, -903, -893, - -883, -873, -863, -853, - -843, -833, -822, -812, - -802, -792, -782, -772, - -762, -752, -742, -732, - -722, -712, -702, -691, - -682, -671, -662, -651, - -641, -631, -621, -611, - -601, -591, -581, -571, - -561, -551, -541, -531, - -521, -511, -501, -491, - -480, -471, -460, -451, - -440, -430, -420, -410, - -400, -390, -380, -370, - -360, -350, -340, -330, - -320, -310, -300, -290, - -280, -270, -260, -250, - -240, -230, -220, -210, - -199, -190, -179, -170, - -159, -150, -139, -129, - -119, -109, -99, -89, - -79, -69, -59, -49, - -39, -29, -19, -9, - 1, 11, 21, 31, - 41, 51, 61, 71, - 81, 91, 101, 111, - 121, 131, 141, 152, - 161, 172, 181, 192, - 202, 212, 222, 232, - 242, 252, 262, 272, - 282, 292, 302, 312, - 322, 332, 342, 352, - 362, 372, 382, 392, - 402, 412, 422, 433, - 442, 453, 462, 473, - 483, 493, 503, 513, - 523, 533, 543, 553, - 563, 573, 583, 593, - 603, 613, 623, 633, - 643, 653, 664, 673, - 684, 694, 704, 714, - 724, 734, 744, 754, - 764, 774, 784, 794, - 804, 815, 825, 835, - 845, 855, 865, 875, - 885, 895, 905, 915, - 925, 936, 946, 956, - 966, 976, 986, 996, - 1006, 1016, 1026, 1037, - 1047, 1057, 1067, 1077, - 1087, 1097, 1107, 1117, - 1128, 1138, 1148, 1158, - 1168, 1178, 1188, 1198, - 1209, 1219, 1229, 1239, - 1249, 1259, 1269, 1280, - 1290, 1300, 1310, 1320, - 1330, 1341, 1351, 1361, - 1371, 1381, 1391, 1402, - 1412, 1422, 1432, 1442, - 1452, 1463, 1473, 1483, - 1493, 1503, 1513, 1524, - 1534, 1544, 1554, 1565, - 1575, 1585, 1595, 1606, - 1616, 1626, 1636, 1647, - 1656, 1667, 1677, 1687, - 1697, 1708, 1718, 1729, - 1739, 1749, 1759, 1769, - 1780, 1790, 1800, 1810, - 1821, 1831, 1841, 1851, - 1862, 1872, 1883, 1893, - 1903, 1913, 1923, 1934, - 1944, 1955, 1965, 1975, - 1985, 1996, 2006, 2016, - 2027, 2037, 2048, 2058, - 2068, 2079, 2089, 2099, - 2110, 2120, 2130, 2141, - 2151, 2161, 2172, 2182, - 2193, 2203, 2213, 2224, - 2234, 2245, 2255, 2265, - 2276, 2286, 2297, 2307, - 2318, 2328, 2338, 2349, - 2359, 2370, 2380, 2391, - 2401, 2412, 2422, 2433, - 2443, 2454, 2464, 2475, - 2485, 2496, 2506, 2517, - 2527, 2537, 2548, 2559, - 2569, 2580, 2590, 2601, - 2612, 2622, 2632, 2643, - 2654, 2664, 2675, 2685, - 2696, 2707, 2717, 2728, - 2738, 2749, 2759, 2770, - 2781, 2791, 2802, 2813, - 2823, 2834, 2845, 2855, - 2866, 2877, 2887, 2898, - 2909, 2919, 2930, 2941, - 2951, 2962, 2973, 2984, - 2994, 3005, 3015, 3027, - 3037, 3048, 3058, 3069, - 3080, 3091, 3101, 3113, - 3123, 3134, 3145, 3156, - 3166, 3177, 3188, 3199, - 3210, 3220, 3231, 3242, - 3253, 3264, 3275, 3285, - 3296, 3307, 3318, 3329, - 3340, 3351, 3362, 3373, - 3384, 3394, 3405, 3416, - 3427, 3438, 3449, 3460, - 3471, 3482, 3493, 3504, - 3515, 3526, 3537, 3548, - 3559, 3570, 3581, 3592, - 3603, 3614, 3625, 3636, - 3647, 3659, 3670, 3681, - 3692, 3703, 3714, 3725, - 3736, 3747, 3758, 3770, - 3781, 3792, 3803, 3814, - 3825, 3837, 3848, 3859, - 3870, 3881, 3893, 3904, - 3915, 3926, 3937, 3949, - 3960, 3971, 3983, 3994, - 4005, 4017, 4028, 4039, - 4051, 4062, 4073, 4085, - 4096, 4107, 4119, 4130, - 4141, 4153, 4164, 4175, - 4187, 4198, 4210, 4221, - 4233, 4244, 4256, 4267, - 4279, 4290, 4302, 4313, - 4325, 4336, 4348, 4359, - 4371, 4382, 4394, 4406, - 4417, 4429, 4440, 4452, - 4464, 4475, 4487, 4499, - 4510, 4522, 4533, 4545, - 4557, 4569, 4581, 4592, - 4604, 4616, 4627, 4639, - 4651, 4663, 4674, 4686, - 4698, 4710, 4722, 4734, - 4746, 4758, 4769, 4781, - 4793, 4805, 4817, 4829, - 4841, 4853, 4865, 4877, - 4889, 4900, 4913, 4925, - 4936, 4949, 4961, 4973, - 4985, 4997, 5009, 5021, - 5033, 5045, 5057, 5070, - 5081, 5094, 5106, 5118, - 5130, 5143, 5155, 5167, - 5179, 5191, 5204, 5216, - 5228, 5240, 5253, 5265, - 5278, 5290, 5302, 5315, - 5327, 5340, 5352, 5364, - 5377, 5389, 5401, 5414, - 5426, 5439, 5451, 5464, - 5476, 5489, 5502, 5514, - 5527, 5539, 5552, 5564, - 5577, 5590, 5603, 5615, - 5628, 5641, 5653, 5666, - 5679, 5691, 5704, 5717, - 5730, 5743, 5756, 5768, - 5781, 5794, 5807, 5820, - 5833, 5846, 5859, 5872, - 5885, 5897, 5911, 5924, - 5937, 5950, 5963, 5976, - 5989, 6002, 6015, 6028, - 6042, 6055, 6068, 6081, - 6094, 6108, 6121, 6134, - 6147, 6160, 6174, 6187, - 6201, 6214, 6227, 6241, - 6254, 6267, 6281, 6294, - 6308, 6321, 6335, 6348, - 6362, 6375, 6389, 6403, - 6416, 6430, 6443, 6457, - 6471, 6485, 6498, 6512, - 6526, 6540, 6554, 6567, - 6581, 6595, 6609, 6623, - 6637, 6651, 6665, 6679, - 6692, 6706, 6721, 6735, - 6749, 6763, 6777, 6791, - 6805, 6819, 6833, 6848, - 6862, 6876, 6890, 6905, - 6919, 6933, 6948, 6962, - 6976, 6991, 7005, 7020, - 7034, 7049, 7064, 7078, - 7093, 7107, 7122, 7136, - 7151, 7166, 7180, 7195, - 7210, 7225, 7240, 7254, - 7269, 7284, 7299, 7314, - 7329, 7344, 7359, 7374, - 7389, 7404, 7419, 7434, - 7449, 7465, 7480, 7495, - 7510, 7526, 7541, 7556, - 7571, 7587, 7602, 7618, - 7633, 7648, 7664, 7680, - 7695, 7711, 7726, 7742, - 7758, 7773, 7789, 7805, - 7821, 7836, 7852, 7868, - 7884, 7900, 7916, 7932, - 7948, 7964, 7981, 7997, - 8013, 8029, 8045, 8061, - 8078, 8094, 8110, 8127, - 8143, 8160, 8176, 8193, - 8209, 8226, 8242, 8259, - 8276, 8292, 8309, 8326, - 8343, 8360, 8377, 8394, - 8410, 8428, 8444, 8462, - 8479, 8496, 8513, 8530, - 8548, 8565, 8582, 8600, - 8617, 8634, 8652, 8670, - 8687, 8704, 8722, 8740, - 8758, 8775, 8793, 8811, - 8829, 8847, 8865, 8883, - 8901, 8919, 8937, 8955, - 8974, 8992, 9010, 9029, - 9047, 9066, 9084, 9103, - 9121, 9140, 9159, 9177, - 9196, 9215, 9234, 9253, - 9272, 9291, 9310, 9329, - 9349, 9368, 9387, 9406, - 9426, 9445, 9465, 9484, - 9504, 9524, 9544, 9563, - 9583, 9603, 9623, 9643, - 9663, 9683, 9703, 9723, - 9744, 9764, 9785, 9805, - 9826, 9846, 9867, 9888, - 9909, 9930, 9950, 9971, - 9993, 10013, 10035, 10056, - 10077, 10099, 10120, 10142, - 10163, 10185, 10207, 10229, - 10251, 10273, 10294, 10317, - 10339, 10361, 10384, 10406, - 10428, 10451, 10474, 10496, - 10519, 10542, 10565, 10588, - 10612, 10635, 10658, 10682, - 10705, 10729, 10752, 10776, - 10800, 10824, 10848, 10872, - 10896, 10921, 10945, 10969, - 10994, 11019, 11044, 11069, - 11094, 11119, 11144, 11169, - 11195, 11221, 11246, 11272, - 11298, 11324, 11350, 11376, - 11402, 11429, 11456, 11482, - 11509, 11536, 11563, 11590, - 11618, 11645, 11673, 11701, - 11728, 11756, 11785, 11813, - 11842, 11870, 11899, 11928, - 11957, 11986, 12015, 12045, - 12074, 12104, 12134, 12164, - 12194, 12225, 12255, 12286, - 12317, 12348, 12380, 12411, - 12443, 12475, 12507, 12539, - 12571, 12604, 12637, 12670, - 12703, 12737, 12771, 12804, - 12839, 12873, 12907, 12942, - 12977, 13013, 13048, 13084, - 13120, 13156, 13192, 13229, - 13267, 13304, 13341, 13379, - 13418, 13456, 13495, 13534, - 13573, 13613, 13653, 13693, - 13734, 13775, 13817, 13858, - 13901, 13943, 13986, 14029, - 14073, 14117, 14162, 14206, - 14252, 14297, 14343, 14390, - 14437, 14485, 14533, 14582, - 14631, 14680, 14731, 14782, - 14833, 14885, 14937, 14991, - 15044, 15099, 15154, 15210, - 15266, 15324, 15382, 15441, - 15500, 15561, 15622, 15684, - 15747, 15811, 15877, 15943, - 16010, 16078, 16148, 16218, - 16290, 16363, 16437, 16513, - 16590, 16669, 16749, 16831, - 16915, 17000, 17088, 17177, - 17268, 17362, 17458, 17556, - 17657, 17761, 17868, 17977, - 18090, 18207, 18328, 18452, - 18581, 18715, 18854, 18998, - 19149, 19307, 19472, 19645, - 19828, 20021, 20226, 20444, - 20678, 20930, 21204, 21503, - 21835, 22206, 22630, 23124, - 23721, 24478, 25529, 27316, -}; +/* get_crandom - correlated random number generator + * Next number depends on last value. + * rho is scaled to avoid floating point. + */ +static unsigned long get_crandom(struct crndstate *state) +{ + u64 value, rho; + unsigned long answer; -/* tabledist - return a pseudo-randomly distributed value with mean mu and + if (state->rho == 0) /* no correllation */ + return net_random(); + + value = net_random(); + rho = (u64)state->rho + 1; + answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; + state->last = answer; + return answer; +} + +/* table_dist - return a pseudo-randomly distributed value with mean mu and * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static inline int tabledist(int mu, int sigma) +static int table_dist(const struct dtable *dist, + struct crndstate *state, + int mu, int sigma) { - int x; - int index; - int sigmamod, sigmadiv; + int t, x; + unsigned long rnd; if (sigma == 0) return mu; + + rnd = get_crandom(state); + + /* default uniform distribution */ + if (dist == NULL) + return (rnd % (2*sigma)) - sigma + mu; - index = (net_random() & (TABLESIZE-1)); - sigmamod = sigma%TABLEFACTOR; - sigmadiv = sigma/TABLEFACTOR; - x = sigmamod*disttable[index]; + t = dist->table[rnd % dist->size]; + x = (sigma % TCA_NETEM_TABLEFACTOR) * t; if (x >= 0) - x += TABLEFACTOR/2; + x += TCA_NETEM_TABLEFACTOR/2; else - x -= TABLEFACTOR/2; + x -= TCA_NETEM_TABLEFACTOR/2; - x /= TABLEFACTOR; - x += sigmadiv*disttable[index]; - x += mu; - return x; + return (x + sigma * t)/TCA_NETEM_TABLEFACTOR + mu; } /* Enqueue packets with underlying discipline (fifo) * but mark them with current time first. */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static int netem_add_packet(struct Qdisc *sch, struct sk_buff *skb) { struct netem_sched_data *q = (struct netem_sched_data *)sch->data; struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; long delay; - pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); - - /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { - sch->stats.drops++; - return 0; /* lie about loss so TCP doesn't know */ - } - - /* If doing simple delay then gap == 0 so all packets * go into the delayed holding queue * otherwise if doing out of order only "1 out of gap" @@ -636,10 +168,12 @@ q->counter = 0; PSCHED_GET_TIME(now); - if (q->jitter) - delay = tabledist(q->latency, q->jitter); - else - delay = q->latency; + + delay = table_dist(q->distribution, + &q->delay_cor, q->latency, q->jitter); + + pr_debug("netem_enqueue: delay %ld (mu=%u sigma=%u)\n", + delay, q->latency, q->jitter); PSCHED_TADD2(now, delay, cb->time_to_send); @@ -649,7 +183,7 @@ sch->q.qlen++; sch->stats.bytes += skb->len; sch->stats.packets++; - return 0; + return NET_XMIT_SUCCESS; } sch->stats.drops++; @@ -657,6 +191,31 @@ return NET_XMIT_DROP; } +static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + + pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); + + /* 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++; + return 0; /* lie about loss so TCP doesn't know */ + } + + /* Random duplication */ + if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) { + struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); + + pr_debug("netem_enqueue: dup %p\n", skb2); + if (skb2) + netem_add_packet(sch, skb2); + } + + return netem_add_packet(sch, skb); +} + /* Requeue packets but don't change time stamp */ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) { @@ -753,90 +312,139 @@ return ret; } -static int netem_change(struct Qdisc *sch, struct rtattr *opt) +static struct dtable *new_dtable(int size, const __s16 *data) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; - struct tc_netem_qopt *qopt = RTA_DATA(opt); - struct Qdisc *child; - int ret; + struct dtable *d; + int i; - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) - return -EINVAL; + d = kmalloc(sizeof(*d) + size*sizeof(d->table[0]), GFP_KERNEL); + if (d) { + d->size = size; + for (i = 0; i < size; i++) + d->table[i] = data[i]; + } + return d; +} - child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); - if (!child) +static int netem_change(struct Qdisc *sch, struct rtattr *opt) +{ + struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + const struct tc_netem_qopt *qopt = RTA_DATA(opt); + long data_size = opt->rta_len - RTA_LENGTH(sizeof(*qopt)); + struct dtable *dt; + + if (data_size < 0) { + pr_debug( "netem: requested options < current api\n"); return -EINVAL; - - ret = set_fifo_limit(child, qopt->limit); - if (ret) { - qdisc_destroy(child); - return ret; } - sch_tree_lock(sch); - if (child) { - child = xchg(&q->qdisc, child); - if (child != &noop_qdisc) - qdisc_destroy(child); - - q->latency = qopt->latency; - q->jitter = qopt->jitter; - q->limit = qopt->limit; - q->gap = qopt->gap; - q->loss = qopt->loss; + data_size /= sizeof(qopt->delay_dist[0]); + if (data_size > 16384) { + pr_debug("netem: bad distribution data size\n"); + return -EINVAL; } - sch_tree_unlock(sch); + + if (data_size > 0) { + dt = new_dtable(data_size, qopt->delay_dist); + if (!dt) + return -ENOMEM; + } else + dt = NULL; + + + q->latency = qopt->latency; + q->jitter = qopt->jitter; + q->limit = qopt->limit; + q->gap = qopt->gap; + q->loss = qopt->loss; + q->duplicate = qopt->duplicate; + + spin_lock_bh(&sch->dev->queue_lock); + dt = xchg(&q->distribution, dt); + kfree(dt); + spin_unlock_bh(&sch->dev->queue_lock); + + init_crandom(&q->delay_cor, qopt->delay_corr); + init_crandom(&q->loss_cor, qopt->loss_corr); + init_crandom(&q->dup_cor, qopt->dup_corr); return 0; } static int netem_init(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; - int err; + struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + const struct tc_netem_qopt *qopt; + int ret; - if (!opt) + if (!opt || opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL; MOD_INC_USE_COUNT; skb_queue_head_init(&q->delayed); - q->qdisc = &noop_qdisc; - init_timer(&q->timer); q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; + q->distribution = NULL; + + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (!q->qdisc) { + pr_debug("netem: qdisc create failed\n"); + return -ENOMEM; + } + + qopt = RTA_DATA(opt); + ret = set_fifo_limit(q->qdisc, qopt->limit); + if (ret) { + pr_debug("netem: can't set fifo limit\n"); + goto error; + } - err = netem_change(sch, opt); - if (err != 0) - MOD_DEC_USE_COUNT; - return err; + ret = netem_change(sch, opt); + if (ret) { + pr_debug("netem: change failed\n"); + goto error; + } + + return 0; + + error: + MOD_DEC_USE_COUNT; + qdisc_destroy(q->qdisc); + return ret; } static void netem_destroy(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = (struct netem_sched_data *)sch->data; del_timer(&q->timer); - + + kfree(q->distribution); qdisc_destroy(q->qdisc); - q->qdisc = &noop_qdisc; - MOD_DEC_USE_COUNT; } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + const struct netem_sched_data *q + = (struct netem_sched_data *)sch->data; unsigned char *b = skb->tail; struct tc_netem_qopt qopt; + memset(&qopt, 0, sizeof(qopt)); qopt.latency = q->latency; qopt.jitter = q->jitter; qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; + qopt.duplicate = q->duplicate; + qopt.delay_corr = q->delay_cor.rho; + qopt.loss_corr = q->loss_cor.rho; + qopt.dup_corr = q->dup_cor.rho; + /* don't dump out distribution table */ RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); return skb->len; From niv@us.ibm.com Wed Aug 25 14:15:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 14:15:09 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7PLEuXa028233 for ; Wed, 25 Aug 2004 14:15:03 -0700 Received: from us.ibm.com (bi01p1.co.us.ibm.com[32.97.110.142]) by comcast.net (sccrmhc13) with SMTP id <2004082521143201600j3cnie> (Authid: nsnix); Wed, 25 Aug 2004 21:14:43 +0000 Message-ID: <412D0152.1040509@us.ibm.com> Date: Wed, 25 Aug 2004 14:14:58 -0700 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Hellwig CC: Kristine Diana Daniels , 267342@bugs.debian.org, netdev@oss.sgi.com Subject: Re: Bug#267342: kernel-image-2.6.8-1-686-smp: TCP/IP strangeness in 2.6.8 References: <20040822021929.E9D04212D@maus.private.neotoma.org> <20040825144808.GA10396@lst.de> In-Reply-To: <20040825144808.GA10396@lst.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8082 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 Christoph Hellwig wrote: > Could it be possible OpenBSD doesn't properly deal with the tcp window > scaling changes in 2.6.8? (http://lwn.net/Articles/92727/) Unless there is present in the path one of those broken routers (mangling the window scale option), it's likely something else. Also, nntp traffic tends to be small and unaffected by window sizes. Any way to tell if that is so? Any chance you could make the tcpdumps available, if this has not already been resolved? We had a problem with sshd and other apps hanging due to glibc changes and unsafe signal handling in daemons, but this seems like something else.. thanks, Nivedita >>I have noticed strangeness with the 2.6.8 kernel on both 686-smp >>and k7. >>1) rsync from 2.6.8 to a 2.6.7 host hangs. >>2) ssh from 2.6.8 to a 2.6.7 host hangs. >>3) nntp from 2.6.8 hangs for 52 seconds before proceeding. >>4) ssh from Openbsd to 2.6.8 hangs after SSH2_MSG_KEX_DH_GEX_REQUEST >> >>In 1-2 the network topology is as follows >>2.6.8host <-ethernet-> OpenBSD <-openvpn-> OpenBSD <-ethernet-> 2.6.7host >>In 3 the network topology is as follows >>2.6.8host <-ethernet-> OpenBSD <-openvpn-> OpenBSD <-internet-> nntp-server >>In 4 the network topology is as follows >>2.6.8host <-ethernet-> OpenBSD From shemminger@osdl.org Wed Aug 25 14:16:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 14:16: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 i7PLGIiN028456 for ; Wed, 25 Aug 2004 14:16:20 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PLFd125619; Wed, 25 Aug 2004 14:15:40 -0700 Date: Wed, 25 Aug 2004 14:15:39 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: Bart De Schuymer , netdev@oss.sgi.com, bridge@osdl.org Subject: [PATCH] fix oops when mangling and brouting and tcpdumping packets (revised) Message-Id: <20040825141539.08ca19b8@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8083 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 The ebtables brouting chain, traversed through the call br_should_route_hook(), can alter a packet. The redirect target does this, f.e., to change the MAC destination. Bart discovered this and proposed a patch; this is a revised version. This version cleans up the handle_bridge code in net/core/dev.c as well as getting rid of extra rcu_read_lock and only does the br_port checking once. Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/if_bridge.h b/include/linux/if_bridge.h --- a/include/linux/if_bridge.h 2004-08-25 14:10:43 -07:00 +++ b/include/linux/if_bridge.h 2004-08-25 14:10:43 -07:00 @@ -105,7 +105,7 @@ #include extern void brioctl_set(int (*ioctl_hook)(unsigned int, void __user *)); -extern int (*br_handle_frame_hook)(struct sk_buff *skb); +extern int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); extern int (*br_should_route_hook)(struct sk_buff **pskb); #endif diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c --- a/net/bridge/br_input.c 2004-08-25 14:10:43 -07:00 +++ b/net/bridge/br_input.c 2004-08-25 14:10:43 -07:00 @@ -45,26 +45,15 @@ br_pass_frame_up_finish); } +/* note: already called with rcu_read_lock (preempt_disabled) */ int br_handle_frame_finish(struct sk_buff *skb) { - struct net_bridge *br; - unsigned char *dest; + const unsigned char *dest = skb->mac.ethernet->h_dest; + struct net_bridge_port *p = skb->dev->br_port; + struct net_bridge *br = p->br; struct net_bridge_fdb_entry *dst; - struct net_bridge_port *p; - int passedup; + int passedup = 0; - dest = skb->mac.ethernet->h_dest; - - rcu_read_lock(); - p = rcu_dereference(skb->dev->br_port); - - if (p == NULL || p->state == BR_STATE_DISABLED) { - kfree_skb(skb); - goto out; - } - - br = p->br; - passedup = 0; if (br->dev->flags & IFF_PROMISC) { struct sk_buff *skb2; @@ -99,20 +88,21 @@ br_flood_forward(br, skb, 0); out: - rcu_read_unlock(); return 0; } -int br_handle_frame(struct sk_buff *skb) +/* + * Called via br_handle_frame_hook. + * Return 0 if *pskb should be processed furthur + * 1 if *pskb is handled + * note: already called with rcu_read_lock (preempt_disabled) + */ +int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) { - unsigned char *dest; - struct net_bridge_port *p; - - dest = skb->mac.ethernet->h_dest; + struct sk_buff *skb = *pskb; + const unsigned char *dest = skb->mac.ethernet->h_dest; - rcu_read_lock(); - p = skb->dev->br_port; - if (p == NULL || p->state == BR_STATE_DISABLED) + if (p->state == BR_STATE_DISABLED) goto err; if (skb->mac.ethernet->h_source[0] & 1) @@ -128,15 +118,16 @@ if (!dest[5]) { NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, NULL, br_stp_handle_bpdu); - rcu_read_unlock(); - return 0; + return 1; } } else if (p->state == BR_STATE_FORWARDING) { - if (br_should_route_hook && br_should_route_hook(&skb)) { - rcu_read_unlock(); - return -1; + if (br_should_route_hook) { + if (br_should_route_hook(pskb)) + return 0; + skb = *pskb; + dest = skb->mac.ethernet->h_dest; } if (!memcmp(p->br->dev->dev_addr, dest, ETH_ALEN)) @@ -144,12 +135,10 @@ NF_HOOK(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, br_handle_frame_finish); - rcu_read_unlock(); - return 0; + return 1; } err: - rcu_read_unlock(); kfree_skb(skb); - return 0; + return 1; } diff -Nru a/net/bridge/br_private.h b/net/bridge/br_private.h --- a/net/bridge/br_private.h 2004-08-25 14:10:43 -07:00 +++ b/net/bridge/br_private.h 2004-08-25 14:10:43 -07:00 @@ -177,7 +177,7 @@ /* br_input.c */ extern int br_handle_frame_finish(struct sk_buff *skb); -extern int br_handle_frame(struct sk_buff *skb); +extern int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb); /* br_ioctl.c */ extern int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-08-25 14:10:43 -07:00 +++ b/net/core/dev.c 2004-08-25 14:10:43 -07:00 @@ -1682,37 +1682,28 @@ return pt_prev->func(skb, skb->dev, pt_prev); } - #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) -int (*br_handle_frame_hook)(struct sk_buff *skb); +int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); -static __inline__ int handle_bridge(struct sk_buff *skb, - struct packet_type *pt_prev) +static __inline__ int handle_bridge(struct sk_buff **pskb, + struct packet_type **pt_prev, int *ret) { - int ret = NET_RX_DROP; - if (pt_prev) - ret = deliver_skb(skb, pt_prev); + struct net_bridge_port *port; - return ret; -} - -#endif - -static inline int __handle_bridge(struct sk_buff *skb, - struct packet_type **pt_prev, int *ret) -{ -#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) - if (skb->dev->br_port && skb->pkt_type != PACKET_LOOPBACK) { - *ret = handle_bridge(skb, *pt_prev); - if (br_handle_frame_hook(skb) == 0) - return 1; + if ((*pskb)->pkt_type == PACKET_LOOPBACK || + (port = rcu_dereference((*pskb)->dev->br_port)) == NULL) + return 0; + if (*pt_prev) { + *ret = deliver_skb(*pskb, *pt_prev); *pt_prev = NULL; - } -#endif - return 0; + } + + return br_handle_frame_hook(port, pskb); } - +#else +#define handle_bridge(skb, pt_prev, ret) (0) +#endif #ifdef CONFIG_NET_CLS_ACT /* TODO: Maybe we should just force sch_ingress to be compiled in @@ -1817,7 +1808,7 @@ handle_diverter(skb); - if (__handle_bridge(skb, &pt_prev, &ret)) + if (handle_bridge(&skb, &pt_prev, &ret)) goto out; type = skb->protocol; From kddaniel@mouse.private.neotoma.org Wed Aug 25 15:59:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 15:59:21 -0700 (PDT) Received: from mouse.private.neotoma.org (mb5ots81zl12wmnyw16m@216-166-205-190.dsl.mebtel.net [216.166.205.190]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7PMx9ra000754 for ; Wed, 25 Aug 2004 15:59:09 -0700 Received: by mouse.private.neotoma.org (Postfix, from userid 1000) id D43442D001; Wed, 25 Aug 2004 18:59:00 -0400 (EDT) Date: Wed, 25 Aug 2004 18:59:00 -0400 To: Nivedita Singhvi Cc: Christoph Hellwig , Kristine Diana Daniels , 267342@bugs.debian.org, netdev@oss.sgi.com Subject: Re: Bug#267342: kernel-image-2.6.8-1-686-smp: TCP/IP strangeness in 2.6.8 Message-ID: <20040825225900.GA23214@mouse.private.neotoma.org> References: <20040822021929.E9D04212D@maus.private.neotoma.org> <20040825144808.GA10396@lst.de> <412D0152.1040509@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412D0152.1040509@us.ibm.com> User-Agent: Mutt/1.5.6+20040803i From: kddaniel@mouse.private.neotoma.org (Kristine Daniels) X-archive-position: 8084 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kddaniel@mouse.private.neotoma.org Precedence: bulk X-list: netdev On Wed, Aug 25, 2004 at 02:14:58PM -0700, Nivedita Singhvi wrote: > Christoph Hellwig wrote: > >Could it be possible OpenBSD doesn't properly deal with the tcp window > >scaling changes in 2.6.8? (http://lwn.net/Articles/92727/) > > Unless there is present in the path one of those broken > routers (mangling the window scale option), it's likely > something else. Also, nntp traffic tends to be small and > unaffected by window sizes. Any way to tell if that is so? > > Any chance you could make the tcpdumps available, if > this has not already been resolved? Has been temporarily relieved by changing tcp_default_window_size. (Indicated in updates to the debian bug report) TCP dumps are available at http://pakrat.is.an.evilplan.org:5198/267342/ Someone with access to the machine works at IBM. He will drop you a note if you wish to sametime PD instructions. Can also recreate on a non-SMP system if so desired. > > We had a problem with sshd and other apps hanging due > to glibc changes and unsafe signal handling in daemons, > but this seems like something else.. > > thanks, > Nivedita > > > >>I have noticed strangeness with the 2.6.8 kernel on both 686-smp > >>and k7. > >>1) rsync from 2.6.8 to a 2.6.7 host hangs. > >>2) ssh from 2.6.8 to a 2.6.7 host hangs. > >>3) nntp from 2.6.8 hangs for 52 seconds before proceeding. > >>4) ssh from Openbsd to 2.6.8 hangs after SSH2_MSG_KEX_DH_GEX_REQUEST > >> > >>In 1-2 the network topology is as follows > >>2.6.8host <-ethernet-> OpenBSD <-openvpn-> OpenBSD <-ethernet-> 2.6.7host > >>In 3 the network topology is as follows > >>2.6.8host <-ethernet-> OpenBSD <-openvpn-> OpenBSD <-internet-> > >>nntp-server > >>In 4 the network topology is as follows > >>2.6.8host <-ethernet-> OpenBSD > > -- K.D. From davem@redhat.com Wed Aug 25 16:06:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 16:06: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 i7PN64UH001555 for ; Wed, 25 Aug 2004 16:06:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7PN5mS0013922; Wed, 25 Aug 2004 19:05:53 -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 i7PN5m316763; Wed, 25 Aug 2004 19:05:48 -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 i7PN5iXM013189; Wed, 25 Aug 2004 19:05:44 -0400 Date: Wed, 25 Aug 2004 16:05:32 -0700 From: "David S. Miller" To: Nivedita Singhvi Cc: hch@lst.de, kddaniel@private.neotoma.org, 267342@bugs.debian.org, netdev@oss.sgi.com Subject: Re: Bug#267342: kernel-image-2.6.8-1-686-smp: TCP/IP strangeness in 2.6.8 Message-Id: <20040825160532.78235ffd.davem@redhat.com> In-Reply-To: <412D0152.1040509@us.ibm.com> References: <20040822021929.E9D04212D@maus.private.neotoma.org> <20040825144808.GA10396@lst.de> <412D0152.1040509@us.ibm.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: 8085 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 Wed, 25 Aug 2004 14:14:58 -0700 Nivedita Singhvi wrote: > Christoph Hellwig wrote: > > Could it be possible OpenBSD doesn't properly deal with the tcp window > > scaling changes in 2.6.8? (http://lwn.net/Articles/92727/) > > Unless there is present in the path one of those broken > routers (mangling the window scale option), it's likely > something else. It was found to in fact be OpenBSD, this bug has been well known for some time too. See followups made in this thread. From shemminger@osdl.org Wed Aug 25 16:15:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 16:15: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 i7PNFsH3002081 for ; Wed, 25 Aug 2004 16:15:54 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7PNFZ117387; Wed, 25 Aug 2004 16:15:35 -0700 Date: Wed, 25 Aug 2004 16:15:35 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] netem - add correlated random number support Message-Id: <20040825161535.62f07a8c@dell_ss3.pdx.osdl.net> In-Reply-To: <20040825110108.6a79216a@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> <20040825110108.6a79216a@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8086 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 patch adds correlated random number support (really just a sliding average). Like most of this stuff, the concept came from NISTnet. Dave, this applies after "(4/4) netem - change parameters shouldn't destroy child qdisc" but before the patch to add loadable distributions, sorry for the confusion. Signed-off-by: Stephen Hemminger diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-25 16:14:27 -07:00 +++ b/net/sched/sch_netem.c 2004-08-25 16:14:27 -07:00 @@ -63,6 +63,11 @@ u32 gap; u32 jitter; u32 duplicate; + + struct crndstate { + unsigned long last; + unsigned long rho; + } delay_cor, loss_cor, dup_cor; }; /* Time stamp put into socket buffer control block */ @@ -70,6 +75,34 @@ psched_time_t time_to_send; }; +/* init_crandom - initialize correlated random number generator + * Use entropy source for initial seed. + */ +static void init_crandom(struct crndstate *state, unsigned long rho) +{ + state->rho = rho; + state->last = net_random(); +} + +/* get_crandom - correlated random number generator + * Next number depends on last value. + * rho is scaled to avoid floating point. + */ +static unsigned long get_crandom(struct crndstate *state) +{ + u64 value, rho; + unsigned long answer; + + if (state->rho == 0) /* no correllation */ + return net_random(); + + value = net_random(); + rho = (u64)state->rho + 1; + answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; + state->last = answer; + return answer; +} + /* This is the distribution table for the normal distribution produced * with NISTnet tools. * The entries represent a scaled inverse of the cumulative distribution @@ -678,14 +711,14 @@ pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { + if (q->loss && q->loss >= get_crandom(&q->loss_cor)) { pr_debug("netem_enqueue: random loss\n"); sch->stats.drops++; return 0; /* lie about loss so TCP doesn't know */ } /* Random duplication */ - if (q->duplicate && q->duplicate >= net_random()) { + if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) { struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); pr_debug("netem_enqueue: dup %p\n", skb2); @@ -807,6 +840,10 @@ q->loss = qopt->loss; q->duplicate = qopt->duplicate; + init_crandom(&q->delay_cor, qopt->delay_corr); + init_crandom(&q->loss_cor, qopt->loss_corr); + init_crandom(&q->dup_cor, qopt->dup_corr); + return 0; } @@ -872,6 +909,9 @@ qopt.loss = q->loss; qopt.gap = q->gap; qopt.duplicate = q->duplicate; + qopt.delay_corr = q->delay_cor.rho; + qopt.loss_corr = q->loss_cor.rho; + qopt.dup_corr = q->dup_cor.rho; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); From davem@redhat.com Wed Aug 25 16:25:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 16:25: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 i7PNPdiM006076 for ; Wed, 25 Aug 2004 16:25:39 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7PNPTS0017766; Wed, 25 Aug 2004 19:25:29 -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 i7PNPT322527; Wed, 25 Aug 2004 19:25: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 i7PNPPED020106; Wed, 25 Aug 2004 19:25:26 -0400 Date: Wed, 25 Aug 2004 16:25:13 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (1/4) netem - update API for new features Message-Id: <20040825162513.52bdeadf.davem@redhat.com> In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.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: 8087 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 Wed, 25 Aug 2004 10:53:39 -0700 Stephen Hemminger wrote: > Extend netem options to support new features. This breaks all existing tc binaries. We have to stop doing this. Yes, you can extend the structure, but when you do that you have to teach functions like netem_change() how to cope with the old structure layout. From davem@redhat.com Wed Aug 25 16:52:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 16:52:28 -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 i7PNqLAA007076 for ; Wed, 25 Aug 2004 16:52:23 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7PNq0S0023413; Wed, 25 Aug 2004 19:52:00 -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 i7PNpt329039; Wed, 25 Aug 2004 19:51:55 -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 i7PNpp5e027146; Wed, 25 Aug 2004 19:51:52 -0400 Date: Wed, 25 Aug 2004 16:51:39 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: bdschuym@pandora.be, netdev@oss.sgi.com, bridge@osdl.org Subject: Re: [PATCH] fix oops when mangling and brouting and tcpdumping packets (revised) Message-Id: <20040825165139.3fe6caec.davem@redhat.com> In-Reply-To: <20040825141539.08ca19b8@dell_ss3.pdx.osdl.net> References: <20040825141539.08ca19b8@dell_ss3.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: 8088 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 Wed, 25 Aug 2004 14:15:39 -0700 Stephen Hemminger wrote: > The ebtables brouting chain, traversed through the call > br_should_route_hook(), can alter a packet. The redirect target > does this, f.e., to change the MAC destination. > > Bart discovered this and proposed a patch; this is a revised version. > This version cleans up the handle_bridge code in net/core/dev.c as well > as getting rid of extra rcu_read_lock and only does the br_port checking > once. Looks good, applied. From davem@redhat.com Wed Aug 25 16:53:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 16:53: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 i7PNr8Rj007245 for ; Wed, 25 Aug 2004 16:53:08 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7PNqsS0023576; Wed, 25 Aug 2004 19:52:54 -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 i7PNqs329189; Wed, 25 Aug 2004 19:52:54 -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 i7PNqodr027416; Wed, 25 Aug 2004 19:52:50 -0400 Date: Wed, 25 Aug 2004 16:52:38 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] netem - add correlated random number support Message-Id: <20040825165238.6a7c3678.davem@redhat.com> In-Reply-To: <20040825161535.62f07a8c@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> <20040825110108.6a79216a@dell_ss3.pdx.osdl.net> <20040825161535.62f07a8c@dell_ss3.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: 8089 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 Wed, 25 Aug 2004 16:15:35 -0700 Stephen Hemminger wrote: > Dave, this applies after "(4/4) netem - change parameters shouldn't destroy child qdisc" > but before the patch to add loadable distributions, sorry for the confusion. Just making sure you understand that I've rejected that whole patch set because of the netem options structure breakage issue. From jgarzik@pobox.com Wed Aug 25 23:29:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 23:29: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 i7Q6TNQb028480 for ; Wed, 25 Aug 2004 23:29:23 -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 1C0Dl4-0000XC-Kh; Thu, 26 Aug 2004 07:29:14 +0100 Message-ID: <412D832F.2070003@pobox.com> Date: Thu, 26 Aug 2004 02:29:03 -0400 From: Jeff Garzik 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: tgraf@suug.ch, davem@redhat.com CC: Netdev Subject: Re: [NET]: Device mtu/txqlen/ifmap via rtnetlink. References: <200408260506.i7Q56Ebq022683@hera.kernel.org> In-Reply-To: <200408260506.i7Q56Ebq022683@hera.kernel.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8090 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 Linux Kernel Mailing List wrote: > @@ -246,6 +268,30 @@ > > err = -EINVAL; > > + if (ifm->ifi_flags) > + dev_change_flags(dev, ifm->ifi_flags); > + > + if (ida[IFLA_MAP - 1]) { > + if (!dev->set_config) { > + err = -EOPNOTSUPP; > + goto out; > + } > + > + if (!netif_device_present(dev)) { > + err = -ENODEV; > + goto out; > + } > + > + if (ida[IFLA_MAP - 1]->rta_len != RTA_LENGTH(sizeof(struct ifmap))) > + goto out; > + > + err = dev->set_config(dev, (struct ifmap *) > + RTA_DATA(ida[IFLA_MAP - 1])); > + > + if (err) > + goto out; > + } > + Why are new calls to deprecated hook ->set_config() being added? Jeff From davem@redhat.com Wed Aug 25 23:34:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 25 Aug 2004 23:34:16 -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 i7Q6YAks028882 for ; Wed, 25 Aug 2004 23:34:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7Q6XrS0008471; Thu, 26 Aug 2004 02:34:03 -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 i7Q6Xr315531; Thu, 26 Aug 2004 02:33:53 -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 i7Q6XmRC025689; Thu, 26 Aug 2004 02:33:49 -0400 Date: Wed, 25 Aug 2004 23:33:30 -0700 From: "David S. Miller" To: Jeff Garzik Cc: tgraf@suug.ch, netdev@oss.sgi.com Subject: Re: [NET]: Device mtu/txqlen/ifmap via rtnetlink. Message-Id: <20040825233330.15a82d29.davem@redhat.com> In-Reply-To: <412D832F.2070003@pobox.com> References: <200408260506.i7Q56Ebq022683@hera.kernel.org> <412D832F.2070003@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: 8091 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, 26 Aug 2004 02:29:03 -0400 Jeff Garzik wrote: > Why are new calls to deprecated hook ->set_config() being added? Because it's the only way to %100 implement ifconfig using netlink. From okir@suse.de Thu Aug 26 04:35:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 04:36:02 -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 i7QBZr3v017129 for ; Thu, 26 Aug 2004 04:35: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 E4AAEB03F9E; Thu, 26 Aug 2004 13:35:39 +0200 (CEST) Date: Thu, 26 Aug 2004 13:35:39 +0200 From: Olaf Kirch To: netfilter-devel@lists.netfilter.org Cc: netdev@oss.sgi.com Subject: [PATCH] Kernel oops in ip6t_LOG.c:ip6_nexthdr Message-ID: <20040826113538.GE15409@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 8092 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: okir@suse.de Precedence: bulk X-list: netdev --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, We just ran into a kernel oops after enabling ipv6 packet filtering. The machine would choke on the IGMPv6 packets sent out when the interface is taken up. The reason is this code: /*stupid rfc2402 */ case IPPROTO_DSTOPTS: case IPPROTO_ROUTING: case IPPROTO_HOPOPTS: nexthdr = **hdrptr; hdrlen = *hdrptr[1] * 8 + 8; ^^^^^^^^^^ it dies here *hdrptr = *hdrptr + hdrlen; break; hdrptr is a u_int8_t **. What you really want to do here is look at (*hdrptr)[1], but what the expression does is look at *(hdrptr[1]). Unfortunately, hdrptr[1] is usually random garbage. The attached patch fixes this. Olaf -- Olaf Kirch | The Hardware Gods hate me. okir@suse.de | ---------------+ --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=netfilter6-logging Prevent oopses when logging IGMPv6 packets and similar. Index: linux-2.6.5/net/ipv6/netfilter/ip6t_LOG.c =================================================================== --- linux-2.6.5.orig/net/ipv6/netfilter/ip6t_LOG.c +++ linux-2.6.5/net/ipv6/netfilter/ip6t_LOG.c @@ -55,7 +55,7 @@ static u_int8_t ip6_nexthdr(u_int8_t cur repeatedly...with a large stick...no, an even LARGER stick...no, you're still not thinking big enough */ nexthdr = **hdrptr; - hdrlen = *hdrptr[1] * 4 + 8; + hdrlen = (*hdrptr)[1] * 4 + 8; *hdrptr = *hdrptr + hdrlen; break; /*stupid rfc2402 */ @@ -63,7 +63,7 @@ static u_int8_t ip6_nexthdr(u_int8_t cur case IPPROTO_ROUTING: case IPPROTO_HOPOPTS: nexthdr = **hdrptr; - hdrlen = *hdrptr[1] * 8 + 8; + hdrlen = (*hdrptr)[1] * 8 + 8; *hdrptr = *hdrptr + hdrlen; break; case IPPROTO_FRAGMENT: --24zk1gE8NUlDmwG9-- From yoshfuji@wide.ad.jp Thu Aug 26 04:56:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 04:56:11 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7QBu4RE018506 for ; Thu, 26 Aug 2004 04:56:05 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 3A2CC33CE5; Thu, 26 Aug 2004 20:56:46 +0900 (JST) Date: Thu, 26 Aug 2004 20:56:45 +0900 (JST) Message-Id: <20040826.205645.45258047.yoshfuji@wide.ad.jp> To: okir@suse.de, netdev@oss.sgi.com Cc: netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Kernel oops in ip6t_LOG.c:ip6_nexthdr From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040826113538.GE15409@suse.de> References: <20040826113538.GE15409@suse.de> X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 90 22 65 EB 1E CF 3A D1 0B DF 80 D8 48 07 F8 94 E0 62 0E EA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc 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: 8093 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@wide.ad.jp Precedence: bulk X-list: netdev In article <20040826113538.GE15409@suse.de> (at Thu, 26 Aug 2004 13:35:39 +0200), Olaf Kirch says: > hdrlen = *hdrptr[1] * 8 + 8; > ^^^^^^^^^^ it dies here > *hdrptr = *hdrptr + hdrlen; > break; > > hdrptr is a u_int8_t **. What you really want to do here is > look at (*hdrptr)[1], but what the expression does is look at > *(hdrptr[1]). Unfortunately, hdrptr[1] is usually random garbage. Agreed. Same bug also lives in 2.4.x. --yoshfuji From hadi@cyberus.ca Thu Aug 26 05:09:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 05:09:10 -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 i7QC95O1021399 for ; Thu, 26 Aug 2004 05:09:05 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C0J3n-0000GH-71 for netdev@oss.sgi.com; Thu, 26 Aug 2004 08:08:55 -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 1C0J3m-0001nS-6L; Thu, 26 Aug 2004 08:08:54 -0400 Subject: Re: [PATCH 2.6] (1/4) netem - update API for new features From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093522131.1043.84.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 26 Aug 2004 08:08:51 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8094 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 Wed, 2004-08-25 at 13:53, Stephen Hemminger wrote: > Extend netem options to support new features. > > struct tc_netem_qopt > { > __u32 latency; /* added delay (us) */ > @@ -409,6 +410,13 @@ > __u32 loss; /* random packet loss (0=none ~0=100%) */ > __u32 gap; /* re-ordering gap (0 for delay all) */ > __u32 duplicate; /* random packet dup (0=none ~0=100%) */ > - __u32 jitter; /* random jitter in latency (us) */ > + __u32 jitter; /* delay sigma (us) */ > + > + __u32 delay_corr; /* delay correllation (0=none ~0=100%) */ > + __u32 loss_corr; /* packet loss correllation (0=none ~0=100%) */ > + __u32 dup_corr; /* duplicate correlation (0=none ~0=100%) */ > + > + __s16 delay_dist[0]; /* delay distribution table (optional) */ > +#define TCA_NETEM_TABLEFACTOR 8192 > }; You should really send the delay_dist in its own TLV to avoid the kind of mistakes that showed up in u32 classifier. Also allows you to extend that structure in the future. cheers, jamal PS:- kudos on moving that stuff to user space. From shemminger@osdl.org Thu Aug 26 09:17:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 09:17: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 i7QGHeBm005613 for ; Thu, 26 Aug 2004 09:17:40 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7QGGo113622; Thu, 26 Aug 2004 09:16:50 -0700 Date: Thu, 26 Aug 2004 09:16:49 -0700 From: Stephen Hemminger To: hadi@cyberus.ca Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] (1/4) netem - update API for new features Message-Id: <20040826091649.26d6cd72@dell_ss3.pdx.osdl.net> In-Reply-To: <1093522131.1043.84.camel@jzny.localdomain> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> <1093522131.1043.84.camel@jzny.localdomain> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8095 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 26 Aug 2004 08:08:51 -0400 jamal wrote: > On Wed, 2004-08-25 at 13:53, Stephen Hemminger wrote: > > Extend netem options to support new features. > > > > > struct tc_netem_qopt > > { > > __u32 latency; /* added delay (us) */ > > @@ -409,6 +410,13 @@ > > __u32 loss; /* random packet loss (0=none ~0=100%) */ > > __u32 gap; /* re-ordering gap (0 for delay all) */ > > __u32 duplicate; /* random packet dup (0=none ~0=100%) */ > > - __u32 jitter; /* random jitter in latency (us) */ > > + __u32 jitter; /* delay sigma (us) */ > > + > > + __u32 delay_corr; /* delay correllation (0=none ~0=100%) */ > > + __u32 loss_corr; /* packet loss correllation (0=none ~0=100%) */ > > + __u32 dup_corr; /* duplicate correlation (0=none ~0=100%) */ > > + > > + __s16 delay_dist[0]; /* delay distribution table (optional) */ > > +#define TCA_NETEM_TABLEFACTOR 8192 > > }; > > You should really send the delay_dist in its own TLV to avoid > the kind of mistakes that showed up in u32 classifier. > Also allows you to extend that structure in the future. > > cheers, > jamal It would be good but the whole qdisc api (init, change) is really structured around a single TLV. From jurriaan@rivierenland.xs4all.nl Thu Aug 26 09:46:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 09:46:48 -0700 (PDT) Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7QGkgId009813 for ; Thu, 26 Aug 2004 09:46:43 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr1.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7QGkXHa010495 for ; Thu, 26 Aug 2004 18:46:34 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 31172 invoked from network); 26 Aug 2004 16:46:16 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 26 Aug 2004 16:46:16 -0000 Received: (qmail 14571 invoked by uid 1000); 26 Aug 2004 16:46:10 -0000 Date: Thu, 26 Aug 2004 18:46:10 +0200 From: Jurriaan To: "David S. Miller" Cc: Patrick McHardy , herbert@gondor.apana.org.au, nuno.silva@vgertech.com, linux-kernel@vger.kernel.org, master@sectorb.msk.ru, netdev@oss.sgi.com Subject: Re: 2.6.8-rc4-bk1 problem: unregister_netdevice: waiting for ppp0 to become free. Usage count = 1 Message-ID: <20040826164610.GA11790@middle.of.nowhere> Reply-To: Jurriaan References: <4128941D.9030000@trash.net> <20040822214746.1efb3682.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822214746.1efb3682.davem@redhat.com> X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040803i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 8096 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev From: David S. Miller Date: Sun, Aug 22, 2004 at 09:47:46PM -0700 > On Sun, 22 Aug 2004 14:39:57 +0200 > Patrick McHardy wrote: > > > Herbert Xu wrote: > > > > >Nuno Silva wrote: > > > > > >OK, this appears to be due to the changeset titled > > > > > >[PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callback > > > > > >It adds a reference to dev. > > > > > >I don't see any code that cleans up that reference when the dev goes > > >down. So someone needs to add that similar to the code in net/core/dst.c. > > > > > >Patrick, could you please have a look at this? > > > > > The reference is dropped in __qdisc_destroy. The problem lies in the CBQ > > qdisc, it doesn't destroy the root-class and leaks the inner qdisc. These > > two patches for 2.4 and 2.6 fix the problem. > > Awesome, good detective work guys. > > Patch applied, thanks. I get the same error with 2.6.9-rc1-mm1, but now for my ipv6-over-ipv4 tunnel. unregister_netdevice: waiting for xs6all to become free etc. when trying to reboot or shutdown. Usage count = 1 I'm pretty sure I didn't see this in 2.6.8.1 nor in 2.6.8.1-mm1. This is a plain ipv6-over-ipv4 tunnel like this: /etc/network/interfaces: auto xs6all iface xs6all inet6 v4tunnel endpoint xxx.xxx.xxx.xxx up ip route add 2000::0/3 via xxx:xxx:xxx:xxx:xxx:xxx address xxx:xxx:xxx:xxx:xxx:xxx netmask 64 up ip tunnel change xs6all ttl 64 I'm running Debian Unstable with all the latest updates as of today. Thanks for any hints, Jurriaan -- "At least she's on our side," said Lindholm. Corbie looked at him. "Investigators aren't on anybody's side." Simon R Green - Hellworld Debian (Unstable) GNU/Linux 2.6.9-rc1 2x6078 bogomips load 0.46 From hadi@cyberus.ca Thu Aug 26 10:55:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 10:55:52 -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 i7QHtkgi012536 for ; Thu, 26 Aug 2004 10:55:47 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C0OTJ-0007lB-Bf for netdev@oss.sgi.com; Thu, 26 Aug 2004 13:55:37 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1C0OTG-000871-Aj; Thu, 26 Aug 2004 13:55:34 -0400 Subject: RE: [PATCH] abysmal e1000 performance (DITR) From: jamal Reply-To: hadi@cyberus.ca To: "Venkatesan, Ganesh" Cc: tharbaugh@lnxi.com, netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" In-Reply-To: <468F3FDA28AA87429AD807992E22D07E014CEF36@orsmsx408> References: <468F3FDA28AA87429AD807992E22D07E014CEF36@orsmsx408> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093542930.1027.124.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 26 Aug 2004 13:55:30 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8097 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 Ganesh, Can you please make this feature off by default and perhaps accesible via ethtool for peopel who want to turn it on. I just wasted a few hours and was bitten by this performance-wise. Please consider disabling it. cheers, jamal On Fri, 2004-06-04 at 11:44, Venkatesan, Ganesh wrote: > Thayne: > > We are studying the patch and will get back to you once we have a plan > to integrate it into the driver. > > Thanks, > ganesh > > ------------------------------------------------- > Ganesh Venkatesan > Network/Storage Division, Hillsboro, OR > > -----Original Message----- > From: Thayne Harbaugh [mailto:tharbaugh@lnxi.com] > Sent: Friday, June 04, 2004 7:20 AM > To: netdev@oss.sgi.com > Cc: Venkatesan, Ganesh; Feldman, Scott; Brandeburg, Jesse > Subject: Re: [PATCH] abysmal e1000 performance (DITR) > > I have documented a serious performance problem with DITR in the e1000 > driver. I have sent a patch to the netdev list as well as CC'ed various > people at Intel. There has been very little response. I am wondering > who has reviewed the DITR performance problem and what the plans are for > fixing it. From hadi@cyberus.ca Thu Aug 26 11:14:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 11:14:18 -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 i7QIEB8Z013314 for ; Thu, 26 Aug 2004 11:14:11 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C0Ol8-0000a6-Di for netdev@oss.sgi.com; Thu, 26 Aug 2004 14:14:02 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1C0Ol7-00028F-3e; Thu, 26 Aug 2004 14:14:01 -0400 Subject: Re: [PATCH 2.6] (1/4) netem - update API for new features From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20040826091649.26d6cd72@dell_ss3.pdx.osdl.net> References: <20040825105339.30210e84@dell_ss3.pdx.osdl.net> <1093522131.1043.84.camel@jzny.localdomain> <20040826091649.26d6cd72@dell_ss3.pdx.osdl.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093544037.1027.130.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 26 Aug 2004 14:13:57 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8098 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 Thu, 2004-08-26 at 12:16, Stephen Hemminger wrote: > On 26 Aug 2004 08:08:51 -0400 > jamal wrote: [..] > > > > You should really send the delay_dist in its own TLV to avoid > > the kind of mistakes that showed up in u32 classifier. > > Also allows you to extend that structure in the future. > > > > cheers, > > jamal > > It would be good but the whole qdisc api (init, change) is really structured > around a single TLV. Just pass nested attributes. The API is fine. cheers, jamal From shemminger@osdl.org Thu Aug 26 13:07:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 13:07: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 i7QK7Msl020817 for ; Thu, 26 Aug 2004 13:07:24 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7QK73104390; Thu, 26 Aug 2004 13:07:03 -0700 Date: Thu, 26 Aug 2004 13:07:02 -0700 From: Stephen Hemminger To: "David S. Miller" , John Heffner Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] automatically compute tcp_default_win_scale Message-Id: <20040826130702.2d421680@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8099 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 patch gets rid of the tcp_default_win_scale sysctl and instead computes the optimum maximum window scale. It just means one less thing to have to tune. I also moved the code out of the inline because it gets called three places and isn't in the critical path. As a side effect, it will cause a smaller window scale for many people since the default tcp_rmem fits in a win_scale of 2. This is allows for finer grain windows (good), but may mask some of the problems with bad implementations we have already seen (bad). Signed-off-by: Stephen Hemminger diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2004-08-26 13:03:22 -07:00 +++ b/include/net/tcp.h 2004-08-26 13:03:22 -07:00 @@ -611,7 +611,6 @@ extern int sysctl_tcp_bic; extern int sysctl_tcp_bic_fast_convergence; extern int sysctl_tcp_bic_low_window; -extern int sysctl_tcp_default_win_scale; extern int sysctl_tcp_moderate_rcvbuf; extern atomic_t tcp_memory_allocated; @@ -1690,68 +1689,10 @@ *ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_WINDOW << 16) | (TCPOLEN_WINDOW << 8) | (wscale)); } -/* Determine a window scaling and initial window to offer. - * Based on the assumption that the given amount of space - * will be offered. Store the results in the tp structure. - * NOTE: for smooth operation initial space offering should - * be a multiple of mss if possible. We assume here that mss >= 1. - * This MUST be enforced by all callers. - */ -static inline void tcp_select_initial_window(int __space, __u32 mss, - __u32 *rcv_wnd, - __u32 *window_clamp, - int wscale_ok, - __u8 *rcv_wscale) -{ - unsigned int space = (__space < 0 ? 0 : __space); - - /* If no clamp set the clamp to the max possible scaled window */ - if (*window_clamp == 0) - (*window_clamp) = (65535 << 14); - space = min(*window_clamp, space); - - /* Quantize space offering to a multiple of mss if possible. */ - if (space > mss) - space = (space / mss) * mss; - - /* NOTE: offering an initial window larger than 32767 - * will break some buggy TCP stacks. We try to be nice. - * If we are not window scaling, then this truncates - * our initial window offering to 32k. There should also - * be a sysctl option to stop being nice. - */ - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - (*rcv_wscale) = 0; - if (wscale_ok) { - /* See RFC1323 for an explanation of the limit to 14 */ - while (space > 65535 && (*rcv_wscale) < 14) { - space >>= 1; - (*rcv_wscale)++; - } - if (*rcv_wscale && sysctl_tcp_app_win && space>=mss && - space - max((space>>sysctl_tcp_app_win), mss>>*rcv_wscale) < 65536/2) - (*rcv_wscale)--; - - *rcv_wscale = max((__u8)sysctl_tcp_default_win_scale, - *rcv_wscale); - } - - /* Set initial window to value enough for senders, - * following RFC1414. Senders, not following this RFC, - * will be satisfied with 2. - */ - if (mss > (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; - } - /* Set the clamp no higher than max representable value */ - (*window_clamp) = min(65535U << (*rcv_wscale), *window_clamp); -} +/* Determine a window scaling and initial window to offer. */ +extern void tcp_select_initial_window(int __space, __u32 mss, + __u32 *rcv_wnd, __u32 *window_clamp, + int wscale_ok, __u8 *rcv_wscale); static inline int tcp_win_from_space(int space) { @@ -1761,13 +1702,13 @@ } /* Note: caller must be prepared to deal with negative returns */ -static inline int tcp_space(struct sock *sk) +static inline int tcp_space(const struct sock *sk) { return tcp_win_from_space(sk->sk_rcvbuf - atomic_read(&sk->sk_rmem_alloc)); } -static inline int tcp_full_space( struct sock *sk) +static inline int tcp_full_space(const struct sock *sk) { return tcp_win_from_space(sk->sk_rcvbuf); } diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c --- a/net/ipv4/sysctl_net_ipv4.c 2004-08-26 13:03:22 -07:00 +++ b/net/ipv4/sysctl_net_ipv4.c 2004-08-26 13:03:22 -07:00 @@ -667,14 +667,6 @@ .proc_handler = &proc_dointvec, }, { - .ctl_name = NET_TCP_DEFAULT_WIN_SCALE, - .procname = "tcp_default_win_scale", - .data = &sysctl_tcp_default_win_scale, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { .ctl_name = NET_TCP_MODERATE_RCVBUF, .procname = "tcp_moderate_rcvbuf", .data = &sysctl_tcp_moderate_rcvbuf, diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c 2004-08-26 13:03:22 -07:00 +++ b/net/ipv4/tcp.c 2004-08-26 13:03:22 -07:00 @@ -276,8 +276,6 @@ atomic_t tcp_orphan_count = ATOMIC_INIT(0); -int sysctl_tcp_default_win_scale = 7; - int sysctl_tcp_mem[3]; int sysctl_tcp_wmem[3] = { 4 * 1024, 16 * 1024, 128 * 1024 }; int sysctl_tcp_rmem[3] = { 4 * 1024, 87380, 87380 * 2 }; diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-08-26 13:03:22 -07:00 +++ b/net/ipv4/tcp_output.c 2004-08-26 13:03:22 -07:00 @@ -143,6 +143,65 @@ tcp_clear_xmit_timer(sk, TCP_TIME_DACK); } +/* Determine a window scaling and initial window to offer. + * Based on the assumption that the given amount of space + * will be offered. Store the results in the tp structure. + * NOTE: for smooth operation initial space offering should + * be a multiple of mss if possible. We assume here that mss >= 1. + * This MUST be enforced by all callers. + */ +void tcp_select_initial_window(int __space, __u32 mss, + __u32 *rcv_wnd, __u32 *window_clamp, + int wscale_ok, __u8 *rcv_wscale) +{ + unsigned int space = (__space < 0 ? 0 : __space); + + /* If no clamp set the clamp to the max possible scaled window */ + if (*window_clamp == 0) + (*window_clamp) = (65535 << 14); + space = min(*window_clamp, space); + + /* Quantize space offering to a multiple of mss if possible. */ + if (space > mss) + space = (space / mss) * mss; + + /* NOTE: offering an initial window larger than 32767 + * will break some buggy TCP stacks. We try to be nice. + * If we are not window scaling, then this truncates + * our initial window offering to 32k. There should also + * be a sysctl option to stop being nice. + */ + (*rcv_wnd) = min(space, MAX_TCP_WINDOW); + (*rcv_wscale) = 0; + if (wscale_ok) { + /* Set window scaling on max possible window + * See RFC1323 for an explanation of the limit to 14 + */ + space = max_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max); + while (space > 65535 && (*rcv_wscale) < 14) { + space >>= 1; + (*rcv_wscale)++; + } + } + + /* Set initial window to value enough for senders, + * following RFC1414. Senders, not following this RFC, + * will be satisfied with 2. + */ + if (mss > (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; + } + + /* Set the clamp no higher than max representable value */ + (*window_clamp) = min(65535U << (*rcv_wscale), *window_clamp); +} + /* Chose a new window to advertise, update state in tcp_opt for the * socket, and return result with RFC1323 scaling applied. The return * value can be stuffed directly into th->window for an outgoing From tharbaugh@lnxi.com Thu Aug 26 13:21:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 13:21:48 -0700 (PDT) Received: from ash.lnxi.com (208.177.141.226.ptr.us.xo.net [208.177.141.226]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7QKLf0L021664 for ; Thu, 26 Aug 2004 13:21:41 -0700 Received: (qmail 18897 invoked from network); 26 Aug 2004 20:25:04 -0000 Received: from tubarao.lnxi.com (HELO ?192.168.15.106?) (192.168.15.106) by ash.lnxi.com with SMTP; 26 Aug 2004 20:25:04 -0000 Subject: RE: [PATCH] abysmal e1000 performance (DITR) From: Thayne Harbaugh Reply-To: tharbaugh@lnxi.com To: hadi@cyberus.ca Cc: "Venkatesan, Ganesh" , netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" In-Reply-To: <1093542930.1027.124.camel@jzny.localdomain> References: <468F3FDA28AA87429AD807992E22D07E014CEF36@orsmsx408> <1093542930.1027.124.camel@jzny.localdomain> Content-Type: text/plain Organization: Linux Networx Date: Thu, 26 Aug 2004 14:04:04 -0600 Message-Id: <1093550644.20769.130.camel@tubarao> Mime-Version: 1.0 X-Mailer: Evolution 1.5.92.2 (1.5.92.2-2) Content-Transfer-Encoding: 7bit X-archive-position: 8100 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tharbaugh@lnxi.com Precedence: bulk X-list: netdev On Thu, 2004-08-26 at 13:55 -0400, jamal wrote: > Ganesh, > > Can you please make this feature off by default and perhaps > accesible via ethtool for peopel who want to turn it on. > I just wasted a few hours and was bitten by this performance-wise. > Please consider disabling it. This is a *horrible* problem. Even though it's fixable by passing a module parameter, the default bites those that *know* about it. We have had customers bitten by this and customers that have insisted in swapping all the NICs in a cluster to Broadcom TG3 NICs. It's a black eye for Intel and a loss of business - that's the opinion of our customers. > cheers, > jamal > > On Fri, 2004-06-04 at 11:44, Venkatesan, Ganesh wrote: > > Thayne: > > > > We are studying the patch and will get back to you once we have a plan > > to integrate it into the driver. > > > > Thanks, > > ganesh > > > > ------------------------------------------------- > > Ganesh Venkatesan > > Network/Storage Division, Hillsboro, OR > > > > -----Original Message----- > > From: Thayne Harbaugh [mailto:tharbaugh@lnxi.com] > > Sent: Friday, June 04, 2004 7:20 AM > > To: netdev@oss.sgi.com > > Cc: Venkatesan, Ganesh; Feldman, Scott; Brandeburg, Jesse > > Subject: Re: [PATCH] abysmal e1000 performance (DITR) > > > > I have documented a serious performance problem with DITR in the e1000 > > driver. I have sent a patch to the netdev list as well as CC'ed various > > people at Intel. There has been very little response. I am wondering > > who has reviewed the DITR performance problem and what the plans are for > > fixing it. > From jgarzik@pobox.com Thu Aug 26 13:27:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 13:27: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 i7QKR9Ks022108 for ; Thu, 26 Aug 2004 13:27: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 1C0Qpn-0007G2-A6; Thu, 26 Aug 2004 21:26:59 +0100 Message-ID: <412E478A.2000806@pobox.com> Date: Thu, 26 Aug 2004 16:26:50 -0400 From: Jeff Garzik 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: tharbaugh@lnxi.com CC: hadi@cyberus.ca, "Venkatesan, Ganesh" , netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" Subject: Re: [PATCH] abysmal e1000 performance (DITR) References: <468F3FDA28AA87429AD807992E22D07E014CEF36@orsmsx408> <1093542930.1027.124.camel@jzny.localdomain> <1093550644.20769.130.camel@tubarao> In-Reply-To: <1093550644.20769.130.camel@tubarao> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8101 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 Thayne Harbaugh wrote: > On Thu, 2004-08-26 at 13:55 -0400, jamal wrote: > >>Ganesh, >> >>Can you please make this feature off by default and perhaps >>accesible via ethtool for peopel who want to turn it on. >>I just wasted a few hours and was bitten by this performance-wise. >>Please consider disabling it. > > > This is a *horrible* problem. Even though it's fixable by passing a > module parameter, the default bites those that *know* about it. We have > had customers bitten by this and customers that have insisted in > swapping all the NICs in a cluster to Broadcom TG3 NICs. > > It's a black eye for Intel and a loss of business - that's the opinion > of our customers. If it's so bad we should disable it by default, either via the module parameter or via a kernel CONFIG_xxx option. Jeff From akpm@osdl.org Thu Aug 26 13:47:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 13:47: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 i7QKleHH022957 for ; Thu, 26 Aug 2004 13:47:40 -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 i7QKlR113193; Thu, 26 Aug 2004 13:47:27 -0700 Date: Thu, 26 Aug 2004 13:45:43 -0700 From: Andrew Morton To: netdev@oss.sgi.com Cc: "David S. Miller" Subject: Fw: [Bugme-new] [Bug 3278] New: Missing include statements Message-Id: <20040826134543.344f5c9d.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: 8102 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, 26 Aug 2004 05:55:52 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3278] New: Missing include statements http://bugme.osdl.org/show_bug.cgi?id=3278 Summary: Missing include statements Kernel Version: 2.6.9-rc1 Status: NEW Severity: normal Owner: laforge@gnumonks.org Submitter: brix@gimp.org Distribution: Gentoo Linux Hardware Environment: IBM ThinkPad X31 Software Environment: Linux sponge 2.6.8.1 #7 Wed Aug 25 22:37:20 CEST 2004 i686 Intel(R) Pentium(R) M processor 1300MHz GenuineIntel GNU/Linux Gnu C 3.3.3 Gnu make 3.80 binutils 2.14.90.0.8 util-linux 2.12 mount 2.12 module-init-tools 3.0 e2fsprogs 1.35 pcmcia-cs 3.2.5 PPP 2.4.1 nfs-utils 1.0.6 Linux C Library 2.3.3 Dynamic linker (ldd) 2.3.3 Procps 3.1.15 Net-tools 1.60 Kbd 1.12 Sh-utils 5.2.1 Modules Loaded arc4 ieee80211_crypt_wep crc32 usbhid eth1394 ds ipw2100 firmware_class ieee80211 ieee80211_crypt ohci1394 ieee1394 yenta_socket pcmcia_core snd_intel8x0m snd_intel8x0 snd_ac97_codec snd_mpu401_uart snd_rawmidi snd_pcm_oss snd_pcm snd_page_alloc snd_timer snd_mixer_oss snd soundcore ibm_acpi Problem Description: The following files, perhaps more, should #include or symbols like NF_IP_PRE_ROUTING will be unknown. net/ipv4/netfilter/ip_conntrack_proto_tcp.c net/ipv4/netfilter/ip_conntrack_proto_udp.c net/ipv4/netfilter/ip_conntrack_proto_icmp.c Steps to reproduce: Enable netfilter connection tracking and compile. ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From davem@redhat.com Thu Aug 26 14:00:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 14:00:07 -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 i7QL00ex023945 for ; Thu, 26 Aug 2004 14:00:01 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7QKxlS0009669; Thu, 26 Aug 2004 16:59:47 -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 i7QKxl313876; Thu, 26 Aug 2004 16:59:47 -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 i7QKxgK7030389; Thu, 26 Aug 2004 16:59:43 -0400 Date: Thu, 26 Aug 2004 13:59:46 -0700 From: "David S. Miller" To: Andrew Morton Cc: netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3278] New: Missing include statements Message-Id: <20040826135946.3e7373b3.davem@redhat.com> In-Reply-To: <20040826134543.344f5c9d.akpm@osdl.org> References: <20040826134543.344f5c9d.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: 8103 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 This was fixed 2 days ago :-) # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/24 11:23:53-07:00 lkml@felipe-alfaro.com # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # Signed-off-by: Felipe Alfaro Solana # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_proto_udp.c # 2004/08/24 11:23:03-07:00 lkml@felipe-alfaro.com +1 -0 # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # net/ipv4/netfilter/ip_conntrack_proto_tcp.c # 2004/08/24 11:23:03-07:00 lkml@felipe-alfaro.com +1 -0 # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # net/ipv4/netfilter/ip_conntrack_proto_icmp.c # 2004/08/24 11:23:03-07:00 lkml@felipe-alfaro.com +1 -0 # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2004-08-26 13:43:32 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2004-08-26 13:43:32 -07:00 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2004-08-26 13:43:32 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2004-08-26 13:43:32 -07:00 @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2004-08-26 13:43:32 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2004-08-26 13:43:32 -07:00 @@ -14,6 +14,7 @@ #include #include #include +#include #include unsigned long ip_ct_udp_timeout = 30*HZ; From davem@redhat.com Thu Aug 26 14:10:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 14:10: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 i7QLAGmR024627 for ; Thu, 26 Aug 2004 14:10:16 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7QLA5S0012238; Thu, 26 Aug 2004 17:10:05 -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 i7QLA4316982; Thu, 26 Aug 2004 17:10:04 -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 i7QLA0U1002051; Thu, 26 Aug 2004 17:10:00 -0400 Date: Thu, 26 Aug 2004 14:10:03 -0700 From: "David S. Miller" To: Olaf Kirch Cc: netfilter-devel@lists.netfilter.org, netdev@oss.sgi.com Subject: Re: [PATCH] Kernel oops in ip6t_LOG.c:ip6_nexthdr Message-Id: <20040826141003.40229433.davem@redhat.com> In-Reply-To: <20040826113538.GE15409@suse.de> References: <20040826113538.GE15409@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: 8104 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, 26 Aug 2004 13:35:39 +0200 Olaf Kirch wrote: > hdrptr is a u_int8_t **. What you really want to do here is > look at (*hdrptr)[1], but what the expression does is look at > *(hdrptr[1]). Unfortunately, hdrptr[1] is usually random garbage. Good catch, patch applied (to 2.4.x too). Thanks Olaf. From davem@redhat.com Thu Aug 26 14:12:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 14:12:17 -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 i7QLCDTE024915 for ; Thu, 26 Aug 2004 14:12:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7QLC3S0012781; Thu, 26 Aug 2004 17:12:03 -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 i7QLC3317577; Thu, 26 Aug 2004 17:12:03 -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 i7QLBw1F003263; Thu, 26 Aug 2004 17:11:59 -0400 Date: Thu, 26 Aug 2004 14:12:01 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: jheffner@psc.edu, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] automatically compute tcp_default_win_scale Message-Id: <20040826141201.290cfbbd.davem@redhat.com> In-Reply-To: <20040826130702.2d421680@dell_ss3.pdx.osdl.net> References: <20040826130702.2d421680@dell_ss3.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: 8105 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 Ok, I capitulate, in it goes :-) Thanks for following up on this Stephen. From tharbaugh@lnxi.com Thu Aug 26 14:46:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 26 Aug 2004 14:46:40 -0700 (PDT) Received: from ash.lnxi.com (208.177.141.226.ptr.us.xo.net [208.177.141.226]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7QLkXRC026297 for ; Thu, 26 Aug 2004 14:46:34 -0700 Received: (qmail 25897 invoked from network); 26 Aug 2004 21:49:58 -0000 Received: from tubarao.lnxi.com (HELO ?192.168.15.106?) (192.168.15.106) by ash.lnxi.com with SMTP; 26 Aug 2004 21:49:58 -0000 Subject: Re: [PATCH] abysmal e1000 performance (DITR) From: Thayne Harbaugh Reply-To: tharbaugh@lnxi.com To: Jeff Garzik Cc: hadi@cyberus.ca, "Venkatesan, Ganesh" , netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" In-Reply-To: <412E478A.2000806@pobox.com> References: <468F3FDA28AA87429AD807992E22D07E014CEF36@orsmsx408> <1093542930.1027.124.camel@jzny.localdomain> <1093550644.20769.130.camel@tubarao> <412E478A.2000806@pobox.com> Content-Type: text/plain Organization: Linux Networx Date: Thu, 26 Aug 2004 15:28:57 -0600 Message-Id: <1093555737.20769.135.camel@tubarao> Mime-Version: 1.0 X-Mailer: Evolution 1.5.92.2 (1.5.92.2-2) Content-Transfer-Encoding: 7bit X-archive-position: 8106 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tharbaugh@lnxi.com Precedence: bulk X-list: netdev On Thu, 2004-08-26 at 16:26 -0400, Jeff Garzik wrote: > Thayne Harbaugh wrote: > > On Thu, 2004-08-26 at 13:55 -0400, jamal wrote: > > > >>Ganesh, > >> > >>Can you please make this feature off by default and perhaps > >>accesible via ethtool for peopel who want to turn it on. > >>I just wasted a few hours and was bitten by this performance-wise. > >>Please consider disabling it. > > > > > > This is a *horrible* problem. Even though it's fixable by passing a > > module parameter, the default bites those that *know* about it. We have > > had customers bitten by this and customers that have insisted in > > swapping all the NICs in a cluster to Broadcom TG3 NICs. > > > > It's a black eye for Intel and a loss of business - that's the opinion > > of our customers. > > > If it's so bad we should disable it by default, either via the module > parameter or via a kernel CONFIG_xxx option. Yes, it is so bad. The dynamic interrupt setting should be deprecated by the use of NAPI. This is a simple way to disable it, yet still keep the code so that someone can enable it if they really wanted it. I, however, would just as soon see all of the DITR code ripped out. There are other ways that might be better for dealing with it, yet still keeping the DITR code viable. --- drivers/net/e1000/e1000_param.c.broken_ditr 2004-08-26 15:40:34.436456736 -0600 +++ drivers/net/e1000/e1000_param.c 2004-08-26 15:49:07.186506880 -0600 @@ -212,7 +212,7 @@ #define MAX_TXABSDELAY 0xFFFF #define MIN_TXABSDELAY 0 -#define DEFAULT_ITR 1 +#define DEFAULT_ITR 8000 #define MAX_ITR 100000 #define MIN_ITR 100 From kaber@trash.net Fri Aug 27 06:00:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 06:00:18 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7RD09dj006454 for ; Fri, 27 Aug 2004 06:00:10 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id D653419F33C; Fri, 27 Aug 2004 14:59:56 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 4386D3941F6; Fri, 27 Aug 2004 14:59:56 +0200 (CEST) Message-ID: <412F304B.7080804@trash.net> Date: Fri, 27 Aug 2004 14:59:55 +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]: Remove duplicate declarations from netlink.h Content-Type: multipart/mixed; boundary="------------010607040205020002070909" X-archive-position: 8107 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 This is a multi-part message in MIME format. --------------010607040205020002070909 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch removes some duplicate delarations from netlink.h. --------------010607040205020002070909 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/08/27 14:35:59+02:00 kaber@coreworks.de # [NETLINK]: Remove duplicate declarations # # Signed-off-by: Patrick McHardy # # include/linux/netlink.h # 2004/08/27 14:35:21+02:00 kaber@coreworks.de +0 -7 # [NETLINK]: Remove duplicate declarations # diff -Nru a/include/linux/netlink.h b/include/linux/netlink.h --- a/include/linux/netlink.h 2004-08-27 14:46:19 +02:00 +++ b/include/linux/netlink.h 2004-08-27 14:46:19 +02:00 @@ -134,13 +134,6 @@ void netlink_detachskb(struct sock *sk, struct sk_buff *skb); int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); -/* finegrained unicast helpers: */ -struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid); -struct sock *netlink_getsockbyfilp(struct file *filp); -int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo); -void netlink_detachskb(struct sock *sk, struct sk_buff *skb); -int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); - /* * skb should fit one page. This choice is good for headerless malloc. * --------------010607040205020002070909-- From jdmason@us.ibm.com Fri Aug 27 08:10:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 08:10:36 -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 i7RFAOVp029102 for ; Fri, 27 Aug 2004 08:10:30 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e32.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7RF9pmL688594; Fri, 27 Aug 2004 11:09:51 -0400 Received: from dreadnought.austin.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7RF9krK412096; Fri, 27 Aug 2004 09:09:50 -0600 From: Jon Mason Organization: IBM To: Francois Romieu Subject: Re: [DESC 2.6.8.1-mm4] r8169 patches Date: Fri, 27 Aug 2004 10:09:40 -0500 User-Agent: KMail/1.6.2 Cc: jgarzik@pobox.com, akpm@osdl.org, netdev@oss.sgi.com References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> In-Reply-To: <20040823224100.GA14680@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: <200408271009.41099.jdmason@us.ltcfwd.linux.ibm.com> X-archive-position: 8108 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 I've been running the driver with all of the new patchs on my AMD64 system for over 36 hours without any problems. I have Rx/TX checksumming enabled, but have not tried the VLAN changes. On Monday 23 August 2004 05:41 pm, Francois Romieu wrote: > Here comes a new serie of r8169 related patches which should allow > the motivated users to experiment new features, namely: > - Rx/Tx checksum offload; > - vlan support; > - better ethtool integration. > > Tx code apart, the changes exhibit some strong similarity with the > 8139cp driver. > > I have not done vlan-dedicated test and there are no figures to highlight > any performance improvement. The code does not crash in a (really slow) > debug enabled -mm kernel and it does not seem to add huge leak. > > Remarks/comments/test reports welcome. > > -- > Ueimor -- Jon Mason jdmason@us.ibm.com From yoshfuji@linux-ipv6.org Fri Aug 27 09:14:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 09:14:17 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7RGE8F4002133 for ; Fri, 27 Aug 2004 09:14:11 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 9C12733CE5; Sat, 28 Aug 2004 01:14:51 +0900 (JST) Date: Sat, 28 Aug 2004 01:14:51 +0900 (JST) Message-Id: <20040828.011451.79815651.yoshfuji@linux-ipv6.org> To: davem@redhat.com, laforge@gnumonks.org Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [PATCH/RFC] remove include/linux/netflinter_ipv6/ip6t_REJECT.h 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: 8109 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. There're no users of include/linux/netflinter_ipv6/ip6t_REJECT.h, which contains wrong, useless definitions. Yes, I know ip6t_REJECT.c lives in patch-o-matic, but it (almost) completely replaces ip6t_REJECT.h; which implies that ip6t_REJECT.h is useless at all. So, how about removing ip6t_REJECT.h for now? Of course, introducing appropriate ip6t_REJECT.c and ip6t_REJECT.h is the alternate option. :-) Thanks. Signed-off-by: Hideaki YOSHIFUJI --yoshfuji ChangeSet@1.1841, 2004-08-28 00:46:02+09:00, yoshfuji@linux-ipv6.org [NETFILTER] remove unused file. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/include/linux/netfilter_ipv6/ip6t_REJECT.h b/include/linux/netfilter_ipv6/ip6t_REJECT.h --- a/include/linux/netfilter_ipv6/ip6t_REJECT.h 2004-08-28 00:47:03 +09:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,16 +0,0 @@ -#ifndef _IP6T_REJECT_H -#define _IP6T_REJECT_H - -enum ip6t_reject_with { - IP6T_ICMP_NET_UNREACHABLE, - IP6T_ICMP_HOST_UNREACHABLE, - IP6T_ICMP_PROT_UNREACHABLE, - IP6T_ICMP_PORT_UNREACHABLE, - IP6T_ICMP_ECHOREPLY -}; - -struct ip6t_reject_info { - enum ip6t_reject_with with; /* reject type */ -}; - -#endif /*_IPT_REJECT_H*/ -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From yoshfuji@linux-ipv6.org Fri Aug 27 09:48:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 09:49:00 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7RGmrSC003474 for ; Fri, 27 Aug 2004 09:48:53 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 4C40633CE5; Sat, 28 Aug 2004 01:49:36 +0900 (JST) Date: Sat, 28 Aug 2004 01:49:35 +0900 (JST) Message-Id: <20040828.014935.131415609.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org, kazunori@miyazawa.org, yoshfuji@linux-ipv6.org Subject: [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: <20040801195135.16734846.davem@redhat.com> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040801195135.16734846.davem@redhat.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: 8110 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. In article <20040801195135.16734846.davem@redhat.com> (at Sun, 1 Aug 2004 19:51:35 -0700), "David S. Miller" says: > On Fri, 30 Jul 2004 17:12:05 +0900 > Kazunori Miyazawa wrote: > > > I consider copying flowi(fl_rt) uses too much stack at the moment. > > I'll re-send the fixed patch again. > > I agree, and let's defer this patch until we > resolve that. > > It is simple to fix, I think. Here's the updated patch. From: Kazunori Miyazawa (Because Miyazawa-san is very busy now, I'm sending this patch as the proxy of him.) Please pull from Thank you. DIFFSTAT -------- datagram.c | 13 +++++++++++- ip6_output.c | 4 --- raw.c | 11 +++++++++- tcp_ipv6.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- udp.c | 11 +++++++++- 5 files changed, 91 insertions(+), 10 deletions(-) CHANGESET --------- ChangeSet@1.1841, 2004-08-28 01:35:09+09:00, kazunori@miyazawa.org [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. This patch extracts xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. This is because xfrm_lookup() should be performed with the final destination while ip6_dst_lookup() is called with the next-hop. Signed-off-by: Kazunori Miyazawa Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv6/datagram.c b/net/ipv6/datagram.c --- a/net/ipv6/datagram.c 2004-08-28 01:36:43 +09:00 +++ b/net/ipv6/datagram.c 2004-08-28 01:36:43 +09:00 @@ -38,7 +38,7 @@ struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr; struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); - struct in6_addr *daddr; + struct in6_addr *daddr, *final_p = NULL, final; struct dst_entry *dst; struct flowi fl; struct ip6_flowlabel *flowlabel = NULL; @@ -157,16 +157,27 @@ if (flowlabel) { if (flowlabel->opt && flowlabel->opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) flowlabel->opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } } else 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; } err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto out; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + dst_release(dst); + goto out; + } /* source address lookup done in ip6_dst_lookup */ diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c --- a/net/ipv6/ip6_output.c 2004-08-28 01:36:43 +09:00 +++ b/net/ipv6/ip6_output.c 2004-08-28 01:36:43 +09:00 @@ -796,10 +796,6 @@ goto out_err_release; } } - if ((err = xfrm_lookup(dst, fl, sk, 0)) < 0) { - err = -ENETUNREACH; - goto out_err_release; - } return 0; diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c --- a/net/ipv6/raw.c 2004-08-28 01:36:43 +09:00 +++ b/net/ipv6/raw.c 2004-08-28 01:36:43 +09:00 @@ -606,7 +606,7 @@ { struct ipv6_txoptions opt_space; struct sockaddr_in6 * sin6 = (struct sockaddr_in6 *) msg->msg_name; - struct in6_addr *daddr; + struct in6_addr *daddr, *final_p = NULL, final; struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct raw6_opt *raw_opt = raw6_sk(sk); @@ -729,7 +729,9 @@ /* merge ip6_build_xmit from ip6_output */ if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) @@ -738,6 +740,13 @@ err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto out; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + dst_release(dst); + goto out; + } if (hlimit < 0) { if (ipv6_addr_is_multicast(&fl.fl6_dst)) diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2004-08-28 01:36:43 +09:00 +++ b/net/ipv6/tcp_ipv6.c 2004-08-28 01:36:43 +09:00 @@ -549,7 +549,7 @@ struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct tcp_opt *tp = tcp_sk(sk); - struct in6_addr *saddr = NULL; + struct in6_addr *saddr = NULL, *final_p = NULL, final; struct flowi fl; struct dst_entry *dst; int addr_type; @@ -666,13 +666,21 @@ 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; } err = ip6_dst_lookup(sk, &dst, &fl); - if (err) goto failure; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + dst_release(dst); + goto failure; + } if (saddr == NULL) { saddr = &fl.fl6_src; @@ -793,6 +801,12 @@ sk->sk_err_soft = -err; goto out; } + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + sk->sk_err_soft = -err; + goto out; + } + } else dst_hold(dst); @@ -863,6 +877,7 @@ struct ipv6_pinfo *np = inet6_sk(sk); struct sk_buff * skb; struct ipv6_txoptions *opt = NULL; + struct in6_addr * final_p = NULL, final; struct flowi fl; int err = -1; @@ -888,12 +903,18 @@ if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto done; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) + goto done; } skb = tcp_make_synack(sk, dst, req); @@ -1021,6 +1042,12 @@ /* sk = NULL, but it is safe for now. RST socket required. */ if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { + + if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0) { + dst_release(buff->dst); + return; + } + ip6_xmit(NULL, buff, &fl, NULL, 0); TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); TCP_INC_STATS_BH(TCP_MIB_OUTRSTS); @@ -1082,6 +1109,10 @@ fl.fl_ip_sport = t1->source; if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { + if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0) { + dst_release(buff->dst); + return; + } ip6_xmit(NULL, buff, &fl, NULL, 0); TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); return; @@ -1313,6 +1344,7 @@ } if (dst == NULL) { + struct in6_addr *final_p = NULL, final; struct flowi fl; memset(&fl, 0, sizeof(fl)); @@ -1320,7 +1352,9 @@ ipv6_addr_copy(&fl.fl6_dst, &req->af.v6_req.rmt_addr); if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } ipv6_addr_copy(&fl.fl6_src, &req->af.v6_req.loc_addr); fl.oif = sk->sk_bound_dev_if; @@ -1329,6 +1363,12 @@ if (ip6_dst_lookup(sk, &dst, &fl)) goto out; + + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((xfrm_lookup(&dst, &fl, sk, 0)) < 0) + goto out; } newsk = tcp_create_openreq_child(sk, req, skb); @@ -1710,6 +1750,7 @@ if (dst == NULL) { struct inet_opt *inet = inet_sk(sk); + struct in6_addr *final_p = NULL, final; struct flowi fl; memset(&fl, 0, sizeof(fl)); @@ -1723,15 +1764,24 @@ 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; } err = ip6_dst_lookup(sk, &dst, &fl); - if (err) { sk->sk_route_caps = 0; return err; } + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + sk->sk_err_soft = -err; + dst_release(dst); + return err; + } ip6_dst_store(sk, dst, NULL); sk->sk_route_caps = dst->dev->features & @@ -1772,6 +1822,12 @@ if (err) { sk->sk_err_soft = -err; + return err; + } + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + sk->sk_route_caps = 0; + dst_release(dst); return err; } diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c --- a/net/ipv6/udp.c 2004-08-28 01:36:43 +09:00 +++ b/net/ipv6/udp.c 2004-08-28 01:36:43 +09:00 @@ -627,7 +627,7 @@ struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name; - struct in6_addr *daddr; + struct in6_addr *daddr, *final_p = NULL, final; struct ipv6_txoptions *opt = NULL; struct ip6_flowlabel *flowlabel = NULL; struct flowi *fl = &inet->cork.fl; @@ -783,7 +783,9 @@ /* merge ip6_build_xmit from ip6_output */ if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl->fl6_dst); ipv6_addr_copy(&fl->fl6_dst, rt0->addr); + final_p = &final; } if (!fl->oif && ipv6_addr_is_multicast(&fl->fl6_dst)) @@ -792,6 +794,13 @@ err = ip6_dst_lookup(sk, &dst, fl); if (err) goto out; + if (final_p) + ipv6_addr_copy(&fl->fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, fl, sk, 0)) < 0) { + dst_release(dst); + goto out; + } if (hlimit < 0) { if (ipv6_addr_is_multicast(&fl->fl6_dst)) -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From shemminger@osdl.org Fri Aug 27 12:18:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 12:18: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 i7RJILfU008768 for ; Fri, 27 Aug 2004 12:18:21 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7RJHq102887; Fri, 27 Aug 2004 12:17:52 -0700 Date: Fri, 27 Aug 2004 12:17:52 -0700 From: Stephen Hemminger To: "David S. Miller" , Jamal Hadi Salim Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] netem update Message-Id: <20040827121752.6b7fdf82@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8111 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 is a third revision of the netem extensions which provides * packet duplication * correlated random number * loading distribution table The API is backwards compatible and now uses nested elements to allow for easier future changes. diff -urN -X dontdiff linux-2.6/include/linux/pkt_sched.h netem-2.6/include/linux/pkt_sched.h --- linux-2.6/include/linux/pkt_sched.h 2004-07-12 08:05:35.000000000 -0700 +++ netem-2.6/include/linux/pkt_sched.h 2004-08-27 09:31:29.000000000 -0700 @@ -402,6 +402,16 @@ #define TCA_ATM_MAX TCA_ATM_STATE /* Network emulator */ + +enum +{ + TCA_NETEM_UNSPEC, + TCA_NETEM_CORR, + TCA_NETEM_DELAY_DIST, +}; + +#define TCA_NETEM_MAX TCA_NETEM_DELAY_DIST + struct tc_netem_qopt { __u32 latency; /* added delay (us) */ @@ -411,4 +421,19 @@ __u32 duplicate; /* random packet dup (0=none ~0=100%) */ __u32 jitter; /* random jitter in latency (us) */ }; + +struct tc_netem_corr +{ + __u32 delay_corr; /* delay correlation */ + __u32 loss_corr; /* packet loss correlation */ + __u32 dup_corr; /* duplicate correlation */ +}; + +struct tc_netem_dist +{ + __u32 size; /* table size */ + __u32 factor; /* table scaling factor */ + __s16 data[0]; /* distribution table values */ +}; + #endif diff -urN -X dontdiff linux-2.6/net/sched/sch_netem.c netem-2.6/net/sched/sch_netem.c --- linux-2.6/net/sched/sch_netem.c 2004-08-09 08:51:37.000000000 -0700 +++ netem-2.6/net/sched/sch_netem.c 2004-08-27 12:05:09.254998768 -0700 @@ -6,6 +6,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Many of the algorithms and ideas for this came from + * NIST Net which is not copyrighted. + * * Authors: Stephen Hemminger * Catalin(ux aka Dino) BOIE */ @@ -22,11 +25,31 @@ #include -/* Network emulator - * - * This scheduler can alters spacing and order - * Similar to NISTnet and BSD Dummynet. - */ +/* Network Emulation Queuing algorithm. + ==================================== + + Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based + Network Emulation Tool + [2] Luigi Rizzo, DummyNet for FreeBSD + + ---------------------------------------------------------------- + + This started out as a simple way to delay outgoing packets to + test TCP but has grown to include most of the functionality + of a full blown network emulator like NISTnet. It can delay + packets and add random jitter (and correlation). The random + distribution can be loaded from a table as well to provide + normal, Pareto, or experimental curves. Packet loss, + duplication, and reordering can also be emulated. + + This qdisc does not do classification that can be handled in + layering other disciplines. It does not need to do bandwidth + control either since that can be handled by using token + bucket or other rate control. + + The simulator is limited by the Linux timer resolution + and will create packet bursts on the HZ boundary (1ms). +*/ struct netem_sched_data { struct Qdisc *qdisc; @@ -39,6 +62,18 @@ u32 counter; u32 gap; u32 jitter; + u32 duplicate; + + struct crndstate { + unsigned long last; + unsigned long rho; + } delay_cor, loss_cor, dup_cor; + + struct disttable { + u32 size; + u32 factor; + s16 table[0]; + } *delay_dist; }; /* Time stamp put into socket buffer control block */ @@ -46,576 +81,113 @@ psched_time_t time_to_send; }; -/* This is the distribution table for the normal distribution produced - * with NISTnet tools. - * The entries represent a scaled inverse of the cumulative distribution - * function. +/* init_crandom - initialize correlated random number generator + * Use entropy source for initial seed. + */ +static void init_crandom(struct crndstate *state, unsigned long rho) +{ + state->rho = rho; + state->last = net_random(); +} + +/* get_crandom - correlated random number generator + * Next number depends on last value. + * rho is scaled to avoid floating point. */ -#define TABLESIZE 2048 -#define TABLEFACTOR 8192 +static unsigned long get_crandom(struct crndstate *state) +{ + u64 value, rho; + unsigned long answer; -static const short disttable[TABLESIZE] = { - -31473, -26739, -25226, -24269, - -23560, -22993, -22518, -22109, - -21749, -21426, -21133, -20865, - -20618, -20389, -20174, -19972, - -19782, -19601, -19430, -19267, - -19112, -18962, -18819, -18681, - -18549, -18421, -18298, -18178, - -18062, -17950, -17841, -17735, - -17632, -17532, -17434, -17339, - -17245, -17155, -17066, -16979, - -16894, -16811, -16729, -16649, - -16571, -16494, -16419, -16345, - -16272, -16201, -16130, -16061, - -15993, -15926, -15861, -15796, - -15732, -15669, -15607, -15546, - -15486, -15426, -15368, -15310, - -15253, -15196, -15140, -15086, - -15031, -14977, -14925, -14872, - -14821, -14769, -14719, -14669, - -14619, -14570, -14522, -14473, - -14426, -14379, -14332, -14286, - -14241, -14196, -14150, -14106, - -14062, -14019, -13976, -13933, - -13890, -13848, -13807, -13765, - -13724, -13684, -13643, -13604, - -13564, -13525, -13486, -13447, - -13408, -13370, -13332, -13295, - -13258, -13221, -13184, -13147, - -13111, -13075, -13040, -13004, - -12969, -12934, -12899, -12865, - -12830, -12796, -12762, -12729, - -12695, -12662, -12629, -12596, - -12564, -12531, -12499, -12467, - -12435, -12404, -12372, -12341, - -12310, -12279, -12248, -12218, - -12187, -12157, -12127, -12097, - -12067, -12038, -12008, -11979, - -11950, -11921, -11892, -11863, - -11835, -11806, -11778, -11750, - -11722, -11694, -11666, -11639, - -11611, -11584, -11557, -11530, - -11503, -11476, -11450, -11423, - -11396, -11370, -11344, -11318, - -11292, -11266, -11240, -11214, - -11189, -11164, -11138, -11113, - -11088, -11063, -11038, -11013, - -10988, -10964, -10939, -10915, - -10891, -10866, -10843, -10818, - -10794, -10770, -10747, -10723, - -10700, -10676, -10652, -10630, - -10606, -10583, -10560, -10537, - -10514, -10491, -10469, -10446, - -10424, -10401, -10378, -10356, - -10334, -10312, -10290, -10267, - -10246, -10224, -10202, -10180, - -10158, -10137, -10115, -10094, - -10072, -10051, -10030, -10009, - -9988, -9967, -9945, -9925, - -9904, -9883, -9862, -9842, - -9821, -9800, -9780, -9760, - -9739, -9719, -9699, -9678, - -9658, -9638, -9618, -9599, - -9578, -9559, -9539, -9519, - -9499, -9480, -9461, -9441, - -9422, -9402, -9383, -9363, - -9344, -9325, -9306, -9287, - -9268, -9249, -9230, -9211, - -9192, -9173, -9155, -9136, - -9117, -9098, -9080, -9062, - -9043, -9025, -9006, -8988, - -8970, -8951, -8933, -8915, - -8897, -8879, -8861, -8843, - -8825, -8807, -8789, -8772, - -8754, -8736, -8718, -8701, - -8683, -8665, -8648, -8630, - -8613, -8595, -8578, -8561, - -8543, -8526, -8509, -8492, - -8475, -8458, -8441, -8423, - -8407, -8390, -8373, -8356, - -8339, -8322, -8305, -8289, - -8272, -8255, -8239, -8222, - -8206, -8189, -8172, -8156, - -8140, -8123, -8107, -8090, - -8074, -8058, -8042, -8025, - -8009, -7993, -7977, -7961, - -7945, -7929, -7913, -7897, - -7881, -7865, -7849, -7833, - -7817, -7802, -7786, -7770, - -7754, -7739, -7723, -7707, - -7692, -7676, -7661, -7645, - -7630, -7614, -7599, -7583, - -7568, -7553, -7537, -7522, - -7507, -7492, -7476, -7461, - -7446, -7431, -7416, -7401, - -7385, -7370, -7356, -7340, - -7325, -7311, -7296, -7281, - -7266, -7251, -7236, -7221, - -7207, -7192, -7177, -7162, - -7148, -7133, -7118, -7104, - -7089, -7075, -7060, -7046, - -7031, -7016, -7002, -6988, - -6973, -6959, -6944, -6930, - -6916, -6901, -6887, -6873, - -6859, -6844, -6830, -6816, - -6802, -6788, -6774, -6760, - -6746, -6731, -6717, -6704, - -6690, -6675, -6661, -6647, - -6633, -6620, -6606, -6592, - -6578, -6564, -6550, -6537, - -6523, -6509, -6495, -6482, - -6468, -6454, -6441, -6427, - -6413, -6400, -6386, -6373, - -6359, -6346, -6332, -6318, - -6305, -6291, -6278, -6264, - -6251, -6238, -6224, -6211, - -6198, -6184, -6171, -6158, - -6144, -6131, -6118, -6105, - -6091, -6078, -6065, -6052, - -6039, -6025, -6012, -5999, - -5986, -5973, -5960, -5947, - -5934, -5921, -5908, -5895, - -5882, -5869, -5856, -5843, - -5830, -5817, -5804, -5791, - -5779, -5766, -5753, -5740, - -5727, -5714, -5702, -5689, - -5676, -5663, -5650, -5638, - -5625, -5612, -5600, -5587, - -5575, -5562, -5549, -5537, - -5524, -5512, -5499, -5486, - -5474, -5461, -5449, -5436, - -5424, -5411, -5399, -5386, - -5374, -5362, -5349, -5337, - -5324, -5312, -5299, -5287, - -5275, -5263, -5250, -5238, - -5226, -5213, -5201, -5189, - -5177, -5164, -5152, -5140, - -5128, -5115, -5103, -5091, - -5079, -5067, -5055, -5043, - -5030, -5018, -5006, -4994, - -4982, -4970, -4958, -4946, - -4934, -4922, -4910, -4898, - -4886, -4874, -4862, -4850, - -4838, -4826, -4814, -4803, - -4791, -4778, -4767, -4755, - -4743, -4731, -4719, -4708, - -4696, -4684, -4672, -4660, - -4649, -4637, -4625, -4613, - -4601, -4590, -4578, -4566, - -4554, -4543, -4531, -4520, - -4508, -4496, -4484, -4473, - -4461, -4449, -4438, -4427, - -4415, -4403, -4392, -4380, - -4368, -4357, -4345, -4334, - -4322, -4311, -4299, -4288, - -4276, -4265, -4253, -4242, - -4230, -4219, -4207, -4196, - -4184, -4173, -4162, -4150, - -4139, -4128, -4116, -4105, - -4094, -4082, -4071, -4060, - -4048, -4037, -4026, -4014, - -4003, -3992, -3980, -3969, - -3958, -3946, -3935, -3924, - -3913, -3901, -3890, -3879, - -3868, -3857, -3845, -3834, - -3823, -3812, -3801, -3790, - -3779, -3767, -3756, -3745, - -3734, -3723, -3712, -3700, - -3689, -3678, -3667, -3656, - -3645, -3634, -3623, -3612, - -3601, -3590, -3579, -3568, - -3557, -3545, -3535, -3524, - -3513, -3502, -3491, -3480, - -3469, -3458, -3447, -3436, - -3425, -3414, -3403, -3392, - -3381, -3370, -3360, -3348, - -3337, -3327, -3316, -3305, - -3294, -3283, -3272, -3262, - -3251, -3240, -3229, -3218, - -3207, -3197, -3185, -3175, - -3164, -3153, -3142, -3132, - -3121, -3110, -3099, -3088, - -3078, -3067, -3056, -3045, - -3035, -3024, -3013, -3003, - -2992, -2981, -2970, -2960, - -2949, -2938, -2928, -2917, - -2906, -2895, -2885, -2874, - -2864, -2853, -2842, -2832, - -2821, -2810, -2800, -2789, - -2778, -2768, -2757, -2747, - -2736, -2725, -2715, -2704, - -2694, -2683, -2673, -2662, - -2651, -2641, -2630, -2620, - -2609, -2599, -2588, -2578, - -2567, -2556, -2546, -2535, - -2525, -2515, -2504, -2493, - -2483, -2472, -2462, -2451, - -2441, -2431, -2420, -2410, - -2399, -2389, -2378, -2367, - -2357, -2347, -2336, -2326, - -2315, -2305, -2295, -2284, - -2274, -2263, -2253, -2243, - -2232, -2222, -2211, -2201, - -2191, -2180, -2170, -2159, - -2149, -2139, -2128, -2118, - -2107, -2097, -2087, -2076, - -2066, -2056, -2046, -2035, - -2025, -2014, -2004, -1994, - -1983, -1973, -1963, -1953, - -1942, -1932, -1921, -1911, - -1901, -1891, -1880, -1870, - -1860, -1849, -1839, -1829, - -1819, -1808, -1798, -1788, - -1778, -1767, -1757, -1747, - -1736, -1726, -1716, -1706, - -1695, -1685, -1675, -1665, - -1654, -1644, -1634, -1624, - -1613, -1603, -1593, -1583, - -1573, -1563, -1552, -1542, - -1532, -1522, -1511, -1501, - -1491, -1481, -1471, -1461, - -1450, -1440, -1430, -1420, - -1409, -1400, -1389, -1379, - -1369, -1359, -1348, -1339, - -1328, -1318, -1308, -1298, - -1288, -1278, -1267, -1257, - -1247, -1237, -1227, -1217, - -1207, -1196, -1186, -1176, - -1166, -1156, -1146, -1135, - -1126, -1115, -1105, -1095, - -1085, -1075, -1065, -1055, - -1044, -1034, -1024, -1014, - -1004, -994, -984, -974, - -964, -954, -944, -933, - -923, -913, -903, -893, - -883, -873, -863, -853, - -843, -833, -822, -812, - -802, -792, -782, -772, - -762, -752, -742, -732, - -722, -712, -702, -691, - -682, -671, -662, -651, - -641, -631, -621, -611, - -601, -591, -581, -571, - -561, -551, -541, -531, - -521, -511, -501, -491, - -480, -471, -460, -451, - -440, -430, -420, -410, - -400, -390, -380, -370, - -360, -350, -340, -330, - -320, -310, -300, -290, - -280, -270, -260, -250, - -240, -230, -220, -210, - -199, -190, -179, -170, - -159, -150, -139, -129, - -119, -109, -99, -89, - -79, -69, -59, -49, - -39, -29, -19, -9, - 1, 11, 21, 31, - 41, 51, 61, 71, - 81, 91, 101, 111, - 121, 131, 141, 152, - 161, 172, 181, 192, - 202, 212, 222, 232, - 242, 252, 262, 272, - 282, 292, 302, 312, - 322, 332, 342, 352, - 362, 372, 382, 392, - 402, 412, 422, 433, - 442, 453, 462, 473, - 483, 493, 503, 513, - 523, 533, 543, 553, - 563, 573, 583, 593, - 603, 613, 623, 633, - 643, 653, 664, 673, - 684, 694, 704, 714, - 724, 734, 744, 754, - 764, 774, 784, 794, - 804, 815, 825, 835, - 845, 855, 865, 875, - 885, 895, 905, 915, - 925, 936, 946, 956, - 966, 976, 986, 996, - 1006, 1016, 1026, 1037, - 1047, 1057, 1067, 1077, - 1087, 1097, 1107, 1117, - 1128, 1138, 1148, 1158, - 1168, 1178, 1188, 1198, - 1209, 1219, 1229, 1239, - 1249, 1259, 1269, 1280, - 1290, 1300, 1310, 1320, - 1330, 1341, 1351, 1361, - 1371, 1381, 1391, 1402, - 1412, 1422, 1432, 1442, - 1452, 1463, 1473, 1483, - 1493, 1503, 1513, 1524, - 1534, 1544, 1554, 1565, - 1575, 1585, 1595, 1606, - 1616, 1626, 1636, 1647, - 1656, 1667, 1677, 1687, - 1697, 1708, 1718, 1729, - 1739, 1749, 1759, 1769, - 1780, 1790, 1800, 1810, - 1821, 1831, 1841, 1851, - 1862, 1872, 1883, 1893, - 1903, 1913, 1923, 1934, - 1944, 1955, 1965, 1975, - 1985, 1996, 2006, 2016, - 2027, 2037, 2048, 2058, - 2068, 2079, 2089, 2099, - 2110, 2120, 2130, 2141, - 2151, 2161, 2172, 2182, - 2193, 2203, 2213, 2224, - 2234, 2245, 2255, 2265, - 2276, 2286, 2297, 2307, - 2318, 2328, 2338, 2349, - 2359, 2370, 2380, 2391, - 2401, 2412, 2422, 2433, - 2443, 2454, 2464, 2475, - 2485, 2496, 2506, 2517, - 2527, 2537, 2548, 2559, - 2569, 2580, 2590, 2601, - 2612, 2622, 2632, 2643, - 2654, 2664, 2675, 2685, - 2696, 2707, 2717, 2728, - 2738, 2749, 2759, 2770, - 2781, 2791, 2802, 2813, - 2823, 2834, 2845, 2855, - 2866, 2877, 2887, 2898, - 2909, 2919, 2930, 2941, - 2951, 2962, 2973, 2984, - 2994, 3005, 3015, 3027, - 3037, 3048, 3058, 3069, - 3080, 3091, 3101, 3113, - 3123, 3134, 3145, 3156, - 3166, 3177, 3188, 3199, - 3210, 3220, 3231, 3242, - 3253, 3264, 3275, 3285, - 3296, 3307, 3318, 3329, - 3340, 3351, 3362, 3373, - 3384, 3394, 3405, 3416, - 3427, 3438, 3449, 3460, - 3471, 3482, 3493, 3504, - 3515, 3526, 3537, 3548, - 3559, 3570, 3581, 3592, - 3603, 3614, 3625, 3636, - 3647, 3659, 3670, 3681, - 3692, 3703, 3714, 3725, - 3736, 3747, 3758, 3770, - 3781, 3792, 3803, 3814, - 3825, 3837, 3848, 3859, - 3870, 3881, 3893, 3904, - 3915, 3926, 3937, 3949, - 3960, 3971, 3983, 3994, - 4005, 4017, 4028, 4039, - 4051, 4062, 4073, 4085, - 4096, 4107, 4119, 4130, - 4141, 4153, 4164, 4175, - 4187, 4198, 4210, 4221, - 4233, 4244, 4256, 4267, - 4279, 4290, 4302, 4313, - 4325, 4336, 4348, 4359, - 4371, 4382, 4394, 4406, - 4417, 4429, 4440, 4452, - 4464, 4475, 4487, 4499, - 4510, 4522, 4533, 4545, - 4557, 4569, 4581, 4592, - 4604, 4616, 4627, 4639, - 4651, 4663, 4674, 4686, - 4698, 4710, 4722, 4734, - 4746, 4758, 4769, 4781, - 4793, 4805, 4817, 4829, - 4841, 4853, 4865, 4877, - 4889, 4900, 4913, 4925, - 4936, 4949, 4961, 4973, - 4985, 4997, 5009, 5021, - 5033, 5045, 5057, 5070, - 5081, 5094, 5106, 5118, - 5130, 5143, 5155, 5167, - 5179, 5191, 5204, 5216, - 5228, 5240, 5253, 5265, - 5278, 5290, 5302, 5315, - 5327, 5340, 5352, 5364, - 5377, 5389, 5401, 5414, - 5426, 5439, 5451, 5464, - 5476, 5489, 5502, 5514, - 5527, 5539, 5552, 5564, - 5577, 5590, 5603, 5615, - 5628, 5641, 5653, 5666, - 5679, 5691, 5704, 5717, - 5730, 5743, 5756, 5768, - 5781, 5794, 5807, 5820, - 5833, 5846, 5859, 5872, - 5885, 5897, 5911, 5924, - 5937, 5950, 5963, 5976, - 5989, 6002, 6015, 6028, - 6042, 6055, 6068, 6081, - 6094, 6108, 6121, 6134, - 6147, 6160, 6174, 6187, - 6201, 6214, 6227, 6241, - 6254, 6267, 6281, 6294, - 6308, 6321, 6335, 6348, - 6362, 6375, 6389, 6403, - 6416, 6430, 6443, 6457, - 6471, 6485, 6498, 6512, - 6526, 6540, 6554, 6567, - 6581, 6595, 6609, 6623, - 6637, 6651, 6665, 6679, - 6692, 6706, 6721, 6735, - 6749, 6763, 6777, 6791, - 6805, 6819, 6833, 6848, - 6862, 6876, 6890, 6905, - 6919, 6933, 6948, 6962, - 6976, 6991, 7005, 7020, - 7034, 7049, 7064, 7078, - 7093, 7107, 7122, 7136, - 7151, 7166, 7180, 7195, - 7210, 7225, 7240, 7254, - 7269, 7284, 7299, 7314, - 7329, 7344, 7359, 7374, - 7389, 7404, 7419, 7434, - 7449, 7465, 7480, 7495, - 7510, 7526, 7541, 7556, - 7571, 7587, 7602, 7618, - 7633, 7648, 7664, 7680, - 7695, 7711, 7726, 7742, - 7758, 7773, 7789, 7805, - 7821, 7836, 7852, 7868, - 7884, 7900, 7916, 7932, - 7948, 7964, 7981, 7997, - 8013, 8029, 8045, 8061, - 8078, 8094, 8110, 8127, - 8143, 8160, 8176, 8193, - 8209, 8226, 8242, 8259, - 8276, 8292, 8309, 8326, - 8343, 8360, 8377, 8394, - 8410, 8428, 8444, 8462, - 8479, 8496, 8513, 8530, - 8548, 8565, 8582, 8600, - 8617, 8634, 8652, 8670, - 8687, 8704, 8722, 8740, - 8758, 8775, 8793, 8811, - 8829, 8847, 8865, 8883, - 8901, 8919, 8937, 8955, - 8974, 8992, 9010, 9029, - 9047, 9066, 9084, 9103, - 9121, 9140, 9159, 9177, - 9196, 9215, 9234, 9253, - 9272, 9291, 9310, 9329, - 9349, 9368, 9387, 9406, - 9426, 9445, 9465, 9484, - 9504, 9524, 9544, 9563, - 9583, 9603, 9623, 9643, - 9663, 9683, 9703, 9723, - 9744, 9764, 9785, 9805, - 9826, 9846, 9867, 9888, - 9909, 9930, 9950, 9971, - 9993, 10013, 10035, 10056, - 10077, 10099, 10120, 10142, - 10163, 10185, 10207, 10229, - 10251, 10273, 10294, 10317, - 10339, 10361, 10384, 10406, - 10428, 10451, 10474, 10496, - 10519, 10542, 10565, 10588, - 10612, 10635, 10658, 10682, - 10705, 10729, 10752, 10776, - 10800, 10824, 10848, 10872, - 10896, 10921, 10945, 10969, - 10994, 11019, 11044, 11069, - 11094, 11119, 11144, 11169, - 11195, 11221, 11246, 11272, - 11298, 11324, 11350, 11376, - 11402, 11429, 11456, 11482, - 11509, 11536, 11563, 11590, - 11618, 11645, 11673, 11701, - 11728, 11756, 11785, 11813, - 11842, 11870, 11899, 11928, - 11957, 11986, 12015, 12045, - 12074, 12104, 12134, 12164, - 12194, 12225, 12255, 12286, - 12317, 12348, 12380, 12411, - 12443, 12475, 12507, 12539, - 12571, 12604, 12637, 12670, - 12703, 12737, 12771, 12804, - 12839, 12873, 12907, 12942, - 12977, 13013, 13048, 13084, - 13120, 13156, 13192, 13229, - 13267, 13304, 13341, 13379, - 13418, 13456, 13495, 13534, - 13573, 13613, 13653, 13693, - 13734, 13775, 13817, 13858, - 13901, 13943, 13986, 14029, - 14073, 14117, 14162, 14206, - 14252, 14297, 14343, 14390, - 14437, 14485, 14533, 14582, - 14631, 14680, 14731, 14782, - 14833, 14885, 14937, 14991, - 15044, 15099, 15154, 15210, - 15266, 15324, 15382, 15441, - 15500, 15561, 15622, 15684, - 15747, 15811, 15877, 15943, - 16010, 16078, 16148, 16218, - 16290, 16363, 16437, 16513, - 16590, 16669, 16749, 16831, - 16915, 17000, 17088, 17177, - 17268, 17362, 17458, 17556, - 17657, 17761, 17868, 17977, - 18090, 18207, 18328, 18452, - 18581, 18715, 18854, 18998, - 19149, 19307, 19472, 19645, - 19828, 20021, 20226, 20444, - 20678, 20930, 21204, 21503, - 21835, 22206, 22630, 23124, - 23721, 24478, 25529, 27316, -}; + if (state->rho == 0) /* no correllation */ + return net_random(); + + value = net_random(); + rho = (u64)state->rho + 1; + answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; + state->last = answer; + return answer; +} /* tabledist - return a pseudo-randomly distributed value with mean mu and * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static inline int tabledist(int mu, int sigma) +static unsigned long tabledist(int mu, int sigma, + struct crndstate *state, + const struct disttable *dist) { - int x; - int index; - int sigmamod, sigmadiv; + int t, x, factor; + unsigned long rnd; if (sigma == 0) return mu; - index = (net_random() & (TABLESIZE-1)); - sigmamod = sigma%TABLEFACTOR; - sigmadiv = sigma/TABLEFACTOR; - x = sigmamod*disttable[index]; + rnd = get_crandom(state); + + /* default uniform distribution */ + if (dist == NULL) + return (rnd % (2*sigma)) - sigma + mu; + + factor = dist->factor; + t = dist->table[rnd % dist->size]; + x = (sigma % factor) * t; if (x >= 0) - x += TABLEFACTOR/2; + x += factor/2; else - x -= TABLEFACTOR/2; + x -= factor/2; - x /= TABLEFACTOR; - x += sigmadiv*disttable[index]; - x += mu; - return x; + return (x + (sigma / factor) * t) / factor + mu; } -/* Enqueue packets with underlying discipline (fifo) - * but mark them with current time first. - */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +/* Put skb in the private delayed queue. */ +static int delay_skb(struct Qdisc *sch, struct sk_buff *skb) { struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; - long delay; + + PSCHED_GET_TIME(now); + PSCHED_TADD2(now, tabledist(q->latency, q->jitter, + &q->delay_cor, q->delay_dist), + 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->stats.bytes += skb->len; + sch->stats.packets++; + return NET_XMIT_SUCCESS; + } + + sch->stats.drops++; + kfree_skb(skb); + return NET_XMIT_DROP; +} + +static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct netem_sched_data *q = qdisc_priv(sch); pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { + if (q->loss && q->loss >= get_crandom(&q->loss_cor)) { + pr_debug("netem_enqueue: random loss\n"); sch->stats.drops++; return 0; /* lie about loss so TCP doesn't know */ } + /* Random duplication */ + if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) { + struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); + + pr_debug("netem_enqueue: dup %p\n", skb2); + if (skb2) + delay_skb(sch, skb2); + } /* If doing simple delay then gap == 0 so all packets * go into the delayed holding queue @@ -633,27 +205,8 @@ } q->counter = 0; - - PSCHED_GET_TIME(now); - if (q->jitter) - delay = tabledist(q->latency, q->jitter); - else - delay = q->latency; - PSCHED_TADD2(now, delay, 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->stats.bytes += skb->len; - sch->stats.packets++; - return 0; - } - - sch->stats.drops++; - kfree_skb(skb); - return NET_XMIT_DROP; + return delay_skb(sch, skb); } /* Requeue packets but don't change time stamp */ @@ -752,39 +305,94 @@ return ret; } -static int netem_change(struct Qdisc *sch, struct rtattr *opt) +static int get_dist_table(struct Qdisc *sch, const struct rtattr *attr) { struct netem_sched_data *q = qdisc_priv(sch); - struct tc_netem_qopt *qopt = RTA_DATA(opt); - struct Qdisc *child; - int ret; + const struct tc_netem_dist *dist = RTA_DATA(attr); + struct disttable *d; + int i; + + if (RTA_PAYLOAD(attr) < sizeof(*dist) || + dist->factor < 2 || dist->factor > 1<<16 || dist->size > 65536) + return -EINVAL; - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) + d = kmalloc(sizeof(*d) + dist->size*sizeof(d->table[0]), GFP_KERNEL); + if (!d) + return -ENOMEM; + + d->size = dist->size; + d->factor = dist->factor; + for (i = 0; i < dist->size; i++) + d->table[i] = dist->data[i]; + + spin_lock_bh(&sch->dev->queue_lock); + d = xchg(&q->delay_dist, d); + spin_unlock_bh(&sch->dev->queue_lock); + + kfree(d); + return 0; +} + +static int get_correlation(struct Qdisc *sch, const struct rtattr *attr) +{ + struct netem_sched_data *q = qdisc_priv(sch); + const struct tc_netem_corr *c = RTA_DATA(attr); + + if (RTA_PAYLOAD(attr) != sizeof(*c)) return -EINVAL; - child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); - if (!child) + init_crandom(&q->delay_cor, c->delay_corr); + init_crandom(&q->loss_cor, c->loss_corr); + init_crandom(&q->dup_cor, c->dup_corr); + return 0; +} + +static int netem_change(struct Qdisc *sch, struct rtattr *opt) +{ + struct netem_sched_data *q = qdisc_priv(sch); + struct tc_netem_qopt *qopt; + int ret; + + if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) return -EINVAL; - ret = set_fifo_limit(child, qopt->limit); + qopt = RTA_DATA(opt); + ret = set_fifo_limit(q->qdisc, qopt->limit); if (ret) { - qdisc_destroy(child); + pr_debug("netem: can't set fifo limit\n"); return ret; } - - sch_tree_lock(sch); - if (child) { - child = xchg(&q->qdisc, child); - if (child != &noop_qdisc) - qdisc_destroy(child); - q->latency = qopt->latency; - q->jitter = qopt->jitter; - q->limit = qopt->limit; - q->gap = qopt->gap; - q->loss = qopt->loss; + q->latency = qopt->latency; + q->jitter = qopt->jitter; + q->limit = qopt->limit; + q->gap = qopt->gap; + q->loss = qopt->loss; + q->duplicate = qopt->duplicate; + + /* Handle nested options after initial queue options. + * Should have put all options in nested format but too late now. + */ + if (RTA_PAYLOAD(opt) > sizeof(*qopt)) { + struct rtattr *tb[TCA_NETEM_MAX]; + if (rtattr_parse(tb, TCA_NETEM_MAX, + RTA_DATA(opt) + sizeof(*qopt), + RTA_PAYLOAD(opt) - sizeof(*qopt))) + return -EINVAL; + + if (tb[TCA_NETEM_CORR-1]) { + ret = get_correlation(sch, tb[TCA_NETEM_CORR-1]); + if (ret) + return ret; + } + + if (tb[TCA_NETEM_DELAY_DIST-1]) { + ret = get_dist_table(sch, tb[TCA_NETEM_DELAY_DIST-1]); + if (ret) + return ret; + } } - sch_tree_unlock(sch); + return 0; } @@ -792,19 +400,29 @@ static int netem_init(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); + int ret; if (!opt) return -EINVAL; skb_queue_head_init(&q->delayed); - q->qdisc = &noop_qdisc; - init_timer(&q->timer); q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; - return netem_change(sch, opt); + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (!q->qdisc) { + pr_debug("netem: qdisc create failed\n"); + return -ENOMEM; + } + + ret = netem_change(sch, opt); + if (ret) { + pr_debug("netem: change failed\n"); + qdisc_destroy(q->qdisc); + } + return ret; } static void netem_destroy(struct Qdisc *sch) @@ -817,18 +435,26 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = qdisc_priv(sch); + const struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; + struct rtattr *rta = (struct rtattr *) b; struct tc_netem_qopt qopt; + struct tc_netem_corr cor; qopt.latency = q->latency; qopt.jitter = q->jitter; qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; - + qopt.duplicate = q->duplicate; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); + cor.delay_corr = q->delay_cor.rho; + cor.loss_corr = q->loss_cor.rho; + cor.dup_corr = q->dup_cor.rho; + RTA_PUT(skb, TCA_NETEM_CORR, sizeof(cor), &cor); + rta->rta_len = skb->tail - b; + return skb->len; rtattr_failure: From john.ronciak@intel.com Fri Aug 27 14:50:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 14:50:27 -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 i7RLoLZX016032 for ; Fri, 27 Aug 2004 14:50:22 -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 i7RLpoAZ001072; Fri, 27 Aug 2004 21:51:50 GMT Received: from orsmsxvs041.jf.intel.com (orsmsxvs041.jf.intel.com [192.168.65.54]) 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 i7RLhB5T017780; Fri, 27 Aug 2004 21:43:15 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 M2004082714492622327 ; Fri, 27 Aug 2004 14:49:26 -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, 27 Aug 2004 14:49:26 -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] abysmal e1000 performance (DITR) Date: Fri, 27 Aug 2004 14:49:25 -0700 Message-ID: <468F3FDA28AA87429AD807992E22D07EAF76C0@orsmsx408> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] abysmal e1000 performance (DITR) Thread-Index: AcSLtmVtpRbK2iRWQwCD9ipKTM9IIwAyMKpA From: "Ronciak, John" To: , "Jeff Garzik" Cc: , "Venkatesan, Ganesh" , , "Feldman, Scott" , "Brandeburg, Jesse" X-OriginalArrivalTime: 27 Aug 2004 21:49:26.0029 (UTC) FILETIME=[B8ACE3D0:01C48C7F] 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 i7RLoLZX016032 X-archive-position: 8112 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: john.ronciak@intel.com Precedence: bulk X-list: netdev Jamal, Thayne, I've asked Jeff to go ahead and apply this patch as a way around this for now. We would liketo see the DITR stay but now have this performacne problem so we don't want to rip it out. We do however need a test case to replicate this as we have not been seeing it in our testing. Please get us those case that break things. We'll have a better solution longer term based on the test cases (as well as the ones we normally use of course). Thanks. Cheers, John > -----Original Message----- > From: netdev-bounce@oss.sgi.com > [mailto:netdev-bounce@oss.sgi.com] On Behalf Of Thayne Harbaugh > Sent: Thursday, August 26, 2004 2:29 PM > To: Jeff Garzik > Cc: hadi@cyberus.ca; Venkatesan, Ganesh; netdev@oss.sgi.com; > Feldman, Scott; Brandeburg, Jesse > Subject: Re: [PATCH] abysmal e1000 performance (DITR) > > > On Thu, 2004-08-26 at 16:26 -0400, Jeff Garzik wrote: > > Thayne Harbaugh wrote: > > > On Thu, 2004-08-26 at 13:55 -0400, jamal wrote: > > > > > >>Ganesh, > > >> > > >>Can you please make this feature off by default and perhaps > > >>accesible via ethtool for peopel who want to turn it on. > > >>I just wasted a few hours and was bitten by this performance-wise. > > >>Please consider disabling it. > > > > > > > > > This is a *horrible* problem. Even though it's fixable > by passing a > > > module parameter, the default bites those that *know* > about it. We have > > > had customers bitten by this and customers that have insisted in > > > swapping all the NICs in a cluster to Broadcom TG3 NICs. > > > > > > It's a black eye for Intel and a loss of business - > that's the opinion > > > of our customers. > > > > > > If it's so bad we should disable it by default, either via > the module > > parameter or via a kernel CONFIG_xxx option. > > Yes, it is so bad. The dynamic interrupt setting should be deprecated > by the use of NAPI. > > This is a simple way to disable it, yet still keep the code so that > someone can enable it if they really wanted it. I, however, > would just > as soon see all of the DITR code ripped out. > > There are other ways that might be better for dealing with > it, yet still > keeping the DITR code viable. > > --- drivers/net/e1000/e1000_param.c.broken_ditr 2004-08-26 > 15:40:34.436456736 -0600 > +++ drivers/net/e1000/e1000_param.c 2004-08-26 > 15:49:07.186506880 -0600 > @@ -212,7 +212,7 @@ > #define MAX_TXABSDELAY 0xFFFF > #define MIN_TXABSDELAY 0 > > -#define DEFAULT_ITR 1 > +#define DEFAULT_ITR 8000 > #define MAX_ITR 100000 > #define MIN_ITR 100 > > > > > From haveblue@us.ibm.com Fri Aug 27 15:23:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 15:23:16 -0700 (PDT) Received: from kernel.beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7RMN3Dt017205 for ; Fri, 27 Aug 2004 15:23:09 -0700 Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by kernel.beaverton.ibm.com with esmtp (Exim 3.36 #1 (Debian)) id 1C0p77-0004Ik-00; Fri, 27 Aug 2004 15:22:29 -0700 Subject: [patch] af_packet: use void* for virtual addresses To: davem@redhat.com Cc: netdev@oss.sgi.com, Dave Hansen From: Dave Hansen Date: Fri, 27 Aug 2004 15:22:23 -0700 Message-Id: X-archive-position: 8114 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: haveblue@us.ibm.com Precedence: bulk X-list: netdev I've been auditing code, cleaning up warning where code passes "unsigned long"s to functions and macros that really take pointers. Here's some explanation as to why I think these types were coded up this way originally: http://marc.theaimsgroup.com/?l=linux-mm&m=109155379124628&w=2 The attached patch make packet_opt->pg_vec a pointer to an array of char*'s instead of a pointer to an array of "unsigned longs" that stored virtual addresses. It also creates the inline function pg_vec_endpage(), which hides the virt_to_page() call along with a little address arithmetic. One slight oddity in the current code is this: pg_vec = kmalloc(req->tp_block_nr*sizeof(unsigned long*), GFP_KERNEL); Since the previous code was storing virtual addresses in unsigned longs, it was actually trying to allocate an array of *them*, not of pointers to them. Not that it matters in the end, but I _think_ that type is technically incorrect. I replaced it with this line: pg_vec = kmalloc(req->tp_block_nr*sizeof(char *), GFP_KERNEL); because I actually want an array of pointers. This shouldn't have any functional effect on the code. I've been running with it for a few weeks with no problems. The alternative to reworking the types is to simply cast the argument to a void* before calling virt_to_page(). Patched against 2.6.9-rc1-mm1 (but should apply to Linus's tree) Signed-off-by: Dave Hansen --- memhotplug-dave/net/packet/af_packet.c | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) diff -puN net/packet/af_packet.c~A0-af_packet_to_voidstar net/packet/af_packet.c --- memhotplug/net/packet/af_packet.c~A0-af_packet_to_voidstar 2004-08-27 14:06:54.000000000 -0700 +++ memhotplug-dave/net/packet/af_packet.c 2004-08-27 14:06:54.000000000 -0700 @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -173,7 +174,7 @@ struct packet_opt { struct tpacket_stats stats; #ifdef CONFIG_PACKET_MMAP - unsigned long *pg_vec; + char * *pg_vec; unsigned int head; unsigned int frames_per_block; unsigned int frame_size; @@ -198,15 +199,15 @@ struct packet_opt #ifdef CONFIG_PACKET_MMAP -static inline unsigned long packet_lookup_frame(struct packet_opt *po, unsigned int position) +static inline char *packet_lookup_frame(struct packet_opt *po, unsigned int position) { unsigned int pg_vec_pos, frame_offset; - unsigned long frame; + char *frame; pg_vec_pos = position / po->frames_per_block; frame_offset = position % po->frames_per_block; - frame = (unsigned long) (po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size)); + frame = po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size); return frame; } @@ -1549,7 +1550,12 @@ static struct vm_operations_struct packe .close =packet_mm_close, }; -static void free_pg_vec(unsigned long *pg_vec, unsigned order, unsigned len) +static inline struct page *pg_vec_endpage(char *one_pg_vec, unsigned int order) +{ + return virt_to_page(one_pg_vec + (PAGE_SIZE << order) - 1); +} + +static void free_pg_vec(char **pg_vec, unsigned order, unsigned len) { int i; @@ -1557,10 +1563,10 @@ static void free_pg_vec(unsigned long *p if (pg_vec[i]) { struct page *page, *pend; - pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1); + pend = pg_vec_endpage(pg_vec[i], order); for (page = virt_to_page(pg_vec[i]); page <= pend; page++) ClearPageReserved(page); - free_pages(pg_vec[i], order); + free_pages((unsigned long)pg_vec[i], order); } } kfree(pg_vec); @@ -1569,7 +1575,7 @@ static void free_pg_vec(unsigned long *p static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing) { - unsigned long *pg_vec = NULL; + char **pg_vec = NULL; struct packet_opt *po = pkt_sk(sk); int was_running, num, order = 0; int err = 0; @@ -1604,18 +1610,18 @@ static int packet_set_ring(struct sock * err = -ENOMEM; - pg_vec = kmalloc(req->tp_block_nr*sizeof(unsigned long*), GFP_KERNEL); + pg_vec = kmalloc(req->tp_block_nr*sizeof(char *), GFP_KERNEL); if (pg_vec == NULL) goto out; - memset(pg_vec, 0, req->tp_block_nr*sizeof(unsigned long*)); + memset(pg_vec, 0, req->tp_block_nr*sizeof(char **)); for (i=0; itp_block_nr; i++) { struct page *page, *pend; - pg_vec[i] = __get_free_pages(GFP_KERNEL, order); + pg_vec[i] = (char *)__get_free_pages(GFP_KERNEL, order); if (!pg_vec[i]) goto out_free_pgvec; - pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1); + pend = pg_vec_endpage(pg_vec[i], order); for (page = virt_to_page(pg_vec[i]); page <= pend; page++) SetPageReserved(page); } @@ -1623,7 +1629,7 @@ static int packet_set_ring(struct sock * l = 0; for (i=0; itp_block_nr; i++) { - unsigned long ptr = pg_vec[i]; + char *ptr = pg_vec[i]; struct tpacket_hdr *header; int k; _ From tharbaugh@lnxi.com Fri Aug 27 15:22:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 15:22:57 -0700 (PDT) Received: from ash.lnxi.com (208.177.141.226.ptr.us.xo.net [208.177.141.226]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7RMMl4m017186 for ; Fri, 27 Aug 2004 15:22:47 -0700 Received: (qmail 11856 invoked from network); 27 Aug 2004 22:26:20 -0000 Received: from tubarao.lnxi.com (HELO ?192.168.15.106?) (192.168.15.106) by ash.lnxi.com with SMTP; 27 Aug 2004 22:26:20 -0000 Subject: RE: [PATCH] abysmal e1000 performance (DITR) From: Thayne Harbaugh Reply-To: tharbaugh@lnxi.com To: "Ronciak, John" Cc: Jeff Garzik , hadi@cyberus.ca, "Venkatesan, Ganesh" , netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" In-Reply-To: <468F3FDA28AA87429AD807992E22D07EAF76C0@orsmsx408> References: <468F3FDA28AA87429AD807992E22D07EAF76C0@orsmsx408> Content-Type: multipart/mixed; boundary="=-FHfNDUzLkv+fSdAPZ3F2" Organization: Linux Networx Date: Fri, 27 Aug 2004 16:05:00 -0600 Message-Id: <1093644300.20769.197.camel@tubarao> Mime-Version: 1.0 X-Mailer: Evolution 1.5.92.2 (1.5.92.2-2) X-archive-position: 8113 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tharbaugh@lnxi.com Precedence: bulk X-list: netdev --=-FHfNDUzLkv+fSdAPZ3F2 Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2004-08-27 at 14:49 -0700, Ronciak, John wrote: > Jamal, Thayne, > > I've asked Jeff to go ahead and apply this patch as a way around this > for now. We would liketo see the DITR stay but now have this > performacne problem so we don't want to rip it out. We do however need > a test case to replicate this as we have not been seeing it in our > testing. Please get us those case that break things. We'll have a > better solution longer term based on the test cases (as well as the ones > we normally use of course). Attached is an email that I sent out 2004 May 25. The email is very detailed about what the problem is, how to test it, and an initial patch. The email was sent to several addresses at Intel. I later sent it to lkml and netdev. There was almost no response at the time. The best reply that I received from Intel was that the DITR was put in and calibrated according to a marketing benchmark program and that it wouldn't be changed even though tests (and customers) showed that the performance was *abysmal*. It's also a big question what role DITR plays when it seems deprecated by NAPI. The response was disappointing. I'm now wondering why this has now become interesting and the thread has resumed. What's changed? How did this catch someone's attention? What can I do next time (hopefully that won't happen) so that people *do* take interest. > > > -----Original Message----- > > From: netdev-bounce@oss.sgi.com > > [mailto:netdev-bounce@oss.sgi.com] On Behalf Of Thayne Harbaugh > > Sent: Thursday, August 26, 2004 2:29 PM > > To: Jeff Garzik > > Cc: hadi@cyberus.ca; Venkatesan, Ganesh; netdev@oss.sgi.com; > > Feldman, Scott; Brandeburg, Jesse > > Subject: Re: [PATCH] abysmal e1000 performance (DITR) > > > > > > On Thu, 2004-08-26 at 16:26 -0400, Jeff Garzik wrote: > > > Thayne Harbaugh wrote: > > > > On Thu, 2004-08-26 at 13:55 -0400, jamal wrote: > > > > > > > >>Ganesh, > > > >> > > > >>Can you please make this feature off by default and perhaps > > > >>accesible via ethtool for peopel who want to turn it on. > > > >>I just wasted a few hours and was bitten by this performance-wise. > > > >>Please consider disabling it. > > > > > > > > > > > > This is a *horrible* problem. Even though it's fixable > > by passing a > > > > module parameter, the default bites those that *know* > > about it. We have > > > > had customers bitten by this and customers that have insisted in > > > > swapping all the NICs in a cluster to Broadcom TG3 NICs. > > > > > > > > It's a black eye for Intel and a loss of business - > > that's the opinion > > > > of our customers. > > > > > > > > > If it's so bad we should disable it by default, either via > > the module > > > parameter or via a kernel CONFIG_xxx option. > > > > Yes, it is so bad. The dynamic interrupt setting should be deprecated > > by the use of NAPI. > > > > This is a simple way to disable it, yet still keep the code so that > > someone can enable it if they really wanted it. I, however, > > would just > > as soon see all of the DITR code ripped out. > > > > There are other ways that might be better for dealing with > > it, yet still > > keeping the DITR code viable. > > > > --- drivers/net/e1000/e1000_param.c.broken_ditr 2004-08-26 > > 15:40:34.436456736 -0600 > > +++ drivers/net/e1000/e1000_param.c 2004-08-26 > > 15:49:07.186506880 -0600 > > @@ -212,7 +212,7 @@ > > #define MAX_TXABSDELAY 0xFFFF > > #define MIN_TXABSDELAY 0 > > > > -#define DEFAULT_ITR 1 > > +#define DEFAULT_ITR 8000 > > #define MAX_ITR 100000 > > #define MIN_ITR 100 > > > > > > > > > > --=-FHfNDUzLkv+fSdAPZ3F2 Content-Disposition: inline Content-Description: Attached message - abysmal e1000 performance (DITR) Content-Type: message/rfc822 Subject: abysmal e1000 performance (DITR) From: Thayne Harbaugh Reply-To: tharbaugh@lnxi.com To: linux-kernel@vger.kernel.org Content-Type: text/plain Organization: Linux Networx Message-Id: <1085504557.30156.59.camel@tubarao> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 25 May 2004 11:02:37 -0600 Bcc: linux.nics@intel.com X-Evolution-Transport: smtp://tharbaugh@ash.lnxi.com X-Evolution-Account: tharbaugh@lnxi.com X-Evolution-Fcc: file:///home/thayne/evolution/local/Sent X-Evolution-Format: text/plain Content-Transfer-Encoding: 7bit The DITR (Dynamic Interrupt Throttle Rate) introduced in the 5.x version of the e1000 driver can limit performance to less than 50% of expected. I have two machines with secondary e1000 NICs directly connected (no switch). I run a test using Netpipe (http://www.scl.ameslab.gov/netpipe/): flu2:~ # /tmp/NPtcp -h 10.0.0.1 Send and receive buffers are 16384 and 87380 bytes (A bug in Linux doubles the requested buffer sizes) Now starting the main loop 0: 1 bytes 4999 times --> 0.03 Mbps in 250.03 usec 1: 2 bytes 399 times --> 0.06 Mbps in 250.02 usec 2: 3 bytes 399 times --> 0.09 Mbps in 250.02 usec (mostly uninteresting lines) 70: 24573 bytes 121 times --> 380.39 Mbps in 492.85 usec 71: 24576 bytes 135 times --> 380.43 Mbps in 492.86 usec 72: 24579 bytes 135 times --> 380.49 Mbps in 492.84 usec 73: 32765 bytes 67 times --> 341.32 Mbps in 732.39 usec 74: 32768 bytes 68 times --> 341.37 Mbps in 732.35 usec 75: 32771 bytes 68 times --> 341.41 Mbps in 732.33 usec 76: 49149 bytes 68 times --> 437.02 Mbps in 858.04 usec 77: 49152 bytes 77 times --> 451.39 Mbps in 830.77 usec 78: 49155 bytes 80 times --> 499.57 Mbps in 750.69 usec That's the best performance, but it drops back down. 79: 65533 bytes 44 times --> 409.48 Mbps in 1221.00 usec 80: 65536 bytes 40 times --> 409.42 Mbps in 1221.24 usec 81: 65539 bytes 40 times --> 409.43 Mbps in 1221.28 usec Not much different. 121: 8388605 bytes 3 times --> 379.88 Mbps in 168474.49 usec 122: 8388608 bytes 3 times --> 411.24 Mbps in 155625.68 usec 123: 8388611 bytes 3 times --> 395.81 Mbps in 161693.50 usec And there's the end. I would expect to see ~900 Mbps performance (in fact, a Broadcom tg3 NIC in the same machine gives the expected ~900 Mbps performance). The older, 4.x e1000 series of drivers gives the ~900 Mbps performance as expected. I have traced the abysmal performance to the DITR code. I have added some output to the e1000_main.c:e1000_watchdog() section where the Dynamic interrupt is calculated and set. It's interesting to note how the goc (good octet count) and the itr oscillate during the netpipe run (ritr is the real ITR setting that is written to the e1000 ITR register): goc(18=9+9) dif(0) ritr(1953) DITR = 2000 goc(0=0+0) dif(0) ritr(488) DITR = 8000 goc(44=22+22) dif(0) ritr(1953) DITR = 2000 goc(0=0+0) dif(0) ritr(488) DITR = 8000 goc(54=27+27) dif(0) ritr(1953) DITR = 2000 (many lines of oscillation and increased activity) goc(0=0+0) dif(0) ritr(488) DITR = 8000 goc(10558=5299+5258) dif(41) ritr(1930) DITR = 2023 goc(0=0+0) dif(0) ritr(488) DITR = 8000 goc(9996=5228+4768) dif(459) ritr(1717) DITR = 2275 goc(0=0+0) dif(0) ritr(488) DITR = 8000 goc(11180=5378+5801) dif(422) ritr(1754) DITR = 2226 goc(0=0+0) dif(0) ritr(488) DITR = 8000 goc(10817=5304+5512) dif(208) ritr(1846) DITR = 2115 It is very interesting to note that if the 5.x driver is loaded with InterruptThrottleRate=8000 (the default setting of the 4.x e1000 drivers - which also disables dynamic adjustment of the ITR) then performance is ~900 Mbps: 119: 6291456 bytes 3 times --> 891.33 Mbps in 53851.83 usec 120: 6291459 bytes 3 times --> 891.34 Mbps in 53851.35 usec 121: 8388605 bytes 3 times --> 895.99 Mbps in 71429.49 usec 122: 8388608 bytes 3 times --> 881.12 Mbps in 72634.50 usec 123: 8388611 bytes 3 times --> 885.65 Mbps in 72263.48 usec My assessment for the poor performance using is DITR is that this reduces load on the box by limiting interrupts while increasing latency to service the packets. The problem is that this is done irrespective of the actual load on the system and thus results in gratuitous latency being added. In other words: why limit the interrupts and reduce the load on the system when the system isn't loaded and has nothing better to do? This kills performance on systems that have plenty of horsepower to handle their load as well as service interrupts. I recommend that the DITR formula should use the system load to scale the 6000/2000 split, and/or that the 8000 ITR setting be the default and the dynamic setting of ITR=1 be the option. --- linux/drivers/net/e1000/e1000_param.c.orig 2004-05-25 18:05:10.000000000 -0700 +++ linux/drivers/net/e1000/e1000_param.c 2004-05-25 18:05:26.000000000 -0700 @@ -224,7 +224,7 @@ #define MAX_TXABSDELAY 0xFFFF #define MIN_TXABSDELAY 0 -#define DEFAULT_ITR 1 +#define DEFAULT_ITR 8000 #define MAX_ITR 100000 #define MIN_ITR 100 -- Thayne Harbaugh Linux Networx --=-FHfNDUzLkv+fSdAPZ3F2-- From afleming@freescale.com Fri Aug 27 15:34:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 15:34:38 -0700 (PDT) Received: from motgate5.mot.com (motgate5.mot.com [144.189.100.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7RMYXFY018108 for ; Fri, 27 Aug 2004 15:34:33 -0700 Received: from az33exr03.mot.com (az33exr03.mot.com [10.64.251.233]) by motgate5.mot.com (8.12.11/Motgate2) with ESMTP id i7RMYEt3026349 for ; Fri, 27 Aug 2004 15:34:14 -0700 (MST) Received: from [10.82.17.240] ([10.82.17.240]) by az33exr03.mot.com (Motorola/az33exr03) with ESMTP id i7RMY5nq008187 for ; Fri, 27 Aug 2004 17:34:06 -0500 Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: <37CEBC36-F879-11D8-942E-000393C30512@freescale.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: netdev@oss.sgi.com From: Andy Fleming Subject: schedule_work issues Date: Fri, 27 Aug 2004 17:34:11 -0500 X-Mailer: Apple Mail (2.618) X-archive-position: 8115 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: afleming@freescale.com Precedence: bulk X-list: netdev Previously I sent a message detailing how I could not get my ethernet driver to recognize a link if I used DHCP to configure for an NFS root. However, now it seems the problem has spread since I updated to the newest version of the kernel. With the previous version (2.6.8), everything worked. With a version current as of yesterday, the driver fails to recognize a link. This is what I get: Serial: CPM driver $Revision: 0.01 $ ttyCPM0 at MMIO 0xfdfd1a00 (irq = 40) is a CPM UART ttyCPM1 at MMIO 0xfdfd1a60 (irq = 43) is a CPM UART RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize loop: loaded (max 8 devices) eth0: Gianfar Ethernet Controller Version 1.1, 00:e0:0c:00:00:0d eth0: Running with NAPI enabled eth0: 256/256 RX/TX BD ring size eth1: Gianfar Ethernet Controller Version 1.1, 00:e0:0c:00:01:0d eth1: Running with NAPI enabled eth1: 256/256 RX/TX BD ring size e100: Intel(R) PRO/100 Network Driver, 3.0.27-k2-NAPI e100: Copyright(c) 1999-2004 Intel Corporation Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx NET: Registered protocol family 2 IP: routing cache hash table of 4096 buckets, 32Kbytes TCP: Hash tables configured (established 131072 bind 65536) NET: Registered protocol family 1 NET: Registered protocol family 17 eth0: PHY is Marvell 88E1101 (1410c62) It then sits there forever. The debugger indicates it is receiving interrupts, and debug output proves my link interrupt is triggering, and a timer acts the same. however, I both the timer and the interrupt call schedule_work() to accomplish the actual work of detecting the link state, and configuring the controller as necessary. Debug output indicates that this function is never called. Extensive debugging has shown that the kernel gets into try_to_wake_up(), and exits: old_state = p->state; if (!(old_state & state)) goto out; old_state at this point is 0, and state is 3, with those two bits representing TASK_INTERRUPTIBLE and TASK_UNINTERRUPTIBLE. I tried setting those bits in my driver, but that did not work. At this point, I'm stuck. My interrupt function is pretty simple: static irqreturn_t phy_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct gfar_private *priv = netdev_priv(dev); /* Clear the interrupt */ mii_clear_phy_interrupt(priv->mii_info); /* Disable PHY interrupts */ mii_configure_phy_interrupt(priv->mii_info, MII_INTERRUPT_DISABLED); /* Schedule the phy change */ schedule_work(&priv->tq); return IRQ_HANDLED; } I'm not sure this is the correct list, but I'm hoping this is a simple matter of my driver doing something wrong. Any ideas? Andy From john.ronciak@intel.com Fri Aug 27 15:43:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 15:43: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 i7RMhUwH018553 for ; Fri, 27 Aug 2004 15:43:31 -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 i7RMgKZI010394; Fri, 27 Aug 2004 22:42: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 i7RMiOFK022480; Fri, 27 Aug 2004 22:44:33 GMT Received: from orsmsx331.amr.corp.intel.com ([192.168.65.56]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004082715415611961 ; Fri, 27 Aug 2004 15:41:56 -0700 Received: from orsmsx408.amr.corp.intel.com ([192.168.65.52]) by orsmsx331.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 27 Aug 2004 15:41:56 -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] abysmal e1000 performance (DITR) Date: Fri, 27 Aug 2004 15:41:55 -0700 Message-ID: <468F3FDA28AA87429AD807992E22D07EAF76C5@orsmsx408> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] abysmal e1000 performance (DITR) Thread-Index: AcSMhFreUsGTTPXqTDOmBuj4ByJ1xwAAXmlA From: "Ronciak, John" To: Cc: "Jeff Garzik" , , "Venkatesan, Ganesh" , , "Feldman, Scott" , "Brandeburg, Jesse" X-OriginalArrivalTime: 27 Aug 2004 22:41:56.0129 (UTC) FILETIME=[0E480110:01C48C87] 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 i7RMhUwH018553 X-archive-position: 8116 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: john.ronciak@intel.com Precedence: bulk X-list: netdev Thayne, I can't speak to what happened previously, only what's going on now. You need to be careful about basing any tuning on any one single test. For each one of these test you find that have performance problems I can show you where it works just fine and most cases works better. So let be careful about making judgements like this. We are going to look at this and make some changes based on what we find. I already said that we probably won't be ripping out the DITR as some people really make a lot of use out of it. It may be off by default or have some default setting which doesn't hurt test cases. Since Netpipe is a relatively unused test for performance (not really it's purpose, it was developed to find "holes" in internet packets lengths), it's not part of our normal testing. Like I said, we are looking at it and will come up with a more robust solution. Cheers, John > -----Original Message----- > From: Thayne Harbaugh [mailto:tharbaugh@lnxi.com] > Sent: Friday, August 27, 2004 3:05 PM > To: Ronciak, John > Cc: Jeff Garzik; hadi@cyberus.ca; Venkatesan, Ganesh; > netdev@oss.sgi.com; Feldman, Scott; Brandeburg, Jesse > Subject: RE: [PATCH] abysmal e1000 performance (DITR) > > > On Fri, 2004-08-27 at 14:49 -0700, Ronciak, John wrote: > > Jamal, Thayne, > > > > I've asked Jeff to go ahead and apply this patch as a way > around this > > for now. We would liketo see the DITR stay but now have this > > performacne problem so we don't want to rip it out. We do > however need > > a test case to replicate this as we have not been seeing it in our > > testing. Please get us those case that break things. We'll have a > > better solution longer term based on the test cases (as > well as the ones > > we normally use of course). > > Attached is an email that I sent out 2004 May 25. The email is very > detailed about what the problem is, how to test it, and an initial > patch. The email was sent to several addresses at Intel. I > later sent > it to lkml and netdev. > > There was almost no response at the time. The best reply that I > received from Intel was that the DITR was put in and calibrated > according to a marketing benchmark program and that it wouldn't be > changed even though tests (and customers) showed that the performance > was *abysmal*. It's also a big question what role DITR plays when it > seems deprecated by NAPI. > > The response was disappointing. I'm now wondering why this has now > become interesting and the thread has resumed. What's > changed? How did > this catch someone's attention? What can I do next time > (hopefully that > won't happen) so that people *do* take interest. > > > > > > -----Original Message----- > > > From: netdev-bounce@oss.sgi.com > > > [mailto:netdev-bounce@oss.sgi.com] On Behalf Of Thayne Harbaugh > > > Sent: Thursday, August 26, 2004 2:29 PM > > > To: Jeff Garzik > > > Cc: hadi@cyberus.ca; Venkatesan, Ganesh; netdev@oss.sgi.com; > > > Feldman, Scott; Brandeburg, Jesse > > > Subject: Re: [PATCH] abysmal e1000 performance (DITR) > > > > > > > > > On Thu, 2004-08-26 at 16:26 -0400, Jeff Garzik wrote: > > > > Thayne Harbaugh wrote: > > > > > On Thu, 2004-08-26 at 13:55 -0400, jamal wrote: > > > > > > > > > >>Ganesh, > > > > >> > > > > >>Can you please make this feature off by default and perhaps > > > > >>accesible via ethtool for peopel who want to turn it on. > > > > >>I just wasted a few hours and was bitten by this > performance-wise. > > > > >>Please consider disabling it. > > > > > > > > > > > > > > > This is a *horrible* problem. Even though it's fixable > > > by passing a > > > > > module parameter, the default bites those that *know* > > > about it. We have > > > > > had customers bitten by this and customers that have > insisted in > > > > > swapping all the NICs in a cluster to Broadcom TG3 NICs. > > > > > > > > > > It's a black eye for Intel and a loss of business - > > > that's the opinion > > > > > of our customers. > > > > > > > > > > > > If it's so bad we should disable it by default, either via > > > the module > > > > parameter or via a kernel CONFIG_xxx option. > > > > > > Yes, it is so bad. The dynamic interrupt setting should > be deprecated > > > by the use of NAPI. > > > > > > This is a simple way to disable it, yet still keep the > code so that > > > someone can enable it if they really wanted it. I, however, > > > would just > > > as soon see all of the DITR code ripped out. > > > > > > There are other ways that might be better for dealing with > > > it, yet still > > > keeping the DITR code viable. > > > > > > --- drivers/net/e1000/e1000_param.c.broken_ditr 2004-08-26 > > > 15:40:34.436456736 -0600 > > > +++ drivers/net/e1000/e1000_param.c 2004-08-26 > > > 15:49:07.186506880 -0600 > > > @@ -212,7 +212,7 @@ > > > #define MAX_TXABSDELAY 0xFFFF > > > #define MIN_TXABSDELAY 0 > > > > > > -#define DEFAULT_ITR 1 > > > +#define DEFAULT_ITR 8000 > > > #define MAX_ITR 100000 > > > #define MIN_ITR 100 > > > > > > > > > > > > > > > > From davem@redhat.com Fri Aug 27 16:51:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 16:52:05 -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 i7RNpthL024454 for ; Fri, 27 Aug 2004 16:51:55 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7RNplS0008778; Fri, 27 Aug 2004 19:51:47 -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 i7RNpg316742; Fri, 27 Aug 2004 19:51:42 -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 i7RNpb5k000972; Fri, 27 Aug 2004 19:51:37 -0400 Date: Fri, 27 Aug 2004 16:51:39 -0700 From: "David S. Miller" To: Dave Hansen Cc: netdev@oss.sgi.com, haveblue@us.ibm.com Subject: Re: [patch] af_packet: use void* for virtual addresses Message-Id: <20040827165139.0061175a.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: 8117 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 This patch works for me. I hope people agree and fix up the page alloc/free return types, because your change has basically currently just moved the casts from one place to another :-) Anyways, patch applied, thanks. From davem@redhat.com Fri Aug 27 16:57:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 16:57: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 i7RNvDJ6024840 for ; Fri, 27 Aug 2004 16:57:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7RNv3S0009793; Fri, 27 Aug 2004 19:57:03 -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 i7RNv3317745; Fri, 27 Aug 2004 19:57:03 -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 i7RNuw1S002503; Fri, 27 Aug 2004 19:56:58 -0400 Date: Fri, 27 Aug 2004 16:56:59 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: hadi@znyx.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] netem update Message-Id: <20040827165659.616ed762.davem@redhat.com> In-Reply-To: <20040827121752.6b7fdf82@dell_ss3.pdx.osdl.net> References: <20040827121752.6b7fdf82@dell_ss3.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: 8118 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 Fri, 27 Aug 2004 12:17:52 -0700 Stephen Hemminger wrote: > This is a third revision of the netem extensions which provides > * packet duplication > * correlated random number > * loading distribution table > > The API is backwards compatible and now uses nested elements to allow > for easier future changes. Looks great, applied. A 2.4.x version is coming? :-) Also, if someone is bored, can we get the pkt_sched.h enumeration stuff cleaned up a bit? I mean, instead of all of these error prone FOO_MAX tricks, just do what we do for the netlink headers. enum { FOO_A, FOO_B, ... __FOO_MAX, }; #define FOO_MAX (__FOO_MAX - 1) This way to add new enumerations is just a one line change and less error prone. From davem@davemloft.net Fri Aug 27 16:59:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 16:59: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 i7RNxMmm025209 for ; Fri, 27 Aug 2004 16:59: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 1C0qcZ-0000dT-00; Fri, 27 Aug 2004 16:59:03 -0700 Date: Fri, 27 Aug 2004 16:59:02 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: laforge@gnumonks.org, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH/RFC] remove include/linux/netflinter_ipv6/ip6t_REJECT.h Message-Id: <20040827165902.352fd5df.davem@davemloft.net> In-Reply-To: <20040828.011451.79815651.yoshfuji@linux-ipv6.org> References: <20040828.011451.79815651.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 i7RNxMmm025209 X-archive-position: 8119 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, 28 Aug 2004 01:14:51 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > There're no users of include/linux/netflinter_ipv6/ip6t_REJECT.h, > which contains wrong, useless definitions. > > Yes, I know ip6t_REJECT.c lives in patch-o-matic, but > it (almost) completely replaces ip6t_REJECT.h; > which implies that ip6t_REJECT.h is useless at all. > > So, how about removing ip6t_REJECT.h for now? > Of course, introducing appropriate ip6t_REJECT.c and ip6t_REJECT.h is > the alternate option. :-) I agree, patch applied. From davem@davemloft.net Fri Aug 27 17:02:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 17:02: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 i7S02hev025581 for ; Fri, 27 Aug 2004 17:02: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 1C0qfw-0000dw-00; Fri, 27 Aug 2004 17:02:32 -0700 Date: Fri, 27 Aug 2004 17:02:32 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org, 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) Message-Id: <20040827170232.590eebb6.davem@davemloft.net> In-Reply-To: <20040828.014935.131415609.yoshfuji@linux-ipv6.org> References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040801195135.16734846.davem@redhat.com> <20040828.014935.131415609.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 i7S02hev025581 X-archive-position: 8120 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, 28 Aug 2004 01:49:35 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > > It is simple to fix, I think. > > Here's the updated patch. > > From: Kazunori Miyazawa > > (Because Miyazawa-san is very busy now, > I'm sending this patch as the proxy of him.) > > Please pull from Looks great, pulled. From davem@davemloft.net Fri Aug 27 17:30:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 17:31: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 i7S0Ure2026813 for ; Fri, 27 Aug 2004 17:30: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 1C0r79-0000kA-00; Fri, 27 Aug 2004 17:30:39 -0700 Date: Fri, 27 Aug 2004 17:30:39 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH]: Remove duplicate declarations from netlink.h Message-Id: <20040827173039.2bb348cc.davem@davemloft.net> In-Reply-To: <412F304B.7080804@trash.net> References: <412F304B.7080804@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: 8121 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, 27 Aug 2004 14:59:55 +0200 Patrick McHardy wrote: > This patch removes some duplicate delarations from netlink.h. Applied, thanks Patrick. From mgalgoci@redhat.com Fri Aug 27 18:19:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 18:19:16 -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 i7S1JASW028349 for ; Fri, 27 Aug 2004 18:19:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7S1J3S0023799; Fri, 27 Aug 2004 21:19:03 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7S1Iv331271; Fri, 27 Aug 2004 21:18:57 -0400 Received: from localhost (mgalgoci@localhost) by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7S1Ivm16062; Fri, 27 Aug 2004 21:18:57 -0400 X-Authentication-Warning: lacrosse.corp.redhat.com: mgalgoci owned process doing -bs Date: Fri, 27 Aug 2004 21:18:57 -0400 (EDT) From: Matthew Galgoci X-X-Sender: mgalgoci@lacrosse.corp.redhat.com To: netdev@oss.sgi.com, Subject: [patch] kill warning in sk98lin Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8122 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mgalgoci@redhat.com Precedence: bulk X-list: netdev Fix up a warning in sk98lin: --- drivers/net/sk98lin/skge.c.orig 2004-08-27 21:01:33.447576657 -0400 +++ drivers/net/sk98lin/skge.c 2004-08-27 21:06:07.199406778 -0400 @@ -788,8 +788,9 @@ cards = skge_probe(); if (cards == 0) { printk("sk98lin: No adapter found.\n"); + cards = -ENODEV; } - return cards ? 0 : -ENODEV; + return cards; } /* skge_init_module */ -- Matthew Galgoci System Administrator and Sr. Manager of Ruminants Red Hat, Inc 919.754.3700 x44155 From davem@davemloft.net Fri Aug 27 18:21:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 18:21: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 i7S1LDsD028561 for ; Fri, 27 Aug 2004 18: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 1C0rts-0000s5-00; Fri, 27 Aug 2004 18:21:00 -0700 Date: Fri, 27 Aug 2004 18:21:00 -0700 From: "David S. Miller" To: Matthew Galgoci Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [patch] kill warning in sk98lin Message-Id: <20040827182100.585d300f.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: 8123 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, 27 Aug 2004 21:18:57 -0400 (EDT) Matthew Galgoci wrote: > Fix up a warning in sk98lin: Why does it warn? Please provide the warning when fixing bugs of this nature, thanks. From mgalgoci@redhat.com Fri Aug 27 18:23:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 27 Aug 2004 18:23:38 -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 i7S1NWcY029026 for ; Fri, 27 Aug 2004 18:23:32 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7S1NOS0024428; Fri, 27 Aug 2004 21:23:24 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7S1NO331862; Fri, 27 Aug 2004 21:23:24 -0400 Received: from localhost (mgalgoci@localhost) by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7S1NOh16382; Fri, 27 Aug 2004 21:23:24 -0400 X-Authentication-Warning: lacrosse.corp.redhat.com: mgalgoci owned process doing -bs Date: Fri, 27 Aug 2004 21:23:24 -0400 (EDT) From: Matthew Galgoci X-X-Sender: mgalgoci@lacrosse.corp.redhat.com To: "David S. Miller" cc: netdev@oss.sgi.com, Subject: Re: [patch] kill warning in sk98lin In-Reply-To: <20040827182100.585d300f.davem@davemloft.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8124 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mgalgoci@redhat.com Precedence: bulk X-list: netdev On Fri, 27 Aug 2004, David S. Miller wrote: > Date: Fri, 27 Aug 2004 18:21:00 -0700 > From: David S. Miller > To: Matthew Galgoci > Cc: netdev@oss.sgi.com, jgarzik@pobox.com > Subject: Re: [patch] kill warning in sk98lin > > On Fri, 27 Aug 2004 21:18:57 -0400 (EDT) > Matthew Galgoci wrote: > > > Fix up a warning in sk98lin: > > Why does it warn? Please provide the warning when fixing > bugs of this nature, thanks. Sorry 'bout that. Module sk98lin cannot be unloaded due to unsafe usage in drivers/net/sk98lin/skge.c:792 -- Matthew Galgoci System Administrator and Sr. Manager of Ruminants Red Hat, Inc 919.754.3700 x44155 From SRS0+df1f862ec75a5028ccc2+370+infradead.org+hch@phoenix.srs.infradead.org Sat Aug 28 01:54:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 01:54:15 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7S8s9oK014779 for ; Sat, 28 Aug 2004 01:54:10 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1C0yyC-0001wX-Gb; Sat, 28 Aug 2004 09:53:56 +0100 Date: Sat, 28 Aug 2004 09:53:56 +0100 From: Christoph Hellwig To: Matthew Galgoci Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [patch] kill warning in sk98lin Message-ID: <20040828095356.A7458@infradead.org> References: 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 mgalgoci@redhat.com on Fri, Aug 27, 2004 at 09:18:57PM -0400 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 8125 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, Aug 27, 2004 at 09:18:57PM -0400, Matthew Galgoci wrote: > > Fix up a warning in sk98lin: The code you're patch is gone in current BK. From davem@davemloft.net Sat Aug 28 01:55:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 01:55: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 i7S8tixR015000 for ; Sat, 28 Aug 2004 01:55: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 1C0yzW-0001SH-00; Sat, 28 Aug 2004 01:55:18 -0700 Date: Sat, 28 Aug 2004 01:55:17 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: mgalgoci@redhat.com, netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [patch] kill warning in sk98lin Message-Id: <20040828015517.4083f870.davem@davemloft.net> In-Reply-To: <20040828095356.A7458@infradead.org> References: <20040828095356.A7458@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: 8126 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, 28 Aug 2004 09:53:56 +0100 Christoph Hellwig wrote: > On Fri, Aug 27, 2004 at 09:18:57PM -0400, Matthew Galgoci wrote: > > > > Fix up a warning in sk98lin: > > The code you're patch is gone in current BK. I believe he's patching against 2.4.x From mgalgoci@redhat.com Sat Aug 28 04:25:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 04:25:59 -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 i7SBPksM026485 for ; Sat, 28 Aug 2004 04:25:47 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7SBPTS0021435; Sat, 28 Aug 2004 07:25:29 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7SBPS306980; Sat, 28 Aug 2004 07:25:28 -0400 Received: from localhost (mgalgoci@localhost) by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7SBPSO16465; Sat, 28 Aug 2004 07:25:28 -0400 X-Authentication-Warning: lacrosse.corp.redhat.com: mgalgoci owned process doing -bs Date: Sat, 28 Aug 2004 07:25:28 -0400 (EDT) From: Matthew Galgoci X-X-Sender: mgalgoci@lacrosse.corp.redhat.com To: "David S. Miller" cc: Christoph Hellwig , , Subject: Re: [patch] kill warning in sk98lin In-Reply-To: <20040828015517.4083f870.davem@davemloft.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8127 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mgalgoci@redhat.com Precedence: bulk X-list: netdev On Sat, 28 Aug 2004, David S. Miller wrote: > Date: Sat, 28 Aug 2004 01:55:17 -0700 > From: David S. Miller > To: Christoph Hellwig > Cc: mgalgoci@redhat.com, netdev@oss.sgi.com, jgarzik@pobox.com > Subject: Re: [patch] kill warning in sk98lin > > On Sat, 28 Aug 2004 09:53:56 +0100 > Christoph Hellwig wrote: > > > On Fri, Aug 27, 2004 at 09:18:57PM -0400, Matthew Galgoci wrote: > > > > > > Fix up a warning in sk98lin: > > > > The code you're patch is gone in current BK. > > I believe he's patching against 2.4.x Actually it was 2.6.8.1, but hey, if it's gone in current bk, great! -- Matthew Galgoci System Administrator and Sr. Manager of Ruminants Red Hat, Inc 919.754.3700 x44155 From bdschuym@pandora.be Sat Aug 28 08:12:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 08:13:05 -0700 (PDT) Received: from adicia.telenet-ops.be (adicia.telenet-ops.be [195.130.132.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7SFCu4f003114 for ; Sat, 28 Aug 2004 08:12:57 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by adicia.telenet-ops.be (Postfix) with SMTP id 7769A44200; Sat, 28 Aug 2004 17:12:45 +0200 (MEST) Received: from 192.168.0.138 (D5763CED.kabel.telenet.be [213.118.60.237]) by adicia.telenet-ops.be (Postfix) with ESMTP id C36174407A; Sat, 28 Aug 2004 17:12:43 +0200 (MEST) From: Bart De Schuymer To: "David S.Miller" Subject: [PATCH, RFC] Add bridged IPv6 packet filtering Date: Sat, 28 Aug 2004 17:13:29 +0200 User-Agent: KMail/1.5 Cc: netdev , netfilter-devel MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408281713.29192.bdschuym@pandora.be> X-archive-position: 8128 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bdschuym@pandora.be Precedence: bulk X-list: netdev Hello, The patch below adds bridged IPv6 packet filtering. One thing I was unclear of what to do: before giving an IPv6 packet to ip6tables the IPv6 sanity checks are done (copied from ipv6_rcv()). These checks include this code snippet: if (hdr->nexthdr == NEXTHDR_HOP) { skb->h.raw = (u8*)(hdr+1); if (ipv6_parse_hopopts(skb, offsetof(struct ipv6hdr, nexthdr)) < 0) { IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); return 0; } hdr = skb->nh.ipv6h; } If it's necessary to call ipv6_parse_hopopts() then this function will need to be exported. Note that we only need ip6tables to behave correctly. So, is this function call needed to let ip6tables behave properly? Also, what happens if skb->h.raw = (u8*)(hdr+1); is executed once inside the bridge-nf code and later all the IPv6 checks are done again in ipv6_rcv() ? This can happen if the IPv6 packet is destined for the bridge box or if it's used as a router too. In short, I'd like to know which IPv6 sanity checks are absolutely necessary for ip6tables and if there are any implications if those checks are done twice. This patch has been tested by Scott MacKay . cheers, Bart --- linux-2.6.8.1/include/linux/netfilter_ipv6.h.old Sun Aug 22 18:49:47 2004 +++ linux-2.6.8.1/include/linux/netfilter_ipv6.h Sun Aug 22 18:53:56 2004 @@ -58,8 +58,10 @@ enum nf_ip6_hook_priorities { NF_IP6_PRI_FIRST = INT_MIN, NF_IP6_PRI_SELINUX_FIRST = -225, NF_IP6_PRI_CONNTRACK = -200, + NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD = -175, NF_IP6_PRI_MANGLE = -150, NF_IP6_PRI_NAT_DST = -100, + NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50, NF_IP6_PRI_FILTER = 0, NF_IP6_PRI_NAT_SRC = 100, NF_IP6_PRI_SELINUX_LAST = 225, --- linux-2.6.8.1/net/bridge/br_netfilter.c.old Sun Aug 22 18:49:39 2004 +++ linux-2.6.8.1/net/bridge/br_netfilter.c Sun Aug 22 20:12:48 2004 @@ -11,6 +11,7 @@ * Jun 19 2003: let arptables see bridged ARP traffic (bdschuym) * Oct 06 2003: filter encapsulated IP/ARP VLAN traffic on untagged bridge * (bdschuym) + * Aug 28 2004: add IPv6 filtering (bdschuym) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -29,9 +30,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include "br_private.h" @@ -39,7 +42,6 @@ #include #endif - #define skb_origaddr(skb) (((struct bridge_skb_cb *) \ (skb->nf_bridge->data))->daddr.ipv4) #define store_orig_dstaddr(skb) (skb_origaddr(skb) = (skb)->nh.iph->daddr) @@ -51,6 +53,7 @@ #ifdef CONFIG_SYSCTL static struct ctl_table_header *brnf_sysctl_header; static int brnf_call_iptables = 1; +static int brnf_call_ip6tables = 1; static int brnf_call_arptables = 1; static int brnf_filter_vlan_tagged = 1; #else @@ -60,6 +63,9 @@ static int brnf_filter_vlan_tagged = 1; #define IS_VLAN_IP (skb->protocol == __constant_htons(ETH_P_8021Q) && \ hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_IP) && \ brnf_filter_vlan_tagged) +#define IS_VLAN_IPV6 (skb->protocol == __constant_htons(ETH_P_8021Q) && \ + hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_IPV6) && \ + brnf_filter_vlan_tagged) #define IS_VLAN_ARP (skb->protocol == __constant_htons(ETH_P_8021Q) && \ hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_ARP) && \ brnf_filter_vlan_tagged) @@ -71,8 +77,7 @@ static int brnf_filter_vlan_tagged = 1; * Currently, we fill in the PMTU entry because netfilter * refragmentation needs it, and the rt_flags entry because * ipt_REJECT needs it. Future netfilter modules might - * require us to fill additional fields. - */ + * require us to fill additional fields. */ static struct net_device __fake_net_device = { .hard_header_len = ETH_HLEN }; @@ -91,6 +96,36 @@ static struct rtable __fake_rtable = { /* PF_BRIDGE/PRE_ROUTING *********************************************/ +/* Undo the changes made for ip6tables PREROUTING and continue the + * bridge PRE_ROUTING hook. */ +static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb) +{ + struct nf_bridge_info *nf_bridge = skb->nf_bridge; + +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug ^= (1 << NF_BR_PRE_ROUTING); +#endif + + if (nf_bridge->mask & BRNF_PKT_TYPE) { + skb->pkt_type = PACKET_OTHERHOST; + nf_bridge->mask ^= BRNF_PKT_TYPE; + } + nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING; + + skb->dst = (struct dst_entry *)&__fake_rtable; + dst_hold(skb->dst); + + skb->dev = nf_bridge->physindev; + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_push(skb, VLAN_HLEN); + skb->nh.raw -= VLAN_HLEN; + } + NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, + br_handle_frame_finish, 1); + + return 0; +} + static void __br_dnat_complain(void) { static unsigned long last_complaint; @@ -102,7 +137,6 @@ static void __br_dnat_complain(void) } } - /* This requires some explaining. If DNAT has taken place, * we will need to fix up the destination Ethernet address, * and this is a tricky process. @@ -145,9 +179,7 @@ static void __br_dnat_complain(void) * * --Lennert, 20020411 * --Bart, 20020416 (updated) - * --Bart, 20021007 (updated) - */ - + * --Bart, 20021007 (updated) */ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb) { #ifdef CONFIG_NETFILTER_DEBUG @@ -195,8 +227,7 @@ static int br_nf_pre_routing_finish(stru if (!ip_route_output_key(&rt, &fl)) { /* Bridged-and-DNAT'ed traffic doesn't - * require ip_forwarding. - */ + * require ip_forwarding. */ if (((struct dst_entry *)rt)->dev == dev) { skb->dst = (struct dst_entry *)rt; goto bridged_dnat; @@ -210,8 +241,7 @@ static int br_nf_pre_routing_finish(stru if (skb->dst->dev == dev) { bridged_dnat: /* Tell br_nf_local_out this is a - * bridged frame - */ + * bridged frame */ nf_bridge->mask |= BRNF_BRIDGED_DNAT; skb->dev = nf_bridge->physindev; if (skb->protocol == @@ -245,12 +275,80 @@ bridged_dnat: return 0; } -/* Replicate the checks that IPv4 does on packet reception. +/* Some common code for IPv4/IPv6 */ +static void setup_pre_routing(struct sk_buff *skb) +{ + struct nf_bridge_info *nf_bridge = skb->nf_bridge; + + if (skb->pkt_type == PACKET_OTHERHOST) { + skb->pkt_type = PACKET_HOST; + nf_bridge->mask |= BRNF_PKT_TYPE; + } + + nf_bridge->mask |= BRNF_NF_BRIDGE_PREROUTING; + nf_bridge->physindev = skb->dev; + skb->dev = bridge_parent(skb->dev); +} + +/* Replicate the checks that IPv6 does on packet reception and pass the packet + * to ip6tables, which doesn't support NAT, so things are fairly simple. */ +static unsigned int br_nf_pre_routing_ipv6(unsigned int hook, + struct sk_buff *skb, const struct net_device *in, + const struct net_device *out, int (*okfn)(struct sk_buff *)) +{ + struct ipv6hdr *hdr; + u32 pkt_len; + struct nf_bridge_info *nf_bridge; + + if (skb->len < sizeof(struct ipv6hdr)) + goto inhdr_error; + + if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) + goto inhdr_error; + + hdr = skb->nh.ipv6h; + + if (hdr->version != 6) + goto inhdr_error; + + pkt_len = ntohs(hdr->payload_len); + + if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { + if (pkt_len + sizeof(struct ipv6hdr) > skb->len) + goto inhdr_error; + if (pkt_len + sizeof(struct ipv6hdr) < skb->len && + __pskb_trim(skb, pkt_len + sizeof(struct ipv6hdr))) + goto inhdr_error; + } +#if 0 + if (hdr->nexthdr == NEXTHDR_HOP) { + skb->h.raw = (u8*)(hdr+1); + if (ipv6_parse_hopopts(skb, offsetof(struct ipv6hdr, nexthdr))<0) + goto inhdr_error; + } +#endif +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug ^= (1 << NF_IP6_PRE_ROUTING); +#endif + if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) + return NF_DROP; + setup_pre_routing(skb); + + NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL, + br_nf_pre_routing_finish_ipv6); + + return NF_STOLEN; + +inhdr_error: + return NF_DROP; +} + +/* Direct IPv6 traffic to br_nf_pre_routing_ipv6. + * Replicate the checks that IPv4 does on packet reception. * Set skb->dev to the bridge device (i.e. parent of the * receiving device) to make netfilter happy, the REDIRECT * target in particular. Save the original destination IP - * address to be able to detect DNAT afterwards. - */ + * address to be able to detect DNAT afterwards. */ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) @@ -259,25 +357,39 @@ static unsigned int br_nf_pre_routing(un __u32 len; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; + struct vlan_ethhdr *hdr = (struct vlan_ethhdr *) + ((*pskb)->mac.ethernet); + if (skb->protocol == __constant_htons(ETH_P_IPV6) || IS_VLAN_IPV6) { +#ifdef CONFIG_SYSCTL + if (!brnf_call_ip6tables) + return NF_ACCEPT; +#endif + if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) + goto out; + + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + (skb)->nh.raw += VLAN_HLEN; + } + return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); + } #ifdef CONFIG_SYSCTL if (!brnf_call_iptables) return NF_ACCEPT; #endif - if (skb->protocol != __constant_htons(ETH_P_IP)) { - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *) - ((*pskb)->mac.ethernet); + if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP) + return NF_ACCEPT; - if (!IS_VLAN_IP) - return NF_ACCEPT; - if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) - goto out; - skb_pull(*pskb, VLAN_HLEN); - (*pskb)->nh.raw += VLAN_HLEN; - } else if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) + if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) goto out; + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + (skb)->nh.raw += VLAN_HLEN; + } + if (!pskb_may_pull(skb, sizeof(struct iphdr))) goto inhdr_error; @@ -305,17 +417,9 @@ static unsigned int br_nf_pre_routing(un #ifdef CONFIG_NETFILTER_DEBUG skb->nf_debug ^= (1 << NF_IP_PRE_ROUTING); #endif - if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) + if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) return NF_DROP; - - if (skb->pkt_type == PACKET_OTHERHOST) { - skb->pkt_type = PACKET_HOST; - nf_bridge->mask |= BRNF_PKT_TYPE; - } - - nf_bridge->mask |= BRNF_NF_BRIDGE_PREROUTING; - nf_bridge->physindev = skb->dev; - skb->dev = bridge_parent(skb->dev); + setup_pre_routing(skb); store_orig_dstaddr(skb); NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, @@ -336,8 +440,7 @@ out: * packet would pass through PRE_ROUTING again (which already * took place when the packet entered the bridge), but we * register an IPv4 PRE_ROUTING 'sabotage' hook that will - * prevent this from happening. - */ + * prevent this from happening. */ static unsigned int br_nf_local_in(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) @@ -364,7 +467,7 @@ static int br_nf_forward_finish(struct s skb->nf_debug ^= (1 << NF_BR_FORWARD); #endif - if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) { + if (skb->protocol != __constant_htons(ETH_P_ARP) && !IS_VLAN_ARP) { in = nf_bridge->physindev; if (nf_bridge->mask & BRNF_PKT_TYPE) { skb->pkt_type = PACKET_OTHERHOST; @@ -385,9 +488,8 @@ static int br_nf_forward_finish(struct s /* This is the 'purely bridged' case. For IP, we pass the packet to * netfilter with indev and outdev set to the bridge device, * but we are still able to filter on the 'real' indev/outdev - * because of the ipt_physdev.c module. For ARP, indev and outdev are the - * bridge ports. - */ + * because of the physdev module. For ARP, indev and outdev are the + * bridge ports. */ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) @@ -395,15 +497,17 @@ static unsigned int br_nf_forward_ip(uns struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + int pf; -#ifdef CONFIG_SYSCTL if (!skb->nf_bridge) return NF_ACCEPT; -#endif - if (skb->protocol != __constant_htons(ETH_P_IP)) { - if (!IS_VLAN_IP) - return NF_ACCEPT; + if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) + pf = PF_INET; + else + pf = PF_INET6; + + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { skb_pull(*pskb, VLAN_HLEN); (*pskb)->nh.raw += VLAN_HLEN; } @@ -421,7 +525,7 @@ static unsigned int br_nf_forward_ip(uns nf_bridge->mask |= BRNF_BRIDGED; nf_bridge->physoutdev = skb->dev; - NF_HOOK(PF_INET, NF_IP_FORWARD, skb, bridge_parent(in), + NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in), bridge_parent(out), br_nf_forward_finish); return NF_STOLEN; @@ -483,11 +587,10 @@ static int br_nf_local_out_finish(struct return 0; } - /* This function sees both locally originated IP packets and forwarded * IP packets (in both cases the destination device is a bridge * device). It also sees bridged-and-DNAT'ed packets. - * To be able to filter on the physical bridge devices (with the ipt_physdev.c + * To be able to filter on the physical bridge devices (with the physdev * module), we steal packets destined to a bridge device away from the * PF_INET/FORWARD and PF_INET/OUTPUT hook functions, and give them back later, * when we have determined the real output device. This is done in here. @@ -501,45 +604,44 @@ static int br_nf_local_out_finish(struct * this packet before, and so the packet was locally originated. We fake * the PF_INET/LOCAL_OUT hook. * Finally, if nf_bridge->physindev isn't NULL, then the packet was IP routed, - * so we fake the PF_INET/FORWARD hook. ipv4_sabotage_out() makes sure + * so we fake the PF_INET/FORWARD hook. ip_sabotage_out() makes sure * even routed packets that didn't arrive on a bridge interface have their - * nf_bridge->physindev set. - */ - + * nf_bridge->physindev set. */ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, - int (*_okfn)(struct sk_buff *)) + int (*okfn)(struct sk_buff *)) { - int (*okfn)(struct sk_buff *skb); - struct net_device *realindev; + 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); + int pf; -#ifdef CONFIG_SYSCTL if (!skb->nf_bridge) return NF_ACCEPT; -#endif - if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP) - return NF_ACCEPT; + if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) + pf = PF_INET; + else + pf = PF_INET6; +#ifdef CONFIG_NETFILTER_DEBUG /* Sometimes we get packets with NULL ->dst here (for example, - * running a dhcp client daemon triggers this). - */ - if (skb->dst == NULL) + * running a dhcp client daemon triggers this). This should now + * be fixed, but let's keep the check around. */ + if (skb->dst == NULL) { + printk(KERN_CRIT "br_netfilter: skb->dst == NULL."); return NF_ACCEPT; + } +#endif nf_bridge = skb->nf_bridge; nf_bridge->physoutdev = skb->dev; realindev = nf_bridge->physindev; /* Bridged, take PF_BRIDGE/FORWARD. - * (see big note in front of br_nf_pre_routing_finish) - */ + * (see big note in front of br_nf_pre_routing_finish) */ if (nf_bridge->mask & BRNF_BRIDGED_DNAT) { - okfn = br_forward_finish; - if (nf_bridge->mask & BRNF_PKT_TYPE) { skb->pkt_type = PACKET_OTHERHOST; nf_bridge->mask ^= BRNF_PKT_TYPE; @@ -550,41 +652,41 @@ static unsigned int br_nf_local_out(unsi } NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, realindev, - skb->dev, okfn); - } else { - struct net_device *realoutdev = bridge_parent(skb->dev); + skb->dev, br_forward_finish); + goto out; + } + realoutdev = bridge_parent(skb->dev); #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) - /* iptables should match -o br0.x */ - if (nf_bridge->netoutdev) - realoutdev = nf_bridge->netoutdev; + /* iptables should match -o br0.x */ + if (nf_bridge->netoutdev) + realoutdev = nf_bridge->netoutdev; #endif - okfn = br_nf_local_out_finish; - if (skb->protocol == __constant_htons(ETH_P_8021Q)) { - skb_pull(skb, VLAN_HLEN); - (*pskb)->nh.raw += VLAN_HLEN; - } - /* IP forwarded traffic has a physindev, locally - * generated traffic hasn't. - */ - if (realindev != NULL) { - if (((nf_bridge->mask & BRNF_DONT_TAKE_PARENT) == 0) && - has_bridge_parent(realindev)) - realindev = bridge_parent(realindev); - NF_HOOK_THRESH(PF_INET, NF_IP_FORWARD, skb, realindev, - realoutdev, okfn, - NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD + 1); - } else { + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + (*pskb)->nh.raw += VLAN_HLEN; + } + /* IP forwarded traffic has a physindev, locally + * generated traffic hasn't. */ + if (realindev != NULL) { + if (!(nf_bridge->mask & BRNF_DONT_TAKE_PARENT) && + has_bridge_parent(realindev)) + realindev = bridge_parent(realindev); + + NF_HOOK_THRESH(pf, NF_IP_FORWARD, skb, realindev, + realoutdev, br_nf_local_out_finish, + NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD + 1); + } else { #ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug ^= (1 << NF_IP_LOCAL_OUT); + skb->nf_debug ^= (1 << NF_IP_LOCAL_OUT); #endif - NF_HOOK_THRESH(PF_INET, NF_IP_LOCAL_OUT, skb, realindev, - realoutdev, okfn, - NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT + 1); - } + NF_HOOK_THRESH(pf, NF_IP_LOCAL_OUT, skb, realindev, + realoutdev, br_nf_local_out_finish, + NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT + 1); } +out: return NF_STOLEN; } @@ -598,6 +700,7 @@ static unsigned int br_nf_post_routing(u struct nf_bridge_info *nf_bridge = (*pskb)->nf_bridge; struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); struct net_device *realoutdev = bridge_parent(skb->dev); + int pf; #ifdef CONFIG_NETFILTER_DEBUG /* Be very paranoid. This probably won't happen anymore, but let's @@ -609,19 +712,15 @@ static unsigned int br_nf_post_routing(u } #endif -#ifdef CONFIG_SYSCTL if (!nf_bridge) return NF_ACCEPT; -#endif - if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP) - return NF_ACCEPT; + if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) + pf = PF_INET; + else + pf = PF_INET6; #ifdef CONFIG_NETFILTER_DEBUG - /* Sometimes we get packets with NULL ->dst here (for example, - * running a dhcp client daemon triggers this). This should now - * be fixed, but let's keep the check around. - */ if (skb->dst == NULL) { printk(KERN_CRIT "br_netfilter: skb->dst == NULL."); goto print_error; @@ -631,8 +730,7 @@ static unsigned int br_nf_post_routing(u #endif /* We assume any code from br_dev_queue_push_xmit onwards doesn't care - * about the value of skb->pkt_type. - */ + * about the value of skb->pkt_type. */ if (skb->pkt_type == PACKET_OTHERHOST) { skb->pkt_type = PACKET_HOST; nf_bridge->mask |= BRNF_PKT_TYPE; @@ -649,8 +747,8 @@ static unsigned int br_nf_post_routing(u if (nf_bridge->netoutdev) realoutdev = nf_bridge->netoutdev; #endif - NF_HOOK(PF_INET, NF_IP_POST_ROUTING, skb, NULL, - realoutdev, br_dev_queue_push_xmit); + NF_HOOK(pf, NF_IP_POST_ROUTING, skb, NULL, realoutdev, + br_dev_queue_push_xmit); return NF_STOLEN; @@ -668,12 +766,10 @@ print_error: } -/* IPv4/SABOTAGE *****************************************************/ - -/* Don't hand locally destined packets to PF_INET/PRE_ROUTING - * for the second time. - */ -static unsigned int ipv4_sabotage_in(unsigned int hook, struct sk_buff **pskb, +/* IP/SABOTAGE *****************************************************/ +/* Don't hand locally destined packets to PF_INET(6)/PRE_ROUTING + * for the second time. */ +static unsigned int ip_sabotage_in(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) { @@ -686,19 +782,27 @@ static unsigned int ipv4_sabotage_in(uns return NF_ACCEPT; } -/* Postpone execution of PF_INET/FORWARD, PF_INET/LOCAL_OUT - * and PF_INET/POST_ROUTING until we have done the forwarding - * decision in the bridge code and have determined skb->physoutdev. - */ -static unsigned int ipv4_sabotage_out(unsigned int hook, struct sk_buff **pskb, +/* Postpone execution of PF_INET(6)/FORWARD, PF_INET(6)/LOCAL_OUT + * and PF_INET(6)/POST_ROUTING until we have done the forwarding + * decision in the bridge code and have determined nf_bridge->physoutdev. */ +static unsigned int ip_sabotage_out(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) { struct sk_buff *skb = *pskb; #ifdef CONFIG_SYSCTL - if (!brnf_call_iptables && !skb->nf_bridge) - return NF_ACCEPT; + if (!skb->nf_bridge) { + struct vlan_ethhdr *hdr = + (struct vlan_ethhdr *)(skb->mac.ethernet); + + if (skb->protocol == __constant_htons(ETH_P_IP) || + IS_VLAN_IP) { + if (!brnf_call_iptables) + return NF_ACCEPT; + } else if (!brnf_call_ip6tables) + return NF_ACCEPT; + } #endif if ((out->hard_start_xmit == br_dev_xmit && @@ -721,8 +825,7 @@ static unsigned int ipv4_sabotage_out(un * will need the indev then. For a brouter, the real indev * can be a bridge port, so we make sure br_nf_local_out() * doesn't use the bridge parent of the indev by using - * the BRNF_DONT_TAKE_PARENT mask. - */ + * the BRNF_DONT_TAKE_PARENT mask. */ if (hook == NF_IP_FORWARD && nf_bridge->physindev == NULL) { nf_bridge->mask &= BRNF_DONT_TAKE_PARENT; nf_bridge->physindev = (struct net_device *)in; @@ -742,8 +845,7 @@ static unsigned int ipv4_sabotage_out(un /* For br_nf_local_out we need (prio = NF_BR_PRI_FIRST), to insure that innocent * PF_BRIDGE/NF_BR_LOCAL_OUT functions don't get bridged traffic as input. * For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because - * ip_refrag() can return NF_STOLEN. - */ + * ip_refrag() can return NF_STOLEN. */ static struct nf_hook_ops br_nf_ops[] = { { .hook = br_nf_pre_routing, .owner = THIS_MODULE, @@ -775,26 +877,46 @@ static struct nf_hook_ops br_nf_ops[] = .pf = PF_BRIDGE, .hooknum = NF_BR_POST_ROUTING, .priority = NF_BR_PRI_LAST, }, - { .hook = ipv4_sabotage_in, + { .hook = ip_sabotage_in, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_PRE_ROUTING, .priority = NF_IP_PRI_FIRST, }, - { .hook = ipv4_sabotage_out, + { .hook = ip_sabotage_in, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_PRE_ROUTING, + .priority = NF_IP6_PRI_FIRST, }, + { .hook = ip_sabotage_out, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_FORWARD, .priority = NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD, }, - { .hook = ipv4_sabotage_out, + { .hook = ip_sabotage_out, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_FORWARD, + .priority = NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD, }, + { .hook = ip_sabotage_out, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_LOCAL_OUT, .priority = NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT, }, - { .hook = ipv4_sabotage_out, + { .hook = ip_sabotage_out, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_LOCAL_OUT, + .priority = NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT, }, + { .hook = ip_sabotage_out, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_POST_ROUTING, .priority = NF_IP_PRI_FIRST, }, + { .hook = ip_sabotage_out, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_POST_ROUTING, + .priority = NF_IP6_PRI_FIRST, }, }; #ifdef CONFIG_SYSCTL @@ -824,6 +946,14 @@ static ctl_table brnf_table[] = { .ctl_name = NET_BRIDGE_NF_CALL_IPTABLES, .procname = "bridge-nf-call-iptables", .data = &brnf_call_iptables, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &brnf_sysctl_call_tables, + }, + { + .ctl_name = NET_BRIDGE_NF_CALL_IP6TABLES, + .procname = "bridge-nf-call-ip6tables", + .data = &brnf_call_ip6tables, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &brnf_sysctl_call_tables, --- linux-2.6.8.1/Documentation/networking/ip-sysctl.txt.old 2004-08-28 16:15:09.000000000 +0200 +++ linux-2.6.8.1/Documentation/networking/ip-sysctl.txt 2004-08-28 16:19:23.000000000 +0200 @@ -837,6 +837,11 @@ bridge-nf-call-iptables - BOOLEAN 0 : disable this. Default: 1 +bridge-nf-call-ip6tables - BOOLEAN + 1 : pass bridged IPv6 traffic to ip6tables' chains. + 0 : disable this. + Default: 1 + bridge-nf-filter-vlan-tagged - BOOLEAN 1 : pass bridged vlan-tagged ARP/IP traffic to arptables/iptables. 0 : disable this. From jurriaan@rivierenland.xs4all.nl Sat Aug 28 08:33:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 08:33:53 -0700 (PDT) Received: from smtp-vbr9.xs4all.nl (smtp-vbr9.xs4all.nl [194.109.24.29]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7SFXmed007352 for ; Sat, 28 Aug 2004 08:33:48 -0700 Received: from zeeotter.xs4all.nl (zeeotter.xs4all.nl [80.126.31.149]) by smtp-vbr9.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7SFXZ3H039554 for ; Sat, 28 Aug 2004 17:33:35 +0200 (CEST) (envelope-from jurriaan@rivierenland.xs4all.nl) Received: (qmail 11795 invoked from network); 28 Aug 2004 15:33:13 -0000 Received: from unknown (HELO rivierenland.xs4all.nl) (unknown) by unknown with SMTP; 28 Aug 2004 15:33:13 -0000 Received: (qmail 26313 invoked by uid 1000); 28 Aug 2004 15:33:10 -0000 Date: Sat, 28 Aug 2004 17:33:10 +0200 From: Jurriaan To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: 2.6.9-rc1 & 2.6.9-rc1-mm1: can't shutdown / unregister_netdevice complains about my ipv6-in-ipv4 tunnel Message-ID: <20040828153310.GA25626@middle.of.nowhere> Reply-To: Jurriaan Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Message-Flag: Still using Outlook? As you can see, it has some errors. User-Agent: Mutt/1.5.6+20040818i X-Virus-Scanned: by XS4ALL Virus Scanner X-archive-position: 8129 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: thunder7@xs4all.nl Precedence: bulk X-list: netdev When trying to shutdown my system with both 2.6.9-rc1 and 2.6.9-rc1-mm1, I see: unregister_netdevice: waiting for xs6all to become free etc. when trying to reboot or shutdown. I didn't see this in 2.6.8.1 nor in 2.6.8.1-mm1. This is a plain ipv6-over-ipv4 tunnel like this: /etc/network/interfaces: auto xs6all iface xs6all inet6 v4tunnel endpoint xxx.xxx.xxx.xxx up ip route add 2000::0/3 via xxx:xxx:xxx:xxx:xxx:xxx address xxx:xxx:xxx:xxx:xxx:xxx netmask 64 up ip tunnel change xs6all ttl 64 I'm running Debian Unstable with all the latest updates as of today. Thanks for any hints, Jurriaan -- If an elderly but distinguished scientist says that something is possible he is almost certainly right, but if he says that it is impossible he is very probably wrong. Arthur C Clarke Debian (Unstable) GNU/Linux 2.6.7-mm5 2x6078 bogomips load 0.15 From tom@huno.net Sat Aug 28 15:48:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 15:48:41 -0700 (PDT) Received: from issv0177.isis.de (issv0177.isis.de [195.158.131.227]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7SMmXIm018830 for ; Sat, 28 Aug 2004 15:48:36 -0700 Received: from issv0171.isis.de (ISSV0171 [172.16.2.31]) by issv0177.isis.de (Postfix) with SMTP id 2DCF3DC3DB for ; Sun, 29 Aug 2004 00:48:24 +0200 (CEST) Received: (qmail 28830 invoked by uid 1010); 28 Aug 2004 22:48:23 -0000 Received: from unknown (HELO knecht.alpha) ([195.158.137.67]) (envelope-sender ) by mail.isis.de (qmail-ldap-1.03) with SMTP for ; 28 Aug 2004 22:48:23 -0000 Received: from ATHLET (athlet.alpha [192.168.1.101]) by knecht.alpha (Postfix) with ESMTP id 7E50D91FF8; Sun, 29 Aug 2004 00:48:18 +0200 (CEST) Date: Sun, 29 Aug 2004 00:49:38 +0200 From: "Thomas P." Reply-To: thomas X-Priority: 3 (Normal) Message-ID: <145338506.20040829004938@huno.net> To: netdev@oss.sgi.com Cc: hadi@cyberus.ca Subject: CONFIG_NET_CLS_ACT massive debug output MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 8130 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tom@huno.net Precedence: bulk X-list: netdev hi, i'm getting a lot of the following messages: Aug 28 23:31:32 knecht kernel: ing_filter: fixed ppp0 out ppp0 Aug 28 23:32:02 knecht last message repeated 4 times Aug 28 23:32:32 knecht last message repeated 78 times Now i found the following: + if (NULL == skb->input_dev) { + skb->input_dev = skb->dev; + printk("ing_filter: fixed %s out %s\n",skb->input_dev->name,skb->dev->name); + } and i guess i could just comment it out, but the message is probably there for a reason. So is there anything wrong? The rule that causes this is: tc qdisc add dev ppp0 handle ffff: ingress tc filter add dev ppp0 parent ffff: protocol ip prio 50 u32 match ip src \ 0.0.0.0/0 police rate 1416kbit burst 10k drop flowid :1 Thanks for your help! Thomas From jgarzik@pobox.com Sat Aug 28 15:58:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 15:58: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 i7SMwnXZ019267 for ; Sat, 28 Aug 2004 15:58:51 -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 1C1C9a-0003Ew-5n; Sat, 28 Aug 2004 23:58:34 +0100 Message-ID: <41310E0E.1060909@pobox.com> Date: Sat, 28 Aug 2004 18:58:22 -0400 From: Jeff Garzik 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: tharbaugh@lnxi.com CC: hadi@cyberus.ca, "Venkatesan, Ganesh" , netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" Subject: Re: [PATCH] abysmal e1000 performance (DITR) References: <468F3FDA28AA87429AD807992E22D07E014CEF36@orsmsx408> <1093542930.1027.124.camel@jzny.localdomain> <1093550644.20769.130.camel@tubarao> <412E478A.2000806@pobox.com> <1093555737.20769.135.camel@tubarao> In-Reply-To: <1093555737.20769.135.camel@tubarao> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8131 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 Thayne Harbaugh wrote: > --- drivers/net/e1000/e1000_param.c.broken_ditr 2004-08-26 15:40:34.436456736 -0600 > +++ drivers/net/e1000/e1000_param.c 2004-08-26 15:49:07.186506880 -0600 > @@ -212,7 +212,7 @@ > #define MAX_TXABSDELAY 0xFFFF > #define MIN_TXABSDELAY 0 > > -#define DEFAULT_ITR 1 > +#define DEFAULT_ITR 8000 > #define MAX_ITR 100000 > #define MIN_ITR 100 applied From jgarzik@pobox.com Sat Aug 28 16:15:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 16: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 i7SNFkeP019911 for ; Sat, 28 Aug 2004 16:15: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 1C1CQ6-0003jF-H2; Sun, 29 Aug 2004 00:15:38 +0100 Message-ID: <4131120E.7010108@pobox.com> Date: Sat, 28 Aug 2004 19:15:26 -0400 From: Jeff Garzik 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: Francois Romieu CC: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8.1-mm4 8/11] r8169: Tx checksum offload References: <20040823224100.GA14680@electric-eye.fr.zoreil.com> <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> In-Reply-To: <20040823225505.GH20726@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8132 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 Francois Romieu wrote: > +static inline u32 rtl8169_tx_csum(struct sk_buff *skb) > +{ > + if (skb->ip_summed == CHECKSUM_HW) { > + const struct iphdr *ip = skb->nh.iph; > + > + if (ip->protocol == IPPROTO_TCP) > + return IPCS | TCPCS; > + else if (ip->protocol == IPPROTO_UDP) > + return IPCS | UDPCS; > + BUG(); > + } > + return 0; > +} I am applying this patch BUT... BUG() is a bit too "rude" when you can obviously return safely. Prefer WARN_ON() because we don't need to kill the machine for this condition. From jgarzik@pobox.com Sat Aug 28 16:21:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 16:21:44 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7SNLdIs023480 for ; Sat, 28 Aug 2004 16:21:40 -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 1C1CVn-0003sR-91; Sun, 29 Aug 2004 00:21:31 +0100 Message-ID: <4131136E.9070702@pobox.com> Date: Sat, 28 Aug 2004 19:21:18 -0400 From: Jeff Garzik 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: Francois Romieu CC: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8.1-mm4 11/11] r8169: vlan support References: <20040823224425.GA20726@electric-eye.fr.zoreil.com> <20040823224548.GB20726@electric-eye.fr.zoreil.com> <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> <20040823225620.GI20726@electric-eye.fr.zoreil.com> <20040823225713.GJ20726@electric-eye.fr.zoreil.com> <20040823225821.GK20726@electric-eye.fr.zoreil.com> In-Reply-To: <20040823225821.GK20726@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8133 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 all 11 patches to netdev-2.6. does this series of patches imply that a librealtek kernel module is coming soon? There's an awful lot of code duplication (due to hardware similarties) in r8169, 8139cp, and 8139too. Jeff From jgarzik@pobox.com Sat Aug 28 16:26:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 16:26:20 -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 i7SNQFsc023840 for ; Sat, 28 Aug 2004 16:26:15 -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 1C1CaF-0003zI-CV; Sun, 29 Aug 2004 00:26:07 +0100 Message-ID: <41311483.4090806@pobox.com> Date: Sat, 28 Aug 2004 19:25:55 -0400 From: Jeff Garzik 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: Olaf Hering CC: netdev@oss.sgi.com Subject: Re: [PATCH] remove old version check from mac8390 References: <20040821154906.GA14498@suse.de> In-Reply-To: <20040821154906.GA14498@suse.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8134 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 Aug 28 16:28:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 16:28:20 -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 i7SNSFdP024163 for ; Sat, 28 Aug 2004 16:28:15 -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 1C1Cc9-00042h-Sn; Sun, 29 Aug 2004 00:28:06 +0100 Message-ID: <413114FA.2000609@pobox.com> Date: Sat, 28 Aug 2004 19:27:54 -0400 From: Jeff Garzik 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: Jouni Malinen CC: hostap , prism54-devel@prism54.org, Netdev Subject: Re: [PATCH] wpa_supplicant: update driver_prism54.c References: <20040819232720.GD6044@ruslug.rutgers.edu> <20040820024645.GA7154@jm.kir.nu> In-Reply-To: <20040820024645.GA7154@jm.kir.nu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8135 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 Jouni Malinen wrote: > On Thu, Aug 19, 2004 at 07:27:20PM -0400, Luis R. Rodriguez wrote: > > >>the attached patch adds some startup work for wpa_supplicant support for >>prism54. I just integrated some work for wpa_supplicant support into >>prism54 CVS and sumbitted to Jeff for inclusion in 2.6 and 2.4. This >>work is not yet complete but should get the ball rolling for us to >>complete it. > > > Thanks, applied to wpa_supplicant CVS. I did not test this yet, but I > hope to get some time to test the latest CVS version of the driver at > some point. Am I ever going to see an update to HostAP in wireless-2.6? Jeff From jgarzik@pobox.com Sat Aug 28 16:36:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 16:36: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 i7SNaqpU024558 for ; Sat, 28 Aug 2004 16:36:53 -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 1C1CkV-0004Jr-SN; Sun, 29 Aug 2004 00:36:44 +0100 Message-ID: <413116FF.7000701@pobox.com> Date: Sat, 28 Aug 2004 19:36:31 -0400 From: Jeff Garzik 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: ravinandan.arakali@s2io.com CC: netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel References: <001401c48194$62497260$9610100a@S2IOtech.com> In-Reply-To: <001401c48194$62497260$9610100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8136 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 is there a follow-up patch addressing the comments ? From garzik@havoc.gtf.org Sat Aug 28 17:21:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 17:22:02 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7T0LsXv025490 for ; Sat, 28 Aug 2004 17:21:55 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 8D10E7680; Sat, 28 Aug 2004 20:21:38 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7T0Laka014281; Sat, 28 Aug 2004 20:21:36 -0400 Date: Sat, 28 Aug 2004 20:21:36 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.9-rc net driver fixes Message-ID: <20040829002136.GA14255@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: 8137 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: drivers/net/e1000/e1000_param.c | 2 drivers/net/ibm_emac/ibm_emac.h | 32 +++++++-------- drivers/net/ibm_emac/ibm_emac_core.c | 74 ++++++++++++++++++++++------------- drivers/net/ibm_emac/ibm_emac_core.h | 2 drivers/net/sis900.c | 1 5 files changed, 66 insertions(+), 45 deletions(-) through these ChangeSets: (04/08/28 1.1914) [PATCH] ibm_emac driver updates Optimizes transmit windows for improved performance and to prevent TX underruns. Fixes driver registration error handling. Fixes ZMII and RGMII thinkos. Fixes for MDIO handling issues from Ralph Siemsen. Please apply. Signed-off-by: Matt Porter (04/08/28 1.1913) [netdrvr e1000] disable DITR, which apparently hurts performance (04/08/28 1.1912) [PATCH] Problem with SiS900 - Unknown PHY From: Laurent Some time ago, I sent on this list a mail about my strange problem with my SiS900 network card (Subject was Sluggish performances with FreeBSD) To sum up, when my card is in 100Mb mode, I have poor throughput but in 10Mb, all seems normal. After some tests, it seems these results was due to a misdetection of the PHY device. mii-tool reports : product info: vendor 08:00:17, model 3 rev 0 and after some search on the web, I found it's a NS DP83847 which is very similar. Signed-off-by: Andrew Morton diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c --- a/drivers/net/e1000/e1000_param.c 2004-08-28 20:20:30 -04:00 +++ b/drivers/net/e1000/e1000_param.c 2004-08-28 20:20:30 -04:00 @@ -212,7 +212,7 @@ #define MAX_TXABSDELAY 0xFFFF #define MIN_TXABSDELAY 0 -#define DEFAULT_ITR 1 +#define DEFAULT_ITR 8000 #define MAX_ITR 100000 #define MIN_ITR 100 diff -Nru a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h --- a/drivers/net/ibm_emac/ibm_emac.h 2004-08-28 20:20:30 -04:00 +++ b/drivers/net/ibm_emac/ibm_emac.h 2004-08-28 20:20:30 -04:00 @@ -228,6 +228,21 @@ (desc & EMAC_BAD_RX_PACKET) #endif +/* SoC implementation specific EMAC register defaults */ +#if defined(CONFIG_440GP) +#define EMAC_RWMR_DEFAULT 0x80009000 +#define EMAC_TMR0_DEFAULT 0x00000000 +#define EMAC_TMR1_DEFAULT 0xf8640000 +#elif defined(CONFIG_440GX) +#define EMAC_RWMR_DEFAULT 0x1000a200 +#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_2_32 +#define EMAC_TMR1_DEFAULT 0xa00f0000 +#else +#define EMAC_RWMR_DEFAULT 0x0f002000 +#define EMAC_TMR0_DEFAULT 0x00000000 +#define EMAC_TMR1_DEFAULT 0x380f0000 +#endif /* CONFIG_440GP */ + /* Revision specific EMAC register defaults */ #ifdef CONFIG_IBM_EMAC4 #define EMAC_M1_DEFAULT (EMAC_M1_BASE | \ @@ -236,7 +251,7 @@ #define EMAC_RMR_DEFAULT (EMAC_RMR_BASE | \ EMAC_RMR_RFAF_128_2048) #define EMAC_TMR0_XMIT (EMAC_TMR0_GNP0 | \ - EMAC_TMR0_TFAE_128_2048) + EMAC_TMR0_DEFAULT) #define EMAC_TRTR_DEFAULT EMAC_TRTR_1024 #else /* !CONFIG_IBM_EMAC4 */ #define EMAC_M1_DEFAULT EMAC_M1_BASE @@ -244,20 +259,5 @@ #define EMAC_TMR0_XMIT EMAC_TMR0_GNP0 #define EMAC_TRTR_DEFAULT EMAC_TRTR_1600 #endif /* CONFIG_IBM_EMAC4 */ - -/* SoC implementation specific EMAC register defaults */ -#if defined(CONFIG_440GP) -#define EMAC_RWMR_DEFAULT 0x80009000 -#define EMAC_TMR0_DEFAULT 0x00000000 -#define EMAC_TMR1_DEFAULT 0xf8640000 -#elif defined(CONFIG_440GX) -#define EMAC_RWMR_DEFAULT 0x1000a200 -#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_128_2048 -#define EMAC_TMR1_DEFAULT 0x88810000 -#else -#define EMAC_RWMR_DEFAULT 0x0f002000 -#define EMAC_TMR0_DEFAULT 0x00000000 -#define EMAC_TMR1_DEFAULT 0x380f0000 -#endif /* CONFIG_440GP */ #endif diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c --- a/drivers/net/ibm_emac/ibm_emac_core.c 2004-08-28 20:20:30 -04:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.c 2004-08-28 20:20:30 -04:00 @@ -90,23 +90,24 @@ #define RGMII_PRIV(ocpdev) ((struct ibm_ocp_rgmii*)ocp_get_drvdata(ocpdev)) -static unsigned int rgmii_enable[] = - { RGMII_RTBI, RGMII_RGMII, RGMII_TBI, RGMII_GMII }; +static unsigned int rgmii_enable[] = { + RGMII_RTBI, + RGMII_RGMII, + RGMII_TBI, + RGMII_GMII +}; -static unsigned int rgmii_speed_mask[] = { 0, - 0, +static unsigned int rgmii_speed_mask[] = { RGMII_MII2_SPDMASK, RGMII_MII3_SPDMASK }; -static unsigned int rgmii_speed100[] = { 0, - 0, +static unsigned int rgmii_speed100[] = { RGMII_MII2_100MB, RGMII_MII3_100MB }; -static unsigned int rgmii_speed1000[] = { 0, - 0, +static unsigned int rgmii_speed1000[] = { RGMII_MII2_1000MB, RGMII_MII3_1000MB }; @@ -122,11 +123,21 @@ ~(ZMII_MDI0 | ZMII_MDI1 | ZMII_MDI3)}, {ZMII_SMII3, ZMII_RMII3, ZMII_MII3, ~(ZMII_MDI0 | ZMII_MDI1 | ZMII_MDI2)} }; -static unsigned int mdi_enable[] = - { ZMII_MDI0, ZMII_MDI1, ZMII_MDI2, ZMII_MDI3 }; + +static unsigned int mdi_enable[] = { + ZMII_MDI0, + ZMII_MDI1, + ZMII_MDI2, + ZMII_MDI3 +}; static unsigned int zmii_speed = 0x0; -static unsigned int zmii_speed100[] = { ZMII_MII0_100MB, ZMII_MII1_100MB }; +static unsigned int zmii_speed100[] = { + ZMII_MII0_100MB, + ZMII_MII1_100MB, + ZMII_MII2_100MB, + ZMII_MII3_100MB +}; /* Since multiple EMACs share MDIO lines in various ways, we need * to avoid re-using the same PHY ID in cases where the arch didn't @@ -367,6 +378,7 @@ int emac_phy_read(struct net_device *dev, int mii_id, int reg) { + int count; uint32_t stacr; struct ocp_enet_private *fep = dev->priv; emac_t *emacp = fep->emacp; @@ -385,9 +397,13 @@ emacp = fep->emacp; } - udelay(MDIO_DELAY); + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); - if ((in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) { + if ((stacr & EMAC_STACR_OC) == 0) { printk(KERN_WARNING "%s: PHY read timeout #1!\n", dev->name); return -1; } @@ -398,8 +414,11 @@ out_be32(&emacp->em0stacr, stacr); - udelay(MDIO_DELAY); - stacr = in_be32(&emacp->em0stacr); + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); if ((stacr & EMAC_STACR_OC) == 0) { printk(KERN_WARNING "%s: PHY read timeout #2!\n", dev->name); @@ -419,6 +438,7 @@ void emac_phy_write(struct net_device *dev, int mii_id, int reg, int data) { + int count; uint32_t stacr; struct ocp_enet_private *fep = dev->priv; emac_t *emacp = fep->emacp; @@ -437,9 +457,13 @@ emacp = fep->emacp; } - udelay(MDIO_DELAY); + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); - if ((in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) { + if ((stacr & EMAC_STACR_OC) == 0) { printk(KERN_WARNING "%s: PHY write timeout #2!\n", dev->name); return; } @@ -451,9 +475,12 @@ out_be32(&emacp->em0stacr, stacr); - udelay(MDIO_DELAY); + while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) + && (count++ < 5000)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); - if ((in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) + if ((stacr & EMAC_STACR_OC) == 0) printk(KERN_WARNING "%s: PHY write timeout #2!\n", dev->name); /* Check for a write error */ @@ -1940,8 +1967,6 @@ static int __init emac_init(void) { - int rc; - printk(KERN_INFO DRV_NAME ": " DRV_DESC ", version " DRV_VERSION "\n"); printk(KERN_INFO "Maintained by " DRV_AUTHOR "\n"); @@ -1950,13 +1975,8 @@ skb_res); skb_res = 2; } - rc = ocp_register_driver(&emac_driver); - if (rc < 0) { - ocp_unregister_driver(&emac_driver); - return -ENODEV; - } - return 0; + return ocp_register_driver(&emac_driver); } static void __exit emac_exit(void) diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h --- a/drivers/net/ibm_emac/ibm_emac_core.h 2004-08-28 20:20:30 -04:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.h 2004-08-28 20:20:30 -04:00 @@ -67,7 +67,7 @@ #define TX_TIMEOUT (2*HZ) /* MDIO latency delay */ -#define MDIO_DELAY 50 +#define MDIO_DELAY 250 /* Power managment shift registers */ #define IBM_CPM_EMMII 0 /* Shift value for MII */ diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2004-08-28 20:20:30 -04:00 +++ b/drivers/net/sis900.c 2004-08-28 20:20:30 -04:00 @@ -124,6 +124,7 @@ { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, { "ICS LAN PHY", 0x0015, 0xF440, LAN }, { "NS 83851 PHY", 0x2000, 0x5C20, MIX }, + { "NS 83847 PHY", 0x2000, 0x5C30, MIX }, { "Realtek RTL8201 PHY", 0x0000, 0x8200, LAN }, { "VIA 6103 PHY", 0x0101, 0x8f20, LAN }, {NULL,}, From garzik@havoc.gtf.org Sat Aug 28 17:26:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 17:26:25 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7T0QK64025862 for ; Sat, 28 Aug 2004 17:26:20 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 80C8576B6; Sat, 28 Aug 2004 20:26:06 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7T0Q6TA014451; Sat, 28 Aug 2004 20:26:06 -0400 Date: Sat, 28 Aug 2004 20:26:06 -0400 From: Jeff Garzik To: Marcelo Tosatti Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.4.x net driver updates Message-ID: <20040829002606.GA14433@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: 8138 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.4 This will update the following files: drivers/net/e1000/e1000_param.c | 2 +- drivers/net/fealnx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) through these ChangeSets: (04/08/28 1.1550) [netdrvr fealnx] fix spin_unlock_irqrestore() usage (04/08/28 1.1549) [netdrvr e1000] disable DITR, which apparently hurts performance diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c --- a/drivers/net/e1000/e1000_param.c 2004-08-28 20:25:30 -04:00 +++ b/drivers/net/e1000/e1000_param.c 2004-08-28 20:25:30 -04:00 @@ -212,7 +212,7 @@ #define MAX_TXABSDELAY 0xFFFF #define MIN_TXABSDELAY 0 -#define DEFAULT_ITR 1 +#define DEFAULT_ITR 8000 #define MAX_ITR 100000 #define MIN_ITR 100 diff -Nru a/drivers/net/fealnx.c b/drivers/net/fealnx.c --- a/drivers/net/fealnx.c 2004-08-28 20:25:30 -04:00 +++ b/drivers/net/fealnx.c 2004-08-28 20:25:30 -04:00 @@ -1796,7 +1796,7 @@ unsigned long flags; spin_lock_irqsave(lp, flags); __set_rx_mode(dev); - spin_unlock_irqrestore(&lp, flags); + spin_unlock_irqrestore(lp, flags); } From garzik@havoc.gtf.org Sat Aug 28 18:00:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 18:00:34 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7T10QOi026682 for ; Sat, 28 Aug 2004 18:00:27 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id DF01076A0; Sat, 28 Aug 2004 21:00:13 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7T10DRN016388; Sat, 28 Aug 2004 21:00:13 -0400 Date: Sat, 28 Aug 2004 21:00:13 -0400 From: Jeff Garzik To: Andrew Morton , netdev@oss.sgi.com Cc: mcgrof@studorgs.rutgers.edu Subject: netdev-2.6 queue updated Message-ID: <20040829010013.GA16237@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: 8139 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 Still got a huge set of patches from Al Viro (ethtool_ops conversions for most remaining drivers), and prism54 patches from Luis and Margit to apply, so expect another update tomorrow. 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-rc1-bk4-netdev1.patch.bz2 This will update the following files: drivers/net/8139too.c | 14 drivers/net/Kconfig | 9 drivers/net/defxx.c | 144 ++++----- drivers/net/defxx.h | 2 drivers/net/mac8390.c | 4 drivers/net/r8169.c | 564 ++++++++++++++++++++++++++---------- drivers/net/tulip/de4x5.c | 2 drivers/net/wireless/airo.c | 45 +- drivers/net/wireless/wavelan.c | 19 - drivers/net/wireless/wavelan.p.h | 3 drivers/net/wireless/wavelan_cs.c | 23 - drivers/net/wireless/wavelan_cs.p.h | 3 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 | 212 +++++++++---- net/irda/irlan/irlan_client.c | 2 18 files changed, 816 insertions(+), 360 deletions(-) through these ChangeSets: Andrew Morton: o de4x5 warning fix François Romieu: 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} Jean Tourrilhes: o wireless-drivers-update-for-we-17.patch o wireless-extension-v17-for-linus.patch Maciej W. Rozycki: o defxx device name fixes o defxx trivial updates Mika Kukkonen: o sparse: fix warnings in net/irda/* Olaf Hering: o remove old version check from mac8390 Rene Herman: o 8139too Interframe Gap Time From bcrl@kvack.org Sat Aug 28 20:31:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 20:31:42 -0700 (PDT) Received: from kanga.kvack.org (kanga.kvack.org [66.96.29.28]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7T3Vb0Q032409 for ; Sat, 28 Aug 2004 20:31:37 -0700 Received: (from localhost user: 'bcrl' uid#63042 fake: STDIN (bcrl@kanga.kvack.org)) by kvack.org id ; Sat, 28 Aug 2004 23:31:16 -0400 Date: Sat, 28 Aug 2004 23:31:16 -0400 From: Benjamin LaHaise To: netdev@oss.sgi.com Subject: fib route create slow Message-ID: <20040829033115.GA6467@kvack.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 8140 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bcrl@kvack.org Precedence: bulk X-list: netdev Hello folks, As some of you may be aware, I've been working on an L2TP implementation again recently. To give folks a bit of background, L2TP is used by a number of DSL providers to tunnel PPP sessions to ISPs. At least with one local provider, all of the tunnels will occasionally get dropped as they "service" the system. The end result is that the time it takes for all of the incoming sessions to come up is very important. The codebase I'm working on is able to do this in close to O(1) time for each new session in the userland and kernel l2tp components. Unfortunately, after patching dev_get_by_name and dev_get_by_index (I'll post that after cleaning it up), the route cache comes up on top as doubling and quadrupling the amount of time for each 1000 new interfaces: Interfaces Time Create only 1000 0m2.349s 1.507049s 2000 0m9.745s 6.401269s 3000 0m25.932s 16.905815s 4000 0m48.450s 31.442625s 5000 1m19.064s 51.704020s The interfaces are particularly boring: each has the same local address with a different remote address. This configuration is substantially worse than setting each interface to use a different local address. In any event, what I'm wondering is if there is any ongoing work (or planned work) to replace the present fib data structures with something that scales better for large numbers of interfaces and routes? This work has been done on 2.4.21-rhel, but 2.6 exhibits the same behaviour. Are there any other cases that an overhaul should consider? Any input is appreciated. Cheers, -ben ...lots of boring entries... 6 rmqueue 0.0078 7 __kmem_cache_alloc 0.0292 8 kfree 0.1000 42 SHATransform 0.1382 113 proc_match 1.1771 269 rt_run_flush 1.5284 301 neigh_parms_release 1.8813 1330 fn_hash_flush 6.3942 1820 fib_create_info 1.6978 2976 fib_sync_down 18.6000 7026 total 0.0041 -- "Time is what keeps everything from happening all at once." -- John Wheeler From davem@davemloft.net Sat Aug 28 22:21:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 22:22:05 -0700 (PDT) Received: from smtp012.mail.yahoo.com (smtp012.mail.yahoo.com [216.136.173.32]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7T5LvY4001751 for ; Sat, 28 Aug 2004 22:21:57 -0700 Received: from unknown (HELO cheetah.davemloft.net) (davem?330@63.197.226.105 with login) by smtp012.mail.yahoo.com with SMTP; 29 Aug 2004 05:21:49 -0000 Date: Sat, 28 Aug 2004 22:21:21 -0700 From: "David S. Miller" To: Benjamin LaHaise Cc: netdev@oss.sgi.com Subject: Re: fib route create slow Message-Id: <20040828222121.742b6225.davem@davemloft.net> In-Reply-To: <20040829033115.GA6467@kvack.org> References: <20040829033115.GA6467@kvack.org> Organization: DaveM Loft Enterprises X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8141 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, 28 Aug 2004 23:31:16 -0400 Benjamin LaHaise wrote: > 1820 fib_create_info 1.6978 > 2976 fib_sync_down 18.6000 > 7026 total 0.0041 This'll get fixed in the next month or so, promise. From leonid.grossman@s2io.com Sat Aug 28 22:53:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 22:53: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 i7T5rMCM002485 for ; Sat, 28 Aug 2004 22:53: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 i7T5r7je006990; Sun, 29 Aug 2004 01:53:07 -0400 (EDT) Received: from lgt40 ([192.168.111.76]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i7T5r0qG010550; Sun, 29 Aug 2004 01:53:01 -0400 (EDT) Message-Id: <200408290553.i7T5r0qG010550@guinness.s2io.com> From: "Leonid Grossman" To: "'Jeff Garzik'" , Cc: , Subject: RE: Patch submission for S2io Xframe driver to 2.6 kernel Date: Sat, 28 Aug 2004 22:53:00 -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: AcSNV+GcRpVh5G67QROjVlB3t93CMAANDWeg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 In-Reply-To: <413116FF.7000701@pobox.com> X-Scanned-By: MIMEDefang 2.34 X-archive-position: 8142 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 Hi Ravi, Please try to address the comments in real time, it's probably better to submit a follow-up rather than waiting for more comments... Also - are Koushik and Sriram in Cupertino next week? Cheers , Leonid > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Saturday, August 28, 2004 4:37 PM > To: ravinandan.arakali@s2io.com > Cc: netdev@oss.sgi.com; leonid.grossman@s2io.com; > raghavendra.koushik@s2io.com > Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel > > is there a follow-up patch addressing the comments ? > From davem@davemloft.net Sat Aug 28 23:16:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 23:16:18 -0700 (PDT) Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7T6G6jG003476 for ; Sat, 28 Aug 2004 23:16:06 -0700 Received: from unknown (HELO cheetah.davemloft.net) (davem?330@63.197.226.105 with login) by smtp017.mail.yahoo.com with SMTP; 29 Aug 2004 06:15:58 -0000 Date: Sat, 28 Aug 2004 23:15:29 -0700 From: "David S. Miller" To: David Stevens Cc: kaber@trash.net, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040828231529.051a73cc.davem@davemloft.net> In-Reply-To: References: <412A8FB5.4080700@trash.net> Organization: DaveM Loft Enterprises X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8143 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 Tue, 24 Aug 2004 15:28:07 -0600 David Stevens wrote: > In that case, it appears that conntrack needs to flush the entire > frag queue when it's unloaded. That shouldn't happen much, > so maybe that's not such a bad idea. I think I agree with David now that I've read through this a few times. Can someone send me a patch which does this? Does 2.4.x have this problem too? I thought it didn't. From davem@davemloft.net Sat Aug 28 23:42:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 23:42: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 i7T6godo004072 for ; Sat, 28 Aug 2004 23:42: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 1C1JO6-0004Vd-00; Sat, 28 Aug 2004 23:42:02 -0700 Date: Sat, 28 Aug 2004 23:42:01 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: neigh_create/inetdev_destroy race? Message-Id: <20040828234201.79556f6e.davem@davemloft.net> In-Reply-To: <20040816105131.GA11299@gondor.apana.org.au> References: <20040813215602.GA15870@gondor.apana.org.au> <20040813151923.3311b4f0.davem@redhat.com> <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040814062703.GA4806@gondor.apana.org.au> <20040815191450.77532d5d.davem@redhat.com> <20040816105131.GA11299@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: 8144 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 Mon, 16 Aug 2004 20:51:31 +1000 Herbert Xu wrote: > > > CPU0 CPU1 > > > neigh_create > > > inet_del_ifa > > > notifier_call_chain > > > neigh_ifdown > > > inetdev_destroy > > > arp_constructor > > > neigh->parms = > > > in_dev->arp_parms > > > in_dev->dead = 1 > > > in_dev->dev->ip_ptr = > > > NULL > > > neigh_parms_release > > > n->parms->neigh_setup => BUG > > > > Is there anything other than hostess_sv11.c, sealevel.c, and shaper.c > > which are using n->parms->neigh_setup at all? > > > > This seems to be a very obscure special case hack, which perhaps we > > can removee entirely. > > That maybe the case, but the race has nothing to do with neigh_setup. > > Even if you remove neigh_setup altogether, the very next line in > neigh_create will dereference n->parms by looking up base_reachable_time. Wait a second, how can neigh_ifdown() even find this thing? Firstly, neigh_create() takes a reference to the device, which in turn holds onto the inetdev preventing inetdev_destroy(). Secondly, until neigh_create() takes the tbl lock, it is not in the hash tables and therefore neigh_ifdown() could not see it. Thirdly, arp_constructor() does in_dev_get() and checks the return value. If it fails, by racing with inetdev_destroy(), neigh_create() will return an error and not do bogus derefing. I think that covers all the cases, right? (please prove me wrong, this looks too easy :-) From herbert@gondor.apana.org.au Sat Aug 28 23:50:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 28 Aug 2004 23:51:13 -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 i7T6ovhl004447 for ; Sat, 28 Aug 2004 23:50: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 1C1JWM-0005hi-00; Sun, 29 Aug 2004 16:50:34 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C1JWJ-0000Dg-00; Sun, 29 Aug 2004 16:50:31 +1000 Date: Sun, 29 Aug 2004 16:50:31 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: neigh_create/inetdev_destroy race? Message-ID: <20040829065031.GA786@gondor.apana.org.au> References: <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040814062703.GA4806@gondor.apana.org.au> <20040815191450.77532d5d.davem@redhat.com> <20040816105131.GA11299@gondor.apana.org.au> <20040828234201.79556f6e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040828234201.79556f6e.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8145 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 Sat, Aug 28, 2004 at 11:42:01PM -0700, David S. Miller wrote: > On Mon, 16 Aug 2004 20:51:31 +1000 > Herbert Xu wrote: > > > > > CPU0 CPU1 > > > > neigh_create > > > > inet_del_ifa > > > > notifier_call_chain > > > > neigh_ifdown > > > > inetdev_destroy > > > > arp_constructor > > > > neigh->parms = > > > > in_dev->arp_parms > > > > in_dev->dead = 1 > > > > in_dev->dev->ip_ptr = > > > > NULL > > > > neigh_parms_release > > > > n->parms->neigh_setup => BUG > > > That maybe the case, but the race has nothing to do with neigh_setup. > > > > Even if you remove neigh_setup altogether, the very next line in > > neigh_create will dereference n->parms by looking up base_reachable_time. > > Wait a second, how can neigh_ifdown() even find this thing? > Firstly, neigh_create() takes a reference to the device, which > in turn holds onto the inetdev preventing inetdev_destroy(). I'm not sure about this statement. I can't see how holding a reference on dev prevents you from deleting the primary address on dev which will lead to the call chain on the right. > Secondly, until neigh_create() takes the tbl lock, it is not in > the hash tables and therefore neigh_ifdown() could not see it. That part I agree with :) That's in fact what this race is about: neigh_ifdown does not guarantee that the hash table will be without references to idev. > Thirdly, arp_constructor() does in_dev_get() and checks the > return value. If it fails, by racing with inetdev_destroy(), > neigh_create() will return an error and not do bogus derefing. In the above scenario, when arp_constructor() runs the in_dev is still alive and well. It only gets destroyed afterwards. > I think that covers all the cases, right? > (please prove me wrong, this looks too easy :-) Not quite :) 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 webvenza@libero.it Sun Aug 29 03:32:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 03:32:42 -0700 (PDT) Received: from gateway.milesteg.arr (venza@adsl-19-231.38-151.net24.it [151.38.231.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TAWar3014369 for ; Sun, 29 Aug 2004 03:32:37 -0700 Date: Sun, 29 Aug 2004 12:32:26 +0200 From: Daniele Venzano To: netdev@oss.sgi.com, jgarzik@pobox.com Subject: [PATCH] Add new PHY ID to sis900 driver Message-ID: <20040829103226.GD5168@gateway.milesteg.arr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ALfTUftag+2gvp1h" 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 User-Agent: Mutt/1.5.6i X-archive-position: 8146 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 --ALfTUftag+2gvp1h Content-Type: multipart/mixed; boundary="oLBj+sq0vYjzfsbl" Content-Disposition: inline --oLBj+sq0vYjzfsbl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Add new PHY from National (83847). =46rom: Laurent Signed-off-by: Daniele Venzano This patch is also available at: http://teg.homeunix.org/sis900.html --=20 ----------------------------- Daniele Venzano Web: http://teg.homeunix.org --oLBj+sq0vYjzfsbl Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sis900-new-national-phy.diff" Index: sis900.c =================================================================== --- a/drivers/net/sis900.c (revision 10) +++ b/drivers/net/sis900.c (revision 11) @@ -124,6 +124,7 @@ { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, { "ICS LAN PHY", 0x0015, 0xF440, LAN }, { "NS 83851 PHY", 0x2000, 0x5C20, MIX }, + { "NS 83847 PHY", 0x2000, 0x5C30, MIX }, { "Realtek RTL8201 PHY", 0x0000, 0x8200, LAN }, { "VIA 6103 PHY", 0x0101, 0x8f20, LAN }, {NULL,}, --oLBj+sq0vYjzfsbl-- --ALfTUftag+2gvp1h 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) iD8DBQFBMbC62rmHZCWzV+0RAlo1AKCm98bU/2Aht8MHsbrNi/jgplhDcQCghopj EJhoikQ0n/j+BJ3XC78VVfk= =pCMx -----END PGP SIGNATURE----- --ALfTUftag+2gvp1h-- From webvenza@libero.it Sun Aug 29 03:39:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 03:39:20 -0700 (PDT) Received: from gateway.milesteg.arr (venza@adsl-19-231.38-151.net24.it [151.38.231.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TAdBGj014751 for ; Sun, 29 Aug 2004 03:39:11 -0700 Date: Sun, 29 Aug 2004 12:39:02 +0200 From: Daniele Venzano To: netdev@oss.sgi.com, jgarzik@pobox.com Subject: [PATCH] whitespace and CodingStyle fixes for sis900 Message-ID: <20040829103902.GE5168@gateway.milesteg.arr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OZkY3AIuv2LYvjdk" 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 User-Agent: Mutt/1.5.6i X-archive-position: 8147 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 --OZkY3AIuv2LYvjdk Content-Type: multipart/mixed; boundary="/unnNtmY43mpUSKx" Content-Disposition: inline --/unnNtmY43mpUSKx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Big patch, but only contains whitespace and CodingStyle fixes to make the whole sis900.c file uniform. Some >80 lines where too difficult to split, so I let them alone, readability would be just as bad as is now. This patch depends on the previous one liner that adds the new PHY ID and is made against kernel 2.6.8 (as the previous). This patch is also available at: http://teg.homeunix.org/sis900.html --=20 ----------------------------- Daniele Venzano Web: http://teg.homeunix.org --/unnNtmY43mpUSKx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sis900-codingstyle.diff" Content-Transfer-Encoding: quoted-printable Index: sis900.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- a/drivers/net/sis900.c (revision 11) +++ b/drivers/net/sis900.c (working copy) @@ -140,9 +140,9 @@ }; =20 typedef struct _BufferDesc { - u32 link; - u32 cmdsts; - u32 bufptr; + u32 link; + u32 cmdsts; + u32 bufptr; } BufferDesc; =20 struct sis900_private { @@ -156,7 +156,7 @@ unsigned int cur_phy; =20 struct timer_list timer; /* Link status detection timer. */ - u8 autong_complete; /* 1: auto-negotiate complete */ + u8 autong_complete; /* 1: auto-negotiate complete */ =20 unsigned int cur_rx, dirty_rx; /* producer/comsumer pointers for Tx/Rx ri= ng */ unsigned int cur_tx, dirty_tx; @@ -170,7 +170,7 @@ dma_addr_t tx_ring_dma; dma_addr_t rx_ring_dma; =20 - unsigned int tx_full; /* The Tx queue is full. */ + unsigned int tx_full; /* The Tx queue is full. */ u8 host_bridge_rev; u32 pci_state[16]; }; @@ -256,7 +256,8 @@ * MAC address is read into @net_dev->dev_addr. */ =20 -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 =3D NULL; u8 reg; @@ -293,7 +294,8 @@ * @net_dev->dev_addr. */ =20 -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 =3D net_dev->base_addr; u32 rfcrSave; @@ -335,7 +337,8 @@ * MAC address is read into @net_dev->dev_addr. */ =20 -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 =3D net_dev->base_addr; long ee_addr =3D ioaddr + mear; @@ -372,7 +375,8 @@ * ie: sis900_open(), sis900_start_xmit(), sis900_close(), etc. */ =20 -static int __devinit sis900_probe (struct pci_dev *pci_dev, const struct p= ci_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; @@ -523,7 +527,7 @@ * return error if it failed to found. */ =20 -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 =3D net_dev->priv; u16 poll_bit =3D MII_STAT_LINK, status =3D 0; @@ -573,9 +577,10 @@ mii_phy->phy_types =3D mii_chip_table[i].phy_types; if (mii_chip_table[i].phy_types =3D=3D MIX) mii_phy->phy_types =3D - (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 : HO= ME; 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; } =09 @@ -588,7 +593,7 @@ =09 if (sis_priv->mii =3D=3D NULL) { printk(KERN_INFO "%s: No MII transceivers found!\n", - net_dev->name); + net_dev->name); return 0; } =20 @@ -612,7 +617,8 @@ =20 poll_bit ^=3D (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; } } @@ -648,38 +654,41 @@ static u16 sis900_default_phy(struct net_device * net_dev) { struct sis900_private * sis_priv =3D net_dev->priv; - struct mii_phy *phy =3D NULL, *phy_home =3D NULL, *default_phy =3D NULL,= *phy_lan =3D NULL; + struct mii_phy *phy =3D NULL, *phy_home =3D NULL,=20 + *default_phy =3D NULL, *phy_lan =3D NULL; u16 status; =20 - for( phy=3Dsis_priv->first_mii; phy; phy=3Dphy->next ){ + for (phy=3Dsis_priv->first_mii; phy; phy=3Dphy->next) { status =3D mdio_read(net_dev, phy->phy_addr, MII_STATUS); status =3D mdio_read(net_dev, phy->phy_addr, MII_STATUS); =20 /* Link ON & Not select default PHY & not ghost PHY */ - if ( (status & MII_STAT_LINK) && !default_phy && (phy->phy_types !=3D U= NKNOWN) ) + if ((status & MII_STAT_LINK) && !default_phy && + (phy->phy_types !=3D UNKNOWN)) default_phy =3D phy; - else{ + else { status =3D 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 =3D=3D HOME ) + if (phy->phy_types =3D=3D HOME) phy_home =3D phy; - else if (phy->phy_types =3D=3D LAN) + else if(phy->phy_types =3D=3D LAN) phy_lan =3D phy; } } =20 - if( !default_phy && phy_home ) + if (!default_phy && phy_home) default_phy =3D phy_home; - else if( !default_phy && phy_lan ) + else if (!default_phy && phy_lan) default_phy =3D phy_lan; - else if ( !default_phy ) + else if (!default_phy) default_phy =3D sis_priv->first_mii; =20 - if( sis_priv->mii !=3D default_phy ){ + if (sis_priv->mii !=3D default_phy) { sis_priv->mii =3D default_phy; sis_priv->cur_phy =3D 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); } =09 status =3D mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL); @@ -702,7 +711,7 @@ * mii status register. It's necessary before auto-negotiate. */ =20 -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_p= hy *phy) { u16 cap; u16 status; @@ -852,7 +861,8 @@ * please see SiS7014 or ICS spec */ =20 -static void mdio_write(struct net_device *net_dev, int phy_id, int locatio= n, int value) +static void mdio_write(struct net_device *net_dev, int phy_id, int locatio= n, + int value) { long mdio_addr =3D net_dev->base_addr + mear; int mii_cmd =3D MIIwrite|(phy_id<pci_dev, PCI_CLASS_REVISION, &revision); sis630_set_eq(net_dev, revision); =20 - ret =3D request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, net_dev->n= ame, net_dev); + ret =3D request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, + net_dev->name, net_dev); if (ret) return ret; =20 @@ -1137,48 +1148,55 @@ return; =20 if (netif_carrier_ok(net_dev)) { - reg14h=3Dmdio_read(net_dev, sis_priv->cur_phy, MII_RESV); - mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (0x2200 | reg14h) & 0xB= FFF); + reg14h =3D 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=3D0; i < maxcount; i++) { - eq_value=3D(0x00F8 & mdio_read(net_dev, sis_priv->cur_phy, MII_RESV)) >= > 3; + eq_value =3D (0x00F8 & mdio_read(net_dev, + sis_priv->cur_phy, MII_RESV)) >> 3; if (i =3D=3D 0) max_value=3Dmin_value=3Deq_value; - max_value=3D(eq_value > max_value) ? eq_value : max_value; - min_value=3D(eq_value < min_value) ? eq_value : min_value; + max_value =3D (eq_value > max_value) ? + eq_value : max_value; + min_value =3D (eq_value < min_value) ? + eq_value : min_value; } /* 630E rule to determine the equalizer value */ if (revision =3D=3D SIS630E_900_REV || revision =3D=3D SIS630EA1_900_REV= || revision =3D=3D SIS630ET_900_REV) { if (max_value < 5) - eq_value=3Dmax_value; + eq_value =3D max_value; else if (max_value >=3D 5 && max_value < 15) - eq_value=3D(max_value =3D=3D min_value) ? max_value+2 : max_value+1; + eq_value =3D (max_value =3D=3D min_value) ? + max_value+2 : max_value+1; else if (max_value >=3D 15) - eq_value=3D(max_value =3D=3D min_value) ? max_value+6 : max_value+5; + eq_value=3D(max_value =3D=3D min_value) ? + max_value+6 : max_value+5; } /* 630B0&B1 rule to determine the equalizer value */ if (revision =3D=3D SIS630A_900_REV &&=20 (sis_priv->host_bridge_rev =3D=3D SIS630B0 ||=20 sis_priv->host_bridge_rev =3D=3D SIS630B1)) { if (max_value =3D=3D 0) - eq_value=3D3; + eq_value =3D 3; else - eq_value=3D(max_value+min_value+1)/2; + eq_value =3D (max_value + min_value + 1)/2; } /* write equalizer value and setting */ - reg14h=3Dmdio_read(net_dev, sis_priv->cur_phy, MII_RESV); - reg14h=3D(reg14h & 0xFF07) | ((eq_value << 3) & 0x00F8); - reg14h=3D(reg14h | 0x6000) & 0xFDFF; + reg14h =3D mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); + reg14h =3D (reg14h & 0xFF07) | ((eq_value << 3) & 0x00F8); + reg14h =3D (reg14h | 0x6000) & 0xFDFF; mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, reg14h); - } - else { - reg14h=3Dmdio_read(net_dev, sis_priv->cur_phy, MII_RESV); + } else { + reg14h =3D mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); if (revision =3D=3D SIS630A_900_REV &&=20 (sis_priv->host_bridge_rev =3D=3D SIS630B0 ||=20 sis_priv->host_bridge_rev =3D=3D SIS630B1))=20 - mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2200) & 0x= BFFF); + 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) & 0x= BFFF); + mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, + (reg14h | 0x2000) & 0xBFFF); } return; } @@ -1206,7 +1224,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); } @@ -1230,9 +1249,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); @@ -1242,7 +1260,8 @@ ((mii_phy->phy_id1 & 0xFFF0) =3D=3D 0x8000)) sis900_reset_phy(net_dev, sis_priv->cur_phy); =20 - pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISIO= N, &revision); + pci_read_config_byte(sis_priv->pci_dev, + PCI_CLASS_REVISION, &revision); sis630_set_eq(net_dev, revision); =20 goto LookForLink; @@ -1265,18 +1284,18 @@ * and autong_complete should be set to 1. */ =20 -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 =3D net_dev->priv; long ioaddr =3D net_dev->base_addr; int speed, duplex; =20 - if( mii_phy->phy_types =3D=3D LAN ){ - outl( ~EXD & inl( ioaddr + cfg ), ioaddr + cfg); + if (mii_phy->phy_types =3D=3D 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 =3D HW_SPEED_HOME; duplex =3D FDX_CAPABLE_HALF_SELECTED; sis900_set_mode(ioaddr, speed, duplex); @@ -1301,20 +1320,20 @@ { u32 tx_flags =3D 0, rx_flags =3D 0; =20 - if( inl(ioaddr + cfg) & EDB_MASTER_EN ){ - tx_flags =3D TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH <= < TxFILLT_shift); + if (inl(ioaddr + cfg) & EDB_MASTER_EN) { + tx_flags =3D TxATP | (DMA_BURST_64 << TxMXDMA_shift) | + (TX_FILL_THRESH << TxFILLT_shift); rx_flags =3D DMA_BURST_64 << RxMXDMA_shift; - } - else{ - tx_flags =3D TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH = << TxFILLT_shift); + } else { + tx_flags =3D TxATP | (DMA_BURST_512 << TxMXDMA_shift) | + (TX_FILL_THRESH << TxFILLT_shift); rx_flags =3D DMA_BURST_512 << RxMXDMA_shift; } =20 - if (speed =3D=3D HW_SPEED_HOME || speed =3D=3D HW_SPEED_10_MBPS ) { + if (speed =3D=3D HW_SPEED_HOME || speed =3D=3D HW_SPEED_10_MBPS) { rx_flags |=3D (RxDRNT_10 << RxDRNT_shift); tx_flags |=3D (TxDRNT_10 << TxDRNT_shift); - } - else { + } else { rx_flags |=3D (RxDRNT_100 << RxDRNT_shift); tx_flags |=3D (TxDRNT_100 << TxDRNT_shift); } @@ -1404,19 +1423,19 @@ sis_priv->autong_complete =3D 1; =20 /* Workaround for Realtek RTL8201 PHY issue */ - if((phy->phy_id0 =3D=3D 0x0000) && ((phy->phy_id1 & 0xFFF0) =3D=3D 0x8200= )){ - if(mdio_read(net_dev, phy_addr, MII_CONTROL) & MII_CNTL_FDX) + if ((phy->phy_id0 =3D=3D 0x0000) && ((phy->phy_id1 & 0xFFF0) =3D=3D 0x820= 0)) { + if (mdio_read(net_dev, phy_addr, MII_CONTROL) & MII_CNTL_FDX) *duplex =3D FDX_CAPABLE_FULL_SELECTED; - if(mdio_read(net_dev, phy_addr, 0x0019) & 0x01) + if (mdio_read(net_dev, phy_addr, 0x0019) & 0x01) *speed =3D HW_SPEED_100_MBPS; } =20 printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", - net_dev->name, - *speed =3D=3D HW_SPEED_100_MBPS ? - "100mbps" : "10mbps", - *duplex =3D=3D FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); + net_dev->name, + *speed =3D=3D HW_SPEED_100_MBPS ? + "100mbps" : "10mbps", + *duplex =3D=3D FDX_CAPABLE_FULL_SELECTED ? + "full" : "half"); } =20 /** @@ -1678,13 +1697,13 @@ sis_priv->stats.rx_bytes +=3D rx_size; sis_priv->stats.rx_packets++; =20 - /* 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 =3D dev_alloc_skb(RX_BUF_SIZE)) =3D=3D 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); @@ -1708,8 +1727,8 @@ rx_status =3D sis_priv->rx_ring[entry].cmdsts; } // while =20 - /* refill the Rx buffer, what if the rate of refilling is slower than=20 - 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; =20 @@ -1717,10 +1736,10 @@ =20 if (sis_priv->rx_skbuff[entry] =3D=3D NULL) { if ((skb =3D dev_alloc_skb(RX_BUF_SIZE)) =3D=3D NULL) { - /* not enough memory for skbuff, this makes a "hole" - on the buffer ring, it is not clear how the=20 - hardware will react to this kind of degenerated=20 - 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); @@ -1765,8 +1784,8 @@ =20 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; } =20 @@ -1804,8 +1823,8 @@ =20 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 transmiss= ion - 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 =3D 0; netif_wake_queue (net_dev); } @@ -1819,8 +1838,7 @@ * free Tx and RX socket buffer */ =20 -static int -sis900_close(struct net_device *net_dev) +static int sis900_close(struct net_device *net_dev) { long ioaddr =3D net_dev->base_addr; struct sis900_private *sis_priv =3D net_dev->priv; @@ -1956,27 +1974,28 @@ =20 if ((map->port !=3D (u_char)(-1)) && (map->port !=3D 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=20 - (which seems to be different from the ifport(pcmcia) definition)=20 - */ + * 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=20 + * (which seems to be different from the ifport(pcmcia) definition) */ switch(map->port){ case IF_PORT_UNKNOWN: /* use auto here */ =20 dev->if_port =3D 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); =20 /* read current state */ status =3D mdio_read(dev, mii_phy->phy_addr, MII_CONTROL); =20 /* 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); =20 @@ -1985,10 +2004,11 @@ case IF_PORT_10BASET: /* 10BaseT */ =20 dev->if_port =3D map->port; =20 - /* 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); =20 /* set Speed to 10Mbps */ @@ -1997,24 +2017,27 @@ =20 /* 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; =20 case IF_PORT_100BASET: /* 100BaseT */ case IF_PORT_100BASETX: /* 100BaseTx */=20 dev->if_port =3D map->port; =20 - /* 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); =20 /* set Speed to 100Mbps */ /* disable auto negotiation and enable 100MBit Mode */ status =3D 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); =20 break; =20 @@ -2094,12 +2117,14 @@ for (i =3D 0; i < table_entries; i++) mc_filter[i] =3D 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 =3D RFAAB; - for (i =3D 0, mclist =3D net_dev->mc_list; mclist && i < net_dev->mc_cou= nt; - i++, mclist =3D mclist->next) { + for (i =3D 0, mclist =3D net_dev->mc_list; + mclist && i < net_dev->mc_count; + i++, mclist =3D mclist->next) { unsigned int bit_nr =3D sis900_mcast_bitnr(mclist->dmi_addr, revision); mc_filter[bit_nr >> 4] |=3D (1 << (bit_nr & 0xf)); @@ -2115,7 +2140,8 @@ =20 outl(RFEN | rx_mode, ioaddr + rfcr); =20 - /* 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 */ --/unnNtmY43mpUSKx-- --OZkY3AIuv2LYvjdk 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) iD8DBQFBMbJG2rmHZCWzV+0RAuhLAJ4mZXrCsXCLS7W59xc+gwS6ZCXedwCfUTGw 3srm3J7GDYH4ernEYLvEnR8= =BgTL -----END PGP SIGNATURE----- --OZkY3AIuv2LYvjdk-- From hadi@cyberus.ca Sun Aug 29 10:14:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 10:14:21 -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 i7THE7KI031859 for ; Sun, 29 Aug 2004 10:14:07 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C1TFd-0004bU-Ip for netdev@oss.sgi.com; Sun, 29 Aug 2004 13:13:57 -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 1C1TFb-0006eX-A6; Sun, 29 Aug 2004 13:13:55 -0400 Subject: RFC/PATCH capture qdisc requeue event in stats From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com Content-Type: multipart/mixed; boundary="=-+0TpqyglMNHxo02qQwAl" Organization: jamalopolous Message-Id: <1093799632.1073.410.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Aug 2004 13:13:52 -0400 X-archive-position: 8148 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 --=-+0TpqyglMNHxo02qQwAl Content-Type: text/plain Content-Transfer-Encoding: 7bit The requeue event is useful in finding out when a device is overloaded on the egress (bus or bandwidth). Atached patch introduces this. I would have used the overlimit bits but at the moment thats being used for different semantical reasons. I have not done extensive testing on it. Opinions welcome - If all is good, Dave please apply. cheers, jamal --=-+0TpqyglMNHxo02qQwAl Content-Disposition: attachment; filename=reqs-patch Content-Type: text/plain; name=reqs-patch; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- a/net/sched/sch_atm.c 2004/08/29 16:43:53 1.1 +++ b/net/sched/sch_atm.c 2004/08/29 16:58:26 @@ -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->stats.reqs++; + } else { sch->stats.drops++; p->link.stats.drops++; } --- a/net/sched/sch_cbq.c 2004/08/29 16:40:52 1.1 +++ b/net/sched/sch_cbq.c 2004/08/29 16:56:58 @@ -485,6 +485,7 @@ #endif if ((ret = cl->q->ops->requeue(skb, cl->q)) == 0) { sch->q.qlen++; + sch->stats.reqs++; if (!cl->next_alive) cbq_activate_class(cl); return 0; --- a/net/sched/sch_dsmark.c 2004/08/29 16:41:51 1.1 +++ b/net/sched/sch_dsmark.c 2004/08/29 17:01:27 @@ -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->stats.reqs++; return 0; } sch->stats.drops++; --- a/net/sched/sch_fifo.c 2004/08/29 16:42:52 1.1 +++ b/net/sched/sch_fifo.c 2004/08/29 16:52:47 @@ -67,6 +67,7 @@ { __skb_queue_head(&sch->q, skb); sch->stats.backlog += skb->len; + sch->stats.reqs++; return 0; } @@ -126,6 +127,7 @@ pfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(&sch->q, skb); + sch->stats.reqs++; return 0; } --- a/net/sched/sch_generic.c 2004/08/29 16:39:47 1.1 +++ b/net/sched/sch_generic.c 2004/08/29 16:56:44 @@ -327,6 +327,7 @@ __skb_queue_head(list, skb); qdisc->q.qlen++; + qdisc->stats.reqs++; return 0; } --- a/net/sched/sch_gred.c 2004/08/29 16:44:44 1.1 +++ b/net/sched/sch_gred.c 2004/08/29 16:50:07 @@ -222,6 +222,7 @@ __skb_queue_head(&sch->q, skb); sch->stats.backlog += skb->len; + sch->stats.reqs++; q->backlog += skb->len; return 0; } --- a/net/sched/sch_hfsc.c 2004/08/29 16:41:19 1.1 +++ b/net/sched/sch_hfsc.c 2004/08/29 16:57:11 @@ -1803,6 +1803,7 @@ __skb_queue_head(&q->requeue, skb); sch->q.qlen++; + sch->stats.reqs++; return NET_XMIT_SUCCESS; } --- a/net/sched/sch_htb.c 2004/08/29 16:44:17 1.1 +++ b/net/sched/sch_htb.c 2004/08/29 17:00:24 @@ -794,6 +794,7 @@ htb_activate (q,cl); sch->q.qlen++; + sch->stats.reqs++; HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); return NET_XMIT_SUCCESS; } --- a/net/sched/sch_netem.c 2004/08/29 16:46:10 1.1 +++ b/net/sched/sch_netem.c 2004/08/29 16:48:44 @@ -662,8 +662,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->q.reqs++; + } return ret; } --- a/net/sched/sch_prio.c 2004/08/29 16:43:21 1.1 +++ b/net/sched/sch_prio.c 2004/08/29 16:57:52 @@ -139,6 +139,7 @@ if ((ret = qdisc->ops->requeue(skb, qdisc)) == 0) { sch->q.qlen++; + sch->stats.reqs++; return 0; } dropped: --- a/net/sched/sch_red.c 2004/08/29 16:46:46 1.1 +++ b/net/sched/sch_red.c 2004/08/29 16:49:34 @@ -309,6 +309,8 @@ __skb_queue_head(&sch->q, skb); sch->stats.backlog += skb->len; + sch->stats.reqs++; + return 0; } --- a/net/sched/sch_tbf.c 2004/08/29 16:40:15 1.1 +++ b/net/sched/sch_tbf.c 2004/08/29 16:56:24 @@ -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->stats.reqs++; + } return ret; } --- a/net/sched/sch_teql.c 2004/08/29 16:42:23 1.1 +++ b/net/sched/sch_teql.c 2004/08/29 16:53:13 @@ -112,6 +112,7 @@ struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_head(&q->q, skb); + sch->stats.reqs++; return 0; } --- a/include/linux/pkt_sched.h 2004-08-29 13:07:26.000000000 -0400 +++ b/include/linux/pkt_sched.h 2004-08-29 12:36:29.000000000 -0400 @@ -38,6 +38,7 @@ __u32 pps; /* Current flow packet rate */ __u32 qlen; __u32 backlog; + __u32 reqs; /* requeues */ }; struct tc_estimator --=-+0TpqyglMNHxo02qQwAl-- From kaber@trash.net Sun Aug 29 12:36:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 12:36:58 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TJaiEl005316; Sun, 29 Aug 2004 12:36:44 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 5998919F33C; Sun, 29 Aug 2004 21:36:30 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 7C9FF394175; Sun, 29 Aug 2004 21:36:29 +0200 (CEST) Message-ID: <4132303C.2060807@trash.net> Date: Sun, 29 Aug 2004 21:36:28 +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: David Stevens , davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> In-Reply-To: <20040828231529.051a73cc.davem@davemloft.net> Content-Type: multipart/mixed; boundary="------------040503030308040903070004" X-archive-position: 8150 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: 4914 Lines: 169 This is a multi-part message in MIME format. --------------040503030308040903070004 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David S. Miller wrote: >I think I agree with David now that I've read through this a few >times. Can someone send me a patch which does this? > > Attached. The first patch still crashed, we need to prevent new fragments from getting queued after the queue is flushed until the hook in unregistered. >Does 2.4.x have this problem too? I thought it didn't. > > I'll have a look, but I think it does. Regards Patrick --------------040503030308040903070004 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/08/29 20:24:07+02:00 kaber@coreworks.de # [NETFILTER]: Flush fragment queue on conntrack unload # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/29 20:22:57+02:00 kaber@coreworks.de +6 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/08/29 20:22:57+02:00 kaber@coreworks.de +8 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # net/ipv4/ip_fragment.c # 2004/08/29 20:22:57+02:00 kaber@coreworks.de +14 -3 # [NETFILTER]: Flush fragment queue on conntrack unload # # include/net/ip.h # 2004/08/29 20:22:57+02:00 kaber@coreworks.de +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # include/linux/netfilter_ipv4/ip_conntrack.h # 2004/08/29 20:22:57+02:00 kaber@coreworks.de +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h --- a/include/linux/netfilter_ipv4/ip_conntrack.h 2004-08-29 20:55:13 +02:00 +++ b/include/linux/netfilter_ipv4/ip_conntrack.h 2004-08-29 20:55:13 +02:00 @@ -275,6 +275,7 @@ /* Fake conntrack entry for untracked connections */ extern struct ip_conntrack ip_conntrack_untracked; +extern int ip_ct_no_defrag; /* Returns new sk_buff, or NULL */ struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb); diff -Nru a/include/net/ip.h b/include/net/ip.h --- a/include/net/ip.h 2004-08-29 20:55:13 +02:00 +++ b/include/net/ip.h 2004-08-29 20:55:13 +02:00 @@ -255,6 +255,7 @@ */ struct sk_buff *ip_defrag(struct sk_buff *skb); +extern void ipfrag_flush(void); extern int ip_frag_nqueues; extern atomic_t ip_frag_mem; diff -Nru a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c --- a/net/ipv4/ip_fragment.c 2004-08-29 20:55:13 +02:00 +++ b/net/ipv4/ip_fragment.c 2004-08-29 20:55:13 +02:00 @@ -241,15 +241,15 @@ } /* Memory limiting on fragments. Evictor trashes the oldest - * fragment queue until we are back under the low threshold. + * fragment queue until we are back under the threshold. */ -static void ip_evictor(void) +static void __ip_evictor(int threshold) { struct ipq *qp; struct list_head *tmp; int work; - work = atomic_read(&ip_frag_mem) - sysctl_ipfrag_low_thresh; + work = atomic_read(&ip_frag_mem) - threshold; if (work <= 0) return; @@ -274,6 +274,11 @@ } } +static inline void ip_evictor(void) +{ + __ip_evictor(sysctl_ipfrag_low_thresh); +} + /* * Oops, a fragment queue timed out. Kill it and send an ICMP reply. */ @@ -684,4 +689,10 @@ add_timer(&ipfrag_secret_timer); } +void ipfrag_flush(void) +{ + __ip_evictor(0); +} + EXPORT_SYMBOL(ip_defrag); +EXPORT_SYMBOL(ipfrag_flush); diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c --- a/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-29 20:55:13 +02:00 +++ b/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-29 20:55:13 +02:00 @@ -1173,6 +1173,8 @@ } } +int ip_ct_no_defrag; + /* Returns new sk_buff, or NULL */ struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb) @@ -1181,6 +1183,12 @@ #ifdef CONFIG_NETFILTER_DEBUG unsigned int olddebug = skb->nf_debug; #endif + + if (unlikely(ip_ct_no_defrag)) { + kfree_skb(skb); + return NULL; + } + if (sk) { sock_hold(sk); skb_orphan(skb); diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-29 20:55:13 +02:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-29 20:55:13 +02:00 @@ -805,6 +805,12 @@ cleanup_defraglocalops: nf_unregister_hook(&ip_conntrack_defrag_local_out_ops); cleanup_defragops: + /* Frag queues may hold fragments with skb->dst == NULL */ + ip_ct_no_defrag = 1; + smp_wmb(); + local_bh_disable(); + ipfrag_flush(); + local_bh_enable(); nf_unregister_hook(&ip_conntrack_defrag_ops); cleanup_proc_stat: proc_net_remove("ip_conntrack_stat"); --------------040503030308040903070004-- From davem@davemloft.net Sun Aug 29 13:01:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:01: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 i7TK1Tea006083; Sun, 29 Aug 2004 13:01: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 1C1VnY-0005YW-00; Sun, 29 Aug 2004 12:57:08 -0700 Date: Sun, 29 Aug 2004 12:57:08 -0700 From: "David S. Miller" To: Patrick McHardy Cc: dlstevens@us.ibm.com, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040829125708.5aa70469.davem@davemloft.net> In-Reply-To: <4132303C.2060807@trash.net> References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@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: 8151 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: 745 Lines: 23 On Sun, 29 Aug 2004 21:36:28 +0200 Patrick McHardy wrote: > David S. Miller wrote: > > >I think I agree with David now that I've read through this a few > >times. Can someone send me a patch which does this? > > > > > Attached. The first patch still crashed, we need to prevent new > fragments from getting queued after the queue is flushed until the > hook in unregistered. While we're doing this, is your patch similar to one of the two original ones that Olaf Kirch posted? I want to give him proper attribution, in whatever form is reasonable, that's all. > >Does 2.4.x have this problem too? I thought it didn't. > > > > > I'll have a look, but I think it does. Thanks a lot for helping out with this Patrick. From kaber@trash.net Sun Aug 29 13:06:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:06:57 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TK6o77006591; Sun, 29 Aug 2004 13:06:51 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id ABC3C19F33C; Sun, 29 Aug 2004 22:06:37 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id D8FD4394175; Sun, 29 Aug 2004 22:06:36 +0200 (CEST) Message-ID: <4132374C.8000003@trash.net> Date: Sun, 29 Aug 2004 22:06: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: dlstevens@us.ibm.com, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> <20040829125708.5aa70469.davem@davemloft.net> In-Reply-To: <20040829125708.5aa70469.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8152 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: 599 Lines: 22 David S. Miller wrote: >On Sun, 29 Aug 2004 21:36:28 +0200 >Patrick McHardy wrote: > >>Attached. The first patch still crashed, we need to prevent new >>fragments from getting queued after the queue is flushed until the >>hook in unregistered. >> >> > >While we're doing this, is your patch similar to one of the two >original ones that Olaf Kirch posted? I want to give him proper >attribution, in whatever form is reasonable, that's all. > > It is based on his second patch. He didn't sign off, otherwise I just would have kept his Signed-off-by: line. Regards Patrick From jolt@tuxbox.org Sun Aug 29 13:40:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:40:38 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TKePEv007792 for ; Sun, 29 Aug 2004 13:40:26 -0700 Received: from [192.168.1.100] [82.82.145.99] by taytron.net with ESMTP (SMTPD32-8.11) id AE6E28D0060; Sun, 29 Aug 2004 22:37:02 +0200 From: Florian Schirmer To: Pekka Pietikainen Subject: [PATCH][1/4] b44: Ignore carrier lost errors Date: Sun, 29 Aug 2004 22:33:00 +0200 User-Agent: KMail/1.7 Cc: jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200408292218.00756.jolt@tuxbox.org> In-Reply-To: <200408292218.00756.jolt@tuxbox.org> MIME-Version: 1.0 Message-Id: <200408292233.03879.jolt@tuxbox.org> Content-Type: multipart/signed; boundary="nextPart4363059.hI9ds1C5mR"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit X-archive-position: 8154 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 1238 Lines: 45 --nextPart4363059.hI9ds1C5mR Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, some (?) hardware seems to be buggy and is reporting bogus carrier lost=20 values. Both reference implementations from Broadcom indicate that this=20 counter is not reliable and therefore ignore it. We should do the same.=20 "Fixes" the carrier lost problem i've seen. Regards, Florian Signed-off-by: Florian Schirmer =2D-- linux/drivers/net/b44.c-old1 2004-08-29 16:29:08.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 16:27:00.000000000 +0200 @@ -1347,7 +1347,10 @@ static struct net_device_stats *b44_get_ hwstat->rx_symbol_errs); =20 nstat->tx_aborted_errors =3D hwstat->tx_underruns; +#if 0 + /* Carrier lost counter seems to be broken for some devices */ nstat->tx_carrier_errors =3D hwstat->tx_carrier_lost; +#endif =20 return nstat; } --nextPart4363059.hI9ds1C5mR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBMj1/XRF2vHoIlBsRAuu+AJ4g0h+y0C6Pzxs5KRHbzRFYxxQkMgCffMc5 xi/gaTBErr9kmuH3A8usvZE= =mPTU -----END PGP SIGNATURE----- --nextPart4363059.hI9ds1C5mR-- From jolt@tuxbox.org Sun Aug 29 13:40:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:40:38 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TKePZo007791 for ; Sun, 29 Aug 2004 13:40:26 -0700 Received: from [192.168.1.100] [82.82.145.99] by taytron.net with ESMTP (SMTPD32-8.11) id AE6F28D0060; Sun, 29 Aug 2004 22:37:03 +0200 From: Florian Schirmer To: Pekka Pietikainen Subject: [PATCH][2/4] b44: Cleanup SiliconBackplane definitions/functions Date: Sun, 29 Aug 2004 22:34:01 +0200 User-Agent: KMail/1.7 Cc: jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200408292218.00756.jolt@tuxbox.org> In-Reply-To: <200408292218.00756.jolt@tuxbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12595084.zQyxp4o0NF"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408292234.04238.jolt@tuxbox.org> X-archive-position: 8155 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 10026 Lines: 255 --nextPart12595084.zQyxp4o0NF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, there is a good amount of code to support SiliconBackplane functions which = are unneeded or simply plain wrong. Lets get rid of it. Regards, Florian Signed-off-by: Florian Schirmer =2D-- linux/drivers/net/b44.c-old2 2004-08-29 16:27:00.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 16:59:24.000000000 +0200 @@ -130,41 +130,8 @@ static int b44_wait_bit(struct b44 *bp,=20 * interrupts disabled. */ =20 =2D#define SBID_SDRAM 0 =2D#define SBID_PCI_MEM 1 =2D#define SBID_PCI_CFG 2 =2D#define SBID_PCI_DMA 3 =2D#define SBID_SDRAM_SWAPPED 4 =2D#define SBID_ENUM 5 =2D#define SBID_REG_SDRAM 6 =2D#define SBID_REG_ILINE20 7 =2D#define SBID_REG_EMAC 8 =2D#define SBID_REG_CODEC 9 =2D#define SBID_REG_USB 10 =2D#define SBID_REG_PCI 11 =2D#define SBID_REG_MIPS 12 =2D#define SBID_REG_EXTIF 13 =2D#define SBID_EXTIF 14 =2D#define SBID_EJTAG 15 =2D#define SBID_MAX 16 =2D =2Dstatic u32 ssb_get_addr(struct b44 *bp, u32 id, u32 instance) =2D{ =2D switch (id) { =2D case SBID_PCI_DMA: =2D return 0x40000000; =2D case SBID_ENUM: =2D return 0x18000000; =2D case SBID_REG_EMAC: =2D return 0x18000000; =2D case SBID_REG_CODEC: =2D return 0x18001000; =2D case SBID_REG_PCI: =2D return 0x18002000; =2D default: =2D return 0; =2D }; =2D} +#define SB_PCI_DMA 0x40000000 /* Client Mode PCI memory a= ccess space (1 GB) */ +#define BCM4400_PCI_CORE_ADDR 0x18002000 /* Address of PCI core on B= CM4400 cards */ =20 static u32 ssb_get_core_rev(struct b44 *bp) { @@ -176,8 +143,7 @@ static u32 ssb_pci_setup(struct b44 *bp, u32 bar_orig, pci_rev, val; =20 pci_read_config_dword(bp->pdev, SSB_BAR0_WIN, &bar_orig); =2D pci_write_config_dword(bp->pdev, SSB_BAR0_WIN, =2D ssb_get_addr(bp, SBID_REG_PCI, 0)); + pci_write_config_dword(bp->pdev, SSB_BAR0_WIN, BCM4400_PCI_CORE_ADDR); pci_rev =3D ssb_get_core_rev(bp); =20 val =3D br32(B44_SBINTVEC); @@ -1676,7 +1642,6 @@ static int __devinit b44_get_invariants( bp->dev->dev_addr[5] =3D eeprom[82]; =20 bp->phy_addr =3D eeprom[90] & 0x1f; =2D bp->mdc_port =3D (eeprom[90] >> 14) & 0x1; =20 /* With this, plus the rx_header prepended to the data by the * hardware, we'll land the ethernet header on a 2-byte boundary. @@ -1686,7 +1651,7 @@ static int __devinit b44_get_invariants( bp->imask =3D IMASK_DEF; =20 bp->core_unit =3D ssb_core_unit(bp); =2D bp->dma_offset =3D ssb_get_addr(bp, SBID_PCI_DMA, 0); + bp->dma_offset =3D SB_PCI_DMA; =20 /* XXX - really required?=20 bp->flags |=3D B44_FLAG_BUGGY_TXPTR; =2D-- linux/drivers/net/b44.h-old2 2004-08-29 16:25:36.000000000 +0200 +++ linux/drivers/net/b44.h 2004-08-29 17:06:44.000000000 +0200 @@ -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 */ =2D#define B44_SBIPSFLAG 0x0F08UL /* SB Initiator Port OCP Slave Flag */ =2D#define SBIPSFLAG_IMASK1 0x0000003f /* Which sbflags --> mips interrupt= 1 */ =2D#define SBIPSFLAG_ISHIFT1 0 =2D#define SBIPSFLAG_IMASK2 0x00003f00 /* Which sbflags --> mips interrupt= 2 */ =2D#define SBIPSFLAG_ISHIFT2 8 =2D#define SBIPSFLAG_IMASK3 0x003f0000 /* Which sbflags --> mips interrupt= 3 */ =2D#define SBIPSFLAG_ISHIFT3 16 =2D#define SBIPSFLAG_IMASK4 0x3f000000 /* Which sbflags --> mips interrupt= 4 */ =2D#define SBIPSFLAG_ISHIFT4 24 =2D#define B44_SBTPSFLAG 0x0F18UL /* SB Target Port OCP Slave Flag */ =2D#define SBTPS_NUM0_MASK 0x0000003f =2D#define SBTPS_F0EN0 0x00000040 =2D#define B44_SBADMATCH3 0x0F60UL /* SB Address Match 3 */ =2D#define B44_SBADMATCH2 0x0F68UL /* SB Address Match 2 */ =2D#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 */ =2D#define B44_SBBWA0 0x0FA0UL /* SB Bandwidth Allocation Table 0 */ =2D#define SBBWA0_TAB0_MASK 0x0000ffff /* Lookup Table 0 */ =2D#define SBBWA0_TAB0_SHIFT 0 =2D#define SBBWA0_TAB1_MASK 0xffff0000 /* Lookup Table 0 */ =2D#define SBBWA0_TAB1_SHIFT 16 =2D#define B44_SBIMCFGLOW 0x0FA8UL /* SB Initiator Configuration Low */ =2D#define SBIMCFGLOW_STO_MASK 0x00000003 /* Service Timeout */ =2D#define SBIMCFGLOW_RTO_MASK 0x00000030 /* Request Timeout */ =2D#define SBIMCFGLOW_RTO_SHIFT 4 =2D#define SBIMCFGLOW_CID_MASK 0x00ff0000 /* Connection ID */ =2D#define SBIMCFGLOW_CID_SHIFT 16 =2D#define B44_SBIMCFGHIGH 0x0FACUL /* SB Initiator Configuration High */ =2D#define SBIMCFGHIGH_IEM_MASK 0x0000000c /* Inband Error Mode */ =2D#define SBIMCFGHIGH_TEM_MASK 0x00000030 /* Timeout Error Mode */ =2D#define SBIMCFGHIGH_TEM_SHIFT 4 =2D#define SBIMCFGHIGH_BEM_MASK 0x000000c0 /* Bus Error Mode */ =2D#define SBIMCFGHIGH_BEM_SHIFT 6 =2D#define B44_SBADMATCH0 0x0FB0UL /* SB Address Match 0 */ =2D#define SBADMATCH0_TYPE_MASK 0x00000003 /* Address Type */ =2D#define SBADMATCH0_AD64 0x00000004 /* Reserved */ =2D#define SBADMATCH0_AI0_MASK 0x000000f8 /* Type0 Size */ =2D#define SBADMATCH0_AI0_SHIFT 3 =2D#define SBADMATCH0_AI1_MASK 0x000001f8 /* Type1 Size */ =2D#define SBADMATCH0_AI1_SHIFT 3 =2D#define SBADMATCH0_AI2_MASK 0x000001f8 /* Type2 Size */ =2D#define SBADMATCH0_AI2_SHIFT 3 =2D#define SBADMATCH0_ADEN 0x00000400 /* Enable */ =2D#define SBADMATCH0_ADNEG 0x00000800 /* Negative Decode */ =2D#define SBADMATCH0_BS0_MASK 0xffffff00 /* Type0 Base Address */ =2D#define SBADMATCH0_BS0_SHIFT 8 =2D#define SBADMATCH0_BS1_MASK 0xfffff000 /* Type1 Base Address */ =2D#define SBADMATCH0_BS1_SHIFT 12 =2D#define SBADMATCH0_BS2_MASK 0xffff0000 /* Type2 Base Address */ =2D#define SBADMATCH0_BS2_SHIFT 16 =2D#define B44_SBTMCFGLOW 0x0FB8UL /* SB Target Configuration Low */ =2D#define SBTMCFGLOW_CD_MASK 0x000000ff /* Clock Divide Mask */ =2D#define SBTMCFGLOW_CO_MASK 0x0000f800 /* Clock Offset Mask */ =2D#define SBTMCFGLOW_CO_SHIFT 11 =2D#define SBTMCFGLOW_IF_MASK 0x00fc0000 /* Interrupt Flags Mask */ =2D#define SBTMCFGLOW_IF_SHIFT 18 =2D#define SBTMCFGLOW_IM_MASK 0x03000000 /* Interrupt Mode Mask */ =2D#define SBTMCFGLOW_IM_SHIFT 24 =2D#define B44_SBTMCFGHIGH 0x0FBCUL /* SB Target Configuration High */ =2D#define SBTMCFGHIGH_BM_MASK 0x00000003 /* Busy Mode */ =2D#define SBTMCFGHIGH_RM_MASK 0x0000000C /* Retry Mode */ =2D#define SBTMCFGHIGH_RM_SHIFT 2 =2D#define SBTMCFGHIGH_SM_MASK 0x00000030 /* Stop Mode */ =2D#define SBTMCFGHIGH_SM_SHIFT 4 =2D#define SBTMCFGHIGH_EM_MASK 0x00000300 /* Error Mode */ =2D#define SBTMCFGHIGH_EM_SHIFT 8 =2D#define SBTMCFGHIGH_IM_MASK 0x00000c00 /* Interrupt Mode */ =2D#define SBTMCFGHIGH_IM_SHIFT 10 =2D#define B44_SBBCFG 0x0FC0UL /* SB Broadcast Configuration */ =2D#define SBBCFG_LAT_MASK 0x00000003 /* SB Latency */ =2D#define SBBCFG_MAX0_MASK 0x000f0000 /* MAX Counter 0 */ =2D#define SBBCFG_MAX0_SHIFT 16 =2D#define SBBCFG_MAX1_MASK 0x00f00000 /* MAX Counter 1 */ =2D#define SBBCFG_MAX1_SHIFT 20 =2D#define B44_SBBSTATE 0x0FC8UL /* SB Broadcast State */ =2D#define SBBSTATE_SRD 0x00000001 /* ST Reg Disable */ =2D#define SBBSTATE_HRD 0x00000002 /* Hold Reg Disable */ =2D#define B44_SBACTCNFG 0x0FD8UL /* SB Activate Configuration */ =2D#define B44_SBFLAGST 0x0FE8UL /* SB Current SBFLAGS */ =2D#define B44_SBIDLOW 0x0FF8UL /* SB Identification Low */ =2D#define SBIDLOW_CS_MASK 0x00000003 /* Config Space Mask */ =2D#define SBIDLOW_AR_MASK 0x00000038 /* Num Address Ranges Supported */ =2D#define SBIDLOW_AR_SHIFT 3 =2D#define SBIDLOW_SYNCH 0x00000040 /* Sync */ =2D#define SBIDLOW_INIT 0x00000080 /* Initiator */ =2D#define SBIDLOW_MINLAT_MASK 0x00000f00 /* Minimum Backplane Latency */ =2D#define SBIDLOW_MINLAT_SHIFT 8 =2D#define SBIDLOW_MAXLAT_MASK 0x0000f000 /* Maximum Backplane Latency */ =2D#define SBIDLOW_MAXLAT_SHIFT 12 =2D#define SBIDLOW_FIRST 0x00010000 /* This Initiator is First */ =2D#define SBIDLOW_CW_MASK 0x000c0000 /* Cycle Counter Width */ =2D#define SBIDLOW_CW_SHIFT 18 =2D#define SBIDLOW_TP_MASK 0x00f00000 /* Target Ports */ =2D#define SBIDLOW_TP_SHIFT 20 =2D#define SBIDLOW_IP_MASK 0x0f000000 /* Initiator Ports */ =2D#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 =20 =2D#define CORE_CODE_ILINE20 0x801 =2D#define CORE_CODE_SDRAM 0x803 =2D#define CORE_CODE_PCI 0x804 =2D#define CORE_CODE_MIPS 0x805 =2D#define CORE_CODE_ENET 0x806 =2D#define CORE_CODE_CODEC 0x807 =2D#define CORE_CODE_USB 0x808 =2D#define CORE_CODE_ILINE100 0x80a =2D#define CORE_CODE_EXTIF 0x811 =2D /* 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 =20 =2D/* SSB core and hsot control registers. */ +/* SSB core and host control registers. */ #define SSB_CONTROL 0x0000UL #define SSB_ARBCONTROL 0x0010UL #define SSB_ISTAT 0x0020UL @@ -540,7 +437,6 @@ struct b44 { u32 tx_pending; u32 pci_cfg_state[64 / sizeof(u32)]; u8 phy_addr; =2D u8 mdc_port; u8 core_unit; =20 struct mii_if_info mii_if; --nextPart12595084.zQyxp4o0NF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBMj28XRF2vHoIlBsRAmxjAJoDpX9f67tHSQnhAXoyGdjtmFUt9gCfeQiL rR2HZQX6xf/xjzUH5QQWwz8= =1yNi -----END PGP SIGNATURE----- --nextPart12595084.zQyxp4o0NF-- From jolt@tuxbox.org Sun Aug 29 13:40:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:40:39 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TKePNa007793 for ; Sun, 29 Aug 2004 13:40:26 -0700 Received: from [192.168.1.100] [82.82.145.99] by taytron.net with ESMTP (SMTPD32-8.11) id AE7128D0060; Sun, 29 Aug 2004 22:37:05 +0200 From: Florian Schirmer To: Pekka Pietikainen Subject: [PATCH][4/4] b44: Add bcm47xx support Date: Sun, 29 Aug 2004 22:39:50 +0200 User-Agent: KMail/1.7 Cc: jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200408292218.00756.jolt@tuxbox.org> In-Reply-To: <200408292218.00756.jolt@tuxbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2900989.SpQvQGFGbN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408292239.53601.jolt@tuxbox.org> X-archive-position: 8156 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 7424 Lines: 257 --nextPart2900989.SpQvQGFGbN Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, finally add bcm47xx support using the infrastructure created by the earlier= patches. Regards, Florian Signed-off-by: Florian Schirmer =2D-- linux/drivers/net/b44.c-old4 2004-08-29 17:24:23.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 18:48:45.000000000 +0200 @@ -1,7 +1,8 @@ =2D/* b44.c: Broadcom 4400 device driver. +/* b44.c: Broadcom 4400/47xx device driver. * * Copyright (C) 2002 David S. Miller (davem@redhat.com) =2D * Fixed by Pekka Pietikainen (pp@ee.oulu.fi) + * Copyright (C) 2004 Pekka Pietikainen (pp@ee.oulu.fi) + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) * * Distribute under GPL. */ @@ -75,7 +76,7 @@ static char version[] __devinitdata =3D DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; =20 MODULE_AUTHOR("David S. Miller (davem@redhat.com)"); =2DMODULE_DESCRIPTION("Broadcom 4400 10/100 PCI ethernet driver"); +MODULE_DESCRIPTION("Broadcom 4400/47xx 10/100 PCI ethernet driver"); MODULE_LICENSE("GPL"); MODULE_PARM(b44_debug, "i"); MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"= ); @@ -89,6 +90,8 @@ static struct pci_device_id b44_pci_tbl[ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, + { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4713, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { } /* terminate list with empty entry */ }; =20 @@ -202,29 +205,14 @@ static void ssb_core_reset(struct b44 *b udelay(1); } =20 +static int b44_4713_instance; + static int ssb_core_unit(struct b44 *bp) { =2D#if 0 =2D u32 val =3D br32(B44_SBADMATCH0); =2D u32 base; =2D =2D type =3D val & SBADMATCH0_TYPE_MASK; =2D switch (type) { =2D case 0: =2D base =3D val & SBADMATCH0_BS0_MASK; =2D break; =2D =2D case 1: =2D base =3D val & SBADMATCH0_BS1_MASK; =2D break; =2D =2D case 2: =2D default: =2D base =3D val & SBADMATCH0_BS2_MASK; =2D break; =2D }; =2D#endif =2D return 0; + if (bp->pdev->device =3D=3D PCI_DEVICE_ID_BCM4713) + return b44_4713_instance++; + else + return 0; } =20 static int ssb_is_core_up(struct b44 *bp) @@ -233,6 +221,28 @@ static int ssb_is_core_up(struct b44 *bp =3D=3D SBTMSLOW_CLOCK); } =20 +static void __b44_cam_read(struct b44 *bp, unsigned char *data, int index) +{ + u32 val; + + bw32(B44_CAM_CTRL, (CAM_CTRL_READ | + (index << CAM_CTRL_INDEX_SHIFT))); + + b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1);=20 + + val =3D br32(B44_CAM_DATA_LO); + + data[2] =3D (val >> 24) & 0xFF; + data[3] =3D (val >> 16) & 0xFF; + data[4] =3D (val >> 8) & 0xFF; + data[5] =3D (val >> 0) & 0xFF; + + val =3D br32(B44_CAM_DATA_HI); +=20 + data[0] =3D (val >> 8) & 0xFF; + data[1] =3D (val >> 0) & 0xFF; +} + static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index) { u32 val; @@ -1110,6 +1120,8 @@ static void b44_clear_stats(struct b44 * /* bp->lock is held. */ static void b44_chip_reset(struct b44 *bp) { + unsigned int sb_clock; + if (ssb_is_core_up(bp)) { bw32(B44_RCV_LAZY, 0); bw32(B44_ENET_CTRL, ENET_CTRL_DISABLE); @@ -1123,9 +1135,10 @@ static void b44_chip_reset(struct b44 *b bw32(B44_DMARX_CTRL, 0); bp->rx_prod =3D bp->rx_cons =3D 0; } else { =2D ssb_pci_setup(bp, (bp->core_unit =3D=3D 0 ? =2D SBINTVEC_ENET0 : =2D SBINTVEC_ENET1)); + if (bp->pdev->device !=3D PCI_DEVICE_ID_BCM4713) + ssb_pci_setup(bp, (bp->core_unit =3D=3D 0 ? + SBINTVEC_ENET0 : + SBINTVEC_ENET1)); } =20 ssb_core_reset(bp); @@ -1133,8 +1146,14 @@ static void b44_chip_reset(struct b44 *b b44_clear_stats(bp); =20 /* Make PHY accessible. */ + if (bp->pdev->device =3D=3D PCI_DEVICE_ID_BCM4713) + sb_clock =3D 100000000; /* 100 MHz */ + else + sb_clock =3D 62500000; /* 62.5 MHz */ + bw32(B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE | =2D (0x0d & MDIO_CTRL_MAXF_MASK))); + (((sb_clock + (B44_MDC_RATIO / 2)) / B44_MDC_RATIO) + & MDIO_CTRL_MAXF_MASK))); br32(B44_MDIO_CTRL); =20 if (!(br32(B44_DEVCTRL) & DEVCTRL_IPP)) { @@ -1654,19 +1673,41 @@ static int __devinit b44_get_invariants( { u8 eeprom[128]; int err; + unsigned long flags; =20 =2D err =3D b44_read_eeprom(bp, &eeprom[0]); =2D if (err) =2D goto out; =2D =2D bp->dev->dev_addr[0] =3D eeprom[79]; =2D bp->dev->dev_addr[1] =3D eeprom[78]; =2D bp->dev->dev_addr[2] =3D eeprom[81]; =2D bp->dev->dev_addr[3] =3D eeprom[80]; =2D bp->dev->dev_addr[4] =3D eeprom[83]; =2D bp->dev->dev_addr[5] =3D eeprom[82]; =2D =2D bp->phy_addr =3D eeprom[90] & 0x1f; + if (bp->pdev->device =3D=3D PCI_DEVICE_ID_BCM4713) { + /*=20 + * BCM47xx boards don't have a EEPROM. The MAC is stored in + * a NVRAM area somewhere in the flash memory. As we don't + * know the location and/or the format of the NVRAM area + * here, we simply rely on the bootloader to write the + * MAC into the CAM. + */ + spin_lock_irqsave(&bp->lock, flags); + __b44_cam_read(bp, bp->dev->dev_addr, 0); + spin_unlock_irqrestore(&bp->lock, flags); + + /*=20 + * BCM47xx boards don't have a PHY. Usually there is a switch + * chip with multiple PHYs connected to the PHY port. + */ + bp->phy_addr =3D B44_PHY_ADDR_NO_PHY; + bp->dma_offset =3D 0; + } else { + err =3D b44_read_eeprom(bp, &eeprom[0]); + if (err) + return err; + + bp->dev->dev_addr[0] =3D eeprom[79]; + bp->dev->dev_addr[1] =3D eeprom[78]; + bp->dev->dev_addr[2] =3D eeprom[81]; + bp->dev->dev_addr[3] =3D eeprom[80]; + bp->dev->dev_addr[4] =3D eeprom[83]; + bp->dev->dev_addr[5] =3D eeprom[82]; + + bp->phy_addr =3D eeprom[90] & 0x1f; + bp->dma_offset =3D SB_PCI_DMA; + }=20 =20 /* With this, plus the rx_header prepended to the data by the * hardware, we'll land the ethernet header on a 2-byte boundary. @@ -1676,13 +1717,12 @@ static int __devinit b44_get_invariants( bp->imask =3D IMASK_DEF; =20 bp->core_unit =3D ssb_core_unit(bp); =2D bp->dma_offset =3D SB_PCI_DMA; =20 /* XXX - really required?=20 bp->flags |=3D B44_FLAG_BUGGY_TXPTR; */ =2Dout: =2D return err; + + return 0; } =20 static int __devinit b44_init_one(struct pci_dev *pdev, @@ -1811,7 +1851,8 @@ static int __devinit b44_init_one(struct =20 pci_save_state(bp->pdev, bp->pci_cfg_state); =20 =2D printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name); + printk(KERN_INFO "%s: Broadcom %s 10/100BaseT Ethernet ", dev->name, + (pdev->device =3D=3D PCI_DEVICE_ID_BCM4713) ? "47xx" : "4400"); for (i =3D 0; i < 6; i++) printk("%2.2x%c", dev->dev_addr[i], i =3D=3D 5 ? '\n' : ':'); =2D-- linux/drivers/net/b44.h-old4 2004-08-29 17:24:53.000000000 +0200 +++ linux/drivers/net/b44.h 2004-08-29 18:42:56.000000000 +0200 @@ -363,6 +363,7 @@ struct ring_info { =20 #define B44_MCAST_TABLE_SIZE 32 #define B44_PHY_ADDR_NO_PHY 30 +#define B44_MDC_RATIO 5000000 =20 /* SW copy of device statistics, kept up to date by periodic timer * which probes HW values. Must have same relative layout as HW --nextPart2900989.SpQvQGFGbN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBMj8ZXRF2vHoIlBsRAg5hAKCZeRnTtZq/RAKJqbXhy2rSvpal8ACguam3 PYdcWx3/uhC3PJ5ctmFqYkI= =Iq4P -----END PGP SIGNATURE----- --nextPart2900989.SpQvQGFGbN-- From jolt@tuxbox.org Sun Aug 29 13:40:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:40:37 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TKePs0007789 for ; Sun, 29 Aug 2004 13:40:26 -0700 Received: from [192.168.1.100] [82.82.145.99] by taytron.net with ESMTP (SMTPD32-8.11) id AE6D28D0060; Sun, 29 Aug 2004 22:37:01 +0200 From: Florian Schirmer To: Pekka Pietikainen , jgarzik@pobox.com Subject: [PATCH][0/4] b44: Cleanup and bcm47xx support Date: Sun, 29 Aug 2004 22:17:57 +0200 User-Agent: KMail/1.7 Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2614505.sLF7dPDoeK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408292218.00756.jolt@tuxbox.org> X-archive-position: 8153 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 975 Lines: 39 --nextPart2614505.sLF7dPDoeK Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, here is the second try to add bcm47xx support to the b44 driver. Changes si= nce=20 the first version: =2D Splitted the patch into logical hunks =2D Ignore carrier lost errors (buggy hardware) =2D Added CAM read support =2D Read MAC from CAM instead of hardcoding a dummy MAC into the driver =2D Use a special PHY address (0x30) to indicate that there is no PHY (this= is=20 compatible with the Broadcom et and 4401 driver) =2D Added MDIO value calculation based on the backplane speed Comments welcome! Regards, Florian --nextPart2614505.sLF7dPDoeK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBMjn4XRF2vHoIlBsRAqt5AJ0TC4k2iZ+Fp26TqKAiaWX3bE9kKgCfRoar zG5U7bJnHBbTiBSnk0f1z2M= =kqcU -----END PGP SIGNATURE----- --nextPart2614505.sLF7dPDoeK-- From jolt@tuxbox.org Sun Aug 29 13:40:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:40:39 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TKePlr007790 for ; Sun, 29 Aug 2004 13:40:26 -0700 Received: from [192.168.1.100] [82.82.145.99] by taytron.net with ESMTP (SMTPD32-8.11) id AE7028D0060; Sun, 29 Aug 2004 22:37:04 +0200 From: Florian Schirmer To: Pekka Pietikainen Subject: [PATCH][3/4] b44: Add support for PHY-less cards Date: Sun, 29 Aug 2004 22:36:47 +0200 User-Agent: KMail/1.7 Cc: jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200408292218.00756.jolt@tuxbox.org> In-Reply-To: <200408292218.00756.jolt@tuxbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12312557.6IaqflfA8j"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408292236.49864.jolt@tuxbox.org> X-archive-position: 8157 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 2858 Lines: 103 --nextPart12312557.6IaqflfA8j Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, add support for PHY-less cards by using a special magic PHY address. This i= s compatible with the way Broadcom drivers handle that. We don't have to wa= ste a flags bit for that. Regards, Florian Signed-off-by: Florian Schirmer =2D-- linux/drivers/net/b44.c-old3 2004-08-29 16:59:24.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 17:24:23.000000000 +0200 @@ -273,6 +273,9 @@ static int b44_readphy(struct b44 *bp, i { int err; =20 + if (bp->phy_addr =3D=3D B44_PHY_ADDR_NO_PHY) + return 0; + bw32(B44_EMAC_ISTAT, EMAC_INT_MII); bw32(B44_MDIO_DATA, (MDIO_DATA_SB_START | (MDIO_OP_READ << MDIO_DATA_OP_SHIFT) | @@ -287,6 +290,9 @@ static int b44_readphy(struct b44 *bp, i =20 static int b44_writephy(struct b44 *bp, int reg, u32 val) { + if (bp->phy_addr =3D=3D B44_PHY_ADDR_NO_PHY) + return 0; + bw32(B44_EMAC_ISTAT, EMAC_INT_MII); bw32(B44_MDIO_DATA, (MDIO_DATA_SB_START | (MDIO_OP_WRITE << MDIO_DATA_OP_SHIFT) | @@ -325,6 +331,9 @@ static int b44_phy_reset(struct b44 *bp) u32 val; int err; =20 + if (bp->phy_addr =3D=3D B44_PHY_ADDR_NO_PHY) + return 0; + err =3D b44_writephy(bp, MII_BMCR, BMCR_RESET); if (err) return err; @@ -395,6 +404,9 @@ static int b44_setup_phy(struct b44 *bp) u32 val; int err; =20 + if (bp->phy_addr =3D=3D B44_PHY_ADDR_NO_PHY) + return 0; + if ((err =3D b44_readphy(bp, B44_MII_ALEDCTRL, &val)) !=3D 0) goto out; if ((err =3D b44_writephy(bp, B44_MII_ALEDCTRL, @@ -487,6 +499,19 @@ static void b44_check_phy(struct b44 *bp { u32 bmsr, aux; =20 + if (bp->phy_addr =3D=3D B44_PHY_ADDR_NO_PHY) { + bp->flags |=3D B44_FLAG_100_BASE_T; + bp->flags |=3D B44_FLAG_FULL_DUPLEX; + if (!netif_carrier_ok(bp->dev)) { + u32 val =3D br32(B44_TX_CTRL); + val |=3D TX_CTRL_DUPLEX; + bw32(B44_TX_CTRL, val); + netif_carrier_on(bp->dev); + b44_link_report(bp); + } + return; + } + if (!b44_readphy(bp, MII_BMSR, &bmsr) && !b44_readphy(bp, B44_MII_AUXCTRL, &aux) && (bmsr !=3D 0xffff)) { =2D-- linux/drivers/net/b44.h-old3 2004-08-29 17:06:44.000000000 +0200 +++ linux/drivers/net/b44.h 2004-08-29 17:24:53.000000000 +0200 @@ -362,6 +362,7 @@ struct ring_info { }; =20 #define B44_MCAST_TABLE_SIZE 32 +#define B44_PHY_ADDR_NO_PHY 30 =20 /* SW copy of device statistics, kept up to date by periodic timer * which probes HW values. Must have same relative layout as HW --nextPart12312557.6IaqflfA8j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBMj5hXRF2vHoIlBsRAttxAJ4zmhJ2mzkKRYQod8/VBf+rSl7pjwCgnY9m usmukrWJH1G5rPOy1iEnJKA= =/mCv -----END PGP SIGNATURE----- --nextPart12312557.6IaqflfA8j-- From jgarzik@pobox.com Sun Aug 29 13:49:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 13:49: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 i7TKnn5g010354 for ; Sun, 29 Aug 2004 13:49: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 1C1WcO-00074a-Lg; Sun, 29 Aug 2004 21:49:40 +0100 Message-ID: <41324158.4020709@pobox.com> Date: Sun, 29 Aug 2004 16:49:28 -0400 From: Jeff Garzik 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: Florian Schirmer CC: Pekka Pietikainen , linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH][1/4] b44: Ignore carrier lost errors References: <200408292218.00756.jolt@tuxbox.org> <200408292233.03879.jolt@tuxbox.org> In-Reply-To: <200408292233.03879.jolt@tuxbox.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8158 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: 600 Lines: 25 Your mailer is mangling the patches. Can you please resend without this? The patches need to be apply-able without MIME massaging. Jeff =2D-- linux/drivers/net/b44.c-old1 2004-08-29 16:29:08.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 16:27:00.000000000 +0200 @@ -1347,7 +1347,10 @@ static struct net_device_stats *b44_get_ hwstat->rx_symbol_errs); =20 nstat->tx_aborted_errors =3D hwstat->tx_underruns; +#if 0 + /* Carrier lost counter seems to be broken for some devices */ nstat->tx_carrier_errors =3D hwstat->tx_carrier_lost; +#endif =20 return nstat; } From romieu@fr.zoreil.com Sun Aug 29 14:02:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 14:02: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 i7TL2C9L010814 for ; Sun, 29 Aug 2004 14:02: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 i7TL0Dvr010339; Sun, 29 Aug 2004 23:00:13 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7TL0D6W010338; Sun, 29 Aug 2004 23:00:13 +0200 Date: Sun, 29 Aug 2004 23:00:13 +0200 From: Francois Romieu To: Jeff Garzik Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8.1-mm4 11/11] r8169: vlan support Message-ID: <20040829210013.GA9693@electric-eye.fr.zoreil.com> References: <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> <20040823225620.GI20726@electric-eye.fr.zoreil.com> <20040823225713.GJ20726@electric-eye.fr.zoreil.com> <20040823225821.GK20726@electric-eye.fr.zoreil.com> <4131136E.9070702@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4131136E.9070702@pobox.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8159 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: 13 Jeff Garzik : [...] > does this series of patches imply that a librealtek kernel module is > coming soon? There's an awful lot of code duplication (due to hardware > similarties) in r8169, 8139cp, and 8139too. I have not really considered 8139too so far as its hardware is a bit "different" but why not. soon ? What have you done to the real Jeff ? -- Ueimor From jolt@tuxbox.org Sun Aug 29 14:04:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 14:04:47 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TL4dh2011165 for ; Sun, 29 Aug 2004 14:04:40 -0700 Received: from [192.168.1.100] [82.82.145.99] by taytron.net with ESMTP (SMTPD32-8.11) id A4102A80060; Sun, 29 Aug 2004 23:01:04 +0200 From: Florian Schirmer To: Jeff Garzik Subject: Re: [PATCH][1/4] b44: Ignore carrier lost errors Date: Sun, 29 Aug 2004 23:04:24 +0200 User-Agent: KMail/1.7 Cc: Pekka Pietikainen , linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200408292218.00756.jolt@tuxbox.org> <200408292233.03879.jolt@tuxbox.org> <41324158.4020709@pobox.com> In-Reply-To: <41324158.4020709@pobox.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_ZTkMBiulVZrCu7i" Message-Id: <200408292304.25447.jolt@tuxbox.org> X-archive-position: 8160 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 19496 Lines: 584 --Boundary-00=_ZTkMBiulVZrCu7i Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, > Your mailer is mangling the patches. Can you please resend without this? > The patches need to be apply-able without MIME massaging. Sorry for that. KMail seems to mangle the message as soon as you sign it. Please find the non broken versions attached to this mail. Sorry, Florian --Boundary-00=_ZTkMBiulVZrCu7i Content-Type: text/x-diff; charset="iso-8859-1"; name="b44-1-broken-carrier-lost.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="b44-1-broken-carrier-lost.patch" --- linux/drivers/net/b44.c-old1 2004-08-29 16:29:08.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 16:27:00.000000000 +0200 @@ -1347,7 +1347,10 @@ static struct net_device_stats *b44_get_ 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; } --Boundary-00=_ZTkMBiulVZrCu7i Content-Type: text/x-diff; charset="iso-8859-1"; name="b44-2-remove-dead-ssb-crap.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="b44-2-remove-dead-ssb-crap.patch" --- linux/drivers/net/b44.c-old2 2004-08-29 16:27:00.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 16:59:24.000000000 +0200 @@ -130,41 +130,8 @@ static int b44_wait_bit(struct b44 *bp, * 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) { @@ -176,8 +143,7 @@ static u32 ssb_pci_setup(struct b44 *bp, 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(B44_SBINTVEC); @@ -1676,7 +1642,6 @@ static int __devinit b44_get_invariants( 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. @@ -1686,7 +1651,7 @@ static int __devinit b44_get_invariants( 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; --- linux/drivers/net/b44.h-old2 2004-08-29 16:25:36.000000000 +0200 +++ linux/drivers/net/b44.h 2004-08-29 17:06:44.000000000 +0200 @@ -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 @@ -540,7 +437,6 @@ struct b44 { u32 tx_pending; u32 pci_cfg_state[64 / sizeof(u32)]; u8 phy_addr; - u8 mdc_port; u8 core_unit; struct mii_if_info mii_if; --Boundary-00=_ZTkMBiulVZrCu7i Content-Type: text/x-diff; charset="iso-8859-1"; name="b44-3-phy-less-mode.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="b44-3-phy-less-mode.patch" --- linux/drivers/net/b44.c-old3 2004-08-29 16:59:24.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 17:24:23.000000000 +0200 @@ -273,6 +273,9 @@ static int b44_readphy(struct b44 *bp, i { int err; + if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) + return 0; + bw32(B44_EMAC_ISTAT, EMAC_INT_MII); bw32(B44_MDIO_DATA, (MDIO_DATA_SB_START | (MDIO_OP_READ << MDIO_DATA_OP_SHIFT) | @@ -287,6 +290,9 @@ static int b44_readphy(struct b44 *bp, i static int b44_writephy(struct b44 *bp, int reg, u32 val) { + if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) + return 0; + bw32(B44_EMAC_ISTAT, EMAC_INT_MII); bw32(B44_MDIO_DATA, (MDIO_DATA_SB_START | (MDIO_OP_WRITE << MDIO_DATA_OP_SHIFT) | @@ -325,6 +331,9 @@ static int b44_phy_reset(struct b44 *bp) u32 val; int err; + if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) + return 0; + err = b44_writephy(bp, MII_BMCR, BMCR_RESET); if (err) return err; @@ -395,6 +404,9 @@ static int b44_setup_phy(struct b44 *bp) u32 val; int err; + if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) + return 0; + if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0) goto out; if ((err = b44_writephy(bp, B44_MII_ALEDCTRL, @@ -487,6 +499,19 @@ static void b44_check_phy(struct b44 *bp { u32 bmsr, aux; + if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) { + bp->flags |= B44_FLAG_100_BASE_T; + bp->flags |= B44_FLAG_FULL_DUPLEX; + if (!netif_carrier_ok(bp->dev)) { + u32 val = br32(B44_TX_CTRL); + val |= TX_CTRL_DUPLEX; + bw32(B44_TX_CTRL, val); + netif_carrier_on(bp->dev); + b44_link_report(bp); + } + return; + } + if (!b44_readphy(bp, MII_BMSR, &bmsr) && !b44_readphy(bp, B44_MII_AUXCTRL, &aux) && (bmsr != 0xffff)) { --- linux/drivers/net/b44.h-old3 2004-08-29 17:06:44.000000000 +0200 +++ linux/drivers/net/b44.h 2004-08-29 17:24:53.000000000 +0200 @@ -362,6 +362,7 @@ struct ring_info { }; #define B44_MCAST_TABLE_SIZE 32 +#define B44_PHY_ADDR_NO_PHY 30 /* SW copy of device statistics, kept up to date by periodic timer * which probes HW values. Must have same relative layout as HW --Boundary-00=_ZTkMBiulVZrCu7i Content-Type: text/x-diff; charset="iso-8859-1"; name="b44-4-bcm47xx-support.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="b44-4-bcm47xx-support.patch" --- linux/drivers/net/b44.c-old4 2004-08-29 17:24:23.000000000 +0200 +++ linux/drivers/net/b44.c 2004-08-29 18:48:45.000000000 +0200 @@ -1,7 +1,8 @@ -/* b44.c: Broadcom 4400 device driver. +/* b44.c: Broadcom 4400/47xx device driver. * * Copyright (C) 2002 David S. Miller (davem@redhat.com) - * Fixed by Pekka Pietikainen (pp@ee.oulu.fi) + * Copyright (C) 2004 Pekka Pietikainen (pp@ee.oulu.fi) + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) * * Distribute under GPL. */ @@ -75,7 +76,7 @@ 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_DESCRIPTION("Broadcom 4400 10/100 PCI ethernet driver"); +MODULE_DESCRIPTION("Broadcom 4400/47xx 10/100 PCI ethernet driver"); MODULE_LICENSE("GPL"); MODULE_PARM(b44_debug, "i"); MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); @@ -89,6 +90,8 @@ static struct pci_device_id b44_pci_tbl[ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, + { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4713, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { } /* terminate list with empty entry */ }; @@ -202,29 +205,14 @@ static void ssb_core_reset(struct b44 *b udelay(1); } +static int b44_4713_instance; + static int ssb_core_unit(struct b44 *bp) { -#if 0 - u32 val = br32(B44_SBADMATCH0); - u32 base; - - type = val & SBADMATCH0_TYPE_MASK; - switch (type) { - case 0: - base = val & SBADMATCH0_BS0_MASK; - break; - - case 1: - base = val & SBADMATCH0_BS1_MASK; - break; - - case 2: - default: - base = val & SBADMATCH0_BS2_MASK; - break; - }; -#endif - return 0; + if (bp->pdev->device == PCI_DEVICE_ID_BCM4713) + return b44_4713_instance++; + else + return 0; } static int ssb_is_core_up(struct b44 *bp) @@ -233,6 +221,28 @@ static int ssb_is_core_up(struct b44 *bp == SBTMSLOW_CLOCK); } +static void __b44_cam_read(struct b44 *bp, unsigned char *data, int index) +{ + u32 val; + + bw32(B44_CAM_CTRL, (CAM_CTRL_READ | + (index << CAM_CTRL_INDEX_SHIFT))); + + b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1); + + val = br32(B44_CAM_DATA_LO); + + data[2] = (val >> 24) & 0xFF; + data[3] = (val >> 16) & 0xFF; + data[4] = (val >> 8) & 0xFF; + data[5] = (val >> 0) & 0xFF; + + val = br32(B44_CAM_DATA_HI); + + data[0] = (val >> 8) & 0xFF; + data[1] = (val >> 0) & 0xFF; +} + static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index) { u32 val; @@ -1110,6 +1120,8 @@ static void b44_clear_stats(struct b44 * /* bp->lock is held. */ static void b44_chip_reset(struct b44 *bp) { + unsigned int sb_clock; + if (ssb_is_core_up(bp)) { bw32(B44_RCV_LAZY, 0); bw32(B44_ENET_CTRL, ENET_CTRL_DISABLE); @@ -1123,9 +1135,10 @@ static void b44_chip_reset(struct b44 *b bw32(B44_DMARX_CTRL, 0); bp->rx_prod = bp->rx_cons = 0; } else { - ssb_pci_setup(bp, (bp->core_unit == 0 ? - SBINTVEC_ENET0 : - SBINTVEC_ENET1)); + if (bp->pdev->device != PCI_DEVICE_ID_BCM4713) + ssb_pci_setup(bp, (bp->core_unit == 0 ? + SBINTVEC_ENET0 : + SBINTVEC_ENET1)); } ssb_core_reset(bp); @@ -1133,8 +1146,14 @@ static void b44_chip_reset(struct b44 *b b44_clear_stats(bp); /* Make PHY accessible. */ + if (bp->pdev->device == PCI_DEVICE_ID_BCM4713) + sb_clock = 100000000; /* 100 MHz */ + else + sb_clock = 62500000; /* 62.5 MHz */ + bw32(B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE | - (0x0d & MDIO_CTRL_MAXF_MASK))); + (((sb_clock + (B44_MDC_RATIO / 2)) / B44_MDC_RATIO) + & MDIO_CTRL_MAXF_MASK))); br32(B44_MDIO_CTRL); if (!(br32(B44_DEVCTRL) & DEVCTRL_IPP)) { @@ -1654,19 +1673,41 @@ static int __devinit b44_get_invariants( { u8 eeprom[128]; int err; + unsigned long flags; - err = b44_read_eeprom(bp, &eeprom[0]); - if (err) - goto out; - - bp->dev->dev_addr[0] = eeprom[79]; - bp->dev->dev_addr[1] = eeprom[78]; - bp->dev->dev_addr[2] = eeprom[81]; - bp->dev->dev_addr[3] = eeprom[80]; - bp->dev->dev_addr[4] = eeprom[83]; - bp->dev->dev_addr[5] = eeprom[82]; - - bp->phy_addr = eeprom[90] & 0x1f; + if (bp->pdev->device == PCI_DEVICE_ID_BCM4713) { + /* + * BCM47xx boards don't have a EEPROM. The MAC is stored in + * a NVRAM area somewhere in the flash memory. As we don't + * know the location and/or the format of the NVRAM area + * here, we simply rely on the bootloader to write the + * MAC into the CAM. + */ + spin_lock_irqsave(&bp->lock, flags); + __b44_cam_read(bp, bp->dev->dev_addr, 0); + spin_unlock_irqrestore(&bp->lock, flags); + + /* + * BCM47xx boards don't have a PHY. Usually there is a switch + * chip with multiple PHYs connected to the PHY port. + */ + bp->phy_addr = B44_PHY_ADDR_NO_PHY; + bp->dma_offset = 0; + } else { + err = b44_read_eeprom(bp, &eeprom[0]); + if (err) + return err; + + bp->dev->dev_addr[0] = eeprom[79]; + bp->dev->dev_addr[1] = eeprom[78]; + bp->dev->dev_addr[2] = eeprom[81]; + bp->dev->dev_addr[3] = eeprom[80]; + bp->dev->dev_addr[4] = eeprom[83]; + bp->dev->dev_addr[5] = eeprom[82]; + + bp->phy_addr = eeprom[90] & 0x1f; + bp->dma_offset = SB_PCI_DMA; + } /* With this, plus the rx_header prepended to the data by the * hardware, we'll land the ethernet header on a 2-byte boundary. @@ -1676,13 +1717,12 @@ static int __devinit b44_get_invariants( bp->imask = IMASK_DEF; bp->core_unit = ssb_core_unit(bp); - bp->dma_offset = SB_PCI_DMA; /* XXX - really required? bp->flags |= B44_FLAG_BUGGY_TXPTR; */ -out: - return err; + + return 0; } static int __devinit b44_init_one(struct pci_dev *pdev, @@ -1811,7 +1851,8 @@ static int __devinit b44_init_one(struct pci_save_state(bp->pdev, bp->pci_cfg_state); - printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name); + printk(KERN_INFO "%s: Broadcom %s 10/100BaseT Ethernet ", dev->name, + (pdev->device == PCI_DEVICE_ID_BCM4713) ? "47xx" : "4400"); for (i = 0; i < 6; i++) printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':'); --- linux/drivers/net/b44.h-old4 2004-08-29 17:24:53.000000000 +0200 +++ linux/drivers/net/b44.h 2004-08-29 18:42:56.000000000 +0200 @@ -363,6 +363,7 @@ struct ring_info { #define B44_MCAST_TABLE_SIZE 32 #define B44_PHY_ADDR_NO_PHY 30 +#define B44_MDC_RATIO 5000000 /* SW copy of device statistics, kept up to date by periodic timer * which probes HW values. Must have same relative layout as HW --Boundary-00=_ZTkMBiulVZrCu7i-- From garzik@havoc.gtf.org Sun Aug 29 14:22:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 14:22:25 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TLMIZQ012817 for ; Sun, 29 Aug 2004 14:22:19 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 849BD75C8; Sun, 29 Aug 2004 17:22:05 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7TLM5c0002923; Sun, 29 Aug 2004 17:22:05 -0400 Date: Sun, 29 Aug 2004 17:22:05 -0400 From: Jeff Garzik To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org, romieu@fr.zoreil.com Subject: [PATCH,RFT] 8139cp TSO support Message-ID: <20040829212205.GA2864@havoc.gtf.org> Reply-To: netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 8161 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: 3502 Lines: 132 Just added TSO support to the 8139cp driver, as it looked fairly straightforward. Anyone willing to give this some testing? Also, the r8169 implementation should be similar, if someone (Francois?) wants to tackle it. Jeff # ChangeSet # 2004/08/29 17:19:44-04:00 jgarzik@pobox.com # [netdrvr 8139cp] TSO support # diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c --- a/drivers/net/8139cp.c 2004-08-29 17:19:59 -04:00 +++ b/drivers/net/8139cp.c 2004-08-29 17:19:59 -04:00 @@ -185,6 +185,9 @@ RingEnd = (1 << 30), /* End of descriptor ring */ FirstFrag = (1 << 29), /* First segment of a packet */ LastFrag = (1 << 28), /* Final segment of a packet */ + LargeSend = (1 << 27), /* TCP Large Send Offload (TSO) */ + MSSShift = 16, /* MSS value position */ + MSSMask = 0xfff, /* MSS value: 11 bits */ TxError = (1 << 23), /* Tx error summary */ RxError = (1 << 20), /* Rx error summary */ IPCS = (1 << 18), /* Calculate IP checksum */ @@ -747,10 +750,11 @@ { struct cp_private *cp = netdev_priv(dev); unsigned entry; - u32 eor; + u32 eor, flags; #if CP_VLAN_TAG_USED u32 vlan_tag = 0; #endif + int mss = 0; spin_lock_irq(&cp->lock); @@ -770,6 +774,9 @@ entry = cp->tx_head; eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; + if (dev->features & NETIF_F_TSO) + mss = skb_shinfo(skb)->tso_size; + if (skb_shinfo(skb)->nr_frags == 0) { struct cp_desc *txd = &cp->tx_ring[entry]; u32 len; @@ -781,21 +788,21 @@ txd->addr = cpu_to_le64(mapping); wmb(); - if (skb->ip_summed == CHECKSUM_HW) { + flags = eor | len | DescOwn | FirstFrag | LastFrag; + + if (mss) + flags |= LargeSend | ((mss & MSSMask) << MSSShift); + else if (skb->ip_summed == CHECKSUM_HW) { const struct iphdr *ip = skb->nh.iph; if (ip->protocol == IPPROTO_TCP) - txd->opts1 = cpu_to_le32(eor | len | DescOwn | - FirstFrag | LastFrag | - IPCS | TCPCS); + flags |= IPCS | TCPCS; else if (ip->protocol == IPPROTO_UDP) - txd->opts1 = cpu_to_le32(eor | len | DescOwn | - FirstFrag | LastFrag | - IPCS | UDPCS); + flags |= IPCS | UDPCS; else BUG(); - } else - txd->opts1 = cpu_to_le32(eor | len | DescOwn | - FirstFrag | LastFrag); + } + + txd->opts1 = cpu_to_le32(flags); wmb(); cp->tx_skb[entry].skb = skb; @@ -834,16 +841,19 @@ len, PCI_DMA_TODEVICE); eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; - if (skb->ip_summed == CHECKSUM_HW) { - ctrl = eor | len | DescOwn | IPCS; + ctrl = eor | len | DescOwn; + + if (mss) + ctrl |= LargeSend | + ((mss & MSSMask) << MSSShift); + else if (skb->ip_summed == CHECKSUM_HW) { if (ip->protocol == IPPROTO_TCP) - ctrl |= TCPCS; + ctrl |= IPCS | TCPCS; else if (ip->protocol == IPPROTO_UDP) - ctrl |= UDPCS; + ctrl |= IPCS | UDPCS; else BUG(); - } else - ctrl = eor | len | DescOwn; + } if (frag == skb_shinfo(skb)->nr_frags - 1) ctrl |= LastFrag; @@ -1536,6 +1546,8 @@ .set_tx_csum = ethtool_op_set_tx_csum, /* local! */ .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, + .get_tso = ethtool_op_get_tso, + .set_tso = ethtool_op_set_tso, .get_regs = cp_get_regs, .get_wol = cp_get_wol, .set_wol = cp_set_wol, @@ -1765,6 +1777,10 @@ if (pci_using_dac) dev->features |= NETIF_F_HIGHDMA; + +#if 0 /* disabled by default until verified */ + dev->features |= NETIF_F_TSO; +#endif dev->irq = pdev->irq; From jgarzik@pobox.com Sun Aug 29 14:24:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 14:24: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 i7TLOHsH013124 for ; Sun, 29 Aug 2004 14:24: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 1C1X9k-0007y6-MK; Sun, 29 Aug 2004 22:24:08 +0100 Message-ID: <4132496C.3060404@pobox.com> Date: Sun, 29 Aug 2004 17:23:56 -0400 From: Jeff Garzik 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: Francois Romieu CC: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.8.1-mm4 11/11] r8169: vlan support References: <20040823224706.GC20726@electric-eye.fr.zoreil.com> <20040823224813.GD20726@electric-eye.fr.zoreil.com> <20040823224927.GE20726@electric-eye.fr.zoreil.com> <20040823225120.GF20726@electric-eye.fr.zoreil.com> <20040823225335.GG20726@electric-eye.fr.zoreil.com> <20040823225505.GH20726@electric-eye.fr.zoreil.com> <20040823225620.GI20726@electric-eye.fr.zoreil.com> <20040823225713.GJ20726@electric-eye.fr.zoreil.com> <20040823225821.GK20726@electric-eye.fr.zoreil.com> <4131136E.9070702@pobox.com> <20040829210013.GA9693@electric-eye.fr.zoreil.com> In-Reply-To: <20040829210013.GA9693@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8162 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: 538 Lines: 23 Francois Romieu wrote: > Jeff Garzik : > [...] > >>does this series of patches imply that a librealtek kernel module is >>coming soon? There's an awful lot of code duplication (due to hardware >>similarties) in r8169, 8139cp, and 8139too. > > > I have not really considered 8139too so far as its hardware is a bit > "different" but why not. 8139cp and 8139too both share the same phy code, and 8139cp and r8169 both share the same RX/TX code. > soon ? What have you done to the real Jeff ? hehe :) Jeff From kaber@trash.net Sun Aug 29 14:48:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 14:48:56 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TLmhwW014277; Sun, 29 Aug 2004 14:48:44 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id 7D40419F33C; Sun, 29 Aug 2004 23:48:30 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 9CC09394175; Sun, 29 Aug 2004 23:48:29 +0200 (CEST) Message-ID: <41324F2C.4090003@trash.net> Date: Sun, 29 Aug 2004 23:48:28 +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: "David S. Miller" , David Stevens , davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> In-Reply-To: <4132303C.2060807@trash.net> Content-Type: multipart/mixed; boundary="------------090202080509080400070005" X-archive-position: 8164 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: 83 This is a multi-part message in MIME format. --------------090202080509080400070005 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Patrick McHardy wrote: > Attached. The first patch still crashed, we need to prevent new > fragments from getting queued after the queue is flushed until the > hook in unregistered. The patch is racy, another CPU could already have passed the check for ip_ct_no_defrag and queue the packet after __ip_evictor calculated the work to do, so the packet (or another one) will not get evicted. This patch on top calls synchronize_net() to prevent this. > >@@ -1181,6 +1183,12 @@ > #ifdef CONFIG_NETFILTER_DEBUG > unsigned int olddebug = skb->nf_debug; > #endif >+ >+ if (unlikely(ip_ct_no_defrag)) { >+ kfree_skb(skb); >+ return NULL; >+ } >+ > if (sk) { > sock_hold(sk); > skb_orphan(skb); >diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c >--- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-29 20:55:13 +02:00 >+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-29 20:55:13 +02:00 >@@ -805,6 +805,12 @@ > cleanup_defraglocalops: > nf_unregister_hook(&ip_conntrack_defrag_local_out_ops); > cleanup_defragops: >+ /* Frag queues may hold fragments with skb->dst == NULL */ >+ ip_ct_no_defrag = 1; >+ smp_wmb(); >+ local_bh_disable(); >+ ipfrag_flush(); >+ local_bh_enable(); > nf_unregister_hook(&ip_conntrack_defrag_ops); > cleanup_proc_stat: > proc_net_remove("ip_conntrack_stat"); > > --------------090202080509080400070005 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/08/29 23:36:17+02:00 kaber@coreworks.de # [NETFILTER]: Fix race when flushing fragment queue # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/29 23:35:54+02:00 kaber@coreworks.de +1 -1 # [NETFILTER]: Fix race when flushing fragment queue # diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-29 23:39:07 +02:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-29 23:39:07 +02:00 @@ -807,7 +807,7 @@ cleanup_defragops: /* Frag queues may hold fragments with skb->dst == NULL */ ip_ct_no_defrag = 1; - smp_wmb(); + synchronize_net(); local_bh_disable(); ipfrag_flush(); local_bh_enable(); --------------090202080509080400070005-- From kaber@trash.net Sun Aug 29 14:58:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 14:58:27 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TLwKwb014989; Sun, 29 Aug 2004 14:58:21 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id BF19619F33C; Sun, 29 Aug 2004 23:58:07 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 00390394175; Sun, 29 Aug 2004 23:58:06 +0200 (CEST) Message-ID: <4132516E.7080805@trash.net> Date: Sun, 29 Aug 2004 23:58: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: dlstevens@us.ibm.com, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> <20040829125708.5aa70469.davem@davemloft.net> In-Reply-To: <20040829125708.5aa70469.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8165 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: 737 Lines: 23 David S. Miller wrote: >>>Does 2.4.x have this problem too? I thought it didn't. >>> >>> >>I'll have a look, but I think it does. >> 2.4 has the same problem. Before I post the patch, 2.4 seems to be missing this patch, do you already have it queued or should I send a 2.4 version first ? ChangeSet@1.1853, 2004-08-18 14:28:05-07:00, davem@nuts.davemloft.net [IPV4]: Fix theoretical loop on SMP in ip_evictor(). Snapshot the amount of work to do, and just do it. In this way we avoid a theoretical loop whereby one cpu sits in ip_evictor() tossing fragments while another keeps adding a fragment just as we bring ip_frag_mem down below the low threshold. Signed-off-by: David S. Miller From romieu@fr.zoreil.com Sun Aug 29 15:30:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 15:30: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 i7TMU5DC015786 for ; Sun, 29 Aug 2004 15:30: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 i7TMSWvr011217; Mon, 30 Aug 2004 00:28:32 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7TMSVtb011216; Mon, 30 Aug 2004 00:28:31 +0200 Date: Mon, 30 Aug 2004 00:28:31 +0200 From: Francois Romieu To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: Re: [PATCH,RFT] 8139cp TSO support Message-ID: <20040829222831.GA9496@electric-eye.fr.zoreil.com> References: <20040829212205.GA2864@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040829212205.GA2864@havoc.gtf.org> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8166 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: 3701 Lines: 112 Jeff Garzik : [...] > Also, the r8169 implementation should be similar, if someone (Francois?) > wants to tackle it. I'll copy and test it tomorrow on r8169 if nobody beats me. On a related note, 8139cp probably wants something like the patch below for the usual SG handling (on top of 2.6.9-rc1 + -mm1 + TSO patch): - suspicious length in pci_unmap_single; - wait for the last frag before freeing the relevant skb; - no need to crash when facing some unexpected csum combination. diff -puN drivers/net/8139cp.c~8139cp-010 drivers/net/8139cp.c --- linux-2.6.9-rc1/drivers/net/8139cp.c~8139cp-010 2004-08-29 23:47:07.000000000 +0200 +++ linux-2.6.9-rc1-fr/drivers/net/8139cp.c 2004-08-30 00:16:13.000000000 +0200 @@ -314,7 +314,7 @@ struct cp_desc { struct ring_info { struct sk_buff *skb; dma_addr_t mapping; - unsigned frag; + u32 len; }; struct cp_dma_stats { @@ -708,7 +708,7 @@ static void cp_tx (struct cp_private *cp BUG(); pci_unmap_single(cp->pdev, cp->tx_skb[tx_tail].mapping, - skb->len, PCI_DMA_TODEVICE); + cp->tx_skb[tx_tail].len, PCI_DMA_TODEVICE); if (status & LastFrag) { if (status & (TxError | TxFIFOUnder)) { @@ -799,7 +799,7 @@ static int cp_start_xmit (struct sk_buff else if (ip->protocol == IPPROTO_UDP) flags |= IPCS | UDPCS; else - BUG(); + WARN_ON(1); /* we need a WARN() */ } txd->opts1 = cpu_to_le32(flags); @@ -807,7 +807,6 @@ static int cp_start_xmit (struct sk_buff cp->tx_skb[entry].skb = skb; cp->tx_skb[entry].mapping = mapping; - cp->tx_skb[entry].frag = 0; entry = NEXT_TX(entry); } else { struct cp_desc *txd; @@ -824,8 +823,8 @@ static int cp_start_xmit (struct sk_buff first_mapping = pci_map_single(cp->pdev, skb->data, first_len, PCI_DMA_TODEVICE); cp->tx_skb[entry].skb = skb; + cp->tx_skb[entry].len = first_len; cp->tx_skb[entry].mapping = first_mapping; - cp->tx_skb[entry].frag = 1; entry = NEXT_TX(entry); for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) { @@ -868,7 +867,7 @@ static int cp_start_xmit (struct sk_buff cp->tx_skb[entry].skb = skb; cp->tx_skb[entry].mapping = mapping; - cp->tx_skb[entry].frag = frag + 2; + cp->tx_skb[entry].len = len; entry = NEXT_TX(entry); } @@ -1082,7 +1081,6 @@ static int cp_refill_rx (struct cp_priva cp->rx_skb[i].mapping = pci_map_single(cp->pdev, skb->tail, cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp->rx_skb[i].skb = skb; - cp->rx_skb[i].frag = 0; cp->rx_ring[i].opts2 = 0; cp->rx_ring[i].addr = cpu_to_le64(cp->rx_skb[i].mapping); @@ -1134,9 +1132,6 @@ static void cp_clean_rings (struct cp_pr { unsigned i; - memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); - memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); - for (i = 0; i < CP_RX_RING_SIZE; i++) { if (cp->rx_skb[i].skb) { pci_unmap_single(cp->pdev, cp->rx_skb[i].mapping, @@ -1148,13 +1143,18 @@ static void cp_clean_rings (struct cp_pr for (i = 0; i < CP_TX_RING_SIZE; i++) { if (cp->tx_skb[i].skb) { struct sk_buff *skb = cp->tx_skb[i].skb; + pci_unmap_single(cp->pdev, cp->tx_skb[i].mapping, - skb->len, PCI_DMA_TODEVICE); - dev_kfree_skb(skb); + cp->tx_skb[i].len, PCI_DMA_TODEVICE); + if (le32_to_cpu(cp->tx_ring[i].opts1) & LastFrag) + dev_kfree_skb(skb); cp->net_stats.tx_dropped++; } } + memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); + memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); + memset(&cp->rx_skb, 0, sizeof(struct ring_info) * CP_RX_RING_SIZE); memset(&cp->tx_skb, 0, sizeof(struct ring_info) * CP_TX_RING_SIZE); } _ From jgarzik@pobox.com Sun Aug 29 16:02:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 16:02:45 -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 i7TN2dUU016470 for ; Sun, 29 Aug 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 1C1Ygw-0001xP-Bj; Mon, 30 Aug 2004 00:02:30 +0100 Message-ID: <41326079.9090402@pobox.com> Date: Sun, 29 Aug 2004 19:02:17 -0400 From: Jeff Garzik 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: Francois Romieu CC: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH,RFT] 8139cp TSO support References: <20040829212205.GA2864@havoc.gtf.org> <20040829222831.GA9496@electric-eye.fr.zoreil.com> In-Reply-To: <20040829222831.GA9496@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8167 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: 1117 Lines: 34 Francois Romieu wrote: > Jeff Garzik : > [...] > >>Also, the r8169 implementation should be similar, if someone (Francois?) >>wants to tackle it. > > > I'll copy and test it tomorrow on r8169 if nobody beats me. > > On a related note, 8139cp probably wants something like the patch below for > the usual SG handling (on top of 2.6.9-rc1 + -mm1 + TSO patch): > > - suspicious length in pci_unmap_single; > - wait for the last frag before freeing the relevant skb; > - no need to crash when facing some unexpected csum combination. Looks OK except for > diff -puN drivers/net/8139cp.c~8139cp-010 drivers/net/8139cp.c > --- linux-2.6.9-rc1/drivers/net/8139cp.c~8139cp-010 2004-08-29 23:47:07.000000000 +0200 > +++ linux-2.6.9-rc1-fr/drivers/net/8139cp.c 2004-08-30 00:16:13.000000000 +0200 > @@ -807,7 +807,6 @@ static int cp_start_xmit (struct sk_buff > > cp->tx_skb[entry].skb = skb; > cp->tx_skb[entry].mapping = mapping; > - cp->tx_skb[entry].frag = 0; > entry = NEXT_TX(entry); > } else { > struct cp_desc *txd; You definitely want to set .len on the no-frags path... From davem@davemloft.net Sun Aug 29 16:42:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 16: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 i7TNgc2Z020469; Sun, 29 Aug 2004 16:42: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 1C1ZFd-0005nz-00; Sun, 29 Aug 2004 16:38:21 -0700 Date: Sun, 29 Aug 2004 16:38:21 -0700 From: "David S. Miller" To: Patrick McHardy Cc: dlstevens@us.ibm.com, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040829163821.2a4239df.davem@davemloft.net> In-Reply-To: <4132516E.7080805@trash.net> References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> <20040829125708.5aa70469.davem@davemloft.net> <4132516E.7080805@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: 8168 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: 1132 Lines: 33 On Sun, 29 Aug 2004 23:58:06 +0200 Patrick McHardy wrote: > Before I post the patch, 2.4 seems to be > missing this patch, do you already have it queued or should I send > a 2.4 version first ? > > ChangeSet@1.1853, 2004-08-18 14:28:05-07:00, davem@nuts.davemloft.net > [IPV4]: Fix theoretical loop on SMP in ip_evictor(). I pushed this off to Marcelo, he just didn't pull from my tree yet, which is at: bk://kernel.bkbits.net/davem/net-2.4 Where you'll find those fixes as: ChangeSet@1.1498.1.2, 2004-08-18 14:26:09-07:00, davem@nuts.davemloft.net [IPV4]: Fix theoretical loop on SMP in ip_evictor(). Snapshot the amount of work to do, and just do it. In this way we avoid a theoretical loop whereby one cpu sits in ip_evictor() tossing fragments while another keeps adding a fragment just as we bring ip_frag_mem down below the low threshold. Signed-off-by: David S. Miller ChangeSet@1.1498.1.3, 2004-08-18 14:31:35-07:00, davem@nuts.davemloft.net [IPV6]: ip6_evictor() has same problem as ip_evictor(). Signed-off-by: David S. Miller From davem@davemloft.net Sun Aug 29 16:46:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 16:46:24 -0700 (PDT) Received: from smtp104.mail.sc5.yahoo.com (smtp104.mail.sc5.yahoo.com [66.163.169.223]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7TNkJon020818 for ; Sun, 29 Aug 2004 16:46:19 -0700 Received: from unknown (HELO cheetah.davemloft.net) (davem?330@63.197.226.105 with login) by smtp104.mail.sc5.yahoo.com with SMTP; 29 Aug 2004 23:46:11 -0000 Date: Sun, 29 Aug 2004 16:45:28 -0700 From: "David S. Miller" To: Florian Schirmer Cc: jgarzik@pobox.com, pp@ee.oulu.fi, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH][1/4] b44: Ignore carrier lost errors Message-Id: <20040829164528.220424e5.davem@davemloft.net> In-Reply-To: <200408292304.25447.jolt@tuxbox.org> References: <200408292218.00756.jolt@tuxbox.org> <200408292233.03879.jolt@tuxbox.org> <41324158.4020709@pobox.com> <200408292304.25447.jolt@tuxbox.org> Organization: DaveM Loft Enterprises X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8169 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 Sun, 29 Aug 2004 23:04:24 +0200 Florian Schirmer wrote: > Sorry for that. KMail seems to mangle the message as soon as you sign > it. Please find the non broken versions attached to this mail. I think Florian's changes are fine. BTW, can someone fixup something for me? Update MODULE_AUTHOR() please :-) 3/4 of this driver have been rewritten since I last touched it, heh. From garzik@havoc.gtf.org Sun Aug 29 16:49:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 16:49:48 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [216.162.42.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7TNngTE021218 for ; Sun, 29 Aug 2004 16:49:42 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 95ACD759F; Sun, 29 Aug 2004 19:49:28 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i7TNnS86010079; Sun, 29 Aug 2004 19:49:28 -0400 Date: Sun, 29 Aug 2004 19:49:28 -0400 From: Jeff Garzik To: "David S. Miller" Cc: Florian Schirmer , pp@ee.oulu.fi, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH][1/4] b44: Ignore carrier lost errors Message-ID: <20040829234928.GA10060@havoc.gtf.org> References: <200408292218.00756.jolt@tuxbox.org> <200408292233.03879.jolt@tuxbox.org> <41324158.4020709@pobox.com> <200408292304.25447.jolt@tuxbox.org> <20040829164528.220424e5.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040829164528.220424e5.davem@davemloft.net> User-Agent: Mutt/1.4.1i X-archive-position: 8170 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: 20 On Sun, Aug 29, 2004 at 04:45:28PM -0700, David S. Miller wrote: > On Sun, 29 Aug 2004 23:04:24 +0200 > Florian Schirmer wrote: > > > Sorry for that. KMail seems to mangle the message as soon as you sign > > it. Please find the non broken versions attached to this mail. > > I think Florian's changes are fine. > > BTW, can someone fixup something for me? Update MODULE_AUTHOR() > please :-) 3/4 of this driver have been rewritten since I last > touched it, heh. hehe. I'll take care of it tonight when I queue Florian's stuff to netdev-2.6 (and thus -mm, and thus eventually mainline). Jeff From pablo@eurodev.net Sun Aug 29 17:37:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 17:37:32 -0700 (PDT) Received: from smtp06.retemail.es (smtp06.auna.com [62.81.186.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U0bPrA022451 for ; Sun, 29 Aug 2004 17:37:25 -0700 Received: from eurodev.net ([217.216.70.61]) by smtp06.retemail.es (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20040830003711.QMKS18728.smtp06.retemail.es@eurodev.net>; Mon, 30 Aug 2004 02:37:11 +0200 Message-ID: <413276D9.9080303@eurodev.net> Date: Mon, 30 Aug 2004 02:37:45 +0200 From: Pablo Neira User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.6) Gecko/20040528 Debian/1.6-7 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: [PATCH] Improve behaviour of Netlink Sockets References: <412DF807.2040703@eurodev.net> <20040826141407.38b56729.davem@redhat.com> <412EB40A.6010100@eurodev.net> <20040826214710.5e322f1a.davem@redhat.com> <412F1269.8090303@eurodev.net> <20040827172736.543dbd54.davem@redhat.com> In-Reply-To: <20040827172736.543dbd54.davem@redhat.com> Content-Type: multipart/mixed; boundary="------------050608010505050300050900" X-archive-position: 8171 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pablo@eurodev.net Precedence: bulk X-list: netdev Content-Length: 4635 Lines: 201 This is a multi-part message in MIME format. --------------050608010505050300050900 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Davem, David S. Miller wrote: >Is a 2.4.x version possible? > > Attached the 2.4.x version. It just spawns one kernel thread called netlink, is it ok? regards, Pablo --------------050608010505050300050900 Content-Type: text/x-patch; name="netlink-tqueue.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="netlink-tqueue.patch" --- a/net/netlink/af_netlink.c 2004-08-28 05:35:35.000000000 +0200 +++ b/net/netlink/af_netlink.c 2004-08-29 16:00:46.000000000 +0200 @@ -42,6 +42,7 @@ #include #include #include +#include #define Nprintk(a...) @@ -63,6 +64,15 @@ void (*data_ready)(struct sock *sk, int bytes); }; +struct netlink_work +{ + struct sock *sk; + int len; + struct tq_struct work; +}; + +static DECLARE_TASK_QUEUE(tq_netlink); +static DECLARE_WAIT_QUEUE_HEAD(netlink_thread_wait); static struct sock *nl_table[MAX_LINKS]; static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait); static unsigned nl_nonroot[MAX_LINKS]; @@ -81,6 +91,15 @@ static struct notifier_block *netlink_chain; +void netlink_tq_handler(void *data) +{ + struct netlink_work *work = data; + + work->sk->data_ready(work->sk, work->len); + sock_put(work->sk); + kfree(work); +} + static void netlink_sock_destruct(struct sock *sk) { skb_queue_purge(&sk->receive_queue); @@ -437,6 +456,8 @@ if (atomic_read(&sk->rmem_alloc) > sk->rcvbuf || test_bit(0, &sk->protinfo.af_netlink->state)) { + struct task_struct *client; + if (!timeo) { if (ssk->protinfo.af_netlink->pid == 0) netlink_overrun(sk); @@ -445,6 +466,19 @@ return -EAGAIN; } + if (!sk->protinfo.af_netlink->pid) { + /* Kernel is sending information to user space + * and socket buffer is full: Wake up user */ + + client = find_task_by_pid(sk->protinfo.af_netlink->pid); + if (!client) { + sock_put(sk); + kfree_skb(skb); + return -EAGAIN; + } + wake_up_process(client); + } + __set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&sk->protinfo.af_netlink->wait, &wait); @@ -467,8 +501,26 @@ skb_orphan(skb); skb_set_owner_r(skb, sk); skb_queue_tail(&sk->receive_queue, skb); - sk->data_ready(sk, len); - sock_put(sk); + + if (!sk->protinfo.af_netlink->pid) { + struct netlink_work *nlwork = + kmalloc(sizeof(struct netlink_work), GFP_KERNEL); + + if (!nlwork) { + sock_put(sk); + return -EAGAIN; + } + + INIT_TQUEUE(&nlwork->work, netlink_tq_handler, nlwork); + nlwork->sk = sk; + nlwork->len = len; + queue_task(&nlwork->work, &tq_netlink); + wake_up(&netlink_thread_wait); + } else { + sk->data_ready(sk, len); + sock_put(sk); + } + return len; no_dst: @@ -490,7 +542,22 @@ skb_orphan(skb); skb_set_owner_r(skb, sk); skb_queue_tail(&sk->receive_queue, skb); - sk->data_ready(sk, skb->len); + + if (!sk->protinfo.af_netlink->pid) { + struct netlink_work *nlwork = + kmalloc(sizeof(struct netlink_work), GFP_KERNEL); + + if (!nlwork) + return -EAGAIN; + + INIT_TQUEUE(&nlwork->work, netlink_tq_handler, nlwork); + nlwork->sk = sk; + nlwork->len = skb->len; + queue_task(&nlwork->work, &tq_netlink); + wake_up(&netlink_thread_wait); + } else + sk->data_ready(sk, skb->len); + return 0; } return -1; @@ -534,11 +601,12 @@ netlink_overrun(sk); /* Clone failed. Notify ALL listeners. */ failure = 1; + sock_put(sk); } else if (netlink_broadcast_deliver(sk, skb2)) { netlink_overrun(sk); + sock_put(sk); } else skb2 = NULL; - sock_put(sk); } netlink_unlock_table(); @@ -868,6 +936,26 @@ netlink_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); } +int netlink_thread(void *unused) +{ + struct task_struct *tsk = current; + DECLARE_WAITQUEUE(wait, tsk); + + daemonize(); + strcpy(tsk->comm, "netlink"); + sigfillset(&tsk->blocked); + mb(); + + for (;;) { + run_task_queue(&tq_netlink); + + __set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&netlink_thread_wait, &wait); + schedule(); + __set_current_state(TASK_RUNNING); + remove_wait_queue(&netlink_thread_wait, &wait); + } +} #ifdef NL_EMULATE_DEV @@ -1027,6 +1115,8 @@ #ifdef CONFIG_PROC_FS create_proc_read_entry("net/netlink", 0, 0, netlink_read_proc, NULL); #endif + kernel_thread(netlink_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL); + return 0; } --------------050608010505050300050900-- From kaber@trash.net Sun Aug 29 17:50:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 17:50:37 -0700 (PDT) Received: from www.legaleagle.de (legaleagle.de [217.160.128.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U0oTOJ023345; Sun, 29 Aug 2004 17:50:29 -0700 Received: from eru.coreworks.de (unknown [172.16.0.2]) by www.legaleagle.de (Postfix) with ESMTP id BA06919F33C; Mon, 30 Aug 2004 02:50:15 +0200 (CEST) Received: from trash.net (unknown [172.16.1.123]) by eru.coreworks.de (Postfix) with ESMTP id 92981394175; Mon, 30 Aug 2004 02:50:11 +0200 (CEST) Message-ID: <413279C2.8020400@trash.net> Date: Mon, 30 Aug 2004 02:50: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: dlstevens@us.ibm.com, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> <20040829125708.5aa70469.davem@davemloft.net> <4132516E.7080805@trash.net> <20040829163821.2a4239df.davem@davemloft.net> In-Reply-To: <20040829163821.2a4239df.davem@davemloft.net> Content-Type: multipart/mixed; boundary="------------060709030904060409000704" X-archive-position: 8173 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: 5917 Lines: 198 This is a multi-part message in MIME format. --------------060709030904060409000704 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David S. Miller wrote: >On Sun, 29 Aug 2004 23:58:06 +0200 >Patrick McHardy wrote: > > >>Before I post the patch, 2.4 seems to be >>missing this patch, do you already have it queued or should I send >>a 2.4 version first ? >> >>ChangeSet@1.1853, 2004-08-18 14:28:05-07:00, davem@nuts.davemloft.net >> [IPV4]: Fix theoretical loop on SMP in ip_evictor(). >> >> > >I pushed this off to Marcelo, he just didn't pull from my >tree yet, which is at: > > bk://kernel.bkbits.net/davem/net-2.4 > >Where you'll find those fixes as: > >ChangeSet@1.1498.1.2, 2004-08-18 14:26:09-07:00, davem@nuts.davemloft.net > [IPV4]: Fix theoretical loop on SMP in ip_evictor(). > > Great, here is the patch for 2.4 for the conntrack problem. --------------060709030904060409000704 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/08/30 02:22:35+02:00 kaber@coreworks.de # [NETFILTER]: Flush fragment queue on conntrack unload # # Based on patch from Olaf Kirch # # Signed-off-by: Patrick McHardy # # net/netsyms.c # 2004/08/30 02:22:30+02:00 kaber@coreworks.de +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/30 02:22:30+02:00 kaber@coreworks.de +7 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/08/30 02:22:30+02:00 kaber@coreworks.de +8 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # net/ipv4/ip_fragment.c # 2004/08/30 02:22:30+02:00 kaber@coreworks.de +13 -3 # [NETFILTER]: Flush fragment queue on conntrack unload # # include/net/ip.h # 2004/08/30 02:22:30+02:00 kaber@coreworks.de +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # include/linux/netfilter_ipv4/ip_conntrack.h # 2004/08/30 02:22:30+02:00 kaber@coreworks.de +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h --- a/include/linux/netfilter_ipv4/ip_conntrack.h 2004-08-30 02:24:47 +02:00 +++ b/include/linux/netfilter_ipv4/ip_conntrack.h 2004-08-30 02:24:47 +02:00 @@ -249,6 +249,7 @@ /* Call me when a conntrack is destroyed. */ extern void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack); +extern int ip_ct_no_defrag; /* Returns new sk_buff, or NULL */ struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb); diff -Nru a/include/net/ip.h b/include/net/ip.h --- a/include/net/ip.h 2004-08-30 02:24:47 +02:00 +++ b/include/net/ip.h 2004-08-30 02:24:47 +02:00 @@ -228,6 +228,7 @@ */ struct sk_buff *ip_defrag(struct sk_buff *skb); +extern void ipfrag_flush(void); extern int ip_frag_nqueues; extern atomic_t ip_frag_mem; diff -Nru a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c --- a/net/ipv4/ip_fragment.c 2004-08-30 02:24:47 +02:00 +++ b/net/ipv4/ip_fragment.c 2004-08-30 02:24:47 +02:00 @@ -240,15 +240,15 @@ } /* Memory limiting on fragments. Evictor trashes the oldest - * fragment queue until we are back under the low threshold. + * fragment queue until we are back under the threshold. */ -static void ip_evictor(void) +static void __ip_evictor(int threshold) { struct ipq *qp; struct list_head *tmp; int work; - work = atomic_read(&ip_frag_mem) - sysctl_ipfrag_low_thresh; + work = atomic_read(&ip_frag_mem) - threshold; if (work <= 0) return; @@ -273,6 +273,11 @@ } } +static inline void ip_evictor(void) +{ + __ip_evictor(sysctl_ipfrag_low_thresh); +} + /* * Oops, a fragment queue timed out. Kill it and send an ICMP reply. */ @@ -681,4 +686,9 @@ ipfrag_secret_timer.function = ipfrag_secret_rebuild; ipfrag_secret_timer.expires = jiffies + sysctl_ipfrag_secret_interval; add_timer(&ipfrag_secret_timer); +} + +void ipfrag_flush(void) +{ + __ip_evictor(0); } diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c --- a/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-30 02:24:47 +02:00 +++ b/net/ipv4/netfilter/ip_conntrack_core.c 2004-08-30 02:24:47 +02:00 @@ -1183,6 +1183,8 @@ WRITE_UNLOCK(&ip_conntrack_lock); } +int ip_ct_no_defrag; + /* Returns new sk_buff, or NULL */ struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb) @@ -1191,6 +1193,12 @@ #ifdef CONFIG_NETFILTER_DEBUG unsigned int olddebug = skb->nf_debug; #endif + + if (unlikely(ip_ct_no_defrag)) { + kfree_skb(skb); + return NULL; + } + if (sk) { sock_hold(sk); skb_orphan(skb); diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-30 02:24:47 +02:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-08-30 02:24:47 +02:00 @@ -393,6 +393,13 @@ cleanup_inandlocalops: nf_unregister_hook(&ip_conntrack_local_out_ops); cleanup_inops: + /* Frag queues may hold fragments with skb->dst == NULL */ + ip_ct_no_defrag = 1; + local_bh_disable(); + br_write_lock(BR_NETPROTO_LOCK); + br_write_unlock(BR_NETPROTO_LOCK); + ipfrag_flush(); + local_bh_enable(); nf_unregister_hook(&ip_conntrack_in_ops); cleanup_proc: proc_net_remove("ip_conntrack"); diff -Nru a/net/netsyms.c b/net/netsyms.c --- a/net/netsyms.c 2004-08-30 02:24:47 +02:00 +++ b/net/netsyms.c 2004-08-30 02:24:47 +02:00 @@ -283,6 +283,7 @@ EXPORT_SYMBOL(inetdev_by_index); EXPORT_SYMBOL(in_dev_finish_destroy); EXPORT_SYMBOL(ip_defrag); +EXPORT_SYMBOL(ipfrag_flush); /* Route manipulation */ EXPORT_SYMBOL(ip_rt_ioctl); --------------060709030904060409000704-- From davem@davemloft.net Sun Aug 29 21:32:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 21:32: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 i7U4Wc79030896; Sun, 29 Aug 2004 21:32: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 1C1dm9-0006Hz-00; Sun, 29 Aug 2004 21:28:13 -0700 Date: Sun, 29 Aug 2004 21:28:13 -0700 From: "David S. Miller" To: Patrick McHardy Cc: dlstevens@us.ibm.com, davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org, okir@suse.de Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-Id: <20040829212813.5807d478.davem@davemloft.net> In-Reply-To: <413279C2.8020400@trash.net> References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> <20040829125708.5aa70469.davem@davemloft.net> <4132516E.7080805@trash.net> <20040829163821.2a4239df.davem@davemloft.net> <413279C2.8020400@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: 8174 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: 219 Lines: 7 On Mon, 30 Aug 2004 02:50:10 +0200 Patrick McHardy wrote: > Great, here is the patch for 2.4 for the conntrack problem. Applied, along with the 2.6.x variant plus the synchronize_net() fix for 2.6.x From jm@jm.kir.nu Sun Aug 29 21:57:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 21:57:13 -0700 (PDT) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U4v6fJ031789 for ; Sun, 29 Aug 2004 21:57:07 -0700 Received: from jm by jm.kir.nu with local (Exim 4.34) id 1C1eBl-00021Z-EY; Sun, 29 Aug 2004 21:54:41 -0700 Date: Sun, 29 Aug 2004 21:54:41 -0700 From: Jouni Malinen To: Jean Tourrilhes Cc: netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Updated WE-18 (WPA) proposal Message-ID: <20040830045441.GA7415@jm.kir.nu> Mail-Followup-To: Jean Tourrilhes , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 8175 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkmaline@cc.hut.fi Precedence: bulk X-list: netdev Content-Length: 15850 Lines: 411 Finally, I had enough time to implement and test the proposed WE-18 (WPA) changes with Host AP driver and wpa_supplicant. This testing was indeed needed since number of issues showed up. I have made an updated version of the WE-18 proposal that seems to work with hostap and wpa_supplicant (current development snapshot from http://hostap/epitest.fi/). I have not yet verified how much of interface needed for hostapd could be moved to these new parts of WE-18 instead of the currently used private ioctls. Since WE-17 has apparently not yet been merged all the way into linux-2.6 tree, the patch below is against Linux 2.6.8.1 that has been patched with WE-17 patch (http://www.hpl.hp.com/personal/ Jean_Tourrilhes/Linux/iw268_we17-10.diff). This should be quite close to what the final WE-18 would be diffed against. This WE-18 patch is still experimental and it may still need to be changed (i.e., this should not yet be merged into linux-2.6). Change log against the latest WE-18 proposal (http://www.hpl.hp.com/ personal/Jean_Tourrilhes/Linux/iw_we18-3.diff): - replaced optional parameter (iw_point) to SIOCSIWSCAN with a new ioctl (SIOCSIWSCANEXT) since the previous design was not really backwards compatible (e.g., 'iwlist wlan0 scan' did not work) - replaced IWEVWPAIE/IWEVRSNIE with more generic IWEVGENIE which can also be used with non-WPA (e.g., IEEE 802.11e/WMM) IEs; in addition, fixed the type for this event to be IW_HEADER_TYPE_POINT (was _PARAM) - use larger IW_GENERIC_IE_MAX (256->1024) to be able to handle possible needs for future IEEE 802.11 amendments - added new IW_AUTH_INDEX parameters IW_AUTH_WPA_ENABLED and IW_AUTH_RX_UNENCRYPTED_EAPOL that were missing from the functionality needed by wpa_supplicant interface - changed IW_AUTH_WPA_VERSION, IW_AUTH_PAIRWISE_CIPHER, IW_AUTH_GROUP_CIPHER, and IW_AUTH_KEY_MGMT to bit fields - added LEAP to IW_AUTH_80211_AUTH_ALG values - added IW_ENCODE_EXT_SET_TX_KEY (set key value and mark key as default TX key with one ioctl) - added some more comments to areas that were unclear (have generated questions) - added min_tokens values for SIOCSIWENCODEEXT and SIOCGIWENCODEEXT Question: is length field in struct iw_point in bytes or tokens (token_size bytes)? I assumed it was in bytes, but this did not work very well with WE ioctls that had token_size != 1; I made SIOCSIWSCANEXT use token_size = 1 for now, but it could be replaced to be sizeof(struct) and min_tokens=max_tokesn=1 once this question is resolved. diff -upr 2.6.8.1-WE17/include/linux/wireless.h 2.6.8.1-WE18/include/linux/wireless.h --- 2.6.8.1-WE17/include/linux/wireless.h 2004-08-29 21:23:32.277037256 -0700 +++ 2.6.8.1-WE18/include/linux/wireless.h 2004-08-29 19:25:33.000000000 -0700 @@ -1,7 +1,7 @@ /* * This file define a set of standard wireless extensions * - * Version : 17 21.6.04 + * Version : 18 29.8.04 * * Authors : Jean Tourrilhes - HPL - * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. @@ -82,7 +82,7 @@ * (there is some stuff that will be added in the future...) * I just plan to increment with each new version. */ -#define WIRELESS_EXT 17 +#define WIRELESS_EXT 18 /* * Changes : @@ -182,6 +182,19 @@ * - Document (struct iw_quality *)->updated, add new flags (INVALID) * - Wireless Event capability in struct iw_range * - Add support for relative TxPower (yick !) + * + * V17 to V18 (From Jouni Malinen ) + * ---------- + * - Add support for WPA/WPA2 + * - Add extended encoding configuration (SIOCSIWENCODEEXT and + * SIOCGIWENCODEEXT) + * - Add SIOCSIWGENIE/SIOCGIWGENIE + * - Add SIOCSIWMLME + * - Add struct iw_range bit field for supported encoding capabilities + * - Add extended scan request (SIOCSIWSCANEXT) + * - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA + * related parameters (extensible up to 4096 parameter values) + * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE */ /**************************** CONSTANTS ****************************/ @@ -256,6 +269,29 @@ #define SIOCSIWPOWER 0x8B2C /* set Power Management settings */ #define SIOCGIWPOWER 0x8B2D /* get Power Management settings */ +/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM). + * This ioctl uses struct iw_point and data buffer that includes IE id and len + * fields. More than one IE may be included in the request. Setting the generic + * IE to empty buffer (len=0) removes the generic IE from the driver. */ +#define SIOCSIWGENIE 0x8B30 /* set generic IE */ +#define SIOCGIWGENIE 0x8B31 /* get generic IE */ + +/* WPA : IEEE 802.11 MLME requests */ +#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses + * struct iw_mlme */ +/* WPA : Authentication mode parameters */ +#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */ +#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */ + +/* WPA : Extended version of encoding configuration */ +#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */ +#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */ + +/* Extended scan request; like SIOCSIWSCAN, but with additional parameters in + * struct iw_scan_req buffer. This shares SIOCGIWSCAN for reading the results. + */ +#define SIOCSIWSCANEXT 0x8B36 /* trigger scanning (extended) */ + /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ /* These 32 ioctl are wireless device private, for 16 commands. @@ -297,6 +333,15 @@ #define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */ #define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */ #define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */ +#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..) + * (scan results); This includes id and + * length fields. One IWEVGENIE may + * contain more than one IE. Scan + * results may contain one or more + * IWEVGENIE events. */ +#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure + * (struct iw_michaelmicfailure) + */ #define IWEVFIRST 0x8C00 @@ -432,12 +477,87 @@ #define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */ #define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */ #define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */ +/* struct iw_scan_req scan_type */ +#define IW_SCAN_TYPE_ACTIVE 0 +#define IW_SCAN_TYPE_PASSIVE 1 /* Maximum size of returned data */ #define IW_SCAN_MAX_DATA 4096 /* In bytes */ /* Max number of char in custom event - use multiple of them if needed */ #define IW_CUSTOM_MAX 256 /* In bytes */ +/* Generic information element */ +#define IW_GENERIC_IE_MAX 1024 + +/* MLME requests (SIOCSIWMLME / struct iw_mlme) */ +#define IW_MLME_DEAUTH 0 +#define IW_MLME_DISASSOC 1 + +/* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */ +#define IW_AUTH_INDEX 0x0FFF +#define IW_AUTH_FLAGS 0xF000 +/* SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095) + * (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the + * parameter that is being set/get to; value will be read/written to + * struct iw_param value field) */ +#define IW_AUTH_WPA_VERSION 0 +#define IW_AUTH_CIPHER_PAIRWISE 1 +#define IW_AUTH_CIPHER_GROUP 2 +#define IW_AUTH_KEY_MGMT 3 +#define IW_AUTH_TKIP_COUNTERMEASURES 4 +#define IW_AUTH_DROP_UNENCRYPTED 5 +#define IW_AUTH_80211_AUTH_ALG 6 +#define IW_AUTH_WPA_ENABLED 7 +#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 + +/* IW_AUTH_WPA_VERSION values (bit field) */ +#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 +#define IW_AUTH_WPA_VERSION_WPA 0x00000002 +#define IW_AUTH_WPA_VERSION_WPA2 0x00000004 + +/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */ +#define IW_AUTH_CIPHER_NONE 0x00000001 +#define IW_AUTH_CIPHER_WEP40 0x00000002 +#define IW_AUTH_CIPHER_TKIP 0x00000004 +#define IW_AUTH_CIPHER_CCMP 0x00000008 +#define IW_AUTH_CIPHER_WEP104 0x00000010 + +/* IW_AUTH_KEY_MGMT values (bit field) */ +#define IW_AUTH_KEY_MGMT_802_1X 1 +#define IW_AUTH_KEY_MGMT_PSK 2 + +/* IW_AUTH_80211_AUTH_ALG values (bit field) */ +#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001 +#define IW_AUTH_ALG_SHARED_KEY 0x00000002 +#define IW_AUTH_ALG_LEAP 0x00000004 + +/* SIOCSIWENCODEEXT definitions */ +#define IW_ENCODE_SEQ_MAX_SIZE 8 +/* struct iw_encode_ext ->alg */ +#define IW_ENCODE_ALG_NONE 0 +#define IW_ENCODE_ALG_WEP 1 +#define IW_ENCODE_ALG_TKIP 2 +#define IW_ENCODE_ALG_CCMP 3 +/* struct iw_encode_ext ->ext_flags */ +#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 +#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 +#define IW_ENCODE_EXT_GROUP_KEY 0x00000004 +#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008 + +/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */ +#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */ +#define IW_MICFAILURE_GROUP 0x00000004 +#define IW_MICFAILURE_PAIRWISE 0x00000008 +#define IW_MICFAILURE_STAKEY 0x00000010 +#define IW_MICFAILURE_COUNT 0x00000060 /* 1 or 2 (0 = count not supported) + */ + +/* Bit field values for enc_capa in struct iw_range */ +#define IW_ENC_CAPA_WPA 0x00000001 +#define IW_ENC_CAPA_WPA2 0x00000002 +#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004 +#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008 + /* Event capability macros - in (struct iw_range *)->event_capa * Because we have more than 32 possible events, we use an array of * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ @@ -546,6 +666,86 @@ struct iw_thrspy struct iw_quality high; /* High threshold */ }; +/* + * Data for extended scan request (MLME-SCAN.request) + */ +struct iw_scan_req +{ + __u8 mode; /* IW_MODE_AUTO (= Both), IW_MODE_ADHOC, or + * IW_MODE_INFRA */ + __u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */ + __u8 essid_len; + __u8 num_channels; /* num entries in channel_list; + * 0 = scan all allowed channels */ + struct sockaddr bssid; /* ff:ff:ff:ff:ff:ff for broadcast BSSID or + * individual address of a specific BSS */ + /* Use this ESSID if IW_SCAN_THIS_ESSID flag is used instead of using + * the current ESSID. This allows scan requests for specific ESSID + * without having to change the current ESSID and potentially breaking + * the current association. */ + __u8 essid[IW_ESSID_MAX_SIZE]; + __u32 probe_delay; /* delay in usec prior to transmitting + * ProbeReq */ + __u32 min_channel_time; /* in TU, >= probe_delay */ + __u32 max_channel_time; /* in TU, >= min_channel_time */ + struct iw_freq channel_list[IW_MAX_FREQUENCIES]; +}; + +/* ------------------------- WPA SUPPORT ------------------------- */ + +/* + * Extended data structure for get/set encoding (this is used with + * SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and IW_ENCODE_* + * flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and + * only the data contents changes (key data -> this structure, including + * key data). + * + * If the new key is the first group key, it will be set as the default + * TX key. Otherwise, default TX key index is only changed if + * IW_ENCODE_EXT_SET_TX_KEY flag is set. + * + * Key will be changed with SIOCSIWENCODEEXT in all cases except for + * special "change TX key index" operation which is indicated by setting + * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY. + * + * tx_seq/rx_seq are only used when respective + * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal + * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start + * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally + * used only by an Authenticator (AP or an IBSS station) to get the + * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and + * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for + * debugging/testing. + */ +struct iw_encode_ext +{ + __u32 ext_flags; /* IW_ENCODE_EXT_* */ + __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ + __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ + struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast + * (group) keys or unicast address for + * individual keys */ + __u16 alg; /* IW_ENCODE_ALG_* */ + __u16 key_len; + __u8 key[0]; +}; + +/* SIOCSIWMLME data */ +struct iw_mlme +{ + __u16 cmd; /* IW_MLME_* */ + __u16 reason_code; + struct sockaddr addr; +}; + +/* IWEVMICHAELMICFAILURE data */ +struct iw_michaelmicfailure +{ + __u32 flags; + struct sockaddr src_addr; + __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ +}; + /* ------------------------ WIRELESS STATS ------------------------ */ /* * Wireless statistics (used for /proc/net/wireless) @@ -725,6 +925,8 @@ struct iw_range struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */ /* Note : this frequency list doesn't need to fit channel numbers, * because each entry contain its channel index */ + + __u32 enc_capa; /* IW_ENC_CAPA_* bit field */ }; /* diff -upr 2.6.8.1-WE17/net/core/wireless.c 2.6.8.1-WE18/net/core/wireless.c --- 2.6.8.1-WE17/net/core/wireless.c 2004-08-29 21:23:32.285036040 -0700 +++ 2.6.8.1-WE18/net/core/wireless.c 2004-08-29 21:27:41.406163872 -0700 @@ -186,6 +186,12 @@ static const struct iw_ioctl_description .header_type = IW_HEADER_TYPE_ADDR, .flags = IW_DESCR_FLAG_DUMP, }, + [SIOCSIWMLME - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = sizeof(struct iw_mlme), + .min_tokens = 1, + .max_tokens = 1, + }, [SIOCGIWAPLIST - SIOCIWFIRST] = { .header_type = IW_HEADER_TYPE_POINT, .token_size = sizeof(struct sockaddr) + @@ -272,6 +278,52 @@ static const struct iw_ioctl_description [SIOCGIWPOWER - SIOCIWFIRST] = { .header_type = IW_HEADER_TYPE_PARAM, }, + [SIOCSIWGENIE - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = 1, + .max_tokens = IW_GENERIC_IE_MAX, + }, + [SIOCGIWGENIE - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = 1, + .max_tokens = IW_GENERIC_IE_MAX, + }, + [SIOCSIWAUTH - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_PARAM, + }, + [SIOCGIWAUTH - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_PARAM, + }, + [SIOCSIWENCODEEXT - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = 1, + .min_tokens = sizeof(struct iw_encode_ext), + .max_tokens = sizeof(struct iw_encode_ext) + + IW_ENCODING_TOKEN_MAX, + }, + [SIOCGIWENCODEEXT - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = 1, + .min_tokens = sizeof(struct iw_encode_ext), + .max_tokens = sizeof(struct iw_encode_ext) + + IW_ENCODING_TOKEN_MAX, + }, + [SIOCSIWSCANEXT - SIOCIWFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, +#if 0 + /* FIX: JKM - is this correct? Is length in struct iw_point + * number of bytes or number of tokens in the buffer? + * I changed this to use token_size=1 for now, since I assumed + * length from user space would always be in bytes.. */ + .token_size = sizeof(struct iw_scan_req), + .min_tokens = 1, + .max_tokens = 1, +#else + .token_size = 1, + .min_tokens = sizeof(struct iw_scan_req), + .max_tokens = sizeof(struct iw_scan_req), +#endif + }, }; static const int standard_ioctl_num = (sizeof(standard_ioctl) / sizeof(struct iw_ioctl_description)); @@ -298,6 +350,16 @@ static const struct iw_ioctl_description [IWEVEXPIRED - IWEVFIRST] = { .header_type = IW_HEADER_TYPE_ADDR, }, + [IWEVGENIE - IWEVFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = 1, + .max_tokens = IW_GENERIC_IE_MAX, + }, + [IWEVMICHAELMICFAILURE - IWEVFIRST] = { + .header_type = IW_HEADER_TYPE_POINT, + .token_size = 1, + .max_tokens = sizeof(struct iw_michaelmicfailure), + }, }; static const int standard_event_num = (sizeof(standard_event) / sizeof(struct iw_ioctl_description)); -- Jouni Malinen PGP id EFC895FA From pekkas@netcore.fi Sun Aug 29 23:10:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 23:10:46 -0700 (PDT) Received: from netcore.fi (netcore.fi [193.94.160.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U6AeGH002127 for ; Sun, 29 Aug 2004 23:10:40 -0700 Received: from localhost (pekkas@localhost) by netcore.fi (8.11.6/8.11.6) with ESMTP id i7U6AQU19975 for ; Mon, 30 Aug 2004 09:10:26 +0300 Date: Mon, 30 Aug 2004 09:10:26 +0300 (EEST) From: Pekka Savola To: netdev@oss.sgi.com Subject: Re: Disabling IPv6 accept_ra on just some interface (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 X-archive-position: 8177 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pekkas@netcore.fi Precedence: bulk X-list: netdev Content-Length: 3041 Lines: 77 I already re-sent this in Feb 2004, but apparently it got lost. In summary, I'd like to get accept_ra overloaded so that when it changes from 0->1, it sends out a router solicititation. Seems like a good idea to me. This helps in the situation where you want to disable autoconf on some interfaces, but because you need to disable it by default on all interfaces before any interface is created, you'll want a mechanism to trigger router solicitications from the user space. Another thing to consider is what happens when accept_ra changes from 1->0. The most conservative thing would be nothing.. ---------- Forwarded message ---------- Date: Mon, 27 Oct 2003 15:05:42 +0200 (EET) From: Pekka Savola To: "YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B" Cc: netdev@oss.sgi.com, sekiya@wide.ad.jp Subject: Re: Disabling IPv6 accept_ra on just some interface On Mon, 27 Oct 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote: > In article (at Thu, 23 Oct 2003 15:22:47 +0300 (EEST)), Pekka Savola says: > > So, my thought (comments welcome) is: > > > > 1) when accept_ra changes from 0 -> 1, initiate the route > > solicitation process, likewise as one would when the interface is > > brought up. > > > > Makes sense? > > > > 2) (probably not a good idea, but some food for thought..) when accept_ra > > changes from 1 -> 0, delete any autoconfigured routes or > > prefixes. (could be ugly / dangerous..) > > Well, we'd propose to have another config "send_rs" or something like that > because accept_ra is also effective against unsolicited RAs. > It, "send_rs," tells kernel to start sending RS > when the variable is changed 0 to 1 and/or > when interface is going up. I don't have any major objections to this model, I'm just worried that it might make the configuration more complex (we already have accept_ra and "autoconf" toggles which are confusing enough without documentation :-) with little gain. That is, is there any case when you'd want to accept an RA but *not* send RS? I fail to see clear applicability for this, hence my proposal to overload accept_ra :-) > Assume the node has eth0 and eth1. > Operation will be something like the following. > > If you want to listen RA and to send RS on some interfaces, > sysctl -w net.ipv6.conf.default.accept_ra=0 > sysctl -w net.ipv6.conf.default.send_rs=0 > ifup -a > sysctl -w net.ipv6.conf.eth0.accept_ra=1 > sysctl -w net.ipv6.conf.eth0.send_rs=1 > > If you want to listen RA on all interfaces, but do not want to send RS on > some of them, > sysctl -w net.ipv6.conf.default.accept_ra=1 > sysctl -w net.ipv6.conf.default.send_rs=0 > ifup -a > sysctl -w net.ipv6.cont.eth0.send_rs=1 > > -- Pekka Savola "You each name yourselves king, yet the Netcore Oy kingdom bleeds." Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings From pp@ee.oulu.fi Sun Aug 29 23:10:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 23:10:40 -0700 (PDT) Received: from ee.oulu.fi (ee.oulu.fi [130.231.61.23]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U6AW2a002115 for ; Sun, 29 Aug 2004 23:10:33 -0700 Received: from tk28.oulu.fi (tk28 [130.231.48.68]) by ee.oulu.fi (8.13.1/8.13.1) with ESMTP id i7U6ALuE015345; Mon, 30 Aug 2004 09:10:21 +0300 (EEST) Received: (from pp@localhost) by tk28.oulu.fi (8.13.0/8.13.0/Submit) id i7U6AKKb021639; Mon, 30 Aug 2004 09:10:20 +0300 (EEST) Date: Mon, 30 Aug 2004 09:10:20 +0300 From: Pekka Pietikainen To: Jeff Garzik Cc: Florian Schirmer , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: [PATCH][1/4] b44: Ignore carrier lost errors Message-ID: <20040830061020.GA21270@ee.oulu.fi> References: <200408292218.00756.jolt@tuxbox.org> <200408292233.03879.jolt@tuxbox.org> <41324158.4020709@pobox.com> <200408292304.25447.jolt@tuxbox.org> <20040829164528.220424e5.davem@davemloft.net> <20040829234928.GA10060@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20040829234928.GA10060@havoc.gtf.org> User-Agent: Mutt/1.4.2i X-archive-position: 8176 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pp@ee.oulu.fi Precedence: bulk X-list: netdev Content-Length: 4681 Lines: 150 On Sun, Aug 29, 2004 at 07:49:28PM -0400, Jeff Garzik wrote: > > BTW, can someone fixup something for me? Update MODULE_AUTHOR() > > please :-) 3/4 of this driver have been rewritten since I last > > touched it, heh. > > hehe. I'll take care of it tonight when I queue Florian's stuff > to netdev-2.6 (and thus -mm, and thus eventually mainline). And here's a resend of the bounce buffer patch, which should still apply on top of Florians (or without) just fine. Signed-off-by: Pekka Pietikainen --- linux-2.6.8-rc3/drivers/net/b44.h.4g4g 2004-08-08 10:54:03.979353080 +0300 +++ linux-2.6.8-rc3/drivers/net/b44.h 2004-08-08 10:54:17.928232528 +0300 @@ -493,6 +493,7 @@ struct ring_info *rx_buffers; struct ring_info *tx_buffers; + unsigned char *tx_bufs; u32 dma_offset; u32 flags; @@ -525,7 +526,7 @@ 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; --- linux-2.6.8-rc3/drivers/net/b44.c.4g4g 2004-08-08 10:53:58.724151992 +0300 +++ linux-2.6.8-rc3/drivers/net/b44.c 2004-08-08 10:54:17.657273720 +0300 @@ -27,8 +27,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 +57,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 +68,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) @@ -631,10 +633,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 *) @@ -912,6 +934,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); @@ -1059,6 +1087,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; + } } /* @@ -1081,6 +1114,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) @@ -1746,12 +1785,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); From jm@jm.kir.nu Sun Aug 29 23:15:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 29 Aug 2004 23:15:08 -0700 (PDT) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U6F3n2002824 for ; Sun, 29 Aug 2004 23:15:03 -0700 Received: from jm by jm.kir.nu with local (Exim 4.34) id 1C1fP9-00024Z-KD; Sun, 29 Aug 2004 23:12:35 -0700 Date: Sun, 29 Aug 2004 23:12:35 -0700 From: Jouni Malinen To: Jeff Garzik Cc: hostap@shmoo.com, prism54-devel@prism54.org, netdev@oss.sgi.com Subject: wireless-2.6 (was: [PATCH] wpa_supplicant: update driver_prism54.c) Message-ID: <20040830061235.GB7415@jm.kir.nu> Mail-Followup-To: Jeff Garzik , hostap@shmoo.com, prism54-devel@prism54.org, netdev@oss.sgi.com References: <20040819232720.GD6044@ruslug.rutgers.edu> <20040820024645.GA7154@jm.kir.nu> <413114FA.2000609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <413114FA.2000609@pobox.com> User-Agent: Mutt/1.5.6i X-archive-position: 8178 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkmaline@cc.hut.fi Precedence: bulk X-list: netdev Content-Length: 1769 Lines: 34 On Sat, Aug 28, 2004 at 07:27:54PM -0400, Jeff Garzik wrote: > Am I ever going to see an update to HostAP in wireless-2.6? I sure hope so. Unfortunately, there have been couple of things delaying this on my part. One being lack of time (or not being on top of the priority list), another being wait for getting a resolution for somewhat related negotiations with my current employer. Time/priority part is hopefully getting better. I wanted to first finish the proposal for adding WPA/WPA2 to wireless extensions, but that is starting to be near completion. After this, working on cleaning up the generic IEEE 802.11 code in Host AP driver would be quite good next project. If you are willing to add WE-18 first to wireless-2.6, I could easily send you patches for this (both for adding WE-18 and to make Host AP use it). The other delaying factor is a bit more complicated. My current employer happens to be involved with very similar areas as wireless-2.6 development and I need to be a bit careful on what I'm doing on my free time. I took care of getting written agreement about Host AP development before joining the company (lucky me ;-), but future wireless-2.6 changes are starting to get beyond this. I had hoped to get this resolved long time ago. However, getting a new agreement about extended area (like wireless-2.6) has unfortunately already taken way more than enough time and is still ongoing. Apparently, I will have to start pushing more on this to actually get some kind of conclusion so that I could start working more actively with wireless-2.6. If nothing else works, I may have to start looking for a new employer in order to be able to work with wireless-2.6.. -- Jouni Malinen PGP id EFC895FA From jolt@tuxbox.org Mon Aug 30 00:04:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 00:05:03 -0700 (PDT) Received: from taytron.net (ipx10602.ipxserver.de [80.190.249.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U74tbY004249 for ; Mon, 30 Aug 2004 00:04:56 -0700 Received: from [127.0.0.1] [192.168.1.1] by taytron.net with ESMTP (SMTPD32-8.11) id A0C7EEC0068; Mon, 30 Aug 2004 09:01:27 +0200 Message-ID: <4132D16E.6010003@tuxbox.org> Date: Mon, 30 Aug 2004 09:04:14 +0200 From: Florian Schirmer User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pekka Pietikainen CC: Jeff Garzik , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: [PATCH][1/4] b44: Ignore carrier lost errors References: <200408292218.00756.jolt@tuxbox.org> <200408292233.03879.jolt@tuxbox.org> <41324158.4020709@pobox.com> <200408292304.25447.jolt@tuxbox.org> <20040829164528.220424e5.davem@davemloft.net> <20040829234928.GA10060@havoc.gtf.org> <20040830061020.GA21270@ee.oulu.fi> In-Reply-To: <20040830061020.GA21270@ee.oulu.fi> X-Enigmail-Version: 0.84.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: 8179 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jolt@tuxbox.org Precedence: bulk X-list: netdev Content-Length: 983 Lines: 31 Hi, while i do agree that this patch is needed and should do what it is supposed to do i'm still wondering what the idea behind pci_map_single() returning inaccessible DMA addresses is. The pci layer knows that the device can only handle addresses up to 1GB. For what reasons should it return addresses above that limit? Reading the DMA-mappings.txt didn't reveal an answer so maybe someone can shed some light onto this topic? Thanks, Florian Pekka Pietikainen wrote: >On Sun, Aug 29, 2004 at 07:49:28PM -0400, Jeff Garzik wrote: > > >>>BTW, can someone fixup something for me? Update MODULE_AUTHOR() >>>please :-) 3/4 of this driver have been rewritten since I last >>>touched it, heh. >>> >>> >>hehe. I'll take care of it tonight when I queue Florian's stuff >>to netdev-2.6 (and thus -mm, and thus eventually mainline). >> >> >And here's a resend of the bounce buffer patch, which should still >apply on top of Florians (or without) just fine. > > From okir@suse.de Mon Aug 30 00:57:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 00:57:44 -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 i7U7vaaF010710; Mon, 30 Aug 2004 00:57:37 -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 EC34CB38E60; Mon, 30 Aug 2004 09:57:22 +0200 (CEST) Date: Mon, 30 Aug 2004 09:57:10 +0200 From: Olaf Kirch To: Patrick McHardy Cc: "David S. Miller" , David Stevens , davem@redhat.com, laforge@netfilter.org, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Prevent crash on ip_conntrack removal Message-ID: <20040830075709.GA28454@suse.de> References: <412A8FB5.4080700@trash.net> <20040828231529.051a73cc.davem@davemloft.net> <4132303C.2060807@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4132303C.2060807@trash.net> User-Agent: Mutt/1.5.6i X-archive-position: 8180 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: okir@suse.de Precedence: bulk X-list: netdev Content-Length: 552 Lines: 18 On Sun, Aug 29, 2004 at 09:36:28PM +0200, Patrick McHardy wrote: > David S. Miller wrote: > > >I think I agree with David now that I've read through this a few > >times. Can someone send me a patch which does this? > > > Attached. The first patch still crashed, we need to prevent new > fragments from getting queued after the queue is flushed until the > hook in unregistered. I was actually going to test-drive my patch today, but you were faster. Thanks! Olad -- Olaf Kirch | The Hardware Gods hate me. okir@suse.de | ---------------+ From pb@bieringer.de Mon Aug 30 01:10:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 01:10:13 -0700 (PDT) Received: from smtp2.aerasec.de (gromit.aerasec.de [195.226.187.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U8A6Cp011429 for ; Mon, 30 Aug 2004 01:10:06 -0700 Received: from localhost (localhost [127.0.0.1]) by smtp2.aerasec.de (Postfix) with SMTP id 2CB2D137F3; Mon, 30 Aug 2004 10:09:52 +0200 (CEST) X-AV-Checked: Mon Aug 30 10:09:52 2004 smtp2.aerasec.de Received: from [192.168.1.2] (pD950F9AC.dip.t-dialin.net [217.80.249.172]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client did not present a certificate) by smtp2.aerasec.de (Postfix) with ESMTP id 4657C137F0; Mon, 30 Aug 2004 10:09:50 +0200 (CEST) Date: Mon, 30 Aug 2004 10:09:46 +0200 From: Peter Bieringer To: Maillist USAGI-users , Maillist netdev , Maillist initscripts-ipv6 Subject: sysctl net.ipv6.conf.eth0.use_tempaddr only recogniced on interface start? Message-ID: X-Mailer: Mulberry/3.1.6 (Linux/x86) X-URL: http://www.bieringer.de/pb/ X-OS: Linux MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 8181 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pb@bieringer.de Precedence: bulk X-list: netdev Content-Length: 931 Lines: 26 Hi, during playing around with RFC3041 capability in Linux kernel, I recognized that the toggle (e.g. net.ipv6.conf.eth0.use_tempaddr) in sysctl is only recognized if interface state changes from down to up, which means you can't enable RFC3041 on an already running interface. Is this a) by design b) temporary issue, will be solved later c) bug, will be solved soon I would need an answer because I want to implement support for this feature in initscripts-ipv6, and it has a major impact on the location where to put the related scripting code. In case of a) -> before interface goes up, "ifup" needs to be extended In case of b),c) -> "ifup-ipv6" can be extended Thank you very much for any hint, Peter -- Dr. Peter Bieringer http://www.bieringer.de/pb/ GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/ From vda@port.imtp.ilyichevsk.odessa.ua Mon Aug 30 01:58:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 01:58:53 -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 i7U8vZft012826 for ; Mon, 30 Aug 2004 01:58:06 -0700 Received: (qmail 6564 invoked by alias); 30 Aug 2004 08:57:10 -0000 Received: from unknown (195.66.192.167) by 0 (195.66.192.168) with ESMTP; 30 Aug 2004 08:57:10 -0000 From: Denis Vlasenko To: "Peter Holik" , Subject: Re: PROBLEM: fix fealnx.c hangs on SMP, 2.4.27 Date: Mon, 30 Aug 2004 11:57:02 +0300 User-Agent: KMail/1.5.4 References: <38386.192.168.1.2.1093850895.squirrel@www.it-technology.at> In-Reply-To: <38386.192.168.1.2.1093850895.squirrel@www.it-technology.at> Cc: Jeff Garzik , Francois Romieu , netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408301157.03334.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 8182 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: 457 Lines: 17 On Monday 30 August 2004 10:28, Peter Holik wrote: > static void set_rx_mode(struct net_device *dev) > { > spinlock_t *lp = &((struct netdev_private *)dev->priv)->lock; > unsigned long flags; > spin_lock_irqsave(lp, flags); > __set_rx_mode(dev); > - spin_unlock_irqrestore(&lp, flags); > + spin_unlock_irqrestore(lp, flags); > } Oh... it was my change which was buggy... Thanks for the fix! Jeff, 2.6 most probably has the same bug. -- vda From yoshfuji@linux-ipv6.org Mon Aug 30 02:07:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 02:07:33 -0700 (PDT) Received: from yue.st-paulia.net ([203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7U97Ppv013354 for ; Mon, 30 Aug 2004 02:07:26 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id A56DA33CE5; Mon, 30 Aug 2004 18:08:10 +0900 (JST) Date: Mon, 30 Aug 2004 18:08:05 +0900 (JST) Message-Id: <20040830.180805.06423987.yoshfuji@linux-ipv6.org> To: pb@bieringer.de Cc: usagi-users@linux-ipv6.org, netdev@oss.sgi.com, initscripts-ipv6@deepspace6.net, yoshfuji@linux-ipv6.org Subject: Re: sysctl net.ipv6.conf.eth0.use_tempaddr only recogniced on interface start? 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: 8183 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: 962 Lines: 26 In article (at Mon, 30 Aug 2004 10:09:46 +0200), Peter Bieringer says: > during playing around with RFC3041 capability in Linux kernel, I recognized > that the toggle (e.g. net.ipv6.conf.eth0.use_tempaddr) in sysctl is only > recognized if interface state changes from down to up, which means you > can't enable RFC3041 on an already running interface. Not quite true. net.ipv6.conf.eth0.use_tempaddr is recognized, but new temporary addresses is created only when new public address is created (by specification). > Is this > > a) by design > b) temporary issue, will be solved later > c) bug, will be solved soon a and even b; we can probably extend our implementation to create temprary address when net.ipv6.conf.eth0.use_tempaddr is changed from 0 to 1. -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From gnb@speed.melbourne.sgi.com Mon Aug 30 02:22:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 02:22:34 -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 i7U9MRmg014279 for ; Mon, 30 Aug 2004 02:22:28 -0700 Received: from speed.melbourne.sgi.com (speed.melbourne.sgi.com [134.14.55.174]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id TAA14780; Mon, 30 Aug 2004 19:22:12 +1000 Received: by speed.melbourne.sgi.com (Postfix, from userid 16345) id 0B33E5797F; Mon, 30 Aug 2004 19:22:11 +1000 (EST) Date: Mon, 30 Aug 2004 19:22:11 +1000 From: Greg Banks To: "David S. Miller" Cc: Linux Network Development List , John Partridge , Arthur Kepner Subject: tg3 DMA RW Control register settings Message-ID: <20040830092211.GB5745@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i X-archive-position: 8184 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: 1786 Lines: 47 G'day, I'm trying to make sense of your tg3 driver cset http://gkernel.bkbits.net:8080/net-drivers-2.6/cset@1.1587.25.23 which changes the values used to set up the DMA READ/WRITE CONTROL register (0x6c) to handle PCI-X and PCI-E modes. This is great! At SGI we've got a performance issue with a 5704 in PCI-X mode which may be related to exactly these settings, so having the driver do the right thing would be good. I just have a couple of questions. 1. Are the values for the Write Boundary field in the PCI-E case correct? The diff adds #define DMA_RWCTRL_WRITE_BNDRY_64_PCIE 0x10000000 #define DMA_RWCTRL_WRITE_BNDRY_128_PCIE 0x30000000 #define DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x70000000 but these seem to set the Default PCI Write field instead. It seems to me (based on version PG101-R of the manual) that the right values would be #define DMA_RWCTRL_WRITE_BNDRY_64_PCIE 0x00000000 #define DMA_RWCTRL_WRITE_BNDRY_128_PCIE 0x00000800 #define DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x00001800 2. The Write Boundary field has a whole bunch of code to set it up. The Read Boundary field is never set and defaults to 0 (=disabled for PCI and PCI-X). Is this deliberate? 3. The new code seems to use a lot of 32bit magic numbers, for which #defines already exist in the header. Ummm....? 4. Is there any explanation of how the following were chosen (assuming cache size of 128 bytes) ? DMA Write Watermark: 0b11 => 384 bytes DMA Read Watermark: 0b111 => 1536 bytes DMA Write Address Boundary: 0b11 => 384 bytes DMA Read Address Boundary: 0b00 => disabled One DMA at Once: 0b01 Greg. -- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. From pb@bieringer.de Mon Aug 30 03:19:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 03:19:40 -0700 (PDT) Received: from smtp2.aerasec.de (gromit.aerasec.de [195.226.187.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7UAJYIv017720 for ; Mon, 30 Aug 2004 03:19:35 -0700 Received: from localhost (localhost [127.0.0.1]) by smtp2.aerasec.de (Postfix) with SMTP id 1C240137F0; Mon, 30 Aug 2004 12:19:26 +0200 (CEST) X-AV-Checked: Mon Aug 30 12:19:26 2004 smtp2.aerasec.de Received: from [192.168.1.2] (pD950F9AC.dip.t-dialin.net [217.80.249.172]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client did not present a certificate) by smtp2.aerasec.de (Postfix) with ESMTP id 28AD3137EA; Mon, 30 Aug 2004 12:19:24 +0200 (CEST) Date: Mon, 30 Aug 2004 12:19:19 +0200 From: Peter Bieringer To: usagi-users@linux-ipv6.org, netdev@oss.sgi.com, initscripts-ipv6@deepspace6.net Subject: Re: (usagi-users 03019) Re: sysctl net.ipv6.conf.eth0.use_tempaddr only recogniced on interface start? Message-ID: <4A1C5C18034DEF47D6B4FFD6@worker.muc.bieringer.de> In-Reply-To: <20040830.180805.06423987.yoshfuji@linux-ipv6.org> References: <20040830.180805.06423987.yoshfuji@linux-ipv6.org> X-Mailer: Mulberry/3.1.6 (Linux/x86) X-URL: http://www.bieringer.de/pb/ X-OS: Linux MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 8185 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pb@bieringer.de Precedence: bulk X-list: netdev Content-Length: 1580 Lines: 44 --On Monday, August 30, 2004 06:08:05 PM +0900 "YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?=" wrote: > In article (at Mon, 30 > Aug 2004 10:09:46 +0200), Peter Bieringer says: > >> during playing around with RFC3041 capability in Linux kernel, I >> recognized that the toggle (e.g. net.ipv6.conf.eth0.use_tempaddr) in >> sysctl is only recognized if interface state changes from down to up, >> which means you can't enable RFC3041 on an already running interface. > > Not quite true. net.ipv6.conf.eth0.use_tempaddr is recognized, but > new temporary addresses is created only when new public address is created > (by specification). Ok, should be perhaps noted in ip-sysctl.txt. >> Is this >> >> a) by design >> b) temporary issue, will be solved later >> c) bug, will be solved soon > > a > > and even b; we can probably extend our implementation > to create temprary address when net.ipv6.conf.eth0.use_tempaddr is > changed from 0 to 1. (or to 2) Hmm, from users point of view I would request the extension, because in case of if sysctl-toggle will be done too late (means RA was already received), nothing happen until next down->up cycle, if prefix of RA is still the same. Would such extension break any specifications? Peter -- Dr. Peter Bieringer http://www.bieringer.de/pb/ GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/ From eric.lemoine@gmail.com Mon Aug 30 03:56:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 03:56:39 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.197]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7UAuYVW018746 for ; Mon, 30 Aug 2004 03:56:34 -0700 Received: by mproxy.gmail.com with SMTP id 73so72179rnk for ; Mon, 30 Aug 2004 03:56:20 -0700 (PDT) Received: by 10.38.3.58 with SMTP id 58mr456633rnc; Mon, 30 Aug 2004 03:56:20 -0700 (PDT) Received: by 10.38.181.19 with HTTP; Mon, 30 Aug 2004 03:56:20 -0700 (PDT) Message-ID: <5cac192f040830035669628d1@mail.gmail.com> Date: Mon, 30 Aug 2004 12:56:20 +0200 From: Eric Lemoine Reply-To: Eric Lemoine To: netdev@oss.sgi.com Subject: [PATCH] Allow setting dev->weight using ip(8) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_51_22126098.1093863380382" X-archive-position: 8186 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: 9800 Lines: 145 ------=_Part_51_22126098.1093863380382 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello For my own testing purposes, I often need to modify dev->weight. So I patched the kernel and iproute2 to be able to modify dev->weight using ip(8). After all, one can modify tx_queue_len so why not weight? Two kernel patches attached: one using the ioctl framework and another using the rtnetlink framework. Warning: the attached rtnetlink patch is a superset of Thomas Graf's rtnetlink patch for setting mtu and tx_queue_len. PS: both patches are against 2.6.5-rc3-ben0 but should apply to any 2.6. -- Eric ------=_Part_51_22126098.1093863380382 Content-Type: application/octet-stream; name="patch-ioctl_dev_weight-2-6-5-rc3-ben0-A0" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-ioctl_dev_weight-2-6-5-rc3-ben0-A0" PT09PT0gZnMvY29tcGF0X2lvY3RsLmMgMS4yMyB2cyBlZGl0ZWQgPT09PT0KLS0tIDEuMjMvZnMv Y29tcGF0X2lvY3RsLmMJMjAwNC0wMy0yNSAwMjoxNDoyNyArMDE6MDAKKysrIGVkaXRlZC9mcy9j b21wYXRfaW9jdGwuYwkyMDA0LTA3LTMwIDE1OjQyOjIxICswMjowMApAQCAtNjk0LDYgKzY5NCw3 IEBACiAJCWNhc2UgU0lPQ0dJRkRTVEFERFI6CiAJCWNhc2UgU0lPQ0dJRk5FVE1BU0s6CiAJCWNh c2UgU0lPQ0dJRlRYUUxFTjoKKwkJY2FzZSBTSU9DR0lGV0VJR0hUOgogCQkJaWYgKGNvcHlfdG9f dXNlcih1aWZyMzIsICZpZnIsIHNpemVvZigqdWlmcjMyKSkpCiAJCQkJcmV0dXJuIC1FRkFVTFQ7 CiAJCQlicmVhazsKQEAgLTMxMjEsNiArMzEyMiw4IEBACiBIQU5ETEVfSU9DVEwoU0lPQ0dJRlBG TEFHUywgZGV2X2lmc2lvYykKIEhBTkRMRV9JT0NUTChTSU9DR0lGVFhRTEVOLCBkZXZfaWZzaW9j KQogSEFORExFX0lPQ1RMKFNJT0NTSUZUWFFMRU4sIGRldl9pZnNpb2MpCitIQU5ETEVfSU9DVEwo U0lPQ0dJRldFSUdIVCwgZGV2X2lmc2lvYykKK0hBTkRMRV9JT0NUTChTSU9DU0lGV0VJR0hULCBk ZXZfaWZzaW9jKQog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QlyZXR1cm4gMDsKKwogCQljYXNlIFNJT0NT SUZOQU1FOgogCQkJaWZyLT5pZnJfbmV3bmFtZVtJRk5BTVNJWi0xXSA9ICdcMCc7CiAJCQlyZXR1 cm4gZGV2X2NoYW5nZV9uYW1lKGRldiwgaWZyLT5pZnJfbmV3bmFtZSk7CkBAIC0yNTg3LDYgKzI1 OTcsNyBAQAogCQljYXNlIFNJT0NHSUZNQVA6CiAJCWNhc2UgU0lPQ0dJRklOREVYOgogCQljYXNl IFNJT0NHSUZUWFFMRU46CisJCWNhc2UgU0lPQ0dJRldFSUdIVDoKIAkJCWRldl9sb2FkKGlmci5p ZnJfbmFtZSk7CiAJCQlyZWFkX2xvY2soJmRldl9iYXNlX2xvY2spOwogCQkJcmV0ID0gZGV2X2lm c2lvYygmaWZyLCBjbWQpOwpAQCAtMjY1NCw2ICsyNjY1LDcgQEAKIAkJY2FzZSBTSU9DREVMTVVM VEk6CiAJCWNhc2UgU0lPQ1NJRkhXQlJPQURDQVNUOgogCQljYXNlIFNJT0NTSUZUWFFMRU46CisJ CWNhc2UgU0lPQ1NJRldFSUdIVDoKIAkJY2FzZSBTSU9DU01JSVJFRzoKIAkJY2FzZSBTSU9DQk9O REVOU0xBVkU6CiAJCWNhc2UgU0lPQ0JPTkRSRUxFQVNFOgo= ------=_Part_51_22126098.1093863380382 Content-Type: application/octet-stream; name="patch-qlen_mtu_weight_setget-2-6-5-rc3-ben0" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-qlen_mtu_weight_setget-2-6-5-rc3-ben0" PT09PT0gaW5jbHVkZS9saW51eC9ydG5ldGxpbmsuaCAxLjMyIHZzIGVkaXRlZCA9PT09PQotLS0g MS4zMi9pbmNsdWRlL2xpbnV4L3J0bmV0bGluay5oCTIwMDQtMDEtMTYgMTE6MDU6MjQgKzAxOjAw CisrKyBlZGl0ZWQvaW5jbHVkZS9saW51eC9ydG5ldGxpbmsuaAkyMDA0LTA4LTI2IDEyOjQxOjM3 ICswMj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ShpZGFbSUZMQV9UWFFMRU4gLSAxXSkpOworCX0KKworCWlmIChpZGFbSUZMQV9XRUlH SFQgLTEgXSkgeworCQlpZiAoaWRhW0lGTEFfV0VJR0hUIC0gMV0tPnJ0YV9sZW4gIT0gUlRBX0xF TkdUSChzaXplb2YodTMyKSkpCisJCQlnb3RvIG91dDsKKworCQlkZXYtPndlaWdodCA9ICooKHUz MiAqKSBSVEFfREFUQShpZGFbSUZMQV9XRUlHSFQgLSAxXSkpOwogCX0KIAogCWVyciA9IDA7Cg== ------=_Part_51_22126098.1093863380382-- From solt@dns.toxicfilms.tv Mon Aug 30 04:01:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 04:01:26 -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 i7UB1JiA019111 for ; Mon, 30 Aug 2004 04:01:20 -0700 Received: (qmail 27349 invoked by uid 1027); 30 Aug 2004 13:01:07 +0200 Received: from 150.254.37.14 by dns (envelope-from , uid 1026) with qmail-scanner-1.23 (nod32: 1.838 Clear:RC:0(150.254.37.14):. Processed in 0.031651 secs); 30 Aug 2004 11:01:07 -0000 X-Qmail-Scanner-Mail-From: solt@dns.toxicfilms.tv via dns X-Qmail-Scanner-Rcpt-To: linux-kernel@vger.kernel.org,netdev@oss.sgi.com X-Qmail-Scanner: 1.23 (Clear:RC:0(150.254.37.14):. Processed in 0.031651 secs) Received: from pysiak.ae.poznan.pl (solt@dns.toxicfilms.tv@150.254.37.14) by 0 with AES256-SHA encrypted SMTP; 30 Aug 2004 13:01:06 +0200 Date: Mon, 30 Aug 2004 13:00:37 +0200 From: Maciej Soltysiak X-Mailer: SecureBat! Lite (v2.12.3) UNREG / CD5BF9353B3B7091 Reply-To: Maciej Soltysiak X-Priority: 3 (Normal) Message-ID: <512805293.20040830130037@dns.toxicfilms.tv> To: linux-kernel@vger.kernel.org CC: netdev@oss.sgi.com Subject: TCP Window Scaling problem with buggy routers FIX works MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 8187 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: solt@dns.toxicfilms.tv Precedence: bulk X-list: netdev Content-Length: 750 Lines: 27 Hi, I am just letting you guys know that the fix for tcp window scaling problem with buggy routers works. There were people (including me) reporting that tcp traffic through some buggy (eg. cisco) routers in linux-2.6.8 slows down to a crawl. A workaround was to zero tcp_window_scaling sysctl knob. With this patch: http://www.kernel.org/pub/linux/kernel/v2.5/testing/cset/cset-shemminger@osdl.org|ChangeSet|20040826205608|22084.txt sitting in 2.6.9-rc1 BK repository the linux box can have fast transfers again. Note that they are not that fast as with tcp_window_scaling disabled. But they are certainly fast and will not cause problems like ssh sessions hangning, etc. Thanks for the workaround for buggy routers netdev! Cheers, Maciej From hadi@cyberus.ca Mon Aug 30 05:27:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 05:28:00 -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 i7UCRs97024571 for ; Mon, 30 Aug 2004 05:27:55 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1C1lGB-000746-V3 for netdev@oss.sgi.com; Mon, 30 Aug 2004 08:27: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 1C1lGA-0001ZS-No; Mon, 30 Aug 2004 08:27:43 -0400 Subject: Re: [PATCH] Allow setting dev->weight using ip(8) From: jamal Reply-To: hadi@cyberus.ca To: Eric Lemoine Cc: netdev@oss.sgi.com In-Reply-To: <5cac192f040830035669628d1@mail.gmail.com> References: <5cac192f040830035669628d1@mail.gmail.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093868860.1075.573.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Aug 2004 08:27:40 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8188 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: 837 Lines: 26 On Mon, 2004-08-30 at 06:56, Eric Lemoine wrote: > Hello > > For my own testing purposes, I often need to modify dev->weight. So I > patched the kernel and iproute2 to be able to modify dev->weight using > ip(8). After all, one can modify tx_queue_len so why not weight? > > Two kernel patches attached: one using the ioctl framework and another > using the rtnetlink framework. Warning: the attached rtnetlink patch > is a superset of Thomas Graf's rtnetlink patch for setting mtu and > tx_queue_len. > > PS: both patches are against 2.6.5-rc3-ben0 but should apply to any 2.6. > Looks sane. Not sure if you should encourage ioctl though ;-> Out of curiosity, what/when do you change weight? I think its valuable to do so, just curious. BTW, As Dave pointed out alwauIFLA_WEIGHT missing user space/ip patch btw. cheers, jamal From hadi@cyberus.ca Mon Aug 30 05:42:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 05:42:53 -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 i7UCgn1q025352 for ; Mon, 30 Aug 2004 05:42:49 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1C1lUc-0005sE-BT for netdev@oss.sgi.com; Mon, 30 Aug 2004 08:42: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 1C1lUa-0003YQ-N0; Mon, 30 Aug 2004 08:42:37 -0400 Subject: Re: [PATCH] Allow setting dev->weight using ip(8) From: jamal Reply-To: hadi@cyberus.ca To: Eric Lemoine Cc: netdev@oss.sgi.com In-Reply-To: <1093868860.1075.573.camel@jzny.localdomain> References: <5cac192f040830035669628d1@mail.gmail.com> <1093868860.1075.573.camel@jzny.localdomain> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093869740.1076.587.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Aug 2004 08:42:20 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8189 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: 316 Lines: 13 On Mon, 2004-08-30 at 08:27, jamal wrote: > to do so, just curious. BTW, As Dave pointed out alwauIFLA_WEIGHT LOL ;-> As Dave pointed out any new attributes go to the end of the enumeration. It may not matter in this case if Dave hasnt applied Thomas' patch. Otherwise IFLA_WEIGHT should be last. cheers, jamal From eric.lemoine@gmail.com Mon Aug 30 07:33:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 07:33:19 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7UEXCMJ027957 for ; Mon, 30 Aug 2004 07:33:12 -0700 Received: by mproxy.gmail.com with SMTP id 75so70803rnl for ; Mon, 30 Aug 2004 07:33:01 -0700 (PDT) Received: by 10.38.162.63 with SMTP id k63mr972205rne; Mon, 30 Aug 2004 07:33:01 -0700 (PDT) Received: by 10.38.181.19 with HTTP; Mon, 30 Aug 2004 07:33:01 -0700 (PDT) Message-ID: <5cac192f0408300733477c6c9@mail.gmail.com> Date: Mon, 30 Aug 2004 16:33:01 +0200 From: Eric Lemoine Reply-To: Eric Lemoine To: hadi@cyberus.ca Subject: Re: [PATCH] Allow setting dev->weight using ip(8) Cc: netdev@oss.sgi.com In-Reply-To: <1093868860.1075.573.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_68_24429255.1093876381135" References: <5cac192f040830035669628d1@mail.gmail.com> <1093868860.1075.573.camel@jzny.localdomain> X-archive-position: 8190 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: 5974 Lines: 100 ------=_Part_68_24429255.1093876381135 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline > > For my own testing purposes, I often need to modify dev->weight. So I > > patched the kernel and iproute2 to be able to modify dev->weight using > > ip(8). After all, one can modify tx_queue_len so why not weight? > > > > Two kernel patches attached: one using the ioctl framework and another > > using the rtnetlink framework. Warning: the attached rtnetlink patch > > is a superset of Thomas Graf's rtnetlink patch for setting mtu and > > tx_queue_len. > > > > PS: both patches are against 2.6.5-rc3-ben0 but should apply to any 2.6. > Looks sane. > Not sure if you should encourage ioctl though ;-> iproute still uses ioctl at that time, doesn't it? > Out of curiosity, what/when do you change weight? I think its valuable > to do so, just curious. With weight one can have the NIC fetch rx descriptors while the rx interrupt remains disabled. This further means that under high input load, one single rx interrupt can result in more than RX_RING_SIZE rx packets polled. Using this + tx polling, I could observe a system fully loaded by the network with no interrupts at all. > missing user space/ip patch btw. I attached a patch to iproute-2.6.8. To make the patch compile I had to tinker with the Makefile - it seems that KERNEL_INCLUDE does no longer serve any purpose, except for ATM maybe. -- Eric ------=_Part_68_24429255.1093876381135 Content-Type: application/octet-stream; name="patch-ioctl_dev_weight-iproute-2-6-8" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-ioctl_dev_weight-iproute-2-6-8" LS0tIGlwL2lwbGluay5jLm9sZAkyMDA0LTA4LTMwIDE1OjMyOjIwLjM2MTc4MTA2NCArMDIwMAor KysgaXAvaXBsaW5rLmMJMjAwNC0wO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lnaHQgJWQiLCBpZnIuaWZyX3dlaWdodCk7 Cit9CisKIGludCBwcmludF9saW5raW5mbyhzdHJ1Y3Qgc29ja2FkZHJfbmwgKndobywgc3RydWN0 IG5sbXNnaGRyICpuLCB2b2lkICphcmcpCiB7CiAJRklMRSAqZnAgPSAoRklMRSopYXJnOwpAQCAt MTkxLDYgKzIxNCw5IEBACiAJaWYgKGZpbHRlci5zaG93cXVldWUpCiAJCXByaW50X3F1ZXVlbGVu KChjaGFyKilSVEFfREFUQSh0YltJRkxBX0lGTkFNRV0pKTsKIAkKKwlpZiAoZmlsdGVyLnNob3d3 ZWlnaHQpCisJCXByaW50X3dlaWdodCgoY2hhciopUlRBX0RBVEEodGJbSUZMQV9JRk5BTUVdKSk7 CisKIAlpZiAoIWZpbHRlci5mYW1pbHkgfHwgZmlsdGVyLmZhbWlseSA9PSBBRl9QQUNLRVQpIHsK IAkJU1BSSU5UX0JVRihiMSk7CiAJCWZwcmludGYoZnAsICIlcyIsIF9TTF8pOwpAQCAtNDk2LDYg KzUyMiw3IEBACiAKIAlpcGFkZHJfcmVzZXRfZmlsdGVyKG9uZWxpbmUpOwogCWZpbHRlci5zaG93 cXVldWUgPSAxOworCWZpbHRlci5zaG93d2VpZ2h0ID0gMTsKIAogCWlmIChmaWx0ZXIuZmFtaWx5 ID09IEFGX1VOU1BFQykKIAkJZmlsdGVyLmZhbWlseSA9IHByZWZlcnJlZF9mYW1pbHk7Cg== ------=_Part_68_24429255.1093876381135-- From eric.lemoine@gmail.com Mon Aug 30 07:36:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 07:36:15 -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 i7UEaAXJ028310 for ; Mon, 30 Aug 2004 07:36:11 -0700 Received: by mproxy.gmail.com with SMTP id 75so70954rnl for ; Mon, 30 Aug 2004 07:35:58 -0700 (PDT) Received: by 10.38.6.75 with SMTP id 75mr966160rnf; Mon, 30 Aug 2004 07:35:58 -0700 (PDT) Received: by 10.38.181.19 with HTTP; Mon, 30 Aug 2004 07:35:57 -0700 (PDT) Message-ID: <5cac192f0408300735f05aa2d@mail.gmail.com> Date: Mon, 30 Aug 2004 16:35:57 +0200 From: Eric Lemoine Reply-To: Eric Lemoine To: hadi@cyberus.ca Subject: Re: [PATCH] Allow setting dev->weight using ip(8) Cc: netdev@oss.sgi.com In-Reply-To: <1093869740.1076.587.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_69_818671.1093876557977" References: <5cac192f040830035669628d1@mail.gmail.com> <1093868860.1075.573.camel@jzny.localdomain> <1093869740.1076.587.camel@jzny.localdomain> X-archive-position: 8191 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: 5585 Lines: 87 ------=_Part_69_818671.1093876557977 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline > As Dave pointed out any new attributes go to the end of the enumeration. > It may not matter in this case if Dave hasnt applied Thomas' patch. > Otherwise IFLA_WEIGHT should be last. Right. New patch attached. -- Eric ------=_Part_69_818671.1093876557977 Content-Type: application/octet-stream; name="patch-qlen_mtu_weight_setget-2-6-5-rc3-ben0" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-qlen_mtu_weight_setget-2-6-5-rc3-ben0" PT09PT0gaW5jbHVkZS9saW51eC9ydG5ldGxpbmsuaCAxLjMyIHZzIGVkaXRlZCA9PT09PQotLS0g MS4zMi9pbmNsdWRlL2xpbnV4L3J0bmV0bGluay5oCTIwMDQtMDEtMTYgMTE6MDU6MjQgKzAxOjAw CisrKyBlZGl0ZWQvaW5jbHVkZS9saW51eC9ydG5ldGxpbmsuaAkyMDA0LTA4LTI2IDEyOjQxOjM3 ICswMjowMApAQCAtNTQ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V9UWFFMRU4gLSAxXSkpOworCX0KKworCWlmIChpZGFbSUZMQV9XRUlH SFQgLTEgXSkgeworCQlpZiAoaWRhW0lGTEFfV0VJR0hUIC0gMV0tPnJ0YV9sZW4gIT0gUlRBX0xF TkdUSChzaXplb2YodTMyKSkpCisJCQlnb3RvIG91dDsKKworCQlkZXYtPndlaWdodCA9ICooKHUz MiAqKSBSVEFfREFUQShpZGFbSUZMQV9XRUlHSFQgLSAxXSkpOwogCX0KIAogCWVyciA9IDA7Cg== ------=_Part_69_818671.1093876557977-- From hch@lst.de Mon Aug 30 08:27:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 08:28:02 -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 i7UFRrEj032690 for ; Mon, 30 Aug 2004 08:27:56 -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 i7UFRT95019146 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 30 Aug 2004 17:27:29 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7UFRS9l019144; Mon, 30 Aug 2004 17:27:28 +0200 Date: Mon, 30 Aug 2004 17:27:28 +0200 From: Christoph Hellwig To: davem@redhat.com, herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru Cc: netdev@oss.sgi.com Subject: Re: [PATCH] Wake up km_waitq after changing policies Message-ID: <20040830152728.GA19086@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: 8192 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: 284 Lines: 7 Back in Juni 2003 Herbert submitted a patch with that subject [1], but Dave rejected in with the rationale that Alexey is working on a better solution. So far nothing has happened on this front, is any solution in sight? http://www.uwsg.iu.edu/hypermail/linux/net/0306.1/0261.html From hch@lst.de Mon Aug 30 09:15:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 09:15:23 -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 i7UGFHYB001468 for ; Mon, 30 Aug 2004 09:15:18 -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 i7UGF895019790 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 30 Aug 2004 18:15:08 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i7UGF8KW019788 for netdev@oss.sgi.com; Mon, 30 Aug 2004 18:15:08 +0200 Date: Mon, 30 Aug 2004 18:15:08 +0200 From: Christoph Hellwig To: netdev@oss.sgi.com Subject: [kdmirsch@gmx.net: Re: Bug#254910: #254910 kernel-2.4.22-2-686 and higher: Incorrect UDP checksum for DNS request with 8139too driver] Message-ID: <20040830161508.GA19759@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: 8193 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: 3177 Lines: 80 ----- Forwarded message from Klaus-Dieter Mirsch ----- Date: Mon, 30 Aug 2004 18:13:10 +0200 From: Klaus-Dieter Mirsch Subject: Re: Bug#254910: #254910 kernel-2.4.22-2-686 and higher: Incorrect UDP checksum for DNS request with 8139too driver To: Christoph Hellwig , 254910-quiet@bugs.debian.org X-Mailer: Ximian Evolution 1.4.6 Hi Christoph, now after the olmypic games are over I'm able to do something else than watch TV in my leisure time. (-; So sorry for answering late. The bug is reproduciable and has nothing, I repeat, nothing to do with Cisco VPN 3000 Client Software. For me this bug is important because without a working DNS over VPN I cannot work for my company on the other hand 2.4.18 is not supporting my laptop very well (ACPI, soundcard, ...) - and that are the only reasons why I mentioned the VPN software. The UDP checksum for DNS requests was and is still, including kernel 2.6.8 incorrect for 8139too-driver with my Fujitsu Siemens Lifebook E2010 and the 0000:00:11.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) Subsystem: Fujitsu Limited.: Unknown device 11bd Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- I've talked to Jeff Garzik (upstream 8139 and general network driver > maintainer) about this. He sais the UDP checksum code doesn't use > crc32 so that cause can be ruled out and he's more suspicious that the > cisco device is doing something funny. > > I'm not a networking expert but if you want someone to look at the > ethereal traced you should probably ask at netdev@oss.sgi.com There is a ISDN card(AVM FRITZ!Card PCMCIA 2.0), a modem card (3Com 56K 3CCM156B), I have a working (but old) laptop with an Intel Corp. 82557/8/9 [Ethernet Pro 100] network adapter. With all these network devices the UDP checksums for DNS requests are ok. So for me it sounds very very much for the 8139too-driver If someone needs further information to solve the bug feel free to contact me and understand on the other side that I don't want to give network-traffic-traces to a great public for security reasons. best regards -kdm- On Sat, 2004-08-28 at 18:22, Christoph Hellwig wrote: > severity 254910 normal > thanks > > Any chance you could reproduce this without this cisco device (btw, > a pointer to this devices' description would be nice, can't find it on > their website)? If not we'll probably close this. > > > ----- End forwarded message ----- From jt@bougret.hpl.hp.com Mon Aug 30 09:50:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 09:50: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 i7UGoZ0s002230 for ; Mon, 30 Aug 2004 09:50:35 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 4A42D1C00507; Mon, 30 Aug 2004 09:50:27 -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 JAA18109; Mon, 30 Aug 2004 09:52:52 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1C1pMQ-0007x9-00; Mon, 30 Aug 2004 09:50:26 -0700 Date: Mon, 30 Aug 2004 09:50:26 -0700 To: Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal Message-ID: <20040830165026.GD29492@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040830045441.GA7415@jm.kir.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040830045441.GA7415@jm.kir.nu> 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: 8194 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: 1863 Lines: 43 On Sun, Aug 29, 2004 at 09:54:41PM -0700, Jouni Malinen wrote: > Finally, I had enough time to implement and test the proposed WE-18 > (WPA) changes with Host AP driver and wpa_supplicant. Great ! > Since WE-17 has apparently not yet been merged all the way into > linux-2.6 tree, the patch below is against Linux 2.6.8.1 that has been > patched with WE-17 patch (http://www.hpl.hp.com/personal/ > Jean_Tourrilhes/Linux/iw268_we17-10.diff). Don't worry, I'll fix that. Anyway, WE-17 is pending in Jeff's tree, and I don't think he will make major changes to it. > - replaced optional parameter (iw_point) to SIOCSIWSCAN with a new ioctl > (SIOCSIWSCANEXT) since the previous design was not really backwards > compatible (e.g., 'iwlist wlan0 scan' did not work) Latest Wireless Tools actually fixes that. Most distro seems to have adopted WT-27-preXX, and I plan to release WT-27 soon after WE-17, so I would not consider that a big issue. Having a separate ioctl has one advantage, you know if the driver support it or not. One the other hand, having a single ioctl may reduce bloat. > Question: is length field in struct iw_point in bytes or tokens > (token_size bytes)? I assumed it was in bytes, but this did not work > very well with WE ioctls that had token_size != 1; I made SIOCSIWSCANEXT > use token_size = 1 for now, but it could be replaced to be > sizeof(struct) and min_tokens=max_tokesn=1 once this question is > resolved. Originally, I was using length == num-tokens, with token-size != 1. However, after a while, I realised that having length == num-bytes was a much better option, so that's why the "newer" ioctls tend to all have token_size == 1. In the case of SIOCSIWSCANEXT, it's especially important as the struct may grow in the future, so the size would allow to distinguish the various additions. Thanks a lot ! Jean From ravinandan.arakali@s2io.com Mon Aug 30 10:20:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 10:20: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 i7UHKR89003075 for ; Mon, 30 Aug 2004 10:20:30 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i7UHKCje015786; Mon, 30 Aug 2004 13:20:12 -0400 (EDT) Received: from rarakali ([10.16.16.157]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i7UHK8qG009876; Mon, 30 Aug 2004 13:20:08 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Leonid Grossman'" , "'Jeff Garzik'" Cc: , Subject: RE: Patch submission for S2io Xframe driver to 2.6 kernel Date: Mon, 30 Aug 2004 10:25:01 -0700 Message-ID: <000a01c48eb6$489dcdf0$9d10100a@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.2800.1441 In-Reply-To: <200408290553.i7T5r0qG010550@guinness.s2io.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 8195 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: 1242 Lines: 37 The comments are being addressed. But since Koushik is in transition from Bangalore to Cupertino and the associated travel preparation, there may be some delay in the next submission. In addition to the comments, we are trying to include additional code required for 32-bit systems. Currently we are targeting middle of next week for the next submission. Ravi -----Original Message----- From: Leonid Grossman [mailto:leonid.grossman@s2io.com] Sent: Saturday, August 28, 2004 10:53 PM To: 'Jeff Garzik'; ravinandan.arakali@s2io.com Cc: netdev@oss.sgi.com; raghavendra.koushik@s2io.com Subject: RE: Patch submission for S2io Xframe driver to 2.6 kernel Hi Ravi, Please try to address the comments in real time, it's probably better to submit a follow-up rather than waiting for more comments... Also - are Koushik and Sriram in Cupertino next week? Cheers , Leonid > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Saturday, August 28, 2004 4:37 PM > To: ravinandan.arakali@s2io.com > Cc: netdev@oss.sgi.com; leonid.grossman@s2io.com; > raghavendra.koushik@s2io.com > Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel > > is there a follow-up patch addressing the comments ? > From tharbaugh@lnxi.com Mon Aug 30 10:24:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 10:24:46 -0700 (PDT) Received: from ash.lnxi.com (208.177.141.226.ptr.us.xo.net [208.177.141.226]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7UHOeJa003434 for ; Mon, 30 Aug 2004 10:24:41 -0700 Received: (qmail 30440 invoked from network); 30 Aug 2004 17:24:29 -0000 Received: from tubarao.lnxi.com (HELO ?192.168.15.106?) (192.168.15.106) by ash.lnxi.com with SMTP; 30 Aug 2004 17:24:29 -0000 Subject: RE: [PATCH] abysmal e1000 performance (DITR) From: Thayne Harbaugh Reply-To: tharbaugh@lnxi.com To: "Ronciak, John" Cc: Jeff Garzik , hadi@cyberus.ca, "Venkatesan, Ganesh" , netdev@oss.sgi.com, "Feldman, Scott" , "Brandeburg, Jesse" In-Reply-To: <468F3FDA28AA87429AD807992E22D07EAF76C5@orsmsx408> References: <468F3FDA28AA87429AD807992E22D07EAF76C5@orsmsx408> Content-Type: text/plain Organization: Linux Networx Date: Mon, 30 Aug 2004 11:06:46 -0600 Message-Id: <1093885606.20769.235.camel@tubarao> Mime-Version: 1.0 X-Mailer: Evolution 1.5.92.2 (1.5.92.2-2) Content-Transfer-Encoding: 7bit X-archive-position: 8196 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tharbaugh@lnxi.com Precedence: bulk X-list: netdev Content-Length: 4401 Lines: 92 On Fri, 2004-08-27 at 15:41 -0700, Ronciak, John wrote: > Thayne, > > I can't speak to what happened previously, only what's going on now. > You need to be careful about basing any tuning on any one single test. > For each one of these test you find that have performance problems I can > show you where it works just fine and most cases works better. So let > be careful about making judgements like this. I would agree with you if the problem was only apparent with a benchmark. The incident that started the investigation was due to real- world workloads on a cluster - a newer cluster that should have been significantly faster, but was many times slower than an older cluster. That is why customers can't use the e1000 with the stock 5.x e1000 driver (or without changing the DITR value as a module option). When the default setup is anywhere from 10 to 30 percent of the expected performance then it becomes very difficult to justify shipping a NIC that will likely be incorrectly configured when the driver or kernel is changed - too many support problems. I see that as a wise judgment based on the real usage patterns of customers - not a knee-jerk reaction based on a simplistic benchmark. At the time that I investigated this problem I looked at other benchmarks that *didn't* exhibit this problem. The question was why our customers had this problem but it didn't show up when we tested the cluster. It's a perfect example of the classic problem: benchmarks aren't always representative of real-world loads. This is a case where a real-world load exposed a deficiency of the driver - a deficiency that wasn't exposed by benchmarks but becomes quite obvious when the driver is scrutinized and understood. > We are going to look at this and make some changes based on what we > find. Wonderful. > I already said that we probably won't be ripping out the DITR as > some people really make a lot of use out of it. That's what I'm hoping you can help me with: why is DITR so useful? I just can't see why: NAPI does the same thing and can work with *any* card (provided the driver is written correctly). I'd much rather deal with something universal than have to deal with something unique to a card. The DITR algorithm doesn't consider packet backlog nor system load. Why reduce the interrupt rate when the load is low? When the interrupt rate is reduced when the load is low then unnecessary latency is added. The DITR may work fine with an old system with an e1000, but a dual Opteron with an e1000 has plenty of horsepower to perform calculations *and* push packets. For DITR to correctly work, it needs to consider much more than the number of packets received and transmitted - the current algorithm is overly simplistic (it also doesn't correctly consider symmetric vs asymmetric receive/transmit loads). Please provide details so that I can become one of those that can ". . . make a lot of use out of [DITR]." > It may be off by > default or have some default setting which doesn't hurt test cases. What about settings that don't hurt real-world fluid dynamics calculations? I couldn't care less about benchmarks that aren't representative of the real-world load. The Netpipe program was used because it reasonably resembles the traffic flow of real-world cases that didn't work with DITR. Netpipe is much easier to provide and configure than a fluid dynamics cluster program that would necessitate licensing and other infrastructure for use as a testing tool. > Since Netpipe is a relatively unused test for performance (not really > it's purpose, it was developed to find "holes" in internet packets > lengths), it's not part of our normal testing. Well, maybe I can interest you in buying a small cluster with some fluid dynamics software that has packet flow similar to what Netpipe produces? > Like I said, we are looking at it and will come up with a more robust > solution. Wonderful. I hope you can find a good solution. I do prefer being able to use all those e1000 NICs rather than replace them. Yes, really. I significantly prefer using good products that perform as expected than spending my time whining, complaining and carrying on. Yes, really, I prefer to have happy customers, happy vendors and be happy myself. I only bring this up because I care and I hope someone else cares, and I want everyone to get back to being happy. From jgarzik@pobox.com Mon Aug 30 10:29:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 10:29:14 -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 i7UHT6AH003773 for ; Mon, 30 Aug 2004 10:29:08 -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 1C1pxf-0005Co-Tg; Mon, 30 Aug 2004 18:28:56 +0100 Message-ID: <413363CB.7060807@pobox.com> Date: Mon, 30 Aug 2004 13:28:43 -0400 From: Jeff Garzik 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: jt@hpl.hp.com CC: Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> In-Reply-To: <20040830165026.GD29492@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8197 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: 410 Lines: 17 Jean Tourrilhes wrote: > Don't worry, I'll fix that. Anyway, WE-17 is pending in Jeff's > tree, and I don't think he will make major changes to it. hehe :) Yep, it's merged in netdev-2.6 (and thus -mm as well), and queued for upstream. FWIW any 'radical' wireless changes will go into wireless-2.6. There is still the stable upstream branch, to which WE patches can continue to be applied... Jeff From jgarzik@pobox.com Mon Aug 30 10:33:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 10:33: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 i7UHXLdF004154 for ; Mon, 30 Aug 2004 10:33: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 1C1q1o-0005Kw-SB; Mon, 30 Aug 2004 18:33:12 +0100 Message-ID: <413364CC.8090901@pobox.com> Date: Mon, 30 Aug 2004 13:33:00 -0400 From: Jeff Garzik 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: Denis Vlasenko CC: Peter Holik , linux-kernel@vger.kernel.org, Francois Romieu , netdev@oss.sgi.com Subject: Re: PROBLEM: fix fealnx.c hangs on SMP, 2.4.27 References: <38386.192.168.1.2.1093850895.squirrel@www.it-technology.at> <200408301157.03334.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200408301157.03334.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8198 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: 534 Lines: 24 Denis Vlasenko wrote: > On Monday 30 August 2004 10:28, Peter Holik wrote: > >>static void set_rx_mode(struct net_device *dev) >>{ >> spinlock_t *lp = &((struct netdev_private *)dev->priv)->lock; >> unsigned long flags; >> spin_lock_irqsave(lp, flags); >> __set_rx_mode(dev); >>- spin_unlock_irqrestore(&lp, flags); >>+ spin_unlock_irqrestore(lp, flags); >>} > > > Oh... it was my change which was buggy... Thanks for the fix! > > Jeff, 2.6 most probably has the same bug. Upstream 2.6 already has the fix... Jeff From jt@bougret.hpl.hp.com Mon Aug 30 10:42:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 10:42:29 -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 i7UHgN6I004608 for ; Mon, 30 Aug 2004 10:42:24 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id 34F14407323; Mon, 30 Aug 2004 10:42:16 -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 KAA19566; Mon, 30 Aug 2004 10:44:42 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1C1qAZ-0008UG-00; Mon, 30 Aug 2004 10:42:15 -0700 Date: Mon, 30 Aug 2004 10:42:15 -0700 To: Jeff Garzik Cc: Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal Message-ID: <20040830174215.GA32132@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> <413363CB.7060807@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <413363CB.7060807@pobox.com> 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: 8199 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: 933 Lines: 30 On Mon, Aug 30, 2004 at 01:28:43PM -0400, Jeff Garzik wrote: > Jean Tourrilhes wrote: > > Don't worry, I'll fix that. Anyway, WE-17 is pending in Jeff's > >tree, and I don't think he will make major changes to it. > > > hehe :) > > Yep, it's merged in netdev-2.6 (and thus -mm as well), and queued for > upstream. Thanks ;-) > FWIW any 'radical' wireless changes will go into wireless-2.6. There is > still the stable upstream branch, to which WE patches can continue to be > applied... If you don't mind, I would like a bit more understanding about how much is "radical" and how much is not. I would personally put that around "breaking backward compatibility", but you may have other ideas. Also, I'm not clear how the stuff in wireless-2.6 is supposed to trickle into the other trees (netdev-2.6, -mm and Linus's), and how to better link it with the CVS of the various drivers involved. > Jeff Have fun... Jean From jgarzik@pobox.com Mon Aug 30 10:56:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 10:56: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 i7UHuEsR005098 for ; Mon, 30 Aug 2004 10:56:15 -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 1C1qNx-0005rM-9I; Mon, 30 Aug 2004 18:56:05 +0100 Message-ID: <41336A28.9010608@pobox.com> Date: Mon, 30 Aug 2004 13:55:52 -0400 From: Jeff Garzik 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: jt@hpl.hp.com CC: Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> <413363CB.7060807@pobox.com> <20040830174215.GA32132@bougret.hpl.hp.com> In-Reply-To: <20040830174215.GA32132@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8200 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: 1511 Lines: 49 Jean Tourrilhes wrote: > On Mon, Aug 30, 2004 at 01:28:43PM -0400, Jeff Garzik wrote: > >>Jean Tourrilhes wrote: >> >>> Don't worry, I'll fix that. Anyway, WE-17 is pending in Jeff's >>>tree, and I don't think he will make major changes to it. >> >> >>hehe :) >> >>Yep, it's merged in netdev-2.6 (and thus -mm as well), and queued for >>upstream. > > > Thanks ;-) > > >>FWIW any 'radical' wireless changes will go into wireless-2.6. There is >>still the stable upstream branch, to which WE patches can continue to be >>applied... > > > If you don't mind, I would like a bit more understanding about > how much is "radical" and how much is not. I would personally put that > around "breaking backward compatibility", but you may have other > ideas. Yes, as discussed (er, argued :)) radical would include breaking backwards compat. > Also, I'm not clear how the stuff in wireless-2.6 is supposed > to trickle into the other trees (netdev-2.6, -mm and Linus's), and how > to better link it with the CVS of the various drivers involved. Less of a trickle than a flood: wireless-2.6 should be the target for development of shared wireless stack code. As several drivers are currently using bits of HostAP, for example, wireless-2.6 should be a focal point for patches that modify these drivers to instead share the same code. Once this generic work is done, it would get pushed all at once to netdev-2.6, where it would receive testing in -mm. Then, later, pushed to mainline. Jeff From laforge@netfilter.org Mon Aug 30 13:20:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 13:20:22 -0700 (PDT) Received: from coruscant.gnumonks.org (mail@coruscant.franken.de [193.174.159.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7UKKEac011400 for ; Mon, 30 Aug 2004 13:20:15 -0700 Received: from [192.168.200.2] (helo=sunbeam.gnumonks.org) by coruscant.gnumonks.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.20) id 1C1sdI-0001xN-Np; Mon, 30 Aug 2004 22:20:04 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1C1sdB-0004Fv-Cg; Mon, 30 Aug 2004 22:19:57 +0200 Date: Mon, 30 Aug 2004 22:19:57 +0200 From: Harald Welte To: Netfilter Development Mailinglist Cc: Rusty Russell , netdev@oss.sgi.com Subject: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040830201957.GY5824@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Netfilter Development Mailinglist , Rusty Russell , netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I0oWFe1KborvVxk0" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8201 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: 1890 Lines: 60 --I0oWFe1KborvVxk0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! Apparently a lot of people still have issues when combining MASQUERADE and policy routing. =20 In those cases, the error path from net/ipv4/netfilter/ipt_MASQUERADE.c: if (rt->u.dst.dev !=3D out) { if (net_ratelimit()) printk("MASQUERADE:" " Route sent us somewhere else.\n"); ip_rt_put(rt); return NF_DROP; } is taken. A couple of questions: 1) Why do we have this check in the first place? What would be wrong with re-routing if the user requests us by configuration? 2) Why don't we include 'oif' in the routing key? If we wanted to make sure that oif doesn't change, then we should tell the routing lookup rather than complaining afterwards, shouldn't we ? I think the current code makes it hard (if not impossible?) for the system adminsitrator to get it right (for no apparent reason to me). Comments, anyone? --=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 --I0oWFe1KborvVxk0 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) iD8DBQFBM4vtXaXGVTD0i/8RAjdSAKCCUFOPkWulwqfJqMtVHE0w6zJ5PgCeIsZ8 9YmgqQxEdALrQ9aH2g0poVg= =5HdN -----END PGP SIGNATURE----- --I0oWFe1KborvVxk0-- From shemminger@osdl.org Mon Aug 30 13:20:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 13:21: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 i7UKKwE9011488 for ; Mon, 30 Aug 2004 13:20:58 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7UKKU111184; Mon, 30 Aug 2004 13:20:30 -0700 Date: Mon, 30 Aug 2004 13:20:30 -0700 From: Stephen Hemminger To: thomas , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] net_random_init needs to get seed later in boot process Message-Id: <20040830132030.32d071d0@dell_ss3.pdx.osdl.net> In-Reply-To: <64243634.20040830173251@huno.net> References: <64243634.20040830173251@huno.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8202 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: 1716 Lines: 68 Argh.. random_init isn't called until the device's are initialized. Rather than mess with random.c initialization, how about this; it resets the net_random state late in initialization when get_random_bytes is ready. Signed-off-by: Stephen Hemminger diff -Nru a/net/core/utils.c b/net/core/utils.c --- a/net/core/utils.c 2004-08-30 11:56:15 -07:00 +++ b/net/core/utils.c 2004-08-30 11:56:15 -07:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -77,10 +78,8 @@ return (state->s1 ^ state->s2 ^ state->s3); } -static void __net_srandom(struct nrnd_state *state, unsigned long entropy) +static void __net_srandom(struct nrnd_state *state, unsigned long s) { - u32 s = state->s1 ^ entropy; - if (s == 0) s = 1; /* default seed is 1 */ @@ -112,24 +111,33 @@ void net_srandom(unsigned long entropy) { struct nrnd_state *state = &get_cpu_var(net_rand_state); - __net_srandom(state, entropy); + __net_srandom(state, state->s1^entropy); put_cpu_var(state); } void __init net_random_init(void) { int i; + + for (i = 0; i < NR_CPUS; i++) { + struct nrnd_state *state = &per_cpu(net_rand_state,i); + __net_srandom(state, i+jiffies); + } +} + +static int net_random_reseed(void) +{ + int i; unsigned long seed[NR_CPUS]; get_random_bytes(seed, sizeof(seed)); - for (i = 0; i < NR_CPUS; i++) { struct nrnd_state *state = &per_cpu(net_rand_state,i); - - memset(state, 0, sizeof(*state)); __net_srandom(state, seed[i]); } + return 0; } +late_initcall(net_random_reseed); int net_msg_cost = 5*HZ; int net_msg_burst = 10; From shemminger@osdl.org Mon Aug 30 13:57:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 13:57:45 -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 i7UKvc0p012444 for ; Mon, 30 Aug 2004 13:57:38 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7UKvH118269; Mon, 30 Aug 2004 13:57:17 -0700 Date: Mon, 30 Aug 2004 13:57:17 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] netem - distribution table fixes. Message-Id: <20040830135717.1f4a3af0@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8203 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: 3410 Lines: 118 Fix some issues with netem. * fix memory link in q_destroy where distribution table not freed * fix math error in tabledist that made it work for only small values * change API for distribution table so scaling factor is constant and table size is determined by looking at the rtnetlink payload size. this is faster and simpler. Since haven't actually released the tools to load the table yet, this is the chance to get it right ;-) Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h 2004-08-30 13:55:55 -07:00 +++ b/include/linux/pkt_sched.h 2004-08-30 13:55:55 -07:00 @@ -429,11 +429,6 @@ __u32 dup_corr; /* duplicate correlation */ }; -struct tc_netem_dist -{ - __u32 size; /* table size */ - __u32 factor; /* table scaling factor */ - __s16 data[0]; /* distribution table values */ -}; +#define NETEM_DIST_SCALE 8192 #endif diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-30 13:55:55 -07:00 +++ b/net/sched/sch_netem.c 2004-08-30 13:55:55 -07:00 @@ -71,7 +71,6 @@ struct disttable { u32 size; - u32 factor; s16 table[0]; } *delay_dist; }; @@ -113,11 +112,10 @@ * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static unsigned long tabledist(int mu, int sigma, - struct crndstate *state, - const struct disttable *dist) +static long tabledist(unsigned long mu, long sigma, + struct crndstate *state, const struct disttable *dist) { - int t, x, factor; + long t, x; unsigned long rnd; if (sigma == 0) @@ -129,16 +127,14 @@ if (dist == NULL) return (rnd % (2*sigma)) - sigma + mu; - factor = dist->factor; t = dist->table[rnd % dist->size]; - - x = (sigma % factor) * t; + x = (sigma % NETEM_DIST_SCALE) * t; if (x >= 0) - x += factor/2; + x += NETEM_DIST_SCALE/2; else - x -= factor/2; + x -= NETEM_DIST_SCALE/2; - return (x + (sigma / factor) * t) / factor + mu; + return x / NETEM_DIST_SCALE + (sigma / NETEM_DIST_SCALE) * t + mu; } /* Put skb in the private delayed queue. */ @@ -305,25 +301,28 @@ return ret; } +/* + * Distribution data is a variable size payload containing + * signed 16 bit values. + */ static int get_dist_table(struct Qdisc *sch, const struct rtattr *attr) { struct netem_sched_data *q = qdisc_priv(sch); - const struct tc_netem_dist *dist = RTA_DATA(attr); + unsigned long n = RTA_PAYLOAD(attr)/sizeof(__s16); + const __s16 *data = RTA_DATA(attr); struct disttable *d; int i; - if (RTA_PAYLOAD(attr) < sizeof(*dist) || - dist->factor < 2 || dist->factor > 1<<16 || dist->size > 65536) + if (n > 65536) return -EINVAL; - d = kmalloc(sizeof(*d) + dist->size*sizeof(d->table[0]), GFP_KERNEL); + d = kmalloc(sizeof(*d) + n*sizeof(d->table[0]), GFP_KERNEL); if (!d) return -ENOMEM; - d->size = dist->size; - d->factor = dist->factor; - for (i = 0; i < dist->size; i++) - d->table[i] = dist->data[i]; + d->size = n; + for (i = 0; i < n; i++) + d->table[i] = data[i]; spin_lock_bh(&sch->dev->queue_lock); d = xchg(&q->delay_dist, d); @@ -431,6 +430,7 @@ del_timer_sync(&q->timer); qdisc_destroy(q->qdisc); + kfree(q->delay_dist); } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) From davem@davemloft.net Mon Aug 30 14:08:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:08:46 -0700 (PDT) Received: from smtp101.mail.sc5.yahoo.com (smtp101.mail.sc5.yahoo.com [216.136.174.139]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7UL8cMX012932 for ; Mon, 30 Aug 2004 14:08:39 -0700 Received: from unknown (HELO cheetah.davemloft.net) (davem?330@63.197.226.105 with login) by smtp101.mail.sc5.yahoo.com with SMTP; 30 Aug 2004 21:08:31 -0000 Date: Mon, 30 Aug 2004 14:07:29 -0700 From: "David S. Miller" To: Harald Welte Cc: netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-Id: <20040830140729.7309ecc0.davem@davemloft.net> In-Reply-To: <20040830201957.GY5824@sunbeam.de.gnumonks.org> References: <20040830201957.GY5824@sunbeam.de.gnumonks.org> Organization: DaveM Loft Enterprises X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8204 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: 2541 Lines: 71 On Mon, 30 Aug 2004 22:19:57 +0200 Harald Welte wrote: > In those cases, the error path from net/ipv4/netfilter/ipt_MASQUERADE.c: ... > is taken. > > A couple of questions: > > 1) Why do we have this check in the first place? What would be wrong > with re-routing if the user requests us by configuration? > > 2) Why don't we include 'oif' in the routing key? If we wanted to make > sure that oif doesn't change, then we should tell the routing lookup > rather than complaining afterwards, shouldn't we ? The original idea was that if the input route relookup sends us to a different device, something is very strange. Input routing looks up using daddr/saddr/tos as the key. The change here is that we're now using the fwmark, so you're right that only policy routing can cause this thing to trigger. Where did this check some from? From this change below, and the changelog explains why we do things this way. I know you don't use BK Harald, but things like this are why you should at least use the web based interface to look at file change history. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2003/08/11 22:47:11-07:00 rusty@rustcorp.com.au # [NETFILTER]: Fix masquerade routing check. # # Alexey says: # Unrelated: giving out->ifindex is a bug, by the way. It can screw up # the things a lot. In this context, if you want to be sure that packet # will go out expected interface you do plain lookup and drop packet # if it gave you some strange route. # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2003/08/11 22:46:31-07:00 rusty@rustcorp.com.au +11 -4 # [NETFILTER]: Fix masquerade routing check. # diff -Nru a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c --- a/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-30 13:51:03 -07:00 +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-30 13:51:03 -07:00 @@ -91,11 +91,18 @@ #ifdef CONFIG_IP_ROUTE_FWMARK .fwmark = (*pskb)->nfmark #endif - } }, - .oif = out->ifindex }; + } } }; if (ip_route_output_key(&rt, &fl) != 0) { - /* Shouldn't happen */ - printk("MASQUERADE: No route: Rusty's brain broke!\n"); + /* 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"); return NF_DROP; } } From davem@redhat.com Mon Aug 30 14:30:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:31: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 i7ULUqHK013717 for ; Mon, 30 Aug 2004 14:30:53 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ULUiS0007018; Mon, 30 Aug 2004 17:30:44 -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 i7ULUi329239; Mon, 30 Aug 2004 17:30:44 -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 i7ULUbTS013290; Mon, 30 Aug 2004 17:30:38 -0400 Date: Mon, 30 Aug 2004 14:29:42 -0700 From: "David S. Miller" To: Greg Banks Cc: netdev@oss.sgi.com, johnip@sgi.com, akepner@sgi.com Subject: Re: tg3 DMA RW Control register settings Message-Id: <20040830142942.55c399bb.davem@redhat.com> In-Reply-To: <20040830092211.GB5745@sgi.com> References: <20040830092211.GB5745@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: 8205 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: 5839 Lines: 136 On Mon, 30 Aug 2004 19:22:11 +1000 Greg Banks wrote: > 1. Are the values for the Write Boundary field in the PCI-E case > correct? The diff adds > > #define DMA_RWCTRL_WRITE_BNDRY_64_PCIE 0x10000000 > #define DMA_RWCTRL_WRITE_BNDRY_128_PCIE 0x30000000 > #define DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x70000000 > > but these seem to set the Default PCI Write field instead. > It seems to me (based on version PG101-R of the manual) that > the right values would be > > #define DMA_RWCTRL_WRITE_BNDRY_64_PCIE 0x00000000 > #define DMA_RWCTRL_WRITE_BNDRY_128_PCIE 0x00000800 > #define DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x00001800 What I've done is exactly the same as the bcn5700 code, which reads for these bits: T3_32BIT_REGISTER DmaReadWriteCtrl; #define DMA_CTRL_WRITE_CMD 0x70000000 #define DMA_CTRL_WRITE_BOUNDARY_64_PCIE 0x10000000 #define DMA_CTRL_WRITE_BOUNDARY_128_PCIE 0x30000000 #define DMA_CTRL_WRITE_BOUNDARY_DISABLE_PCIE 0x70000000 #define DMA_CTRL_READ_CMD 0x06000000 #define DMA_CTRL_WRITE_BOUNDARY_MASK (BIT_11 | BIT_12 | BIT_13) #define DMA_CTRL_WRITE_BOUNDARY_DISABLE 0 #define DMA_CTRL_WRITE_BOUNDARY_16 BIT_11 #define DMA_CTRL_WRITE_BOUNDARY_128_PCIX BIT_11 #define DMA_CTRL_WRITE_BOUNDARY_32 BIT_12 #define DMA_CTRL_WRITE_BOUNDARY_256_PCIX BIT_12 #define DMA_CTRL_WRITE_BOUNDARY_64 (BIT_12 | BIT_11) #define DMA_CTRL_WRITE_BOUNDARY_384_PCIX (BIT_12 | BIT_11) #define DMA_CTRL_WRITE_BOUNDARY_128 BIT_13 #define DMA_CTRL_WRITE_BOUNDARY_256 (BIT_13 | BIT_11) #define DMA_CTRL_WRITE_BOUNDARY_512 (BIT_13 | BIT_12) #define DMA_CTRL_WRITE_BOUNDARY_1024 (BIT_13 | BIT_12 | BIT_11) #define DMA_CTRL_WRITE_ONE_DMA_AT_ONCE BIT_14 #define DMA_CTRL_READ_BOUNDARY_MASK (BIT_10 | BIT_9 | BIT_8) #define DMA_CTRL_READ_BOUNDARY_DISABLE 0 #define DMA_CTRL_READ_BOUNDARY_16 BIT_8 #define DMA_CTRL_READ_BOUNDARY_128_PCIX BIT_8 #define DMA_CTRL_READ_BOUNDARY_32 BIT_9 #define DMA_CTRL_READ_BOUNDARY_256_PCIX BIT_9 #define DMA_CTRL_READ_BOUNDARY_64 (BIT_9 | BIT_8) #define DMA_CTRL_READ_BOUNDARY_384_PCIX (BIT_9 | BIT_8) #define DMA_CTRL_READ_BOUNDARY_128 BIT_10 #define DMA_CTRL_READ_BOUNDARY_256 (BIT_10 | BIT_8) #define DMA_CTRL_READ_BOUNDARY_512 (BIT_10 | BIT_9) #define DMA_CTRL_READ_BOUNDARY_1024 (BIT_10 | BIT_9 | BIT_8) > 2. The Write Boundary field has a whole bunch of code to set it > up. The Read Boundary field is never set and defaults to 0 > (=disabled for PCI and PCI-X). Is this deliberate? Yes, I copied the logic from the bcm5700 driver. They don't muck with that setting either, even on non-x86. I'd like to tweak the settings a bit for non-x86 systems, but I currently don't have the time. There are bigger fires to put out in this driver. > 3. The new code seems to use a lot of 32bit magic numbers, for > which #defines already exist in the header. Ummm....? Feel free to submit a patch :) > 4. Is there any explanation of how the following were chosen > (assuming cache size of 128 bytes) ? > > DMA Write Watermark: 0b11 => 384 bytes > DMA Read Watermark: 0b111 => 1536 bytes > DMA Write Address Boundary: 0b11 => 384 bytes > DMA Read Address Boundary: 0b00 => disabled > One DMA at Once: 0b01 I don't know, ask Broadcom, they have all the internal test suites they use to tweak these things. I just copied these values over since I don't have logic analyzers et al. to work on such things. ONE_DMA_AT_ONCE is a hw bug workaround btw, not for performance. If your chips are getting that set, it would explain somewhat the performance problems. WRT 5704 you may be interested in the following hw bug fix which I have yet to push from my tree. It's going to make performance worse though, not better, if anything, sorry :) Also Fibre handling on many 5704 veriants is busted. We're trying to get hw fibre autonegotiation working, but making that work across all 5704 fibre variants is proving intreresting. We want this because, otherwise the 5704 chip uses a different code path where it inspects every incoming packet to see if it is an fibre negotiation packet. This can lead to framing errors (1 in 30,000 packets, something like that) under high load. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/18 19:37:24-07:00 davem@nuts.davemloft.net # [TG3]: Disable CIOBE split, as per Broadcom's driver. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/18 19:36:35-07:00 davem@nuts.davemloft.net +3 -1 # [TG3]: Disable CIOBE split, as per Broadcom's driver. # # Signed-off-by: David S. Miller # diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-08-30 14:10:58 -07:00 +++ b/drivers/net/tg3.c 2004-08-30 14:10:58 -07:00 @@ -7620,12 +7620,14 @@ grc_misc_cfg = tr32(GRC_MISC_CFG); grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK; + /* Broadcom's driver says that CIOBE multisplit has a bug */ +#if 0 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) { tp->tg3_flags |= TG3_FLAG_SPLIT_MODE; tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ; } - +#endif if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 || grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M)) From davem@redhat.com Mon Aug 30 14:38:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:38:26 -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 i7ULcK5m014132 for ; Mon, 30 Aug 2004 14:38:21 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ULbwS0008380; Mon, 30 Aug 2004 17:37:58 -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 i7ULbw330694; Mon, 30 Aug 2004 17:37:58 -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 i7ULbqaO015940; Mon, 30 Aug 2004 17:37:52 -0400 Date: Mon, 30 Aug 2004 14:36:56 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: herbert@gondor.apana.org.au, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, kaber@trash.net Subject: Re: [PATCH] Wake up km_waitq after changing policies Message-Id: <20040830143656.2b8ec69f.davem@redhat.com> In-Reply-To: <20040830152728.GA19086@lst.de> References: <20040830152728.GA19086@lst.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: 8206 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: 178 Lines: 4 kaber@trash.net will eventually work on this, it involves adding support for unresolved destination cache entries. It's a lot of complex work, so don't expect it any time soon. From davem@redhat.com Mon Aug 30 14:41:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:41:58 -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 i7ULfoYU014496 for ; Mon, 30 Aug 2004 14:41:50 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7ULfeS0009282; Mon, 30 Aug 2004 17:41:40 -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 i7ULfZ331679; Mon, 30 Aug 2004 17:41:35 -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 i7ULfTWk018942; Mon, 30 Aug 2004 17:41:29 -0400 Date: Mon, 30 Aug 2004 14:40:33 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: Re: RFC/PATCH capture qdisc requeue event in stats Message-Id: <20040830144033.2265a6e6.davem@redhat.com> In-Reply-To: <1093799632.1073.410.camel@jzny.localdomain> References: <1093799632.1073.410.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: 8207 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: 342 Lines: 9 On 29 Aug 2004 13:13:52 -0400 jamal wrote: > Opinions welcome - If all is good, Dave please apply. tc_stats changes size, how will existing applications cope? Since it is just RTA_PUT() into userspace, will that just work or will existing apps bomb because they'll do a check of the size field of the rtnetlink attribute? From romieu@fr.zoreil.com Mon Aug 30 14:54:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:54:18 -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 i7ULsB7s014998 for ; Mon, 30 Aug 2004 14:54:12 -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 i7ULqSvr026453; Mon, 30 Aug 2004 23:52:28 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7ULqRLK026452; Mon, 30 Aug 2004 23:52:27 +0200 Date: Mon, 30 Aug 2004 23:52:27 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH,RFT] 8139cp TSO support Message-ID: <20040830215227.GA23857@electric-eye.fr.zoreil.com> References: <20040829212205.GA2864@havoc.gtf.org> <20040829222831.GA9496@electric-eye.fr.zoreil.com> <41326079.9090402@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41326079.9090402@pobox.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8208 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: 207 Lines: 10 Jeff Garzik : [...] > You definitely want to set .len on the no-frags path... Oops.. Patch follows. I won't have a neat tso enabled r8169 driver today. Something goes wrong. -- Ueimor From shemminger@osdl.org Mon Aug 30 14:57:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:58:05 -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 i7ULvuna015339 for ; Mon, 30 Aug 2004 14:57:57 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7ULvY129156; Mon, 30 Aug 2004 14:57:34 -0700 Date: Mon, 30 Aug 2004 14:57:33 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH] netem - distribution table fixes. Message-Id: <20040830145733.52171883@dell_ss3.pdx.osdl.net> In-Reply-To: <20040830135717.1f4a3af0@dell_ss3.pdx.osdl.net> References: <20040830135717.1f4a3af0@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8209 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: 30681 Lines: 1059 This patch updates 2.4 to match the latest 2.6 (Friday and Monday's patches). Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h 2004-08-30 14:57:10 -07:00 +++ b/include/linux/pkt_sched.h 2004-08-30 14:57:10 -07:00 @@ -433,6 +433,16 @@ #define TCA_ATM_MAX TCA_ATM_STATE /* Network emulator */ + +enum +{ + TCA_NETEM_UNSPEC, + TCA_NETEM_CORR, + TCA_NETEM_DELAY_DIST, +}; + +#define TCA_NETEM_MAX TCA_NETEM_DELAY_DIST + struct tc_netem_qopt { __u32 latency; /* added delay (us) */ @@ -442,5 +452,14 @@ __u32 duplicate; /* random packet dup (0=none ~0=100%) */ __u32 jitter; /* random jitter in latency (us) */ }; + +struct tc_netem_corr +{ + __u32 delay_corr; /* delay correlation */ + __u32 loss_corr; /* packet loss correlation */ + __u32 dup_corr; /* duplicate correlation */ +}; + +#define NETEM_DIST_SCALE 8192 #endif diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-08-30 14:57:10 -07:00 +++ b/net/sched/sch_netem.c 2004-08-30 14:57:10 -07:00 @@ -6,13 +6,15 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Many of the algorithms and ideas for this came from + * NIST Net which is not copyrighted. + * * Authors: Stephen Hemminger * Catalin(ux aka Dino) BOIE */ #include #include -#include #include #include #include @@ -23,11 +25,33 @@ #include -/* Network emulator - * - * This scheduler can alters spacing and order - * Similar to NISTnet and BSD Dummynet. - */ +#define qdisc_priv(q) ((void *)(q->data)) + +/* Network Emulation Queuing algorithm. + ==================================== + + Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based + Network Emulation Tool + [2] Luigi Rizzo, DummyNet for FreeBSD + + ---------------------------------------------------------------- + + This started out as a simple way to delay outgoing packets to + test TCP but has grown to include most of the functionality + of a full blown network emulator like NISTnet. It can delay + packets and add random jitter (and correlation). The random + distribution can be loaded from a table as well to provide + normal, Pareto, or experimental curves. Packet loss, + duplication, and reordering can also be emulated. + + This qdisc does not do classification that can be handled in + layering other disciplines. It does not need to do bandwidth + control either since that can be handled by using token + bucket or other rate control. + + The simulator is limited by the Linux timer resolution + and will create packet bursts on the HZ boundary (1ms). +*/ struct netem_sched_data { struct Qdisc *qdisc; @@ -40,6 +64,17 @@ u32 counter; u32 gap; u32 jitter; + u32 duplicate; + + struct crndstate { + unsigned long last; + unsigned long rho; + } delay_cor, loss_cor, dup_cor; + + struct disttable { + u32 size; + s16 table[0]; + } *delay_dist; }; /* Time stamp put into socket buffer control block */ @@ -47,576 +82,110 @@ psched_time_t time_to_send; }; -/* This is the distribution table for the normal distribution produced - * with NISTnet tools. - * The entries represent a scaled inverse of the cumulative distribution - * function. +/* init_crandom - initialize correlated random number generator + * Use entropy source for initial seed. */ -#define TABLESIZE 2048 -#define TABLEFACTOR 8192 +static void init_crandom(struct crndstate *state, unsigned long rho) +{ + state->rho = rho; + state->last = net_random(); +} -static const short disttable[TABLESIZE] = { - -31473, -26739, -25226, -24269, - -23560, -22993, -22518, -22109, - -21749, -21426, -21133, -20865, - -20618, -20389, -20174, -19972, - -19782, -19601, -19430, -19267, - -19112, -18962, -18819, -18681, - -18549, -18421, -18298, -18178, - -18062, -17950, -17841, -17735, - -17632, -17532, -17434, -17339, - -17245, -17155, -17066, -16979, - -16894, -16811, -16729, -16649, - -16571, -16494, -16419, -16345, - -16272, -16201, -16130, -16061, - -15993, -15926, -15861, -15796, - -15732, -15669, -15607, -15546, - -15486, -15426, -15368, -15310, - -15253, -15196, -15140, -15086, - -15031, -14977, -14925, -14872, - -14821, -14769, -14719, -14669, - -14619, -14570, -14522, -14473, - -14426, -14379, -14332, -14286, - -14241, -14196, -14150, -14106, - -14062, -14019, -13976, -13933, - -13890, -13848, -13807, -13765, - -13724, -13684, -13643, -13604, - -13564, -13525, -13486, -13447, - -13408, -13370, -13332, -13295, - -13258, -13221, -13184, -13147, - -13111, -13075, -13040, -13004, - -12969, -12934, -12899, -12865, - -12830, -12796, -12762, -12729, - -12695, -12662, -12629, -12596, - -12564, -12531, -12499, -12467, - -12435, -12404, -12372, -12341, - -12310, -12279, -12248, -12218, - -12187, -12157, -12127, -12097, - -12067, -12038, -12008, -11979, - -11950, -11921, -11892, -11863, - -11835, -11806, -11778, -11750, - -11722, -11694, -11666, -11639, - -11611, -11584, -11557, -11530, - -11503, -11476, -11450, -11423, - -11396, -11370, -11344, -11318, - -11292, -11266, -11240, -11214, - -11189, -11164, -11138, -11113, - -11088, -11063, -11038, -11013, - -10988, -10964, -10939, -10915, - -10891, -10866, -10843, -10818, - -10794, -10770, -10747, -10723, - -10700, -10676, -10652, -10630, - -10606, -10583, -10560, -10537, - -10514, -10491, -10469, -10446, - -10424, -10401, -10378, -10356, - -10334, -10312, -10290, -10267, - -10246, -10224, -10202, -10180, - -10158, -10137, -10115, -10094, - -10072, -10051, -10030, -10009, - -9988, -9967, -9945, -9925, - -9904, -9883, -9862, -9842, - -9821, -9800, -9780, -9760, - -9739, -9719, -9699, -9678, - -9658, -9638, -9618, -9599, - -9578, -9559, -9539, -9519, - -9499, -9480, -9461, -9441, - -9422, -9402, -9383, -9363, - -9344, -9325, -9306, -9287, - -9268, -9249, -9230, -9211, - -9192, -9173, -9155, -9136, - -9117, -9098, -9080, -9062, - -9043, -9025, -9006, -8988, - -8970, -8951, -8933, -8915, - -8897, -8879, -8861, -8843, - -8825, -8807, -8789, -8772, - -8754, -8736, -8718, -8701, - -8683, -8665, -8648, -8630, - -8613, -8595, -8578, -8561, - -8543, -8526, -8509, -8492, - -8475, -8458, -8441, -8423, - -8407, -8390, -8373, -8356, - -8339, -8322, -8305, -8289, - -8272, -8255, -8239, -8222, - -8206, -8189, -8172, -8156, - -8140, -8123, -8107, -8090, - -8074, -8058, -8042, -8025, - -8009, -7993, -7977, -7961, - -7945, -7929, -7913, -7897, - -7881, -7865, -7849, -7833, - -7817, -7802, -7786, -7770, - -7754, -7739, -7723, -7707, - -7692, -7676, -7661, -7645, - -7630, -7614, -7599, -7583, - -7568, -7553, -7537, -7522, - -7507, -7492, -7476, -7461, - -7446, -7431, -7416, -7401, - -7385, -7370, -7356, -7340, - -7325, -7311, -7296, -7281, - -7266, -7251, -7236, -7221, - -7207, -7192, -7177, -7162, - -7148, -7133, -7118, -7104, - -7089, -7075, -7060, -7046, - -7031, -7016, -7002, -6988, - -6973, -6959, -6944, -6930, - -6916, -6901, -6887, -6873, - -6859, -6844, -6830, -6816, - -6802, -6788, -6774, -6760, - -6746, -6731, -6717, -6704, - -6690, -6675, -6661, -6647, - -6633, -6620, -6606, -6592, - -6578, -6564, -6550, -6537, - -6523, -6509, -6495, -6482, - -6468, -6454, -6441, -6427, - -6413, -6400, -6386, -6373, - -6359, -6346, -6332, -6318, - -6305, -6291, -6278, -6264, - -6251, -6238, -6224, -6211, - -6198, -6184, -6171, -6158, - -6144, -6131, -6118, -6105, - -6091, -6078, -6065, -6052, - -6039, -6025, -6012, -5999, - -5986, -5973, -5960, -5947, - -5934, -5921, -5908, -5895, - -5882, -5869, -5856, -5843, - -5830, -5817, -5804, -5791, - -5779, -5766, -5753, -5740, - -5727, -5714, -5702, -5689, - -5676, -5663, -5650, -5638, - -5625, -5612, -5600, -5587, - -5575, -5562, -5549, -5537, - -5524, -5512, -5499, -5486, - -5474, -5461, -5449, -5436, - -5424, -5411, -5399, -5386, - -5374, -5362, -5349, -5337, - -5324, -5312, -5299, -5287, - -5275, -5263, -5250, -5238, - -5226, -5213, -5201, -5189, - -5177, -5164, -5152, -5140, - -5128, -5115, -5103, -5091, - -5079, -5067, -5055, -5043, - -5030, -5018, -5006, -4994, - -4982, -4970, -4958, -4946, - -4934, -4922, -4910, -4898, - -4886, -4874, -4862, -4850, - -4838, -4826, -4814, -4803, - -4791, -4778, -4767, -4755, - -4743, -4731, -4719, -4708, - -4696, -4684, -4672, -4660, - -4649, -4637, -4625, -4613, - -4601, -4590, -4578, -4566, - -4554, -4543, -4531, -4520, - -4508, -4496, -4484, -4473, - -4461, -4449, -4438, -4427, - -4415, -4403, -4392, -4380, - -4368, -4357, -4345, -4334, - -4322, -4311, -4299, -4288, - -4276, -4265, -4253, -4242, - -4230, -4219, -4207, -4196, - -4184, -4173, -4162, -4150, - -4139, -4128, -4116, -4105, - -4094, -4082, -4071, -4060, - -4048, -4037, -4026, -4014, - -4003, -3992, -3980, -3969, - -3958, -3946, -3935, -3924, - -3913, -3901, -3890, -3879, - -3868, -3857, -3845, -3834, - -3823, -3812, -3801, -3790, - -3779, -3767, -3756, -3745, - -3734, -3723, -3712, -3700, - -3689, -3678, -3667, -3656, - -3645, -3634, -3623, -3612, - -3601, -3590, -3579, -3568, - -3557, -3545, -3535, -3524, - -3513, -3502, -3491, -3480, - -3469, -3458, -3447, -3436, - -3425, -3414, -3403, -3392, - -3381, -3370, -3360, -3348, - -3337, -3327, -3316, -3305, - -3294, -3283, -3272, -3262, - -3251, -3240, -3229, -3218, - -3207, -3197, -3185, -3175, - -3164, -3153, -3142, -3132, - -3121, -3110, -3099, -3088, - -3078, -3067, -3056, -3045, - -3035, -3024, -3013, -3003, - -2992, -2981, -2970, -2960, - -2949, -2938, -2928, -2917, - -2906, -2895, -2885, -2874, - -2864, -2853, -2842, -2832, - -2821, -2810, -2800, -2789, - -2778, -2768, -2757, -2747, - -2736, -2725, -2715, -2704, - -2694, -2683, -2673, -2662, - -2651, -2641, -2630, -2620, - -2609, -2599, -2588, -2578, - -2567, -2556, -2546, -2535, - -2525, -2515, -2504, -2493, - -2483, -2472, -2462, -2451, - -2441, -2431, -2420, -2410, - -2399, -2389, -2378, -2367, - -2357, -2347, -2336, -2326, - -2315, -2305, -2295, -2284, - -2274, -2263, -2253, -2243, - -2232, -2222, -2211, -2201, - -2191, -2180, -2170, -2159, - -2149, -2139, -2128, -2118, - -2107, -2097, -2087, -2076, - -2066, -2056, -2046, -2035, - -2025, -2014, -2004, -1994, - -1983, -1973, -1963, -1953, - -1942, -1932, -1921, -1911, - -1901, -1891, -1880, -1870, - -1860, -1849, -1839, -1829, - -1819, -1808, -1798, -1788, - -1778, -1767, -1757, -1747, - -1736, -1726, -1716, -1706, - -1695, -1685, -1675, -1665, - -1654, -1644, -1634, -1624, - -1613, -1603, -1593, -1583, - -1573, -1563, -1552, -1542, - -1532, -1522, -1511, -1501, - -1491, -1481, -1471, -1461, - -1450, -1440, -1430, -1420, - -1409, -1400, -1389, -1379, - -1369, -1359, -1348, -1339, - -1328, -1318, -1308, -1298, - -1288, -1278, -1267, -1257, - -1247, -1237, -1227, -1217, - -1207, -1196, -1186, -1176, - -1166, -1156, -1146, -1135, - -1126, -1115, -1105, -1095, - -1085, -1075, -1065, -1055, - -1044, -1034, -1024, -1014, - -1004, -994, -984, -974, - -964, -954, -944, -933, - -923, -913, -903, -893, - -883, -873, -863, -853, - -843, -833, -822, -812, - -802, -792, -782, -772, - -762, -752, -742, -732, - -722, -712, -702, -691, - -682, -671, -662, -651, - -641, -631, -621, -611, - -601, -591, -581, -571, - -561, -551, -541, -531, - -521, -511, -501, -491, - -480, -471, -460, -451, - -440, -430, -420, -410, - -400, -390, -380, -370, - -360, -350, -340, -330, - -320, -310, -300, -290, - -280, -270, -260, -250, - -240, -230, -220, -210, - -199, -190, -179, -170, - -159, -150, -139, -129, - -119, -109, -99, -89, - -79, -69, -59, -49, - -39, -29, -19, -9, - 1, 11, 21, 31, - 41, 51, 61, 71, - 81, 91, 101, 111, - 121, 131, 141, 152, - 161, 172, 181, 192, - 202, 212, 222, 232, - 242, 252, 262, 272, - 282, 292, 302, 312, - 322, 332, 342, 352, - 362, 372, 382, 392, - 402, 412, 422, 433, - 442, 453, 462, 473, - 483, 493, 503, 513, - 523, 533, 543, 553, - 563, 573, 583, 593, - 603, 613, 623, 633, - 643, 653, 664, 673, - 684, 694, 704, 714, - 724, 734, 744, 754, - 764, 774, 784, 794, - 804, 815, 825, 835, - 845, 855, 865, 875, - 885, 895, 905, 915, - 925, 936, 946, 956, - 966, 976, 986, 996, - 1006, 1016, 1026, 1037, - 1047, 1057, 1067, 1077, - 1087, 1097, 1107, 1117, - 1128, 1138, 1148, 1158, - 1168, 1178, 1188, 1198, - 1209, 1219, 1229, 1239, - 1249, 1259, 1269, 1280, - 1290, 1300, 1310, 1320, - 1330, 1341, 1351, 1361, - 1371, 1381, 1391, 1402, - 1412, 1422, 1432, 1442, - 1452, 1463, 1473, 1483, - 1493, 1503, 1513, 1524, - 1534, 1544, 1554, 1565, - 1575, 1585, 1595, 1606, - 1616, 1626, 1636, 1647, - 1656, 1667, 1677, 1687, - 1697, 1708, 1718, 1729, - 1739, 1749, 1759, 1769, - 1780, 1790, 1800, 1810, - 1821, 1831, 1841, 1851, - 1862, 1872, 1883, 1893, - 1903, 1913, 1923, 1934, - 1944, 1955, 1965, 1975, - 1985, 1996, 2006, 2016, - 2027, 2037, 2048, 2058, - 2068, 2079, 2089, 2099, - 2110, 2120, 2130, 2141, - 2151, 2161, 2172, 2182, - 2193, 2203, 2213, 2224, - 2234, 2245, 2255, 2265, - 2276, 2286, 2297, 2307, - 2318, 2328, 2338, 2349, - 2359, 2370, 2380, 2391, - 2401, 2412, 2422, 2433, - 2443, 2454, 2464, 2475, - 2485, 2496, 2506, 2517, - 2527, 2537, 2548, 2559, - 2569, 2580, 2590, 2601, - 2612, 2622, 2632, 2643, - 2654, 2664, 2675, 2685, - 2696, 2707, 2717, 2728, - 2738, 2749, 2759, 2770, - 2781, 2791, 2802, 2813, - 2823, 2834, 2845, 2855, - 2866, 2877, 2887, 2898, - 2909, 2919, 2930, 2941, - 2951, 2962, 2973, 2984, - 2994, 3005, 3015, 3027, - 3037, 3048, 3058, 3069, - 3080, 3091, 3101, 3113, - 3123, 3134, 3145, 3156, - 3166, 3177, 3188, 3199, - 3210, 3220, 3231, 3242, - 3253, 3264, 3275, 3285, - 3296, 3307, 3318, 3329, - 3340, 3351, 3362, 3373, - 3384, 3394, 3405, 3416, - 3427, 3438, 3449, 3460, - 3471, 3482, 3493, 3504, - 3515, 3526, 3537, 3548, - 3559, 3570, 3581, 3592, - 3603, 3614, 3625, 3636, - 3647, 3659, 3670, 3681, - 3692, 3703, 3714, 3725, - 3736, 3747, 3758, 3770, - 3781, 3792, 3803, 3814, - 3825, 3837, 3848, 3859, - 3870, 3881, 3893, 3904, - 3915, 3926, 3937, 3949, - 3960, 3971, 3983, 3994, - 4005, 4017, 4028, 4039, - 4051, 4062, 4073, 4085, - 4096, 4107, 4119, 4130, - 4141, 4153, 4164, 4175, - 4187, 4198, 4210, 4221, - 4233, 4244, 4256, 4267, - 4279, 4290, 4302, 4313, - 4325, 4336, 4348, 4359, - 4371, 4382, 4394, 4406, - 4417, 4429, 4440, 4452, - 4464, 4475, 4487, 4499, - 4510, 4522, 4533, 4545, - 4557, 4569, 4581, 4592, - 4604, 4616, 4627, 4639, - 4651, 4663, 4674, 4686, - 4698, 4710, 4722, 4734, - 4746, 4758, 4769, 4781, - 4793, 4805, 4817, 4829, - 4841, 4853, 4865, 4877, - 4889, 4900, 4913, 4925, - 4936, 4949, 4961, 4973, - 4985, 4997, 5009, 5021, - 5033, 5045, 5057, 5070, - 5081, 5094, 5106, 5118, - 5130, 5143, 5155, 5167, - 5179, 5191, 5204, 5216, - 5228, 5240, 5253, 5265, - 5278, 5290, 5302, 5315, - 5327, 5340, 5352, 5364, - 5377, 5389, 5401, 5414, - 5426, 5439, 5451, 5464, - 5476, 5489, 5502, 5514, - 5527, 5539, 5552, 5564, - 5577, 5590, 5603, 5615, - 5628, 5641, 5653, 5666, - 5679, 5691, 5704, 5717, - 5730, 5743, 5756, 5768, - 5781, 5794, 5807, 5820, - 5833, 5846, 5859, 5872, - 5885, 5897, 5911, 5924, - 5937, 5950, 5963, 5976, - 5989, 6002, 6015, 6028, - 6042, 6055, 6068, 6081, - 6094, 6108, 6121, 6134, - 6147, 6160, 6174, 6187, - 6201, 6214, 6227, 6241, - 6254, 6267, 6281, 6294, - 6308, 6321, 6335, 6348, - 6362, 6375, 6389, 6403, - 6416, 6430, 6443, 6457, - 6471, 6485, 6498, 6512, - 6526, 6540, 6554, 6567, - 6581, 6595, 6609, 6623, - 6637, 6651, 6665, 6679, - 6692, 6706, 6721, 6735, - 6749, 6763, 6777, 6791, - 6805, 6819, 6833, 6848, - 6862, 6876, 6890, 6905, - 6919, 6933, 6948, 6962, - 6976, 6991, 7005, 7020, - 7034, 7049, 7064, 7078, - 7093, 7107, 7122, 7136, - 7151, 7166, 7180, 7195, - 7210, 7225, 7240, 7254, - 7269, 7284, 7299, 7314, - 7329, 7344, 7359, 7374, - 7389, 7404, 7419, 7434, - 7449, 7465, 7480, 7495, - 7510, 7526, 7541, 7556, - 7571, 7587, 7602, 7618, - 7633, 7648, 7664, 7680, - 7695, 7711, 7726, 7742, - 7758, 7773, 7789, 7805, - 7821, 7836, 7852, 7868, - 7884, 7900, 7916, 7932, - 7948, 7964, 7981, 7997, - 8013, 8029, 8045, 8061, - 8078, 8094, 8110, 8127, - 8143, 8160, 8176, 8193, - 8209, 8226, 8242, 8259, - 8276, 8292, 8309, 8326, - 8343, 8360, 8377, 8394, - 8410, 8428, 8444, 8462, - 8479, 8496, 8513, 8530, - 8548, 8565, 8582, 8600, - 8617, 8634, 8652, 8670, - 8687, 8704, 8722, 8740, - 8758, 8775, 8793, 8811, - 8829, 8847, 8865, 8883, - 8901, 8919, 8937, 8955, - 8974, 8992, 9010, 9029, - 9047, 9066, 9084, 9103, - 9121, 9140, 9159, 9177, - 9196, 9215, 9234, 9253, - 9272, 9291, 9310, 9329, - 9349, 9368, 9387, 9406, - 9426, 9445, 9465, 9484, - 9504, 9524, 9544, 9563, - 9583, 9603, 9623, 9643, - 9663, 9683, 9703, 9723, - 9744, 9764, 9785, 9805, - 9826, 9846, 9867, 9888, - 9909, 9930, 9950, 9971, - 9993, 10013, 10035, 10056, - 10077, 10099, 10120, 10142, - 10163, 10185, 10207, 10229, - 10251, 10273, 10294, 10317, - 10339, 10361, 10384, 10406, - 10428, 10451, 10474, 10496, - 10519, 10542, 10565, 10588, - 10612, 10635, 10658, 10682, - 10705, 10729, 10752, 10776, - 10800, 10824, 10848, 10872, - 10896, 10921, 10945, 10969, - 10994, 11019, 11044, 11069, - 11094, 11119, 11144, 11169, - 11195, 11221, 11246, 11272, - 11298, 11324, 11350, 11376, - 11402, 11429, 11456, 11482, - 11509, 11536, 11563, 11590, - 11618, 11645, 11673, 11701, - 11728, 11756, 11785, 11813, - 11842, 11870, 11899, 11928, - 11957, 11986, 12015, 12045, - 12074, 12104, 12134, 12164, - 12194, 12225, 12255, 12286, - 12317, 12348, 12380, 12411, - 12443, 12475, 12507, 12539, - 12571, 12604, 12637, 12670, - 12703, 12737, 12771, 12804, - 12839, 12873, 12907, 12942, - 12977, 13013, 13048, 13084, - 13120, 13156, 13192, 13229, - 13267, 13304, 13341, 13379, - 13418, 13456, 13495, 13534, - 13573, 13613, 13653, 13693, - 13734, 13775, 13817, 13858, - 13901, 13943, 13986, 14029, - 14073, 14117, 14162, 14206, - 14252, 14297, 14343, 14390, - 14437, 14485, 14533, 14582, - 14631, 14680, 14731, 14782, - 14833, 14885, 14937, 14991, - 15044, 15099, 15154, 15210, - 15266, 15324, 15382, 15441, - 15500, 15561, 15622, 15684, - 15747, 15811, 15877, 15943, - 16010, 16078, 16148, 16218, - 16290, 16363, 16437, 16513, - 16590, 16669, 16749, 16831, - 16915, 17000, 17088, 17177, - 17268, 17362, 17458, 17556, - 17657, 17761, 17868, 17977, - 18090, 18207, 18328, 18452, - 18581, 18715, 18854, 18998, - 19149, 19307, 19472, 19645, - 19828, 20021, 20226, 20444, - 20678, 20930, 21204, 21503, - 21835, 22206, 22630, 23124, - 23721, 24478, 25529, 27316, -}; +/* get_crandom - correlated random number generator + * Next number depends on last value. + * rho is scaled to avoid floating point. + */ +static unsigned long get_crandom(struct crndstate *state) +{ + u64 value, rho; + unsigned long answer; + + if (state->rho == 0) /* no correllation */ + return net_random(); + + value = net_random(); + rho = (u64)state->rho + 1; + answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; + state->last = answer; + return answer; +} /* tabledist - return a pseudo-randomly distributed value with mean mu and * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static inline int tabledist(int mu, int sigma) +static long tabledist(unsigned long mu, long sigma, + struct crndstate *state, const struct disttable *dist) { - int x; - int index; - int sigmamod, sigmadiv; + long t, x; + unsigned long rnd; if (sigma == 0) return mu; - index = (net_random() & (TABLESIZE-1)); - sigmamod = sigma%TABLEFACTOR; - sigmadiv = sigma/TABLEFACTOR; - x = sigmamod*disttable[index]; + rnd = get_crandom(state); + + /* default uniform distribution */ + if (dist == NULL) + return (rnd % (2*sigma)) - sigma + mu; + t = dist->table[rnd % dist->size]; + x = (sigma % NETEM_DIST_SCALE) * t; if (x >= 0) - x += TABLEFACTOR/2; + x += NETEM_DIST_SCALE/2; else - x -= TABLEFACTOR/2; + x -= NETEM_DIST_SCALE/2; - x /= TABLEFACTOR; - x += sigmadiv*disttable[index]; - x += mu; - return x; + return x / NETEM_DIST_SCALE + (sigma / NETEM_DIST_SCALE) * t + mu; } -/* Enqueue packets with underlying discipline (fifo) - * but mark them with current time first. - */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +/* Put skb in the private delayed queue. */ +static int delay_skb(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; - long delay; + + PSCHED_GET_TIME(now); + PSCHED_TADD2(now, tabledist(q->latency, q->jitter, + &q->delay_cor, q->delay_dist), + 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->stats.bytes += skb->len; + sch->stats.packets++; + return NET_XMIT_SUCCESS; + } + + sch->stats.drops++; + kfree_skb(skb); + return NET_XMIT_DROP; +} + +static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct netem_sched_data *q = qdisc_priv(sch); pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { + if (q->loss && q->loss >= get_crandom(&q->loss_cor)) { + pr_debug("netem_enqueue: random loss\n"); sch->stats.drops++; return 0; /* lie about loss so TCP doesn't know */ } + /* Random duplication */ + if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) { + struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); + + pr_debug("netem_enqueue: dup %p\n", skb2); + if (skb2) + delay_skb(sch, skb2); + } /* If doing simple delay then gap == 0 so all packets * go into the delayed holding queue @@ -634,33 +203,14 @@ } q->counter = 0; - - PSCHED_GET_TIME(now); - if (q->jitter) - delay = tabledist(q->latency, q->jitter); - else - delay = q->latency; - PSCHED_TADD2(now, delay, 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->stats.bytes += skb->len; - sch->stats.packets++; - return 0; - } - - sch->stats.drops++; - kfree_skb(skb); - return NET_XMIT_DROP; + return delay_skb(sch, skb); } /* Requeue packets but don't change time stamp */ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); int ret; if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) @@ -671,7 +221,7 @@ static unsigned int netem_drop(struct Qdisc* sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); unsigned int len; if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { @@ -687,7 +237,7 @@ */ static struct sk_buff *netem_dequeue(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; psched_time_t now; @@ -727,7 +277,7 @@ static void netem_reset(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); skb_queue_purge(&q->delayed); @@ -753,92 +303,163 @@ return ret; } -static int netem_change(struct Qdisc *sch, struct rtattr *opt) +/* + * Distribution data is a variable size payload containing + * signed 16 bit values. + */ +static int get_dist_table(struct Qdisc *sch, const struct rtattr *attr) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; - struct tc_netem_qopt *qopt = RTA_DATA(opt); - struct Qdisc *child; - int ret; + struct netem_sched_data *q = qdisc_priv(sch); + unsigned long n = RTA_PAYLOAD(attr)/sizeof(__s16); + const __s16 *data = RTA_DATA(attr); + struct disttable *d; + int i; + + if (n > 65536) + return -EINVAL; - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) + d = kmalloc(sizeof(*d) + n*sizeof(d->table[0]), GFP_KERNEL); + if (!d) + return -ENOMEM; + + d->size = n; + for (i = 0; i < n; i++) + d->table[i] = data[i]; + + spin_lock_bh(&sch->dev->queue_lock); + d = xchg(&q->delay_dist, d); + spin_unlock_bh(&sch->dev->queue_lock); + + kfree(d); + return 0; +} + +static int get_correlation(struct Qdisc *sch, const struct rtattr *attr) +{ + struct netem_sched_data *q = qdisc_priv(sch); + const struct tc_netem_corr *c = RTA_DATA(attr); + + if (RTA_PAYLOAD(attr) != sizeof(*c)) return -EINVAL; - child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); - if (!child) + init_crandom(&q->delay_cor, c->delay_corr); + init_crandom(&q->loss_cor, c->loss_corr); + init_crandom(&q->dup_cor, c->dup_corr); + return 0; +} + +static int netem_change(struct Qdisc *sch, struct rtattr *opt) +{ + struct netem_sched_data *q = qdisc_priv(sch); + struct tc_netem_qopt *qopt; + int ret; + + if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) return -EINVAL; - ret = set_fifo_limit(child, qopt->limit); + qopt = RTA_DATA(opt); + ret = set_fifo_limit(q->qdisc, qopt->limit); if (ret) { - qdisc_destroy(child); + pr_debug("netem: can't set fifo limit\n"); return ret; } - - sch_tree_lock(sch); - if (child) { - child = xchg(&q->qdisc, child); - if (child != &noop_qdisc) - qdisc_destroy(child); - q->latency = qopt->latency; - q->jitter = qopt->jitter; - q->limit = qopt->limit; - q->gap = qopt->gap; - q->loss = qopt->loss; + q->latency = qopt->latency; + q->jitter = qopt->jitter; + q->limit = qopt->limit; + q->gap = qopt->gap; + q->loss = qopt->loss; + q->duplicate = qopt->duplicate; + + /* Handle nested options after initial queue options. + * Should have put all options in nested format but too late now. + */ + if (RTA_PAYLOAD(opt) > sizeof(*qopt)) { + struct rtattr *tb[TCA_NETEM_MAX]; + if (rtattr_parse(tb, TCA_NETEM_MAX, + RTA_DATA(opt) + sizeof(*qopt), + RTA_PAYLOAD(opt) - sizeof(*qopt))) + return -EINVAL; + + if (tb[TCA_NETEM_CORR-1]) { + ret = get_correlation(sch, tb[TCA_NETEM_CORR-1]); + if (ret) + return ret; + } + + if (tb[TCA_NETEM_DELAY_DIST-1]) { + ret = get_dist_table(sch, tb[TCA_NETEM_DELAY_DIST-1]); + if (ret) + return ret; + } } - sch_tree_unlock(sch); + return 0; } static int netem_init(struct Qdisc *sch, struct rtattr *opt) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; - int err; + struct netem_sched_data *q = qdisc_priv(sch); + int ret; if (!opt) return -EINVAL; MOD_INC_USE_COUNT; skb_queue_head_init(&q->delayed); - q->qdisc = &noop_qdisc; - init_timer(&q->timer); q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; - err = netem_change(sch, opt); - if (err != 0) + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (!q->qdisc) { + pr_debug("netem: qdisc create failed\n"); + return -ENOMEM; + } + + ret = netem_change(sch, opt); + if (ret) { + pr_debug("netem: change failed\n"); + qdisc_destroy(q->qdisc); MOD_DEC_USE_COUNT; - return err; + } + return ret; } static void netem_destroy(struct Qdisc *sch) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; - - del_timer(&q->timer); + struct netem_sched_data *q = qdisc_priv(sch); + del_timer_sync(&q->timer); qdisc_destroy(q->qdisc); - q->qdisc = &noop_qdisc; - + kfree(q->delay_dist); MOD_DEC_USE_COUNT; } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + const struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; + struct rtattr *rta = (struct rtattr *) b; struct tc_netem_qopt qopt; + struct tc_netem_corr cor; qopt.latency = q->latency; qopt.jitter = q->jitter; qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; - + qopt.duplicate = q->duplicate; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); + cor.delay_corr = q->delay_cor.rho; + cor.loss_corr = q->loss_cor.rho; + cor.dup_corr = q->dup_cor.rho; + RTA_PUT(skb, TCA_NETEM_CORR, sizeof(cor), &cor); + rta->rta_len = skb->tail - b; + return skb->len; rtattr_failure: @@ -849,7 +470,7 @@ static int netem_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { - struct netem_sched_data *q = (struct netem_sched_data*)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (cl != 1) /* only one class */ return -ENOENT; @@ -863,7 +484,7 @@ static int netem_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; @@ -879,7 +500,7 @@ static struct Qdisc *netem_leaf(struct Qdisc *sch, unsigned long arg) { - struct netem_sched_data *q = (struct netem_sched_data *)sch->data; + struct netem_sched_data *q = qdisc_priv(sch); return q->qdisc; } From romieu@fr.zoreil.com Mon Aug 30 14:58:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 14:58:17 -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 i7ULwBDb015396 for ; Mon, 30 Aug 2004 14:58:12 -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 i7ULuavr026515; Mon, 30 Aug 2004 23:56:36 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7ULuaUM026514; Mon, 30 Aug 2004 23:56:36 +0200 Date: Mon, 30 Aug 2004 23:56:36 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [PATCH 2.6.9-rc1-mm1-tso 1/2] 8139cp: SG support fixes Message-ID: <20040830215636.GA26455@electric-eye.fr.zoreil.com> References: <20040829212205.GA2864@havoc.gtf.org> <20040829222831.GA9496@electric-eye.fr.zoreil.com> <41326079.9090402@pobox.com> <20040830215227.GA23857@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040830215227.GA23857@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8210 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: 3339 Lines: 103 - suspicious length in pci_unmap_single; - wait for the last frag before freeing the relevant skb; - no need to crash when facing some unexpected csum combination. diff -puN drivers/net/8139cp.c~8139cp-010 drivers/net/8139cp.c --- linux-2.6.9-rc1/drivers/net/8139cp.c~8139cp-010 2004-08-29 23:47:07.000000000 +0200 +++ linux-2.6.9-rc1-fr/drivers/net/8139cp.c 2004-08-30 21:21:23.000000000 +0200 @@ -314,7 +314,7 @@ struct cp_desc { struct ring_info { struct sk_buff *skb; dma_addr_t mapping; - unsigned frag; + u32 len; }; struct cp_dma_stats { @@ -708,7 +708,7 @@ static void cp_tx (struct cp_private *cp BUG(); pci_unmap_single(cp->pdev, cp->tx_skb[tx_tail].mapping, - skb->len, PCI_DMA_TODEVICE); + cp->tx_skb[tx_tail].len, PCI_DMA_TODEVICE); if (status & LastFrag) { if (status & (TxError | TxFIFOUnder)) { @@ -799,7 +799,7 @@ static int cp_start_xmit (struct sk_buff else if (ip->protocol == IPPROTO_UDP) flags |= IPCS | UDPCS; else - BUG(); + WARN_ON(1); /* we need a WARN() */ } txd->opts1 = cpu_to_le32(flags); @@ -807,7 +807,7 @@ static int cp_start_xmit (struct sk_buff cp->tx_skb[entry].skb = skb; cp->tx_skb[entry].mapping = mapping; - cp->tx_skb[entry].frag = 0; + cp->tx_skb[entry].len = len; entry = NEXT_TX(entry); } else { struct cp_desc *txd; @@ -825,7 +825,7 @@ static int cp_start_xmit (struct sk_buff first_len, PCI_DMA_TODEVICE); cp->tx_skb[entry].skb = skb; cp->tx_skb[entry].mapping = first_mapping; - cp->tx_skb[entry].frag = 1; + cp->tx_skb[entry].len = first_len; entry = NEXT_TX(entry); for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) { @@ -868,7 +868,7 @@ static int cp_start_xmit (struct sk_buff cp->tx_skb[entry].skb = skb; cp->tx_skb[entry].mapping = mapping; - cp->tx_skb[entry].frag = frag + 2; + cp->tx_skb[entry].len = len; entry = NEXT_TX(entry); } @@ -1082,7 +1082,6 @@ static int cp_refill_rx (struct cp_priva cp->rx_skb[i].mapping = pci_map_single(cp->pdev, skb->tail, cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp->rx_skb[i].skb = skb; - cp->rx_skb[i].frag = 0; cp->rx_ring[i].opts2 = 0; cp->rx_ring[i].addr = cpu_to_le64(cp->rx_skb[i].mapping); @@ -1134,9 +1133,6 @@ static void cp_clean_rings (struct cp_pr { unsigned i; - memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); - memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); - for (i = 0; i < CP_RX_RING_SIZE; i++) { if (cp->rx_skb[i].skb) { pci_unmap_single(cp->pdev, cp->rx_skb[i].mapping, @@ -1148,13 +1144,18 @@ static void cp_clean_rings (struct cp_pr for (i = 0; i < CP_TX_RING_SIZE; i++) { if (cp->tx_skb[i].skb) { struct sk_buff *skb = cp->tx_skb[i].skb; + pci_unmap_single(cp->pdev, cp->tx_skb[i].mapping, - skb->len, PCI_DMA_TODEVICE); - dev_kfree_skb(skb); + cp->tx_skb[i].len, PCI_DMA_TODEVICE); + if (le32_to_cpu(cp->tx_ring[i].opts1) & LastFrag) + dev_kfree_skb(skb); cp->net_stats.tx_dropped++; } } + memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); + memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); + memset(&cp->rx_skb, 0, sizeof(struct ring_info) * CP_RX_RING_SIZE); memset(&cp->tx_skb, 0, sizeof(struct ring_info) * CP_TX_RING_SIZE); } _ From mcgrof@studorgs.rutgers.edu Mon Aug 30 15:01:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:01:19 -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 i7UM1Eed015980 for ; Mon, 30 Aug 2004 15:01:14 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id E8EABF99BC; Mon, 30 Aug 2004 18:01:05 -0400 (EDT) Date: Mon, 30 Aug 2004 18:01:05 -0400 To: Jeff Garzik Cc: jt@hpl.hp.com, Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal Message-ID: <20040830220105.GY22126@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , jt@hpl.hp.com, Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> <413363CB.7060807@pobox.com> <20040830174215.GA32132@bougret.hpl.hp.com> <41336A28.9010608@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41336A28.9010608@pobox.com> 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: 8211 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: 1053 Lines: 30 On Mon, Aug 30, 2004 at 01:55:52PM -0400, Jeff Garzik wrote: > Jean Tourrilhes wrote: <-- snip --> > > Also, I'm not clear how the stuff in wireless-2.6 is supposed > >to trickle into the other trees (netdev-2.6, -mm and Linus's), and how > >to better link it with the CVS of the various drivers involved. > > Less of a trickle than a flood: wireless-2.6 should be the target for > development of shared wireless stack code. As several drivers are > currently using bits of HostAP, for example, wireless-2.6 should be a > focal point for patches that modify these drivers to instead share the > same code. > > Once this generic work is done, it would get pushed all at once to > netdev-2.6, where it would receive testing in -mm. Then, later, pushed > to mainline. > > Jeff Beides wpa_supplicant from hostap code (which is actually going into WE18) what other code re-use is on the roadmap as of yet for wireless-2.6? Also who is coordinating this? Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From romieu@fr.zoreil.com Mon Aug 30 15:02:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:02:17 -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 i7UM2BIA016279 for ; Mon, 30 Aug 2004 15:02:12 -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 i7ULwJvr026607; Mon, 30 Aug 2004 23:58:19 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7ULwJ4D026606; Mon, 30 Aug 2004 23:58:19 +0200 Date: Mon, 30 Aug 2004 23:58:18 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [PATCH 2.6.9-rc1-mm1-tso 2/2] 8139cp: DAC support fix Message-ID: <20040830215818.GB26455@electric-eye.fr.zoreil.com> References: <20040829212205.GA2864@havoc.gtf.org> <20040829222831.GA9496@electric-eye.fr.zoreil.com> <41326079.9090402@pobox.com> <20040830215227.GA23857@electric-eye.fr.zoreil.com> <20040830215636.GA26455@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040830215636.GA26455@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 8212 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: 578 Lines: 17 Wrong unit for sizeof(). diff -puN drivers/net/8139cp.c~8139cp-020 drivers/net/8139cp.c --- linux-2.6.9-rc1/drivers/net/8139cp.c~8139cp-020 2004-08-30 23:34:16.000000000 +0200 +++ linux-2.6.9-rc1-fr/drivers/net/8139cp.c 2004-08-30 23:35:09.000000000 +0200 @@ -1711,7 +1711,7 @@ static int cp_init_one (struct pci_dev * } /* Configure DMA attributes. */ - if ((sizeof(dma_addr_t) > 32) && + if ((sizeof(dma_addr_t) > 4) && !pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL) && !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { pci_using_dac = 1; _ From romieu@fr.zoreil.com Mon Aug 30 15:02:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:02:23 -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 i7UM2GXF016318 for ; Mon, 30 Aug 2004 15:02:17 -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 i7UM0lvr026634; Tue, 31 Aug 2004 00:00:47 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i7UM0jRV026633; Tue, 31 Aug 2004 00:00:45 +0200 Date: Tue, 31 Aug 2004 00:00:45 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: akpm@osdl.org, Jon Mason , netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc1-mm1 1/1] r8169: DAC support fix Message-ID: <20040830220045.GB22994@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: 8213 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: 609 Lines: 16 Wrong unit for sizeof(). diff -puN drivers/net/r8169.c~r8169-120 drivers/net/r8169.c --- linux-2.6.9-rc1/drivers/net/r8169.c~r8169-120 2004-08-30 23:39:04.000000000 +0200 +++ linux-2.6.9-rc1-fr/drivers/net/r8169.c 2004-08-30 23:39:20.000000000 +0200 @@ -1152,7 +1152,7 @@ rtl8169_init_board(struct pci_dev *pdev, dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; - if ((sizeof(dma_addr_t) > 32) && !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { + if ((sizeof(dma_addr_t) > 4) && !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { tp->cp_cmd |= PCIDAC; dev->features |= NETIF_F_HIGHDMA; } else { _ From hadi@cyberus.ca Mon Aug 30 15:15:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:15: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 i7UMF3ox017245 for ; Mon, 30 Aug 2004 15:15:04 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C1uQQ-0003NE-SX for netdev@oss.sgi.com; Mon, 30 Aug 2004 18:14:54 -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 1C1uQO-0004Y6-ME; Mon, 30 Aug 2004 18:14:52 -0400 Subject: Re: RFC/PATCH capture qdisc requeue event in stats From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com In-Reply-To: <20040830144033.2265a6e6.davem@redhat.com> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> Content-Type: multipart/mixed; boundary="=-QjZBZsTjJ1dNBVK0TS0q" Organization: jamalopolous Message-Id: <1093904088.1043.12.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Aug 2004 18:14:48 -0400 X-archive-position: 8214 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: 2695 Lines: 80 --=-QjZBZsTjJ1dNBVK0TS0q Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, 2004-08-30 at 17:40, David S. Miller wrote: > On 29 Aug 2004 13:13:52 -0400 > jamal wrote: > > > Opinions welcome - If all is good, Dave please apply. > > tc_stats changes size, how will existing applications cope? > Since it is just RTA_PUT() into userspace, will that just work > or will existing apps bomb because they'll do a check of the > size field of the rtnetlink attribute? To look at an existing app such as tc; attached is a patch. In the tc case. The possibilities are: 1) old kernels + old tc --> should work 2) new kernels + old tc --> should work 3) new kernels + new tc --> should work 4) old kernel + new tc --> will bomb (sizeof check will fail) Cant think of something smart to do with option #4. I have contemplated playing with offsetoff() etc. The best thing i can think of right now is to complain about it as in that fprintf() Thoughts? cheers, jamal --=-QjZBZsTjJ1dNBVK0TS0q Content-Disposition: attachment; filename=reqs-patch-iproute2-2.6.8 Content-Type: text/plain; name=reqs-patch-iproute2-2.6.8; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- iproute2-2.6.8/include/linux/pkt_sched.h 2004-08-23 16:22:16.000000000 -0400 +++ iproute2-2.6.8-mod/include/linux/pkt_sched.h 2004-08-27 10:18:32.000000000 -0400 @@ -38,6 +38,7 @@ __u32 pps; /* Current flow packet rate */ __u32 qlen; __u32 backlog; + __u32 reqs; }; struct tc_estimator --- iproute2-2.6.8/tc/tc_qdisc.c 2004-08-23 16:22:16.000000000 -0400 +++ iproute2-2.6.8-mod/tc/tc_qdisc.c 2004-08-29 13:20:25.000000000 -0400 @@ -171,8 +171,8 @@ { SPRINT_BUF(b1); - fprintf(fp, " Sent %llu bytes %u pkts (dropped %u, overlimits %u ) ", - (unsigned long long)st->bytes, st->packets, st->drops, st->overlimits); + fprintf(fp, " Sent %llu bytes %u pkts (dropped %u, overlimits %u requeus%u ) ", + (unsigned long long)st->bytes, st->packets, st->drops, st->overlimits, st->reqs); if (st->bps || st->pps || st->qlen || st->backlog) { fprintf(fp, "\n "); if (st->bps || st->pps) { @@ -255,8 +255,13 @@ fprintf(fp, "\n"); if (show_stats) { if (tb[TCA_STATS]) { + /* FIXME: need to work with old kernels. + * At the moment this just catches them + */ if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats)) - fprintf(fp, "statistics truncated"); + fprintf(fp, "statistics truncated "); + fprintf (fp, "expected %d bytes got %d\n",sizeof(struct tc_stats),RTA_PAYLOAD(tb[TCA_STATS])); + fprintf("Maybe an old kernel?"); else { struct tc_stats st; memcpy(&st, RTA_DATA(tb[TCA_STATS]), sizeof(st)); --=-QjZBZsTjJ1dNBVK0TS0q-- From jgarzik@pobox.com Mon Aug 30 15:20:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:20: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 i7UMKNLM017641 for ; Mon, 30 Aug 2004 15:20: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 1C1uVZ-0003pd-QO; Mon, 30 Aug 2004 23:20:13 +0100 Message-ID: <4133A811.1010009@pobox.com> Date: Mon, 30 Aug 2004 18:20:01 -0400 From: Jeff Garzik 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: "Luis R. Rodriguez" CC: jt@hpl.hp.com, Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> <413363CB.7060807@pobox.com> <20040830174215.GA32132@bougret.hpl.hp.com> <41336A28.9010608@pobox.com> <20040830220105.GY22126@ruslug.rutgers.edu> In-Reply-To: <20040830220105.GY22126@ruslug.rutgers.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8215 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: 1226 Lines: 39 Luis R. Rodriguez wrote: > On Mon, Aug 30, 2004 at 01:55:52PM -0400, Jeff Garzik wrote: > >>Jean Tourrilhes wrote: > > > <-- snip --> > >>> Also, I'm not clear how the stuff in wireless-2.6 is supposed >>>to trickle into the other trees (netdev-2.6, -mm and Linus's), and how >>>to better link it with the CVS of the various drivers involved. >> >>Less of a trickle than a flood: wireless-2.6 should be the target for >>development of shared wireless stack code. As several drivers are >>currently using bits of HostAP, for example, wireless-2.6 should be a >>focal point for patches that modify these drivers to instead share the >>same code. >> >>Once this generic work is done, it would get pushed all at once to >>netdev-2.6, where it would receive testing in -mm. Then, later, pushed >>to mainline. >> >> Jeff > > > Beides wpa_supplicant from hostap code (which is actually going into > WE18) what other code re-use is on the roadmap as of yet for wireless-2.6? Intel Centrino driver is re-using chunks of HostAP, and I'm looking at doing so for the RealTek 8180 driver I am about to publish. > Also who is coordinating this? The same person who coordinates the kernel at large... no one ;-) Jeff From davem@redhat.com Mon Aug 30 15:45:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:45: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 i7UMjgii018521 for ; Mon, 30 Aug 2004 15:45:43 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7UMjXS0024537; Mon, 30 Aug 2004 18:45:33 -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 i7UMjX315424; Mon, 30 Aug 2004 18:45:33 -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 i7UMjQnM010582; Mon, 30 Aug 2004 18:45:27 -0400 Date: Mon, 30 Aug 2004 15:44:30 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: Re: RFC/PATCH capture qdisc requeue event in stats Message-Id: <20040830154430.769d1d59.davem@redhat.com> In-Reply-To: <1093904088.1043.12.camel@jzny.localdomain> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.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: 8216 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: 728 Lines: 21 On 30 Aug 2004 18:14:48 -0400 jamal wrote: > 4) old kernel + new tc --> will bomb (sizeof check will fail) > > Cant think of something smart to do with option #4. I have contemplated > playing with offsetoff() etc. The best thing i can think of right > now is to complain about it as in that fprintf() > > Thoughts? Check the size, if it matches the older tc_stats size sans requeue stat addition, then don't try to reference that struct member. if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats_old)) { /* report everything sans requeue */ } else if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats)) { /* report all stats, including requeue */ } else { /* report error, etc. */ } From hadi@cyberus.ca Mon Aug 30 15:56:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 15:56:52 -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 i7UMulcT018975 for ; Mon, 30 Aug 2004 15:56:47 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C1v4o-0001Wm-Fw for netdev@oss.sgi.com; Mon, 30 Aug 2004 18:56: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 1C1v4m-0001BC-GD; Mon, 30 Aug 2004 18:56:36 -0400 Subject: Re: RFC/PATCH capture qdisc requeue event in stats From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com, Stephen Hemminger In-Reply-To: <20040830154430.769d1d59.davem@redhat.com> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093906592.1037.32.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Aug 2004 18:56:32 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8217 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: 742 Lines: 24 On Mon, 2004-08-30 at 18:44, David S. Miller wrote: > On 30 Aug 2004 18:14:48 -0400 > jamal wrote: > Check the size, if it matches the older tc_stats size sans > requeue stat addition, then don't try to reference that struct member. > > if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats_old)) { > /* report everything sans requeue */ > } else if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats)) { > /* report all stats, including requeue */ > } else { > /* report error, etc. */ > } Sounds reasonable to me. Some of the BSDs do this to maintain old compat - just means keeping old struct around. Steve, agreeable to you? Change to both kernel and user space or just user space? cheers, jamal From davem@redhat.com Mon Aug 30 16:02:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 16:02:18 -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 i7UN2CNg019398 for ; Mon, 30 Aug 2004 16:02:12 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7UN1uS0028209; Mon, 30 Aug 2004 19:01:56 -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 i7UN1u319378; Mon, 30 Aug 2004 19:01: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 i7UN1nUG015387; Mon, 30 Aug 2004 19:01:49 -0400 Date: Mon, 30 Aug 2004 16:00:52 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, shemminger@osdl.org Subject: Re: RFC/PATCH capture qdisc requeue event in stats Message-Id: <20040830160052.548c4846.davem@redhat.com> In-Reply-To: <1093906592.1037.32.camel@jzny.localdomain> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.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: 8218 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: 515 Lines: 14 On 30 Aug 2004 18:56:32 -0400 jamal wrote: > Sounds reasonable to me. Some of the BSDs do this to maintain old compat > - just means keeping old struct around. Steve, agreeable to you? > > Change to both kernel and user space or just user space? But this takes care of 'tc' only. What about other programs grabbing TC_STATS? The whole world of netlink is not the iproute2 tree. Maybe instead we should create TC_STATS2? That's a lot of work just to add this one new statistic, I must say. From shemminger@osdl.org Mon Aug 30 16:07:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 16:07: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 i7UN6vPJ019835 for ; Mon, 30 Aug 2004 16:07:00 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7UN5w111337; Mon, 30 Aug 2004 16:05:58 -0700 Date: Mon, 30 Aug 2004 16:05:58 -0700 From: Stephen Hemminger To: hadi@cyberus.ca Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: RFC/PATCH capture qdisc requeue event in stats Message-Id: <20040830160558.5ff0e9b2@dell_ss3.pdx.osdl.net> In-Reply-To: <1093906592.1037.32.camel@jzny.localdomain> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.camel@jzny.localdomain> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8219 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: 1105 Lines: 31 On 30 Aug 2004 18:56:32 -0400 jamal wrote: > On Mon, 2004-08-30 at 18:44, David S. Miller wrote: > > On 30 Aug 2004 18:14:48 -0400 > > jamal wrote: > > > Check the size, if it matches the older tc_stats size sans > > requeue stat addition, then don't try to reference that struct member. > > > > if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats_old)) { > > /* report everything sans requeue */ > > } else if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats)) { > > /* report all stats, including requeue */ > > } else { > > /* report error, etc. */ > > } > > Sounds reasonable to me. Some of the BSDs do this to maintain old compat > - just means keeping old struct around. Steve, agreeable to you? > > Change to both kernel and user space or just user space? I have no problem but easier to just do something: struct tc_stats mystats; memset(&mystats, 0, sizeof(mystats)); memcpy(&mystats, RTA_DATA(tb[TCA_STATS]), RTA_PAYLOAD(tb[TCA_STATS])); that way it can grow as much as we want and don't have v1, v2, v3, ... size structures. From davem@davemloft.net Mon Aug 30 16:55:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 16:55: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 i7UNtbrb027999 for ; Mon, 30 Aug 2004 16:55: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 1C1vyY-0008Oj-00; Mon, 30 Aug 2004 16:54:14 -0700 Date: Mon, 30 Aug 2004 16:54:13 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: tom@huno.net, netdev@oss.sgi.com Subject: Re: [PATCH] net_random_init needs to get seed later in boot process Message-Id: <20040830165413.1f31d7e8.davem@davemloft.net> In-Reply-To: <20040830132030.32d071d0@dell_ss3.pdx.osdl.net> References: <64243634.20040830173251@huno.net> <20040830132030.32d071d0@dell_ss3.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: 8220 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: 451 Lines: 10 On Mon, 30 Aug 2004 13:20:30 -0700 Stephen Hemminger wrote: > Argh.. random_init isn't called until the device's are initialized. > Rather than mess with random.c initialization, how about this; it resets > the net_random state late in initialization when get_random_bytes is ready. I hate this too. This is the same reason we have to play games in picking the initial hash random seed in the ipv4 routing cache, for example. From davem@redhat.com Mon Aug 30 16:57:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 16:57: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 i7UNv64f028116 for ; Mon, 30 Aug 2004 16:57:06 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7UNuuS0006920; Mon, 30 Aug 2004 19:56:56 -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 i7UNut331030; Mon, 30 Aug 2004 19:56:55 -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 i7UNun8Z031510; Mon, 30 Aug 2004 19:56:49 -0400 Date: Mon, 30 Aug 2004 16:55:51 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] netem - distribution table fixes. Message-Id: <20040830165551.69979bfb.davem@redhat.com> In-Reply-To: <20040830135717.1f4a3af0@dell_ss3.pdx.osdl.net> References: <20040830135717.1f4a3af0@dell_ss3.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: 8221 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: 625 Lines: 14 On Mon, 30 Aug 2004 13:57:17 -0700 Stephen Hemminger wrote: > Fix some issues with netem. > * fix memory link in q_destroy where distribution table not freed > * fix math error in tabledist that made it work for only small values > * change API for distribution table so scaling factor is constant and > table size is determined by looking at the rtnetlink payload size. > this is faster and simpler. Since haven't actually released the tools to load > the table yet, this is the chance to get it right ;-) > > Signed-off-by: Stephen Hemminger Looks good, applied. From davem@davemloft.net Mon Aug 30 16:58:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 16:58: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 i7UNwClA028386 for ; Mon, 30 Aug 2004 16:58: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 1C1w1E-0008PU-00; Mon, 30 Aug 2004 16:57:00 -0700 Date: Mon, 30 Aug 2004 16:57:00 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] netem - distribution table fixes. Message-Id: <20040830165700.196e277e.davem@davemloft.net> In-Reply-To: <20040830145733.52171883@dell_ss3.pdx.osdl.net> References: <20040830135717.1f4a3af0@dell_ss3.pdx.osdl.net> <20040830145733.52171883@dell_ss3.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: 8222 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: 8 On Mon, 30 Aug 2004 14:57:33 -0700 Stephen Hemminger wrote: > This patch updates 2.4 to match the latest 2.6 (Friday and Monday's patches). > > Signed-off-by: Stephen Hemminger Great, applied. From davem@davemloft.net Mon Aug 30 17:00:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 17:00:09 -0700 (PDT) Received: from smtp108.mail.sc5.yahoo.com (smtp108.mail.sc5.yahoo.com [66.163.170.6]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7V002Yb028906 for ; Mon, 30 Aug 2004 17:00:03 -0700 Received: from unknown (HELO cheetah.davemloft.net) (davem?330@63.197.226.105 with login) by smtp108.mail.sc5.yahoo.com with SMTP; 30 Aug 2004 23:59:54 -0000 Date: Mon, 30 Aug 2004 16:58:51 -0700 From: "David S. Miller" To: Eric Lemoine Cc: hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] Allow setting dev->weight using ip(8) Message-Id: <20040830165851.64cf8822.davem@davemloft.net> In-Reply-To: <5cac192f0408300735f05aa2d@mail.gmail.com> References: <5cac192f040830035669628d1@mail.gmail.com> <1093868860.1075.573.camel@jzny.localdomain> <1093869740.1076.587.camel@jzny.localdomain> <5cac192f0408300735f05aa2d@mail.gmail.com> Organization: DaveM Loft Enterprises X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8223 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: 542 Lines: 18 On Mon, 30 Aug 2004 16:35:57 +0200 Eric Lemoine wrote: > > As Dave pointed out any new attributes go to the end of the enumeration. > > It may not matter in this case if Dave hasnt applied Thomas' patch. > > Otherwise IFLA_WEIGHT should be last. > > Right. > > New patch attached. Please make a patch against Linus's current tree. I put the rest of your rtnetlink device interface changes in, and your patches here duplicate all of that. I agree also with Jamel wrt. ioctl(), let's not go there if possible. :-) From davem@davemloft.net Mon Aug 30 17:15:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 17:15: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 i7V0Fm4c029784 for ; Mon, 30 Aug 2004 17:15: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 1C1wIH-0008Qx-00 for ; Mon, 30 Aug 2004 17:14:37 -0700 Date: Mon, 30 Aug 2004 17:14:36 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Subject: ipmr_get_route() Message-Id: <20040830171436.145e3869.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: 8224 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: 634 Lines: 18 This is very broken. It gets called only by rt_fill_info() to get multicast routing information from ipmr.c, the skb it passes in is the rtnetlink message. But look at what ipmr_get_route() actually does. If the cache entry cannot be found, it tries to build an IPV4 packet using this packet to resolve the missing cache entry! I think we don't crash here only because most of the time the user has not specified an explicit input interface in the route lookup request, and therefore skb->dev is NULL when ipmr_get_route() takes a look at it. Nevertheless things are seriously busted here. Any takers to fix this thing up? :-) From davem@redhat.com Mon Aug 30 17:21:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 17:21: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 i7V0Lhs6030166 for ; Mon, 30 Aug 2004 17:21:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7V0LXS0011775; Mon, 30 Aug 2004 20:21:33 -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 i7V0LX302446; Mon, 30 Aug 2004 20:21:33 -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 i7V0LQmI003292; Mon, 30 Aug 2004 20:21:27 -0400 Date: Mon, 30 Aug 2004 17:20:29 -0700 From: "David S. Miller" To: Pablo Neira Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: [PATCH] Improve behaviour of Netlink Sockets Message-Id: <20040830172029.164fcf9c.davem@redhat.com> In-Reply-To: <413276D9.9080303@eurodev.net> References: <412DF807.2040703@eurodev.net> <20040826141407.38b56729.davem@redhat.com> <412EB40A.6010100@eurodev.net> <20040826214710.5e322f1a.davem@redhat.com> <412F1269.8090303@eurodev.net> <20040827172736.543dbd54.davem@redhat.com> <413276D9.9080303@eurodev.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: 8225 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: 354 Lines: 14 On Mon, 30 Aug 2004 02:37:45 +0200 Pablo Neira wrote: > Attached the 2.4.x version. It just spawns one kernel thread called > netlink, is it ok? It's fine, I'm going to make 2 minor fixes: 1) Mark netlink_thread() function static. 2) Name the thread "knetlinkd" to be consistent with other kernel thread names. Thanks Pablo. From ramalhais@serrado.net Mon Aug 30 17:50:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 17:50:11 -0700 (PDT) Received: from asterix.uninova.pt (asterix.uninova.pt [193.137.127.65]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7V0o3od031467 for ; Mon, 30 Aug 2004 17:50:04 -0700 Received: (qmail 6379 invoked from network); 31 Aug 2004 00:49:51 -0000 Received: from d160010.lra.net.kpnqwest.pt (193.126.160.10) by asterix.uninova.pt with SMTP; 31 Aug 2004 00:49:51 -0000 Subject: Re: Updated WE-18 (WPA) proposal From: Pedro Ramalhais To: Jouni Malinen Cc: Jean Tourrilhes , netdev@oss.sgi.com, hostap@shmoo.com In-Reply-To: <20040830045441.GA7415@jm.kir.nu> References: <20040830045441.GA7415@jm.kir.nu> Content-Type: text/plain Message-Id: <1093913355.1487.10.camel@rootix> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 31 Aug 2004 01:49:47 +0100 Content-Transfer-Encoding: 7bit X-archive-position: 8226 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ramalhais@serrado.net Precedence: bulk X-list: netdev Content-Length: 3444 Lines: 72 On Mon, 2004-08-30 at 05:54, Jouni Malinen wrote: > Finally, I had enough time to implement and test the proposed WE-18 > (WPA) changes with Host AP driver and wpa_supplicant. This testing was > indeed needed since number of issues showed up. I have made an updated > version of the WE-18 proposal that seems to work with > hostap and wpa_supplicant (current development snapshot from > http://hostap/epitest.fi/). I have not yet verified how much of > interface needed for hostapd could be moved to these new parts of WE-18 > instead of the currently used private ioctls. > > Since WE-17 has apparently not yet been merged all the way into > linux-2.6 tree, the patch below is against Linux 2.6.8.1 that has been > patched with WE-17 patch (http://www.hpl.hp.com/personal/ > Jean_Tourrilhes/Linux/iw268_we17-10.diff). This should be quite close > to what the final WE-18 would be diffed against. This WE-18 patch is > still experimental and it may still need to be changed (i.e., this > should not yet be merged into linux-2.6). > > Change log against the latest WE-18 proposal (http://www.hpl.hp.com/ > personal/Jean_Tourrilhes/Linux/iw_we18-3.diff): > > - replaced optional parameter (iw_point) to SIOCSIWSCAN with a new ioctl > (SIOCSIWSCANEXT) since the previous design was not really backwards > compatible (e.g., 'iwlist wlan0 scan' did not work) > - replaced IWEVWPAIE/IWEVRSNIE with more generic IWEVGENIE which can > also be used with non-WPA (e.g., IEEE 802.11e/WMM) IEs; in addition, > fixed the type for this event to be IW_HEADER_TYPE_POINT (was _PARAM) > - use larger IW_GENERIC_IE_MAX (256->1024) to be able to handle possible > needs for future IEEE 802.11 amendments > - added new IW_AUTH_INDEX parameters IW_AUTH_WPA_ENABLED and > IW_AUTH_RX_UNENCRYPTED_EAPOL that were missing from the functionality > needed by wpa_supplicant interface > - changed IW_AUTH_WPA_VERSION, IW_AUTH_PAIRWISE_CIPHER, > IW_AUTH_GROUP_CIPHER, and IW_AUTH_KEY_MGMT to bit fields > - added LEAP to IW_AUTH_80211_AUTH_ALG values > - added IW_ENCODE_EXT_SET_TX_KEY (set key value and mark key as default > TX key with one ioctl) > - added some more comments to areas that were unclear (have generated > questions) > - added min_tokens values for SIOCSIWENCODEEXT and SIOCGIWENCODEEXT > > Question: is length field in struct iw_point in bytes or tokens > (token_size bytes)? I assumed it was in bytes, but this did not work > very well with WE ioctls that had token_size != 1; I made SIOCSIWSCANEXT > use token_size = 1 for now, but it could be replaced to be > sizeof(struct) and min_tokens=max_tokesn=1 once this question is > resolved. Hi Jouni and Jean! #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 I think this define isn't needed because you can get the same information from IW_AUTH_KEY_MGMT: #define IW_AUTH_KEY_MGMT_802_1X 1 #define IW_AUTH_KEY_MGMT_PSK 2 because if IW_AUTH_KEY_MGMT_802_1X || IW_AUTH_KEY_MGMT_PSK , then you want to pass unencrypted EAPOL packets. Likewise for IW_AUTH_WPA_ENABLED which you can get from IW_AUTH_WPA_VERSION: /* IW_AUTH_WPA_VERSION values */ #define IW_AUTH_WPA_VERSION_DISABLED 0 #define IW_AUTH_WPA_VERSION_WPA 1 #define IW_AUTH_WPA_VERSION_WPA2 2 If IW_AUTH_WPA_VERSION == IW_AUTH_WPA_VERSION_DISABLED then WPA is disabled, else if IW_AUTH_WPA_VERSION_WPA || IW_AUTH_WPA_VERSION_WPA2 then it's enabled. Thanks! -- Pedro Ramalhais From jm@jm.kir.nu Mon Aug 30 18:33:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 18:33:34 -0700 (PDT) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7V1XT03000663 for ; Mon, 30 Aug 2004 18:33:29 -0700 Received: from jm by jm.kir.nu with local (Exim 4.34) id 1C1xU3-00024m-42; Mon, 30 Aug 2004 18:30:51 -0700 Date: Mon, 30 Aug 2004 18:30:51 -0700 From: Jouni Malinen To: Pedro Ramalhais Cc: Jean Tourrilhes , netdev@oss.sgi.com, hostap@shmoo.com Subject: Re: Updated WE-18 (WPA) proposal Message-ID: <20040831013050.GA7360@jm.kir.nu> Mail-Followup-To: Pedro Ramalhais , Jean Tourrilhes , netdev@oss.sgi.com, hostap@shmoo.com References: <20040830045441.GA7415@jm.kir.nu> <1093913355.1487.10.camel@rootix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1093913355.1487.10.camel@rootix> User-Agent: Mutt/1.5.6i X-archive-position: 8227 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkmaline@cc.hut.fi Precedence: bulk X-list: netdev Content-Length: 1451 Lines: 33 On Tue, Aug 31, 2004 at 01:49:47AM +0100, Pedro Ramalhais wrote: > #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 > I think this define isn't needed because you can get the same > information from IW_AUTH_KEY_MGMT: > #define IW_AUTH_KEY_MGMT_802_1X 1 > #define IW_AUTH_KEY_MGMT_PSK 2 > because if IW_AUTH_KEY_MGMT_802_1X || IW_AUTH_KEY_MGMT_PSK , then you > want to pass unencrypted EAPOL packets. IW_AUTH_KEY_MGMT was added to support NDIS-like drivers that want to generate WPA IE internally. Many drivers, e.g., Host AP, do not use them at all. Consequently, I wanted to have a separate parameter for this particular case. Drivers do not need to implement support for both cases. > Likewise for IW_AUTH_WPA_ENABLED which you can get from > IW_AUTH_WPA_VERSION: > /* IW_AUTH_WPA_VERSION values */ > #define IW_AUTH_WPA_VERSION_DISABLED 0 > #define IW_AUTH_WPA_VERSION_WPA 1 > #define IW_AUTH_WPA_VERSION_WPA2 2 > If IW_AUTH_WPA_VERSION == IW_AUTH_WPA_VERSION_DISABLED then WPA is > disabled, else if IW_AUTH_WPA_VERSION_WPA || IW_AUTH_WPA_VERSION_WPA2 > then it's enabled. This is not the same. IW_AUTH_WPA_ENABLED is used to configure the driver in WPA mode before any scan requests whereas IW_AUTH_WPA_VERSION is used only after the scan requests. Drivers are free to not implement IW_AUTH_WPA_ENABLED handler if they are always in "WPA mode". -- Jouni Malinen PGP id EFC895FA From laforge@netfilter.org Mon Aug 30 18:38:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 18:39:07 -0700 (PDT) Received: from coruscant.gnumonks.org (mail@coruscant.franken.de [193.174.159.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7V1cwfw001063 for ; Mon, 30 Aug 2004 18:38:59 -0700 Received: from [192.168.200.2] (helo=sunbeam.gnumonks.org) by coruscant.gnumonks.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.20) id 1C1xbl-0008B3-Pp; Tue, 31 Aug 2004 03:38:50 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1C1xbe-0004ZD-0k; Tue, 31 Aug 2004 03:38:42 +0200 Date: Tue, 31 Aug 2004 03:38:42 +0200 From: Harald Welte To: "David S. Miller" Cc: netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831013841.GA5824@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , "David S. Miller" , netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com References: <20040830201957.GY5824@sunbeam.de.gnumonks.org> <20040830140729.7309ecc0.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZrqbukKJvfR9Lgmd" Content-Disposition: inline In-Reply-To: <20040830140729.7309ecc0.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8228 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: 2903 Lines: 76 --ZrqbukKJvfR9Lgmd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for your quick reply, Dave. On Mon, Aug 30, 2004 at 02:07:29PM -0700, David S. Miller wrote: > The original idea was that if the input route relookup sends us > to a different device, something is very strange. >=20 > Input routing looks up using daddr/saddr/tos as the key. The change > here is that we're now using the fwmark, so you're right that only > policy routing can cause this thing to trigger. and it apparently happens in a lot of 'typical' setups where you have a masqueraded DSL line with dynamic ip address for bulk traffic, and fwmark-based routing through one or more tunnel interfaces, optionally with different masqerading/SNAT. Also, the MASQUERADE lookup (obviously) has no more saddr in the lookup, that's another difference from the 'original' lookup. > Where did this check some from? From this change below, and the > changelog explains why we do things this way. >=20 > I know you don't use BK Harald, but things like this are why you should > at least use the web based interface to look at file change history. Thanks Dave, I did look up the bk web interface on this item before sending this post ;) However > # It can screw up the things a lot.=20 does not really give me an understanding of why and where it might screw up. I really want to fully understand this issue before proposing any change. > # In this context, if you want to be sure that packet will go out > # expected interface you do plain lookup and drop packet if it gave > # you some strange route. That is the presumption I am about to challenge. Is the 'original' interface really the one we want in this case?=20 I've seen a number of users commenting out that check or even starting to use the iptables ROUTE target (ugly) to get it working in their setup. Or they start to use SNAT with scripts in PPP if-up to update the ruleset with the new dynamic IP :( --=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 --ZrqbukKJvfR9Lgmd 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) iD8DBQFBM9ahXaXGVTD0i/8RAs7XAJ97y+WpnkndVyWUPKco8dmaDvc2zwCdGsRk m21X4boa6tb0OS/Ru0WaXwQ= =ca0m -----END PGP SIGNATURE----- --ZrqbukKJvfR9Lgmd-- From hadi@cyberus.ca Mon Aug 30 18:43:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 18:43:38 -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 i7V1hSwB001444 for ; Mon, 30 Aug 2004 18:43:30 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1C1xg8-00077b-LY for netdev@oss.sgi.com; Mon, 30 Aug 2004 21:43:20 -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 1C1xg5-0001xn-Iq; Mon, 30 Aug 2004 21:43:17 -0400 Subject: Re: RFC/PATCH capture qdisc requeue event in stats From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com, shemminger@osdl.org In-Reply-To: <20040830160052.548c4846.davem@redhat.com> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.camel@jzny.localdomain> <20040830160052.548c4846.davem@redhat.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093916592.1037.51.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Aug 2004 21:43:13 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8229 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: 2034 Lines: 56 On Mon, 2004-08-30 at 19:00, David S. Miller wrote: > On 30 Aug 2004 18:56:32 -0400 > jamal wrote: > > > Sounds reasonable to me. Some of the BSDs do this to maintain old compat > > - just means keeping old struct around. Steve, agreeable to you? > > > > Change to both kernel and user space or just user space? > > But this takes care of 'tc' only. What about other programs > grabbing TC_STATS? The whole world of netlink is not the > iproute2 tree. Agreed. Note, however the only time it wont work was case for 4) old kernel + new tc --> will bomb (sizeof check will fail) s/tc/randomnetlinkapp i.e old apps will continue to work. We could probably impose some rules like the code you posted. I actually only see reason to keep old_tc_stats in user space only. New apps wanting to support old structures must copy them. > Maybe instead we should create TC_STATS2? That's a lot of > work just to add this one new statistic, I must say. That too - it will mean keeping both old and new in user space and kernel. It is from an ABI perspective cleaner than the first one. Not sure if it is worth for this one element in a structure. Theres also already the *_XSTAS which is supposed to be a speacial non generic stat that could be used to transport the requeue it just seems to be such a waste to use it for transporting a sinle 32 bit value (which just happens to be generic for qdiscs). It would also involve more code overall. One of these days i will code the discovery thoughts i have been having. Just ask the kernel what it has and we are set. On Mon, 2004-08-30 at 19:05, Stephen Hemminger wrote: > I have no problem but easier to just do something: > struct tc_stats mystats; > > memset(&mystats, 0, sizeof(mystats)); > memcpy(&mystats, RTA_DATA(tb[TCA_STATS]), RTA_PAYLOAD(tb[TCA_STATS])); > > that way it can grow as much as we want and don't have v1, v2, v3, ... > size structures. Not sure i parsed that. You mean the tc_stats in user space will be the new one. cheers, jamal From davem@redhat.com Mon Aug 30 19:17:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:17: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 i7V2HZA6002860 for ; Mon, 30 Aug 2004 19:17:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7V2HIS0003476; Mon, 30 Aug 2004 22:17:18 -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 i7V2HI322687; Mon, 30 Aug 2004 22:17:18 -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 i7V2HBMr027947; Mon, 30 Aug 2004 22:17:11 -0400 Date: Mon, 30 Aug 2004 19:17:16 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, shemminger@osdl.org Subject: Re: RFC/PATCH capture qdisc requeue event in stats Message-Id: <20040830191716.0d002f91.davem@redhat.com> In-Reply-To: <1093916592.1037.51.camel@jzny.localdomain> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.camel@jzny.localdomain> <20040830160052.548c4846.davem@redhat.com> <1093916592.1037.51.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: 8230 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: 614 Lines: 19 On 30 Aug 2004 21:43:13 -0400 jamal wrote: > On Mon, 2004-08-30 at 19:05, Stephen Hemminger wrote: > > > I have no problem but easier to just do something: > > struct tc_stats mystats; > > > > memset(&mystats, 0, sizeof(mystats)); > > memcpy(&mystats, RTA_DATA(tb[TCA_STATS]), RTA_PAYLOAD(tb[TCA_STATS])); > > > > that way it can grow as much as we want and don't have v1, v2, v3, ... > > size structures. > > Not sure i parsed that. You mean the tc_stats in user space will be the new > one. Yes, that's his idea. This way on older kernel the "new" statistics just show up as zero. From davem@davemloft.net Mon Aug 30 19:19:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:19: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 i7V2JZEq003176 for ; Mon, 30 Aug 2004 19:19: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 1C1yEt-0000Ij-00; Mon, 30 Aug 2004 19:19:15 -0700 Date: Mon, 30 Aug 2004 19:19:15 -0700 From: "David S. Miller" To: Harald Welte Cc: netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-Id: <20040830191915.04d49268.davem@davemloft.net> In-Reply-To: <20040831013841.GA5824@sunbeam.de.gnumonks.org> References: <20040830201957.GY5824@sunbeam.de.gnumonks.org> <20040830140729.7309ecc0.davem@davemloft.net> <20040831013841.GA5824@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: 8231 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: 869 Lines: 26 On Tue, 31 Aug 2004 03:38:42 +0200 Harald Welte wrote: > Thanks for your quick reply, Dave. Was this one quicker? :) > > # It can screw up the things a lot. > > does not really give me an understanding of why and where it might screw > up. I really want to fully understand this issue before proposing any > change. > > > # In this context, if you want to be sure that packet will go out > > # expected interface you do plain lookup and drop packet if it gave > > # you some strange route. > > That is the presumption I am about to challenge. Is the 'original' > interface really the one we want in this case? Good question. What Alexey appears to be objecting to, exactly, is how Rusty added a specific output device specifier to the flow key for route lookup. I think the check can be removed. If someone screams, we'll revisit. From herbert@gondor.apana.org.au Mon Aug 30 19:21:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:22:01 -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 i7V2Lp5q003495 for ; Mon, 30 Aug 2004 19:21:52 -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 1C1yGs-0008Hm-00; Tue, 31 Aug 2004 12:21:18 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C1yGT-000859-00; Tue, 31 Aug 2004 12:20:53 +1000 From: Herbert Xu To: laforge@netfilter.org (Harald Welte) Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Cc: davem@davemloft.net, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Organization: Core In-Reply-To: <20040831013841.GA5824@sunbeam.de.gnumonks.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Tue, 31 Aug 2004 12:20:53 +1000 X-archive-position: 8232 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: 857 Lines: 20 Harald Welte wrote: > > I've seen a number of users commenting out that check or even starting > to use the iptables ROUTE target (ugly) to get it working in their > setup. Or they start to use SNAT with scripts in PPP if-up to update > the ruleset with the new dynamic IP :( Yes I had to convert all my MASQUERADE rules over to SNAT due to this problem. Unfortunately I had to convert them back again because SNAT doesn't do an automatic flush which MASQUERADE does. Without the flush it's pretty useless when your interface address changes often. So it would be good to know why the oif key is a bad idea. 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 davem@davemloft.net Mon Aug 30 19:25:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:25: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 i7V2PROn003844 for ; Mon, 30 Aug 2004 19:25: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 1C1yKR-0000JU-00; Mon, 30 Aug 2004 19:24:59 -0700 Date: Mon, 30 Aug 2004 19:24:58 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-Id: <20040830192458.1476df60.davem@davemloft.net> In-Reply-To: References: <20040831013841.GA5824@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: 8233 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: 288 Lines: 8 On Tue, 31 Aug 2004 12:20:53 +1000 Herbert Xu wrote: > So it would be good to know why the oif key is a bad idea. I'm OK with removing the oif check, but I'm not OK with the idea of specifying a specific output interface in the route lookup flow key here. From herbert@gondor.apana.org.au Mon Aug 30 19:33:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:34:01 -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 i7V2Xq9O004284 for ; Mon, 30 Aug 2004 19:33: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 1C1ySk-0008L5-00; Tue, 31 Aug 2004 12:33:34 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C1yRs-00086x-00; Tue, 31 Aug 2004 12:32:40 +1000 From: Herbert Xu To: davem@davemloft.net (David S. Miller) Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Organization: Core In-Reply-To: <20040830191915.04d49268.davem@davemloft.net> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Tue, 31 Aug 2004 12:32:40 +1000 X-archive-position: 8235 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: 1591 Lines: 42 David S. Miller wrote: > > Good question. > > What Alexey appears to be objecting to, exactly, is how Rusty added > a specific output device specifier to the flow key for route lookup. > > I think the check can be removed. If someone screams, we'll revisit. I don't think removing the check fixes the problem. If the route does go to a different interface the source address may be completely bogus for the original packet. This is what happens: * Forwarded packet is routed to iface1. * Packet hits MASQUERADE. * Routing lookup returns iface2 with different source address. So if iface2's source address is not valid when the packet leaves on iface1, then the packet won't go very far. If you're wondering why the second lookup is returning a different interface at all, it's because the routing lookup in MASQUERADE is done as if the packet was generated by localhost. This is obviously going to differ from the normal routing lookup if the packet was forwarded. The most common scenario for this is multiple nexthops in your default route. The first lookup will return iface1, but the second lookup may return a different nexthop. As it stands that packet is dropped which is no good. But removing the check just sends the packet out of iface1 with iface2's address which isn't much better depending on your ISP's filtering policy. 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 Mon Aug 30 19:33:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:33:59 -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 i7V2XlW3004282 for ; Mon, 30 Aug 2004 19:33: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 1C1ySd-0008L6-00; Tue, 31 Aug 2004 12:33:27 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C1ySY-00087S-00; Tue, 31 Aug 2004 12:33:22 +1000 Date: Tue, 31 Aug 2004 12:33:22 +1000 To: "David S. Miller" Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831023322.GA31201@gondor.apana.org.au> References: <20040831013841.GA5824@sunbeam.de.gnumonks.org> <20040830192458.1476df60.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040830192458.1476df60.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8234 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: 619 Lines: 16 On Mon, Aug 30, 2004 at 07:24:58PM -0700, David S. Miller wrote: > On Tue, 31 Aug 2004 12:20:53 +1000 > Herbert Xu wrote: > > > So it would be good to know why the oif key is a bad idea. > > I'm OK with removing the oif check, but I'm not OK with the > idea of specifying a specific output interface in the > route lookup flow key here. Can you please give a reason for that? -- 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 hadi@cyberus.ca Mon Aug 30 19:37:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 19:37:23 -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 i7V2bH0q004956 for ; Mon, 30 Aug 2004 19:37:18 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1C1yWD-0003CJ-Po for netdev@oss.sgi.com; Mon, 30 Aug 2004 22:37:09 -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 1C1yWB-0007TA-N6; Mon, 30 Aug 2004 22:37:07 -0400 Subject: Re: RFC/PATCH capture qdisc requeue event in stats From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com, shemminger@osdl.org In-Reply-To: <20040830191716.0d002f91.davem@redhat.com> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.camel@jzny.localdomain> <20040830160052.548c4846.davem@redhat.com> <1093916592.1037.51.camel@jzny.localdomain> <20040830191716.0d002f91.davem@redhat.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093919823.1043.80.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Aug 2004 22:37:03 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8236 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: 539 Lines: 18 On Mon, 2004-08-30 at 22:17, David S. Miller wrote: > On 30 Aug 2004 21:43:13 -0400 > jamal wrote: > > Not sure i parsed that. You mean the tc_stats in user space will be the new > > one. > > Yes, that's his idea. This way on older kernel the "new" statistics > just show up as zero. thmart. Lets go with this then. Steve, do you wanna take it from here with the iproute2 patch i sent or you want me to generate a new one? Now how do we tell all other people who have written netlink apps to beware? cheers, jamal From davem@davemloft.net Mon Aug 30 21:29:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 21:29: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 i7V4TMIo010455 for ; Mon, 30 Aug 2004 21:29: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 1C20Gc-0000OP-00; Mon, 30 Aug 2004 21:29:10 -0700 Date: Mon, 30 Aug 2004 21:29:10 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, shemminger@osdl.org Subject: Re: RFC/PATCH capture qdisc requeue event in stats Message-Id: <20040830212910.78047bcd.davem@davemloft.net> In-Reply-To: <1093919823.1043.80.camel@jzny.localdomain> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.camel@jzny.localdomain> <20040830160052.548c4846.davem@redhat.com> <1093916592.1037.51.camel@jzny.localdomain> <20040830191716.0d002f91.davem@redhat.com> <1093919823.1043.80.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: 8237 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: 915 Lines: 23 On 30 Aug 2004 22:37:03 -0400 jamal wrote: > thmart. Lets go with this then. Steve, do you wanna take it from here > with the iproute2 patch i sent or you want me to generate a new one? Now > how do we tell all other people who have written netlink apps > to beware? Yeah, how are you going to "tell those other people"? And how are you going to get every user to know to upgrade all of those apps when they try to use a kernel with your patch applied? Look, let's get real about this topic. We can't be breaking shit like this all the time. We're nearly letting it happen a lot lately. These data structures are user visible APIs, they are just like system call data structures, and if we cannot modify them without potentially breaking some existing application we cannot make that change. So please find another way to add make this statistic visible to userspace Jamal. Thanks a lot. From davem@davemloft.net Mon Aug 30 22:42:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 22:43: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 i7V5gwHE015766 for ; Mon, 30 Aug 2004 22:42: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 1C21MW-0000Ra-00; Mon, 30 Aug 2004 22:39:20 -0700 Date: Mon, 30 Aug 2004 22:39:20 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-Id: <20040830223920.1db0d5ae.davem@davemloft.net> In-Reply-To: References: <20040830191915.04d49268.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: 8238 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: 800 Lines: 22 On Tue, 31 Aug 2004 12:32:40 +1000 Herbert Xu wrote: > This is what happens: > > * Forwarded packet is routed to iface1. > * Packet hits MASQUERADE. > * Routing lookup returns iface2 with different source address. > > So if iface2's source address is not valid when the packet leaves on > iface1, then the packet won't go very far. > > If you're wondering why the second lookup is returning a different > interface at all, it's because the routing lookup in MASQUERADE is > done as if the packet was generated by localhost. This is obviously > going to differ from the normal routing lookup if the packet was > forwarded. I understand this description. Would it be enough to set 'out' to rt->u.dst.dev after the call to ip_route_output_key() in ipt_MASQUERADE.c? From davem@davemloft.net Mon Aug 30 23:08:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 23:08: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 i7V68hsh022690 for ; Mon, 30 Aug 2004 23:08: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 1C21oa-0000Tm-00; Mon, 30 Aug 2004 23:08:20 -0700 Date: Mon, 30 Aug 2004 23:08:20 -0700 From: "David S. Miller" To: Herbert Xu Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: neigh_create/inetdev_destroy race? Message-Id: <20040830230820.7514985d.davem@davemloft.net> In-Reply-To: <20040829065031.GA786@gondor.apana.org.au> References: <20040814003428.GA17760@gondor.apana.org.au> <20040813173924.6d05be15.davem@redhat.com> <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040814062703.GA4806@gondor.apana.org.au> <20040815191450.77532d5d.davem@redhat.com> <20040816105131.GA11299@gondor.apana.org.au> <20040828234201.79556f6e.davem@davemloft.net> <20040829065031.GA786@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: 8239 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: 600 Lines: 15 On Sun, 29 Aug 2004 16:50:31 +1000 Herbert Xu wrote: > > Secondly, until neigh_create() takes the tbl lock, it is not in > > the hash tables and therefore neigh_ifdown() could not see it. > > That part I agree with :) That's in fact what this race is about: > neigh_ifdown does not guarantee that the hash table will be without > references to idev. I think we can clear this by putting neigh_parms_release() into an RCU handler. It can't be in in_dev_rcu_put. I also now believe that these sorts of races you are mentioning percolate out into ip_mc_destroy_dev(). From herbert@gondor.apana.org.au Mon Aug 30 23:47:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 23:47: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 i7V6lGSo023988 for ; Mon, 30 Aug 2004 23:47: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 1C22Mt-00014O-00; Tue, 31 Aug 2004 16:43:47 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C22Mj-0008Ud-00; Tue, 31 Aug 2004 16:43:37 +1000 Date: Tue, 31 Aug 2004 16:43:37 +1000 To: "David S. Miller" Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831064337.GA32614@gondor.apana.org.au> References: <20040830191915.04d49268.davem@davemloft.net> <20040830223920.1db0d5ae.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040830223920.1db0d5ae.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8241 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: 1507 Lines: 38 On Mon, Aug 30, 2004 at 10:39:20PM -0700, David S. Miller wrote: > > > If you're wondering why the second lookup is returning a different > > interface at all, it's because the routing lookup in MASQUERADE is > > done as if the packet was generated by localhost. This is obviously > > going to differ from the normal routing lookup if the packet was > > forwarded. > > I understand this description. > > Would it be enough to set 'out' to rt->u.dst.dev after the call to > ip_route_output_key() in ipt_MASQUERADE.c? Unfortunately no. You see the result of ip_route_output_key() is not used at all so you can set rt->u.dst.dev all you like and it isn't going to make any difference :) The only reason we're making that call in MASQUERADE is so that we can get the source address from the resulting dst. Now if the dst is pointing to the wrong device, then that source address may be invalid. In fact I wonder if Alexey was aware of the fact that this dst is not going to be used for routing the packet. It's thrown away immediately after we get the source address. In this case I really don't see what's wrong with setting oif in the key. In fact that's exactly what we want to do: Get the preferred source address when the localhost is going to send a packet to *that* device. 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 ja@ssi.bg Mon Aug 30 23:46:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 30 Aug 2004 23:47:03 -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 i7V6krZk023942 for ; Mon, 30 Aug 2004 23:46:55 -0700 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i7V6m7Cj009352; Tue, 31 Aug 2004 09:48:08 +0300 Date: Tue, 31 Aug 2004 09:48:07 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: "David S. Miller" cc: Herbert Xu , laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") In-Reply-To: <20040830223920.1db0d5ae.davem@davemloft.net> Message-ID: References: <20040830191915.04d49268.davem@davemloft.net> <20040830223920.1db0d5ae.davem@davemloft.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8240 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: 1091 Lines: 39 Hello, On Mon, 30 Aug 2004, David S. Miller wrote: > > If you're wondering why the second lookup is returning a different > > interface at all, it's because the routing lookup in MASQUERADE is > > done as if the packet was generated by localhost. This is obviously > > going to differ from the normal routing lookup if the packet was > > forwarded. > > I understand this description. > > Would it be enough to set 'out' to rt->u.dst.dev after the call to > ip_route_output_key() in ipt_MASQUERADE.c? I think, the picture is: Packet 1: - input route (before NAT) => dev1 - MASQUERADE => autoselect public IP, try to use dev1 (same GW) as already selected from input route Packet 2..n: - input route (before NAT) => cached dev1 (until routing/cache changes) So, if the input route for all packets selects dev1 before NAT but MASQUERADE selects different device (nexthop) bad things happen. It costs routing cache entries to provide oif key but almost in any case the right gateway is selected (except when two nexthops use same device). Regards -- Julian Anastasov From herbert@gondor.apana.org.au Tue Aug 31 00:10:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 00:11: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 i7V7AoMX025552 for ; Tue, 31 Aug 2004 00:10: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 1C22dN-0001DF-00; Tue, 31 Aug 2004 17:00:49 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C22dH-00005U-00; Tue, 31 Aug 2004 17:00:43 +1000 Date: Tue, 31 Aug 2004 17:00:43 +1000 To: "David S. Miller" Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831070043.GA320@gondor.apana.org.au> References: <20040830191915.04d49268.davem@davemloft.net> <20040830223920.1db0d5ae.davem@davemloft.net> <20040831064337.GA32614@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040831064337.GA32614@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8242 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: 796 Lines: 20 On Tue, Aug 31, 2004 at 04:43:37PM +1000, herbert wrote: > > In this case I really don't see what's wrong with setting oif in > the key. In fact that's exactly what we want to do: Get the > preferred source address when the localhost is going to send > a packet to *that* device. Here's a better idea. Why don't we forget about the route lookup and call inet_select_addr directly? The only time when someone wants to use MASQUERADE over SNAT is when the interface carries a dynamic address. In such cases, inet_select_addr should always return the preferred address, no? 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 jgarzik@pobox.com Tue Aug 31 00:20:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 00:20: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 i7V7KEsC029162 for ; Tue, 31 Aug 2004 00:20:15 -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 1C22vz-0002QF-1A; Tue, 31 Aug 2004 08:20:03 +0100 Message-ID: <41342695.5030100@pobox.com> Date: Tue, 31 Aug 2004 03:19:49 -0400 From: Jeff Garzik 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: Francois Romieu CC: akpm@osdl.org, Jon Mason , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc1-mm1 1/1] r8169: DAC support fix References: <20040830220045.GB22994@electric-eye.fr.zoreil.com> In-Reply-To: <20040830220045.GB22994@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8244 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 Tue Aug 31 00:20:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 00:20: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 i7V7KG7Y029167 for ; Tue, 31 Aug 2004 00:20: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 1C22w3-0002QG-3x; Tue, 31 Aug 2004 08:20:07 +0100 Message-ID: <4134269A.9080806@pobox.com> Date: Tue, 31 Aug 2004 03:19:54 -0400 From: Jeff Garzik 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: Francois Romieu CC: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2.6.9-rc1-mm1-tso 2/2] 8139cp: DAC support fix References: <20040829212205.GA2864@havoc.gtf.org> <20040829222831.GA9496@electric-eye.fr.zoreil.com> <41326079.9090402@pobox.com> <20040830215227.GA23857@electric-eye.fr.zoreil.com> <20040830215636.GA26455@electric-eye.fr.zoreil.com> <20040830215818.GB26455@electric-eye.fr.zoreil.com> In-Reply-To: <20040830215818.GB26455@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8243 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 Tue Aug 31 00:21:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 00:21: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 i7V7L1B2029529 for ; Tue, 31 Aug 2004 00:21:01 -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 1C22wl-0002RA-JA; Tue, 31 Aug 2004 08:20:52 +0100 Message-ID: <413426C7.8040407@pobox.com> Date: Tue, 31 Aug 2004 03:20:39 -0400 From: Jeff Garzik 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: Francois Romieu CC: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2.6.9-rc1-mm1-tso 1/2] 8139cp: SG support fixes References: <20040829212205.GA2864@havoc.gtf.org> <20040829222831.GA9496@electric-eye.fr.zoreil.com> <41326079.9090402@pobox.com> <20040830215227.GA23857@electric-eye.fr.zoreil.com> <20040830215636.GA26455@electric-eye.fr.zoreil.com> In-Reply-To: <20040830215636.GA26455@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8245 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 herbert@gondor.apana.org.au Tue Aug 31 01:27:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 01:27: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 i7V8RWDX031370 for ; Tue, 31 Aug 2004 01:27: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 1C23vd-0001jz-00; Tue, 31 Aug 2004 18:23:45 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C23vX-0000H9-00; Tue, 31 Aug 2004 18:23:39 +1000 Date: Tue, 31 Aug 2004 18:23:39 +1000 To: "David S. Miller" Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831082339.GA949@gondor.apana.org.au> References: <20040830191915.04d49268.davem@davemloft.net> <20040830223920.1db0d5ae.davem@davemloft.net> <20040831064337.GA32614@gondor.apana.org.au> <20040831070043.GA320@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <20040831070043.GA320@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8246 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: 1992 Lines: 73 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 31, 2004 at 05:00:43PM +1000, herbert wrote: > > Here's a better idea. Why don't we forget about the route lookup > and call inet_select_addr directly? Even better, why don't we use the skb->dst directly? It already contains the preferred source for the route that led us to the device. Here is an untested patch which does exactly that? Please do your best to break 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 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/netfilter/ipt_MASQUERADE.c 1.16 vs edited ===== --- 1.16/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-02 12:27:11 +10:00 +++ edited/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-31 18:21:41 +10:00 @@ -97,34 +97,13 @@ 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; - } - } + rt = (struct rtable *)(*pskb)->dst; + if (rt->fl.iif) + newsrc = rt->rt_spec_dst; + else + newsrc = rt->rt_src; - 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; --J2SCkAp4GZ/dPZZf-- From mcgrof@studorgs.rutgers.edu Tue Aug 31 01:55:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 01:55:12 -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 i7V8t64A032010 for ; Tue, 31 Aug 2004 01:55:07 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 9A45EF99BC; Tue, 31 Aug 2004 04:54:58 -0400 (EDT) Date: Tue, 31 Aug 2004 04:54:58 -0400 To: Jeff Garzik Cc: "Luis R. Rodriguez" , jt@hpl.hp.com, Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais Subject: Re: Updated WE-18 (WPA) proposal Message-ID: <20040831085458.GD31207@ruslug.rutgers.edu> Mail-Followup-To: Jeff Garzik , "Luis R. Rodriguez" , jt@hpl.hp.com, Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com, Pedro Ramalhais References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> <413363CB.7060807@pobox.com> <20040830174215.GA32132@bougret.hpl.hp.com> <41336A28.9010608@pobox.com> <20040830220105.GY22126@ruslug.rutgers.edu> <4133A811.1010009@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4133A811.1010009@pobox.com> 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: 8247 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: 1823 Lines: 48 On Mon, Aug 30, 2004 at 06:20:01PM -0400, Jeff Garzik wrote: > Luis R. Rodriguez wrote: > >On Mon, Aug 30, 2004 at 01:55:52PM -0400, Jeff Garzik wrote: > > > >>Jean Tourrilhes wrote: > > > > > ><-- snip --> > > > >>> Also, I'm not clear how the stuff in wireless-2.6 is supposed > >>>to trickle into the other trees (netdev-2.6, -mm and Linus's), and how > >>>to better link it with the CVS of the various drivers involved. > >> > >>Less of a trickle than a flood: wireless-2.6 should be the target for > >>development of shared wireless stack code. As several drivers are > >>currently using bits of HostAP, for example, wireless-2.6 should be a > >>focal point for patches that modify these drivers to instead share the > >>same code. > >> > >>Once this generic work is done, it would get pushed all at once to > >>netdev-2.6, where it would receive testing in -mm. Then, later, pushed > >>to mainline. > >> > >> Jeff > > > > > >Beides wpa_supplicant from hostap code (which is actually going into > >WE18) what other code re-use is on the roadmap as of yet for wireless-2.6? > > Intel Centrino driver is re-using chunks of HostAP, and I'm looking at > doing so for the RealTek 8180 driver I am about to publish. Can someone elaborate on what "chunks" the centrino driver is using from hostap? Jeff what aspects are you looking to re-use from hostap? I guess we at prism54 should also see what we can re-use too then. Our next driver (a softmac driver) will have a lot more code since the MAC will need to be implemented on the driver side -- I'm not yet sure of the exact details as I haven't grep'd through the available code yet I'm wondering though -- are there any other softmac drivers out there, or to come soon? Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From ja@ssi.bg Tue Aug 31 02:42:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 02:42:37 -0700 (PDT) Received: from l.himel.bg (IDENT:root@[213.91.247.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7V9gQJC004725 for ; Tue, 31 Aug 2004 02:42:28 -0700 Received: from linux.himel.bg (IDENT:ja@linux.himel.bg [127.0.0.1]) by l.himel.bg (8.11.6/8.9.3) with ESMTP id i7V9fZJ03013; Tue, 31 Aug 2004 12:41:35 +0300 Date: Tue, 31 Aug 2004 12:41:35 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@l To: Herbert Xu cc: "David S. Miller" , , , , , Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") In-Reply-To: <20040831082339.GA949@gondor.apana.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8248 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: 657 Lines: 26 Hello, On Tue, 31 Aug 2004, Herbert Xu wrote: > On Tue, Aug 31, 2004 at 05:00:43PM +1000, herbert wrote: > > > > Here's a better idea. Why don't we forget about the route lookup > > and call inet_select_addr directly? > > Even better, why don't we use the skb->dst directly? It already > contains the preferred source for the route that led us to the > device. > > Here is an untested patch which does exactly that? Please do your > best to break it :) No need for tests :) rt_spec_dst is your preferred src to the sender (your local internal IP) and rt_src is the internal IP of the sender (what we snat). Regards -- Julian Anastasov From eric.lemoine@gmail.com Tue Aug 31 02:58:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 02:58:29 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7V9wN8X005246 for ; Tue, 31 Aug 2004 02:58:24 -0700 Received: by mproxy.gmail.com with SMTP id 73so149816rnk for ; Tue, 31 Aug 2004 02:58:10 -0700 (PDT) Received: by 10.38.76.16 with SMTP id y16mr1400767rna; Tue, 31 Aug 2004 02:58:10 -0700 (PDT) Received: by 10.38.181.40 with HTTP; Tue, 31 Aug 2004 02:58:10 -0700 (PDT) Message-ID: <5cac192f04083102586e322b1a@mail.gmail.com> Date: Tue, 31 Aug 2004 11:58:10 +0200 From: Eric Lemoine Reply-To: Eric Lemoine To: "David S. Miller" Subject: Re: [PATCH] Allow setting dev->weight using ip(8) Cc: hadi@cyberus.ca, netdev@oss.sgi.com In-Reply-To: <20040830165851.64cf8822.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <5cac192f040830035669628d1@mail.gmail.com> <1093868860.1075.573.camel@jzny.localdomain> <1093869740.1076.587.camel@jzny.localdomain> <5cac192f0408300735f05aa2d@mail.gmail.com> <20040830165851.64cf8822.davem@davemloft.net> X-archive-position: 8249 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: 1643 Lines: 60 > Please make a patch against Linus's current tree. > I put the rest of your rtnetlink device interface > changes in, and your patches here duplicate all of > that. See below. > I agree also with Jamel wrt. ioctl(), let's not go > there if possible. :-) Ok. I did also go the ioctl() way because that's what iproute2-2.6.8 uses. [Dave: sorry for the sending you this twice] -- Eric ===== include/linux/rtnetlink.h 1.41 vs edited ===== --- 1.41/include/linux/rtnetlink.h Wed Aug 25 02:20:27 2004 +++ edited/include/linux/rtnetlink.h Tue Aug 31 11:22:55 2004 @@ -565,6 +565,8 @@ #define IFLA_TXQLEN IFLA_TXQLEN IFLA_MAP, #define IFLA_MAP IFLA_MAP + IFLA_WEIGHT, +#define IFLA_WEIGHT IFLA_WEIGHT __IFLA_MAX }; ===== net/core/rtnetlink.c 1.23 vs edited ===== --- 1.23/net/core/rtnetlink.c Wed Aug 25 02:20:27 2004 +++ edited/net/core/rtnetlink.c Tue Aug 31 11:27:15 2004 @@ -177,6 +177,11 @@ } if (1) { + u32 weight = dev->weight; + RTA_PUT(skb, IFLA_WEIGHT, sizeof(weight), &weight); + } + + if (1) { struct ifmap map = { .mem_start = dev->mem_start, .mem_end = dev->mem_end, @@ -331,6 +336,13 @@ goto out; dev->tx_queue_len = *((u32 *) RTA_DATA(ida[IFLA_TXQLEN - 1])); + } + + if (ida[IFLA_WEIGHT - 1]) { + if (ida[IFLA_WEIGHT - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + + dev->weight = *((u32 *) RTA_DATA(ida[IFLA_WEIGHT - 1])); } err = 0; From ak@muc.de Tue Aug 31 03:06:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 03:06:59 -0700 (PDT) Received: from zero.aec.at (Atka_Mip@zero.aec.at [193.170.194.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VA6oUf005839 for ; Tue, 31 Aug 2004 03:06:53 -0700 Received: from averell.firstfloor.org.muc.de (Martha_Braymance@localhost.localdomain [127.0.0.1]) by zero.aec.at (8.11.6/8.11.2) with ESMTP id i7VA6Ug18409; Tue, 31 Aug 2004 12:06:31 +0200 To: netdev@oss.sgi.com, davem@redhat.com Subject: [PATCH] Fix CONFIG_COMPAT with !CONFIG_NET From: Andi Kleen Date: Tue, 31 Aug 2004 12:06:30 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 8250 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@muc.de Precedence: bulk X-list: netdev Content-Length: 2485 Lines: 78 Fix compilation with CONFIG_COMPAT set and CONFIG_NET disabled. diff -urpN -X ../KDIFX linux/net/Makefile linux-2.6.8-amd64/net/Makefile --- linux/net/Makefile 2004-04-06 13:12:24.000000000 +0200 +++ linux-2.6.8-amd64/net/Makefile 2004-08-05 17:55:29.000000000 +0200 @@ -9,7 +9,8 @@ obj-y := nonet.o obj-$(CONFIG_NET) := socket.o core/ -obj-$(CONFIG_COMPAT) += compat.o +tmp-$(CONFIG_COMPAT) := compat.o +obj-$(CONFIG_NET) += $(tmp-y) # LLC has to be linked before the files in net/802/ obj-$(CONFIG_LLC) += llc/ diff -urpN -X ../KDIFX linux/fs/compat_ioctl.c linux-2.6.8-amd64/fs/compat_ioctl.c --- linux/fs/compat_ioctl.c 2004-08-15 19:45:41.000000000 +0200 +++ linux-2.6.8-amd64/fs/compat_ioctl.c 2004-08-05 17:30:20.000000000 +0200 @@ -407,6 +407,7 @@ out: return err; } +#ifdef CONFIG_NET static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg) { struct compat_timeval __user *up = compat_ptr(arg); @@ -461,7 +462,6 @@ struct ifconf32 { compat_caddr_t ifcbuf; }; -#ifdef CONFIG_NET static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg) { struct net_device *dev; @@ -481,7 +481,6 @@ static int dev_ifname32(unsigned int fd, err = copy_to_user(compat_ptr(arg), &ifr32, sizeof(ifr32)); return (err ? -EFAULT : 0); } -#endif static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg) { @@ -797,6 +796,7 @@ static int routing_ioctl(unsigned int fd return ret; } +#endif struct hd_geometry32 { unsigned char heads; @@ -1872,7 +1872,8 @@ static int do_atm_ioctl(unsigned int fd, return -EINVAL; } -static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) +static __attribute__((used)) int +ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) { return -EINVAL; } @@ -3162,7 +3163,6 @@ HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) #ifdef CONFIG_NET HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32) -#endif HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf) HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc) HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc) @@ -3206,6 +3206,7 @@ HANDLE_IOCTL(SIOCBRDELIF, dev_ifsioc) /* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */ HANDLE_IOCTL(SIOCRTMSG, ret_einval) HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp) +#endif HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo) HANDLE_IOCTL(BLKRAGET, w_long) HANDLE_IOCTL(BLKGETSIZE, w_long) From herbert@gondor.apana.org.au Tue Aug 31 03:12:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 03:13: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 i7VACo00006302 for ; Tue, 31 Aug 2004 03:12: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 1C25cW-0002WV-00; Tue, 31 Aug 2004 20:12:08 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C25cR-0000WO-00; Tue, 31 Aug 2004 20:12:03 +1000 Date: Tue, 31 Aug 2004 20:12:03 +1000 To: Julian Anastasov Cc: "David S. Miller" , laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831101203.GA1951@gondor.apana.org.au> References: <20040831082339.GA949@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8251 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: 2155 Lines: 75 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 31, 2004 at 12:41:35PM +0300, Julian Anastasov wrote: > > > Here is an untested patch which does exactly that? Please do your > > best to break it :) > > No need for tests :) rt_spec_dst is your preferred src > to the sender (your local internal IP) and rt_src is the internal > IP of the sender (what we snat). I knew it can't be that easy :) So let's go back to the previous idea of using inet_select_addr? Can you find any problems with this? In fact, it seems that the 2.2 compatibility code does exactly 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 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/netfilter/ipt_MASQUERADE.c 1.16 vs edited ===== --- 1.16/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-02 12:27:11 +10:00 +++ edited/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-31 20:08:47 +10:00 @@ -97,34 +97,12 @@ 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; - } - } + rt = (struct rtable *)(*pskb)->dst; + newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_LINK); + if (!newsrc) + 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; --YZ5djTAD1cGYuMQK-- From hno@marasystems.com Tue Aug 31 03:25:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 03:25:12 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [213.150.153.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VAP3CY006770 for ; Tue, 31 Aug 2004 03:25:06 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i7VAOYl14766; Tue, 31 Aug 2004 12:24:34 +0200 Date: Tue, 31 Aug 2004 12:24:34 +0200 (CEST) From: Henrik Nordstrom To: Harald Welte cc: "David S. Miller" , netdev@oss.sgi.com, rusty@rustcorp.com.au, netfilter-devel@lists.netfilter.org Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") In-Reply-To: <20040831013841.GA5824@sunbeam.de.gnumonks.org> Message-ID: References: <20040830201957.GY5824@sunbeam.de.gnumonks.org> <20040830140729.7309ecc0.davem@davemloft.net> <20040831013841.GA5824@sunbeam.de.gnumonks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 8252 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: 1610 Lines: 37 On Tue, 31 Aug 2004, Harald Welte wrote: > and it apparently happens in a lot of 'typical' setups where you have a > masqueraded DSL line with dynamic ip address for bulk traffic, and > fwmark-based routing through one or more tunnel interfaces, optionally > with different masqerading/SNAT. Should only happen if the routing is screwed up, in principle.. > Also, the MASQUERADE lookup (obviously) has no more saddr in the lookup, > that's another difference from the 'original' lookup. This is a possible reason why it screws up for such many people? By not including the source IP you make the route lookup for determining the MASQUERADE information very different from the route lookup when forwardning the packet. I think it would for most make more sense that the source IP assignment is based on routing using the original source address as key. What I don't get is why MASQUERADE needs to do a route lookup at all. Isn't the traffic already routed at this point, and shouldn't it simply use the source IP of the current selected route or the interface primary IP of no source IP set in the route? > That is the presumption I am about to challenge. Is the 'original' > interface really the one we want in this case? If there is policy routing saying that packets with a given source should go out another interface my opinion is that they should. I have been using SNAT in quite many complex routing setups and so far has not run into any situation where routing gets wrong in an unmanageable and unintuitive manner due to SNAT. MASQUERADE should not be more complex. Regards Henrik From herbert@gondor.apana.org.au Tue Aug 31 03:42:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 03:42: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 i7VAg8Jl007284 for ; Tue, 31 Aug 2004 03:42:10 -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 1C2659-0002mJ-00; Tue, 31 Aug 2004 20:41:43 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C2655-0000a9-00; Tue, 31 Aug 2004 20:41:39 +1000 Date: Tue, 31 Aug 2004 20:41:39 +1000 To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: neigh_create/inetdev_destroy race? Message-ID: <20040831104139.GA2124@gondor.apana.org.au> References: <20040814005411.GA18350@gondor.apana.org.au> <20040814012513.GA721@gondor.apana.org.au> <20040814013030.GA2042@gondor.apana.org.au> <20040814050848.GA11874@gondor.apana.org.au> <20040814062703.GA4806@gondor.apana.org.au> <20040815191450.77532d5d.davem@redhat.com> <20040816105131.GA11299@gondor.apana.org.au> <20040828234201.79556f6e.davem@davemloft.net> <20040829065031.GA786@gondor.apana.org.au> <20040830230820.7514985d.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040830230820.7514985d.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8253 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: 1541 Lines: 37 On Mon, Aug 30, 2004 at 11:08:20PM -0700, David S. Miller wrote: > On Sun, 29 Aug 2004 16:50:31 +1000 > Herbert Xu wrote: > > > > Secondly, until neigh_create() takes the tbl lock, it is not in > > > the hash tables and therefore neigh_ifdown() could not see it. > > > > That part I agree with :) That's in fact what this race is about: > > neigh_ifdown does not guarantee that the hash table will be without > > references to idev. > > I think we can clear this by putting neigh_parms_release() into an > RCU handler. It can't be in in_dev_rcu_put. Yes that should go a long way in resolving this problem. However it is still tricky because the neighbour table doesn't refer to idev directly. So we'll need to go through contortions to make sure that the corresponding idev is still alive when we add a neighbour with its neigh_parms to the hash table. Or better yet we should ref count the neigh_parms directly. > I also now believe that these sorts of races you are mentioning percolate > out into ip_mc_destroy_dev(). Well last time I looked at it I concluded that it was safe. It seems that the references are either held by timers who are all taken down at the very start of the destruction, or they're taken at places which are under spin locks. Did I miss something else? 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 ja@ssi.bg Tue Aug 31 03:55:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 03:55:22 -0700 (PDT) Received: from l.himel.bg (IDENT:root@[213.91.247.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VAtDjI007742 for ; Tue, 31 Aug 2004 03:55:15 -0700 Received: from linux.himel.bg (IDENT:ja@linux.himel.bg [127.0.0.1]) by l.himel.bg (8.11.6/8.9.3) with ESMTP id i7VAsLJ04681; Tue, 31 Aug 2004 13:54:21 +0300 Date: Tue, 31 Aug 2004 13:54:21 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@l To: Herbert Xu cc: "David S. Miller" , , , , , Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") In-Reply-To: <20040831101203.GA1951@gondor.apana.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8254 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: 1189 Lines: 36 Hello, On Tue, 31 Aug 2004, Herbert Xu wrote: > I knew it can't be that easy :) > > So let's go back to the previous idea of using inet_select_addr? > Can you find any problems with this? In fact, it seems that the > 2.2 compatibility code does exactly this. Yes, 2.2 worked somehow, until some users wanted more control from the routing. Now ip_fw_compat_masq.c has such call, it can be fast in some setups with small number of IPs but may be now there some setups using nfmark for selecting maddr from ISP-specific routing tables. I'm not sure we can avoid the routing and the cache pollution, we have to live with the old behavoir, not the current one. I have some related work, you can check it for more ideas: http://www.ssi.bg/~ja/#routes see dgd-usage.txt In short, I use the mpath route as a nexthop selector (on first packet), the next packets do not hit the mpath route, they feed the routing with the maddr already bound to the NAT connection. This survives cache expiration. May be using connmark is a better idea: assign nfmark to connection and route it always via same GW. But may be the oif key remains, I'm not sure. Regards -- Julian Anastasov From herbert@gondor.apana.org.au Tue Aug 31 04:16:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 04:16: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 i7VBG3VW008912 for ; Tue, 31 Aug 2004 04:16:06 -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 1C26bd-00032g-00; Tue, 31 Aug 2004 21:15:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C26bU-0000dF-00; Tue, 31 Aug 2004 21:15:08 +1000 Date: Tue, 31 Aug 2004 21:15:08 +1000 To: Julian Anastasov Cc: "David S. Miller" , laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831111508.GA2327@gondor.apana.org.au> References: <20040831101203.GA1951@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: 8255 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: 1952 Lines: 46 On Tue, Aug 31, 2004 at 01:54:21PM +0300, Julian Anastasov wrote: > > Yes, 2.2 worked somehow, until some users wanted more > control from the routing. Now ip_fw_compat_masq.c has such call, > it can be fast in some setups with small number of IPs but may > be now there some setups using nfmark for selecting maddr from > ISP-specific routing tables. I'm not sure we can avoid the routing > and the cache pollution, we have to live with the old behavoir, not > the current one. You're right. However, we can still do this without performing another routing lookup. The information is already there in the fib rule. We just didn't bother writing it down in the route for forwarded packets. So if we add a new field for the preferred source address to struct rtable then we can avoid the lookup. BTW, I'd still like to know the problem with the original oif key. It's basically saying that if you can find the correct route using the other keys (daddr/tos/mark) then all is well, if you can't (dev != out) then we'll use the best address on the outgoing interface. > I have some related work, you can check it for more ideas: > > http://www.ssi.bg/~ja/#routes > see dgd-usage.txt > > In short, I use the mpath route as a nexthop selector (on > first packet), the next packets do not hit the mpath route, they feed the > routing with the maddr already bound to the NAT connection. This survives > cache expiration. May be using connmark is a better idea: > assign nfmark to connection and route it always via same GW. But > may be the oif key remains, I'm not sure. Fortunately I'm one of those with lots of interfaces but only one IP on each. I can sympathise with your situation of many IPs but only one interface :) 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 Tue Aug 31 04:31:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 04:32: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 i7VBVvFO012954 for ; Tue, 31 Aug 2004 04:31: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 1C26pe-00038F-00; Tue, 31 Aug 2004 21:29:46 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C26pV-0000fW-00; Tue, 31 Aug 2004 21:29:37 +1000 From: Herbert Xu To: hno@marasystems.com (Henrik Nordstrom) Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Cc: laforge@netfilter.org, davem@davemloft.net, netdev@oss.sgi.com, rusty@rustcorp.com.au, netfilter-devel@lists.netfilter.org Organization: Core In-Reply-To: X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Tue, 31 Aug 2004 21:29:37 +1000 X-archive-position: 8256 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: 1770 Lines: 43 Henrik Nordstrom wrote: > > Should only happen if the routing is screwed up, in principle.. If only that were the case :) > I think it would for most make more sense that the source IP assignment is > based on routing using the original source address as key. Doesn't work because we're trying to get the correct source address from the routing lookup. > What I don't get is why MASQUERADE needs to do a route lookup at all. > Isn't the traffic already routed at this point, and shouldn't it simply > use the source IP of the current selected route or the interface primary > IP of no source IP set in the route? The problem is that we don't record the preferred source in struct rtable. It is available in the original FIB rule. So by adding a new field in struct rtable we should be able to avoid this lookup. >> That is the presumption I am about to challenge. Is the 'original' >> interface really the one we want in this case? > > If there is policy routing saying that packets with a given source > should go out another interface my opinion is that they should. Absolutely. > I have been using SNAT in quite many complex routing setups and so far has > not run into any situation where routing gets wrong in an unmanageable and > unintuitive manner due to SNAT. MASQUERADE should not be more complex. Well I took that advice and ended up with tons of broken systems because SNAT is totally broken when your IP address is dynamic. MASQUERADE flushes the conntrack rules automatically. SNAT does not. 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 laforge@netfilter.org Tue Aug 31 05:17:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 05:17:23 -0700 (PDT) Received: from coruscant.gnumonks.org (mail@coruscant.franken.de [193.174.159.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VCHGv0014227 for ; Tue, 31 Aug 2004 05:17:17 -0700 Received: from [192.168.200.2] (helo=sunbeam.gnumonks.org) by coruscant.gnumonks.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.20) id 1C27ZS-0005eL-V9; Tue, 31 Aug 2004 14:17:07 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1C27ZK-0005BH-DC; Tue, 31 Aug 2004 14:16:58 +0200 Date: Tue, 31 Aug 2004 14:16:58 +0200 From: Harald Welte To: Julian Anastasov Cc: "David S. Miller" , Herbert Xu , netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831121658.GE5824@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Julian Anastasov , "David S. Miller" , Herbert Xu , netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru References: <20040830191915.04d49268.davem@davemloft.net> <20040830223920.1db0d5ae.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BDlG3CzP/kphk9YG" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8257 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: 1693 Lines: 47 --BDlG3CzP/kphk9YG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 31, 2004 at 09:48:07AM +0300, Julian Anastasov wrote: > So, if the input route for all packets selects dev1 before > NAT but MASQUERADE selects different device (nexthop) bad things > happen. It costs routing cache entries to provide oif key but almost > in any case the right gateway is selected (except when two nexthops > use same device). I am willing to compromise at that cost. I cannot imagine a combination of dynamic IP with multiple nexthop on the same device. Getting those policy routing / DSL / dynip / MASQUERADE cases right is definitely more important. Any static IP case should be using SNAT, that's always been documented. > Regards --=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 --BDlG3CzP/kphk9YG 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) iD8DBQFBNGw6XaXGVTD0i/8RAqk7AJ98tc9bjQFDS8TJeLVlIM6H2UwA5ACeJU7U eSZ7LFrulPDIrw22eT57D+M= =2hzH -----END PGP SIGNATURE----- --BDlG3CzP/kphk9YG-- From laforge@netfilter.org Tue Aug 31 05:31:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 05:31:28 -0700 (PDT) Received: from coruscant.gnumonks.org (mail@coruscant.franken.de [193.174.159.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VCVK75015101 for ; Tue, 31 Aug 2004 05:31:20 -0700 Received: from [192.168.200.2] (helo=sunbeam.gnumonks.org) by coruscant.gnumonks.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.20) id 1C27n5-000659-Bc; Tue, 31 Aug 2004 14:31:11 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1C27mz-0005Bz-Kc; Tue, 31 Aug 2004 14:31:05 +0200 Date: Tue, 31 Aug 2004 14:31:05 +0200 From: Harald Welte To: Henrik Nordstrom Cc: "David S. Miller" , netdev@oss.sgi.com, rusty@rustcorp.com.au, netfilter-devel@lists.netfilter.org Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831123105.GF5824@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Henrik Nordstrom , "David S. Miller" , netdev@oss.sgi.com, rusty@rustcorp.com.au, netfilter-devel@lists.netfilter.org References: <20040830201957.GY5824@sunbeam.de.gnumonks.org> <20040830140729.7309ecc0.davem@davemloft.net> <20040831013841.GA5824@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VeECpbAlTmkAjas0" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8258 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: 2514 Lines: 69 --VeECpbAlTmkAjas0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 31, 2004 at 12:24:34PM +0200, Henrik Nordstrom wrote: =20 > >and it apparently happens in a lot of 'typical' setups where you have a >=20 > Should only happen if the routing is screwed up, in principle.. yes, but it happens to happen more often, thus I see it as a bug. > >Also, the MASQUERADE lookup (obviously) has no more saddr in the lookup, > >that's another difference from the 'original' lookup. >=20 > This is a possible reason why it screws up for such many people? By not= =20 > including the source IP you make the route lookup for determining the=20 > MASQUERADE information very different from the route lookup when=20 > forwardning the packet. Yes, since it now looks to the routing code as if you wanted to find out a source ip for locally-originated packets. > I think it would for most make more sense that the source IP assignment i= s=20 > based on routing using the original source address as key. Question is: can we do this? Can we ask the routing code to choose a source address while we already specify one? I don't think so. > >That is the presumption I am about to challenge. Is the 'original' > >interface really the one we want in this case? >=20 > If there is policy routing saying that packets with a given source=20 > should go out another interface my opinion is that they should. Ok, I think I agree with you. It sounds like the right thing to do, rather than trying to fix a broken configuration within MASQUERADE. > 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 --VeECpbAlTmkAjas0 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) iD8DBQFBNG+JXaXGVTD0i/8RAsN1AJ0amLm3Im3GZ1vIH8SDVcCurjNB+gCfd2+S XbIY1mTvC8eld/zjcOuInNc= =h+z5 -----END PGP SIGNATURE----- --VeECpbAlTmkAjas0-- From ja@ssi.bg Tue Aug 31 05:34:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 05:34:42 -0700 (PDT) Received: from l.himel.bg (IDENT:root@[213.91.247.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VCYWps015582 for ; Tue, 31 Aug 2004 05:34:33 -0700 Received: from linux.himel.bg (IDENT:ja@linux.himel.bg [127.0.0.1]) by l.himel.bg (8.11.6/8.9.3) with ESMTP id i7VCXMJ07517; Tue, 31 Aug 2004 15:33:22 +0300 Date: Tue, 31 Aug 2004 15:33:22 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@l To: Herbert Xu cc: "David S. Miller" , , , , , Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") In-Reply-To: <20040831111508.GA2327@gondor.apana.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8259 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: 2796 Lines: 69 Hello, On Tue, 31 Aug 2004, Herbert Xu wrote: > On Tue, Aug 31, 2004 at 01:54:21PM +0300, Julian Anastasov wrote: > > > > Yes, 2.2 worked somehow, until some users wanted more > > control from the routing. Now ip_fw_compat_masq.c has such call, > > it can be fast in some setups with small number of IPs but may > > be now there some setups using nfmark for selecting maddr from > > ISP-specific routing tables. I'm not sure we can avoid the routing > > and the cache pollution, we have to live with the old behavoir, not > > the current one. > > You're right. However, we can still do this without performing > another routing lookup. The information is already there in the > fib rule. We just didn't bother writing it down in the route for > forwarded packets. I do not see where the public IP is, what you mean? As the mpath route does not have preferred src IP (usually when many ISPs are used) the kernel uses inet_select_addr to select one, in similar way as you are trying to do. But the difference is that it is now cached and by using nfmark we have more options not to reach this mpath route on next lookups. One example: the GWs used in the nexthops can be internal addresses, in such cases inet_select_addr gets the first local (scope global) public IP address because the target IP is not always part from the GW's subnet. You can not rely on any information present in the mpath route and to assume anything about maddr without specific lookup, additional one. > So if we add a new field for the preferred source address to > struct rtable then we can avoid the lookup. What is this? Sort of 'nexthop via GW1 dev eth0 snat MADDR1' ? This is the same as to use SNAT target. Similar thing worked very well in 2.2 kernels (nat XXX) but only for unipath routes. > BTW, I'd still like to know the problem with the original oif key. The old way to provide oif as key adds one additional cache entry per every normal input route. Another issue is that providing oif key can hit wrong route in some setups - not the first match which we usually hit with oif=0. But for the usual cases it works. > It's basically saying that if you can find the correct route using > the other keys (daddr/tos/mark) then all is well, if you can't > (dev != out) then we'll use the best address on the outgoing > interface. ip_route_output + inet_select_addr in 50% of the cases for mpath route with 2 NHs? inet_select_addr is ok to use only when nfmark is not used, it is even used now for multipath routes in the usual case when prefsrc is not defined. But with the routing you have more control on what to select as maddr. So, I'm for the old way which can work for more setups and against inet_select_addr which can break existing ones. Regards -- Julian Anastasov From ak@muc.de Tue Aug 31 05:38:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 05:38:55 -0700 (PDT) Received: from zero.aec.at (Apuleius_M_Gokul@zero.aec.at [193.170.194.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VCclhj015927 for ; Tue, 31 Aug 2004 05:38:48 -0700 Received: from averell.firstfloor.org.muc.de (Theodore_Roosevelt@localhost.localdomain [127.0.0.1]) by zero.aec.at (8.11.6/8.11.2) with ESMTP id i7VCcNg18500; Tue, 31 Aug 2004 14:38:24 +0200 To: davem@redhat.com, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, akepner@sgi.com Subject: [PATCH] Extend lock less TX to real devices From: Andi Kleen Date: Tue, 31 Aug 2004 14:38:20 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 8260 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@muc.de Precedence: bulk X-list: netdev Content-Length: 8855 Lines: 320 This patch extends the recently added NETIF_F_LLTX to real devices. A lot of modern network drivers have a single big lock around their hard_start_xmit, and it doesn't make sense to take the xmit lock too. They also have enough locking to handle setting of multicast lists properly. Now they can set NETIF_F_LLTX and get one lock less. For drivers that don't set this flag nothing changes. I added support for trylocking instead of spinning like sch_generic does - for that the driver has to return -1, then the packet is requeued. The check for a local device deadlock is lost for this case, but that doesn't seem to be a big loss (I've never seen this printk ever get triggered) The patch looks bigger than it really is because i moved some code around and converted the macros into inlines. I also did an additional micro optimization: on a preemptive kernel dev_queue_xmit would change the local atomic count several times in the hot path. This patch changes it to disable preemption only once, to hopefully make it a bit faster. I changed the lltx handling to not change xmit_lock_owner. Without a lock it is not safe anyways and it will prevent another cache line from bouncing. With only this patch nothing changes because no driver uses the new flag yet. -Andi diff -u linux-2.6.8-work/net/core/dev.c-o linux-2.6.8-work/net/core/dev.c --- linux-2.6.8-work/net/core/dev.c-o 2004-08-05 04:31:12.000000000 +0200 +++ linux-2.6.8-work/net/core/dev.c 2004-08-31 13:25:35.000000000 +0200 @@ -1255,19 +1255,24 @@ return 0; } -#define HARD_TX_LOCK_BH(dev, cpu) { \ - if ((dev->features & NETIF_F_LLTX) == 0) { \ - spin_lock_bh(&dev->xmit_lock); \ - dev->xmit_lock_owner = cpu; \ - } \ -} +/* Preemption must be off here. A driver setting LLTX has to + use interrupt safe locking. */ -#define HARD_TX_UNLOCK_BH(dev) { \ - if ((dev->features & NETIF_F_LLTX) == 0) { \ - dev->xmit_lock_owner = -1; \ - spin_unlock_bh(&dev->xmit_lock); \ - } \ -} +static inline int hard_tx_lock(struct net_device *dev) +{ + if (dev->features & NETIF_F_LLTX) + return 1; + spin_lock(&dev->xmit_lock); + dev->xmit_lock_owner = smp_processor_id(); +} + +static inline void hard_tx_unlock(struct net_device *dev) +{ + if (dev->features & NETIF_F_LLTX) + return; + dev->xmit_lock_owner = -1; + spin_unlock(&dev->xmit_lock); +} static inline void qdisc_run(struct net_device *dev) { @@ -1319,7 +1324,15 @@ if (skb_checksum_help(&skb, 0)) goto out_kfree_skb; - rcu_read_lock(); + /* + * Various locks need a _bh disable and there are CPU local + * data structures too. Instead of changing the preempt count + * with each lock just grab it here once for the whole + * function. This also gives the require atomicity for the RCU + * use below. + */ + local_bh_disable(); + /* Updates of qdisc are serialized by queue_lock. * The struct Qdisc which is pointed to by qdisc is now a * rcu structure - it may be accessed without acquiring @@ -1339,18 +1352,17 @@ #endif if (q->enqueue) { /* Grab device queue */ - spin_lock_bh(&dev->queue_lock); + spin_lock(&dev->queue_lock); rc = q->enqueue(skb, q); qdisc_run(dev); - spin_unlock_bh(&dev->queue_lock); - rcu_read_unlock(); + spin_unlock(&dev->queue_lock); rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc; goto out; } - rcu_read_unlock(); + /* The device has no queue. Common case for software devices: loopback, all the sorts of tunnels... @@ -1363,32 +1375,27 @@ Check this and shot the lock. It is not prone from deadlocks. Either shot noqueue qdisc, it is even simpler 8) + + BHs are still disabled here */ if (dev->flags & IFF_UP) { - int cpu = get_cpu(); - - if (dev->xmit_lock_owner != cpu) { - - HARD_TX_LOCK_BH(dev, cpu); - put_cpu(); - + if (hard_tx_lock(dev)) { if (!netif_queue_stopped(dev)) { if (netdev_nit) dev_queue_xmit_nit(skb, dev); rc = 0; if (!dev->hard_start_xmit(skb, dev)) { - HARD_TX_UNLOCK_BH(dev); + hard_tx_unlock(dev); goto out; } } - HARD_TX_UNLOCK_BH(dev); + hard_tx_unlock(dev); if (net_ratelimit()) printk(KERN_CRIT "Virtual device %s asks to " "queue packet!\n", dev->name); goto out_enetdown; } else { - put_cpu(); /* Recursion is detected! It is possible, * unfortunately */ if (net_ratelimit()) @@ -1401,6 +1408,7 @@ out_kfree_skb: kfree_skb(skb); out: + local_bh_enable(); return rc; } diff -u linux-2.6.8-work/net/core/pktgen.c-o linux-2.6.8-work/net/core/pktgen.c --- linux-2.6.8-work/net/core/pktgen.c-o 2004-08-05 04:31:12.000000000 +0200 +++ linux-2.6.8-work/net/core/pktgen.c 2004-08-15 17:51:22.000000000 +0200 @@ -629,8 +629,9 @@ } nr_frags = skb_shinfo(skb)->nr_frags; - - spin_lock_bh(&odev->xmit_lock); + + if (!(odev->features & NETIF_F_LLTX)) + spin_lock_bh(&odev->xmit_lock); if (!netif_queue_stopped(odev)) { atomic_inc(&skb->users); @@ -655,8 +656,8 @@ last_ok = 0; } - - spin_unlock_bh(&odev->xmit_lock); + if (!(odev->features & NETIF_F_LLTX)) + spin_unlock_bh(&odev->xmit_lock); if (info->ipg) { /* Try not to busy-spin if we have larger sleep times. diff -u linux-2.6.8-work/net/sched/sch_generic.c-o linux-2.6.8-work/net/sched/sch_generic.c --- linux-2.6.8-work/net/sched/sch_generic.c-o 2004-08-13 03:44:03.000000000 +0200 +++ linux-2.6.8-work/net/sched/sch_generic.c 2004-08-31 13:13:36.000000000 +0200 @@ -68,6 +68,34 @@ write_unlock_bh(&qdisc_tree_lock); } +static int qdisc_coll(struct net_device *dev, struct sk_buff *skb) +{ + /* 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++; + return 0; +} + +static inline void qdisc_unlock_driver(struct net_device *dev) +{ + if (!(dev->features & NETIF_F_LLTX)) { + dev->xmit_lock_owner = -1; + spin_unlock(&dev->xmit_lock); + } + spin_lock(&dev->queue_lock); +} + /* dev->queue_lock serializes queue accesses for this device AND dev->qdisc pointer itself. @@ -97,50 +125,49 @@ /* Dequeue packet */ if ((skb = q->dequeue(q)) != NULL) { - if (spin_trylock(&dev->xmit_lock)) { + /* + * 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. + */ + if ((dev->features & NETIF_F_LLTX) == 0) { + if (!spin_trylock(&dev->xmit_lock)) { + if (qdisc_coll(dev, skb) < 0) + return -1; + goto out; + + } /* 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)) { - if (netdev_nit) - dev_queue_xmit_nit(skb, dev); - - if (dev->hard_start_xmit(skb, dev) == 0) { - dev->xmit_lock_owner = -1; - spin_unlock(&dev->xmit_lock); - - spin_lock(&dev->queue_lock); - return -1; + } + + /* 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 <= 0) { + qdisc_unlock_driver(dev); + /* requeue in case of lock collision */ + if (ret < 0) { + __get_cpu_var(netdev_rx_stat).cpu_collision++; + goto out; } - } - - /* Release the driver */ - dev->xmit_lock_owner = -1; - spin_unlock(&dev->xmit_lock); - spin_lock(&dev->queue_lock); - q = dev->qdisc; - } else { - /* 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++; } + qdisc_unlock_driver(dev); + q = dev->qdisc; + /* Device kicked us out :( - This is possible in three cases: + This is possible in four cases: 0. driver is locked 1. fastroute is enabled @@ -149,6 +176,7 @@ 3. device is buggy (ppp) */ + out: q->ops->requeue(skb, q); netif_schedule(dev); return 1; From ak@muc.de Tue Aug 31 05:47:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 05:47:44 -0700 (PDT) Received: from zero.aec.at (Elevenson@zero.aec.at [193.170.194.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VClYoP016394 for ; Tue, 31 Aug 2004 05:47:36 -0700 Received: from averell.firstfloor.org.muc.de (John_Boop@localhost.localdomain [127.0.0.1]) by zero.aec.at (8.11.6/8.11.2) with ESMTP id i7VCk5g18515; Tue, 31 Aug 2004 14:46:12 +0200 To: netdev@oss.sgi.com, davem@redhat.com, kuznet@ms2.inr.ac.ru, cramerj@intel.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com, jgarzik@pobox.com Subject: [PATCH] Add NETIF_F_LLTX to e1000 driver From: Andi Kleen Date: Tue, 31 Aug 2004 14:46:03 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 8261 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@muc.de Precedence: bulk X-list: netdev Content-Length: 2473 Lines: 86 This patch adds NETIF_F_LLTX to the e1000 driver. With this the driver can take one lock less in the TX path. It will do a try lock on the tx_lock now and bail out when the lock is already locked. I extended the use of tx_lock a bit to protect some data structures that were previously only protected by the xmit_lock. I also added taking of tx_lock to the set_multicast_list to prevent any potential races here. It requires the lltx patch I sent before to netdev applied first. -Andi diff -u linux-2.6.8-work/drivers/net/e1000/e1000_main.c-o linux-2.6.8-work/drivers/net/e1000/e1000_main.c --- linux-2.6.8-work/drivers/net/e1000/e1000_main.c-o 2004-07-27 14:44:07.000000000 +0200 +++ linux-2.6.8-work/drivers/net/e1000/e1000_main.c 2004-08-31 14:43:43.000000000 +0200 @@ -486,6 +486,9 @@ #endif #endif + /* hard_start_xmit is safe against parallel locking */ + netdev->features |= NETIF_F_LLTX; + if(pci_using_dac) netdev->features |= NETIF_F_HIGHDMA; @@ -1259,9 +1262,12 @@ uint32_t rctl; uint32_t hash_value; int i; + unsigned long flags; /* Check for Promiscuous and All Multicast modes */ + spin_lock_irqsave(&adapter->tx_lock, flags); + rctl = E1000_READ_REG(hw, RCTL); if(netdev->flags & IFF_PROMISC) { @@ -1310,6 +1316,8 @@ if(hw->mac_type == e1000_82542_rev2_0) e1000_leave_82542_rst(adapter); + + spin_unlock_irqrestore(&adapter->tx_lock, flags); } /* need to wait a few seconds after link up to get diagnostic information from the phy */ @@ -1785,7 +1793,13 @@ if(adapter->pcix_82544) count += nr_frags; - spin_lock_irqsave(&adapter->tx_lock, flags); + local_irq_save(flags); + if (!spin_trylock(&adapter->tx_lock)) { + /* Collision - tell upper layer to requeue */ + local_irq_restore(flags); + return -1; + } + /* need: count + 2 desc gap to keep tail from touching * head, otherwise try next time */ if(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2 ) { @@ -1793,11 +1807,11 @@ spin_unlock_irqrestore(&adapter->tx_lock, flags); return 1; } - spin_unlock_irqrestore(&adapter->tx_lock, flags); if(adapter->hw.mac_type == e1000_82547) { if(e1000_82547_fifo_workaround(adapter, skb)) { netif_stop_queue(netdev); + spin_unlock_irqrestore(&adapter->tx_lock, flags); mod_timer(&adapter->tx_fifo_stall_timer, jiffies); return 1; } @@ -1821,6 +1835,7 @@ netdev->trans_start = jiffies; + spin_unlock_irqrestore(&adapter->tx_lock, flags); return 0; } From vatsa@in.ibm.com Tue Aug 31 05:57:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 05:57:52 -0700 (PDT) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VCviFL016867 for ; Tue, 31 Aug 2004 05:57:45 -0700 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e1.ny.us.ibm.com (8.12.10/NS PXFA) with ESMTP id i7VCvRCR514628; Tue, 31 Aug 2004 08:57:28 -0400 Received: from snowy.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7VCwWCb096116; Tue, 31 Aug 2004 08:58:39 -0400 Received: by snowy.in.ibm.com (Postfix, from userid 502) id 24AD724E32; Tue, 31 Aug 2004 18:29:42 +0530 (IST) Date: Tue, 31 Aug 2004 18:29:41 +0530 From: Srivatsa Vaddagiri To: davem@redhat.com Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, Dipankar , paulmck@us.ibm.com Subject: [RFC] Use RCU for tcp_ehash lookup Message-ID: <20040831125941.GA5534@in.ibm.com> Reply-To: vatsa@in.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: 8262 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vatsa@in.ibm.com Precedence: bulk X-list: netdev Content-Length: 20723 Lines: 661 Hello, I have been looking at making tcp_ehash table lookup lock-free using RCU technique. I found _significant_ reduction in profile count (~56% savings) for __tcp_v4_lookup_established if it is made lock-free. Hence I am presenting the patch below for discussion/consideration. Some notes on the patch: - Although readprofile shows improvement in tick count for __tcp_v4_lookup_established, I haven't come across any benchmarks that is benefited noticeably by the lock-free lookup. I have tried httperf, netperf and simple file transfer tests so far. This could possibly be because the hash table size on the machines I was testing was high (tcp_ehash_size = 128K), leading to low contention rate on the hash bucket locks. Also because of the fact that lookup could happen in parallel to socket input packet processing. I would be interested to know if anyone has seen high-rate of lock contention for hash bucket lock. Such workloads would benefit from the lock-free lookup. In the absence of any workload which resulted in lock contention, I resorted to disabling NAPI and irq balance (noirqbalance) to study the effect of cache bouncing on the lookup routine. The result was that CPU usage of the stack was halved in lock-free case, which IMHO, is a strong enough reason for us to consider this seriously. - I presume that one of the reasons for keeping the hash table so big is to keep lock contention low (& to reduce the size of hash chains). If the lookup is made lock-free, then could the size of the hash table be reduced (without adversely impacting performance)? - Biggest problem I had converting over to RCU was the refcount race between sock_put and sock_hold. sock_put might see the refcount go to zero and decide to free the object, while on some other CPU, sock_get's are pending against the same object. The patch handles the race by deciding to free the object only from the RCU callback. - Generic code like sock_put/__sk_add_node/sk_for_each, which are common to other protocols, have been modified to be RCU aware. I need to abstract this out so that other protocols not using RCU aren't affected by my changes. - Socket table lookups that happens thr', say /proc/net/tcp or tcpdiag_dump, is not lock-free yet. This is because of movement of socket performed in __tcp_tw_hashdance, between established half to time-wait half. There is a window during this movement, when the same socket is present on both time-wait half as well as established half. I felt that it is not good to have /proc/net/tcp report two instances of the same socket. Hence I resorted to have /proc/net/tcp and tcpdiag_dump doing the lookup using a spinlock. Note that __tcp_v4_lookup_established should not be affected by the above movement because I found it scans the established half first and _then_ the time wait half. So even if the same socket is present in both established half and time wait half, __tcp_v4_lookup_established will lookup only one of them (& not both). Details of the test conducted are as below: -------- 10/100MBps Ethernet Hub -------- | llm09 | <--------------------------- | llm10 | -------- -------- 10.0.1.3 10.0.1.1 llm09 - 8way 1GHz Intel P3 box with 1GB RAM llm10 - 4way 1.2GHz Power4 box (p630) with 4GB RAM Both these machines were connected to a hub with IP addresses 10.0.1.3 (llm09) and 10.0.1.1 (llm10). File of size 526MB was downloaded on llm09 from llm10. Snapshot of profile information was taken over this file transfer period. This test was repeated 10 times using a script as below: i=0 while [ $i -lt 10 ] do cat /proc/interrupts | grep eth >> logs/intlog readprofile -r (time -p scp -q root@10.0.1.1:~vatsa/delme/x . 2> /dev/null) 2>>timelog cp /proc/profile logs/profile-$i readprofile -p logs/profile-$i -m >> rplog cat /proc/interrupts | grep eth >> logs/intlog rm -f x i=`expr $i + 1` done I have attached rplog for both lock-free as well as read-lock cases. Actual patch, against 2.6.8.1, follows. Flames wellcome :) --- linux-2.6.8.1-vatsa/include/net/sock.h | 23 ++++++++++-- linux-2.6.8.1-vatsa/include/net/tcp.h | 23 +++++++++--- linux-2.6.8.1-vatsa/net/core/sock.c | 11 +++++ linux-2.6.8.1-vatsa/net/ipv4/tcp.c | 2 - linux-2.6.8.1-vatsa/net/ipv4/tcp_diag.c | 11 +++-- linux-2.6.8.1-vatsa/net/ipv4/tcp_ipv4.c | 50 ++++++++++++++++----------- linux-2.6.8.1-vatsa/net/ipv4/tcp_minisocks.c | 47 ++++++++++++++++++++----- linux-2.6.8.1-vatsa/net/ipv6/tcp_ipv6.c | 22 +++++++---- 8 files changed, 136 insertions(+), 53 deletions(-) diff -puN include/net/sock.h~tcp_ehash include/net/sock.h --- linux-2.6.8.1/include/net/sock.h~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/include/net/sock.h 2004-08-30 12:23:17.000000000 +0530 @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -178,6 +179,7 @@ struct sock_common { * @sk_error_report - callback to indicate errors (e.g. %MSG_ERRQUEUE) * @sk_backlog_rcv - callback to process the backlog * @sk_destruct - called at sock freeing time, i.e. when all refcnt == 0 + * @sk_rcu - RCU callback structure */ struct sock { /* @@ -266,6 +268,7 @@ struct sock { int (*sk_backlog_rcv)(struct sock *sk, struct sk_buff *skb); void (*sk_destruct)(struct sock *sk); + struct rcu_head sk_rcu; }; /* @@ -350,7 +353,7 @@ static __inline__ int sk_del_node_init(s static __inline__ void __sk_add_node(struct sock *sk, struct hlist_head *list) { - hlist_add_head(&sk->sk_node, list); + hlist_add_head_rcu(&sk->sk_node, list); } static __inline__ void sk_add_node(struct sock *sk, struct hlist_head *list) @@ -371,7 +374,7 @@ static __inline__ void sk_add_bind_node( } #define sk_for_each(__sk, node, list) \ - hlist_for_each_entry(__sk, node, list, sk_node) + hlist_for_each_entry_rcu(__sk, node, list, sk_node) #define sk_for_each_from(__sk, node) \ if (__sk && ({ node = &(__sk)->sk_node; 1; })) \ hlist_for_each_entry_from(__sk, node, sk_node) @@ -703,6 +706,7 @@ extern void FASTCALL(release_sock(struct extern struct sock * sk_alloc(int family, int priority, int zero_it, kmem_cache_t *slab); extern void sk_free(struct sock *sk); +extern void sk_free_rcu(struct rcu_head *head); extern struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, @@ -888,8 +892,19 @@ static inline void sk_filter_charge(stru /* Ungrab socket and destroy it, if it was the last reference. */ static inline void sock_put(struct sock *sk) { - if (atomic_dec_and_test(&sk->sk_refcnt)) - sk_free(sk); +sp_loop: + if (atomic_dec_and_test(&sk->sk_refcnt)) { + /* Restore ref count and schedule callback. + * If we don't restore ref count, then the callback can be + * scheduled by more than one CPU. + */ + atomic_inc(&sk->sk_refcnt); + + if (atomic_read(&sk->sk_refcnt) == 1) + call_rcu(&sk->sk_rcu, sk_free_rcu); + else + goto sp_loop; + } } /* Detach socket from process context. diff -puN include/net/tcp.h~tcp_ehash include/net/tcp.h --- linux-2.6.8.1/include/net/tcp.h~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/include/net/tcp.h 2004-08-26 16:57:50.000000000 +0530 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -44,7 +45,7 @@ * for the rest. I'll experiment with dynamic table growth later. */ struct tcp_ehash_bucket { - rwlock_t lock; + spinlock_t lock; struct hlist_head chain; } __attribute__((__aligned__(8))); @@ -222,12 +223,13 @@ struct tcp_tw_bucket { struct in6_addr tw_v6_rcv_saddr; int tw_v6_ipv6only; #endif + struct rcu_head tw_rcu; }; static __inline__ void tw_add_node(struct tcp_tw_bucket *tw, struct hlist_head *list) { - hlist_add_head(&tw->tw_node, list); + hlist_add_head_rcu(&tw->tw_node, list); } static __inline__ void tw_add_bind_node(struct tcp_tw_bucket *tw, @@ -305,14 +307,23 @@ static inline int tcp_v6_ipv6only(const #endif extern kmem_cache_t *tcp_timewait_cachep; +extern void tcp_tw_free(struct rcu_head *head); static inline void tcp_tw_put(struct tcp_tw_bucket *tw) { +tput_loop: if (atomic_dec_and_test(&tw->tw_refcnt)) { -#ifdef INET_REFCNT_DEBUG - printk(KERN_DEBUG "tw_bucket %p released\n", tw); -#endif - kmem_cache_free(tcp_timewait_cachep, tw); + /* Restore ref count and schedule callback. + * If we don't restore ref count, then the callback can be + * scheduled by more than one CPU. + */ + + atomic_inc(&tw->tw_refcnt); + + if (atomic_read(&tw->tw_refcnt) == 1) + call_rcu(&tw->tw_rcu, tcp_tw_free); + else + goto tput_loop; } } diff -puN net/core/sock.c~tcp_ehash net/core/sock.c --- linux-2.6.8.1/net/core/sock.c~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/net/core/sock.c 2004-08-26 16:53:14.000000000 +0530 @@ -657,6 +657,16 @@ void sk_free(struct sock *sk) module_put(owner); } +/* RCU callback to free a socket */ + +void sk_free_rcu(struct rcu_head *head) +{ + struct sock *sk = container_of(head, struct sock, sk_rcu); + + if (atomic_dec_and_test(&sk->sk_refcnt)) + sk_free(sk); +} + void __init sk_init(void) { sk_cachep = kmem_cache_create("sock", sizeof(struct sock), 0, @@ -1347,6 +1357,7 @@ EXPORT_SYMBOL(__lock_sock); EXPORT_SYMBOL(__release_sock); EXPORT_SYMBOL(sk_alloc); EXPORT_SYMBOL(sk_free); +EXPORT_SYMBOL(sk_free_rcu); EXPORT_SYMBOL(sk_send_sigurg); EXPORT_SYMBOL(sock_alloc_send_pskb); EXPORT_SYMBOL(sock_alloc_send_skb); diff -puN net/ipv4/tcp_ipv4.c~tcp_ehash net/ipv4/tcp_ipv4.c --- linux-2.6.8.1/net/ipv4/tcp_ipv4.c~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/net/ipv4/tcp_ipv4.c 2004-08-25 18:07:27.000000000 +0530 @@ -351,7 +351,8 @@ void tcp_listen_wlock(void) static __inline__ void __tcp_v4_hash(struct sock *sk, const int listen_possible) { struct hlist_head *list; - rwlock_t *lock; + rwlock_t *lock = NULL; + spinlock_t *slock = NULL; BUG_TRAP(sk_unhashed(sk)); if (listen_possible && sk->sk_state == TCP_LISTEN) { @@ -360,14 +361,16 @@ static __inline__ void __tcp_v4_hash(str tcp_listen_wlock(); } else { list = &tcp_ehash[(sk->sk_hashent = tcp_sk_hashfn(sk))].chain; - lock = &tcp_ehash[sk->sk_hashent].lock; - write_lock(lock); + slock = &tcp_ehash[sk->sk_hashent].lock; + spin_lock(slock); } __sk_add_node(sk, list); sock_prot_inc_use(sk->sk_prot); - write_unlock(lock); - if (listen_possible && sk->sk_state == TCP_LISTEN) + if (listen_possible && sk->sk_state == TCP_LISTEN) { + write_unlock(lock); wake_up(&tcp_lhash_wait); + } else + spin_unlock(slock); } static void tcp_v4_hash(struct sock *sk) @@ -381,7 +384,8 @@ static void tcp_v4_hash(struct sock *sk) void tcp_unhash(struct sock *sk) { - rwlock_t *lock; + rwlock_t *lock = NULL; + spinlock_t *slock = NULL; if (sk_unhashed(sk)) goto ende; @@ -392,17 +396,20 @@ void tcp_unhash(struct sock *sk) lock = &tcp_lhash_lock; } else { struct tcp_ehash_bucket *head = &tcp_ehash[sk->sk_hashent]; - lock = &head->lock; - write_lock_bh(&head->lock); + slock = &head->lock; + spin_lock_bh(&head->lock); } if (__sk_del_node_init(sk)) sock_prot_dec_use(sk->sk_prot); - write_unlock_bh(lock); + if (sk->sk_state != TCP_LISTEN) + spin_unlock_bh(slock); + else { + write_unlock_bh(lock); ende: - if (sk->sk_state == TCP_LISTEN) wake_up(&tcp_lhash_wait); + } } /* Don't inline this cruft. Here are some nice properties to @@ -494,7 +501,7 @@ static inline struct sock *__tcp_v4_look */ int hash = tcp_hashfn(daddr, hnum, saddr, sport); head = &tcp_ehash[hash]; - read_lock(&head->lock); + rcu_read_lock(); sk_for_each(sk, node, &head->chain) { if (TCP_IPV4_MATCH(sk, acookie, saddr, daddr, ports, dif)) goto hit; /* You sunk my battleship! */ @@ -507,7 +514,7 @@ static inline struct sock *__tcp_v4_look } sk = NULL; out: - read_unlock(&head->lock); + rcu_read_unlock(); return sk; hit: sock_hold(sk); @@ -559,7 +566,7 @@ static int __tcp_v4_check_established(st struct hlist_node *node; struct tcp_tw_bucket *tw; - write_lock(&head->lock); + spin_lock(&head->lock); /* Check TIME-WAIT sockets first. */ sk_for_each(sk2, node, &(head + tcp_ehash_size)->chain) { @@ -614,7 +621,7 @@ unique: BUG_TRAP(sk_unhashed(sk)); __sk_add_node(sk, &head->chain); sock_prot_inc_use(sk->sk_prot); - write_unlock(&head->lock); + spin_unlock(&head->lock); if (twp) { *twp = tw; @@ -630,7 +637,7 @@ unique: return 0; not_unique: - write_unlock(&head->lock); + spin_unlock(&head->lock); return -EADDRNOTAVAIL; } @@ -2228,7 +2235,10 @@ static void *established_get_first(struc struct hlist_node *node; struct tcp_tw_bucket *tw; - read_lock(&tcp_ehash[st->bucket].lock); + /* Take the spinlock. Otherwise a dancing socket + * (__tcp_tw_hashdance) may be reported twice! + */ + spin_lock(&tcp_ehash[st->bucket].lock); sk_for_each(sk, node, &tcp_ehash[st->bucket].chain) { if (sk->sk_family != st->family) { continue; @@ -2245,7 +2255,7 @@ static void *established_get_first(struc rc = tw; goto out; } - read_unlock(&tcp_ehash[st->bucket].lock); + spin_unlock(&tcp_ehash[st->bucket].lock); st->state = TCP_SEQ_STATE_ESTABLISHED; } out: @@ -2272,10 +2282,10 @@ get_tw: cur = tw; goto out; } - read_unlock(&tcp_ehash[st->bucket].lock); + spin_unlock(&tcp_ehash[st->bucket].lock); st->state = TCP_SEQ_STATE_ESTABLISHED; if (++st->bucket < tcp_ehash_size) { - read_lock(&tcp_ehash[st->bucket].lock); + spin_lock(&tcp_ehash[st->bucket].lock); sk = sk_head(&tcp_ehash[st->bucket].chain); } else { cur = NULL; @@ -2385,7 +2395,7 @@ static void tcp_seq_stop(struct seq_file case TCP_SEQ_STATE_TIME_WAIT: case TCP_SEQ_STATE_ESTABLISHED: if (v) - read_unlock(&tcp_ehash[st->bucket].lock); + spin_unlock(&tcp_ehash[st->bucket].lock); local_bh_enable(); break; } diff -puN net/ipv4/tcp.c~tcp_ehash net/ipv4/tcp.c --- linux-2.6.8.1/net/ipv4/tcp.c~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/net/ipv4/tcp.c 2004-08-25 18:07:27.000000000 +0530 @@ -2258,7 +2258,7 @@ void __init tcp_init(void) if (!tcp_ehash) panic("Failed to allocate TCP established hash table\n"); for (i = 0; i < (tcp_ehash_size << 1); i++) { - tcp_ehash[i].lock = RW_LOCK_UNLOCKED; + tcp_ehash[i].lock = SPIN_LOCK_UNLOCKED; INIT_HLIST_HEAD(&tcp_ehash[i].chain); } diff -puN net/ipv4/tcp_diag.c~tcp_ehash net/ipv4/tcp_diag.c --- linux-2.6.8.1/net/ipv4/tcp_diag.c~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/net/ipv4/tcp_diag.c 2004-08-25 18:07:27.000000000 +0530 @@ -522,7 +522,10 @@ skip_listen_ht: if (i > s_i) s_num = 0; - read_lock_bh(&head->lock); + /* Take the spinlock. Otherwise a dancing socket + * (__tcp_tw_hashdance) may be reported twice! + */ + spin_lock_bh(&head->lock); num = 0; sk_for_each(sk, node, &head->chain) { @@ -542,7 +545,7 @@ skip_listen_ht: if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) <= 0) { - read_unlock_bh(&head->lock); + spin_unlock_bh(&head->lock); goto done; } ++num; @@ -568,13 +571,13 @@ skip_listen_ht: if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) <= 0) { - read_unlock_bh(&head->lock); + spin_unlock_bh(&head->lock); goto done; } ++num; } } - read_unlock_bh(&head->lock); + spin_unlock_bh(&head->lock); } done: diff -puN net/ipv4/tcp_minisocks.c~tcp_ehash net/ipv4/tcp_minisocks.c --- linux-2.6.8.1/net/ipv4/tcp_minisocks.c~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/net/ipv4/tcp_minisocks.c 2004-08-26 16:58:08.000000000 +0530 @@ -64,14 +64,14 @@ static void tcp_timewait_kill(struct tcp /* Unlink from established hashes. */ ehead = &tcp_ehash[tw->tw_hashent]; - write_lock(&ehead->lock); + spin_lock(&ehead->lock); if (hlist_unhashed(&tw->tw_node)) { - write_unlock(&ehead->lock); + spin_unlock(&ehead->lock); return; } __hlist_del(&tw->tw_node); sk_node_init(&tw->tw_node); - write_unlock(&ehead->lock); + spin_unlock(&ehead->lock); /* Disassociate with bind bucket. */ bhead = &tcp_bhash[tcp_bhashfn(tw->tw_num)]; @@ -308,17 +308,28 @@ static void __tcp_tw_hashdance(struct so tw_add_bind_node(tw, &tw->tw_tb->owners); spin_unlock(&bhead->lock); - write_lock(&ehead->lock); + spin_lock(&ehead->lock); - /* Step 2: Remove SK from established hash. */ - if (__sk_del_node_init(sk)) - sock_prot_dec_use(sk->sk_prot); + /* + * We have to be carefull here since there could be racing + * (lock-free) lookups happening on other CPUs. If we remove SK first + * and then add TW, then there is a tiny window where this socket is + * in neither the established half nor in the TIMEWAIT half of the ehash + * table. Lookups occuring in that window can drop packets! + * Hence we first add TW and then remove SK, with a barrier in between. + */ - /* Step 3: Hash TW into TIMEWAIT half of established hash table. */ + /* Step 2: Hash TW into TIMEWAIT half of established hash table. */ tw_add_node(tw, &(ehead + tcp_ehash_size)->chain); atomic_inc(&tw->tw_refcnt); - write_unlock(&ehead->lock); + smp_wmb(); + + /* Step 3: Remove SK from established hash. */ + if (__sk_del_node_init(sk)) + sock_prot_dec_use(sk->sk_prot); + + spin_unlock(&ehead->lock); } /* @@ -1069,11 +1080,29 @@ int tcp_child_process(struct sock *paren return ret; } +/* RCU callback to free a timewait bucket */ + +void tcp_tw_free(struct rcu_head *head) +{ + struct tcp_tw_bucket *tw = + container_of(head, struct tcp_tw_bucket, tw_rcu); + + if (atomic_dec_and_test(&tw->tw_refcnt)) { +#ifdef INET_REFCNT_DEBUG + printk(KERN_DEBUG "tw_bucket %p released\n", tw); +#endif + kmem_cache_free(tcp_timewait_cachep, tw); + } +} + + + EXPORT_SYMBOL(tcp_check_req); EXPORT_SYMBOL(tcp_child_process); EXPORT_SYMBOL(tcp_create_openreq_child); EXPORT_SYMBOL(tcp_timewait_state_process); EXPORT_SYMBOL(tcp_tw_deschedule); +EXPORT_SYMBOL(tcp_tw_free); #ifdef CONFIG_SYSCTL EXPORT_SYMBOL(sysctl_tcp_tw_recycle); diff -puN net/ipv6/tcp_ipv6.c~tcp_ehash net/ipv6/tcp_ipv6.c --- linux-2.6.8.1/net/ipv6/tcp_ipv6.c~tcp_ehash 2004-08-25 18:06:42.000000000 +0530 +++ linux-2.6.8.1-vatsa/net/ipv6/tcp_ipv6.c 2004-08-25 18:07:27.000000000 +0530 @@ -210,7 +210,8 @@ fail: static __inline__ void __tcp_v6_hash(struct sock *sk) { struct hlist_head *list; - rwlock_t *lock; + rwlock_t *lock = NULL; + spinlock_t *slock = NULL; BUG_TRAP(sk_unhashed(sk)); @@ -221,13 +222,16 @@ static __inline__ void __tcp_v6_hash(str } else { sk->sk_hashent = tcp_v6_sk_hashfn(sk); list = &tcp_ehash[sk->sk_hashent].chain; - lock = &tcp_ehash[sk->sk_hashent].lock; - write_lock(lock); + slock = &tcp_ehash[sk->sk_hashent].lock; + spin_lock(slock); } __sk_add_node(sk, list); sock_prot_inc_use(sk->sk_prot); - write_unlock(lock); + if (sk->sk_state == TCP_LISTEN) + write_unlock(lock); + else + spin_unlock(slock); } @@ -307,7 +311,7 @@ static inline struct sock *__tcp_v6_look */ hash = tcp_v6_hashfn(daddr, hnum, saddr, sport); head = &tcp_ehash[hash]; - read_lock(&head->lock); + rcu_read_lock(); sk_for_each(sk, node, &head->chain) { /* For IPV6 do the cheaper port and family tests first. */ if(TCP_IPV6_MATCH(sk, saddr, daddr, ports, dif)) @@ -326,12 +330,12 @@ static inline struct sock *__tcp_v6_look goto hit; } } - read_unlock(&head->lock); + rcu_read_unlock(); return NULL; hit: sock_hold(sk); - read_unlock(&head->lock); + rcu_read_unlock(); return sk; } @@ -452,7 +456,7 @@ static int tcp_v6_check_established(stru struct hlist_node *node; struct tcp_tw_bucket *tw; - write_lock_bh(&head->lock); + spin_lock_bh(&head->lock); /* Check TIME-WAIT sockets first. */ sk_for_each(sk2, node, &(head + tcp_ehash_size)->chain) { @@ -491,7 +495,7 @@ unique: __sk_add_node(sk, &head->chain); sk->sk_hashent = hash; sock_prot_inc_use(sk->sk_prot); - write_unlock_bh(&head->lock); + spin_unlock_bh(&head->lock); if (tw) { /* Silly. Should hash-dance instead... */ _ -- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 From vatsa@in.ibm.com Tue Aug 31 06:01:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 06:02:00 -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 i7VD1tK7017389 for ; Tue, 31 Aug 2004 06:01:55 -0700 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e6.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7VD1gnt158742; Tue, 31 Aug 2004 09:01:42 -0400 Received: from snowy.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7VD2qCb121030; Tue, 31 Aug 2004 09:02:54 -0400 Received: by snowy.in.ibm.com (Postfix, from userid 502) id 4F47E24E32; Tue, 31 Aug 2004 18:34:02 +0530 (IST) Date: Tue, 31 Aug 2004 18:34:02 +0530 From: Srivatsa Vaddagiri To: davem@redhat.com Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, Dipankar , paulmck@us.ibm.com Subject: Re: [RFC] Use RCU for tcp_ehash lookup Message-ID: <20040831130402.GB5534@in.ibm.com> Reply-To: vatsa@in.ibm.com References: <20040831125941.GA5534@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040831125941.GA5534@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 8263 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vatsa@in.ibm.com Precedence: bulk X-list: netdev Content-Length: 453 Lines: 15 On Tue, Aug 31, 2004 at 06:29:41PM +0530, Srivatsa Vaddagiri wrote: > I found _significant_ reduction in profile count (~56% savings) > for __tcp_v4_lookup_established if it is made lock-free. I had made __tcp_v4_lookup_established to be a function call (rather than an inline function) to gather readprofile statistics for the same. -- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 From vatsa@in.ibm.com Tue Aug 31 06:10:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 06:11:32 -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 i7VDAhZC017910 for ; Tue, 31 Aug 2004 06:10:43 -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 i7VDANmL440210; Tue, 31 Aug 2004 09:10:23 -0400 Received: from snowy.in.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7VDAEGK205914; Tue, 31 Aug 2004 07:10:17 -0600 Received: by snowy.in.ibm.com (Postfix, from userid 502) id 0631324E32; Tue, 31 Aug 2004 18:42:35 +0530 (IST) Date: Tue, 31 Aug 2004 18:42:35 +0530 From: Srivatsa Vaddagiri To: davem@redhat.com Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, Dipankar , paulmck@us.ibm.com Subject: Re: [RFC] Use RCU for tcp_ehash lookup Message-ID: <20040831131235.GA5640@in.ibm.com> Reply-To: vatsa@in.ibm.com References: <20040831125941.GA5534@in.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <20040831125941.GA5534@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 8264 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vatsa@in.ibm.com Precedence: bulk X-list: netdev Content-Length: 481248 Lines: 8461 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 31, 2004 at 06:29:41PM +0530, Srivatsa Vaddagiri wrote: > I have attached rplog for both lock-free as well as read-lock cases. Sorry, forgot to attach them last time. Here they are. -- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=rplog-norcu 25 default_idle 0.5556 428835 poll_idle 7393.7069 41 cpu_idle 0.6406 7 need_resched 0.1400 130 system_call 2.9545 2 syscall_call 0.1818 7 syscall_exit 0.6364 2 handle_IRQ_event 0.0200 1 sys_ipc 0.0016 1 show_cpuinfo 0.0015 51 sched_clock 0.3750 2 flush_tlb_page 0.0113 4 pte_alloc_one 0.0519 21 do_page_fault 0.0150 1723 finish_task_switch 11.5638 1 sched_migrate_task 0.0050 1057 __wake_up 8.9576 207 __might_sleep 0.9810 78 add_wait_queue 0.6290 77 remove_wait_queue 0.6016 41 prepare_to_wait 0.2789 51 finish_wait 0.3228 1 mm_init 0.0040 1 copy_mm 0.0009 1 unshare_files 0.0102 1 copy_process 0.0003 7 .text.lock.fork 0.0354 1 sys_gettimeofday 0.0079 125 current_kernel_time 1.8116 5035 __do_softirq 29.1040 167 local_bh_enable 1.1597 807 __mod_timer 1.5609 89 mod_timer 0.8396 330 del_timer 2.1429 2 .text.lock.timer 0.0217 1 flush_signal_handlers 0.0149 2 in_group_p 0.0167 59 add_to_page_cache 0.2408 12 page_waitqueue 0.2500 41 wake_up_page 0.5325 16 unlock_page 0.4324 13 end_page_writeback 0.1757 50 find_get_page 0.4464 30 find_lock_page 0.1034 44 find_get_pages_tag 0.2767 5 filemap_nopage 0.0053 8 remove_suid 0.0537 141 generic_file_aio_write_nolock 0.0487 20 generic_file_aio_write 0.1266 51 mempool_alloc 0.1339 18 mempool_free 0.0857 1 mempool_alloc_slab 0.0476 2 mempool_free_slab 0.0952 15 bad_range 0.1500 19 prep_new_page 0.2346 40 free_hot_cold_page 0.1342 1 free_hot_page 0.1429 142 buffered_rmqueue 0.2669 85 __alloc_pages 0.0957 8 __get_free_pages 0.1356 20 __free_pages 0.2564 5 free_pages 0.1111 1 __read_page_state 0.0179 9 balance_dirty_pages_ratelimited 0.0448 78 __set_page_dirty_nobuffers 0.2074 3 set_page_dirty 0.0357 15 clear_page_dirty_for_io 0.1316 36 test_clear_page_writeback 0.1412 44 test_set_page_writeback 0.1467 35 .text.lock.page_writeback 0.2734 1 prio_tree_insert 0.0026 1 prio_tree_remove 0.0044 1 vma_prio_tree_add 0.0060 2 do_page_cache_readahead 0.0043 1 kmem_getpages 0.0048 9 cache_init_objs 0.0865 1 kmem_flagcheck 0.0233 1 cache_grow 0.0022 139 kmem_cache_alloc 1.1301 2 kmem_ptr_validate 0.0263 77 __kmalloc 0.5000 183 kmem_cache_free 2.1034 236 kfree 2.1651 32 mark_page_accessed 0.6154 36 release_pages 0.0796 33 __pagevec_lru_add 0.1041 2 __pagevec_lru_add_active 0.0060 19 percpu_counter_mod 0.1086 3 blk_queue_bounce 0.0390 1 clear_page_tables 0.0032 1 pte_alloc_map 0.0040 11 copy_page_range 0.0142 21 zap_pte_range 0.0303 13 do_wp_page 0.0153 12 do_anonymous_page 0.0267 286 do_no_page 0.3210 1 remove_vm_struct 0.0062 1 find_vma_prepare 0.0099 1 vma_adjust 0.0010 1 do_mmap_pgoff 0.0005 2 find_vma 0.0247 1 find_vma_prev 0.0123 1 do_munmap 0.0022 1 exit_mmap 0.0022 2 anon_vma_unlink 0.0128 4 page_add_anon_rmap 0.0122 1 page_add_file_rmap 0.0046 7 page_remove_rmap 0.0293 2 put_unused_fd 0.0161 1 fd_install 0.0068 10 do_sync_read 0.0578 85 vfs_read 0.2881 31 do_sync_write 0.1792 67 vfs_write 0.2271 32 sys_read 0.2500 28 sys_write 0.2188 54 fput 2.5714 1 __fput 0.0047 85 fget 0.6641 43 fget_light 0.2575 1 file_move 0.0071 4 bh_waitq_head 0.1818 58 wake_up_buffer 0.6988 1 sync_buffer 0.0149 38 unlock_buffer 1.5833 16 __set_page_buffers 0.6400 77 end_buffer_write_sync 0.6364 23 __find_get_block_slow 0.0531 31 end_buffer_async_write 0.1003 1 buffer_insert_list 0.0067 23 create_buffers 0.1411 1 init_page_buffers 0.0089 8 mark_buffer_dirty 0.2000 48 __brelse 0.6154 1 bh_lru_install 0.0044 152 __find_get_block 0.6179 14 __getblk 0.1386 11 __bread 0.1667 10 set_bh_page 0.1852 20 create_empty_buffers 0.0990 5 unmap_underlying_metadata 0.0442 37 __block_write_full_page 0.0385 56 __block_prepare_write 0.0564 25 __block_commit_write 0.1678 12 block_prepare_write 0.1558 11 generic_commit_write 0.0743 10 block_write_full_page 0.0375 1 generic_block_bmap 0.0119 18 end_bio_bh_io_sync 0.2903 38 submit_bh 0.1166 48 ll_rw_block 0.3529 4 recalc_bh_state 0.0223 16 alloc_buffer_head 0.1524 33 init_buffer_head 0.6226 1 init_buffer 0.0526 3 .text.lock.buffer 0.0161 3 bio_destructor 0.0319 15 bio_alloc 0.0352 50 bio_put 0.9259 3 bio_endio 0.0236 1 sync_supers 0.0036 16 inode_add_bytes 0.1127 66 pipe_wait 0.3687 253 pipe_readv 0.3579 10 pipe_read 0.1695 134 pipe_writev 0.1616 4 pipe_write 0.0678 172 pipe_poll 1.3871 1 getname 0.0041 2 do_lookup 0.0124 3 link_path_walk 0.0008 1 path_lookup 0.0021 1 may_open 0.0019 1 do_fcntl 0.0021 1 sys_fcntl64 0.0067 10 kill_fasync 0.0862 4 poll_initwait 0.1600 31 poll_freewait 0.4844 33 __pollwait 0.1675 20 max_select_fd 0.0889 167 do_select 0.2136 4 select_bits_alloc 0.1250 2 select_bits_free 0.4000 135 sys_select 0.1047 1 d_instantiate 0.0066 3 __d_lookup 0.0072 165 inode_times_differ 2.4265 51 update_atime 0.2297 45 inode_update_time 0.2103 2 wake_up_inode 0.0278 223 dnotify_parent 0.8814 1 seq_printf 0.0116 84 __mark_inode_dirty 0.1736 1 writeback_acquire 0.0455 1 writeback_release 0.0208 8 mpage_writepages 0.0095 1 load_elf_interp 0.0016 1 get_vmalloc_info 0.0052 6 show_stat 0.0026 9 write_profile 0.0577 27 ext3_get_group_desc 0.1436 10 read_block_bitmap 0.0658 3 find_next_usable_block 0.0035 52 ext3_try_to_allocate 0.0584 8 ext3_has_free_blocks 0.0650 56 ext3_new_block 0.0431 24 ext3_file_write 0.1127 6 ext3_alloc_block 0.1017 19 ext3_block_to_path 0.0597 42 ext3_get_branch 0.1780 27 ext3_find_goal 0.1971 6 ext3_alloc_branch 0.0087 38 ext3_splice_branch 0.0802 83 ext3_get_block_handle 0.0934 11 ext3_get_block 0.0632 76 walk_page_buffers 0.6786 25 ext3_prepare_write 0.0786 6 ext3_journal_dirty_data 0.0645 98 ext3_ordered_commit_write 0.4279 11 bget_one 1.0000 4 journal_dirty_data_fn 0.2105 10 ext3_ordered_writepage 0.0217 62 ext3_get_inode_block 0.2375 31 ext3_get_inode_loc 0.0487 82 ext3_do_update_inode 0.0888 33 ext3_writepage_trans_blocks 0.2324 33 ext3_mark_iloc_dirty 0.6000 15 ext3_reserve_inode_write 0.0711 18 ext3_mark_inode_dirty 0.2222 27 ext3_dirty_inode 0.2000 1 ext3_find_entry 0.0009 52 ext3_journal_start 0.5843 50 __ext3_journal_stop 0.6250 116 start_this_handle 0.0905 12 new_handle 0.1500 22 journal_start 0.1048 166 do_get_write_access 0.0929 23 journal_get_write_access 0.2840 32 journal_get_undo_access 0.0771 65 journal_dirty_data 0.0889 137 journal_dirty_metadata 0.2495 86 journal_stop 0.1057 97 __journal_unfile_buffer 0.1876 42 __journal_file_buffer 0.0599 16 inverted_lock 0.1667 195 journal_commit_transaction 0.0319 1 __journal_clean_checkpoint_list 0.0057 52 journal_cancel_revoke 0.1499 1 journal_switch_revoke_table 0.0109 7 __log_space_left 0.0680 1 __log_start_commit 0.0159 11 journal_blocks_per_page 0.3793 8 journal_alloc_journal_head 0.0690 6 journal_free_journal_head 0.2143 274 journal_add_journal_head 0.7486 49 __journal_remove_journal_head 0.1231 54 journal_remove_journal_head 0.4355 81 journal_put_journal_head 0.3632 1 copy_semundo 0.0042 1 __bitmap_weight 0.0035 7 radix_tree_preload 0.0395 1 rb_insert_color 0.0044 1 __rb_erase_color 0.0024 8 number 0.0102 6 vsnprintf 0.0049 2 find_next_zero_bit 0.0114 30 csum_partial 0.1042 1 atomic_dec_and_lock 0.0086 19 memcpy 0.3333 6176 __copy_user_intel 35.9070 4424 __copy_user_zeroing_intel 25.7209 90 __copy_to_user_ll 0.7500 2340 __copy_from_user_ll 19.5000 24 copy_to_user 0.2449 31 copy_from_user 0.2460 1 add_disk_randomness 0.0192 3 blk_run_queue 0.0242 5 get_request 0.0067 106 __make_request 0.0763 8 generic_make_request 0.0163 5 submit_bio 0.0173 50 __end_that_request_first 0.0951 2 put_io_context 0.0227 5 .text.lock.ll_rw_blk 0.0368 1 as_set_request 0.0076 299 e1000_xmit_frame 0.1405 5 scsi_put_command 0.0221 15 scsi_dispatch_cmd 0.0278 5 scsi_add_timer 0.0463 3 scsi_decide_disposition 0.0100 3 scsi_device_unbusy 0.0163 1 scsi_run_queue 0.0036 21 scsi_end_request 0.0795 3 scsi_io_completion 0.0029 109 scsi_request_fn 0.1005 12 .text.lock.scsi_lib 0.0561 34 ahc_linux_isr 0.0489 3 sd_rw_intr 0.0045 38 sock_aio_read 0.1293 12 sock_aio_write 0.0408 22 sock_poll 0.4490 1 sys_socketcall 0.0017 192 sock_wfree 2.5263 12 __release_sock 0.0779 385 sock_def_readable 2.1389 10 sk_reset_timer 0.2128 90 lock_sock 0.7258 46 release_sock 0.3026 29 sock_common_recvmsg 0.2479 188 .text.lock.sock 1.5161 213 alloc_skb 0.9509 396 skb_release_data 2.2759 12 kfree_skbmem 0.2727 652 __kfree_skb 2.8596 84 skb_clone 0.2188 25 copy_skb_header 0.1008 21 skb_copy 0.0946 279 skb_copy_bits 0.5304 4 skb_checksum 0.0065 17 memcpy_toiovec 0.1789 1 memcpy_tokerneliovec 0.0133 134 skb_copy_datagram_iovec 0.2472 43 sk_stream_rfree 1.5926 1 sk_stream_error 0.0108 10 skb_checksum_help 0.0309 87 dev_queue_xmit 0.1093 37 net_tx_action 0.0961 77 netif_receive_skb 0.1730 128 process_backlog 0.4689 43 net_rx_action 0.1660 12 neigh_resolve_output 0.0228 190 nf_iterate 1.1515 93 nf_hook_slow 0.3252 2 eth_header 0.0064 173 qdisc_restart 0.2932 152 pfifo_fast_enqueue 1.0483 115 pfifo_fast_dequeue 1.4198 29 rt_hash_code 0.2117 260 ip_route_input 0.4779 30 ip_local_deliver 0.0593 150 ip_rcv 0.1174 69 ip_local_deliver_finish 0.1769 33 ip_rcv_finish 0.0509 17 ip_finish_output 0.0320 27 ip_output 0.2250 355 ip_queue_xmit 0.2354 8 dst_output 0.1951 219 ip_finish_output2 0.4944 138 tcp_poll 0.3594 177 tcp_sendmsg 0.0389 44 cleanup_rbuf 0.1429 414 tcp_recvmsg 0.2062 1 tcp_incr_quickack 0.0130 33 __tcp_grow_window 0.2519 48 tcp_rcv_rtt_update 0.5275 36 tcp_rcv_space_adjust 0.1104 258 tcp_event_data_recv 0.4314 39 tcp_rtt_estimator 0.1161 1 tcp_try_to_open 0.0020 7 tcp_ack_saw_tstamp 0.0833 63 tcp_clean_rtx_queue 0.0662 27 tcp_ack 0.0184 1 tcp_ofo_queue 0.0016 6 __tcp_data_snd_check 0.0254 56 __tcp_ack_snd_check 0.3478 1 tcp_check_urg 0.0036 788 tcp_rcv_established 0.3411 240 tcp_transmit_skb 0.1378 51 tcp_write_xmit 0.0703 47 __tcp_select_window 0.1582 23 tcp_send_delayed_ack 0.1041 82 tcp_send_ack 0.4205 507 __tcp_v4_lookup_established 1.9205 34 tcp_v4_send_check 0.1344 1 tcp_v4_send_reset 0.0028 52 tcp_v4_do_rcv 0.1635 456 tcp_v4_rcv 0.2316 1 inet_sock_destruct 0.0018 11 inet_sendmsg 0.1236 19 ip_confirm 0.3958 34 ip_conntrack_defrag 0.4857 21 ip_refrag 0.1469 31 ip_conntrack_local 0.2123 25 __ip_ct_find_proto 0.3846 214 ip_ct_find_proto 2.0000 62 hash_conntrack 0.4026 42 get_tuple 0.4516 2 invert_tuple 0.0426 82 __ip_conntrack_find 0.3744 159 ip_conntrack_find_get 1.3140 12 ip_conntrack_get 0.3333 129 ip_conntrack_in 0.2098 285 ip_ct_refresh 1.5000 2 ip_ct_gather_frags 0.0104 30 tcp_pkt_to_tuple 0.3529 12 get_conntrack_index 0.1967 453 tcp_packet 0.9577 875 ipt_do_table 0.9030 8 ipt_hook 0.1356 18 ipt_local_out_hook 0.1538 37 ipt_route_hook 0.6271 19 ipt_local_hook 0.0815 55 ip_nat_fn 0.0914 17 ip_nat_out 0.0988 201 do_bindings 0.2466 1 unix_create1 0.0023 5 __sched_text_start 0.0172 1 __down_failed 0.0833 3 __write_lock_failed 0.0938 1 __read_lock_failed 0.0500 249 schedule 0.1197 2 __preempt_spin_lock 0.0220 382 .text.lock.sched 1.9490 5 schedule_timeout 0.0262 473008 total 0.1538 28 default_idle 0.6222 443439 poll_idle 7645.5000 69 cpu_idle 1.0781 1 __up 0.0333 9 need_resched 0.1800 133 system_call 3.0227 3 syscall_call 0.2727 9 syscall_exit 0.8182 2 handle_IRQ_event 0.0200 2 old_mmap 0.0060 1 sys_ipc 0.0016 2 show_cpuinfo 0.0030 1 get_offset_tsc 0.0435 56 sched_clock 0.4118 1 flush_tlb_page 0.0056 5 pte_alloc_one 0.0649 2 pgd_ctor 0.0119 19 do_page_fault 0.0136 1583 finish_task_switch 10.6242 1 sched_migrate_task 0.0050 1049 __wake_up 8.8898 198 __might_sleep 0.9384 81 add_wait_queue 0.6532 55 remove_wait_queue 0.4297 35 prepare_to_wait 0.2381 47 finish_wait 0.2975 1 dup_task_struct 0.0047 1 mm_init 0.0040 1 copy_mm 0.0009 1 copy_process 0.0003 6 .text.lock.fork 0.0303 1 exit_notify 0.0004 1 sys_wait4 0.0016 592 current_kernel_time 8.5797 5361 __do_softirq 30.9884 198 local_bh_enable 1.3750 674 __mod_timer 1.3037 86 mod_timer 0.8113 321 del_timer 2.0844 1 del_timer_sync 0.0055 3 .text.lock.timer 0.0326 1 sigprocmask 0.0041 1 groups_search 0.0094 1 rcu_do_batch 0.0323 55 add_to_page_cache 0.2245 14 page_waitqueue 0.2917 41 wake_up_page 0.5325 11 unlock_page 0.2973 6 end_page_writeback 0.0811 45 find_get_page 0.4018 29 find_lock_page 0.1000 1 find_get_pages 0.0078 46 find_get_pages_tag 0.2893 1 do_generic_mapping_read 0.0008 1 file_read_actor 0.0041 1 __generic_file_aio_read 0.0018 5 filemap_nopage 0.0053 8 remove_suid 0.0537 131 generic_file_aio_write_nolock 0.0452 21 generic_file_aio_write 0.1329 34 mempool_alloc 0.0892 24 mempool_free 0.1143 1 mempool_free_slab 0.0476 20 bad_range 0.2000 18 prep_new_page 0.2222 37 free_hot_cold_page 0.1242 167 buffered_rmqueue 0.3139 89 __alloc_pages 0.1002 9 __get_free_pages 0.1525 20 __free_pages 0.2564 2 free_pages 0.0444 1 __read_page_state 0.0179 10 balance_dirty_pages_ratelimited 0.0498 63 __set_page_dirty_nobuffers 0.1676 3 set_page_dirty 0.0357 8 clear_page_dirty_for_io 0.0702 40 test_clear_page_writeback 0.1569 52 test_set_page_writeback 0.1733 1 .text.lock.page_writeback 0.0078 1 pdflush_operation 0.0042 1 file_ra_state_init 0.0270 1 do_page_cache_readahead 0.0022 1 page_cache_readahead 0.0018 1 kmem_getpages 0.0048 1 alloc_slabmgmt 0.0104 5 cache_init_objs 0.0481 1 set_slab_attr 0.0172 4 cache_grow 0.0088 174 kmem_cache_alloc 1.4146 4 kmem_ptr_validate 0.0526 75 __kmalloc 0.4870 196 kmem_cache_free 2.2529 223 kfree 2.0459 21 mark_page_accessed 0.4038 1 lru_cache_add_active 0.0105 32 release_pages 0.0708 29 __pagevec_lru_add 0.0915 3 __pagevec_lru_add_active 0.0089 8 percpu_counter_mod 0.0457 1 clear_page_tables 0.0032 2 pte_alloc_map 0.0081 12 copy_page_range 0.0155 24 zap_pte_range 0.0346 22 do_wp_page 0.0259 37 do_anonymous_page 0.0824 278 do_no_page 0.3120 5 handle_mm_fault 0.0114 3 remove_vm_struct 0.0185 1 __vma_link 0.0087 1 vma_merge 0.0020 2 do_mmap_pgoff 0.0011 2 get_unmapped_area 0.0067 2 find_vma 0.0247 2 do_munmap 0.0044 1 sys_munmap 0.0082 1 exit_mmap 0.0022 1 anon_vma_prepare 0.0028 1 page_add_anon_rmap 0.0031 2 page_add_file_rmap 0.0093 9 page_remove_rmap 0.0377 1 free_pages_and_swap_cache 0.0076 1 filp_open 0.0095 2 dentry_open 0.0051 13 do_sync_read 0.0751 52 vfs_read 0.1763 23 do_sync_write 0.1329 52 vfs_write 0.1763 34 sys_read 0.2656 12 sys_write 0.0938 35 fput 1.6667 80 fget 0.6250 35 fget_light 0.2096 1 file_move 0.0071 7 bh_waitq_head 0.3182 69 wake_up_buffer 0.8313 32 unlock_buffer 1.3333 1 __wait_on_buffer 0.0061 10 __set_page_buffers 0.4000 1 __clear_page_buffers 0.0141 95 end_buffer_write_sync 0.7851 17 __find_get_block_slow 0.0393 1 buffer_insert_list 0.0067 15 create_buffers 0.0920 13 mark_buffer_dirty 0.3250 52 __brelse 0.6667 1 bh_lru_install 0.0044 145 __find_get_block 0.5894 20 __getblk 0.1980 16 __bread 0.2424 7 set_bh_page 0.1296 18 create_empty_buffers 0.0891 5 unmap_underlying_metadata 0.0442 46 __block_write_full_page 0.0479 63 __block_prepare_write 0.0634 28 __block_commit_write 0.1879 6 block_prepare_write 0.0779 23 generic_commit_write 0.1554 22 block_write_full_page 0.0824 27 end_bio_bh_io_sync 0.4355 32 submit_bh 0.0982 41 ll_rw_block 0.3015 2 recalc_bh_state 0.0112 8 alloc_buffer_head 0.0762 31 init_buffer_head 0.5849 9 bio_destructor 0.0957 23 bio_alloc 0.0540 48 bio_put 0.8889 3 bio_endio 0.0236 1 vfs_getattr 0.0065 1 cp_new_stat64 0.0037 8 inode_add_bytes 0.0563 1 copy_strings 0.0018 1 compute_creds 0.0053 84 pipe_wait 0.4693 212 pipe_readv 0.2999 9 pipe_read 0.1525 117 pipe_writev 0.1411 6 pipe_write 0.1017 146 pipe_poll 1.1774 1 vfs_permission 0.0032 2 do_lookup 0.0124 5 link_path_walk 0.0013 3 path_lookup 0.0064 1 __lookup_hash 0.0047 2 open_namei 0.0011 13 kill_fasync 0.1121 28 poll_freewait 0.4375 27 __pollwait 0.1371 23 max_select_fd 0.1022 143 do_select 0.1829 1 select_bits_alloc 0.0312 2 select_bits_free 0.4000 106 sys_select 0.0822 1 dput 0.0016 5 __d_lookup 0.0120 1 iput 0.0081 130 inode_times_differ 1.9118 34 update_atime 0.1532 52 inode_update_time 0.2430 1 wake_up_inode 0.0139 203 dnotify_parent 0.8024 1 lookup_mnt 0.0060 2 seq_printf 0.0233 103 __mark_inode_dirty 0.2128 3 writeback_inodes 0.0075 1 writeback_acquire 0.0455 9 mpage_writepages 0.0107 1 proc_lookup 0.0030 2 show_stat 0.0009 14 write_profile 0.0897 23 ext3_get_group_desc 0.1223 8 read_block_bitmap 0.0526 3 find_next_usable_block 0.0035 50 ext3_try_to_allocate 0.0562 9 ext3_has_free_blocks 0.0732 59 ext3_new_block 0.0454 20 ext3_file_write 0.0939 4 ext3_alloc_block 0.0678 21 ext3_block_to_path 0.0660 38 ext3_get_branch 0.1610 25 ext3_find_goal 0.1825 15 ext3_alloc_branch 0.0217 40 ext3_splice_branch 0.0844 69 ext3_get_block_handle 0.0776 11 ext3_get_block 0.0632 76 walk_page_buffers 0.6786 30 ext3_prepare_write 0.0943 11 ext3_journal_dirty_data 0.1183 112 ext3_ordered_commit_write 0.4891 13 bget_one 1.1818 7 journal_dirty_data_fn 0.3684 20 ext3_ordered_writepage 0.0434 82 ext3_get_inode_block 0.3142 37 ext3_get_inode_loc 0.0582 112 ext3_do_update_inode 0.1213 46 ext3_writepage_trans_blocks 0.3239 28 ext3_mark_iloc_dirty 0.5091 34 ext3_reserve_inode_write 0.1611 14 ext3_mark_inode_dirty 0.1728 32 ext3_dirty_inode 0.2370 19 ext3_journal_start 0.2135 18 __ext3_journal_stop 0.2250 73 start_this_handle 0.0569 12 new_handle 0.1500 18 journal_start 0.0857 166 do_get_write_access 0.0929 20 journal_get_write_access 0.2469 27 journal_get_undo_access 0.0651 74 journal_dirty_data 0.1012 134 journal_dirty_metadata 0.2441 91 journal_stop 0.1118 101 __journal_unfile_buffer 0.1954 53 __journal_file_buffer 0.0756 1 journal_end_buffer_io_sync 0.0323 35 inverted_lock 0.3646 253 journal_commit_transaction 0.0414 2 journal_brelse_array 0.0455 51 journal_cancel_revoke 0.1470 1 journal_write_revoke_records 0.0039 13 __log_space_left 0.1262 1 journal_bmap 0.0059 5 journal_blocks_per_page 0.1724 5 journal_alloc_journal_head 0.0431 2 journal_free_journal_head 0.0714 271 journal_add_journal_head 0.7404 57 __journal_remove_journal_head 0.1432 69 journal_remove_journal_head 0.5565 96 journal_put_journal_head 0.4305 1 ipc_lock 0.0062 1 kobject_put 0.0400 13 radix_tree_preload 0.0734 1 number 0.0013 9 vsnprintf 0.0073 1 find_next_zero_bit 0.0057 35 csum_partial 0.1215 2 atomic_dec_and_lock 0.0172 13 memcpy 0.2281 1 strncpy_from_user 0.0101 5950 __copy_user_intel 34.5930 4272 __copy_user_zeroing_intel 24.8372 97 __copy_to_user_ll 0.8083 2251 __copy_from_user_ll 18.7583 25 copy_to_user 0.2551 28 copy_from_user 0.2222 1 add_timer_randomness 0.0034 1 add_disk_randomness 0.0192 1 generic_unplug_device 0.0100 4 blk_run_queue 0.0323 5 get_request 0.0067 101 __make_request 0.0727 19 generic_make_request 0.0386 10 submit_bio 0.0346 66 __end_that_request_first 0.1255 4 put_io_context 0.0455 1 get_io_context 0.0080 14 .text.lock.ll_rw_blk 0.1029 5 as_set_request 0.0382 326 e1000_xmit_frame 0.1532 14 scsi_put_command 0.0619 37 scsi_dispatch_cmd 0.0686 6 scsi_finish_command 0.0335 5 scsi_add_timer 0.0463 1 scsi_decide_disposition 0.0033 3 scsi_init_cmd_errh 0.0156 15 scsi_device_unbusy 0.0815 6 scsi_run_queue 0.0218 31 scsi_end_request 0.1174 4 scsi_io_completion 0.0039 172 scsi_request_fn 0.1585 11 .text.lock.scsi_lib 0.0514 67 ahc_linux_isr 0.0964 3 sd_rw_intr 0.0045 1 sock_alloc 0.0079 26 sock_aio_read 0.0884 22 sock_aio_write 0.0748 16 sock_poll 0.3265 235 sock_wfree 3.0921 16 __release_sock 0.1039 342 sock_def_readable 1.9000 16 sk_reset_timer 0.3404 80 lock_sock 0.6452 45 release_sock 0.2961 35 sock_common_recvmsg 0.2991 179 .text.lock.sock 1.4435 246 alloc_skb 1.0982 384 skb_release_data 2.2069 17 kfree_skbmem 0.3864 627 __kfree_skb 2.7500 86 skb_clone 0.2240 27 copy_skb_header 0.1089 26 skb_copy 0.1171 269 skb_copy_bits 0.5114 2 skb_checksum 0.0032 23 memcpy_toiovec 0.2421 3 memcpy_tokerneliovec 0.0400 120 skb_copy_datagram_iovec 0.2214 27 sk_stream_rfree 1.0000 1 sk_stream_error 0.0108 13 skb_checksum_help 0.0401 66 dev_queue_xmit 0.0829 24 net_tx_action 0.0623 59 netif_receive_skb 0.1326 120 process_backlog 0.4396 66 net_rx_action 0.2548 188 nf_iterate 1.1394 91 nf_hook_slow 0.3182 151 qdisc_restart 0.2559 141 pfifo_fast_enqueue 0.9724 94 pfifo_fast_dequeue 1.1605 30 rt_hash_code 0.2190 253 ip_route_input 0.4651 37 ip_local_deliver 0.0731 171 ip_rcv 0.1338 56 ip_local_deliver_finish 0.1436 39 ip_rcv_finish 0.0602 21 ip_finish_output 0.0395 18 ip_output 0.1500 361 ip_queue_xmit 0.2394 14 dst_output 0.3415 235 ip_finish_output2 0.5305 126 tcp_poll 0.3281 169 tcp_sendmsg 0.0372 43 cleanup_rbuf 0.1396 422 tcp_recvmsg 0.2102 28 __tcp_grow_window 0.2137 50 tcp_rcv_rtt_update 0.5495 64 tcp_rcv_space_adjust 0.1963 239 tcp_event_data_recv 0.3997 23 tcp_rtt_estimator 0.0685 8 tcp_ack_saw_tstamp 0.0952 57 tcp_clean_rtx_queue 0.0599 36 tcp_ack 0.0246 3 tcp_data_queue 0.0010 1 tcp_cwnd_application_limited 0.0067 7 __tcp_data_snd_check 0.0297 68 __tcp_ack_snd_check 0.4224 1 tcp_urg 0.0041 797 tcp_rcv_established 0.3450 264 tcp_transmit_skb 0.1515 49 tcp_write_xmit 0.0676 23 __tcp_select_window 0.0774 29 tcp_send_delayed_ack 0.1312 87 tcp_send_ack 0.4462 514 __tcp_v4_lookup_established 1.9470 26 tcp_v4_send_check 0.1028 64 tcp_v4_do_rcv 0.2013 403 tcp_v4_rcv 0.2047 6 inet_sendmsg 0.0674 35 ip_confirm 0.7292 28 ip_conntrack_defrag 0.4000 16 ip_refrag 0.1119 17 ip_conntrack_local 0.1164 21 __ip_ct_find_proto 0.3231 241 ip_ct_find_proto 2.2523 61 hash_conntrack 0.3961 39 get_tuple 0.4194 2 invert_tuple 0.0426 76 __ip_conntrack_find 0.3470 129 ip_conntrack_find_get 1.0661 9 ip_conntrack_get 0.2500 1 init_conntrack 0.0010 128 ip_conntrack_in 0.2081 307 ip_ct_refresh 1.6158 1 ip_ct_gather_frags 0.0052 20 tcp_pkt_to_tuple 0.2353 8 get_conntrack_index 0.1311 461 tcp_packet 0.9746 964 ipt_do_table 0.9948 18 ipt_hook 0.3051 15 ipt_local_out_hook 0.1282 34 ipt_route_hook 0.5763 26 ipt_local_hook 0.1116 73 ip_nat_fn 0.1213 20 ip_nat_out 0.1163 213 do_bindings 0.2613 1 unix_release_sock 0.0010 12 __sched_text_start 0.0414 2 __read_lock_failed 0.1000 241 schedule 0.1158 2 __preempt_spin_lock 0.0220 370 .text.lock.sched 1.8878 2 schedule_timeout 0.0105 487741 total 0.1585 23 default_idle 0.5111 416561 poll_idle 7182.0862 35 cpu_idle 0.5469 1 sys_set_thread_area 0.0020 6 need_resched 0.1200 119 system_call 2.7045 5 syscall_call 0.4545 11 syscall_exit 1.0000 3 handle_IRQ_event 0.0300 3 show_cpuinfo 0.0044 29 sched_clock 0.2132 1 flush_tlb_page 0.0056 3 pte_alloc_one 0.0390 1 pgd_ctor 0.0060 15 do_page_fault 0.0107 1691 finish_task_switch 11.3490 1 nr_context_switches 0.0070 1006 __wake_up 8.5254 204 __might_sleep 0.9668 88 add_wait_queue 0.7097 54 remove_wait_queue 0.4219 26 prepare_to_wait 0.1769 37 finish_wait 0.2342 1 mm_alloc 0.0154 1 copy_mm 0.0009 1 copy_files 0.0010 1 copy_process 0.0003 8 .text.lock.fork 0.0404 2 release_task 0.0037 1 sys_waitpid 0.0233 102 current_kernel_time 1.4783 5158 __do_softirq 29.8150 167 local_bh_enable 1.1597 596 __mod_timer 1.1528 106 mod_timer 1.0000 307 del_timer 1.9935 2 .text.lock.timer 0.0217 1 get_signal_to_deliver 0.0010 1 do_sigaction 0.0016 1 wait_on_page_writeback_range 0.0031 52 add_to_page_cache 0.2122 13 page_waitqueue 0.2708 35 wake_up_page 0.4545 20 unlock_page 0.5405 19 end_page_writeback 0.2568 54 find_get_page 0.4821 33 find_lock_page 0.1138 45 find_get_pages_tag 0.2830 1 do_generic_mapping_read 0.0008 2 filemap_nopage 0.0021 7 remove_suid 0.0470 139 generic_file_aio_write_nolock 0.0480 16 generic_file_aio_write 0.1013 48 mempool_alloc 0.1260 20 mempool_free 0.0952 2 mempool_alloc_slab 0.0952 2 mempool_free_slab 0.0952 27 bad_range 0.2700 12 prep_new_page 0.1481 45 free_hot_cold_page 0.1510 152 buffered_rmqueue 0.2857 84 __alloc_pages 0.0946 6 __get_free_pages 0.1017 1 __pagevec_free 0.0303 14 __free_pages 0.1795 1 free_pages 0.0222 9 balance_dirty_pages_ratelimited 0.0448 1 do_writepages 0.0149 54 __set_page_dirty_nobuffers 0.1436 4 set_page_dirty 0.0476 12 clear_page_dirty_for_io 0.1053 51 test_clear_page_writeback 0.2000 64 test_set_page_writeback 0.2133 21 .text.lock.page_writeback 0.1641 1 pdflush_operation 0.0042 1 prio_tree_insert 0.0026 1 vma_prio_tree_remove 0.0039 2 do_page_cache_readahead 0.0043 13 cache_init_objs 0.1250 2 kmem_flagcheck 0.0465 5 cache_grow 0.0110 161 kmem_cache_alloc 1.3089 2 kmem_ptr_validate 0.0263 74 __kmalloc 0.4805 197 kmem_cache_free 2.2644 191 kfree 1.7523 28 mark_page_accessed 0.5385 1 lru_cache_add_active 0.0105 30 release_pages 0.0664 33 __pagevec_lru_add 0.1041 3 __pagevec_lru_add_active 0.0089 1 pagevec_lookup_tag 0.0156 12 percpu_counter_mod 0.0686 2 blk_queue_bounce 0.0260 4 clear_page_tables 0.0130 2 pte_alloc_map 0.0081 12 copy_page_range 0.0155 24 zap_pte_range 0.0346 2 unmap_vmas 0.0035 19 do_wp_page 0.0224 27 do_anonymous_page 0.0601 388 do_no_page 0.4355 6 handle_mm_fault 0.0137 1 __remove_shared_vm_struct 0.0101 1 remove_vm_struct 0.0062 1 __insert_vm_struct 0.0076 1 vma_adjust 0.0010 4 do_mmap_pgoff 0.0022 5 find_vma 0.0617 1 do_munmap 0.0022 1 change_protection 0.0022 1 anon_vma_prepare 0.0028 1 anon_vma_link 0.0079 1 page_add_anon_rmap 0.0031 1 page_add_file_rmap 0.0046 11 page_remove_rmap 0.0460 2 free_pages_and_swap_cache 0.0153 1 dentry_open 0.0025 1 get_unused_fd 0.0039 1 sys_open 0.0060 9 do_sync_read 0.0520 67 vfs_read 0.2271 21 do_sync_write 0.1214 56 vfs_write 0.1898 24 sys_read 0.1875 24 sys_write 0.1875 1 get_empty_filp 0.0043 51 fput 2.4286 83 fget 0.6484 44 fget_light 0.2635 2 file_move 0.0142 5 bh_waitq_head 0.2273 76 wake_up_buffer 0.9157 39 unlock_buffer 1.6250 17 __set_page_buffers 0.6800 70 end_buffer_write_sync 0.5785 16 __find_get_block_slow 0.0370 22 end_buffer_async_write 0.0712 1 buffer_insert_list 0.0067 24 create_buffers 0.1472 1 grow_dev_page 0.0025 7 mark_buffer_dirty 0.1750 43 __brelse 0.5513 2 bh_lru_install 0.0088 157 __find_get_block 0.6382 15 __getblk 0.1485 10 __bread 0.1515 10 set_bh_page 0.1852 1 try_to_release_page 0.0091 25 create_empty_buffers 0.1238 9 unmap_underlying_metadata 0.0796 46 __block_write_full_page 0.0479 53 __block_prepare_write 0.0534 14 __block_commit_write 0.0940 9 block_prepare_write 0.1169 9 generic_commit_write 0.0608 23 block_write_full_page 0.0861 31 end_bio_bh_io_sync 0.5000 41 submit_bh 0.1258 22 ll_rw_block 0.1618 3 recalc_bh_state 0.0168 15 alloc_buffer_head 0.1429 30 init_buffer_head 0.5660 5 .text.lock.buffer 0.0269 7 bio_destructor 0.0745 21 bio_alloc 0.0493 59 bio_put 1.0926 4 bio_endio 0.0315 1 chrdev_open 0.0017 2 cp_new_stat64 0.0074 1 sys_fstat64 0.0175 16 inode_add_bytes 0.1127 1 copy_strings 0.0018 63 pipe_wait 0.3520 211 pipe_readv 0.2984 17 pipe_read 0.2881 177 pipe_writev 0.2135 4 pipe_write 0.0678 1 bad_pipe_r 0.1667 113 pipe_poll 0.9113 1 vfs_permission 0.0032 1 deny_write_access 0.0072 1 follow_mount 0.0068 2 do_lookup 0.0124 7 link_path_walk 0.0018 2 path_lookup 0.0042 2 may_open 0.0039 1 open_namei 0.0006 19 kill_fasync 0.1638 3 poll_initwait 0.1200 31 poll_freewait 0.4844 28 __pollwait 0.1421 20 max_select_fd 0.0889 150 do_select 0.1918 6 select_bits_alloc 0.1875 1 select_bits_free 0.2000 119 sys_select 0.0922 1 locks_remove_posix 0.0030 3 dput 0.0049 7 __d_lookup 0.0168 108 inode_times_differ 1.5882 28 update_atime 0.1261 37 inode_update_time 0.1729 1 wake_up_inode 0.0139 193 dnotify_parent 0.7628 1 seq_read 0.0014 1 seq_printf 0.0116 49 __mark_inode_dirty 0.1012 1 sync_sb_inodes 0.0013 1 writeback_inodes 0.0025 11 mpage_writepages 0.0131 1 load_elf_interp 0.0016 1 proc_alloc_inode 0.0085 2 proc_lookup 0.0060 4 show_stat 0.0018 10 write_profile 0.0641 27 ext3_get_group_desc 0.1436 11 read_block_bitmap 0.0724 1 find_next_usable_block 0.0012 75 ext3_try_to_allocate 0.0843 7 ext3_has_free_blocks 0.0569 64 ext3_new_block 0.0493 25 ext3_file_write 0.1174 6 ext3_alloc_block 0.1017 20 ext3_block_to_path 0.0629 24 ext3_get_branch 0.1017 16 ext3_find_goal 0.1168 18 ext3_alloc_branch 0.0260 38 ext3_splice_branch 0.0802 82 ext3_get_block_handle 0.0922 17 ext3_get_block 0.0977 68 walk_page_buffers 0.6071 22 ext3_prepare_write 0.0692 3 ext3_journal_dirty_data 0.0323 99 ext3_ordered_commit_write 0.4323 14 bget_one 1.2727 3 bput_one 0.2727 2 journal_dirty_data_fn 0.1053 9 ext3_ordered_writepage 0.0195 47 ext3_get_inode_block 0.1801 37 ext3_get_inode_loc 0.0582 93 ext3_do_update_inode 0.1008 26 ext3_writepage_trans_blocks 0.1831 33 ext3_mark_iloc_dirty 0.6000 27 ext3_reserve_inode_write 0.1280 20 ext3_mark_inode_dirty 0.2469 18 ext3_dirty_inode 0.1333 21 ext3_journal_start 0.2360 19 __ext3_journal_stop 0.2375 58 start_this_handle 0.0452 22 new_handle 0.2750 33 journal_start 0.1571 175 do_get_write_access 0.0980 24 journal_get_write_access 0.2963 31 journal_get_undo_access 0.0747 68 journal_dirty_data 0.0930 131 journal_dirty_metadata 0.2386 89 journal_stop 0.1093 93 __journal_unfile_buffer 0.1799 44 __journal_file_buffer 0.0628 1 journal_file_buffer 0.0046 26 inverted_lock 0.2708 237 journal_commit_transaction 0.0388 2 journal_brelse_array 0.0455 1 __journal_clean_checkpoint_list 0.0057 60 journal_cancel_revoke 0.1729 1 journal_write_revoke_records 0.0039 8 __log_space_left 0.0777 9 journal_blocks_per_page 0.3103 6 journal_alloc_journal_head 0.0517 4 journal_free_journal_head 0.1429 268 journal_add_journal_head 0.7322 55 __journal_remove_journal_head 0.1382 58 journal_remove_journal_head 0.4677 104 journal_put_journal_head 0.4664 1 ipc_lock 0.0062 11 radix_tree_preload 0.0621 1 rb_insert_color 0.0044 4 vsnprintf 0.0032 1 find_next_zero_bit 0.0057 25 csum_partial 0.0868 2 atomic_dec_and_lock 0.0172 19 memcpy 0.3333 3 strncpy_from_user 0.0303 6130 __copy_user_intel 35.6395 4451 __copy_user_zeroing_intel 25.8779 86 __copy_to_user_ll 0.7167 2375 __copy_from_user_ll 19.7917 38 copy_to_user 0.3878 17 copy_from_user 0.1349 2 add_disk_randomness 0.0385 1 put_device 0.1000 1 elv_set_request 0.0172 2 blk_run_queue 0.0161 2 get_request 0.0027 115 __make_request 0.0827 3 generic_make_request 0.0061 11 submit_bio 0.0381 52 __end_that_request_first 0.0989 1 put_io_context 0.0114 10 .text.lock.ll_rw_blk 0.0735 1 as_set_request 0.0076 327 e1000_xmit_frame 0.1537 8 scsi_put_command 0.0354 16 scsi_dispatch_cmd 0.0297 2 scsi_softirq 0.0096 2 scsi_finish_command 0.0112 2 scsi_add_timer 0.0185 2 scsi_init_cmd_errh 0.0104 5 scsi_device_unbusy 0.0272 2 scsi_run_queue 0.0073 17 scsi_end_request 0.0644 2 scsi_free_sgtable 0.0444 1 scsi_io_completion 0.0010 122 scsi_request_fn 0.1124 12 .text.lock.scsi_lib 0.0561 37 ahc_linux_isr 0.0532 1 .text.lock.aic7xxx_osm 0.0014 3 sd_rw_intr 0.0045 18 sock_aio_read 0.0612 9 sock_aio_write 0.0306 17 sock_poll 0.3469 1 __sock_create 0.0027 180 sock_wfree 2.3684 19 __release_sock 0.1234 297 sock_def_readable 1.6500 8 sk_reset_timer 0.1702 73 lock_sock 0.5887 48 release_sock 0.3158 41 sock_common_recvmsg 0.3504 163 .text.lock.sock 1.3145 239 alloc_skb 1.0670 397 skb_release_data 2.2816 16 kfree_skbmem 0.3636 637 __kfree_skb 2.7939 66 skb_clone 0.1719 34 copy_skb_header 0.1371 21 skb_copy 0.0946 310 skb_copy_bits 0.5894 1 skb_checksum 0.0016 15 memcpy_toiovec 0.1579 1 memcpy_tokerneliovec 0.0133 122 skb_copy_datagram_iovec 0.2251 37 sk_stream_rfree 1.3704 4 sk_stream_error 0.0430 33 skb_checksum_help 0.1019 88 dev_queue_xmit 0.1106 27 net_tx_action 0.0701 62 netif_receive_skb 0.1393 101 process_backlog 0.3700 58 net_rx_action 0.2239 194 nf_iterate 1.1758 89 nf_hook_slow 0.3112 141 qdisc_restart 0.2390 144 pfifo_fast_enqueue 0.9931 106 pfifo_fast_dequeue 1.3086 19 rt_hash_code 0.1387 261 ip_route_input 0.4798 45 ip_local_deliver 0.0889 145 ip_rcv 0.1135 75 ip_local_deliver_finish 0.1923 42 ip_rcv_finish 0.0648 22 ip_finish_output 0.0414 19 ip_output 0.1583 373 ip_queue_xmit 0.2473 9 dst_output 0.2195 234 ip_finish_output2 0.5282 116 tcp_poll 0.3021 173 tcp_sendmsg 0.0381 48 cleanup_rbuf 0.1558 414 tcp_recvmsg 0.2062 162 __tcp_grow_window 1.2366 109 tcp_rcv_rtt_update 1.1978 99 tcp_rcv_space_adjust 0.3037 403 tcp_event_data_recv 0.6739 29 tcp_rtt_estimator 0.0863 1 tcp_try_to_open 0.0020 10 tcp_ack_saw_tstamp 0.1190 72 tcp_clean_rtx_queue 0.0757 39 tcp_ack 0.0266 1 tcp_ofo_queue 0.0016 2 tcp_data_queue 0.0007 11 __tcp_data_snd_check 0.0466 49 __tcp_ack_snd_check 0.3043 1 tcp_urg 0.0041 824 tcp_rcv_established 0.3567 257 tcp_transmit_skb 0.1475 51 tcp_write_xmit 0.0703 31 __tcp_select_window 0.1044 20 tcp_send_delayed_ack 0.0905 64 tcp_send_ack 0.3282 458 __tcp_v4_lookup_established 1.7348 22 tcp_v4_send_check 0.0870 50 tcp_v4_do_rcv 0.1572 430 tcp_v4_rcv 0.2184 3 inet_sendmsg 0.0337 22 ip_confirm 0.4583 31 ip_conntrack_defrag 0.4429 13 ip_refrag 0.0909 16 ip_conntrack_local 0.1096 18 __ip_ct_find_proto 0.2769 224 ip_ct_find_proto 2.0935 71 hash_conntrack 0.4610 30 get_tuple 0.3226 2 invert_tuple 0.0426 82 __ip_conntrack_find 0.3744 163 ip_conntrack_find_get 1.3471 18 ip_conntrack_get 0.5000 112 ip_conntrack_in 0.1821 296 ip_ct_refresh 1.5579 4 ip_ct_gather_frags 0.0207 31 tcp_pkt_to_tuple 0.3647 9 get_conntrack_index 0.1475 460 tcp_packet 0.9725 908 ipt_do_table 0.9370 13 ipt_hook 0.2203 17 ipt_local_out_hook 0.1453 30 ipt_route_hook 0.5085 29 ipt_local_hook 0.1245 63 ip_nat_fn 0.1047 22 ip_nat_out 0.1279 186 do_bindings 0.2282 1 unix_create1 0.0023 4 __sched_text_start 0.0138 1 __down_failed 0.0833 1 __write_lock_failed 0.0312 2 __read_lock_failed 0.1000 236 schedule 0.1134 3 __preempt_spin_lock 0.0330 387 .text.lock.sched 1.9745 1 schedule_timeout 0.0052 460551 total 0.1497 21 default_idle 0.4667 415641 poll_idle 7166.2241 43 cpu_idle 0.6719 4 need_resched 0.0800 137 system_call 3.1136 4 syscall_call 0.3636 6 syscall_exit 0.5455 1 error_code 0.0179 5 handle_IRQ_event 0.0500 1 sys_mmap2 0.0047 1 sys_ipc 0.0016 1 show_cpuinfo 0.0015 34 sched_clock 0.2500 1 flush_tlb_others 0.0033 1 flush_tlb_page 0.0056 3 pte_alloc_one 0.0390 25 do_page_fault 0.0179 1 try_to_wake_up 0.0015 1701 finish_task_switch 11.4161 1 nr_context_switches 0.0070 1032 __wake_up 8.7458 227 __might_sleep 1.0758 104 add_wait_queue 0.8387 63 remove_wait_queue 0.4922 36 prepare_to_wait 0.2449 42 finish_wait 0.2658 2 copy_mm 0.0017 1 copy_files 0.0010 1 copy_process 0.0003 1 do_fork 0.0022 4 .text.lock.fork 0.0202 1 release_task 0.0018 1 sys_wait4 0.0016 95 current_kernel_time 1.3768 5236 __do_softirq 30.2659 159 local_bh_enable 1.1042 593 __mod_timer 1.1470 106 mod_timer 1.0000 325 del_timer 2.1104 1 del_timer_sync 0.0055 48 add_to_page_cache 0.1959 7 page_waitqueue 0.1458 49 wake_up_page 0.6364 20 unlock_page 0.5405 14 end_page_writeback 0.1892 43 find_get_page 0.3839 37 find_lock_page 0.1276 49 find_get_pages_tag 0.3082 2 do_generic_mapping_read 0.0016 9 filemap_nopage 0.0095 10 remove_suid 0.0671 116 generic_file_aio_write_nolock 0.0400 21 generic_file_aio_write 0.1329 51 mempool_alloc 0.1339 12 mempool_free 0.0571 2 mempool_alloc_slab 0.0952 2 mempool_free_slab 0.0952 23 bad_range 0.2300 8 prep_new_page 0.0988 42 free_hot_cold_page 0.1409 1 free_hot_page 0.1429 190 buffered_rmqueue 0.3571 66 __alloc_pages 0.0743 7 __get_free_pages 0.1186 1 get_zeroed_page 0.0098 15 __free_pages 0.1923 2 free_pages 0.0444 1 nr_free_pages 0.0159 1 get_writeback_state 0.0128 1 balance_dirty_pages 0.0032 7 balance_dirty_pages_ratelimited 0.0348 63 __set_page_dirty_nobuffers 0.1676 4 set_page_dirty 0.0476 18 clear_page_dirty_for_io 0.1579 45 test_clear_page_writeback 0.1765 61 test_set_page_writeback 0.2033 14 .text.lock.page_writeback 0.1094 1 __pdflush 0.0018 1 prio_tree_replace 0.0101 2 prio_tree_insert 0.0052 1 prio_tree_remove 0.0044 1 vma_prio_tree_remove 0.0039 1 page_cache_readahead 0.0018 2 kmem_getpages 0.0096 2 alloc_slabmgmt 0.0208 6 cache_init_objs 0.0577 1 kmem_flagcheck 0.0233 6 cache_grow 0.0132 160 kmem_cache_alloc 1.3008 4 kmem_ptr_validate 0.0526 80 __kmalloc 0.5195 193 kmem_cache_free 2.2184 211 kfree 1.9358 31 mark_page_accessed 0.5962 1 lru_cache_add_active 0.0105 32 release_pages 0.0708 29 __pagevec_lru_add 0.0915 2 __pagevec_lru_add_active 0.0060 1 pagevec_lookup_tag 0.0156 14 percpu_counter_mod 0.0800 1 blk_queue_bounce 0.0130 1 clear_page_tables 0.0032 7 copy_page_range 0.0090 21 zap_pte_range 0.0303 2 unmap_vmas 0.0035 16 do_wp_page 0.0189 15 do_anonymous_page 0.0334 282 do_no_page 0.3165 5 handle_mm_fault 0.0114 1 vma_link 0.0030 1 __insert_vm_struct 0.0076 1 vma_merge 0.0020 2 find_vma 0.0247 1 unmap_region 0.0035 1 change_protection 0.0022 2 anon_vma_unlink 0.0128 3 page_add_anon_rmap 0.0092 1 page_add_file_rmap 0.0046 12 page_remove_rmap 0.0502 1 dentry_open 0.0025 1 get_unused_fd 0.0039 2 filp_close 0.0149 10 do_sync_read 0.0578 74 vfs_read 0.2508 16 do_sync_write 0.0925 58 vfs_write 0.1966 27 sys_read 0.2109 30 sys_write 0.2344 30 fput 1.4286 3 __fput 0.0142 100 fget 0.7812 44 fget_light 0.2635 4 bh_waitq_head 0.1818 70 wake_up_buffer 0.8434 34 unlock_buffer 1.4167 17 __set_page_buffers 0.6800 86 end_buffer_write_sync 0.7107 23 __find_get_block_slow 0.0531 17 end_buffer_async_write 0.0550 1 buffer_insert_list 0.0067 17 create_buffers 0.1043 1 grow_dev_page 0.0025 6 mark_buffer_dirty 0.1500 36 __brelse 0.4615 1 bh_lru_install 0.0044 150 __find_get_block 0.6098 13 __getblk 0.1287 14 __bread 0.2121 4 set_bh_page 0.0741 1 try_to_release_page 0.0091 26 create_empty_buffers 0.1287 4 unmap_underlying_metadata 0.0354 46 __block_write_full_page 0.0479 63 __block_prepare_write 0.0634 26 __block_commit_write 0.1745 9 block_prepare_write 0.1169 5 generic_commit_write 0.0338 13 block_write_full_page 0.0487 24 end_bio_bh_io_sync 0.3871 36 submit_bh 0.1104 28 ll_rw_block 0.2059 7 recalc_bh_state 0.0391 10 alloc_buffer_head 0.0952 26 init_buffer_head 0.4906 4 .text.lock.buffer 0.0215 11 bio_destructor 0.1170 16 bio_alloc 0.0376 50 bio_put 0.9259 7 bio_endio 0.0551 1 cp_new_stat64 0.0037 13 inode_add_bytes 0.0915 1 copy_strings 0.0018 1 do_execve 0.0015 46 pipe_wait 0.2570 232 pipe_readv 0.3281 5 pipe_read 0.0847 147 pipe_writev 0.1773 4 pipe_write 0.0678 127 pipe_poll 1.0242 1 getname 0.0041 1 vfs_permission 0.0032 1 follow_mount 0.0068 1 do_lookup 0.0062 6 link_path_walk 0.0015 1 open_namei 0.0006 6 kill_fasync 0.0517 1 poll_initwait 0.0400 32 poll_freewait 0.5000 36 __pollwait 0.1827 19 max_select_fd 0.0844 169 do_select 0.2161 10 select_bits_alloc 0.3125 3 select_bits_free 0.6000 113 sys_select 0.0876 1 dput 0.0016 1 d_lookup 0.0125 8 __d_lookup 0.0192 1 d_rehash 0.0046 131 inode_times_differ 1.9265 16 update_atime 0.0721 37 inode_update_time 0.1729 199 dnotify_parent 0.7866 60 __mark_inode_dirty 0.1240 14 mpage_writepages 0.0167 1 proc_lookup 0.0030 1 meminfo_read_proc 0.0020 9 show_stat 0.0040 8 write_profile 0.0513 30 ext3_get_group_desc 0.1596 14 read_block_bitmap 0.0921 2 find_next_usable_block 0.0024 63 ext3_try_to_allocate 0.0708 5 ext3_has_free_blocks 0.0407 55 ext3_new_block 0.0423 1 ext3_open_file 0.0222 21 ext3_file_write 0.0986 4 ext3_alloc_block 0.0678 24 ext3_block_to_path 0.0755 30 ext3_get_branch 0.1271 24 ext3_find_goal 0.1752 15 ext3_alloc_branch 0.0217 35 ext3_splice_branch 0.0738 63 ext3_get_block_handle 0.0709 11 ext3_get_block 0.0632 67 walk_page_buffers 0.5982 1 do_journal_get_write_access 0.0083 15 ext3_prepare_write 0.0472 4 ext3_journal_dirty_data 0.0430 94 ext3_ordered_commit_write 0.4105 15 bget_one 1.3636 1 bput_one 0.0909 7 journal_dirty_data_fn 0.3684 16 ext3_ordered_writepage 0.0347 62 ext3_get_inode_block 0.2375 27 ext3_get_inode_loc 0.0425 89 ext3_do_update_inode 0.0964 36 ext3_writepage_trans_blocks 0.2535 30 ext3_mark_iloc_dirty 0.5455 21 ext3_reserve_inode_write 0.0995 16 ext3_mark_inode_dirty 0.1975 20 ext3_dirty_inode 0.1481 22 ext3_journal_start 0.2472 7 __ext3_journal_stop 0.0875 64 start_this_handle 0.0499 16 new_handle 0.2000 19 journal_start 0.0905 187 do_get_write_access 0.1047 21 journal_get_write_access 0.2593 21 journal_get_undo_access 0.0506 70 journal_dirty_data 0.0958 129 journal_dirty_metadata 0.2350 116 journal_stop 0.1425 97 __journal_unfile_buffer 0.1876 34 __journal_file_buffer 0.0485 22 inverted_lock 0.2292 241 journal_commit_transaction 0.0395 1 journal_brelse_array 0.0227 67 journal_cancel_revoke 0.1931 1 journal_write_revoke_records 0.0039 6 __log_space_left 0.0583 10 journal_blocks_per_page 0.3448 5 journal_alloc_journal_head 0.0431 1 journal_free_journal_head 0.0357 243 journal_add_journal_head 0.6639 57 __journal_remove_journal_head 0.1432 48 journal_remove_journal_head 0.3871 83 journal_put_journal_head 0.3722 1 copy_semundo 0.0042 9 radix_tree_preload 0.0508 1 __rb_rotate_left 0.0179 1 skip_atoi 0.0154 5 number 0.0064 5 vsnprintf 0.0041 1 find_next_zero_bit 0.0057 33 csum_partial 0.1146 28 memcpy 0.4912 2 strncpy_from_user 0.0202 5942 __copy_user_intel 34.5465 4433 __copy_user_zeroing_intel 25.7733 106 __copy_to_user_ll 0.8833 2211 __copy_from_user_ll 18.4250 19 copy_to_user 0.1939 31 copy_from_user 0.2460 2 add_disk_randomness 0.0385 2 blk_run_queue 0.0161 3 get_request 0.0040 1 attempt_merge 0.0030 94 __make_request 0.0676 11 generic_make_request 0.0224 9 submit_bio 0.0311 59 __end_that_request_first 0.1122 2 put_io_context 0.0227 1 get_io_context 0.0080 10 .text.lock.ll_rw_blk 0.0735 2 as_set_request 0.0153 300 e1000_xmit_frame 0.1410 7 scsi_put_command 0.0310 36 scsi_dispatch_cmd 0.0668 2 scsi_finish_command 0.0112 2 scsi_add_timer 0.0185 2 scsi_decide_disposition 0.0067 8 scsi_init_cmd_errh 0.0417 10 scsi_device_unbusy 0.0543 2 scsi_run_queue 0.0073 37 scsi_end_request 0.1402 2 scsi_free_sgtable 0.0444 3 scsi_io_completion 0.0029 163 scsi_request_fn 0.1502 16 .text.lock.scsi_lib 0.0748 52 ahc_linux_isr 0.0748 4 sd_rw_intr 0.0060 24 sock_aio_read 0.0816 10 sock_aio_write 0.0340 14 sock_poll 0.2857 192 sock_wfree 2.5263 6 __release_sock 0.0390 309 sock_def_readable 1.7167 4 sk_reset_timer 0.0851 75 lock_sock 0.6048 48 release_sock 0.3158 38 sock_common_recvmsg 0.3248 175 .text.lock.sock 1.4113 225 alloc_skb 1.0045 367 skb_release_data 2.1092 13 kfree_skbmem 0.2955 620 __kfree_skb 2.7193 80 skb_clone 0.2083 34 copy_skb_header 0.1371 16 skb_copy 0.0721 284 skb_copy_bits 0.5399 10 skb_checksum 0.0162 23 memcpy_toiovec 0.2421 2 memcpy_tokerneliovec 0.0267 125 skb_copy_datagram_iovec 0.2306 31 sk_stream_rfree 1.1481 2 sk_stream_error 0.0215 19 skb_checksum_help 0.0586 99 dev_queue_xmit 0.1244 25 net_tx_action 0.0649 63 netif_receive_skb 0.1416 109 process_backlog 0.3993 52 net_rx_action 0.2008 204 nf_iterate 1.2364 110 nf_hook_slow 0.3846 157 qdisc_restart 0.2661 123 pfifo_fast_enqueue 0.8483 106 pfifo_fast_dequeue 1.3086 38 rt_hash_code 0.2774 1 rt_cache_get_first 0.0119 262 ip_route_input 0.4816 55 ip_local_deliver 0.1087 144 ip_rcv 0.1127 65 ip_local_deliver_finish 0.1667 46 ip_rcv_finish 0.0710 24 ip_finish_output 0.0451 16 ip_output 0.1333 358 ip_queue_xmit 0.2374 5 dst_output 0.1220 262 ip_finish_output2 0.5914 128 tcp_poll 0.3333 173 tcp_sendmsg 0.0381 54 cleanup_rbuf 0.1753 462 tcp_recvmsg 0.2301 30 __tcp_grow_window 0.2290 61 tcp_rcv_rtt_update 0.6703 30 tcp_rcv_space_adjust 0.0920 219 tcp_event_data_recv 0.3662 30 tcp_rtt_estimator 0.0893 11 tcp_ack_saw_tstamp 0.1310 58 tcp_clean_rtx_queue 0.0610 41 tcp_ack 0.0280 2 tcp_data_queue 0.0007 8 __tcp_data_snd_check 0.0339 63 __tcp_ack_snd_check 0.3913 788 tcp_rcv_established 0.3411 263 tcp_transmit_skb 0.1510 54 tcp_write_xmit 0.0745 32 __tcp_select_window 0.1077 19 tcp_send_delayed_ack 0.0860 76 tcp_send_ack 0.3897 493 __tcp_v4_lookup_established 1.8674 29 tcp_v4_send_check 0.1146 49 tcp_v4_do_rcv 0.1541 407 tcp_v4_rcv 0.2067 15 inet_sendmsg 0.1685 16 ip_confirm 0.3333 25 ip_conntrack_defrag 0.3571 19 ip_refrag 0.1329 16 ip_conntrack_local 0.1096 19 __ip_ct_find_proto 0.2923 230 ip_ct_find_proto 2.1495 67 hash_conntrack 0.4351 37 get_tuple 0.3978 70 __ip_conntrack_find 0.3196 157 ip_conntrack_find_get 1.2975 6 ip_conntrack_get 0.1667 133 ip_conntrack_in 0.2163 293 ip_ct_refresh 1.5421 26 tcp_pkt_to_tuple 0.3059 15 get_conntrack_index 0.2459 485 tcp_packet 1.0254 899 ipt_do_table 0.9278 22 ipt_hook 0.3729 5 ipt_local_out_hook 0.0427 30 ipt_route_hook 0.5085 26 ipt_local_hook 0.1116 42 ip_nat_fn 0.0698 19 ip_nat_out 0.1105 208 do_bindings 0.2552 1 unix_mkname 0.0066 10 __sched_text_start 0.0345 2 __write_lock_failed 0.0625 3 __read_lock_failed 0.1500 239 schedule 0.1148 3 __preempt_spin_lock 0.0330 381 .text.lock.sched 1.9439 2 schedule_timeout 0.0105 458994 total 0.1492 15 default_idle 0.3333 418731 poll_idle 7219.5000 60 cpu_idle 0.9375 10 need_resched 0.2000 140 system_call 3.1818 5 syscall_call 0.4545 19 syscall_exit 1.7273 4 handle_IRQ_event 0.0400 1 show_cpuinfo 0.0015 38 sched_clock 0.2794 1 flush_tlb_page 0.0056 4 pte_alloc_one 0.0519 12 do_page_fault 0.0086 1703 finish_task_switch 11.4295 987 __wake_up 8.3644 2 migration_thread 0.0044 215 __might_sleep 1.0190 84 add_wait_queue 0.6774 48 remove_wait_queue 0.3750 21 prepare_to_wait 0.1429 36 finish_wait 0.2278 5 .text.lock.fork 0.0253 1 profile_exec_unmap 0.0104 121 current_kernel_time 1.7536 5225 __do_softirq 30.2023 151 local_bh_enable 1.0486 640 __mod_timer 1.2379 110 mod_timer 1.0377 339 del_timer 2.2013 1 del_timer_sync 0.0055 2 .text.lock.timer 0.0217 1 sigprocmask 0.0041 1 do_sigaction 0.0016 1 do_futex 0.0064 49 add_to_page_cache 0.2000 12 page_waitqueue 0.2500 44 wake_up_page 0.5714 20 unlock_page 0.5405 4 end_page_writeback 0.0541 40 find_get_page 0.3571 26 find_lock_page 0.0897 46 find_get_pages_tag 0.2893 1 do_generic_mapping_read 0.0008 1 __generic_file_aio_read 0.0018 1 remove_suid 0.0067 122 generic_file_aio_write_nolock 0.0421 20 generic_file_aio_write 0.1266 45 mempool_alloc 0.1181 13 mempool_free 0.0619 1 mempool_alloc_slab 0.0476 1 mempool_free_slab 0.0476 24 bad_range 0.2400 16 prep_new_page 0.1975 62 free_hot_cold_page 0.2081 151 buffered_rmqueue 0.2838 86 __alloc_pages 0.0968 10 __get_free_pages 0.1695 20 __free_pages 0.2564 3 free_pages 0.0667 1 balance_dirty_pages 0.0032 5 balance_dirty_pages_ratelimited 0.0249 56 __set_page_dirty_nobuffers 0.1489 2 set_page_dirty 0.0238 6 clear_page_dirty_for_io 0.0526 43 test_clear_page_writeback 0.1686 48 test_set_page_writeback 0.1600 1 vma_prio_tree_insert 0.0130 1 vma_prio_tree_remove 0.0039 1 do_page_cache_readahead 0.0022 1 kmem_getpages 0.0048 13 cache_init_objs 0.1250 1 cache_grow 0.0022 166 kmem_cache_alloc 1.3496 3 kmem_ptr_validate 0.0395 78 __kmalloc 0.5065 193 kmem_cache_free 2.2184 232 kfree 2.1284 33 mark_page_accessed 0.6346 1 lru_cache_add_active 0.0105 22 release_pages 0.0487 29 __pagevec_lru_add 0.0915 2 __pagevec_lru_add_active 0.0060 16 percpu_counter_mod 0.0914 1 blk_queue_bounce 0.0130 3 clear_page_tables 0.0097 1 pte_alloc_map 0.0040 14 copy_page_range 0.0181 14 zap_pte_range 0.0202 2 zap_pmd_range 0.0174 1 unmap_vmas 0.0017 19 do_wp_page 0.0224 21 do_anonymous_page 0.0468 277 do_no_page 0.3109 2 handle_mm_fault 0.0046 1 __remove_shared_vm_struct 0.0101 1 remove_vm_struct 0.0062 1 find_vma_prepare 0.0099 1 __vma_link 0.0087 1 vma_link 0.0030 2 find_mergeable_anon_vma 0.0085 3 do_mmap_pgoff 0.0016 1 get_unmapped_area 0.0034 3 find_vma 0.0370 1 free_pgtables 0.0067 1 split_vma 0.0035 1 change_protection 0.0022 1 __anon_vma_link 0.0189 1 anon_vma_unlink 0.0064 6 page_add_anon_rmap 0.0183 14 page_remove_rmap 0.0586 2 free_pages_and_swap_cache 0.0153 1 sys_access 0.0030 1 dentry_open 0.0025 1 sys_close 0.0049 10 do_sync_read 0.0578 58 vfs_read 0.1966 23 do_sync_write 0.1329 56 vfs_write 0.1898 21 sys_read 0.1641 26 sys_write 0.2031 42 fput 2.0000 99 fget 0.7734 36 fget_light 0.2156 1 file_move 0.0071 1 file_kill 0.0081 7 bh_waitq_head 0.3182 71 wake_up_buffer 0.8554 37 unlock_buffer 1.5417 14 __set_page_buffers 0.5600 86 end_buffer_write_sync 0.7107 17 __find_get_block_slow 0.0393 1 end_buffer_async_write 0.0032 30 create_buffers 0.1840 5 mark_buffer_dirty 0.1250 47 __brelse 0.6026 168 __find_get_block 0.6829 18 __getblk 0.1782 18 __bread 0.2727 8 set_bh_page 0.1481 1 try_to_release_page 0.0091 17 create_empty_buffers 0.0842 3 unmap_underlying_metadata 0.0265 46 __block_write_full_page 0.0479 47 __block_prepare_write 0.0473 20 __block_commit_write 0.1342 11 block_prepare_write 0.1429 14 generic_commit_write 0.0946 1 end_buffer_read_nobh 0.0323 14 block_write_full_page 0.0524 25 end_bio_bh_io_sync 0.4032 27 submit_bh 0.0828 43 ll_rw_block 0.3162 4 recalc_bh_state 0.0223 12 alloc_buffer_head 0.1143 25 init_buffer_head 0.4717 4 bio_destructor 0.0426 19 bio_alloc 0.0446 56 bio_put 1.0370 7 bio_endio 0.0551 1 sys_fstat64 0.0175 16 inode_add_bytes 0.1127 1 copy_strings 0.0018 68 pipe_wait 0.3799 220 pipe_readv 0.3112 9 pipe_read 0.1525 127 pipe_writev 0.1532 6 pipe_write 0.1017 141 pipe_poll 1.1371 1 real_lookup 0.0038 1 follow_mount 0.0068 1 do_lookup 0.0062 4 link_path_walk 0.0010 1 may_open 0.0019 19 kill_fasync 0.1638 3 poll_initwait 0.1200 27 poll_freewait 0.4219 49 __pollwait 0.2487 23 max_select_fd 0.1022 162 do_select 0.2072 7 select_bits_alloc 0.2188 2 select_bits_free 0.4000 124 sys_select 0.0961 1 __posix_lock_file 0.0006 1 fcntl_setlk 0.0015 1 dput 0.0016 6 __d_lookup 0.0144 1 alloc_inode 0.0030 118 inode_times_differ 1.7353 26 update_atime 0.1171 45 inode_update_time 0.2103 179 dnotify_parent 0.7075 1 seq_printf 0.0116 64 __mark_inode_dirty 0.1322 1 writeback_inodes 0.0025 14 mpage_writepages 0.0167 1 load_elf_binary 0.0003 1 proc_read_inode 0.0167 1 get_vmalloc_info 0.0052 11 show_stat 0.0048 11 write_profile 0.0705 27 ext3_get_group_desc 0.1436 7 read_block_bitmap 0.0461 2 find_next_usable_block 0.0024 66 ext3_try_to_allocate 0.0742 7 ext3_has_free_blocks 0.0569 57 ext3_new_block 0.0439 1 ext3_release_file 0.0098 16 ext3_file_write 0.0751 5 ext3_alloc_block 0.0847 21 ext3_block_to_path 0.0660 24 ext3_get_branch 0.1017 22 ext3_find_goal 0.1606 14 ext3_alloc_branch 0.0202 38 ext3_splice_branch 0.0802 66 ext3_get_block_handle 0.0742 10 ext3_get_block 0.0575 61 walk_page_buffers 0.5446 1 do_journal_get_write_access 0.0083 31 ext3_prepare_write 0.0975 3 ext3_journal_dirty_data 0.0323 84 ext3_ordered_commit_write 0.3668 11 bget_one 1.0000 1 bput_one 0.0909 3 journal_dirty_data_fn 0.1579 10 ext3_ordered_writepage 0.0217 72 ext3_get_inode_block 0.2759 24 ext3_get_inode_loc 0.0377 102 ext3_do_update_inode 0.1105 29 ext3_writepage_trans_blocks 0.2042 34 ext3_mark_iloc_dirty 0.6182 30 ext3_reserve_inode_write 0.1422 13 ext3_mark_inode_dirty 0.1605 26 ext3_dirty_inode 0.1926 20 ext3_journal_start 0.2247 14 __ext3_journal_stop 0.1750 1 ext3_follow_link 0.0357 76 start_this_handle 0.0593 20 new_handle 0.2500 25 journal_start 0.1190 199 do_get_write_access 0.1114 21 journal_get_write_access 0.2593 25 journal_get_undo_access 0.0602 75 journal_dirty_data 0.1026 101 journal_dirty_metadata 0.1840 93 journal_stop 0.1143 115 __journal_unfile_buffer 0.2224 55 __journal_file_buffer 0.0785 21 inverted_lock 0.2188 271 journal_commit_transaction 0.0444 2 journal_brelse_array 0.0455 1 __journal_clean_checkpoint_list 0.0057 1 __journal_drop_transaction 0.0011 1 find_revoke_record 0.0045 60 journal_cancel_revoke 0.1729 1 journal_write_metadata_buffer 0.0011 9 __log_space_left 0.0874 8 journal_blocks_per_page 0.2759 1 __jbd_kmalloc 0.0227 9 journal_alloc_journal_head 0.0776 3 journal_free_journal_head 0.1071 264 journal_add_journal_head 0.7213 54 __journal_remove_journal_head 0.1357 75 journal_remove_journal_head 0.6048 113 journal_put_journal_head 0.5067 2 ipc_lock 0.0124 9 radix_tree_preload 0.0508 2 number 0.0026 7 vsnprintf 0.0057 32 csum_partial 0.1111 1 atomic_dec_and_lock 0.0086 1 bad_get_user 0.1111 9 memcpy 0.1579 1 strncpy_from_user 0.0101 6117 __copy_user_intel 35.5640 4311 __copy_user_zeroing_intel 25.0640 90 __copy_to_user_ll 0.7500 2228 __copy_from_user_ll 18.5667 26 copy_to_user 0.2653 22 copy_from_user 0.1746 2 add_disk_randomness 0.0385 1 put_device 0.1000 1 elv_set_request 0.0172 1 generic_unplug_device 0.0100 6 blk_run_queue 0.0484 3 get_request 0.0040 95 __make_request 0.0683 12 generic_make_request 0.0244 8 submit_bio 0.0277 67 __end_that_request_first 0.1274 3 put_io_context 0.0341 2 get_io_context 0.0160 13 .text.lock.ll_rw_blk 0.0956 303 e1000_xmit_frame 0.1424 6 scsi_put_command 0.0265 13 scsi_dispatch_cmd 0.0241 2 scsi_softirq 0.0096 2 scsi_finish_command 0.0112 3 scsi_add_timer 0.0278 2 scsi_decide_disposition 0.0067 2 scsi_init_cmd_errh 0.0104 7 scsi_device_unbusy 0.0380 3 scsi_run_queue 0.0109 4 scsi_next_command 0.0976 20 scsi_end_request 0.0758 1 scsi_free_sgtable 0.0222 3 scsi_io_completion 0.0029 123 scsi_request_fn 0.1134 15 .text.lock.scsi_lib 0.0701 34 ahc_linux_isr 0.0489 2 sd_rw_intr 0.0030 2 vgacon_save_screen 0.0200 21 sock_aio_read 0.0714 18 sock_aio_write 0.0612 23 sock_poll 0.4694 221 sock_wfree 2.9079 14 __release_sock 0.0909 310 sock_def_readable 1.7222 14 sk_reset_timer 0.2979 73 lock_sock 0.5887 51 release_sock 0.3355 41 sock_common_recvmsg 0.3504 177 .text.lock.sock 1.4274 241 alloc_skb 1.0759 401 skb_release_data 2.3046 21 kfree_skbmem 0.4773 677 __kfree_skb 2.9693 68 skb_clone 0.1771 36 copy_skb_header 0.1452 26 skb_copy 0.1171 270 skb_copy_bits 0.5133 2 skb_checksum 0.0032 18 memcpy_toiovec 0.1895 136 skb_copy_datagram_iovec 0.2509 36 sk_stream_rfree 1.3333 4 sk_stream_error 0.0430 19 skb_checksum_help 0.0586 102 dev_queue_xmit 0.1281 26 net_tx_action 0.0675 73 netif_receive_skb 0.1640 123 process_backlog 0.4505 56 net_rx_action 0.2162 185 nf_iterate 1.1212 76 nf_hook_slow 0.2657 149 qdisc_restart 0.2525 174 pfifo_fast_enqueue 1.2000 122 pfifo_fast_dequeue 1.5062 29 rt_hash_code 0.2117 261 ip_route_input 0.4798 31 ip_local_deliver 0.0613 171 ip_rcv 0.1338 56 ip_local_deliver_finish 0.1436 48 ip_rcv_finish 0.0741 26 ip_finish_output 0.0489 29 ip_output 0.2417 399 ip_queue_xmit 0.2646 6 dst_output 0.1463 208 ip_finish_output2 0.4695 131 tcp_poll 0.3411 176 tcp_sendmsg 0.0387 59 cleanup_rbuf 0.1916 405 tcp_recvmsg 0.2017 43 __tcp_grow_window 0.3282 54 tcp_rcv_rtt_update 0.5934 46 tcp_rcv_space_adjust 0.1411 242 tcp_event_data_recv 0.4047 31 tcp_rtt_estimator 0.0923 8 tcp_ack_saw_tstamp 0.0952 61 tcp_clean_rtx_queue 0.0641 38 tcp_ack 0.0260 2 tcp_data_queue 0.0007 10 __tcp_data_snd_check 0.0424 64 __tcp_ack_snd_check 0.3975 1 tcp_urg 0.0041 780 tcp_rcv_established 0.3377 259 tcp_transmit_skb 0.1487 36 tcp_write_xmit 0.0497 38 __tcp_select_window 0.1279 21 tcp_send_delayed_ack 0.0950 68 tcp_send_ack 0.3487 468 __tcp_v4_lookup_established 1.7727 25 tcp_v4_send_check 0.0988 58 tcp_v4_do_rcv 0.1824 397 tcp_v4_rcv 0.2016 10 inet_sendmsg 0.1124 22 ip_confirm 0.4583 20 ip_conntrack_defrag 0.2857 25 ip_refrag 0.1748 16 ip_conntrack_local 0.1096 18 __ip_ct_find_proto 0.2769 194 ip_ct_find_proto 1.8131 54 hash_conntrack 0.3506 41 get_tuple 0.4409 2 invert_tuple 0.0426 74 __ip_conntrack_find 0.3379 155 ip_conntrack_find_get 1.2810 4 ip_conntrack_get 0.1111 125 ip_conntrack_in 0.2033 292 ip_ct_refresh 1.5368 3 ip_ct_gather_frags 0.0155 23 tcp_pkt_to_tuple 0.2706 10 get_conntrack_index 0.1639 437 tcp_packet 0.9239 893 ipt_do_table 0.9216 11 ipt_hook 0.1864 18 ipt_local_out_hook 0.1538 35 ipt_route_hook 0.5932 22 ipt_local_hook 0.0944 47 ip_nat_fn 0.0781 24 ip_nat_out 0.1395 1 ip_nat_setup_info 0.0011 215 do_bindings 0.2638 1 unix_sock_destructor 0.0041 3 __sched_text_start 0.0103 3 __write_lock_failed 0.0938 3 __read_lock_failed 0.1500 228 schedule 0.1096 1 __preempt_spin_lock 0.0110 425 .text.lock.sched 2.1684 3 schedule_timeout 0.0157 462215 total 0.1502 22 default_idle 0.4889 417273 poll_idle 7194.3621 53 cpu_idle 0.8281 7 need_resched 0.1400 132 system_call 3.0000 6 syscall_call 0.5455 8 syscall_exit 0.7273 3 handle_IRQ_event 0.0300 36 sched_clock 0.2647 7 pte_alloc_one 0.0909 3 pgd_ctor 0.0179 11 do_page_fault 0.0079 1 sched_fork 0.0060 1 wake_up_forked_process 0.0028 1644 finish_task_switch 11.0336 940 __wake_up 7.9661 239 __might_sleep 1.1327 90 add_wait_queue 0.7258 58 remove_wait_queue 0.4531 44 prepare_to_wait 0.2993 31 finish_wait 0.1962 1 dup_task_struct 0.0047 1 mm_init 0.0040 1 copy_mm 0.0009 2 copy_process 0.0007 9 .text.lock.fork 0.0455 1 profile_exit_task 0.0104 2 exit_notify 0.0009 116 current_kernel_time 1.6812 5143 __do_softirq 29.7283 149 local_bh_enable 1.0347 671 __mod_timer 1.2979 108 mod_timer 1.0189 357 del_timer 2.3182 1 do_sigaction 0.0016 1 sys_rt_sigaction 0.0052 1 groups_search 0.0094 1 in_group_p 0.0083 56 add_to_page_cache 0.2286 16 page_waitqueue 0.3333 52 wake_up_page 0.6753 10 unlock_page 0.2703 16 end_page_writeback 0.2162 60 find_get_page 0.5357 27 find_lock_page 0.0931 49 find_get_pages_tag 0.3082 5 filemap_nopage 0.0053 10 remove_suid 0.0671 175 generic_file_aio_write_nolock 0.0604 18 generic_file_aio_write 0.1139 41 mempool_alloc 0.1076 21 mempool_free 0.1000 2 mempool_alloc_slab 0.0952 2 mempool_free_slab 0.0952 20 bad_range 0.2000 18 prep_new_page 0.2222 53 free_hot_cold_page 0.1779 1 free_hot_page 0.1429 181 buffered_rmqueue 0.3402 83 __alloc_pages 0.0935 3 __get_free_pages 0.0508 17 __free_pages 0.2179 4 free_pages 0.0889 7 balance_dirty_pages_ratelimited 0.0348 54 __set_page_dirty_nobuffers 0.1436 3 set_page_dirty 0.0357 15 clear_page_dirty_for_io 0.1316 37 test_clear_page_writeback 0.1451 58 test_set_page_writeback 0.1933 9 .text.lock.page_writeback 0.0703 1 pdflush_operation 0.0042 1 file_ra_state_init 0.0270 2 do_page_cache_readahead 0.0043 1 page_cache_readahead 0.0018 1 kmem_getpages 0.0048 8 cache_init_objs 0.0769 2 kmem_flagcheck 0.0465 1 cache_grow 0.0022 187 kmem_cache_alloc 1.5203 3 kmem_ptr_validate 0.0395 71 __kmalloc 0.4610 220 kmem_cache_free 2.5287 215 kfree 1.9725 37 mark_page_accessed 0.7115 2 lru_cache_add_active 0.0211 1 lru_add_drain 0.0089 33 release_pages 0.0730 1 __pagevec_release 0.0185 35 __pagevec_lru_add 0.1104 5 __pagevec_lru_add_active 0.0149 9 percpu_counter_mod 0.0514 1 blk_queue_bounce 0.0130 2 clear_page_tables 0.0065 15 copy_page_range 0.0194 24 zap_pte_range 0.0346 1 zap_pmd_range 0.0087 2 unmap_vmas 0.0035 15 do_wp_page 0.0177 27 do_anonymous_page 0.0601 355 do_no_page 0.3984 2 handle_mm_fault 0.0046 1 find_vma_prepare 0.0099 1 find_vma 0.0123 2 unmap_region 0.0070 1 detach_vmas_to_be_unmapped 0.0101 1 split_vma 0.0035 1 do_munmap 0.0022 1 sys_mprotect 0.0018 3 anon_vma_prepare 0.0085 1 anon_vma_link 0.0079 2 page_add_anon_rmap 0.0061 3 page_add_file_rmap 0.0139 15 page_remove_rmap 0.0628 1 free_pages_and_swap_cache 0.0076 1 get_unused_fd 0.0039 10 do_sync_read 0.0578 77 vfs_read 0.2610 27 do_sync_write 0.1561 50 vfs_write 0.1695 21 sys_read 0.1641 30 sys_write 0.2344 1 get_empty_filp 0.0043 26 fput 1.2381 99 fget 0.7734 35 fget_light 0.2096 1 file_move 0.0071 2 bh_waitq_head 0.0909 80 wake_up_buffer 0.9639 31 unlock_buffer 1.2917 10 __set_page_buffers 0.4000 66 end_buffer_write_sync 0.5455 22 __find_get_block_slow 0.0508 25 end_buffer_async_write 0.0809 2 buffer_insert_list 0.0134 16 create_buffers 0.0982 11 mark_buffer_dirty 0.2750 60 __brelse 0.7692 1 bh_lru_install 0.0044 205 __find_get_block 0.8333 22 __getblk 0.2178 10 __bread 0.1515 5 set_bh_page 0.0926 27 create_empty_buffers 0.1337 4 unmap_underlying_metadata 0.0354 46 __block_write_full_page 0.0479 59 __block_prepare_write 0.0594 20 __block_commit_write 0.1342 12 block_prepare_write 0.1558 5 generic_commit_write 0.0338 19 block_write_full_page 0.0712 21 end_bio_bh_io_sync 0.3387 40 submit_bh 0.1227 35 ll_rw_block 0.2574 3 recalc_bh_state 0.0168 13 alloc_buffer_head 0.1238 18 init_buffer_head 0.3396 8 .text.lock.buffer 0.0430 10 bio_destructor 0.1064 16 bio_alloc 0.0376 51 bio_put 0.9444 4 bio_endio 0.0315 1 nr_blockdev_pages 0.0075 1 generic_fillattr 0.0061 54 inode_add_bytes 0.3803 1 setup_arg_pages 0.0021 1 flush_old_exec 0.0004 1 do_execve 0.0015 42 pipe_wait 0.2346 226 pipe_readv 0.3197 7 pipe_read 0.1186 143 pipe_writev 0.1725 10 pipe_write 0.1695 1 bad_pipe_r 0.1667 127 pipe_poll 1.0242 1 vfs_permission 0.0032 1 path_release 0.0143 1 follow_mount 0.0068 2 do_lookup 0.0124 2 link_path_walk 0.0005 2 path_lookup 0.0042 2 may_open 0.0039 2 open_namei 0.0011 10 kill_fasync 0.0862 3 poll_initwait 0.1200 46 poll_freewait 0.7188 37 __pollwait 0.1878 13 max_select_fd 0.0578 140 do_select 0.1790 7 select_bits_alloc 0.2188 2 select_bits_free 0.4000 104 sys_select 0.0806 1 locks_remove_posix 0.0030 2 dput 0.0032 3 __d_lookup 0.0072 1 iput 0.0081 131 inode_times_differ 1.9265 34 update_atime 0.1532 40 inode_update_time 0.1869 1 wake_up_inode 0.0139 199 dnotify_parent 0.7866 1 lookup_mnt 0.0060 1 seq_printf 0.0116 154 __mark_inode_dirty 0.3182 1 sync_sb_inodes 0.0013 2 writeback_inodes 0.0050 13 mpage_writepages 0.0155 1 load_elf_interp 0.0016 6 show_stat 0.0026 7 write_profile 0.0449 35 ext3_get_group_desc 0.1862 6 read_block_bitmap 0.0395 4 find_next_usable_block 0.0047 59 ext3_try_to_allocate 0.0663 4 ext3_has_free_blocks 0.0325 82 ext3_new_block 0.0631 17 ext3_file_write 0.0798 6 ext3_alloc_block 0.1017 98 ext3_block_to_path 0.3082 40 ext3_get_branch 0.1695 21 ext3_find_goal 0.1533 25 ext3_alloc_branch 0.0361 40 ext3_splice_branch 0.0844 78 ext3_get_block_handle 0.0877 11 ext3_get_block 0.0632 74 walk_page_buffers 0.6607 20 ext3_prepare_write 0.0629 7 ext3_journal_dirty_data 0.0753 106 ext3_ordered_commit_write 0.4629 13 bget_one 1.1818 2 bput_one 0.1818 3 journal_dirty_data_fn 0.1579 19 ext3_ordered_writepage 0.0412 57 ext3_get_inode_block 0.2184 40 ext3_get_inode_loc 0.0629 98 ext3_do_update_inode 0.1062 41 ext3_writepage_trans_blocks 0.2887 25 ext3_mark_iloc_dirty 0.4545 26 ext3_reserve_inode_write 0.1232 18 ext3_mark_inode_dirty 0.2222 44 ext3_dirty_inode 0.3259 19 ext3_journal_start 0.2135 27 __ext3_journal_stop 0.3375 117 start_this_handle 0.0913 23 new_handle 0.2875 27 journal_start 0.1286 158 do_get_write_access 0.0885 26 journal_get_write_access 0.3210 29 journal_get_undo_access 0.0699 64 journal_dirty_data 0.0876 120 journal_dirty_metadata 0.2186 748 journal_stop 0.9189 95 __journal_unfile_buffer 0.1838 36 __journal_file_buffer 0.0514 17 inverted_lock 0.1771 252 journal_commit_transaction 0.0413 2 journal_brelse_array 0.0455 1 __journal_clean_checkpoint_list 0.0057 1 __journal_insert_checkpoint 0.0048 69 journal_cancel_revoke 0.1988 11 __log_space_left 0.1068 2 __log_start_commit 0.0317 1 journal_get_descriptor_buffer 0.0053 8 journal_blocks_per_page 0.2759 4 journal_alloc_journal_head 0.0345 1 journal_free_journal_head 0.0357 275 journal_add_journal_head 0.7514 60 __journal_remove_journal_head 0.1508 66 journal_remove_journal_head 0.5323 94 journal_put_journal_head 0.4215 1 semctl_main 0.0010 1 do_shmat 0.0013 1 cap_bprm_apply_creds 0.0027 2 kobject_put 0.0800 16 radix_tree_preload 0.0904 1 rb_erase 0.0044 6 number 0.0077 9 vsnprintf 0.0073 1 find_next_bit 0.0066 27 csum_partial 0.0938 3 atomic_dec_and_lock 0.0259 18 memcpy 0.3158 1 strncpy_from_user 0.0101 1 strnlen_user 0.0104 6212 __copy_user_intel 36.1163 4486 __copy_user_zeroing_intel 26.0814 92 __copy_to_user_ll 0.7667 2302 __copy_from_user_ll 19.1833 37 copy_to_user 0.3776 37 copy_from_user 0.2937 1 add_timer_randomness 0.0034 4 add_disk_randomness 0.0769 2 blk_run_queue 0.0161 3 get_request 0.0040 124 __make_request 0.0892 10 generic_make_request 0.0203 8 submit_bio 0.0277 48 __end_that_request_first 0.0913 3 put_io_context 0.0341 2 get_io_context 0.0160 12 .text.lock.ll_rw_blk 0.0882 2 as_set_request 0.0153 312 e1000_xmit_frame 0.1466 5 scsi_put_command 0.0221 29 scsi_dispatch_cmd 0.0538 1 scsi_softirq 0.0048 6 scsi_finish_command 0.0335 2 scsi_add_timer 0.0185 8 scsi_init_cmd_errh 0.0417 11 scsi_device_unbusy 0.0598 4 scsi_run_queue 0.0145 32 scsi_end_request 0.1212 1 scsi_free_sgtable 0.0222 11 scsi_io_completion 0.0108 139 scsi_request_fn 0.1281 17 .text.lock.scsi_lib 0.0794 68 ahc_linux_isr 0.0978 1 sock_map_fd 0.0031 1 sockfd_lookup 0.0084 17 sock_aio_read 0.0578 16 sock_aio_write 0.0544 21 sock_poll 0.4286 196 sock_wfree 2.5789 15 __release_sock 0.0974 294 sock_def_readable 1.6333 13 sk_reset_timer 0.2766 90 lock_sock 0.7258 53 release_sock 0.3487 35 sock_common_recvmsg 0.2991 189 .text.lock.sock 1.5242 240 alloc_skb 1.0714 394 skb_release_data 2.2644 10 kfree_skbmem 0.2273 632 __kfree_skb 2.7719 91 skb_clone 0.2370 31 copy_skb_header 0.1250 18 skb_copy 0.0811 294 skb_copy_bits 0.5589 5 skb_checksum 0.0081 1 skb_dequeue 0.0085 23 memcpy_toiovec 0.2421 1 memcpy_tokerneliovec 0.0133 117 skb_copy_datagram_iovec 0.2159 39 sk_stream_rfree 1.4444 3 sk_stream_error 0.0323 1 sk_stream_mem_schedule 0.0029 22 skb_checksum_help 0.0679 95 dev_queue_xmit 0.1193 24 net_tx_action 0.0623 104 netif_receive_skb 0.2337 118 process_backlog 0.4322 61 net_rx_action 0.2355 202 nf_iterate 1.2242 75 nf_hook_slow 0.2622 167 qdisc_restart 0.2831 150 pfifo_fast_enqueue 1.0345 104 pfifo_fast_dequeue 1.2840 31 rt_hash_code 0.2263 266 ip_route_input 0.4890 39 ip_local_deliver 0.0771 181 ip_rcv 0.1416 70 ip_local_deliver_finish 0.1795 36 ip_rcv_finish 0.0556 21 ip_finish_output 0.0395 17 ip_output 0.1417 352 ip_queue_xmit 0.2334 10 dst_output 0.2439 257 ip_finish_output2 0.5801 127 tcp_poll 0.3307 185 tcp_sendmsg 0.0407 60 cleanup_rbuf 0.1948 428 tcp_recvmsg 0.2131 40 __tcp_grow_window 0.3053 61 tcp_rcv_rtt_update 0.6703 46 tcp_rcv_space_adjust 0.1411 238 tcp_event_data_recv 0.3980 26 tcp_rtt_estimator 0.0774 12 tcp_ack_saw_tstamp 0.1429 92 tcp_clean_rtx_queue 0.0967 27 tcp_ack 0.0184 9 __tcp_data_snd_check 0.0381 54 __tcp_ack_snd_check 0.3354 760 tcp_rcv_established 0.3290 292 tcp_transmit_skb 0.1676 47 tcp_write_xmit 0.0648 43 __tcp_select_window 0.1448 23 tcp_send_delayed_ack 0.1041 87 tcp_send_ack 0.4462 487 __tcp_v4_lookup_established 1.8447 33 tcp_v4_send_check 0.1304 54 tcp_v4_do_rcv 0.1698 395 tcp_v4_rcv 0.2006 7 inet_sendmsg 0.0787 15 ip_confirm 0.3125 30 ip_conntrack_defrag 0.4286 16 ip_refrag 0.1119 23 ip_conntrack_local 0.1575 21 __ip_ct_find_proto 0.3231 221 ip_ct_find_proto 2.0654 74 hash_conntrack 0.4805 40 get_tuple 0.4301 2 invert_tuple 0.0426 84 __ip_conntrack_find 0.3836 143 ip_conntrack_find_get 1.1818 14 ip_conntrack_get 0.3889 117 ip_conntrack_in 0.1902 269 ip_ct_refresh 1.4158 30 tcp_pkt_to_tuple 0.3529 10 get_conntrack_index 0.1639 457 tcp_packet 0.9662 889 ipt_do_table 0.9174 10 ipt_hook 0.1695 13 ipt_local_out_hook 0.1111 35 ipt_route_hook 0.5932 29 ipt_local_hook 0.1245 67 ip_nat_fn 0.1113 23 ip_nat_out 0.1337 1 find_nat_proto 0.0149 195 do_bindings 0.2393 1 unix_release_sock 0.0010 13 __sched_text_start 0.0448 2 __down_failed 0.1667 2 __write_lock_failed 0.0625 3 __read_lock_failed 0.1500 213 schedule 0.1024 1 io_schedule 0.0208 4 __preempt_spin_lock 0.0440 438 .text.lock.sched 2.2347 9 schedule_timeout 0.0471 462536 total 0.1504 22 default_idle 0.4889 415897 poll_idle 7170.6379 42 cpu_idle 0.6562 4 need_resched 0.0800 132 system_call 3.0000 6 syscall_call 0.5455 8 syscall_exit 0.7273 4 handle_IRQ_event 0.0400 1 sys_mmap2 0.0047 2 show_cpuinfo 0.0030 43 sched_clock 0.3162 1 flush_tlb_mm 0.0059 2 flush_tlb_page 0.0113 2 pte_alloc_one 0.0260 1 pgd_ctor 0.0060 13 do_page_fault 0.0093 1705 finish_task_switch 11.4430 1016 __wake_up 8.6102 216 __might_sleep 1.0237 71 add_wait_queue 0.5726 42 remove_wait_queue 0.3281 32 prepare_to_wait 0.2177 52 finish_wait 0.3291 2 copy_mm 0.0017 1 copy_files 0.0010 1 copy_process 0.0003 5 .text.lock.fork 0.0253 1 release_task 0.0018 1 do_exit 0.0009 131 current_kernel_time 1.8986 5134 __do_softirq 29.6763 152 local_bh_enable 1.0556 719 __mod_timer 1.3907 94 mod_timer 0.8868 355 del_timer 2.3052 1 del_timer_sync 0.0055 5 .text.lock.timer 0.0543 1 sys_rt_sigaction 0.0052 1 groups_search 0.0094 54 add_to_page_cache 0.2204 10 page_waitqueue 0.2083 46 wake_up_page 0.5974 16 unlock_page 0.4324 22 end_page_writeback 0.2973 54 find_get_page 0.4821 43 find_lock_page 0.1483 38 find_get_pages_tag 0.2390 2 do_generic_mapping_read 0.0016 1 file_read_actor 0.0041 2 filemap_nopage 0.0021 1 generic_file_mmap 0.0145 5 remove_suid 0.0336 126 generic_file_aio_write_nolock 0.0435 12 generic_file_aio_write 0.0759 44 mempool_alloc 0.1155 22 mempool_free 0.1048 1 mempool_alloc_slab 0.0476 1 mempool_free_slab 0.0476 14 bad_range 0.1400 18 prep_new_page 0.2222 55 free_hot_cold_page 0.1846 159 buffered_rmqueue 0.2989 88 __alloc_pages 0.0991 12 __get_free_pages 0.2034 21 __free_pages 0.2692 3 free_pages 0.0667 9 balance_dirty_pages_ratelimited 0.0448 58 __set_page_dirty_nobuffers 0.1543 1 set_page_dirty 0.0119 11 clear_page_dirty_for_io 0.0965 43 test_clear_page_writeback 0.1686 53 test_set_page_writeback 0.1767 18 .text.lock.page_writeback 0.1406 1 prio_tree_remove 0.0044 1 vma_prio_tree_add 0.0060 2 do_page_cache_readahead 0.0043 1 page_cache_readahead 0.0018 1 alloc_slabmgmt 0.0104 10 cache_init_objs 0.0962 1 kmem_flagcheck 0.0233 2 cache_grow 0.0044 159 kmem_cache_alloc 1.2927 1 kmem_ptr_validate 0.0132 88 __kmalloc 0.5714 187 kmem_cache_free 2.1494 233 kfree 2.1376 33 mark_page_accessed 0.6346 1 lru_cache_add_active 0.0105 31 release_pages 0.0686 22 __pagevec_lru_add 0.0694 2 __pagevec_lru_add_active 0.0060 1 pagevec_lookup_tag 0.0156 14 percpu_counter_mod 0.0800 3 clear_page_tables 0.0097 1 pte_alloc_map 0.0040 9 copy_page_range 0.0116 22 zap_pte_range 0.0317 1 unmap_vmas 0.0017 17 do_wp_page 0.0200 16 do_anonymous_page 0.0356 281 do_no_page 0.3154 7 handle_mm_fault 0.0159 2 remove_vm_struct 0.0123 1 find_vma_prepare 0.0099 1 vma_link 0.0030 1 vma_merge 0.0020 2 find_mergeable_anon_vma 0.0085 3 do_mmap_pgoff 0.0016 1 find_vma_prev 0.0123 1 do_munmap 0.0022 1 exit_mmap 0.0022 1 anon_vma_prepare 0.0028 2 anon_vma_unlink 0.0128 3 page_add_anon_rmap 0.0092 1 page_add_file_rmap 0.0046 5 page_remove_rmap 0.0209 1 get_unused_fd 0.0039 1 filp_close 0.0075 14 do_sync_read 0.0809 50 vfs_read 0.1695 22 do_sync_write 0.1272 46 vfs_write 0.1559 25 sys_read 0.1953 30 sys_write 0.2344 48 fput 2.2857 84 fget 0.6562 34 fget_light 0.2036 6 bh_waitq_head 0.2727 74 wake_up_buffer 0.8916 34 unlock_buffer 1.4167 9 __set_page_buffers 0.3600 56 end_buffer_write_sync 0.4628 21 __find_get_block_slow 0.0485 26 end_buffer_async_write 0.0841 2 buffer_insert_list 0.0134 23 create_buffers 0.1411 1 grow_dev_page 0.0025 7 mark_buffer_dirty 0.1750 45 __brelse 0.5769 1 bh_lru_install 0.0044 148 __find_get_block 0.6016 17 __getblk 0.1683 13 __bread 0.1970 4 set_bh_page 0.0741 25 create_empty_buffers 0.1238 5 unmap_underlying_metadata 0.0442 52 __block_write_full_page 0.0542 53 __block_prepare_write 0.0534 24 __block_commit_write 0.1611 8 block_prepare_write 0.1039 8 generic_commit_write 0.0541 17 block_write_full_page 0.0637 22 end_bio_bh_io_sync 0.3548 41 submit_bh 0.1258 22 ll_rw_block 0.1618 6 recalc_bh_state 0.0335 7 alloc_buffer_head 0.0667 20 init_buffer_head 0.3774 5 .text.lock.buffer 0.0269 8 bio_destructor 0.0851 12 bio_alloc 0.0282 41 bio_put 0.7593 2 bio_endio 0.0157 1 generic_fillattr 0.0061 14 inode_add_bytes 0.0986 1 copy_strings 0.0018 47 pipe_wait 0.2626 221 pipe_readv 0.3126 12 pipe_read 0.2034 111 pipe_writev 0.1339 5 pipe_write 0.0847 111 pipe_poll 0.8952 1 getname 0.0041 1 deny_write_access 0.0072 1 follow_mount 0.0068 3 do_lookup 0.0186 5 link_path_walk 0.0013 1 path_lookup 0.0021 19 kill_fasync 0.1638 1 poll_initwait 0.0400 30 poll_freewait 0.4688 30 __pollwait 0.1523 18 max_select_fd 0.0800 186 do_select 0.2379 5 select_bits_alloc 0.1562 1 select_bits_free 0.2000 127 sys_select 0.0984 5 __d_lookup 0.0120 124 inode_times_differ 1.8235 28 update_atime 0.1261 38 inode_update_time 0.1776 1 wake_up_inode 0.0139 1 setattr_mask 0.0096 199 dnotify_parent 0.7866 1 lookup_mnt 0.0060 82 __mark_inode_dirty 0.1694 1 sync_sb_inodes 0.0013 1 writeback_inodes 0.0025 13 mpage_writepages 0.0155 1 proc_pid_unhash 0.0063 1 proc_lookup 0.0030 3 show_stat 0.0013 10 write_profile 0.0641 16 ext3_get_group_desc 0.0851 7 read_block_bitmap 0.0461 2 find_next_usable_block 0.0024 65 ext3_try_to_allocate 0.0730 7 ext3_has_free_blocks 0.0569 71 ext3_new_block 0.0547 23 ext3_file_write 0.1080 1 ext3_alloc_block 0.0169 14 ext3_block_to_path 0.0440 36 ext3_get_branch 0.1525 20 ext3_find_goal 0.1460 15 ext3_alloc_branch 0.0217 36 ext3_splice_branch 0.0759 72 ext3_get_block_handle 0.0810 7 ext3_get_block 0.0402 68 walk_page_buffers 0.6071 1 do_journal_get_write_access 0.0083 20 ext3_prepare_write 0.0629 2 ext3_journal_dirty_data 0.0215 85 ext3_ordered_commit_write 0.3712 9 bget_one 0.8182 2 bput_one 0.1818 9 journal_dirty_data_fn 0.4737 13 ext3_ordered_writepage 0.0282 53 ext3_get_inode_block 0.2031 44 ext3_get_inode_loc 0.0692 84 ext3_do_update_inode 0.0910 33 ext3_writepage_trans_blocks 0.2324 42 ext3_mark_iloc_dirty 0.7636 23 ext3_reserve_inode_write 0.1090 12 ext3_mark_inode_dirty 0.1481 21 ext3_dirty_inode 0.1556 20 ext3_journal_start 0.2247 10 __ext3_journal_stop 0.1250 77 start_this_handle 0.0601 16 new_handle 0.2000 36 journal_start 0.1714 148 do_get_write_access 0.0829 18 journal_get_write_access 0.2222 1 journal_get_create_access 0.0015 22 journal_get_undo_access 0.0530 87 journal_dirty_data 0.1190 112 journal_dirty_metadata 0.2040 114 journal_stop 0.1400 93 __journal_unfile_buffer 0.1799 41 __journal_file_buffer 0.0585 1 journal_file_buffer 0.0046 20 inverted_lock 0.2083 230 journal_commit_transaction 0.0377 1 journal_brelse_array 0.0227 2 __journal_clean_checkpoint_list 0.0115 56 journal_cancel_revoke 0.1614 1 journal_write_revoke_records 0.0039 2 journal_write_metadata_buffer 0.0022 9 __log_space_left 0.0874 1 journal_get_descriptor_buffer 0.0053 8 journal_blocks_per_page 0.2759 5 journal_alloc_journal_head 0.0431 1 journal_free_journal_head 0.0357 282 journal_add_journal_head 0.7705 53 __journal_remove_journal_head 0.1332 64 journal_remove_journal_head 0.5161 96 journal_put_journal_head 0.4305 1 ipc_findkey 0.0204 1 cap_vm_enough_memory 0.0038 1 kobject_put 0.0400 8 radix_tree_preload 0.0452 2 number 0.0026 12 vsnprintf 0.0097 22 csum_partial 0.0764 1 atomic_dec_and_lock 0.0086 12 memcpy 0.2105 1 strnlen_user 0.0104 6132 __copy_user_intel 35.6512 4273 __copy_user_zeroing_intel 24.8430 83 __copy_to_user_ll 0.6917 2169 __copy_from_user_ll 18.0750 32 copy_to_user 0.3265 27 copy_from_user 0.2143 2 add_disk_randomness 0.0385 1 blk_run_queue 0.0081 2 get_request 0.0027 106 __make_request 0.0763 7 generic_make_request 0.0142 9 submit_bio 0.0311 69 __end_that_request_first 0.1312 3 put_io_context 0.0341 1 get_io_context 0.0080 5 .text.lock.ll_rw_blk 0.0368 294 e1000_xmit_frame 0.1382 3 scsi_put_command 0.0133 19 scsi_dispatch_cmd 0.0353 3 scsi_finish_command 0.0168 2 scsi_add_timer 0.0185 4 scsi_init_cmd_errh 0.0208 8 scsi_device_unbusy 0.0435 3 scsi_run_queue 0.0109 30 scsi_end_request 0.1136 3 scsi_io_completion 0.0029 128 scsi_request_fn 0.1180 14 .text.lock.scsi_lib 0.0654 32 ahc_linux_isr 0.0460 25 sock_aio_read 0.0850 4 sock_aio_write 0.0136 30 sock_poll 0.6122 205 sock_wfree 2.6974 14 __release_sock 0.0909 331 sock_def_readable 1.8389 11 sk_reset_timer 0.2340 73 lock_sock 0.5887 38 release_sock 0.2500 37 sock_common_recvmsg 0.3162 180 .text.lock.sock 1.4516 231 alloc_skb 1.0312 394 skb_release_data 2.2644 13 kfree_skbmem 0.2955 627 __kfree_skb 2.7500 85 skb_clone 0.2214 34 copy_skb_header 0.1371 19 skb_copy 0.0856 276 skb_copy_bits 0.5247 3 skb_checksum 0.0049 18 memcpy_toiovec 0.1895 2 memcpy_tokerneliovec 0.0267 126 skb_copy_datagram_iovec 0.2325 36 sk_stream_rfree 1.3333 1 sk_stream_error 0.0108 17 skb_checksum_help 0.0525 109 dev_queue_xmit 0.1369 27 net_tx_action 0.0701 83 netif_receive_skb 0.1865 100 process_backlog 0.3663 53 net_rx_action 0.2046 191 nf_iterate 1.1576 96 nf_hook_slow 0.3357 161 qdisc_restart 0.2729 132 pfifo_fast_enqueue 0.9103 103 pfifo_fast_dequeue 1.2716 20 rt_hash_code 0.1460 253 ip_route_input 0.4651 40 ip_local_deliver 0.0791 152 ip_rcv 0.1189 61 ip_local_deliver_finish 0.1564 53 ip_rcv_finish 0.0818 14 ip_finish_output 0.0263 21 ip_output 0.1750 388 ip_queue_xmit 0.2573 6 dst_output 0.1463 190 ip_finish_output2 0.4289 134 tcp_poll 0.3490 166 tcp_sendmsg 0.0365 45 cleanup_rbuf 0.1461 420 tcp_recvmsg 0.2092 30 __tcp_grow_window 0.2290 50 tcp_rcv_rtt_update 0.5495 30 tcp_rcv_space_adjust 0.0920 223 tcp_event_data_recv 0.3729 25 tcp_rtt_estimator 0.0744 8 tcp_ack_saw_tstamp 0.0952 58 tcp_clean_rtx_queue 0.0610 42 tcp_ack 0.0287 8 __tcp_data_snd_check 0.0339 62 __tcp_ack_snd_check 0.3851 783 tcp_rcv_established 0.3390 250 tcp_transmit_skb 0.1435 45 tcp_write_xmit 0.0621 52 __tcp_select_window 0.1751 17 tcp_send_delayed_ack 0.0769 69 tcp_send_ack 0.3538 456 __tcp_v4_lookup_established 1.7273 32 tcp_v4_send_check 0.1265 48 tcp_v4_do_rcv 0.1509 412 tcp_v4_rcv 0.2092 8 inet_sendmsg 0.0899 27 ip_confirm 0.5625 37 ip_conntrack_defrag 0.5286 12 ip_refrag 0.0839 22 ip_conntrack_local 0.1507 20 __ip_ct_find_proto 0.3077 263 ip_ct_find_proto 2.4579 64 hash_conntrack 0.4156 27 get_tuple 0.2903 4 invert_tuple 0.0851 76 __ip_conntrack_find 0.3470 157 ip_conntrack_find_get 1.2975 5 ip_conntrack_get 0.1389 129 ip_conntrack_in 0.2098 271 ip_ct_refresh 1.4263 6 ip_ct_gather_frags 0.0311 38 tcp_pkt_to_tuple 0.4471 12 get_conntrack_index 0.1967 446 tcp_packet 0.9429 870 ipt_do_table 0.8978 22 ipt_hook 0.3729 21 ipt_local_out_hook 0.1795 52 ipt_route_hook 0.8814 23 ipt_local_hook 0.0987 58 ip_nat_fn 0.0963 24 ip_nat_out 0.1395 199 do_bindings 0.2442 1 unix_stream_connect 0.0008 3 __sched_text_start 0.0103 1 __down_failed 0.0833 2 __write_lock_failed 0.0625 5 __read_lock_failed 0.2500 240 schedule 0.1153 1 preempt_schedule 0.0145 5 __preempt_spin_lock 0.0549 405 .text.lock.sched 2.0663 6 schedule_timeout 0.0314 459010 total 0.1492 28 default_idle 0.6222 414380 poll_idle 7144.4828 43 cpu_idle 0.6719 1 restore_sigcontext 0.0031 7 need_resched 0.1400 132 system_call 3.0000 5 syscall_call 0.4545 8 syscall_exit 0.7273 4 handle_IRQ_event 0.0400 1 show_cpuinfo 0.0015 49 sched_clock 0.3603 2 pte_alloc_one 0.0260 21 do_page_fault 0.0150 1751 finish_task_switch 11.7517 1008 __wake_up 8.5424 237 __might_sleep 1.1232 78 add_wait_queue 0.6290 36 remove_wait_queue 0.2812 36 prepare_to_wait 0.2449 35 finish_wait 0.2215 1 mm_init 0.0040 1 copy_process 0.0003 1 do_fork 0.0022 5 .text.lock.fork 0.0253 3 exit_notify 0.0013 1 sys_wait4 0.0016 145 current_kernel_time 2.1014 5115 __do_softirq 29.5665 156 local_bh_enable 1.0833 812 __mod_timer 1.5706 87 mod_timer 0.8208 321 del_timer 2.0844 1 run_timer_softirq 0.0022 2 .text.lock.timer 0.0217 1 flush_signal_handlers 0.0149 3 in_group_p 0.0250 58 add_to_page_cache 0.2367 18 page_waitqueue 0.3750 49 wake_up_page 0.6364 14 unlock_page 0.3784 8 end_page_writeback 0.1081 33 find_get_page 0.2946 23 find_lock_page 0.0793 49 find_get_pages_tag 0.3082 1 do_generic_mapping_read 0.0008 2 file_read_actor 0.0083 1 generic_file_aio_read 0.0086 4 filemap_nopage 0.0042 5 remove_suid 0.0336 145 generic_file_aio_write_nolock 0.0501 19 generic_file_aio_write 0.1203 37 mempool_alloc 0.0971 19 mempool_free 0.0905 3 mempool_alloc_slab 0.1429 32 bad_range 0.3200 21 prep_new_page 0.2593 51 free_hot_cold_page 0.1711 165 buffered_rmqueue 0.3102 79 __alloc_pages 0.0890 7 __get_free_pages 0.1186 13 __free_pages 0.1667 2 free_pages 0.0444 7 balance_dirty_pages_ratelimited 0.0348 74 __set_page_dirty_nobuffers 0.1968 3 set_page_dirty 0.0357 14 clear_page_dirty_for_io 0.1228 32 test_clear_page_writeback 0.1255 51 test_set_page_writeback 0.1700 9 .text.lock.page_writeback 0.0703 1 file_ra_state_init 0.0270 1 do_page_cache_readahead 0.0022 1 page_cache_readahead 0.0018 3 kmem_getpages 0.0144 6 cache_init_objs 0.0577 1 kmem_flagcheck 0.0233 3 cache_grow 0.0066 145 kmem_cache_alloc 1.1789 3 kmem_ptr_validate 0.0395 88 __kmalloc 0.5714 218 kmem_cache_free 2.5057 205 kfree 1.8807 36 mark_page_accessed 0.6923 1 lru_cache_add_active 0.0105 1 lru_add_drain 0.0089 32 release_pages 0.0708 1 __pagevec_release 0.0185 29 __pagevec_lru_add 0.0915 4 __pagevec_lru_add_active 0.0119 1 vm_acct_memory 0.0122 15 percpu_counter_mod 0.0857 3 clear_page_tables 0.0097 1 pte_alloc_map 0.0040 12 copy_page_range 0.0155 24 zap_pte_range 0.0346 1 unmap_page_range 0.0088 9 do_wp_page 0.0106 35 do_anonymous_page 0.0780 325 do_no_page 0.3648 1 handle_mm_fault 0.0023 1 remove_vm_struct 0.0062 1 find_vma_prepare 0.0099 1 vma_adjust 0.0010 1 can_vma_merge_after 0.0090 2 vma_merge 0.0041 2 do_mmap_pgoff 0.0011 4 find_vma 0.0494 1 find_vma_prev 0.0123 2 expand_stack 0.0069 1 free_pgtables 0.0067 1 do_munmap 0.0022 1 sys_munmap 0.0082 1 anon_vma_link 0.0079 6 page_add_anon_rmap 0.0183 3 page_add_file_rmap 0.0139 9 page_remove_rmap 0.0377 1 free_pages_and_swap_cache 0.0076 2 dentry_open 0.0051 1 get_unused_fd 0.0039 1 sys_close 0.0049 1 generic_file_llseek 0.0046 11 do_sync_read 0.0636 59 vfs_read 0.2000 23 do_sync_write 0.1329 55 vfs_write 0.1864 24 sys_read 0.1875 27 sys_write 0.2109 1 get_empty_filp 0.0043 72 fput 3.4286 104 fget 0.8125 37 fget_light 0.2216 3 bh_waitq_head 0.1364 70 wake_up_buffer 0.8434 32 unlock_buffer 1.3333 9 __set_page_buffers 0.3600 74 end_buffer_write_sync 0.6116 14 __find_get_block_slow 0.0323 12 end_buffer_async_write 0.0388 1 buffer_insert_list 0.0067 30 create_buffers 0.1840 1 init_page_buffers 0.0089 12 mark_buffer_dirty 0.3000 45 __brelse 0.5769 162 __find_get_block 0.6585 17 __getblk 0.1683 9 __bread 0.1364 5 set_bh_page 0.0926 2 try_to_release_page 0.0182 22 create_empty_buffers 0.1089 55 __block_write_full_page 0.0573 61 __block_prepare_write 0.0614 18 __block_commit_write 0.1208 5 block_prepare_write 0.0649 14 generic_commit_write 0.0946 26 block_write_full_page 0.0974 21 end_bio_bh_io_sync 0.3387 25 submit_bh 0.0767 30 ll_rw_block 0.2206 4 recalc_bh_state 0.0223 15 alloc_buffer_head 0.1429 10 init_buffer_head 0.1887 1 .text.lock.buffer 0.0054 5 bio_destructor 0.0532 14 bio_alloc 0.0329 50 bio_put 0.9259 3 bio_endio 0.0236 1 cp_new_stat64 0.0037 1 sys_fstat64 0.0175 15 inode_add_bytes 0.1056 2 flush_old_exec 0.0008 74 pipe_wait 0.4134 222 pipe_readv 0.3140 9 pipe_read 0.1525 128 pipe_writev 0.1544 10 pipe_write 0.1695 120 pipe_poll 0.9677 1 pipe_release 0.0043 1 get_pipe_inode 0.0052 1 vfs_permission 0.0032 2 deny_write_access 0.0145 1 follow_mount 0.0068 2 do_lookup 0.0124 7 link_path_walk 0.0018 1 __user_walk 0.0081 1 may_open 0.0019 1 open_namei 0.0006 1 do_fcntl 0.0021 12 kill_fasync 0.1034 5 poll_initwait 0.2000 31 poll_freewait 0.4844 32 __pollwait 0.1624 19 max_select_fd 0.0844 149 do_select 0.1905 7 select_bits_alloc 0.2188 1 select_bits_free 0.2000 109 sys_select 0.0845 1 __posix_lock_file 0.0006 2 dput 0.0032 1 d_alloc 0.0022 5 __d_lookup 0.0120 102 inode_times_differ 1.5000 33 update_atime 0.1486 56 inode_update_time 0.2617 1 i_waitq_head 0.0455 1 is_bad_inode 0.0455 241 dnotify_parent 0.9526 93 __mark_inode_dirty 0.1921 1 __sync_single_inode 0.0018 12 mpage_writepages 0.0143 1 proc_lookup 0.0030 1 meminfo_read_proc 0.0020 4 show_stat 0.0018 11 write_profile 0.0705 32 ext3_get_group_desc 0.1702 3 read_block_bitmap 0.0197 1 find_next_usable_block 0.0012 64 ext3_try_to_allocate 0.0719 5 ext3_has_free_blocks 0.0407 68 ext3_new_block 0.0523 25 ext3_file_write 0.1174 5 ext3_alloc_block 0.0847 16 ext3_block_to_path 0.0503 39 ext3_get_branch 0.1653 9 ext3_find_goal 0.0657 14 ext3_alloc_branch 0.0202 44 ext3_splice_branch 0.0928 62 ext3_get_block_handle 0.0697 7 ext3_get_block 0.0402 61 walk_page_buffers 0.5446 2 do_journal_get_write_access 0.0165 32 ext3_prepare_write 0.1006 6 ext3_journal_dirty_data 0.0645 78 ext3_ordered_commit_write 0.3406 16 bget_one 1.4545 1 bput_one 0.0909 2 journal_dirty_data_fn 0.1053 8 ext3_ordered_writepage 0.0174 48 ext3_get_inode_block 0.1839 35 ext3_get_inode_loc 0.0550 95 ext3_do_update_inode 0.1029 29 ext3_writepage_trans_blocks 0.2042 36 ext3_mark_iloc_dirty 0.6545 18 ext3_reserve_inode_write 0.0853 15 ext3_mark_inode_dirty 0.1852 25 ext3_dirty_inode 0.1852 20 ext3_journal_start 0.2247 14 __ext3_journal_stop 0.1750 50 start_this_handle 0.0390 20 new_handle 0.2500 35 journal_start 0.1667 177 do_get_write_access 0.0991 22 journal_get_write_access 0.2716 24 journal_get_undo_access 0.0578 53 journal_dirty_data 0.0725 109 journal_dirty_metadata 0.1985 100 journal_stop 0.1229 100 __journal_unfile_buffer 0.1934 37 __journal_file_buffer 0.0528 28 inverted_lock 0.2917 272 journal_commit_transaction 0.0445 1 __journal_remove_checkpoint 0.0069 73 journal_cancel_revoke 0.2104 12 __log_space_left 0.1165 12 journal_blocks_per_page 0.4138 6 journal_alloc_journal_head 0.0517 2 journal_free_journal_head 0.0714 260 journal_add_journal_head 0.7104 39 __journal_remove_journal_head 0.0980 55 journal_remove_journal_head 0.4435 75 journal_put_journal_head 0.3363 7 radix_tree_preload 0.0395 1 rb_erase 0.0044 2 number 0.0026 10 vsnprintf 0.0081 1 find_next_zero_bit 0.0057 29 csum_partial 0.1007 16 memcpy 0.2807 6043 __copy_user_intel 35.1337 4277 __copy_user_zeroing_intel 24.8663 91 __copy_to_user_ll 0.7583 2215 __copy_from_user_ll 18.4583 26 copy_to_user 0.2653 27 copy_from_user 0.2143 2 add_disk_randomness 0.0385 2 blk_run_queue 0.0161 1 get_request 0.0013 120 __make_request 0.0863 13 generic_make_request 0.0264 11 submit_bio 0.0381 53 __end_that_request_first 0.1008 1 get_io_context 0.0080 9 .text.lock.ll_rw_blk 0.0662 2 as_set_request 0.0153 303 e1000_xmit_frame 0.1424 5 scsi_put_command 0.0221 19 scsi_dispatch_cmd 0.0353 2 scsi_finish_command 0.0112 1 scsi_add_timer 0.0093 1 scsi_decide_disposition 0.0033 2 scsi_init_cmd_errh 0.0104 10 scsi_device_unbusy 0.0543 4 scsi_run_queue 0.0145 22 scsi_end_request 0.0833 4 scsi_io_completion 0.0039 121 scsi_request_fn 0.1115 20 .text.lock.scsi_lib 0.0935 37 ahc_linux_isr 0.0532 1 sd_rw_intr 0.0015 1 move_addr_to_kernel 0.0139 28 sock_aio_read 0.0952 7 sock_aio_write 0.0238 23 sock_poll 0.4694 182 sock_wfree 2.3947 1 sock_wmalloc 0.0106 18 __release_sock 0.1169 397 sock_def_readable 2.2056 11 sk_reset_timer 0.2340 95 lock_sock 0.7661 51 release_sock 0.3355 31 sock_common_recvmsg 0.2650 191 .text.lock.sock 1.5403 247 alloc_skb 1.1027 407 skb_release_data 2.3391 13 kfree_skbmem 0.2955 658 __kfree_skb 2.8860 74 skb_clone 0.1927 35 copy_skb_header 0.1411 23 skb_copy 0.1036 285 skb_copy_bits 0.5418 5 skb_checksum 0.0081 1 verify_iovec 0.0068 17 memcpy_toiovec 0.1789 4 memcpy_tokerneliovec 0.0533 131 skb_copy_datagram_iovec 0.2417 28 sk_stream_rfree 1.0370 3 sk_stream_error 0.0323 10 skb_checksum_help 0.0309 101 dev_queue_xmit 0.1269 18 net_tx_action 0.0468 73 netif_receive_skb 0.1640 112 process_backlog 0.4103 56 net_rx_action 0.2162 197 nf_iterate 1.1939 112 nf_hook_slow 0.3916 162 qdisc_restart 0.2746 133 pfifo_fast_enqueue 0.9172 101 pfifo_fast_dequeue 1.2469 22 rt_hash_code 0.1606 298 ip_route_input 0.5478 39 ip_local_deliver 0.0771 153 ip_rcv 0.1197 71 ip_local_deliver_finish 0.1821 51 ip_rcv_finish 0.0787 25 ip_finish_output 0.0470 13 ip_output 0.1083 349 ip_queue_xmit 0.2314 10 dst_output 0.2439 225 ip_finish_output2 0.5079 126 tcp_poll 0.3281 163 tcp_sendmsg 0.0359 55 cleanup_rbuf 0.1786 431 tcp_recvmsg 0.2146 1 tcp_enter_quickack_mode 0.0263 29 __tcp_grow_window 0.2214 55 tcp_rcv_rtt_update 0.6044 46 tcp_rcv_space_adjust 0.1411 230 tcp_event_data_recv 0.3846 31 tcp_rtt_estimator 0.0923 14 tcp_ack_saw_tstamp 0.1667 59 tcp_clean_rtx_queue 0.0620 33 tcp_ack 0.0225 9 __tcp_data_snd_check 0.0381 64 __tcp_ack_snd_check 0.3975 803 tcp_rcv_established 0.3476 278 tcp_transmit_skb 0.1596 46 tcp_write_xmit 0.0634 31 __tcp_select_window 0.1044 17 tcp_send_delayed_ack 0.0769 80 tcp_send_ack 0.4103 494 __tcp_v4_lookup_established 1.8712 33 tcp_v4_send_check 0.1304 42 tcp_v4_do_rcv 0.1321 424 tcp_v4_rcv 0.2153 9 inet_sendmsg 0.1011 21 ip_confirm 0.4375 39 ip_conntrack_defrag 0.5571 15 ip_refrag 0.1049 13 ip_conntrack_local 0.0890 25 __ip_ct_find_proto 0.3846 234 ip_ct_find_proto 2.1869 65 hash_conntrack 0.4221 26 get_tuple 0.2796 2 invert_tuple 0.0426 66 __ip_conntrack_find 0.3014 159 ip_conntrack_find_get 1.3140 12 ip_conntrack_get 0.3333 114 ip_conntrack_in 0.1854 269 ip_ct_refresh 1.4158 39 tcp_pkt_to_tuple 0.4588 8 get_conntrack_index 0.1311 421 tcp_packet 0.8901 940 ipt_do_table 0.9701 11 ipt_hook 0.1864 13 ipt_local_out_hook 0.1111 42 ipt_route_hook 0.7119 28 ipt_local_hook 0.1202 51 ip_nat_fn 0.0847 24 ip_nat_out 0.1395 214 do_bindings 0.2626 1 unix_release_sock 0.0010 1 __sched_text_start 0.0034 1 __up_wakeup 0.0833 4 __write_lock_failed 0.1250 2 __read_lock_failed 0.1000 223 schedule 0.1072 1 __preempt_spin_lock 0.0110 432 .text.lock.sched 2.2041 4 schedule_timeout 0.0209 458065 total 0.1489 29 default_idle 0.6444 418979 poll_idle 7223.7759 68 cpu_idle 1.0625 4 need_resched 0.0800 120 system_call 2.7273 6 syscall_call 0.5455 5 syscall_exit 0.4545 11 handle_IRQ_event 0.1100 1 old_mmap 0.0030 1 show_cpuinfo 0.0015 58 sched_clock 0.4265 2 delay_tsc 0.0952 6 pte_alloc_one 0.0779 1 pgd_ctor 0.0060 17 do_page_fault 0.0122 1689 finish_task_switch 11.3356 1001 __wake_up 8.4831 203 __might_sleep 0.9621 87 add_wait_queue 0.7016 49 remove_wait_queue 0.3828 32 prepare_to_wait 0.2177 46 finish_wait 0.2911 1 copy_mm 0.0009 1 copy_process 0.0003 5 .text.lock.fork 0.0253 1 release_task 0.0018 1 sys_wait4 0.0016 597 current_kernel_time 8.6522 5519 __do_softirq 31.9017 174 local_bh_enable 1.2083 688 __mod_timer 1.3308 71 mod_timer 0.6698 335 del_timer 2.1753 1 sys_getpid 0.0625 1 .text.lock.timer 0.0109 1 do_sigaction 0.0016 3 in_group_p 0.0250 70 add_to_page_cache 0.2857 13 page_waitqueue 0.2708 48 wake_up_page 0.6234 24 unlock_page 0.6486 12 end_page_writeback 0.1622 55 find_get_page 0.4911 34 find_lock_page 0.1172 34 find_get_pages_tag 0.2138 2 do_generic_mapping_read 0.0016 1 __generic_file_aio_read 0.0018 4 filemap_nopage 0.0042 4 remove_suid 0.0268 118 generic_file_aio_write_nolock 0.0407 24 generic_file_aio_write 0.1519 43 mempool_alloc 0.1129 18 mempool_free 0.0857 1 mempool_alloc_slab 0.0476 4 mempool_free_slab 0.1905 20 bad_range 0.2000 13 prep_new_page 0.1605 1 __rmqueue 0.0037 44 free_hot_cold_page 0.1477 177 buffered_rmqueue 0.3327 74 __alloc_pages 0.0833 2 __get_free_pages 0.0339 14 __free_pages 0.1795 3 free_pages 0.0667 2 __read_page_state 0.0357 1 get_dirty_limits 0.0049 10 balance_dirty_pages_ratelimited 0.0498 59 __set_page_dirty_nobuffers 0.1569 2 set_page_dirty 0.0238 9 clear_page_dirty_for_io 0.0789 58 test_clear_page_writeback 0.2275 54 test_set_page_writeback 0.1800 18 .text.lock.page_writeback 0.1406 1 file_ra_state_init 0.0270 1 kmem_getpages 0.0048 2 alloc_slabmgmt 0.0208 3 cache_init_objs 0.0288 1 kmem_flagcheck 0.0233 1 set_slab_attr 0.0172 3 cache_grow 0.0066 162 kmem_cache_alloc 1.3171 3 kmem_ptr_validate 0.0395 81 __kmalloc 0.5260 186 kmem_cache_free 2.1379 206 kfree 1.8899 27 mark_page_accessed 0.5192 1 lru_cache_add 0.0105 1 lru_cache_add_active 0.0105 1 lru_add_drain 0.0089 34 release_pages 0.0752 29 __pagevec_lru_add 0.0915 2 __pagevec_lru_add_active 0.0060 1 vm_acct_memory 0.0122 16 percpu_counter_mod 0.0914 2 blk_queue_bounce 0.0260 2 clear_page_tables 0.0065 3 pte_alloc_map 0.0121 7 copy_page_range 0.0090 18 zap_pte_range 0.0259 1 unmap_vmas 0.0017 17 do_wp_page 0.0200 16 do_anonymous_page 0.0356 295 do_no_page 0.3311 3 handle_mm_fault 0.0068 1 remove_vm_struct 0.0062 1 find_vma_prepare 0.0099 2 vma_link 0.0061 1 vma_adjust 0.0010 1 can_vma_merge_before 0.0098 1 can_vma_merge_after 0.0090 1 do_mmap_pgoff 0.0005 2 find_vma 0.0247 1 expand_stack 0.0034 1 unmap_region 0.0035 3 split_vma 0.0105 2 page_add_anon_rmap 0.0061 1 page_add_file_rmap 0.0046 10 page_remove_rmap 0.0418 11 do_sync_read 0.0636 105 vfs_read 0.3559 15 do_sync_write 0.0867 57 vfs_write 0.1932 24 sys_read 0.1875 24 sys_write 0.1875 1 get_empty_filp 0.0043 62 fput 2.9524 1 __fput 0.0047 104 fget 0.8125 30 fget_light 0.1796 1 file_move 0.0071 5 bh_waitq_head 0.2273 70 wake_up_buffer 0.8434 35 unlock_buffer 1.4583 16 __set_page_buffers 0.6400 65 end_buffer_write_sync 0.5372 18 __find_get_block_slow 0.0416 13 end_buffer_async_write 0.0421 28 create_buffers 0.1718 11 mark_buffer_dirty 0.2750 52 __brelse 0.6667 146 __find_get_block 0.5935 20 __getblk 0.1980 8 __bread 0.1212 7 set_bh_page 0.1296 1 try_to_release_page 0.0091 26 create_empty_buffers 0.1287 1 unmap_underlying_metadata 0.0088 43 __block_write_full_page 0.0448 49 __block_prepare_write 0.0493 24 __block_commit_write 0.1611 15 block_prepare_write 0.1948 4 generic_commit_write 0.0270 10 block_write_full_page 0.0375 17 end_bio_bh_io_sync 0.2742 38 submit_bh 0.1166 32 ll_rw_block 0.2353 2 recalc_bh_state 0.0112 12 alloc_buffer_head 0.1143 17 init_buffer_head 0.3208 5 .text.lock.buffer 0.0269 6 bio_destructor 0.0638 18 bio_alloc 0.0423 55 bio_put 1.0185 5 bio_endio 0.0394 1 cp_new_stat64 0.0037 9 inode_add_bytes 0.0634 54 pipe_wait 0.3017 273 pipe_readv 0.3861 7 pipe_read 0.1186 141 pipe_writev 0.1701 7 pipe_write 0.1186 153 pipe_poll 1.2339 1 deny_write_access 0.0072 1 follow_mount 0.0068 4 link_path_walk 0.0010 3 path_lookup 0.0064 1 may_open 0.0019 1 open_namei 0.0006 19 kill_fasync 0.1638 2 poll_initwait 0.0800 29 poll_freewait 0.4531 40 __pollwait 0.2030 25 max_select_fd 0.1111 156 do_select 0.1995 7 select_bits_alloc 0.2188 119 sys_select 0.0922 1 __posix_lock_file 0.0006 1 __d_lookup 0.0024 1 alloc_inode 0.0030 147 inode_times_differ 2.1618 50 update_atime 0.2252 61 inode_update_time 0.2850 240 dnotify_parent 0.9486 1 seq_printf 0.0116 102 __mark_inode_dirty 0.2107 1 writeback_inodes 0.0025 8 mpage_writepages 0.0095 1 load_elf_binary 0.0003 4 show_stat 0.0018 11 write_profile 0.0705 22 ext3_get_group_desc 0.1170 5 read_block_bitmap 0.0329 2 find_next_usable_block 0.0024 44 ext3_try_to_allocate 0.0494 5 ext3_has_free_blocks 0.0407 61 ext3_new_block 0.0470 1 ext3_release_file 0.0098 24 ext3_file_write 0.1127 6 ext3_alloc_block 0.1017 28 ext3_block_to_path 0.0881 24 ext3_get_branch 0.1017 22 ext3_find_goal 0.1606 12 ext3_alloc_branch 0.0173 33 ext3_splice_branch 0.0696 76 ext3_get_block_handle 0.0855 16 ext3_get_block 0.0920 68 walk_page_buffers 0.6071 24 ext3_prepare_write 0.0755 5 ext3_journal_dirty_data 0.0538 61 ext3_ordered_commit_write 0.2664 11 bget_one 1.0000 8 journal_dirty_data_fn 0.4211 6 ext3_ordered_writepage 0.0130 44 ext3_get_inode_block 0.1686 24 ext3_get_inode_loc 0.0377 86 ext3_do_update_inode 0.0932 29 ext3_writepage_trans_blocks 0.2042 37 ext3_mark_iloc_dirty 0.6727 22 ext3_reserve_inode_write 0.1043 14 ext3_mark_inode_dirty 0.1728 27 ext3_dirty_inode 0.2000 43 ext3_journal_start 0.4831 42 __ext3_journal_stop 0.5250 136 start_this_handle 0.1061 8 new_handle 0.1000 46 journal_start 0.2190 169 do_get_write_access 0.0946 24 journal_get_write_access 0.2963 26 journal_get_undo_access 0.0627 76 journal_dirty_data 0.1040 140 journal_dirty_metadata 0.2550 104 journal_stop 0.1278 87 __journal_unfile_buffer 0.1683 41 __journal_file_buffer 0.0585 20 inverted_lock 0.2083 213 journal_commit_transaction 0.0349 2 journal_brelse_array 0.0455 74 journal_cancel_revoke 0.2133 1 journal_write_revoke_records 0.0039 1 kjournald 0.0014 9 __log_space_left 0.0874 5 journal_blocks_per_page 0.1724 8 journal_alloc_journal_head 0.0690 1 journal_free_journal_head 0.0357 243 journal_add_journal_head 0.6639 66 __journal_remove_journal_head 0.1658 64 journal_remove_journal_head 0.5161 98 journal_put_journal_head 0.4395 1 sys_shmdt 0.0028 1 kobject_put 0.0400 10 radix_tree_preload 0.0565 4 number 0.0051 6 vsnprintf 0.0049 29 csum_partial 0.1007 1 atomic_dec_and_lock 0.0086 9 memcpy 0.1579 2 strncpy_from_user 0.0202 5885 __copy_user_intel 34.2151 4237 __copy_user_zeroing_intel 24.6337 92 __copy_to_user_ll 0.7667 2218 __copy_from_user_ll 18.4833 23 copy_to_user 0.2347 36 copy_from_user 0.2857 1 add_entropy_words 0.0023 1 add_disk_randomness 0.0192 1 put_device 0.1000 2 get_request 0.0027 99 __make_request 0.0712 14 generic_make_request 0.0285 8 submit_bio 0.0277 52 __end_that_request_first 0.0989 8 .text.lock.ll_rw_blk 0.0588 338 e1000_xmit_frame 0.1588 4 scsi_put_command 0.0177 14 scsi_dispatch_cmd 0.0260 1 scsi_softirq 0.0048 2 scsi_finish_command 0.0112 2 scsi_decide_disposition 0.0067 3 scsi_init_cmd_errh 0.0156 10 scsi_device_unbusy 0.0543 4 scsi_run_queue 0.0145 22 scsi_end_request 0.0833 1 scsi_free_sgtable 0.0222 3 scsi_io_completion 0.0029 114 scsi_request_fn 0.1051 9 .text.lock.scsi_lib 0.0421 32 ahc_linux_isr 0.0460 1 sd_rw_intr 0.0015 25 sock_aio_read 0.0850 15 sock_aio_write 0.0510 27 sock_poll 0.5510 1 sock_fasync 0.0021 212 sock_wfree 2.7895 12 __release_sock 0.0779 293 sock_def_readable 1.6278 9 sk_reset_timer 0.1915 69 lock_sock 0.5565 49 release_sock 0.3224 33 sock_common_recvmsg 0.2821 190 .text.lock.sock 1.5323 241 alloc_skb 1.0759 406 skb_release_data 2.3333 19 kfree_skbmem 0.4318 651 __kfree_skb 2.8553 88 skb_clone 0.2292 23 copy_skb_header 0.0927 26 skb_copy 0.1171 299 skb_copy_bits 0.5684 4 skb_checksum 0.0065 18 memcpy_toiovec 0.1895 130 skb_copy_datagram_iovec 0.2399 31 sk_stream_rfree 1.1481 4 sk_stream_error 0.0430 11 skb_checksum_help 0.0340 88 dev_queue_xmit 0.1106 27 net_tx_action 0.0701 72 netif_receive_skb 0.1618 112 process_backlog 0.4103 68 net_rx_action 0.2625 201 nf_iterate 1.2182 93 nf_hook_slow 0.3252 153 qdisc_restart 0.2593 142 pfifo_fast_enqueue 0.9793 106 pfifo_fast_dequeue 1.3086 24 rt_hash_code 0.1752 261 ip_route_input 0.4798 26 ip_local_deliver 0.0514 185 ip_rcv 0.1448 63 ip_local_deliver_finish 0.1615 55 ip_rcv_finish 0.0849 17 ip_finish_output 0.0320 26 ip_output 0.2167 376 ip_queue_xmit 0.2493 6 dst_output 0.1463 209 ip_finish_output2 0.4718 114 tcp_poll 0.2969 189 tcp_sendmsg 0.0416 47 cleanup_rbuf 0.1526 449 tcp_recvmsg 0.2236 46 __tcp_grow_window 0.3511 59 tcp_rcv_rtt_update 0.6484 66 tcp_rcv_space_adjust 0.2025 237 tcp_event_data_recv 0.3963 35 tcp_rtt_estimator 0.1042 8 tcp_ack_saw_tstamp 0.0952 56 tcp_clean_rtx_queue 0.0589 33 tcp_ack 0.0225 2 tcp_data_queue 0.0007 11 __tcp_data_snd_check 0.0466 63 __tcp_ack_snd_check 0.3913 805 tcp_rcv_established 0.3485 254 tcp_transmit_skb 0.1458 47 tcp_write_xmit 0.0648 48 __tcp_select_window 0.1616 14 tcp_send_delayed_ack 0.0633 89 tcp_send_ack 0.4564 479 __tcp_v4_lookup_established 1.8144 28 tcp_v4_send_check 0.1107 51 tcp_v4_do_rcv 0.1604 425 tcp_v4_rcv 0.2158 10 inet_sendmsg 0.1124 23 ip_confirm 0.4792 31 ip_conntrack_defrag 0.4429 12 ip_refrag 0.0839 15 ip_conntrack_local 0.1027 22 __ip_ct_find_proto 0.3385 215 ip_ct_find_proto 2.0093 76 hash_conntrack 0.4935 49 get_tuple 0.5269 2 invert_tuple 0.0426 68 __ip_conntrack_find 0.3105 129 ip_conntrack_find_get 1.0661 10 ip_conntrack_get 0.2778 133 ip_conntrack_in 0.2163 313 ip_ct_refresh 1.6474 1 ip_ct_gather_frags 0.0052 38 tcp_pkt_to_tuple 0.4471 11 get_conntrack_index 0.1803 488 tcp_packet 1.0317 913 ipt_do_table 0.9422 10 ipt_hook 0.1695 12 ipt_local_out_hook 0.1026 31 ipt_route_hook 0.5254 29 ipt_local_hook 0.1245 70 ip_nat_fn 0.1163 23 ip_nat_out 0.1337 179 do_bindings 0.2196 1 unix_release_sock 0.0010 5 __sched_text_start 0.0172 1 __down_failed 0.0833 5 __write_lock_failed 0.1562 2 __read_lock_failed 0.1000 246 schedule 0.1182 7 __preempt_spin_lock 0.0769 430 .text.lock.sched 2.1939 8 schedule_timeout 0.0419 463392 total 0.1506 24 default_idle 0.5333 417483 poll_idle 7197.9828 48 cpu_idle 0.7500 1 flush_thread 0.0083 1 sys_execve 0.0064 126 system_call 2.8636 7 syscall_call 0.6364 15 syscall_exit 1.3636 1 handle_IRQ_event 0.0100 3 show_cpuinfo 0.0044 33 sched_clock 0.2426 2 pte_alloc_one 0.0260 1 pgd_ctor 0.0060 17 do_page_fault 0.0122 1660 finish_task_switch 11.1409 964 __wake_up 8.1695 1 migration_thread 0.0022 202 __might_sleep 0.9573 1 task_curr 0.0044 97 add_wait_queue 0.7823 53 remove_wait_queue 0.4141 33 prepare_to_wait 0.2245 35 finish_wait 0.2215 1 dup_task_struct 0.0047 2 copy_mm 0.0017 1 copy_files 0.0010 1 copy_process 0.0003 5 .text.lock.fork 0.0253 2 release_task 0.0037 1 do_setitimer 0.0021 90 current_kernel_time 1.3043 5208 __do_softirq 30.1040 152 local_bh_enable 1.0556 611 __mod_timer 1.1818 81 mod_timer 0.7642 323 del_timer 2.0974 1 run_timer_softirq 0.0022 1 sys_geteuid 0.0625 1 .text.lock.timer 0.0109 1 do_sigaction 0.0016 1 groups_search 0.0094 1 in_group_p 0.0083 50 add_to_page_cache 0.2041 12 page_waitqueue 0.2500 50 wake_up_page 0.6494 10 unlock_page 0.2703 16 end_page_writeback 0.2162 52 find_get_page 0.4643 36 find_lock_page 0.1241 48 find_get_pages_tag 0.3019 1 do_generic_mapping_read 0.0008 5 filemap_nopage 0.0053 7 remove_suid 0.0470 126 generic_file_aio_write_nolock 0.0435 25 generic_file_aio_write 0.1582 39 mempool_alloc 0.1024 21 mempool_free 0.1000 1 mempool_free_slab 0.0476 30 bad_range 0.3000 17 prep_new_page 0.2099 56 free_hot_cold_page 0.1879 157 buffered_rmqueue 0.2951 82 __alloc_pages 0.0923 5 __get_free_pages 0.0847 14 __free_pages 0.1795 6 free_pages 0.1333 1 __read_page_state 0.0179 9 balance_dirty_pages_ratelimited 0.0448 1 background_writeout 0.0058 1 do_writepages 0.0149 61 __set_page_dirty_nobuffers 0.1622 8 clear_page_dirty_for_io 0.0702 49 test_clear_page_writeback 0.1922 53 test_set_page_writeback 0.1767 9 .text.lock.page_writeback 0.0703 1 vma_prio_tree_add 0.0060 2 do_page_cache_readahead 0.0043 4 kmem_getpages 0.0191 5 cache_init_objs 0.0481 1 kmem_flagcheck 0.0233 1 set_slab_attr 0.0172 3 cache_grow 0.0066 161 kmem_cache_alloc 1.3089 75 __kmalloc 0.4870 171 kmem_cache_free 1.9655 217 kfree 1.9908 28 mark_page_accessed 0.5385 1 lru_cache_add_active 0.0105 1 lru_add_drain 0.0089 37 release_pages 0.0819 2 __pagevec_release 0.0370 32 __pagevec_lru_add 0.1009 5 __pagevec_lru_add_active 0.0149 14 percpu_counter_mod 0.0800 2 blk_queue_bounce 0.0260 4 clear_page_tables 0.0130 1 pte_alloc_map 0.0040 11 copy_page_range 0.0142 27 zap_pte_range 0.0389 1 unmap_page_range 0.0088 22 do_wp_page 0.0259 19 do_anonymous_page 0.0423 299 do_no_page 0.3356 8 handle_mm_fault 0.0182 1 remove_vm_struct 0.0062 1 find_vma_prepare 0.0099 2 vma_link 0.0061 1 do_mmap_pgoff 0.0005 2 find_vma 0.0247 2 do_munmap 0.0044 1 mprotect_fixup 0.0027 2 anon_vma_unlink 0.0128 2 page_add_anon_rmap 0.0061 4 page_add_file_rmap 0.0185 7 page_remove_rmap 0.0293 1 free_pages_and_swap_cache 0.0076 1 dentry_open 0.0025 1 put_unused_fd 0.0081 10 do_sync_read 0.0578 72 vfs_read 0.2441 29 do_sync_write 0.1676 66 vfs_write 0.2237 37 sys_read 0.2891 36 sys_write 0.2812 47 fput 2.2381 116 fget 0.9062 42 fget_light 0.2515 3 bh_waitq_head 0.1364 48 wake_up_buffer 0.5783 44 unlock_buffer 1.8333 9 __set_page_buffers 0.3600 70 end_buffer_write_sync 0.5785 13 __find_get_block_slow 0.0300 23 end_buffer_async_write 0.0744 2 buffer_insert_list 0.0134 24 create_buffers 0.1472 2 grow_dev_page 0.0049 6 mark_buffer_dirty 0.1500 41 __brelse 0.5256 2 bh_lru_install 0.0088 171 __find_get_block 0.6951 29 __getblk 0.2871 11 __bread 0.1667 3 set_bh_page 0.0556 25 create_empty_buffers 0.1238 6 unmap_underlying_metadata 0.0531 58 __block_write_full_page 0.0604 51 __block_prepare_write 0.0514 29 __block_commit_write 0.1946 12 block_prepare_write 0.1558 9 generic_commit_write 0.0608 19 block_write_full_page 0.0712 27 end_bio_bh_io_sync 0.4355 42 submit_bh 0.1288 27 ll_rw_block 0.1985 4 recalc_bh_state 0.0223 6 alloc_buffer_head 0.0571 17 init_buffer_head 0.3208 10 .text.lock.buffer 0.0538 8 bio_destructor 0.0851 16 bio_alloc 0.0376 65 bio_put 1.2037 4 bio_endio 0.0315 1 sys_fstat64 0.0175 9 inode_add_bytes 0.0634 1 copy_strings 0.0018 1 kernel_read 0.0105 1 do_execve 0.0015 58 pipe_wait 0.3240 216 pipe_readv 0.3055 7 pipe_read 0.1186 157 pipe_writev 0.1894 4 pipe_write 0.0678 162 pipe_poll 1.3065 1 .text.lock.pipe 0.0050 1 getname 0.0041 2 deny_write_access 0.0145 3 do_lookup 0.0186 2 link_path_walk 0.0005 1 __user_walk 0.0081 16 kill_fasync 0.1379 1 poll_initwait 0.0400 27 poll_freewait 0.4219 33 __pollwait 0.1675 20 max_select_fd 0.0889 167 do_select 0.2136 8 select_bits_alloc 0.2500 1 select_bits_free 0.2000 104 sys_select 0.0806 1 locks_remove_flock 0.0039 9 __d_lookup 0.0216 112 inode_times_differ 1.6471 25 update_atime 0.1126 48 inode_update_time 0.2243 192 dnotify_parent 0.7589 54 __mark_inode_dirty 0.1116 1 sync_sb_inodes 0.0013 1 writeback_inodes 0.0025 1 writeback_acquire 0.0455 12 mpage_writepages 0.0143 1 proc_pid_unhash 0.0063 7 show_stat 0.0031 6 write_profile 0.0385 30 ext3_get_group_desc 0.1596 8 read_block_bitmap 0.0526 1 find_next_usable_block 0.0012 67 ext3_try_to_allocate 0.0753 10 ext3_has_free_blocks 0.0813 56 ext3_new_block 0.0431 1 ext3_release_file 0.0098 1 ext3_open_file 0.0222 23 ext3_file_write 0.1080 3 ext3_alloc_block 0.0508 23 ext3_block_to_path 0.0723 33 ext3_get_branch 0.1398 21 ext3_find_goal 0.1533 15 ext3_alloc_branch 0.0217 39 ext3_splice_branch 0.0823 69 ext3_get_block_handle 0.0776 13 ext3_get_block 0.0747 83 walk_page_buffers 0.7411 24 ext3_prepare_write 0.0755 4 ext3_journal_dirty_data 0.0430 130 ext3_ordered_commit_write 0.5677 10 bget_one 0.9091 4 journal_dirty_data_fn 0.2105 12 ext3_ordered_writepage 0.0260 84 ext3_get_inode_block 0.3218 28 ext3_get_inode_loc 0.0440 102 ext3_do_update_inode 0.1105 27 ext3_writepage_trans_blocks 0.1901 30 ext3_mark_iloc_dirty 0.5455 26 ext3_reserve_inode_write 0.1232 17 ext3_mark_inode_dirty 0.2099 21 ext3_dirty_inode 0.1556 25 ext3_journal_start 0.2809 7 __ext3_journal_stop 0.0875 65 start_this_handle 0.0507 21 new_handle 0.2625 34 journal_start 0.1619 161 do_get_write_access 0.0901 26 journal_get_write_access 0.3210 1 journal_get_create_access 0.0015 26 journal_get_undo_access 0.0627 47 journal_dirty_data 0.0643 123 journal_dirty_metadata 0.2240 112 journal_stop 0.1376 105 __journal_unfile_buffer 0.2031 37 __journal_file_buffer 0.0528 1 __journal_refile_buffer 0.0029 30 inverted_lock 0.3125 249 journal_commit_transaction 0.0408 2 journal_brelse_array 0.0455 1 __journal_clean_checkpoint_list 0.0057 57 journal_cancel_revoke 0.1643 11 __log_space_left 0.1068 2 journal_get_descriptor_buffer 0.0106 3 journal_blocks_per_page 0.1034 12 journal_alloc_journal_head 0.1034 279 journal_add_journal_head 0.7623 50 __journal_remove_journal_head 0.1256 71 journal_remove_journal_head 0.5726 102 journal_put_journal_head 0.4574 1 sys_semtimedop 0.0008 1 kobject_put 0.0400 7 radix_tree_preload 0.0395 1 __rb_erase_color 0.0024 1 number 0.0013 6 vsnprintf 0.0049 1 find_next_bit 0.0066 25 csum_partial 0.0868 2 atomic_dec_and_lock 0.0172 1 bad_get_user 0.1111 19 memcpy 0.3333 2 strncpy_from_user 0.0202 1 clear_user 0.0096 6073 __copy_user_intel 35.3081 4281 __copy_user_zeroing_intel 24.8895 108 __copy_to_user_ll 0.9000 2419 __copy_from_user_ll 20.1583 34 copy_to_user 0.3469 29 copy_from_user 0.2302 2 add_disk_randomness 0.0385 9 blk_run_queue 0.0726 5 get_request 0.0067 112 __make_request 0.0806 11 generic_make_request 0.0224 7 submit_bio 0.0242 70 __end_that_request_first 0.1331 6 put_io_context 0.0682 11 .text.lock.ll_rw_blk 0.0809 2 as_set_request 0.0153 306 e1000_xmit_frame 0.1438 5 scsi_put_command 0.0221 31 scsi_dispatch_cmd 0.0575 1 scsi_softirq 0.0048 2 scsi_finish_command 0.0112 1 scsi_add_timer 0.0093 3 scsi_decide_disposition 0.0100 2 scsi_init_cmd_errh 0.0104 15 scsi_device_unbusy 0.0815 5 scsi_run_queue 0.0182 29 scsi_end_request 0.1098 1 scsi_free_sgtable 0.0222 6 scsi_io_completion 0.0059 168 scsi_request_fn 0.1548 10 .text.lock.scsi_lib 0.0467 60 ahc_linux_isr 0.0863 1 sd_rw_intr 0.0015 11 sock_aio_read 0.0374 17 sock_aio_write 0.0578 33 sock_poll 0.6735 187 sock_wfree 2.4605 10 __release_sock 0.0649 300 sock_def_readable 1.6667 17 sk_reset_timer 0.3617 75 lock_sock 0.6048 40 release_sock 0.2632 25 sock_common_recvmsg 0.2137 186 .text.lock.sock 1.5000 241 alloc_skb 1.0759 369 skb_release_data 2.1207 15 kfree_skbmem 0.3409 682 __kfree_skb 2.9912 64 skb_clone 0.1667 31 copy_skb_header 0.1250 18 skb_copy 0.0811 296 skb_copy_bits 0.5627 6 skb_checksum 0.0097 26 memcpy_toiovec 0.2737 152 skb_copy_datagram_iovec 0.2804 32 sk_stream_rfree 1.1852 10 sk_stream_error 0.1075 1 sk_stream_mem_schedule 0.0029 17 skb_checksum_help 0.0525 97 dev_queue_xmit 0.1219 23 net_tx_action 0.0597 59 netif_receive_skb 0.1326 98 process_backlog 0.3590 58 net_rx_action 0.2239 187 nf_iterate 1.1333 96 nf_hook_slow 0.3357 162 qdisc_restart 0.2746 130 pfifo_fast_enqueue 0.8966 111 pfifo_fast_dequeue 1.3704 27 rt_hash_code 0.1971 257 ip_route_input 0.4724 43 ip_local_deliver 0.0850 196 ip_rcv 0.1534 64 ip_local_deliver_finish 0.1641 38 ip_rcv_finish 0.0586 29 ip_finish_output 0.0545 27 ip_output 0.2250 353 ip_queue_xmit 0.2341 12 dst_output 0.2927 220 ip_finish_output2 0.4966 121 tcp_poll 0.3151 177 tcp_sendmsg 0.0389 47 cleanup_rbuf 0.1526 411 tcp_recvmsg 0.2047 34 __tcp_grow_window 0.2595 54 tcp_rcv_rtt_update 0.5934 39 tcp_rcv_space_adjust 0.1196 208 tcp_event_data_recv 0.3478 24 tcp_rtt_estimator 0.0714 1 tcp_time_to_recover 0.0017 11 tcp_ack_saw_tstamp 0.1310 67 tcp_clean_rtx_queue 0.0705 37 tcp_ack 0.0253 1 tcp_sack_new_ofo_skb 0.0035 3 tcp_data_queue 0.0010 11 __tcp_data_snd_check 0.0466 58 __tcp_ack_snd_check 0.3602 1 tcp_check_urg 0.0036 772 tcp_rcv_established 0.3342 249 tcp_transmit_skb 0.1429 40 tcp_write_xmit 0.0552 42 __tcp_select_window 0.1414 21 tcp_send_delayed_ack 0.0950 62 tcp_send_ack 0.3179 483 __tcp_v4_lookup_established 1.8295 33 tcp_v4_send_check 0.1304 40 tcp_v4_do_rcv 0.1258 439 tcp_v4_rcv 0.2230 6 inet_sendmsg 0.0674 23 ip_confirm 0.4792 24 ip_conntrack_defrag 0.3429 18 ip_refrag 0.1259 11 ip_conntrack_local 0.0753 25 __ip_ct_find_proto 0.3846 278 ip_ct_find_proto 2.5981 66 hash_conntrack 0.4286 37 get_tuple 0.3978 4 invert_tuple 0.0851 67 __ip_conntrack_find 0.3059 158 ip_conntrack_find_get 1.3058 9 ip_conntrack_get 0.2500 114 ip_conntrack_in 0.1854 267 ip_ct_refresh 1.4053 32 tcp_pkt_to_tuple 0.3765 10 get_conntrack_index 0.1639 434 tcp_packet 0.9175 908 ipt_do_table 0.9370 10 ipt_hook 0.1695 13 ipt_local_out_hook 0.1111 25 ipt_route_hook 0.4237 21 ipt_local_hook 0.0901 62 ip_nat_fn 0.1030 16 ip_nat_out 0.0930 199 do_bindings 0.2442 8 __sched_text_start 0.0276 1 __down_failed 0.0833 2 __write_lock_failed 0.0625 2 __read_lock_failed 0.1000 231 schedule 0.1110 2 io_schedule 0.0417 1 io_schedule_timeout 0.0196 1 __preempt_spin_lock 0.0110 458 .text.lock.sched 2.3367 9 schedule_timeout 0.0471 461152 total 0.1499 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=rplog-rcu 18 default_idle 0.4000 433553 poll_idle 7475.0517 41 cpu_idle 0.6406 1 sys_execve 0.0064 10 need_resched 0.2000 114 system_call 2.5909 2 syscall_call 0.1818 15 syscall_exit 1.3636 8 handle_IRQ_event 0.0800 1 old_mmap 0.0030 3 sys_ipc 0.0048 1 save_i387 0.0037 1 show_cpuinfo 0.0015 36 sched_clock 0.2647 2 delay_tsc 0.0952 1 flush_tlb_others 0.0033 3 flush_tlb_mm 0.0176 4 flush_tlb_page 0.0226 9 pte_alloc_one 0.1169 37 do_page_fault 0.0265 2 try_to_wake_up 0.0030 1 wake_up_forked_process 0.0028 1740 finish_task_switch 11.6779 1 schedule_tail 0.0098 2 nr_iowait 0.0174 1007 __wake_up 8.5339 1 migration_thread 0.0022 210 __might_sleep 0.9953 1 __put_task_struct 0.0038 85 add_wait_queue 0.6855 47 remove_wait_queue 0.3672 30 prepare_to_wait 0.2041 46 finish_wait 0.2911 1 dup_task_struct 0.0047 1 mm_init 0.0040 15 copy_mm 0.0129 3 copy_files 0.0031 5 copy_process 0.0017 8 .text.lock.fork 0.0404 3 release_task 0.0055 6 exit_notify 0.0026 1 sys_wait4 0.0016 99 current_kernel_time 1.4348 5108 __do_softirq 29.5260 159 local_bh_enable 1.1042 653 __mod_timer 1.2631 65 mod_timer 0.6132 326 del_timer 2.1169 1 del_timer_sync 0.0055 3 .text.lock.timer 0.0326 1 get_signal_to_deliver 0.0010 3 sigprocmask 0.0124 1 do_sigaction 0.0016 1 set_user 0.0075 3 groups_search 0.0283 1 sys_setgroups 0.0062 4 in_group_p 0.0333 1 worker_thread 0.0013 1 alloc_pidmap 0.0026 68 add_to_page_cache 0.2776 17 page_waitqueue 0.3542 62 wake_up_page 0.8052 22 unlock_page 0.5946 8 end_page_writeback 0.1081 77 find_get_page 0.6875 47 find_lock_page 0.1621 41 find_get_pages_tag 0.2579 1 do_generic_mapping_read 0.0008 1 __generic_file_aio_read 0.0018 21 filemap_nopage 0.0223 1 generic_file_mmap 0.0145 7 remove_suid 0.0470 120 generic_file_aio_write_nolock 0.0414 15 generic_file_aio_write 0.0949 50 mempool_alloc 0.1312 13 mempool_free 0.0619 3 mempool_alloc_slab 0.1429 1 mempool_free_slab 0.0476 20 bad_range 0.2000 18 prep_new_page 0.2222 50 free_hot_cold_page 0.1678 1 free_hot_page 0.1429 180 buffered_rmqueue 0.3383 71 __alloc_pages 0.0800 4 __get_free_pages 0.0678 10 __free_pages 0.1282 3 free_pages 0.0667 1 get_dirty_limits 0.0049 13 balance_dirty_pages_ratelimited 0.0647 56 __set_page_dirty_nobuffers 0.1489 7 set_page_dirty 0.0833 9 clear_page_dirty_for_io 0.0789 43 test_clear_page_writeback 0.1686 51 test_set_page_writeback 0.1700 20 .text.lock.page_writeback 0.1562 1 prio_tree_expand 0.0048 1 prio_tree_replace 0.0101 1 prio_tree_insert 0.0026 1 do_page_cache_readahead 0.0022 1 page_cache_readahead 0.0018 1 max_sane_readahead 0.0156 3 kmem_getpages 0.0144 6 cache_init_objs 0.0577 4 kmem_flagcheck 0.0930 8 cache_grow 0.0176 158 kmem_cache_alloc 1.2846 2 kmem_ptr_validate 0.0263 73 __kmalloc 0.4740 187 kmem_cache_free 2.1494 232 kfree 2.1284 4 activate_page 0.0177 30 mark_page_accessed 0.5769 1 lru_cache_add_active 0.0105 47 release_pages 0.1040 1 __pagevec_release 0.0185 39 __pagevec_lru_add 0.1230 13 __pagevec_lru_add_active 0.0387 1 vm_acct_memory 0.0122 14 percpu_counter_mod 0.0800 1 blk_queue_bounce 0.0130 11 clear_page_tables 0.0357 7 pte_alloc_map 0.0282 102 copy_page_range 0.1316 81 zap_pte_range 0.1167 1 unmap_page_range 0.0088 3 unmap_vmas 0.0052 116 do_wp_page 0.1368 82 do_anonymous_page 0.1826 809 do_no_page 0.9080 19 handle_mm_fault 0.0433 5 remove_vm_struct 0.0309 1 find_vma_prepare 0.0099 2 vma_link 0.0061 2 vma_adjust 0.0020 1 can_vma_merge_after 0.0090 1 find_mergeable_anon_vma 0.0043 4 do_mmap_pgoff 0.0022 9 find_vma 0.1111 1 free_pgtables 0.0067 3 split_vma 0.0105 1 do_munmap 0.0022 1 sys_munmap 0.0082 2 anon_vma_prepare 0.0057 4 anon_vma_link 0.0315 4 anon_vma_unlink 0.0256 4 page_add_anon_rmap 0.0122 6 page_add_file_rmap 0.0278 36 page_remove_rmap 0.1506 1 shmem_swp_entry 0.0047 30 shmem_getpage 0.0119 5 free_pages_and_swap_cache 0.0382 1 sys_access 0.0030 2 dentry_open 0.0051 2 get_unused_fd 0.0078 2 filp_close 0.0149 2 sys_close 0.0098 1 generic_file_llseek 0.0046 11 do_sync_read 0.0636 57 vfs_read 0.1932 24 do_sync_write 0.1387 50 vfs_write 0.1695 27 sys_read 0.2109 30 sys_write 0.2344 45 fput 2.1429 2 __fput 0.0094 108 fget 0.8438 35 fget_light 0.2096 2 file_kill 0.0163 2 bh_waitq_head 0.0909 63 wake_up_buffer 0.7590 32 unlock_buffer 1.3333 1 __wait_on_buffer 0.0061 8 __set_page_buffers 0.3200 69 end_buffer_write_sync 0.5702 17 __find_get_block_slow 0.0393 16 end_buffer_async_write 0.0518 7 create_buffers 0.0429 1 init_page_buffers 0.0089 5 mark_buffer_dirty 0.1250 40 __brelse 0.5128 1 bh_lru_install 0.0044 147 __find_get_block 0.5976 13 __getblk 0.1287 10 __bread 0.1515 6 set_bh_page 0.1111 22 create_empty_buffers 0.1089 3 unmap_underlying_metadata 0.0265 43 __block_write_full_page 0.0448 44 __block_prepare_write 0.0443 20 __block_commit_write 0.1342 7 block_prepare_write 0.0909 9 generic_commit_write 0.0608 18 block_write_full_page 0.0674 23 end_bio_bh_io_sync 0.3710 34 submit_bh 0.1043 28 ll_rw_block 0.2059 4 recalc_bh_state 0.0223 21 alloc_buffer_head 0.2000 28 init_buffer_head 0.5283 2 .text.lock.buffer 0.0108 5 bio_destructor 0.0532 21 bio_alloc 0.0493 53 bio_put 0.9815 2 __bio_add_page 0.0059 7 bio_endio 0.0551 1 generic_fillattr 0.0061 1 cp_new_stat64 0.0037 15 inode_add_bytes 0.1056 1 copy_strings 0.0018 1 setup_arg_pages 0.0021 48 pipe_wait 0.2682 235 pipe_readv 0.3324 7 pipe_read 0.1186 154 pipe_writev 0.1858 9 pipe_write 0.1525 123 pipe_poll 0.9919 1 getname 0.0041 1 deny_write_access 0.0072 1 path_release 0.0143 2 do_lookup 0.0124 7 link_path_walk 0.0018 1 path_lookup 0.0021 1 __user_walk 0.0081 4 may_open 0.0078 2 open_namei 0.0011 1 sys_dup2 0.0030 10 kill_fasync 0.0862 3 poll_initwait 0.1200 37 poll_freewait 0.5781 31 __pollwait 0.1574 18 max_select_fd 0.0800 136 do_select 0.1739 5 select_bits_alloc 0.1562 1 select_bits_free 0.2000 98 sys_select 0.0760 1 flock64_to_posix_lock 0.0027 1 locks_remove_posix 0.0030 3 dput 0.0049 12 __d_lookup 0.0288 1 inode_init_once 0.0032 1 iget_locked 0.0039 130 inode_times_differ 1.9118 29 update_atime 0.1306 32 inode_update_time 0.1495 1 wake_up_inode 0.0139 200 dnotify_parent 0.7905 1 lookup_mnt 0.0060 1 seq_read 0.0014 1 seq_printf 0.0116 64 __mark_inode_dirty 0.1322 1 sync_sb_inodes 0.0013 1 writeback_release 0.0208 4 mpage_end_io_read 0.0336 3 do_mpage_readpage 0.0025 13 mpage_writepages 0.0155 1 set_brk 0.0104 1 load_elf_binary 0.0003 1 proc_lookup 0.0030 10 show_stat 0.0044 7 write_profile 0.0449 27 ext3_get_group_desc 0.1436 7 read_block_bitmap 0.0461 3 find_next_usable_block 0.0035 61 ext3_try_to_allocate 0.0685 11 ext3_has_free_blocks 0.0894 50 ext3_new_block 0.0385 1 ext3_check_dir_entry 0.0043 26 ext3_file_write 0.1221 2 ext3_alloc_block 0.0339 19 ext3_block_to_path 0.0597 42 ext3_get_branch 0.1780 20 ext3_find_goal 0.1460 12 ext3_alloc_branch 0.0173 35 ext3_splice_branch 0.0738 72 ext3_get_block_handle 0.0810 13 ext3_get_block 0.0747 66 walk_page_buffers 0.5893 3 do_journal_get_write_access 0.0248 24 ext3_prepare_write 0.0755 4 ext3_journal_dirty_data 0.0430 108 ext3_ordered_commit_write 0.4716 7 bget_one 0.6364 2 bput_one 0.1818 2 journal_dirty_data_fn 0.1053 8 ext3_ordered_writepage 0.0174 69 ext3_get_inode_block 0.2644 25 ext3_get_inode_loc 0.0393 1 ext3_read_inode 0.0014 77 ext3_do_update_inode 0.0834 25 ext3_writepage_trans_blocks 0.1761 35 ext3_mark_iloc_dirty 0.6364 23 ext3_reserve_inode_write 0.1090 14 ext3_mark_inode_dirty 0.1728 19 ext3_dirty_inode 0.1407 2 ext3_find_entry 0.0018 1 ext3_lookup 0.0051 31 ext3_journal_start 0.3483 17 __ext3_journal_stop 0.2125 1 ext3_follow_link 0.0357 69 start_this_handle 0.0538 15 new_handle 0.1875 24 journal_start 0.1143 173 do_get_write_access 0.0969 17 journal_get_write_access 0.2099 27 journal_get_undo_access 0.0651 79 journal_dirty_data 0.1081 99 journal_dirty_metadata 0.1803 87 journal_stop 0.1069 82 __journal_unfile_buffer 0.1586 39 __journal_file_buffer 0.0556 1 journal_end_buffer_io_sync 0.0323 22 inverted_lock 0.2292 255 journal_commit_transaction 0.0418 3 journal_brelse_array 0.0682 65 journal_cancel_revoke 0.1873 1 journal_write_revoke_records 0.0039 1 journal_write_metadata_buffer 0.0011 9 __log_space_left 0.0874 3 journal_blocks_per_page 0.1034 1 __jbd_kmalloc 0.0227 5 journal_alloc_journal_head 0.0431 4 journal_free_journal_head 0.1429 294 journal_add_journal_head 0.8033 50 __journal_remove_journal_head 0.1256 65 journal_remove_journal_head 0.5242 120 journal_put_journal_head 0.5381 1 try_atomic_semop 0.0034 1 __bitmap_weight 0.0035 1 kobject_put 0.0400 13 radix_tree_preload 0.0734 1 rb_erase 0.0044 1 rwsem_wake 0.0031 8 number 0.0102 12 vsnprintf 0.0097 29 csum_partial 0.1007 2 atomic_dec_and_lock 0.0172 14 memcpy 0.2456 1 strncpy_from_user 0.0101 2 strnlen_user 0.0208 6256 __copy_user_intel 36.3721 4257 __copy_user_zeroing_intel 24.7500 103 __copy_to_user_ll 0.8583 2222 __copy_from_user_ll 18.5167 27 copy_to_user 0.2755 30 copy_from_user 0.2381 2 add_disk_randomness 0.0385 1 put_device 0.1000 1 generic_unplug_device 0.0100 1 get_request 0.0013 108 __make_request 0.0777 18 generic_make_request 0.0366 12 submit_bio 0.0415 78 __end_that_request_first 0.1483 1 put_io_context 0.0114 11 .text.lock.ll_rw_blk 0.0809 297 e1000_xmit_frame 0.1396 2 e1000_update_stats 0.0013 5 scsi_put_command 0.0221 20 scsi_dispatch_cmd 0.0371 4 scsi_finish_command 0.0223 1 scsi_add_timer 0.0093 2 scsi_decide_disposition 0.0067 3 scsi_init_cmd_errh 0.0156 8 scsi_device_unbusy 0.0435 2 scsi_run_queue 0.0073 21 scsi_end_request 0.0795 1 scsi_io_completion 0.0010 125 scsi_request_fn 0.1152 13 .text.lock.scsi_lib 0.0607 48 ahc_linux_isr 0.0691 2 sd_rw_intr 0.0030 21 sock_aio_read 0.0714 11 sock_aio_write 0.0374 23 sock_poll 0.4694 1 sk_alloc 0.0056 196 sock_wfree 2.2791 20 __release_sock 0.1299 343 sock_def_readable 1.9056 10 sk_reset_timer 0.2128 78 lock_sock 0.6290 45 release_sock 0.2961 34 sock_common_recvmsg 0.2906 177 .text.lock.sock 1.4508 250 alloc_skb 1.1161 435 skb_release_data 2.5000 13 kfree_skbmem 0.2955 649 __kfree_skb 2.8465 89 skb_clone 0.2318 41 copy_skb_header 0.1653 17 skb_copy 0.0766 276 skb_copy_bits 0.5247 9 skb_checksum 0.0146 17 memcpy_toiovec 0.1789 1 memcpy_tokerneliovec 0.0133 123 skb_copy_datagram_iovec 0.2269 39 sk_stream_rfree 1.4444 8 sk_stream_error 0.0860 11 skb_checksum_help 0.0340 69 dev_queue_xmit 0.0867 24 net_tx_action 0.0623 50 netif_receive_skb 0.1124 124 process_backlog 0.4542 45 net_rx_action 0.1737 20 neigh_resolve_output 0.0380 202 nf_iterate 1.2242 119 nf_hook_slow 0.4161 6 eth_header 0.0192 154 qdisc_restart 0.2610 153 pfifo_fast_enqueue 1.0552 109 pfifo_fast_dequeue 1.3457 31 rt_hash_code 0.2263 308 ip_route_input 0.5662 28 ip_local_deliver 0.0553 149 ip_rcv 0.1166 74 ip_local_deliver_finish 0.1897 42 ip_rcv_finish 0.0648 20 ip_finish_output 0.0376 19 ip_output 0.1583 278 ip_queue_xmit 0.1844 7 dst_output 0.1707 218 ip_finish_output2 0.4921 113 tcp_poll 0.2943 158 tcp_sendmsg 0.0348 62 cleanup_rbuf 0.2013 406 tcp_recvmsg 0.2022 25 __tcp_grow_window 0.1908 70 tcp_rcv_rtt_update 0.7692 33 tcp_rcv_space_adjust 0.1012 199 tcp_event_data_recv 0.3328 39 tcp_rtt_estimator 0.1161 5 tcp_ack_saw_tstamp 0.0595 63 tcp_clean_rtx_queue 0.0662 49 tcp_ack 0.0335 1 tcp_data_queue 0.0003 5 __tcp_data_snd_check 0.0212 47 __tcp_ack_snd_check 0.2919 681 tcp_rcv_established 0.2948 314 tcp_transmit_skb 0.1803 42 tcp_write_xmit 0.0579 48 __tcp_select_window 0.1616 23 tcp_send_delayed_ack 0.1041 72 tcp_send_ack 0.3692 218 __tcp_v4_lookup_established 0.8755 28 tcp_v4_send_check 0.1107 34 tcp_v4_do_rcv 0.1069 437 tcp_v4_rcv 0.2166 4 inet_sendmsg 0.0449 20 ip_confirm 0.4167 24 ip_conntrack_defrag 0.3429 22 ip_refrag 0.1538 33 ip_conntrack_local 0.2260 19 __ip_ct_find_proto 0.2923 276 ip_ct_find_proto 2.5794 54 hash_conntrack 0.3506 43 get_tuple 0.4624 1 invert_tuple 0.0213 60 __ip_conntrack_find 0.2740 151 ip_conntrack_find_get 1.2479 13 ip_conntrack_get 0.3611 138 ip_conntrack_in 0.2244 311 ip_ct_refresh 1.6368 19 tcp_pkt_to_tuple 0.2235 13 get_conntrack_index 0.2131 464 tcp_packet 0.9810 958 ipt_do_table 0.9886 10 ipt_hook 0.1695 14 ipt_local_out_hook 0.1197 25 ipt_route_hook 0.4237 33 ipt_local_hook 0.1416 67 ip_nat_fn 0.1113 21 ip_nat_out 0.1221 179 do_bindings 0.2196 1 unix_create1 0.0023 3 __sched_text_start 0.0103 2 __write_lock_failed 0.0625 1 __read_lock_failed 0.0500 202 schedule 0.0971 3 __preempt_spin_lock 0.0330 421 .text.lock.sched 2.1480 477836 total 0.1553 24 default_idle 0.5333 455407 poll_idle 7851.8448 38 cpu_idle 0.5938 9 need_resched 0.1800 135 system_call 3.0682 6 syscall_call 0.5455 9 syscall_exit 0.8182 5 handle_IRQ_event 0.0500 1 show_cpuinfo 0.0015 44 sched_clock 0.3235 1 flush_tlb_mm 0.0059 1 flush_tlb_page 0.0056 4 pte_alloc_one 0.0519 21 do_page_fault 0.0150 1689 finish_task_switch 11.3356 1043 __wake_up 8.8390 208 __might_sleep 0.9858 75 add_wait_queue 0.6048 58 remove_wait_queue 0.4531 35 prepare_to_wait 0.2381 44 finish_wait 0.2785 2 copy_mm 0.0017 3 .text.lock.fork 0.0152 119 current_kernel_time 1.7246 5118 __do_softirq 29.5838 151 local_bh_enable 1.0486 622 __mod_timer 1.2031 84 mod_timer 0.7925 276 del_timer 1.7922 1 .text.lock.timer 0.0109 2 flush_signal_handlers 0.0299 1 get_signal_to_deliver 0.0010 2 in_group_p 0.0167 1 hash_futex 0.0071 47 add_to_page_cache 0.1918 15 page_waitqueue 0.3125 40 wake_up_page 0.5195 14 unlock_page 0.3784 20 end_page_writeback 0.2703 40 find_get_page 0.3571 45 find_lock_page 0.1552 47 find_get_pages_tag 0.2956 2 do_generic_mapping_read 0.0016 5 filemap_nopage 0.0053 7 remove_suid 0.0470 138 generic_file_aio_write_nolock 0.0476 19 generic_file_aio_write 0.1203 36 mempool_alloc 0.0945 14 mempool_free 0.0667 3 mempool_alloc_slab 0.1429 23 bad_range 0.2300 19 prep_new_page 0.2346 45 free_hot_cold_page 0.1510 163 buffered_rmqueue 0.3064 68 __alloc_pages 0.0766 3 __get_free_pages 0.0508 1 get_zeroed_page 0.0098 1 __pagevec_free 0.0303 13 __free_pages 0.1667 5 free_pages 0.1111 6 balance_dirty_pages_ratelimited 0.0299 1 do_writepages 0.0149 60 __set_page_dirty_nobuffers 0.1596 1 set_page_dirty 0.0119 26 clear_page_dirty_for_io 0.2281 54 test_clear_page_writeback 0.2118 52 test_set_page_writeback 0.1733 13 .text.lock.page_writeback 0.1016 2 prio_tree_insert 0.0052 1 file_ra_state_init 0.0270 2 do_page_cache_readahead 0.0043 1 page_cache_readahead 0.0018 1 kmem_getpages 0.0048 2 alloc_slabmgmt 0.0208 11 cache_init_objs 0.1058 4 cache_grow 0.0088 136 kmem_cache_alloc 1.1057 3 kmem_ptr_validate 0.0395 66 __kmalloc 0.4286 210 kmem_cache_free 2.4138 184 kfree 1.6881 33 mark_page_accessed 0.6346 27 release_pages 0.0597 1 __pagevec_release 0.0185 20 __pagevec_lru_add 0.0631 3 __pagevec_lru_add_active 0.0089 20 percpu_counter_mod 0.1143 3 blk_queue_bounce 0.0390 1 clear_page_tables 0.0032 1 pte_alloc_map 0.0040 7 copy_page_range 0.0090 29 zap_pte_range 0.0418 2 unmap_vmas 0.0035 26 do_wp_page 0.0307 16 do_anonymous_page 0.0356 341 do_no_page 0.3827 7 handle_mm_fault 0.0159 1 find_vma_prepare 0.0099 1 can_vma_merge_after 0.0090 3 do_mmap_pgoff 0.0016 1 get_unmapped_area 0.0034 1 find_vma 0.0123 1 find_vma_prev 0.0123 1 free_pgtables 0.0067 1 detach_vmas_to_be_unmapped 0.0101 1 anon_vma_unlink 0.0064 2 page_add_file_rmap 0.0093 13 page_remove_rmap 0.0544 1 dentry_open 0.0025 2 get_unused_fd 0.0078 11 do_sync_read 0.0636 54 vfs_read 0.1831 18 do_sync_write 0.1040 40 vfs_write 0.1356 29 sys_read 0.2266 24 sys_write 0.1875 2 get_empty_filp 0.0085 44 fput 2.0952 1 __fput 0.0047 104 fget 0.8125 57 fget_light 0.3413 1 put_filp 0.0175 2 file_move 0.0142 4 bh_waitq_head 0.1818 84 wake_up_buffer 1.0120 43 unlock_buffer 1.7917 8 __set_page_buffers 0.3200 96 end_buffer_write_sync 0.7934 15 __find_get_block_slow 0.0346 23 end_buffer_async_write 0.0744 1 buffer_insert_list 0.0067 22 create_buffers 0.1350 1 grow_dev_page 0.0025 3 mark_buffer_dirty 0.0750 49 __brelse 0.6282 156 __find_get_block 0.6341 21 __getblk 0.2079 17 __bread 0.2576 5 set_bh_page 0.0926 20 create_empty_buffers 0.0990 3 unmap_underlying_metadata 0.0265 44 __block_write_full_page 0.0458 49 __block_prepare_write 0.0493 17 __block_commit_write 0.1141 9 block_prepare_write 0.1169 6 generic_commit_write 0.0405 25 block_write_full_page 0.0936 47 end_bio_bh_io_sync 0.7581 46 submit_bh 0.1411 28 ll_rw_block 0.2059 6 recalc_bh_state 0.0335 10 alloc_buffer_head 0.0952 24 init_buffer_head 0.4528 10 .text.lock.buffer 0.0538 4 bio_destructor 0.0426 32 bio_alloc 0.0751 66 bio_put 1.2222 6 bio_endio 0.0472 1 sys_readlink 0.0065 13 inode_add_bytes 0.0915 1 copy_strings 0.0018 52 pipe_wait 0.2905 233 pipe_readv 0.3296 9 pipe_read 0.1525 137 pipe_writev 0.1653 7 pipe_write 0.1186 1 bad_pipe_r 0.1667 131 pipe_poll 1.0565 1 pipe_release 0.0043 2 vfs_permission 0.0064 2 do_lookup 0.0124 4 link_path_walk 0.0010 3 path_lookup 0.0064 15 kill_fasync 0.1293 1 sys_ioctl 0.0015 3 poll_initwait 0.1200 40 poll_freewait 0.6250 32 __pollwait 0.1624 19 max_select_fd 0.0844 177 do_select 0.2263 2 select_bits_alloc 0.0625 2 select_bits_free 0.4000 100 sys_select 0.0775 8 __d_lookup 0.0192 103 inode_times_differ 1.5147 31 update_atime 0.1396 36 inode_update_time 0.1682 183 dnotify_parent 0.7233 1 lookup_mnt 0.0060 77 __mark_inode_dirty 0.1591 1 writeback_inodes 0.0025 11 mpage_writepages 0.0131 3 load_elf_binary 0.0009 7 show_stat 0.0031 9 write_profile 0.0577 19 ext3_get_group_desc 0.1011 7 read_block_bitmap 0.0461 4 find_next_usable_block 0.0047 54 ext3_try_to_allocate 0.0607 9 ext3_has_free_blocks 0.0732 68 ext3_new_block 0.0523 19 ext3_file_write 0.0892 5 ext3_alloc_block 0.0847 21 ext3_block_to_path 0.0660 31 ext3_get_branch 0.1314 17 ext3_find_goal 0.1241 13 ext3_alloc_branch 0.0188 44 ext3_splice_branch 0.0928 60 ext3_get_block_handle 0.0675 9 ext3_get_block 0.0517 71 walk_page_buffers 0.6339 42 ext3_prepare_write 0.1321 4 ext3_journal_dirty_data 0.0430 94 ext3_ordered_commit_write 0.4105 10 bget_one 0.9091 2 bput_one 0.1818 6 journal_dirty_data_fn 0.3158 9 ext3_ordered_writepage 0.0195 47 ext3_get_inode_block 0.1801 35 ext3_get_inode_loc 0.0550 86 ext3_do_update_inode 0.0932 28 ext3_writepage_trans_blocks 0.1972 31 ext3_mark_iloc_dirty 0.5636 28 ext3_reserve_inode_write 0.1327 13 ext3_mark_inode_dirty 0.1605 24 ext3_dirty_inode 0.1778 18 ext3_journal_start 0.2022 20 __ext3_journal_stop 0.2500 58 start_this_handle 0.0452 19 new_handle 0.2375 27 journal_start 0.1286 163 do_get_write_access 0.0913 19 journal_get_write_access 0.2346 24 journal_get_undo_access 0.0578 59 journal_dirty_data 0.0807 116 journal_dirty_metadata 0.2113 126 journal_stop 0.1548 94 __journal_unfile_buffer 0.1818 51 __journal_file_buffer 0.0728 1 journal_file_buffer 0.0046 1 journal_end_buffer_io_sync 0.0323 23 inverted_lock 0.2396 282 journal_commit_transaction 0.0462 1 journal_brelse_array 0.0227 57 journal_cancel_revoke 0.1643 1 journal_write_revoke_records 0.0039 7 __log_space_left 0.0680 7 journal_blocks_per_page 0.2414 1 __jbd_kmalloc 0.0227 7 journal_alloc_journal_head 0.0603 3 journal_free_journal_head 0.1071 258 journal_add_journal_head 0.7049 61 __journal_remove_journal_head 0.1533 64 journal_remove_journal_head 0.5161 93 journal_put_journal_head 0.4170 1 lookup_undo 0.0154 1 sys_shmget 0.0031 2 kobject_put 0.0800 9 radix_tree_preload 0.0508 5 number 0.0064 6 vsnprintf 0.0049 1 find_next_zero_bit 0.0057 38 csum_partial 0.1319 17 memcpy 0.2982 1 strnlen_user 0.0104 5953 __copy_user_intel 34.6105 4385 __copy_user_zeroing_intel 25.4942 108 __copy_to_user_ll 0.9000 2323 __copy_from_user_ll 19.3583 24 copy_to_user 0.2449 29 copy_from_user 0.2302 4 blk_run_queue 0.0323 12 get_request 0.0161 103 __make_request 0.0741 7 generic_make_request 0.0142 14 submit_bio 0.0484 38 __end_that_request_first 0.0722 5 put_io_context 0.0568 12 .text.lock.ll_rw_blk 0.0882 3 as_set_request 0.0229 311 e1000_xmit_frame 0.1461 4 scsi_put_command 0.0177 26 scsi_dispatch_cmd 0.0482 5 scsi_finish_command 0.0279 2 scsi_add_timer 0.0185 2 scsi_decide_disposition 0.0067 6 scsi_init_cmd_errh 0.0312 10 scsi_device_unbusy 0.0543 5 scsi_run_queue 0.0182 1 scsi_next_command 0.0244 40 scsi_end_request 0.1515 2 scsi_free_sgtable 0.0444 6 scsi_io_completion 0.0059 148 scsi_request_fn 0.1364 17 .text.lock.scsi_lib 0.0794 67 ahc_linux_isr 0.0964 4 sd_rw_intr 0.0060 25 sock_aio_read 0.0850 18 sock_aio_write 0.0612 27 sock_poll 0.5510 195 sock_wfree 2.2674 12 __release_sock 0.0779 387 sock_def_readable 2.1500 7 sk_reset_timer 0.1489 76 lock_sock 0.6129 41 release_sock 0.2697 32 sock_common_recvmsg 0.2735 197 .text.lock.sock 1.6148 236 alloc_skb 1.0536 413 skb_release_data 2.3736 25 kfree_skbmem 0.5682 664 __kfree_skb 2.9123 69 skb_clone 0.1797 32 copy_skb_header 0.1290 21 skb_copy 0.0946 278 skb_copy_bits 0.5285 2 skb_checksum 0.0032 20 memcpy_toiovec 0.2105 5 memcpy_tokerneliovec 0.0667 139 skb_copy_datagram_iovec 0.2565 25 sk_stream_rfree 0.9259 6 sk_stream_error 0.0645 11 skb_checksum_help 0.0340 54 dev_queue_xmit 0.0678 21 net_tx_action 0.0545 74 netif_receive_skb 0.1663 104 process_backlog 0.3810 43 net_rx_action 0.1660 201 nf_iterate 1.2182 88 nf_hook_slow 0.3077 157 qdisc_restart 0.2661 142 pfifo_fast_enqueue 0.9793 104 pfifo_fast_dequeue 1.2840 34 rt_hash_code 0.2482 3 rt_cache_get_first 0.0357 289 ip_route_input 0.5312 29 ip_local_deliver 0.0573 139 ip_rcv 0.1088 60 ip_local_deliver_finish 0.1538 53 ip_rcv_finish 0.0818 22 ip_finish_output 0.0414 21 ip_output 0.1750 276 ip_queue_xmit 0.1830 6 dst_output 0.1463 217 ip_finish_output2 0.4898 134 tcp_poll 0.3490 166 tcp_sendmsg 0.0365 46 cleanup_rbuf 0.1494 388 tcp_recvmsg 0.1932 32 __tcp_grow_window 0.2443 78 tcp_rcv_rtt_update 0.8571 50 tcp_rcv_space_adjust 0.1534 198 tcp_event_data_recv 0.3311 33 tcp_rtt_estimator 0.0982 3 tcp_ack_saw_tstamp 0.0357 75 tcp_clean_rtx_queue 0.0789 1 tcp_ack_update_window 0.0039 44 tcp_ack 0.0301 1 tcp_data_queue 0.0003 6 __tcp_data_snd_check 0.0254 52 __tcp_ack_snd_check 0.3230 1 tcp_check_urg 0.0036 749 tcp_rcv_established 0.3242 296 tcp_transmit_skb 0.1699 44 tcp_write_xmit 0.0607 46 __tcp_select_window 0.1549 16 tcp_send_delayed_ack 0.0724 56 tcp_send_ack 0.2872 212 __tcp_v4_lookup_established 0.8514 31 tcp_v4_send_check 0.1225 55 tcp_v4_do_rcv 0.1730 448 tcp_v4_rcv 0.2220 5 inet_sendmsg 0.0562 20 ip_confirm 0.4167 36 ip_conntrack_defrag 0.5143 23 ip_refrag 0.1608 14 ip_conntrack_local 0.0959 19 __ip_ct_find_proto 0.2923 280 ip_ct_find_proto 2.6168 74 hash_conntrack 0.4805 53 get_tuple 0.5699 5 invert_tuple 0.1064 65 __ip_conntrack_find 0.2968 151 ip_conntrack_find_get 1.2479 8 ip_conntrack_get 0.2222 145 ip_conntrack_in 0.2358 261 ip_ct_refresh 1.3737 7 ip_ct_gather_frags 0.0302 31 tcp_pkt_to_tuple 0.3647 8 get_conntrack_index 0.1311 498 tcp_packet 1.0529 870 ipt_do_table 0.8978 14 ipt_hook 0.2373 20 ipt_local_out_hook 0.1709 25 ipt_route_hook 0.4237 25 ipt_local_hook 0.1073 48 ip_nat_fn 0.0797 16 ip_nat_out 0.0930 194 do_bindings 0.2380 1 unix_create1 0.0023 9 __sched_text_start 0.0310 1 __write_lock_failed 0.0312 224 schedule 0.1076 3 __preempt_spin_lock 0.0330 439 .text.lock.sched 2.2398 3 schedule_timeout 0.0157 498603 total 0.1620 19 default_idle 0.4222 416167 poll_idle 7175.2931 40 cpu_idle 0.6250 8 need_resched 0.1600 123 system_call 2.7955 5 syscall_call 0.4545 7 syscall_exit 0.6364 1 error_code 0.0179 3 handle_IRQ_event 0.0300 1 sys_mmap2 0.0047 2 show_cpuinfo 0.0030 31 sched_clock 0.2279 1 delay_tsc 0.0476 1 flush_tlb_mm 0.0059 3 pte_alloc_one 0.0390 1 pgd_ctor 0.0060 17 do_page_fault 0.0122 1740 finish_task_switch 11.6779 1 wake_up_forked_thread 0.0017 1070 __wake_up 9.0678 223 __might_sleep 1.0569 87 add_wait_queue 0.7016 47 remove_wait_queue 0.3672 30 prepare_to_wait 0.2041 32 finish_wait 0.2025 2 dup_task_struct 0.0095 1 mmput 0.0067 2 copy_process 0.0007 6 .text.lock.fork 0.0303 1 profile_exec_unmap 0.0104 2 exit_notify 0.0009 117 current_kernel_time 1.6957 5156 __do_softirq 29.8035 149 local_bh_enable 1.0347 663 __mod_timer 1.2824 64 mod_timer 0.6038 294 del_timer 1.9091 1 del_timer_sync 0.0055 2 .text.lock.timer 0.0217 2 flush_signal_handlers 0.0299 1 sigprocmask 0.0041 1 do_sigaction 0.0016 1 in_group_p 0.0083 1 filemap_fdatawait 0.0286 50 add_to_page_cache 0.2041 19 page_waitqueue 0.3958 48 wake_up_page 0.6234 20 unlock_page 0.5405 13 end_page_writeback 0.1757 55 find_get_page 0.4911 38 find_lock_page 0.1310 1 find_or_create_page 0.0054 55 find_get_pages_tag 0.3459 2 do_generic_mapping_read 0.0016 2 filemap_nopage 0.0021 11 remove_suid 0.0738 137 generic_file_aio_write_nolock 0.0473 16 generic_file_aio_write 0.1013 45 mempool_alloc 0.1181 12 mempool_free 0.0571 2 mempool_alloc_slab 0.0952 3 mempool_free_slab 0.1429 17 bad_range 0.1700 16 prep_new_page 0.1975 46 free_hot_cold_page 0.1544 155 buffered_rmqueue 0.2914 56 __alloc_pages 0.0631 4 __get_free_pages 0.0678 1 __pagevec_free 0.0303 16 __free_pages 0.2051 2 free_pages 0.0444 10 balance_dirty_pages_ratelimited 0.0498 1 do_writepages 0.0149 65 __set_page_dirty_nobuffers 0.1729 3 set_page_dirty 0.0357 13 clear_page_dirty_for_io 0.1140 49 test_clear_page_writeback 0.1922 54 test_set_page_writeback 0.1800 24 .text.lock.page_writeback 0.1875 1 __pdflush 0.0018 1 prio_tree_remove 0.0044 1 do_page_cache_readahead 0.0022 1 page_cache_readahead 0.0018 2 kmem_getpages 0.0096 7 cache_init_objs 0.0673 2 cache_grow 0.0044 173 kmem_cache_alloc 1.4065 1 kmem_ptr_validate 0.0132 79 __kmalloc 0.5130 181 kmem_cache_free 2.0805 195 kfree 1.7890 30 mark_page_accessed 0.5769 1 lru_cache_add_active 0.0105 38 release_pages 0.0841 27 __pagevec_lru_add 0.0852 3 __pagevec_lru_add_active 0.0089 1 vm_acct_memory 0.0122 9 percpu_counter_mod 0.0514 1 blk_queue_bounce 0.0130 5 clear_page_tables 0.0162 4 pte_alloc_map 0.0161 7 copy_page_range 0.0090 15 zap_pte_range 0.0216 1 unmap_vmas 0.0017 20 do_wp_page 0.0236 16 do_anonymous_page 0.0356 270 do_no_page 0.3030 9 handle_mm_fault 0.0205 1 find_vma_prepare 0.0099 1 can_vma_merge_after 0.0090 3 do_mmap_pgoff 0.0016 7 find_vma 0.0864 3 split_vma 0.0105 2 do_munmap 0.0044 1 change_protection 0.0022 1 mprotect_fixup 0.0027 1 anon_vma_prepare 0.0028 1 anon_vma_link 0.0079 3 page_add_file_rmap 0.0139 12 page_remove_rmap 0.0502 1 get_unused_fd 0.0039 1 fd_install 0.0068 1 sys_close 0.0049 12 do_sync_read 0.0694 67 vfs_read 0.2271 18 do_sync_write 0.1040 47 vfs_write 0.1593 30 sys_read 0.2344 25 sys_write 0.1953 60 fput 2.8571 90 fget 0.7031 41 fget_light 0.2455 1 file_move 0.0071 3 bh_waitq_head 0.1364 66 wake_up_buffer 0.7952 37 unlock_buffer 1.5417 6 __set_page_buffers 0.2400 57 end_buffer_write_sync 0.4711 21 __find_get_block_slow 0.0485 35 end_buffer_async_write 0.1133 1 buffer_insert_list 0.0067 27 create_buffers 0.1656 5 mark_buffer_dirty 0.1250 36 __brelse 0.4615 2 bh_lru_install 0.0088 157 __find_get_block 0.6382 22 __getblk 0.2178 8 __bread 0.1212 7 set_bh_page 0.1296 18 create_empty_buffers 0.0891 5 unmap_underlying_metadata 0.0442 42 __block_write_full_page 0.0437 54 __block_prepare_write 0.0544 22 __block_commit_write 0.1477 9 block_prepare_write 0.1169 8 generic_commit_write 0.0541 12 block_write_full_page 0.0449 25 end_bio_bh_io_sync 0.4032 34 submit_bh 0.1043 36 ll_rw_block 0.2647 7 recalc_bh_state 0.0391 14 alloc_buffer_head 0.1333 24 init_buffer_head 0.4528 5 .text.lock.buffer 0.0269 7 bio_destructor 0.0745 18 bio_alloc 0.0423 56 bio_put 1.0370 4 bio_endio 0.0315 2 vfs_getattr 0.0130 1 vfs_fstat 0.0125 1 cp_new_stat64 0.0037 11 inode_add_bytes 0.0775 53 pipe_wait 0.2961 254 pipe_readv 0.3593 12 pipe_read 0.2034 162 pipe_writev 0.1954 9 pipe_write 0.1525 134 pipe_poll 1.0806 2 getname 0.0082 1 permission 0.0133 1 real_lookup 0.0038 1 do_lookup 0.0062 2 link_path_walk 0.0005 1 path_lookup 0.0021 12 kill_fasync 0.1034 4 poll_initwait 0.1600 35 poll_freewait 0.5469 37 __pollwait 0.1878 22 max_select_fd 0.0978 164 do_select 0.2097 2 select_bits_alloc 0.0625 1 select_bits_free 0.2000 102 sys_select 0.0791 1 dput 0.0016 1 __d_lookup 0.0024 1 bmap 0.0105 118 inode_times_differ 1.7353 21 update_atime 0.0946 50 inode_update_time 0.2336 189 dnotify_parent 0.7470 85 __mark_inode_dirty 0.1756 2 sync_sb_inodes 0.0026 10 mpage_writepages 0.0119 1 proc_lookup 0.0030 2 show_stat 0.0009 7 write_profile 0.0449 21 ext3_get_group_desc 0.1117 5 read_block_bitmap 0.0329 2 find_next_usable_block 0.0024 57 ext3_try_to_allocate 0.0640 15 ext3_has_free_blocks 0.1220 56 ext3_new_block 0.0431 19 ext3_file_write 0.0892 12 ext3_alloc_block 0.2034 14 ext3_block_to_path 0.0440 40 ext3_get_branch 0.1695 15 ext3_find_goal 0.1095 17 ext3_alloc_branch 0.0246 44 ext3_splice_branch 0.0928 56 ext3_get_block_handle 0.0630 8 ext3_get_block 0.0460 71 walk_page_buffers 0.6339 30 ext3_prepare_write 0.0943 7 ext3_journal_dirty_data 0.0753 103 ext3_ordered_commit_write 0.4498 8 bget_one 0.7273 1 bput_one 0.0909 11 journal_dirty_data_fn 0.5789 5 ext3_ordered_writepage 0.0108 41 ext3_get_inode_block 0.1571 37 ext3_get_inode_loc 0.0582 82 ext3_do_update_inode 0.0888 24 ext3_writepage_trans_blocks 0.1690 39 ext3_mark_iloc_dirty 0.7091 21 ext3_reserve_inode_write 0.0995 13 ext3_mark_inode_dirty 0.1605 28 ext3_dirty_inode 0.2074 20 ext3_journal_start 0.2247 15 __ext3_journal_stop 0.1875 68 start_this_handle 0.0530 19 new_handle 0.2375 24 journal_start 0.1143 185 do_get_write_access 0.1036 26 journal_get_write_access 0.3210 12 journal_get_undo_access 0.0289 63 journal_dirty_data 0.0862 139 journal_dirty_metadata 0.2532 102 journal_stop 0.1253 89 __journal_unfile_buffer 0.1721 42 __journal_file_buffer 0.0599 24 inverted_lock 0.2500 195 journal_commit_transaction 0.0319 1 journal_brelse_array 0.0227 78 journal_cancel_revoke 0.2248 1 journal_write_revoke_records 0.0039 1 write_one_revoke_record 0.0050 4 __log_space_left 0.0388 15 journal_blocks_per_page 0.5172 5 journal_alloc_journal_head 0.0431 4 journal_free_journal_head 0.1429 260 journal_add_journal_head 0.7104 61 __journal_remove_journal_head 0.1533 52 journal_remove_journal_head 0.4194 106 journal_put_journal_head 0.4753 1 kobject_put 0.0400 10 radix_tree_preload 0.0565 3 number 0.0038 4 vsnprintf 0.0032 1 find_next_zero_bit 0.0057 27 csum_partial 0.0938 1 atomic_dec_and_lock 0.0086 17 memcpy 0.2982 1 strncpy_from_user 0.0101 6206 __copy_user_intel 36.0814 4378 __copy_user_zeroing_intel 25.4535 103 __copy_to_user_ll 0.8583 2404 __copy_from_user_ll 20.0333 32 copy_to_user 0.3265 30 copy_from_user 0.2381 1 add_disk_randomness 0.0192 3 blk_run_queue 0.0242 1 get_request 0.0013 86 __make_request 0.0619 16 generic_make_request 0.0325 15 submit_bio 0.0519 71 __end_that_request_first 0.1350 16 .text.lock.ll_rw_blk 0.1176 2 as_set_request 0.0153 332 e1000_xmit_frame 0.1560 5 scsi_put_command 0.0221 18 scsi_dispatch_cmd 0.0334 2 scsi_finish_command 0.0112 2 scsi_add_timer 0.0185 1 scsi_decide_disposition 0.0033 3 scsi_init_cmd_errh 0.0156 5 scsi_device_unbusy 0.0272 3 scsi_run_queue 0.0109 1 scsi_next_command 0.0244 19 scsi_end_request 0.0720 1 scsi_free_sgtable 0.0222 3 scsi_io_completion 0.0029 109 scsi_request_fn 0.1005 14 .text.lock.scsi_lib 0.0654 34 ahc_linux_isr 0.0489 21 sock_aio_read 0.0714 15 sock_aio_write 0.0510 13 sock_poll 0.2653 1 sk_alloc 0.0056 183 sock_wfree 2.1279 14 __release_sock 0.0909 349 sock_def_readable 1.9389 10 sk_reset_timer 0.2128 68 lock_sock 0.5484 32 release_sock 0.2105 38 sock_common_recvmsg 0.3248 201 .text.lock.sock 1.6475 261 alloc_skb 1.1652 390 skb_release_data 2.2414 12 kfree_skbmem 0.2727 637 __kfree_skb 2.7939 81 skb_clone 0.2109 42 copy_skb_header 0.1694 22 skb_copy 0.0991 268 skb_copy_bits 0.5095 5 skb_checksum 0.0081 21 memcpy_toiovec 0.2211 4 memcpy_tokerneliovec 0.0533 123 skb_copy_datagram_iovec 0.2269 35 sk_stream_rfree 1.2963 2 sk_stream_error 0.0215 12 skb_checksum_help 0.0370 53 dev_queue_xmit 0.0666 18 net_tx_action 0.0468 90 netif_receive_skb 0.2022 107 process_backlog 0.3919 48 net_rx_action 0.1853 215 nf_iterate 1.3030 100 nf_hook_slow 0.3497 163 qdisc_restart 0.2763 148 pfifo_fast_enqueue 1.0207 117 pfifo_fast_dequeue 1.4444 30 rt_hash_code 0.2190 2 rt_cache_get_first 0.0238 260 ip_route_input 0.4779 38 ip_local_deliver 0.0751 133 ip_rcv 0.1041 54 ip_local_deliver_finish 0.1385 41 ip_rcv_finish 0.0633 12 ip_finish_output 0.0226 28 ip_output 0.2333 309 ip_queue_xmit 0.2049 2 dst_output 0.0488 222 ip_finish_output2 0.5011 125 tcp_poll 0.3255 177 tcp_sendmsg 0.0389 56 cleanup_rbuf 0.1818 427 tcp_recvmsg 0.2126 24 __tcp_grow_window 0.1832 74 tcp_rcv_rtt_update 0.8132 54 tcp_rcv_space_adjust 0.1656 176 tcp_event_data_recv 0.2943 24 tcp_rtt_estimator 0.0714 3 tcp_ack_saw_tstamp 0.0357 74 tcp_clean_rtx_queue 0.0778 43 tcp_ack 0.0294 2 tcp_data_queue 0.0007 1 tcp_cwnd_application_limited 0.0067 6 __tcp_data_snd_check 0.0254 44 __tcp_ack_snd_check 0.2733 1 tcp_check_urg 0.0036 1 tcp_urg 0.0041 708 tcp_rcv_established 0.3065 309 tcp_transmit_skb 0.1774 51 tcp_write_xmit 0.0703 51 __tcp_select_window 0.1717 16 tcp_send_delayed_ack 0.0724 74 tcp_send_ack 0.3795 215 __tcp_v4_lookup_established 0.8635 15 tcp_v4_send_check 0.0593 48 tcp_v4_do_rcv 0.1509 442 tcp_v4_rcv 0.2190 9 inet_sendmsg 0.1011 19 ip_confirm 0.3958 22 ip_conntrack_defrag 0.3143 19 ip_refrag 0.1329 17 ip_conntrack_local 0.1164 20 __ip_ct_find_proto 0.3077 293 ip_ct_find_proto 2.7383 58 hash_conntrack 0.3766 44 get_tuple 0.4731 2 invert_tuple 0.0426 69 __ip_conntrack_find 0.3151 162 ip_conntrack_find_get 1.3388 3 ip_conntrack_get 0.0833 125 ip_conntrack_in 0.2033 296 ip_ct_refresh 1.5579 7 ip_ct_gather_frags 0.0302 35 tcp_pkt_to_tuple 0.4118 7 get_conntrack_index 0.1148 452 tcp_packet 0.9556 906 ipt_do_table 0.9350 17 ipt_hook 0.2881 18 ipt_local_out_hook 0.1538 33 ipt_route_hook 0.5593 23 ipt_local_hook 0.0987 64 ip_nat_fn 0.1063 30 ip_nat_out 0.1744 202 do_bindings 0.2479 3 unix_stream_connect 0.0021 5 __sched_text_start 0.0172 1 __write_lock_failed 0.0312 2 __read_lock_failed 0.1000 219 schedule 0.1052 1 wait_for_completion 0.0039 2 __preempt_spin_lock 0.0220 364 .text.lock.sched 1.8571 4 schedule_timeout 0.0209 459460 total 0.1493 21 default_idle 0.4667 418118 poll_idle 7208.9310 40 cpu_idle 0.6250 1 __up 0.0333 6 need_resched 0.1200 116 system_call 2.6364 4 syscall_call 0.3636 7 syscall_exit 0.6364 1 error_code 0.0179 4 handle_IRQ_event 0.0400 2 old_mmap 0.0060 1 show_cpuinfo 0.0015 34 sched_clock 0.2500 1 delay_tsc 0.0476 1 flush_tlb_page 0.0056 4 pte_alloc_one 0.0519 25 do_page_fault 0.0179 1694 finish_task_switch 11.3691 1 nr_running 0.0091 1 nr_iowait 0.0087 1059 __wake_up 8.9746 234 __might_sleep 1.1090 84 add_wait_queue 0.6774 54 remove_wait_queue 0.4219 35 prepare_to_wait 0.2381 50 finish_wait 0.3165 2 dup_task_struct 0.0095 3 copy_mm 0.0026 1 count_open_files 0.0233 6 .text.lock.fork 0.0303 1 release_task 0.0018 2 sys_wait4 0.0031 113 current_kernel_time 1.6377 5065 __do_softirq 29.2775 188 local_bh_enable 1.3056 875 __mod_timer 1.6925 53 mod_timer 0.5000 331 del_timer 2.1494 1 del_timer_sync 0.0055 1 .text.lock.timer 0.0109 1 do_sigaction 0.0016 1 groups_search 0.0094 58 add_to_page_cache 0.2367 13 page_waitqueue 0.2708 50 wake_up_page 0.6494 15 unlock_page 0.4054 14 end_page_writeback 0.1892 47 find_get_page 0.4196 31 find_lock_page 0.1069 58 find_get_pages_tag 0.3648 2 do_generic_mapping_read 0.0016 8 filemap_nopage 0.0085 9 remove_suid 0.0604 112 generic_file_aio_write_nolock 0.0387 13 generic_file_aio_write 0.0823 32 mempool_alloc 0.0840 20 mempool_free 0.0952 2 mempool_alloc_slab 0.0952 1 mempool_free_slab 0.0476 12 bad_range 0.1200 16 prep_new_page 0.1975 34 free_hot_cold_page 0.1141 1 free_hot_page 0.1429 170 buffered_rmqueue 0.3195 79 __alloc_pages 0.0890 2 __get_free_pages 0.0339 1 get_zeroed_page 0.0098 12 __free_pages 0.1538 2 free_pages 0.0444 1 get_dirty_limits 0.0049 11 balance_dirty_pages_ratelimited 0.0547 80 __set_page_dirty_nobuffers 0.2128 3 set_page_dirty 0.0357 8 clear_page_dirty_for_io 0.0702 52 test_clear_page_writeback 0.2039 53 test_set_page_writeback 0.1767 14 .text.lock.page_writeback 0.1094 1 vma_prio_tree_add 0.0060 1 do_page_cache_readahead 0.0022 1 page_cache_readahead 0.0018 3 kmem_getpages 0.0144 1 alloc_slabmgmt 0.0104 7 cache_init_objs 0.0673 1 kmem_flagcheck 0.0233 1 cache_grow 0.0022 159 kmem_cache_alloc 1.2927 1 kmem_ptr_validate 0.0132 83 __kmalloc 0.5390 189 kmem_cache_free 2.1724 184 kfree 1.6881 41 mark_page_accessed 0.7885 1 lru_cache_add_active 0.0105 37 release_pages 0.0819 40 __pagevec_lru_add 0.1262 2 vm_acct_memory 0.0244 19 percpu_counter_mod 0.1086 4 blk_queue_bounce 0.0519 2 clear_page_tables 0.0065 1 pte_alloc_map 0.0040 11 copy_page_range 0.0142 25 zap_pte_range 0.0360 16 do_wp_page 0.0189 14 do_anonymous_page 0.0312 320 do_no_page 0.3591 2 remove_vm_struct 0.0123 3 find_vma_prepare 0.0297 1 vma_adjust 0.0010 1 can_vma_merge_after 0.0090 3 do_mmap_pgoff 0.0016 2 find_vma 0.0247 1 detach_vmas_to_be_unmapped 0.0101 1 split_vma 0.0035 1 change_protection 0.0022 3 anon_vma_prepare 0.0085 4 page_add_anon_rmap 0.0122 2 page_add_file_rmap 0.0093 15 page_remove_rmap 0.0628 1 can_share_swap_page 0.0094 1 sys_access 0.0030 1 filp_open 0.0095 1 dentry_open 0.0025 1 fd_install 0.0068 5 do_sync_read 0.0289 49 vfs_read 0.1661 24 do_sync_write 0.1387 60 vfs_write 0.2034 36 sys_read 0.2812 36 sys_write 0.2812 43 fput 2.0476 96 fget 0.7500 36 fget_light 0.2156 1 file_kill 0.0081 4 bh_waitq_head 0.1818 67 wake_up_buffer 0.8072 39 unlock_buffer 1.6250 11 __set_page_buffers 0.4400 1 __clear_page_buffers 0.0141 76 end_buffer_write_sync 0.6281 10 __find_get_block_slow 0.0231 25 end_buffer_async_write 0.0809 30 create_buffers 0.1840 2 __getblk_slow 0.0056 6 mark_buffer_dirty 0.1500 41 __brelse 0.5256 143 __find_get_block 0.5813 21 __getblk 0.2079 10 __bread 0.1515 6 set_bh_page 0.1111 32 create_empty_buffers 0.1584 3 unmap_underlying_metadata 0.0265 56 __block_write_full_page 0.0583 71 __block_prepare_write 0.0715 17 __block_commit_write 0.1141 12 block_prepare_write 0.1558 8 generic_commit_write 0.0541 26 block_write_full_page 0.0974 31 end_bio_bh_io_sync 0.5000 43 submit_bh 0.1319 27 ll_rw_block 0.1985 8 recalc_bh_state 0.0447 8 alloc_buffer_head 0.0762 21 init_buffer_head 0.3962 7 bio_destructor 0.0745 29 bio_alloc 0.0681 52 bio_put 0.9630 8 bio_endio 0.0630 1 generic_fillattr 0.0061 1 cp_new_stat64 0.0037 19 inode_add_bytes 0.1338 1 setup_arg_pages 0.0021 1 kernel_read 0.0105 1 prepare_binprm 0.0040 1 do_execve 0.0015 49 pipe_wait 0.2737 255 pipe_readv 0.3607 4 pipe_read 0.0678 145 pipe_writev 0.1749 5 pipe_write 0.0847 120 pipe_poll 0.9677 2 do_lookup 0.0124 2 link_path_walk 0.0005 1 may_open 0.0019 1 open_namei 0.0006 15 kill_fasync 0.1293 2 poll_initwait 0.0800 39 poll_freewait 0.6094 21 __pollwait 0.1066 17 max_select_fd 0.0756 162 do_select 0.2072 1 select_bits_free 0.2000 94 sys_select 0.0729 1 flock64_to_posix_lock 0.0027 1 dput 0.0016 6 __d_lookup 0.0144 1 generic_forget_inode 0.0027 128 inode_times_differ 1.8824 31 update_atime 0.1396 39 inode_update_time 0.1822 1 dnotify_flush 0.0047 203 dnotify_parent 0.8024 1 lookup_mnt 0.0060 3 seq_printf 0.0349 84 __mark_inode_dirty 0.1736 1 __sync_single_inode 0.0018 1 writeback_release 0.0208 13 mpage_writepages 0.0155 1 proc_alloc_inode 0.0085 1 proc_get_inode 0.0036 10 show_stat 0.0044 8 write_profile 0.0513 19 ext3_get_group_desc 0.1011 9 read_block_bitmap 0.0592 3 find_next_usable_block 0.0035 66 ext3_try_to_allocate 0.0742 5 ext3_has_free_blocks 0.0407 72 ext3_new_block 0.0554 25 ext3_file_write 0.1174 8 ext3_alloc_block 0.1356 21 ext3_block_to_path 0.0660 25 ext3_get_branch 0.1059 17 ext3_find_goal 0.1241 15 ext3_alloc_branch 0.0217 45 ext3_splice_branch 0.0949 60 ext3_get_block_handle 0.0675 9 ext3_get_block 0.0517 73 walk_page_buffers 0.6518 22 ext3_prepare_write 0.0692 9 ext3_journal_dirty_data 0.0968 87 ext3_ordered_commit_write 0.3799 16 bget_one 1.4545 1 bput_one 0.0909 3 journal_dirty_data_fn 0.1579 13 ext3_ordered_writepage 0.0282 73 ext3_get_inode_block 0.2797 31 ext3_get_inode_loc 0.0487 75 ext3_do_update_inode 0.0813 31 ext3_writepage_trans_blocks 0.2183 33 ext3_mark_iloc_dirty 0.6000 26 ext3_reserve_inode_write 0.1232 12 ext3_mark_inode_dirty 0.1481 14 ext3_dirty_inode 0.1037 13 ext3_journal_start 0.1461 10 __ext3_journal_stop 0.1250 65 start_this_handle 0.0507 19 new_handle 0.2375 26 journal_start 0.1238 172 do_get_write_access 0.0963 28 journal_get_write_access 0.3457 1 journal_get_create_access 0.0015 30 journal_get_undo_access 0.0723 67 journal_dirty_data 0.0917 133 journal_dirty_metadata 0.2423 86 journal_stop 0.1057 115 __journal_unfile_buffer 0.2224 49 __journal_file_buffer 0.0699 1 journal_file_buffer 0.0046 18 inverted_lock 0.1875 231 journal_commit_transaction 0.0378 2 journal_brelse_array 0.0455 2 __journal_clean_checkpoint_list 0.0115 63 journal_cancel_revoke 0.1816 1 journal_write_revoke_records 0.0039 7 __log_space_left 0.0680 1 journal_get_descriptor_buffer 0.0053 10 journal_blocks_per_page 0.3448 1 __jbd_kmalloc 0.0227 8 journal_alloc_journal_head 0.0690 2 journal_free_journal_head 0.0714 257 journal_add_journal_head 0.7022 56 __journal_remove_journal_head 0.1407 55 journal_remove_journal_head 0.4435 103 journal_put_journal_head 0.4619 1 lookup_undo 0.0154 11 radix_tree_preload 0.0621 1 __rb_rotate_left 0.0179 1 __rb_erase_color 0.0024 5 number 0.0064 10 vsnprintf 0.0081 1 find_next_bit 0.0066 2 find_next_zero_bit 0.0114 27 csum_partial 0.0938 2 atomic_dec_and_lock 0.0172 13 memcpy 0.2281 1 strncpy_from_user 0.0101 6152 __copy_user_intel 35.7674 4411 __copy_user_zeroing_intel 25.6453 114 __copy_to_user_ll 0.9500 2323 __copy_from_user_ll 19.3583 30 copy_to_user 0.3061 36 copy_from_user 0.2857 3 add_disk_randomness 0.0577 1 generic_unplug_device 0.0100 2 blk_run_queue 0.0161 3 get_request 0.0040 110 __make_request 0.0791 14 generic_make_request 0.0285 8 submit_bio 0.0277 49 __end_that_request_first 0.0932 6 put_io_context 0.0682 22 .text.lock.ll_rw_blk 0.1618 2 as_set_request 0.0153 310 e1000_xmit_frame 0.1457 4 scsi_put_command 0.0177 28 scsi_dispatch_cmd 0.0519 4 scsi_softirq 0.0191 4 scsi_finish_command 0.0223 2 scsi_add_timer 0.0185 2 scsi_decide_disposition 0.0067 1 scsi_init_cmd_errh 0.0052 7 scsi_device_unbusy 0.0380 6 scsi_run_queue 0.0218 27 scsi_end_request 0.1023 2 scsi_free_sgtable 0.0444 5 scsi_io_completion 0.0049 163 scsi_request_fn 0.1502 14 .text.lock.scsi_lib 0.0654 49 ahc_linux_isr 0.0705 1 sd_rw_intr 0.0015 1 sock_release 0.0070 16 sock_aio_read 0.0544 14 sock_aio_write 0.0476 24 sock_poll 0.4898 167 sock_wfree 1.9419 15 __release_sock 0.0974 390 sock_def_readable 2.1667 10 sk_reset_timer 0.2128 77 lock_sock 0.6210 29 release_sock 0.1908 48 sock_common_recvmsg 0.4103 193 .text.lock.sock 1.5820 240 alloc_skb 1.0714 399 skb_release_data 2.2931 13 kfree_skbmem 0.2955 639 __kfree_skb 2.8026 85 skb_clone 0.2214 34 copy_skb_header 0.1371 17 skb_copy 0.0766 260 skb_copy_bits 0.4943 5 skb_checksum 0.0081 18 memcpy_toiovec 0.1895 112 skb_copy_datagram_iovec 0.2066 42 sk_stream_rfree 1.5556 7 sk_stream_error 0.0753 10 skb_checksum_help 0.0309 74 dev_queue_xmit 0.0930 21 net_tx_action 0.0545 60 netif_receive_skb 0.1348 115 process_backlog 0.4212 66 net_rx_action 0.2548 187 nf_iterate 1.1333 85 nf_hook_slow 0.2972 165 qdisc_restart 0.2797 133 pfifo_fast_enqueue 0.9172 103 pfifo_fast_dequeue 1.2716 24 rt_hash_code 0.1752 1 rt_cache_get_first 0.0119 266 ip_route_input 0.4890 33 ip_local_deliver 0.0652 141 ip_rcv 0.1103 73 ip_local_deliver_finish 0.1872 62 ip_rcv_finish 0.0957 15 ip_finish_output 0.0282 16 ip_output 0.1333 257 ip_queue_xmit 0.1704 8 dst_output 0.1951 226 ip_finish_output2 0.5102 137 tcp_poll 0.3568 173 tcp_sendmsg 0.0381 59 cleanup_rbuf 0.1916 426 tcp_recvmsg 0.2122 25 __tcp_grow_window 0.1908 82 tcp_rcv_rtt_update 0.9011 39 tcp_rcv_space_adjust 0.1196 170 tcp_event_data_recv 0.2843 39 tcp_rtt_estimator 0.1161 5 tcp_ack_saw_tstamp 0.0595 57 tcp_clean_rtx_queue 0.0599 1 tcp_ack_update_window 0.0039 38 tcp_ack 0.0260 1 tcp_data_queue 0.0003 10 __tcp_data_snd_check 0.0424 59 __tcp_ack_snd_check 0.3665 1 tcp_check_urg 0.0036 702 tcp_rcv_established 0.3039 338 tcp_transmit_skb 0.1940 44 tcp_write_xmit 0.0607 73 __tcp_select_window 0.2458 18 tcp_send_delayed_ack 0.0814 62 tcp_send_ack 0.3179 201 __tcp_v4_lookup_established 0.8072 23 tcp_v4_send_check 0.0909 41 tcp_v4_do_rcv 0.1289 425 tcp_v4_rcv 0.2106 11 inet_sendmsg 0.1236 1 inet_shutdown 0.0042 17 ip_confirm 0.3542 25 ip_conntrack_defrag 0.3571 25 ip_refrag 0.1748 25 ip_conntrack_local 0.1712 16 __ip_ct_find_proto 0.2462 273 ip_ct_find_proto 2.5514 65 hash_conntrack 0.4221 48 get_tuple 0.5161 3 invert_tuple 0.0638 79 __ip_conntrack_find 0.3607 135 ip_conntrack_find_get 1.1157 15 ip_conntrack_get 0.4167 137 ip_conntrack_in 0.2228 282 ip_ct_refresh 1.4842 3 ip_ct_gather_frags 0.0129 17 tcp_pkt_to_tuple 0.2000 12 get_conntrack_index 0.1967 436 tcp_packet 0.9218 882 ipt_do_table 0.9102 18 ipt_hook 0.3051 13 ipt_local_out_hook 0.1111 26 ipt_route_hook 0.4407 22 ipt_local_hook 0.0944 65 ip_nat_fn 0.1080 25 ip_nat_out 0.1453 201 do_bindings 0.2466 1 __sched_text_start 0.0034 2 __down_failed 0.1667 3 __write_lock_failed 0.0938 1 __read_lock_failed 0.0500 206 schedule 0.0990 7 __preempt_spin_lock 0.0769 384 .text.lock.sched 1.9592 7 schedule_timeout 0.0366 461591 total 0.1500 22 default_idle 0.4889 415993 poll_idle 7172.2931 60 cpu_idle 0.9375 2 __up 0.0667 7 need_resched 0.1400 126 system_call 2.8636 3 syscall_call 0.2727 7 syscall_exit 0.6364 1 error_code 0.0179 5 handle_IRQ_event 0.0500 80 sched_clock 0.5882 1 delay_tsc 0.0476 1 flush_tlb_others 0.0033 1 flush_tlb_page 0.0056 4 pte_alloc_one 0.0519 1 pgd_ctor 0.0060 12 do_page_fault 0.0086 1708 finish_task_switch 11.4631 1033 __wake_up 8.7542 182 __might_sleep 0.8626 1 task_curr 0.0044 75 add_wait_queue 0.6048 45 remove_wait_queue 0.3516 36 prepare_to_wait 0.2449 42 finish_wait 0.2658 1 dup_task_struct 0.0047 5 copy_mm 0.0043 1 copy_files 0.0010 1 copy_process 0.0003 7 .text.lock.fork 0.0354 1 profile_exec_unmap 0.0104 2 exit_notify 0.0009 1 do_setitimer 0.0021 428 current_kernel_time 6.2029 5423 __do_softirq 31.3468 177 local_bh_enable 1.2292 878 __mod_timer 1.6983 48 mod_timer 0.4528 343 del_timer 2.2273 1 run_timer_softirq 0.0022 2 .text.lock.timer 0.0217 1 flush_signal_handlers 0.0149 1 do_sigaction 0.0016 54 add_to_page_cache 0.2204 20 page_waitqueue 0.4167 48 wake_up_page 0.6234 13 unlock_page 0.3514 21 end_page_writeback 0.2838 55 find_get_page 0.4911 32 find_lock_page 0.1103 59 find_get_pages_tag 0.3711 4 filemap_nopage 0.0042 11 remove_suid 0.0738 117 generic_file_aio_write_nolock 0.0404 21 generic_file_aio_write 0.1329 45 mempool_alloc 0.1181 18 mempool_free 0.0857 2 mempool_alloc_slab 0.0952 3 mempool_free_slab 0.1429 25 bad_range 0.2500 10 prep_new_page 0.1235 43 free_hot_cold_page 0.1443 155 buffered_rmqueue 0.2914 84 __alloc_pages 0.0946 7 __get_free_pages 0.1186 8 __free_pages 0.1026 2 free_pages 0.0444 1 get_dirty_limits 0.0049 10 balance_dirty_pages_ratelimited 0.0498 58 __set_page_dirty_nobuffers 0.1543 14 clear_page_dirty_for_io 0.1228 57 test_clear_page_writeback 0.2235 50 test_set_page_writeback 0.1667 12 .text.lock.page_writeback 0.0938 1 prio_tree_expand 0.0048 1 prio_tree_replace 0.0101 1 vma_prio_tree_remove 0.0039 1 do_page_cache_readahead 0.0022 1 alloc_slabmgmt 0.0104 6 cache_init_objs 0.0577 1 set_slab_attr 0.0172 2 cache_grow 0.0044 151 kmem_cache_alloc 1.2276 71 __kmalloc 0.4610 197 kmem_cache_free 2.2644 211 kfree 1.9358 1 activate_page 0.0044 37 mark_page_accessed 0.7115 1 lru_cache_add_active 0.0105 29 release_pages 0.0642 26 __pagevec_lru_add 0.0820 3 __pagevec_lru_add_active 0.0089 1 vm_acct_memory 0.0122 14 percpu_counter_mod 0.0800 3 clear_page_tables 0.0097 3 pte_alloc_map 0.0121 15 copy_page_range 0.0194 22 zap_pte_range 0.0317 2 unmap_vmas 0.0035 20 do_wp_page 0.0236 31 do_anonymous_page 0.0690 304 do_no_page 0.3412 10 handle_mm_fault 0.0228 2 remove_vm_struct 0.0123 1 can_vma_merge_after 0.0090 1 vma_merge 0.0020 7 find_vma 0.0864 2 find_vma_prev 0.0247 1 split_vma 0.0035 1 anon_vma_unlink 0.0064 4 page_add_file_rmap 0.0185 9 page_remove_rmap 0.0377 2 fd_install 0.0136 1 sys_open 0.0060 1 sys_close 0.0049 15 do_sync_read 0.0867 57 vfs_read 0.1932 25 do_sync_write 0.1445 59 vfs_write 0.2000 19 sys_read 0.1484 29 sys_write 0.2266 3 get_empty_filp 0.0128 48 fput 2.2857 1 __fput 0.0047 83 fget 0.6484 56 fget_light 0.3353 6 bh_waitq_head 0.2727 82 wake_up_buffer 0.9880 1 sync_buffer 0.0149 37 unlock_buffer 1.5417 15 __set_page_buffers 0.6000 45 end_buffer_write_sync 0.3719 19 __find_get_block_slow 0.0439 49 end_buffer_async_write 0.1586 7 buffer_insert_list 0.0470 40 create_buffers 0.2454 5 mark_buffer_dirty 0.1250 52 __brelse 0.6667 1 bh_lru_install 0.0044 152 __find_get_block 0.6179 18 __getblk 0.1782 23 __bread 0.3485 7 set_bh_page 0.1296 1 try_to_release_page 0.0091 26 create_empty_buffers 0.1287 4 unmap_underlying_metadata 0.0354 46 __block_write_full_page 0.0479 66 __block_prepare_write 0.0665 20 __block_commit_write 0.1342 13 block_prepare_write 0.1688 9 generic_commit_write 0.0608 25 block_write_full_page 0.0936 21 end_bio_bh_io_sync 0.3387 38 submit_bh 0.1166 24 ll_rw_block 0.1765 9 recalc_bh_state 0.0503 14 alloc_buffer_head 0.1333 18 init_buffer_head 0.3396 9 .text.lock.buffer 0.0484 4 bio_destructor 0.0426 29 bio_alloc 0.0681 64 bio_put 1.1852 1 bio_endio 0.0079 1 cp_new_stat64 0.0037 12 inode_add_bytes 0.0845 1 prepare_binprm 0.0040 60 pipe_wait 0.3352 241 pipe_readv 0.3409 9 pipe_read 0.1525 151 pipe_writev 0.1821 13 pipe_write 0.2203 118 pipe_poll 0.9516 1 pipe_release 0.0043 2 vfs_permission 0.0064 4 link_path_walk 0.0010 2 path_lookup 0.0042 1 open_namei 0.0006 1 vfs_mkdir 0.0052 13 kill_fasync 0.1121 5 poll_initwait 0.2000 27 poll_freewait 0.4219 38 __pollwait 0.1929 21 max_select_fd 0.0933 164 do_select 0.2097 5 select_bits_alloc 0.1562 3 select_bits_free 0.6000 99 sys_select 0.0767 1 fcntl_setlk 0.0015 1 fcntl_setlk64 0.0015 5 dput 0.0081 4 __d_lookup 0.0096 125 inode_times_differ 1.8382 30 update_atime 0.1351 40 inode_update_time 0.1869 183 dnotify_parent 0.7233 1 seq_read 0.0014 148 __mark_inode_dirty 0.3058 1 __writeback_single_inode 0.0045 3 sync_sb_inodes 0.0039 18 mpage_writepages 0.0215 1 eventpoll_init_file 0.0303 1 get_vmalloc_info 0.0052 5 show_stat 0.0022 11 write_profile 0.0705 15 ext3_get_group_desc 0.0798 8 read_block_bitmap 0.0526 6 find_next_usable_block 0.0071 64 ext3_try_to_allocate 0.0719 5 ext3_has_free_blocks 0.0407 66 ext3_new_block 0.0508 21 ext3_file_write 0.0986 11 ext3_alloc_block 0.1864 24 ext3_block_to_path 0.0755 39 ext3_get_branch 0.1653 23 ext3_find_goal 0.1679 19 ext3_alloc_branch 0.0275 44 ext3_splice_branch 0.0928 61 ext3_get_block_handle 0.0686 16 ext3_get_block 0.0920 73 walk_page_buffers 0.6518 22 ext3_prepare_write 0.0692 5 ext3_journal_dirty_data 0.0538 76 ext3_ordered_commit_write 0.3319 19 bget_one 1.7273 2 bput_one 0.1818 4 journal_dirty_data_fn 0.2105 10 ext3_ordered_writepage 0.0217 55 ext3_get_inode_block 0.2107 27 ext3_get_inode_loc 0.0425 83 ext3_do_update_inode 0.0899 36 ext3_writepage_trans_blocks 0.2535 36 ext3_mark_iloc_dirty 0.6545 23 ext3_reserve_inode_write 0.1090 16 ext3_mark_inode_dirty 0.1975 29 ext3_dirty_inode 0.2148 18 ext3_journal_start 0.2022 13 __ext3_journal_stop 0.1625 60 start_this_handle 0.0468 17 new_handle 0.2125 38 journal_start 0.1810 218 do_get_write_access 0.1221 21 journal_get_write_access 0.2593 21 journal_get_undo_access 0.0506 72 journal_dirty_data 0.0985 139 journal_dirty_metadata 0.2532 100 journal_stop 0.1229 102 __journal_unfile_buffer 0.1973 2 journal_unfile_buffer 0.0102 38 __journal_file_buffer 0.0542 16 inverted_lock 0.1667 198 journal_commit_transaction 0.0324 1 journal_brelse_array 0.0227 1 find_revoke_record 0.0045 64 journal_cancel_revoke 0.1844 12 __log_space_left 0.1165 1 __log_start_commit 0.0159 8 journal_blocks_per_page 0.2759 12 journal_alloc_journal_head 0.1034 1 journal_free_journal_head 0.0357 262 journal_add_journal_head 0.7158 41 __journal_remove_journal_head 0.1030 43 journal_remove_journal_head 0.3468 116 journal_put_journal_head 0.5202 1 copy_semundo 0.0042 1 sys_shmdt 0.0028 2 cap_vm_enough_memory 0.0077 1 __bitmap_weight 0.0035 12 radix_tree_preload 0.0678 1 rb_erase 0.0044 11 number 0.0140 5 vsnprintf 0.0041 34 csum_partial 0.1181 1 atomic_dec_and_lock 0.0086 10 memcpy 0.1754 1 strncpy_from_user 0.0101 3 strnlen_user 0.0312 6005 __copy_user_intel 34.9128 4369 __copy_user_zeroing_intel 25.4012 107 __copy_to_user_ll 0.8917 2241 __copy_from_user_ll 18.6750 28 copy_to_user 0.2857 13 copy_from_user 0.1032 3 add_disk_randomness 0.0577 2 blk_run_queue 0.0161 1 get_request 0.0013 120 __make_request 0.0863 13 generic_make_request 0.0264 14 submit_bio 0.0484 65 __end_that_request_first 0.1236 4 put_io_context 0.0455 2 get_io_context 0.0160 11 .text.lock.ll_rw_blk 0.0809 1 as_set_request 0.0076 332 e1000_xmit_frame 0.1560 2 scsi_put_command 0.0088 25 scsi_dispatch_cmd 0.0464 3 scsi_softirq 0.0144 1 scsi_finish_command 0.0056 2 scsi_decide_disposition 0.0067 3 scsi_init_cmd_errh 0.0156 3 scsi_device_unbusy 0.0163 4 scsi_run_queue 0.0145 2 scsi_next_command 0.0488 29 scsi_end_request 0.1098 2 scsi_free_sgtable 0.0444 7 scsi_io_completion 0.0069 112 scsi_request_fn 0.1032 12 .text.lock.scsi_lib 0.0561 45 ahc_linux_isr 0.0647 1 sd_rw_intr 0.0015 32 sock_aio_read 0.1088 7 sock_aio_write 0.0238 18 sock_poll 0.3673 1 __sock_create 0.0027 216 sock_wfree 2.5116 17 __release_sock 0.1104 383 sock_def_readable 2.1278 11 sk_reset_timer 0.2340 83 lock_sock 0.6694 35 release_sock 0.2303 37 sock_common_recvmsg 0.3162 206 .text.lock.sock 1.6885 237 alloc_skb 1.0580 416 skb_release_data 2.3908 17 kfree_skbmem 0.3864 669 __kfree_skb 2.9342 77 skb_clone 0.2005 38 copy_skb_header 0.1532 24 skb_copy 0.1081 290 skb_copy_bits 0.5513 5 skb_checksum 0.0081 20 memcpy_toiovec 0.2105 1 memcpy_tokerneliovec 0.0133 129 skb_copy_datagram_iovec 0.2380 23 sk_stream_rfree 0.8519 3 sk_stream_error 0.0323 1 sk_stream_mem_schedule 0.0029 16 skb_checksum_help 0.0494 71 dev_queue_xmit 0.0892 17 net_tx_action 0.0442 69 netif_receive_skb 0.1551 106 process_backlog 0.3883 60 net_rx_action 0.2317 208 nf_iterate 1.2606 70 nf_hook_slow 0.2448 162 qdisc_restart 0.2746 132 pfifo_fast_enqueue 0.9103 88 pfifo_fast_dequeue 1.0864 33 rt_hash_code 0.2409 2 rt_cache_get_first 0.0238 271 ip_route_input 0.4982 47 ip_local_deliver 0.0929 140 ip_rcv 0.1095 62 ip_local_deliver_finish 0.1590 47 ip_rcv_finish 0.0725 11 ip_finish_output 0.0207 18 ip_output 0.1500 304 ip_queue_xmit 0.2016 8 dst_output 0.1951 235 ip_finish_output2 0.5305 104 tcp_poll 0.2708 145 tcp_sendmsg 0.0319 55 cleanup_rbuf 0.1786 398 tcp_recvmsg 0.1982 27 __tcp_grow_window 0.2061 95 tcp_rcv_rtt_update 1.0440 73 tcp_rcv_space_adjust 0.2239 208 tcp_event_data_recv 0.3478 29 tcp_rtt_estimator 0.0863 4 tcp_ack_saw_tstamp 0.0476 66 tcp_clean_rtx_queue 0.0694 1 tcp_ack_update_window 0.0039 42 tcp_ack 0.0287 1 tcp_data_queue 0.0003 6 __tcp_data_snd_check 0.0254 51 __tcp_ack_snd_check 0.3168 2 tcp_check_urg 0.0071 702 tcp_rcv_established 0.3039 331 tcp_transmit_skb 0.1900 40 tcp_write_xmit 0.0552 25 __tcp_select_window 0.0842 16 tcp_send_delayed_ack 0.0724 76 tcp_send_ack 0.3897 191 __tcp_v4_lookup_established 0.7671 41 tcp_v4_send_check 0.1621 44 tcp_v4_do_rcv 0.1384 475 tcp_v4_rcv 0.2354 10 inet_sendmsg 0.1124 18 ip_confirm 0.3750 24 ip_conntrack_defrag 0.3429 27 ip_refrag 0.1888 15 ip_conntrack_local 0.1027 14 __ip_ct_find_proto 0.2154 300 ip_ct_find_proto 2.8037 67 hash_conntrack 0.4351 33 get_tuple 0.3548 3 invert_tuple 0.0638 59 __ip_conntrack_find 0.2694 150 ip_conntrack_find_get 1.2397 4 ip_conntrack_get 0.1111 138 ip_conntrack_in 0.2244 281 ip_ct_refresh 1.4789 1 ip_ct_gather_frags 0.0043 32 tcp_pkt_to_tuple 0.3765 3 get_conntrack_index 0.0492 480 tcp_packet 1.0148 882 ipt_do_table 0.9102 14 ipt_hook 0.2373 17 ipt_local_out_hook 0.1453 30 ipt_route_hook 0.5085 30 ipt_local_hook 0.1288 50 ip_nat_fn 0.0831 17 ip_nat_out 0.0988 225 do_bindings 0.2761 14 __sched_text_start 0.0483 2 __up_wakeup 0.1667 2 __write_lock_failed 0.0625 2 __read_lock_failed 0.1000 204 schedule 0.0980 1 wait_for_completion 0.0039 2 io_schedule_timeout 0.0392 1 __preempt_spin_lock 0.0110 358 .text.lock.sched 1.8265 5 schedule_timeout 0.0262 460167 total 0.1495 13 default_idle 0.2889 418136 poll_idle 7209.2414 41 cpu_idle 0.6406 1 exit_thread 0.0076 5 need_resched 0.1000 142 system_call 3.2273 5 syscall_call 0.4545 7 syscall_exit 0.6364 6 handle_IRQ_event 0.0600 2 show_cpuinfo 0.0030 33 sched_clock 0.2426 7 pte_alloc_one 0.0909 1 pgd_ctor 0.0060 14 do_page_fault 0.0100 1636 finish_task_switch 10.9799 1018 __wake_up 8.6271 228 __might_sleep 1.0806 102 add_wait_queue 0.8226 40 remove_wait_queue 0.3125 31 prepare_to_wait 0.2109 1 prepare_to_wait_exclusive 0.0068 54 finish_wait 0.3418 1 dup_task_struct 0.0047 2 copy_mm 0.0017 1 copy_process 0.0003 7 .text.lock.fork 0.0354 1 release_task 0.0018 122 current_kernel_time 1.7681 5163 __do_softirq 29.8439 184 local_bh_enable 1.2778 610 __mod_timer 1.1799 56 mod_timer 0.5283 298 del_timer 1.9351 1 del_timer_sync 0.0055 2 .text.lock.timer 0.0217 1 flush_signal_handlers 0.0149 3 in_group_p 0.0250 1 call_rcu 0.0127 62 add_to_page_cache 0.2531 6 page_waitqueue 0.1250 45 wake_up_page 0.5844 25 unlock_page 0.6757 26 end_page_writeback 0.3514 54 find_get_page 0.4821 42 find_lock_page 0.1448 51 find_get_pages_tag 0.3208 4 do_generic_mapping_read 0.0031 3 filemap_nopage 0.0032 5 remove_suid 0.0336 127 generic_file_aio_write_nolock 0.0438 13 generic_file_aio_write 0.0823 41 mempool_alloc 0.1076 20 mempool_free 0.0952 1 mempool_alloc_slab 0.0476 4 mempool_free_slab 0.1905 16 bad_range 0.1600 21 prep_new_page 0.2593 42 free_hot_cold_page 0.1409 1 free_hot_page 0.1429 179 buffered_rmqueue 0.3365 66 __alloc_pages 0.0743 5 __get_free_pages 0.0847 8 __free_pages 0.1026 2 free_pages 0.0444 2 __read_page_state 0.0357 6 balance_dirty_pages_ratelimited 0.0299 94 __set_page_dirty_nobuffers 0.2500 1 set_page_dirty 0.0119 14 clear_page_dirty_for_io 0.1228 51 test_clear_page_writeback 0.2000 60 test_set_page_writeback 0.2000 16 .text.lock.page_writeback 0.1250 1 pdflush_operation 0.0042 1 vma_prio_tree_add 0.0060 1 vma_prio_tree_remove 0.0039 1 page_cache_readahead 0.0018 2 kmem_getpages 0.0096 1 alloc_slabmgmt 0.0104 2 cache_init_objs 0.0192 2 kmem_flagcheck 0.0465 3 cache_grow 0.0066 166 kmem_cache_alloc 1.3496 4 kmem_ptr_validate 0.0526 78 __kmalloc 0.5065 219 kmem_cache_free 2.5172 228 kfree 2.0917 39 mark_page_accessed 0.7500 3 lru_cache_add_active 0.0316 41 release_pages 0.0907 23 __pagevec_lru_add 0.0726 3 __pagevec_lru_add_active 0.0089 1 vm_acct_memory 0.0122 13 percpu_counter_mod 0.0743 2 blk_queue_bounce 0.0260 4 clear_page_tables 0.0130 5 pte_alloc_map 0.0202 7 copy_page_range 0.0090 18 zap_pte_range 0.0259 1 zap_pmd_range 0.0087 1 unmap_page_range 0.0088 1 unmap_vmas 0.0017 15 do_wp_page 0.0177 33 do_anonymous_page 0.0735 320 do_no_page 0.3591 2 handle_mm_fault 0.0046 1 find_vma_prepare 0.0099 1 vma_link 0.0030 4 do_mmap_pgoff 0.0022 11 find_vma 0.1358 1 find_vma_prev 0.0123 1 expand_stack 0.0034 1 detach_vmas_to_be_unmapped 0.0101 1 change_protection 0.0022 1 anon_vma_unlink 0.0064 4 page_add_anon_rmap 0.0122 2 page_add_file_rmap 0.0093 15 page_remove_rmap 0.0628 3 free_pages_and_swap_cache 0.0229 1 dentry_open 0.0025 1 get_unused_fd 0.0039 10 do_sync_read 0.0578 50 vfs_read 0.1695 31 do_sync_write 0.1792 37 vfs_write 0.1254 31 sys_read 0.2422 33 sys_write 0.2578 59 fput 2.8095 98 fget 0.7656 50 fget_light 0.2994 5 bh_waitq_head 0.2273 78 wake_up_buffer 0.9398 40 unlock_buffer 1.6667 13 __set_page_buffers 0.5200 71 end_buffer_write_sync 0.5868 16 __find_get_block_slow 0.0370 32 end_buffer_async_write 0.1036 1 buffer_insert_list 0.0067 28 create_buffers 0.1718 6 mark_buffer_dirty 0.1500 44 __brelse 0.5641 1 bh_lru_install 0.0044 184 __find_get_block 0.7480 22 __getblk 0.2178 11 __bread 0.1667 5 set_bh_page 0.0926 25 create_empty_buffers 0.1238 6 unmap_underlying_metadata 0.0531 48 __block_write_full_page 0.0500 64 __block_prepare_write 0.0645 25 __block_commit_write 0.1678 14 block_prepare_write 0.1818 6 generic_commit_write 0.0405 15 block_write_full_page 0.0562 23 end_bio_bh_io_sync 0.3710 38 submit_bh 0.1166 31 ll_rw_block 0.2279 5 recalc_bh_state 0.0279 5 alloc_buffer_head 0.0476 24 init_buffer_head 0.4528 8 .text.lock.buffer 0.0430 5 bio_destructor 0.0532 25 bio_alloc 0.0587 53 bio_put 0.9815 4 bio_endio 0.0315 1 cp_new_stat64 0.0037 12 inode_add_bytes 0.0845 1 copy_strings 0.0018 50 pipe_wait 0.2793 257 pipe_readv 0.3635 13 pipe_read 0.2203 132 pipe_writev 0.1592 5 pipe_write 0.0847 119 pipe_poll 0.9597 6 link_path_walk 0.0015 1 path_lookup 0.0021 14 kill_fasync 0.1207 3 poll_initwait 0.1200 31 poll_freewait 0.4844 31 __pollwait 0.1574 16 max_select_fd 0.0711 170 do_select 0.2174 5 select_bits_alloc 0.1562 91 sys_select 0.0705 1 fcntl_setlk64 0.0015 5 __d_lookup 0.0120 128 inode_times_differ 1.8824 27 update_atime 0.1216 35 inode_update_time 0.1636 225 dnotify_parent 0.8893 44 __mark_inode_dirty 0.0909 1 __writeback_single_inode 0.0045 2 sync_sb_inodes 0.0026 1 writeback_acquire 0.0455 15 mpage_writepages 0.0179 1 proc_lookup 0.0030 1 get_vmalloc_info 0.0052 13 show_stat 0.0057 10 write_profile 0.0641 27 ext3_get_group_desc 0.1436 6 read_block_bitmap 0.0395 4 find_next_usable_block 0.0047 70 ext3_try_to_allocate 0.0787 6 ext3_has_free_blocks 0.0488 58 ext3_new_block 0.0446 29 ext3_file_write 0.1362 6 ext3_alloc_block 0.1017 19 ext3_block_to_path 0.0597 34 ext3_get_branch 0.1441 22 ext3_find_goal 0.1606 24 ext3_alloc_branch 0.0347 41 ext3_splice_branch 0.0865 70 ext3_get_block_handle 0.0787 18 ext3_get_block 0.1034 66 walk_page_buffers 0.5893 30 ext3_prepare_write 0.0943 5 ext3_journal_dirty_data 0.0538 88 ext3_ordered_commit_write 0.3843 15 bget_one 1.3636 1 bput_one 0.0909 4 journal_dirty_data_fn 0.2105 12 ext3_ordered_writepage 0.0260 55 ext3_get_inode_block 0.2107 37 ext3_get_inode_loc 0.0582 77 ext3_do_update_inode 0.0834 28 ext3_writepage_trans_blocks 0.1972 34 ext3_mark_iloc_dirty 0.6182 21 ext3_reserve_inode_write 0.0995 24 ext3_mark_inode_dirty 0.2963 18 ext3_dirty_inode 0.1333 20 ext3_journal_start 0.2247 18 __ext3_journal_stop 0.2250 77 start_this_handle 0.0601 15 new_handle 0.1875 38 journal_start 0.1810 179 do_get_write_access 0.1002 21 journal_get_write_access 0.2593 1 journal_get_create_access 0.0015 27 journal_get_undo_access 0.0651 57 journal_dirty_data 0.0780 141 journal_dirty_metadata 0.2568 101 journal_stop 0.1241 118 __journal_unfile_buffer 0.2282 32 __journal_file_buffer 0.0456 1 __journal_refile_buffer 0.0029 25 inverted_lock 0.2604 241 journal_commit_transaction 0.0395 1 journal_brelse_array 0.0227 60 journal_cancel_revoke 0.1729 3 __log_space_left 0.0291 8 journal_blocks_per_page 0.2759 14 journal_alloc_journal_head 0.1207 2 journal_free_journal_head 0.0714 270 journal_add_journal_head 0.7377 38 __journal_remove_journal_head 0.0955 59 journal_remove_journal_head 0.4758 110 journal_put_journal_head 0.4933 1 semctl_main 0.0010 1 __bitmap_weight 0.0035 6 radix_tree_preload 0.0339 4 number 0.0051 5 vsnprintf 0.0041 2 find_next_zero_bit 0.0114 31 csum_partial 0.1076 2 atomic_dec_and_lock 0.0172 22 memcpy 0.3860 6003 __copy_user_intel 34.9012 4315 __copy_user_zeroing_intel 25.0872 101 __copy_to_user_ll 0.8417 2347 __copy_from_user_ll 19.5583 30 copy_to_user 0.3061 28 copy_from_user 0.2222 3 add_disk_randomness 0.0577 1 blk_run_queue 0.0081 119 __make_request 0.0856 18 generic_make_request 0.0366 12 submit_bio 0.0415 67 __end_that_request_first 0.1274 1 put_io_context 0.0114 15 .text.lock.ll_rw_blk 0.1103 2 as_set_request 0.0153 303 e1000_xmit_frame 0.1424 9 scsi_put_command 0.0398 39 scsi_dispatch_cmd 0.0724 1 scsi_softirq 0.0048 2 scsi_finish_command 0.0112 7 scsi_decide_disposition 0.0234 5 scsi_init_cmd_errh 0.0260 3 scsi_device_unbusy 0.0163 3 scsi_run_queue 0.0109 30 scsi_end_request 0.1136 1 scsi_free_sgtable 0.0222 3 scsi_io_completion 0.0029 154 scsi_request_fn 0.1419 22 .text.lock.scsi_lib 0.1028 65 ahc_linux_isr 0.0935 27 sock_aio_read 0.0918 21 sock_aio_write 0.0714 30 sock_poll 0.6122 181 sock_wfree 2.1047 18 __release_sock 0.1169 357 sock_def_readable 1.9833 11 sk_reset_timer 0.2340 73 lock_sock 0.5887 54 release_sock 0.3553 40 sock_common_recvmsg 0.3419 158 .text.lock.sock 1.2951 232 alloc_skb 1.0357 368 skb_release_data 2.1149 15 kfree_skbmem 0.3409 640 __kfree_skb 2.8070 81 skb_clone 0.2109 31 copy_skb_header 0.1250 23 skb_copy 0.1036 282 skb_copy_bits 0.5361 10 skb_checksum 0.0162 15 memcpy_toiovec 0.1579 2 memcpy_tokerneliovec 0.0267 131 skb_copy_datagram_iovec 0.2417 32 sk_stream_rfree 1.1852 2 sk_stream_error 0.0215 18 skb_checksum_help 0.0556 61 dev_queue_xmit 0.0766 15 net_tx_action 0.0390 68 netif_receive_skb 0.1528 118 process_backlog 0.4322 52 net_rx_action 0.2008 210 nf_iterate 1.2727 90 nf_hook_slow 0.3147 167 qdisc_restart 0.2831 124 pfifo_fast_enqueue 0.8552 113 pfifo_fast_dequeue 1.3951 36 rt_hash_code 0.2628 275 ip_route_input 0.5055 31 ip_local_deliver 0.0613 156 ip_rcv 0.1221 60 ip_local_deliver_finish 0.1538 46 ip_rcv_finish 0.0710 10 ip_finish_output 0.0188 31 ip_output 0.2583 288 ip_queue_xmit 0.1910 12 dst_output 0.2927 216 ip_finish_output2 0.4876 124 tcp_poll 0.3229 187 tcp_sendmsg 0.0411 44 cleanup_rbuf 0.1429 427 tcp_recvmsg 0.2126 27 __tcp_grow_window 0.2061 73 tcp_rcv_rtt_update 0.8022 42 tcp_rcv_space_adjust 0.1288 215 tcp_event_data_recv 0.3595 25 tcp_rtt_estimator 0.0744 1 tcp_fastretrans_alert 0.0005 7 tcp_ack_saw_tstamp 0.0833 83 tcp_clean_rtx_queue 0.0873 1 tcp_ack_update_window 0.0039 36 tcp_ack 0.0246 2 tcp_ofo_queue 0.0033 1 tcp_data_queue 0.0003 7 __tcp_data_snd_check 0.0297 38 __tcp_ack_snd_check 0.2360 1 tcp_check_urg 0.0036 705 tcp_rcv_established 0.3052 310 tcp_transmit_skb 0.1780 54 tcp_write_xmit 0.0745 58 __tcp_select_window 0.1953 27 tcp_send_delayed_ack 0.1222 68 tcp_send_ack 0.3487 217 __tcp_v4_lookup_established 0.8715 17 tcp_v4_send_check 0.0672 55 tcp_v4_do_rcv 0.1730 432 tcp_v4_rcv 0.2141 5 inet_sendmsg 0.0562 21 ip_confirm 0.4375 22 ip_conntrack_defrag 0.3143 23 ip_refrag 0.1608 21 ip_conntrack_local 0.1438 22 __ip_ct_find_proto 0.3385 314 ip_ct_find_proto 2.9346 65 hash_conntrack 0.4221 33 get_tuple 0.3548 3 invert_tuple 0.0638 50 __ip_conntrack_find 0.2283 149 ip_conntrack_find_get 1.2314 7 ip_conntrack_get 0.1944 110 ip_conntrack_in 0.1789 321 ip_ct_refresh 1.6895 3 ip_ct_gather_frags 0.0129 18 tcp_pkt_to_tuple 0.2118 14 get_conntrack_index 0.2295 442 tcp_packet 0.9345 882 ipt_do_table 0.9102 9 ipt_hook 0.1525 17 ipt_local_out_hook 0.1453 31 ipt_route_hook 0.5254 29 ipt_local_hook 0.1245 45 ip_nat_fn 0.0748 35 ip_nat_out 0.2035 171 do_bindings 0.2098 1 unix_create1 0.0023 1 unix_accept 0.0024 7 __sched_text_start 0.0241 1 __down_failed 0.0833 1 __write_lock_failed 0.0312 4 __read_lock_failed 0.2000 215 schedule 0.1033 1 io_schedule_timeout 0.0196 4 __preempt_spin_lock 0.0440 476 .text.lock.sched 2.4286 4 schedule_timeout 0.0209 461526 total 0.1500 19 default_idle 0.4222 415965 poll_idle 7171.8103 41 cpu_idle 0.6406 2 need_resched 0.0400 117 system_call 2.6591 4 syscall_call 0.3636 21 syscall_exit 1.9091 3 handle_IRQ_event 0.0300 1 old_mmap 0.0030 2 show_cpuinfo 0.0030 27 sched_clock 0.1985 1 flush_tlb_page 0.0056 2 pte_alloc_one 0.0260 1 pgd_ctor 0.0060 16 do_page_fault 0.0115 1631 finish_task_switch 10.9463 1 sched_balance_exec 0.0058 1027 __wake_up 8.7034 219 __might_sleep 1.0379 80 add_wait_queue 0.6452 53 remove_wait_queue 0.4141 30 prepare_to_wait 0.2041 1 prepare_to_wait_exclusive 0.0068 45 finish_wait 0.2848 1 copy_mm 0.0009 1 copy_files 0.0010 1 unshare_files 0.0102 7 .text.lock.fork 0.0354 1 do_exit 0.0009 1 do_setitimer 0.0021 79 current_kernel_time 1.1449 2 get_jiffies_64 0.0345 5187 __do_softirq 29.9827 169 local_bh_enable 1.1736 645 __mod_timer 1.2476 55 mod_timer 0.5189 284 del_timer 1.8442 1 del_timer_sync 0.0055 2 .text.lock.timer 0.0217 3 get_signal_to_deliver 0.0029 2 groups_search 0.0189 46 add_to_page_cache 0.1878 15 page_waitqueue 0.3125 60 wake_up_page 0.7792 12 unlock_page 0.3243 16 end_page_writeback 0.2162 43 find_get_page 0.3839 35 find_lock_page 0.1207 62 find_get_pages_tag 0.3899 2 do_generic_mapping_read 0.0016 2 file_read_actor 0.0083 1 __generic_file_aio_read 0.0018 1 filemap_nopage 0.0011 4 remove_suid 0.0268 132 generic_file_aio_write_nolock 0.0456 18 generic_file_aio_write 0.1139 32 mempool_alloc 0.0840 20 mempool_free 0.0952 5 mempool_alloc_slab 0.2381 21 bad_range 0.2100 19 prep_new_page 0.2346 43 free_hot_cold_page 0.1443 3 free_hot_page 0.4286 160 buffered_rmqueue 0.3008 68 __alloc_pages 0.0766 8 __get_free_pages 0.1356 1 get_zeroed_page 0.0098 20 __free_pages 0.2564 3 free_pages 0.0667 1 get_zone_counts 0.0090 1 get_writeback_state 0.0128 1 get_dirty_limits 0.0049 14 balance_dirty_pages_ratelimited 0.0697 66 __set_page_dirty_nobuffers 0.1755 19 clear_page_dirty_for_io 0.1667 58 test_clear_page_writeback 0.2275 47 test_set_page_writeback 0.1567 17 .text.lock.page_writeback 0.1328 1 __pdflush 0.0018 1 do_page_cache_readahead 0.0022 1 kmem_getpages 0.0048 2 alloc_slabmgmt 0.0208 6 cache_init_objs 0.0577 1 kmem_flagcheck 0.0233 4 cache_grow 0.0088 162 kmem_cache_alloc 1.3171 1 kmem_ptr_validate 0.0132 88 __kmalloc 0.5714 203 kmem_cache_free 2.3333 186 kfree 1.7064 37 mark_page_accessed 0.7115 38 release_pages 0.0841 1 __pagevec_release 0.0185 35 __pagevec_lru_add 0.1104 1 __pagevec_lru_add_active 0.0030 1 vm_acct_memory 0.0122 10 percpu_counter_mod 0.0571 1 blk_queue_bounce 0.0130 1 clear_page_tables 0.0032 10 copy_page_range 0.0129 21 zap_pte_range 0.0303 1 zap_pmd_range 0.0087 11 do_wp_page 0.0130 17 do_anonymous_page 0.0379 303 do_no_page 0.3401 5 handle_mm_fault 0.0114 1 vma_link 0.0030 3 vma_adjust 0.0030 1 can_vma_merge_before 0.0098 1 can_vma_merge_after 0.0090 3 do_mmap_pgoff 0.0016 1 find_vma 0.0123 1 expand_stack 0.0034 1 split_vma 0.0035 1 sys_munmap 0.0082 1 exit_mmap 0.0022 1 anon_vma_link 0.0079 1 page_add_anon_rmap 0.0031 4 page_add_file_rmap 0.0185 8 page_remove_rmap 0.0335 7 do_sync_read 0.0405 59 vfs_read 0.2000 23 do_sync_write 0.1329 56 vfs_write 0.1898 20 sys_read 0.1562 21 sys_write 0.1641 38 fput 1.8095 1 __fput 0.0047 102 fget 0.7969 50 fget_light 0.2994 1 file_move 0.0071 8 bh_waitq_head 0.3636 60 wake_up_buffer 0.7229 27 unlock_buffer 1.1250 13 __set_page_buffers 0.5200 65 end_buffer_write_sync 0.5372 15 __find_get_block_slow 0.0346 38 end_buffer_async_write 0.1230 22 create_buffers 0.1350 7 mark_buffer_dirty 0.1750 43 __brelse 0.5513 1 bh_lru_install 0.0044 140 __find_get_block 0.5691 21 __getblk 0.2079 13 __bread 0.1970 11 set_bh_page 0.2037 21 create_empty_buffers 0.1040 3 unmap_underlying_metadata 0.0265 50 __block_write_full_page 0.0521 56 __block_prepare_write 0.0564 19 __block_commit_write 0.1275 11 block_prepare_write 0.1429 12 generic_commit_write 0.0811 21 block_write_full_page 0.0787 21 end_bio_bh_io_sync 0.3387 34 submit_bh 0.1043 28 ll_rw_block 0.2059 5 recalc_bh_state 0.0279 10 alloc_buffer_head 0.0952 20 init_buffer_head 0.3774 5 .text.lock.buffer 0.0269 5 bio_destructor 0.0532 25 bio_alloc 0.0587 53 bio_put 0.9815 5 bio_endio 0.0394 1 __put_super 0.0233 16 inode_add_bytes 0.1127 1 setup_arg_pages 0.0021 57 pipe_wait 0.3184 227 pipe_readv 0.3211 6 pipe_read 0.1017 145 pipe_writev 0.1749 9 pipe_write 0.1525 130 pipe_poll 1.0484 1 getname 0.0041 1 do_lookup 0.0062 5 link_path_walk 0.0013 1 may_open 0.0019 1 open_namei 0.0006 10 kill_fasync 0.0862 3 poll_initwait 0.1200 33 poll_freewait 0.5156 31 __pollwait 0.1574 4 max_select_fd 0.0178 142 do_select 0.1816 5 select_bits_alloc 0.1562 2 select_bits_free 0.4000 114 sys_select 0.0884 1 locks_remove_flock 0.0039 1 dput 0.0016 7 __d_lookup 0.0168 1 d_rehash 0.0046 132 inode_times_differ 1.9412 38 update_atime 0.1712 28 inode_update_time 0.1308 191 dnotify_parent 0.7549 58 __mark_inode_dirty 0.1198 2 __sync_single_inode 0.0036 1 sync_sb_inodes 0.0013 13 mpage_writepages 0.0155 1 proc_lookup 0.0030 1 get_vmalloc_info 0.0052 6 show_stat 0.0026 6 write_profile 0.0385 26 ext3_get_group_desc 0.1383 4 read_block_bitmap 0.0263 3 find_next_usable_block 0.0035 50 ext3_try_to_allocate 0.0562 18 ext3_has_free_blocks 0.1463 48 ext3_new_block 0.0370 14 ext3_file_write 0.0657 6 ext3_alloc_block 0.1017 25 ext3_block_to_path 0.0786 45 ext3_get_branch 0.1907 1 ext3_find_near 0.0078 22 ext3_find_goal 0.1606 14 ext3_alloc_branch 0.0202 30 ext3_splice_branch 0.0633 78 ext3_get_block_handle 0.0877 12 ext3_get_block 0.0690 60 walk_page_buffers 0.5357 34 ext3_prepare_write 0.1069 6 ext3_journal_dirty_data 0.0645 94 ext3_ordered_commit_write 0.4105 1 ext3_bmap 0.0065 14 bget_one 1.2727 2 bput_one 0.1818 5 journal_dirty_data_fn 0.2632 18 ext3_ordered_writepage 0.0390 62 ext3_get_inode_block 0.2375 33 ext3_get_inode_loc 0.0519 100 ext3_do_update_inode 0.1083 33 ext3_writepage_trans_blocks 0.2324 26 ext3_mark_iloc_dirty 0.4727 19 ext3_reserve_inode_write 0.0900 18 ext3_mark_inode_dirty 0.2222 25 ext3_dirty_inode 0.1852 31 ext3_journal_start 0.3483 18 __ext3_journal_stop 0.2250 56 start_this_handle 0.0437 20 new_handle 0.2500 18 journal_start 0.0857 202 do_get_write_access 0.1131 22 journal_get_write_access 0.2716 1 journal_get_create_access 0.0015 30 journal_get_undo_access 0.0723 58 journal_dirty_data 0.0793 129 journal_dirty_metadata 0.2350 99 journal_stop 0.1216 96 __journal_unfile_buffer 0.1857 34 __journal_file_buffer 0.0485 1 release_buffer_page 0.0063 27 inverted_lock 0.2812 236 journal_commit_transaction 0.0387 1 journal_brelse_array 0.0227 1 __try_to_free_cp_buf 0.0054 51 journal_cancel_revoke 0.1470 5 __log_space_left 0.0485 1 journal_get_descriptor_buffer 0.0053 7 journal_blocks_per_page 0.2414 7 journal_alloc_journal_head 0.0603 3 journal_free_journal_head 0.1071 270 journal_add_journal_head 0.7377 45 __journal_remove_journal_head 0.1131 41 journal_remove_journal_head 0.3306 97 journal_put_journal_head 0.4350 9 radix_tree_preload 0.0508 1 number 0.0013 5 vsnprintf 0.0041 1 find_next_zero_bit 0.0057 24 csum_partial 0.0833 3 atomic_dec_and_lock 0.0259 15 memcpy 0.2632 1 strncpy_from_user 0.0101 6193 __copy_user_intel 36.0058 4430 __copy_user_zeroing_intel 25.7558 99 __copy_to_user_ll 0.8250 2306 __copy_from_user_ll 19.2167 31 copy_to_user 0.3163 31 copy_from_user 0.2460 2 add_disk_randomness 0.0385 1 SHATransform 0.0033 1 put_device 0.1000 2 blk_run_queue 0.0161 3 get_request 0.0040 116 __make_request 0.0835 14 generic_make_request 0.0285 8 submit_bio 0.0277 66 __end_that_request_first 0.1255 2 put_io_context 0.0227 1 get_io_context 0.0080 10 .text.lock.ll_rw_blk 0.0735 1 as_set_request 0.0076 332 e1000_xmit_frame 0.1560 4 scsi_put_command 0.0177 23 scsi_dispatch_cmd 0.0427 2 scsi_softirq 0.0096 2 scsi_finish_command 0.0112 1 scsi_add_timer 0.0093 1 scsi_decide_disposition 0.0033 1 scsi_init_cmd_errh 0.0052 6 scsi_device_unbusy 0.0326 3 scsi_run_queue 0.0109 2 scsi_next_command 0.0488 20 scsi_end_request 0.0758 1 scsi_free_sgtable 0.0222 2 scsi_io_completion 0.0020 120 scsi_request_fn 0.1106 10 .text.lock.scsi_lib 0.0467 49 ahc_linux_isr 0.0705 2 sd_rw_intr 0.0030 23 sock_aio_read 0.0782 14 sock_aio_write 0.0476 22 sock_poll 0.4490 192 sock_wfree 2.2326 13 __release_sock 0.0844 357 sock_def_readable 1.9833 12 sk_reset_timer 0.2553 75 lock_sock 0.6048 33 release_sock 0.2171 41 sock_common_recvmsg 0.3504 187 .text.lock.sock 1.5328 237 alloc_skb 1.0580 375 skb_release_data 2.1552 11 kfree_skbmem 0.2500 608 __kfree_skb 2.6667 83 skb_clone 0.2161 31 copy_skb_header 0.1250 23 skb_copy 0.1036 297 skb_copy_bits 0.5646 10 skb_checksum 0.0162 14 memcpy_toiovec 0.1474 125 skb_copy_datagram_iovec 0.2306 34 sk_stream_rfree 1.2593 6 sk_stream_error 0.0645 15 skb_checksum_help 0.0463 56 dev_queue_xmit 0.0704 28 net_tx_action 0.0727 64 netif_receive_skb 0.1438 107 process_backlog 0.3919 60 net_rx_action 0.2317 193 nf_iterate 1.1697 96 nf_hook_slow 0.3357 156 qdisc_restart 0.2644 147 pfifo_fast_enqueue 1.0138 108 pfifo_fast_dequeue 1.3333 34 rt_hash_code 0.2482 2 rt_cache_get_first 0.0238 303 ip_route_input 0.5570 39 ip_local_deliver 0.0771 122 ip_rcv 0.0955 63 ip_local_deliver_finish 0.1615 46 ip_rcv_finish 0.0710 8 ip_finish_output 0.0150 19 ip_output 0.1583 317 ip_queue_xmit 0.2102 10 dst_output 0.2439 231 ip_finish_output2 0.5214 135 tcp_poll 0.3516 169 tcp_sendmsg 0.0372 45 cleanup_rbuf 0.1461 410 tcp_recvmsg 0.2042 31 __tcp_grow_window 0.2366 55 tcp_rcv_rtt_update 0.6044 32 tcp_rcv_space_adjust 0.0982 177 tcp_event_data_recv 0.2960 35 tcp_rtt_estimator 0.1042 1 tcp_fastretrans_alert 0.0005 7 tcp_ack_saw_tstamp 0.0833 57 tcp_clean_rtx_queue 0.0599 1 tcp_ack_update_window 0.0039 51 tcp_ack 0.0348 11 __tcp_data_snd_check 0.0466 45 __tcp_ack_snd_check 0.2795 726 tcp_rcv_established 0.3143 328 tcp_transmit_skb 0.1883 41 tcp_write_xmit 0.0566 70 __tcp_select_window 0.2357 26 tcp_send_delayed_ack 0.1176 66 tcp_send_ack 0.3385 236 __tcp_v4_lookup_established 0.9478 23 tcp_v4_send_check 0.0909 49 tcp_v4_do_rcv 0.1541 390 tcp_v4_rcv 0.1933 8 inet_sendmsg 0.0899 26 ip_confirm 0.5417 23 ip_conntrack_defrag 0.3286 20 ip_refrag 0.1399 18 ip_conntrack_local 0.1233 22 __ip_ct_find_proto 0.3385 260 ip_ct_find_proto 2.4299 55 hash_conntrack 0.3571 45 get_tuple 0.4839 1 invert_tuple 0.0213 55 __ip_conntrack_find 0.2511 152 ip_conntrack_find_get 1.2562 8 ip_conntrack_get 0.2222 125 ip_conntrack_in 0.2033 265 ip_ct_refresh 1.3947 3 ip_ct_gather_frags 0.0129 19 tcp_pkt_to_tuple 0.2235 11 get_conntrack_index 0.1803 456 tcp_packet 0.9641 862 ipt_do_table 0.8896 15 ipt_hook 0.2542 14 ipt_local_out_hook 0.1197 40 ipt_route_hook 0.6780 23 ipt_local_hook 0.0987 50 ip_nat_fn 0.0831 20 ip_nat_out 0.1163 191 do_bindings 0.2344 7 __sched_text_start 0.0241 1 __write_lock_failed 0.0312 4 __read_lock_failed 0.2000 214 schedule 0.1028 1 io_schedule_timeout 0.0196 5 __preempt_spin_lock 0.0549 460 .text.lock.sched 2.3469 4 schedule_timeout 0.0209 458958 total 0.1491 19 default_idle 0.4222 416458 poll_idle 7180.3103 32 cpu_idle 0.5000 5 need_resched 0.1000 144 system_call 3.2727 7 syscall_call 0.6364 10 syscall_exit 0.9091 4 handle_IRQ_event 0.0400 1 old_mmap 0.0030 1 show_cpuinfo 0.0015 22 sched_clock 0.1618 2 delay_tsc 0.0952 5 pte_alloc_one 0.0649 20 do_page_fault 0.0143 1683 finish_task_switch 11.2953 1022 __wake_up 8.6610 1 migration_thread 0.0022 221 __might_sleep 1.0474 1 task_curr 0.0044 87 add_wait_queue 0.7016 52 remove_wait_queue 0.4062 29 prepare_to_wait 0.1973 45 finish_wait 0.2848 2 copy_mm 0.0017 1 copy_process 0.0003 4 .text.lock.fork 0.0202 1 release_task 0.0018 1 exit_notify 0.0004 1 eligible_child 0.0051 117 current_kernel_time 1.6957 5062 __do_softirq 29.2601 177 local_bh_enable 1.2292 690 __mod_timer 1.3346 64 mod_timer 0.6038 303 del_timer 1.9675 1 del_timer_sync 0.0055 2 .text.lock.timer 0.0217 1 flush_signal_handlers 0.0149 1 do_sigaction 0.0016 2 in_group_p 0.0167 1 sys_futex 0.0037 45 add_to_page_cache 0.1837 12 page_waitqueue 0.2500 49 wake_up_page 0.6364 9 unlock_page 0.2432 14 end_page_writeback 0.1892 47 find_get_page 0.4196 29 find_lock_page 0.1000 64 find_get_pages_tag 0.4025 3 filemap_nopage 0.0032 6 remove_suid 0.0403 126 generic_file_aio_write_nolock 0.0435 16 generic_file_aio_write 0.1013 29 mempool_alloc 0.0761 21 mempool_free 0.1000 3 mempool_alloc_slab 0.1429 2 mempool_free_slab 0.0952 22 bad_range 0.2200 12 prep_new_page 0.1481 68 free_hot_cold_page 0.2282 1 free_hot_page 0.1429 163 buffered_rmqueue 0.3064 78 __alloc_pages 0.0878 2 __get_free_pages 0.0339 1 __pagevec_free 0.0303 21 __free_pages 0.2692 3 free_pages 0.0667 1 __read_page_state 0.0179 7 balance_dirty_pages_ratelimited 0.0348 73 __set_page_dirty_nobuffers 0.1941 3 set_page_dirty 0.0357 14 clear_page_dirty_for_io 0.1228 42 test_clear_page_writeback 0.1647 62 test_set_page_writeback 0.2067 5 .text.lock.page_writeback 0.0391 1 pdflush_operation 0.0042 1 vma_prio_tree_remove 0.0039 3 do_page_cache_readahead 0.0065 1 kmem_getpages 0.0048 2 alloc_slabmgmt 0.0208 9 cache_init_objs 0.0865 1 kmem_flagcheck 0.0233 1 set_slab_attr 0.0172 3 cache_grow 0.0066 164 kmem_cache_alloc 1.3333 3 kmem_ptr_validate 0.0395 79 __kmalloc 0.5130 202 kmem_cache_free 2.3218 192 kfree 1.7615 27 mark_page_accessed 0.5192 1 lru_cache_add 0.0105 1 lru_cache_add_active 0.0105 35 release_pages 0.0774 29 __pagevec_lru_add 0.0915 4 __pagevec_lru_add_active 0.0119 17 percpu_counter_mod 0.0971 2 clear_page_tables 0.0065 3 pte_alloc_map 0.0121 8 copy_page_range 0.0103 15 zap_pte_range 0.0216 1 unmap_page_range 0.0088 1 unmap_vmas 0.0017 24 do_wp_page 0.0283 19 do_anonymous_page 0.0423 329 do_no_page 0.3692 3 handle_mm_fault 0.0068 2 remove_vm_struct 0.0123 1 find_vma_prepare 0.0099 1 vma_adjust 0.0010 1 can_vma_merge_after 0.0090 1 vma_merge 0.0020 4 do_mmap_pgoff 0.0022 1 find_vma 0.0123 1 free_pgtables 0.0067 1 unmap_vma_list 0.0250 2 split_vma 0.0070 2 anon_vma_prepare 0.0057 1 anon_vma_link 0.0079 2 page_add_anon_rmap 0.0061 12 page_remove_rmap 0.0502 1 free_pages_and_swap_cache 0.0076 1 filp_open 0.0095 2 get_unused_fd 0.0078 1 fd_install 0.0068 10 do_sync_read 0.0578 64 vfs_read 0.2169 19 do_sync_write 0.1098 62 vfs_write 0.2102 28 sys_read 0.2188 26 sys_write 0.2031 40 fput 1.9048 1 __fput 0.0047 95 fget 0.7422 48 fget_light 0.2874 6 bh_waitq_head 0.2727 83 wake_up_buffer 1.0000 24 unlock_buffer 1.0000 12 __set_page_buffers 0.4800 80 end_buffer_write_sync 0.6612 12 __find_get_block_slow 0.0277 26 end_buffer_async_write 0.0841 28 create_buffers 0.1718 15 mark_buffer_dirty 0.3750 38 __brelse 0.4872 144 __find_get_block 0.5854 18 __getblk 0.1782 7 __bread 0.1061 7 set_bh_page 0.1296 25 create_empty_buffers 0.1238 5 unmap_underlying_metadata 0.0442 54 __block_write_full_page 0.0563 61 __block_prepare_write 0.0614 21 __block_commit_write 0.1409 4 block_prepare_write 0.0519 7 generic_commit_write 0.0473 20 block_write_full_page 0.0749 33 end_bio_bh_io_sync 0.5323 42 submit_bh 0.1288 32 ll_rw_block 0.2353 5 recalc_bh_state 0.0279 12 alloc_buffer_head 0.1143 15 init_buffer_head 0.2830 2 .text.lock.buffer 0.0108 3 bio_destructor 0.0319 19 bio_alloc 0.0446 54 bio_put 1.0000 7 bio_endio 0.0551 1 nr_blockdev_pages 0.0075 1 cdev_put 0.0435 16 inode_add_bytes 0.1127 1 copy_strings 0.0018 1 install_arg_page 0.0034 49 pipe_wait 0.2737 243 pipe_readv 0.3437 12 pipe_read 0.2034 139 pipe_writev 0.1677 7 pipe_write 0.1186 1 bad_pipe_r 0.1667 134 pipe_poll 1.0806 1 vfs_permission 0.0032 3 do_lookup 0.0186 3 link_path_walk 0.0008 2 path_lookup 0.0042 1 may_open 0.0019 7 kill_fasync 0.0603 3 poll_initwait 0.1200 30 poll_freewait 0.4688 29 __pollwait 0.1472 12 max_select_fd 0.0533 170 do_select 0.2174 3 select_bits_alloc 0.0938 2 select_bits_free 0.4000 101 sys_select 0.0783 1 dput 0.0016 1 __d_lookup 0.0024 1 iget_locked 0.0039 126 inode_times_differ 1.8529 19 update_atime 0.0856 36 inode_update_time 0.1682 223 dnotify_parent 0.8814 1 seq_printf 0.0116 73 __mark_inode_dirty 0.1508 1 __sync_single_inode 0.0018 1 __writeback_single_inode 0.0045 1 writeback_release 0.0208 14 mpage_writepages 0.0167 1 de_put 0.0037 5 show_stat 0.0022 12 write_profile 0.0769 22 ext3_get_group_desc 0.1170 10 read_block_bitmap 0.0658 4 find_next_usable_block 0.0047 48 ext3_try_to_allocate 0.0539 9 ext3_has_free_blocks 0.0732 67 ext3_new_block 0.0516 16 ext3_file_write 0.0751 6 ext3_alloc_block 0.1017 21 ext3_block_to_path 0.0660 31 ext3_get_branch 0.1314 24 ext3_find_goal 0.1752 12 ext3_alloc_branch 0.0173 41 ext3_splice_branch 0.0865 67 ext3_get_block_handle 0.0754 14 ext3_get_block 0.0805 80 walk_page_buffers 0.7143 28 ext3_prepare_write 0.0881 6 ext3_journal_dirty_data 0.0645 90 ext3_ordered_commit_write 0.3930 19 bget_one 1.7273 4 bput_one 0.3636 5 journal_dirty_data_fn 0.2632 14 ext3_ordered_writepage 0.0304 61 ext3_get_inode_block 0.2337 39 ext3_get_inode_loc 0.0613 70 ext3_do_update_inode 0.0758 30 ext3_writepage_trans_blocks 0.2113 35 ext3_mark_iloc_dirty 0.6364 24 ext3_reserve_inode_write 0.1137 13 ext3_mark_inode_dirty 0.1605 19 ext3_dirty_inode 0.1407 19 ext3_journal_start 0.2135 18 __ext3_journal_stop 0.2250 85 start_this_handle 0.0663 17 new_handle 0.2125 26 journal_start 0.1238 181 do_get_write_access 0.1013 23 journal_get_write_access 0.2840 1 journal_get_create_access 0.0015 22 journal_get_undo_access 0.0530 53 journal_dirty_data 0.0725 122 journal_dirty_metadata 0.2222 97 journal_stop 0.1192 109 __journal_unfile_buffer 0.2108 51 __journal_file_buffer 0.0728 31 inverted_lock 0.3229 268 journal_commit_transaction 0.0439 2 __journal_clean_checkpoint_list 0.0115 67 journal_cancel_revoke 0.1931 7 __log_space_left 0.0680 9 journal_blocks_per_page 0.3103 1 __jbd_kmalloc 0.0227 7 journal_alloc_journal_head 0.0603 4 journal_free_journal_head 0.1429 263 journal_add_journal_head 0.7186 50 __journal_remove_journal_head 0.1256 61 journal_remove_journal_head 0.4919 109 journal_put_journal_head 0.4888 1 sys_semtimedop 0.0008 1 sys_shmget 0.0031 2 __bitmap_weight 0.0071 4 radix_tree_preload 0.0226 9 number 0.0115 6 vsnprintf 0.0049 1 sprintf 0.0286 37 csum_partial 0.1285 2 atomic_dec_and_lock 0.0172 11 memcpy 0.1930 1 strncpy_from_user 0.0101 6219 __copy_user_intel 36.1570 4370 __copy_user_zeroing_intel 25.4070 84 __copy_to_user_ll 0.7000 2333 __copy_from_user_ll 19.4417 29 copy_to_user 0.2959 34 copy_from_user 0.2698 1 add_disk_randomness 0.0192 2 blk_run_queue 0.0161 4 get_request 0.0054 108 __make_request 0.0777 10 generic_make_request 0.0203 12 submit_bio 0.0415 59 __end_that_request_first 0.1122 9 .text.lock.ll_rw_blk 0.0662 1 as_set_request 0.0076 317 e1000_xmit_frame 0.1490 2 scsi_put_command 0.0088 11 scsi_dispatch_cmd 0.0204 2 scsi_finish_command 0.0112 1 scsi_add_timer 0.0093 1 scsi_decide_disposition 0.0033 1 scsi_init_cmd_errh 0.0052 1 scsi_device_unbusy 0.0054 1 scsi_run_queue 0.0036 24 scsi_end_request 0.0909 3 scsi_io_completion 0.0029 119 scsi_request_fn 0.1097 6 .text.lock.scsi_lib 0.0280 35 ahc_linux_isr 0.0504 3 sd_rw_intr 0.0045 25 sock_aio_read 0.0850 19 sock_aio_write 0.0646 21 sock_poll 0.4286 213 sock_wfree 2.4767 18 __release_sock 0.1169 335 sock_def_readable 1.8611 10 sk_reset_timer 0.2128 72 lock_sock 0.5806 49 release_sock 0.3224 37 sock_common_recvmsg 0.3162 182 .text.lock.sock 1.4918 241 alloc_skb 1.0759 409 skb_release_data 2.3506 15 kfree_skbmem 0.3409 646 __kfree_skb 2.8333 58 skb_clone 0.1510 29 copy_skb_header 0.1169 20 skb_copy 0.0901 313 skb_copy_bits 0.5951 12 skb_checksum 0.0194 15 memcpy_toiovec 0.1579 1 memcpy_tokerneliovec 0.0133 128 skb_copy_datagram_iovec 0.2362 47 sk_stream_rfree 1.7407 7 sk_stream_error 0.0753 1 sk_stream_mem_schedule 0.0029 11 skb_checksum_help 0.0340 64 dev_queue_xmit 0.0804 26 net_tx_action 0.0675 82 netif_receive_skb 0.1843 127 process_backlog 0.4652 55 net_rx_action 0.2124 187 nf_iterate 1.1333 88 nf_hook_slow 0.3077 152 qdisc_restart 0.2576 151 pfifo_fast_enqueue 1.0414 88 pfifo_fast_dequeue 1.0864 33 rt_hash_code 0.2409 256 ip_route_input 0.4706 39 ip_local_deliver 0.0771 150 ip_rcv 0.1174 64 ip_local_deliver_finish 0.1641 35 ip_rcv_finish 0.0540 15 ip_finish_output 0.0282 21 ip_output 0.1750 305 ip_queue_xmit 0.2023 8 dst_output 0.1951 226 ip_finish_output2 0.5102 121 tcp_poll 0.3151 180 tcp_sendmsg 0.0396 39 cleanup_rbuf 0.1266 448 tcp_recvmsg 0.2231 24 __tcp_grow_window 0.1832 73 tcp_rcv_rtt_update 0.8022 37 tcp_rcv_space_adjust 0.1135 187 tcp_event_data_recv 0.3127 37 tcp_rtt_estimator 0.1101 3 tcp_ack_saw_tstamp 0.0357 70 tcp_clean_rtx_queue 0.0736 26 tcp_ack 0.0178 2 tcp_data_queue 0.0007 12 __tcp_data_snd_check 0.0508 45 __tcp_ack_snd_check 0.2795 727 tcp_rcv_established 0.3147 356 tcp_transmit_skb 0.2044 52 tcp_write_xmit 0.0717 35 __tcp_select_window 0.1178 14 tcp_send_delayed_ack 0.0633 56 tcp_send_ack 0.2872 205 __tcp_v4_lookup_established 0.8233 25 tcp_v4_send_check 0.0988 53 tcp_v4_do_rcv 0.1667 430 tcp_v4_rcv 0.2131 5 inet_sendmsg 0.0562 22 ip_confirm 0.4583 17 ip_conntrack_defrag 0.2429 19 ip_refrag 0.1329 11 ip_conntrack_local 0.0753 23 __ip_ct_find_proto 0.3538 284 ip_ct_find_proto 2.6542 68 hash_conntrack 0.4416 44 get_tuple 0.4731 4 invert_tuple 0.0851 64 __ip_conntrack_find 0.2922 154 ip_conntrack_find_get 1.2727 5 ip_conntrack_get 0.1389 156 ip_conntrack_in 0.2537 266 ip_ct_refresh 1.4000 2 ip_ct_gather_frags 0.0086 24 tcp_pkt_to_tuple 0.2824 6 get_conntrack_index 0.0984 474 tcp_packet 1.0021 897 ipt_do_table 0.9257 7 ipt_hook 0.1186 11 ipt_local_out_hook 0.0940 39 ipt_route_hook 0.6610 27 ipt_local_hook 0.1159 56 ip_nat_fn 0.0930 29 ip_nat_out 0.1686 215 do_bindings 0.2638 2 __sched_text_start 0.0069 1 __write_lock_failed 0.0312 1 __read_lock_failed 0.0500 207 schedule 0.0995 1 io_schedule_timeout 0.0196 4 __preempt_spin_lock 0.0440 495 .text.lock.sched 2.5255 5 schedule_timeout 0.0262 459892 total 0.1494 21 default_idle 0.4667 416413 poll_idle 7179.5345 43 cpu_idle 0.6719 1 setup_sigcontext 0.0034 7 need_resched 0.1400 135 system_call 3.0682 8 syscall_call 0.7273 12 syscall_exit 1.0909 1 error_code 0.0179 5 handle_IRQ_event 0.0500 1 init_new_context 0.0039 25 sched_clock 0.1838 1 delay_tsc 0.0476 4 pte_alloc_one 0.0519 1 pgd_ctor 0.0060 1 pgd_free 0.0357 12 do_page_fault 0.0086 1 wake_up_forked_process 0.0028 1695 finish_task_switch 11.3758 1010 __wake_up 8.5593 204 __might_sleep 0.9668 82 add_wait_queue 0.6613 49 remove_wait_queue 0.3828 24 prepare_to_wait 0.1633 50 finish_wait 0.3165 1 __mmdrop 0.0143 1 count_open_files 0.0233 7 .text.lock.fork 0.0354 1 do_exit 0.0009 122 current_kernel_time 1.7681 5090 __do_softirq 29.4220 164 local_bh_enable 1.1389 615 __mod_timer 1.1896 71 mod_timer 0.6698 304 del_timer 1.9740 1 sigprocmask 0.0041 1 notifier_call_chain 0.0161 1 set_user 0.0075 51 add_to_page_cache 0.2082 18 page_waitqueue 0.3750 43 wake_up_page 0.5584 17 unlock_page 0.4595 15 end_page_writeback 0.2027 62 find_get_page 0.5536 37 find_lock_page 0.1276 66 find_get_pages_tag 0.4151 3 filemap_nopage 0.0032 8 remove_suid 0.0537 125 generic_file_aio_write_nolock 0.0431 24 generic_file_aio_write 0.1519 30 mempool_alloc 0.0787 12 mempool_free 0.0571 14 bad_range 0.1400 19 prep_new_page 0.2346 45 free_hot_cold_page 0.1510 145 buffered_rmqueue 0.2726 75 __alloc_pages 0.0845 5 __get_free_pages 0.0847 8 __free_pages 0.1026 8 balance_dirty_pages_ratelimited 0.0398 1 do_writepages 0.0149 65 __set_page_dirty_nobuffers 0.1729 3 set_page_dirty 0.0357 20 clear_page_dirty_for_io 0.1754 49 test_clear_page_writeback 0.1922 63 test_set_page_writeback 0.2100 29 .text.lock.page_writeback 0.2266 2 pdflush_operation 0.0085 1 prio_tree_insert 0.0026 2 do_page_cache_readahead 0.0043 1 kmem_getpages 0.0048 8 cache_init_objs 0.0769 5 cache_grow 0.0110 156 kmem_cache_alloc 1.2683 82 __kmalloc 0.5325 194 kmem_cache_free 2.2299 201 kfree 1.8440 30 mark_page_accessed 0.5769 1 lru_add_drain 0.0089 27 release_pages 0.0597 27 __pagevec_lru_add 0.0852 1 __pagevec_lru_add_active 0.0030 9 percpu_counter_mod 0.0514 3 blk_queue_bounce 0.0390 9 copy_page_range 0.0116 19 zap_pte_range 0.0274 1 zap_pmd_range 0.0087 1 unmap_vmas 0.0017 15 do_wp_page 0.0177 9 do_anonymous_page 0.0200 293 do_no_page 0.3288 6 handle_mm_fault 0.0137 1 remove_vm_struct 0.0062 1 find_vma_prepare 0.0099 1 vma_link 0.0030 1 vma_adjust 0.0010 1 can_vma_merge_after 0.0090 1 vma_merge 0.0020 1 do_mmap_pgoff 0.0005 2 find_vma 0.0247 1 find_vma_prev 0.0123 1 anon_vma_unlink 0.0064 3 page_add_anon_rmap 0.0092 1 page_add_file_rmap 0.0046 14 page_remove_rmap 0.0586 2 free_pages_and_swap_cache 0.0153 2 dentry_open 0.0051 1 put_unused_fd 0.0081 8 do_sync_read 0.0462 56 vfs_read 0.1898 23 do_sync_write 0.1329 47 vfs_write 0.1593 32 sys_read 0.2500 28 sys_write 0.2188 1 get_empty_filp 0.0043 53 fput 2.5238 78 fget 0.6094 44 fget_light 0.2635 5 bh_waitq_head 0.2273 66 wake_up_buffer 0.7952 27 unlock_buffer 1.1250 14 __set_page_buffers 0.5600 71 end_buffer_write_sync 0.5868 14 __find_get_block_slow 0.0323 38 end_buffer_async_write 0.1230 2 buffer_insert_list 0.0134 23 create_buffers 0.1411 1 init_page_buffers 0.0089 1 __getblk_slow 0.0028 12 mark_buffer_dirty 0.3000 50 __brelse 0.6410 167 __find_get_block 0.6789 25 __getblk 0.2475 9 __bread 0.1364 2 set_bh_page 0.0370 2 try_to_release_page 0.0182 26 create_empty_buffers 0.1287 2 unmap_underlying_metadata 0.0177 44 __block_write_full_page 0.0458 55 __block_prepare_write 0.0554 23 __block_commit_write 0.1544 12 block_prepare_write 0.1558 5 generic_commit_write 0.0338 16 block_write_full_page 0.0599 16 end_bio_bh_io_sync 0.2581 42 submit_bh 0.1288 20 ll_rw_block 0.1471 4 recalc_bh_state 0.0223 16 alloc_buffer_head 0.1524 24 init_buffer_head 0.4528 14 .text.lock.buffer 0.0753 7 bio_destructor 0.0745 22 bio_alloc 0.0516 68 bio_put 1.2593 5 bio_endio 0.0394 14 inode_add_bytes 0.0986 1 flush_old_exec 0.0004 52 pipe_wait 0.2905 258 pipe_readv 0.3649 8 pipe_read 0.1356 152 pipe_writev 0.1834 5 pipe_write 0.0847 131 pipe_poll 1.0565 1 pipe_write_fasync 0.0075 2 vfs_permission 0.0064 1 follow_mount 0.0068 1 do_lookup 0.0062 4 link_path_walk 0.0010 1 path_lookup 0.0021 1 may_open 0.0019 17 kill_fasync 0.1466 5 poll_initwait 0.2000 33 poll_freewait 0.5156 31 __pollwait 0.1574 16 max_select_fd 0.0711 155 do_select 0.1982 2 select_bits_alloc 0.0625 2 select_bits_free 0.4000 86 sys_select 0.0667 1 dput 0.0016 10 __d_lookup 0.0240 137 inode_times_differ 2.0147 29 update_atime 0.1306 51 inode_update_time 0.2383 1 wake_up_inode 0.0139 1 dnotify_flush 0.0047 227 dnotify_parent 0.8972 2 seq_read 0.0029 1 seq_printf 0.0116 82 __mark_inode_dirty 0.1694 14 mpage_writepages 0.0167 1 load_elf_binary 0.0003 1 proc_lookup 0.0030 1 get_vmalloc_info 0.0052 3 show_stat 0.0013 10 write_profile 0.0641 26 ext3_get_group_desc 0.1383 3 read_block_bitmap 0.0197 4 find_next_usable_block 0.0047 63 ext3_try_to_allocate 0.0708 9 ext3_has_free_blocks 0.0732 66 ext3_new_block 0.0508 21 ext3_file_write 0.0986 5 ext3_alloc_block 0.0847 27 ext3_block_to_path 0.0849 39 ext3_get_branch 0.1653 16 ext3_find_goal 0.1168 13 ext3_alloc_branch 0.0188 53 ext3_splice_branch 0.1118 72 ext3_get_block_handle 0.0810 9 ext3_get_block 0.0517 75 walk_page_buffers 0.6696 22 ext3_prepare_write 0.0692 4 ext3_journal_dirty_data 0.0430 93 ext3_ordered_commit_write 0.4061 11 bget_one 1.0000 3 bput_one 0.2727 8 journal_dirty_data_fn 0.4211 14 ext3_ordered_writepage 0.0304 66 ext3_get_inode_block 0.2529 29 ext3_get_inode_loc 0.0456 80 ext3_do_update_inode 0.0867 23 ext3_writepage_trans_blocks 0.1620 30 ext3_mark_iloc_dirty 0.5455 19 ext3_reserve_inode_write 0.0900 13 ext3_mark_inode_dirty 0.1605 22 ext3_dirty_inode 0.1630 19 ext3_journal_start 0.2135 14 __ext3_journal_stop 0.1750 77 start_this_handle 0.0601 21 new_handle 0.2625 35 journal_start 0.1667 204 do_get_write_access 0.1142 28 journal_get_write_access 0.3457 29 journal_get_undo_access 0.0699 69 journal_dirty_data 0.0944 157 journal_dirty_metadata 0.2860 103 journal_stop 0.1265 110 __journal_unfile_buffer 0.2128 53 __journal_file_buffer 0.0756 28 inverted_lock 0.2917 225 journal_commit_transaction 0.0368 4 journal_brelse_array 0.0909 1 __journal_clean_checkpoint_list 0.0057 69 journal_cancel_revoke 0.1988 1 journal_write_metadata_buffer 0.0011 5 __log_space_left 0.0485 1 __log_start_commit 0.0159 6 journal_blocks_per_page 0.2069 9 journal_alloc_journal_head 0.0776 1 journal_free_journal_head 0.0357 264 journal_add_journal_head 0.7213 59 __journal_remove_journal_head 0.1482 52 journal_remove_journal_head 0.4194 104 journal_put_journal_head 0.4664 1 ipc_lock 0.0062 1 shm_open 0.0108 3 kobject_put 0.1200 16 radix_tree_preload 0.0904 6 number 0.0077 7 vsnprintf 0.0057 35 csum_partial 0.1215 22 memcpy 0.3860 1 strncpy_from_user 0.0101 6141 __copy_user_intel 35.7035 4321 __copy_user_zeroing_intel 25.1221 99 __copy_to_user_ll 0.8250 2350 __copy_from_user_ll 19.5833 33 copy_to_user 0.3367 36 copy_from_user 0.2857 1 add_timer_randomness 0.0034 1 add_disk_randomness 0.0192 4 blk_run_queue 0.0323 3 get_request 0.0040 111 __make_request 0.0799 12 generic_make_request 0.0244 13 submit_bio 0.0450 52 __end_that_request_first 0.0989 1 put_io_context 0.0114 1 get_io_context 0.0080 10 .text.lock.ll_rw_blk 0.0735 4 as_set_request 0.0305 337 e1000_xmit_frame 0.1584 7 scsi_put_command 0.0310 21 scsi_dispatch_cmd 0.0390 3 scsi_softirq 0.0144 2 scsi_add_timer 0.0185 1 scsi_decide_disposition 0.0033 3 scsi_init_cmd_errh 0.0156 1 scsi_setup_cmd_retry 0.0093 16 scsi_device_unbusy 0.0870 1 scsi_next_command 0.0244 25 scsi_end_request 0.0947 3 scsi_free_sgtable 0.0667 6 scsi_io_completion 0.0059 162 scsi_request_fn 0.1493 16 .text.lock.scsi_lib 0.0748 54 ahc_linux_isr 0.0777 1 .text.lock.aic7xxx_osm 0.0014 3 sd_rw_intr 0.0045 2 vgacon_save_screen 0.0200 31 sock_aio_read 0.1054 13 sock_aio_write 0.0442 21 sock_poll 0.4286 196 sock_wfree 2.2791 1 sock_wmalloc 0.0106 17 __release_sock 0.1104 368 sock_def_readable 2.0444 10 sk_reset_timer 0.2128 91 lock_sock 0.7339 56 release_sock 0.3684 33 sock_common_recvmsg 0.2821 205 .text.lock.sock 1.6803 232 alloc_skb 1.0357 390 skb_release_data 2.2414 16 kfree_skbmem 0.3636 640 __kfree_skb 2.8070 82 skb_clone 0.2135 25 copy_skb_header 0.1008 19 skb_copy 0.0856 251 skb_copy_bits 0.4772 4 skb_checksum 0.0065 13 memcpy_toiovec 0.1368 123 skb_copy_datagram_iovec 0.2269 38 sk_stream_rfree 1.4074 3 sk_stream_error 0.0323 25 skb_checksum_help 0.0772 70 dev_queue_xmit 0.0879 27 net_tx_action 0.0701 84 netif_receive_skb 0.1888 111 process_backlog 0.4066 66 net_rx_action 0.2548 194 nf_iterate 1.1758 85 nf_hook_slow 0.2972 155 qdisc_restart 0.2627 145 pfifo_fast_enqueue 1.0000 101 pfifo_fast_dequeue 1.2469 26 rt_hash_code 0.1898 278 ip_route_input 0.5110 24 ip_local_deliver 0.0474 142 ip_rcv 0.1111 59 ip_local_deliver_finish 0.1513 43 ip_rcv_finish 0.0664 11 ip_finish_output 0.0207 10 ip_output 0.0833 288 ip_queue_xmit 0.1910 4 dst_output 0.0976 198 ip_finish_output2 0.4470 116 tcp_poll 0.3021 164 tcp_sendmsg 0.0361 41 cleanup_rbuf 0.1331 436 tcp_recvmsg 0.2171 31 __tcp_grow_window 0.2366 64 tcp_rcv_rtt_update 0.7033 47 tcp_rcv_space_adjust 0.1442 175 tcp_event_data_recv 0.2926 22 tcp_rtt_estimator 0.0655 1 tcp_ack_saw_tstamp 0.0119 62 tcp_clean_rtx_queue 0.0652 34 tcp_ack 0.0232 1 tcp_data_queue 0.0003 11 __tcp_data_snd_check 0.0466 41 __tcp_ack_snd_check 0.2547 717 tcp_rcv_established 0.3104 346 tcp_transmit_skb 0.1986 49 tcp_write_xmit 0.0676 31 __tcp_select_window 0.1044 16 tcp_send_delayed_ack 0.0724 77 tcp_send_ack 0.3949 218 __tcp_v4_lookup_established 0.8755 19 tcp_v4_send_check 0.0751 43 tcp_v4_do_rcv 0.1352 452 tcp_v4_rcv 0.2240 5 inet_sendmsg 0.0562 21 ip_confirm 0.4375 25 ip_conntrack_defrag 0.3571 22 ip_refrag 0.1538 16 ip_conntrack_local 0.1096 12 __ip_ct_find_proto 0.1846 250 ip_ct_find_proto 2.3364 78 hash_conntrack 0.5065 31 get_tuple 0.3333 1 invert_tuple 0.0213 59 __ip_conntrack_find 0.2694 134 ip_conntrack_find_get 1.1074 10 ip_conntrack_get 0.2778 138 ip_conntrack_in 0.2244 302 ip_ct_refresh 1.5895 4 ip_ct_gather_frags 0.0172 25 tcp_pkt_to_tuple 0.2941 13 get_conntrack_index 0.2131 441 tcp_packet 0.9323 950 ipt_do_table 0.9804 19 ipt_hook 0.3220 27 ipt_local_out_hook 0.2308 29 ipt_route_hook 0.4915 21 ipt_local_hook 0.0901 67 ip_nat_fn 0.1113 29 ip_nat_out 0.1686 182 do_bindings 0.2233 1 unix_create1 0.0023 2 __sched_text_start 0.0069 5 __write_lock_failed 0.1562 1 __read_lock_failed 0.0500 210 schedule 0.1009 1 io_schedule 0.0208 1 __preempt_spin_lock 0.0110 484 .text.lock.sched 2.4694 4 schedule_timeout 0.0209 459746 total 0.1494 17 default_idle 0.3778 429479 poll_idle 7404.8103 39 cpu_idle 0.6094 4 need_resched 0.0800 122 system_call 2.7727 4 syscall_call 0.3636 10 syscall_exit 0.9091 3 handle_IRQ_event 0.0300 3 old_mmap 0.0090 1 show_cpuinfo 0.0015 1 c_start 0.0278 36 sched_clock 0.2647 3 delay_tsc 0.1429 1 pte_alloc_one 0.0130 32 do_page_fault 0.0229 1 try_to_wake_up 0.0015 1687 finish_task_switch 11.3221 1016 __wake_up 8.6102 189 __might_sleep 0.8957 91 add_wait_queue 0.7339 52 remove_wait_queue 0.4062 40 prepare_to_wait 0.2721 24 finish_wait 0.1519 1 copy_mm 0.0009 1 copy_process 0.0003 4 .text.lock.fork 0.0202 1 profile_exit_mmap 0.0104 1 release_task 0.0018 1 sys_wait4 0.0016 1 sys_time 0.0083 126 current_kernel_time 1.8261 5066 __do_softirq 29.2832 168 local_bh_enable 1.1667 722 __mod_timer 1.3965 80 mod_timer 0.7547 299 del_timer 1.9416 1 del_timer_sync 0.0055 1 do_sigaction 0.0016 1 audit_alloc 0.0049 57 add_to_page_cache 0.2327 17 page_waitqueue 0.3542 31 wake_up_page 0.4026 21 unlock_page 0.5676 20 end_page_writeback 0.2703 55 find_get_page 0.4911 37 find_lock_page 0.1276 43 find_get_pages_tag 0.2704 2 do_generic_mapping_read 0.0016 5 filemap_nopage 0.0053 11 remove_suid 0.0738 111 generic_file_aio_write_nolock 0.0383 22 generic_file_aio_write 0.1392 39 mempool_alloc 0.1024 14 mempool_free 0.0667 1 mempool_alloc_slab 0.0476 24 bad_range 0.2400 21 prep_new_page 0.2593 57 free_hot_cold_page 0.1913 149 buffered_rmqueue 0.2801 61 __alloc_pages 0.0687 9 __get_free_pages 0.1525 21 __free_pages 0.2692 1 __read_page_state 0.0179 11 balance_dirty_pages_ratelimited 0.0547 62 __set_page_dirty_nobuffers 0.1649 16 clear_page_dirty_for_io 0.1404 52 test_clear_page_writeback 0.2039 45 test_set_page_writeback 0.1500 38 .text.lock.page_writeback 0.2969 1 do_page_cache_readahead 0.0022 1 kmem_getpages 0.0048 1 alloc_slabmgmt 0.0104 6 cache_init_objs 0.0577 1 kmem_flagcheck 0.0233 2 cache_grow 0.0044 153 kmem_cache_alloc 1.2439 1 kmem_ptr_validate 0.0132 84 __kmalloc 0.5455 194 kmem_cache_free 2.2299 222 kfree 2.0367 32 mark_page_accessed 0.6154 2 lru_cache_add_active 0.0211 31 release_pages 0.0686 35 __pagevec_lru_add 0.1104 1 __pagevec_lru_add_active 0.0030 16 percpu_counter_mod 0.0914 2 clear_page_tables 0.0065 1 pte_alloc_map 0.0040 12 copy_page_range 0.0155 23 zap_pte_range 0.0331 1 zap_pmd_range 0.0087 1 unmap_page_range 0.0088 19 do_wp_page 0.0224 41 do_anonymous_page 0.0913 311 do_no_page 0.3490 1 remove_vm_struct 0.0062 2 find_vma_prepare 0.0198 1 vma_link 0.0030 1 __insert_vm_struct 0.0076 3 do_mmap_pgoff 0.0016 2 find_vma 0.0247 3 find_vma_prev 0.0370 1 do_munmap 0.0022 1 change_protection 0.0022 2 anon_vma_unlink 0.0128 3 page_add_anon_rmap 0.0092 3 page_add_file_rmap 0.0139 12 page_remove_rmap 0.0502 1 free_pages_and_swap_cache 0.0076 1 sys_access 0.0030 1 dentry_open 0.0025 2 get_unused_fd 0.0078 1 fd_install 0.0068 1 sys_open 0.0060 8 do_sync_read 0.0462 69 vfs_read 0.2339 20 do_sync_write 0.1156 53 vfs_write 0.1797 30 sys_read 0.2344 19 sys_write 0.1484 51 fput 2.4286 73 fget 0.5703 51 fget_light 0.3054 3 bh_waitq_head 0.1364 71 wake_up_buffer 0.8554 37 unlock_buffer 1.5417 10 __set_page_buffers 0.4000 66 end_buffer_write_sync 0.5455 20 __find_get_block_slow 0.0462 34 end_buffer_async_write 0.1100 1 buffer_insert_list 0.0067 40 create_buffers 0.2454 8 mark_buffer_dirty 0.2000 45 __brelse 0.5769 144 __find_get_block 0.5854 18 __getblk 0.1782 13 __bread 0.1970 4 set_bh_page 0.0741 19 create_empty_buffers 0.0941 4 unmap_underlying_metadata 0.0354 37 __block_write_full_page 0.0385 50 __block_prepare_write 0.0504 22 __block_commit_write 0.1477 11 block_prepare_write 0.1429 11 generic_commit_write 0.0743 10 block_write_full_page 0.0375 26 end_bio_bh_io_sync 0.4194 42 submit_bh 0.1288 28 ll_rw_block 0.2059 1 sync_dirty_buffer 0.0055 3 recalc_bh_state 0.0168 12 alloc_buffer_head 0.1143 11 init_buffer_head 0.2075 1 init_buffer 0.0526 3 .text.lock.buffer 0.0161 6 bio_destructor 0.0638 23 bio_alloc 0.0540 50 bio_put 0.9259 1 bio_endio 0.0079 2 generic_fillattr 0.0122 1 sys_stat64 0.0175 15 inode_add_bytes 0.1056 54 pipe_wait 0.3017 219 pipe_readv 0.3098 7 pipe_read 0.1186 127 pipe_writev 0.1532 7 pipe_write 0.1186 107 pipe_poll 0.8629 7 link_path_walk 0.0018 2 path_lookup 0.0042 1 open_namei 0.0006 13 kill_fasync 0.1121 2 poll_initwait 0.0800 27 poll_freewait 0.4219 31 __pollwait 0.1574 19 max_select_fd 0.0844 135 do_select 0.1726 3 select_bits_alloc 0.0938 2 select_bits_free 0.4000 96 sys_select 0.0744 1 flock_to_posix_lock 0.0030 1 fcntl_setlk 0.0015 1 dput 0.0016 1 d_alloc 0.0022 1 d_instantiate 0.0066 9 __d_lookup 0.0216 2 d_rehash 0.0092 1 alloc_inode 0.0030 1 find_inode_fast 0.0123 148 inode_times_differ 2.1765 29 update_atime 0.1306 47 inode_update_time 0.2196 216 dnotify_parent 0.8538 1 lookup_mnt 0.0060 1 seq_printf 0.0116 75 __mark_inode_dirty 0.1550 13 mpage_writepages 0.0155 3 proc_lookup 0.0090 5 show_stat 0.0022 7 write_profile 0.0449 23 ext3_get_group_desc 0.1223 4 read_block_bitmap 0.0263 4 find_next_usable_block 0.0047 58 ext3_try_to_allocate 0.0652 7 ext3_has_free_blocks 0.0569 49 ext3_new_block 0.0377 1 ext3_open_file 0.0222 21 ext3_file_write 0.0986 10 ext3_alloc_block 0.1695 35 ext3_block_to_path 0.1101 34 ext3_get_branch 0.1441 17 ext3_find_goal 0.1241 19 ext3_alloc_branch 0.0275 40 ext3_splice_branch 0.0844 62 ext3_get_block_handle 0.0697 6 ext3_get_block 0.0345 73 walk_page_buffers 0.6518 2 do_journal_get_write_access 0.0165 30 ext3_prepare_write 0.0943 8 ext3_journal_dirty_data 0.0860 94 ext3_ordered_commit_write 0.4105 5 bget_one 0.4545 2 bput_one 0.1818 1 journal_dirty_data_fn 0.0526 6 ext3_ordered_writepage 0.0130 58 ext3_get_inode_block 0.2222 39 ext3_get_inode_loc 0.0613 73 ext3_do_update_inode 0.0791 34 ext3_writepage_trans_blocks 0.2394 39 ext3_mark_iloc_dirty 0.7091 20 ext3_reserve_inode_write 0.0948 18 ext3_mark_inode_dirty 0.2222 15 ext3_dirty_inode 0.1111 23 ext3_journal_start 0.2584 15 __ext3_journal_stop 0.1875 72 start_this_handle 0.0562 28 new_handle 0.3500 34 journal_start 0.1619 175 do_get_write_access 0.0980 21 journal_get_write_access 0.2593 20 journal_get_undo_access 0.0482 79 journal_dirty_data 0.1081 121 journal_dirty_metadata 0.2204 102 journal_stop 0.1253 77 __journal_unfile_buffer 0.1489 41 __journal_file_buffer 0.0585 1 journal_file_buffer 0.0046 24 inverted_lock 0.2500 222 journal_commit_transaction 0.0364 2 journal_brelse_array 0.0455 1 __try_to_free_cp_buf 0.0054 1 __journal_clean_checkpoint_list 0.0057 70 journal_cancel_revoke 0.2017 1 journal_switch_revoke_table 0.0109 8 __log_space_left 0.0777 3 journal_blocks_per_page 0.1034 5 journal_alloc_journal_head 0.0431 3 journal_free_journal_head 0.1071 258 journal_add_journal_head 0.7049 45 __journal_remove_journal_head 0.1131 56 journal_remove_journal_head 0.4516 93 journal_put_journal_head 0.4170 1 ipc_lock 0.0062 1 copy_semundo 0.0042 2 cap_vm_enough_memory 0.0077 15 radix_tree_preload 0.0847 3 number 0.0038 2 vsnprintf 0.0016 1 find_next_zero_bit 0.0057 22 csum_partial 0.0764 2 atomic_dec_and_lock 0.0172 11 memcpy 0.1930 1 strnlen_user 0.0104 6276 __copy_user_intel 36.4884 4430 __copy_user_zeroing_intel 25.7558 92 __copy_to_user_ll 0.7667 2390 __copy_from_user_ll 19.9167 19 copy_to_user 0.1939 38 copy_from_user 0.3016 1 elv_set_request 0.0172 2 blk_run_queue 0.0161 2 get_request 0.0027 89 __make_request 0.0640 17 generic_make_request 0.0346 8 submit_bio 0.0277 53 __end_that_request_first 0.1008 2 get_io_context 0.0160 4 .text.lock.ll_rw_blk 0.0294 1 as_set_request 0.0076 313 e1000_xmit_frame 0.1471 6 scsi_put_command 0.0265 24 scsi_dispatch_cmd 0.0445 1 scsi_softirq 0.0048 1 scsi_add_timer 0.0093 1 scsi_decide_disposition 0.0033 2 scsi_init_cmd_errh 0.0104 3 scsi_device_unbusy 0.0163 3 scsi_run_queue 0.0109 2 scsi_next_command 0.0488 17 scsi_end_request 0.0644 4 scsi_io_completion 0.0039 137 scsi_request_fn 0.1263 14 .text.lock.scsi_lib 0.0654 44 ahc_linux_isr 0.0633 2 sd_rw_intr 0.0030 1 move_addr_to_kernel 0.0139 27 sock_aio_read 0.0918 12 sock_aio_write 0.0408 27 sock_poll 0.5510 187 sock_wfree 2.1744 8 __release_sock 0.0519 368 sock_def_readable 2.0444 8 sk_reset_timer 0.1702 68 lock_sock 0.5484 32 release_sock 0.2105 30 sock_common_recvmsg 0.2564 183 .text.lock.sock 1.5000 246 alloc_skb 1.0982 398 skb_release_data 2.2874 19 kfree_skbmem 0.4318 642 __kfree_skb 2.8158 68 skb_clone 0.1771 30 copy_skb_header 0.1210 21 skb_copy 0.0946 273 skb_copy_bits 0.5190 5 skb_checksum 0.0081 21 memcpy_toiovec 0.2211 2 memcpy_tokerneliovec 0.0267 129 skb_copy_datagram_iovec 0.2380 22 sk_stream_rfree 0.8148 8 sk_stream_error 0.0860 8 skb_checksum_help 0.0247 49 dev_queue_xmit 0.0616 15 net_tx_action 0.0390 72 netif_receive_skb 0.1618 116 process_backlog 0.4249 58 net_rx_action 0.2239 189 nf_iterate 1.1455 100 nf_hook_slow 0.3497 147 qdisc_restart 0.2492 121 pfifo_fast_enqueue 0.8345 114 pfifo_fast_dequeue 1.4074 35 rt_hash_code 0.2555 295 ip_route_input 0.5423 36 ip_local_deliver 0.0711 150 ip_rcv 0.1174 71 ip_local_deliver_finish 0.1821 49 ip_rcv_finish 0.0756 13 ip_finish_output 0.0244 24 ip_output 0.2000 290 ip_queue_xmit 0.1923 6 dst_output 0.1463 209 ip_finish_output2 0.4718 117 tcp_poll 0.3047 187 tcp_sendmsg 0.0411 52 cleanup_rbuf 0.1688 440 tcp_recvmsg 0.2191 28 __tcp_grow_window 0.2137 75 tcp_rcv_rtt_update 0.8242 55 tcp_rcv_space_adjust 0.1687 172 tcp_event_data_recv 0.2876 39 tcp_rtt_estimator 0.1161 4 tcp_ack_saw_tstamp 0.0476 55 tcp_clean_rtx_queue 0.0578 41 tcp_ack 0.0280 1 tcp_ofo_queue 0.0016 3 tcp_data_queue 0.0010 8 __tcp_data_snd_check 0.0339 50 __tcp_ack_snd_check 0.3106 739 tcp_rcv_established 0.3199 339 tcp_transmit_skb 0.1946 32 tcp_write_xmit 0.0441 99 __tcp_select_window 0.3333 17 tcp_send_delayed_ack 0.0769 67 tcp_send_ack 0.3436 212 __tcp_v4_lookup_established 0.8514 23 tcp_v4_send_check 0.0909 44 tcp_v4_do_rcv 0.1384 409 tcp_v4_rcv 0.2027 7 inet_sendmsg 0.0787 20 ip_confirm 0.4167 26 ip_conntrack_defrag 0.3714 22 ip_refrag 0.1538 17 ip_conntrack_local 0.1164 20 __ip_ct_find_proto 0.3077 246 ip_ct_find_proto 2.2991 66 hash_conntrack 0.4286 39 get_tuple 0.4194 1 invert_tuple 0.0213 71 __ip_conntrack_find 0.3242 141 ip_conntrack_find_get 1.1653 4 ip_conntrack_get 0.1111 148 ip_conntrack_in 0.2407 299 ip_ct_refresh 1.5737 4 ip_ct_gather_frags 0.0172 20 tcp_pkt_to_tuple 0.2353 11 get_conntrack_index 0.1803 461 tcp_packet 0.9746 894 ipt_do_table 0.9226 18 ipt_hook 0.3051 20 ipt_local_out_hook 0.1709 30 ipt_route_hook 0.5085 27 ipt_local_hook 0.1159 58 ip_nat_fn 0.0963 35 ip_nat_out 0.2035 179 do_bindings 0.2196 1 unix_release_sock 0.0010 5 __sched_text_start 0.0172 1 __up_wakeup 0.0833 1 __write_lock_failed 0.0312 2 __read_lock_failed 0.1000 217 schedule 0.1043 1 wait_for_completion 0.0039 2 __preempt_spin_lock 0.0220 410 .text.lock.sched 2.0918 3 schedule_timeout 0.0157 472721 total 0.1536 --gBBFr7Ir9EOA20Yy-- From ak@suse.de Tue Aug 31 06:54:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 06: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 i7VDsY4K019333 for ; Tue, 31 Aug 2004 06:54:35 -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 A1609B4A334; Tue, 31 Aug 2004 15:54:20 +0200 (CEST) Date: Tue, 31 Aug 2004 15:54:20 +0200 From: Andi Kleen To: Srivatsa Vaddagiri Cc: davem@redhat.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, Dipankar , paulmck@us.ibm.com Subject: Re: [RFC] Use RCU for tcp_ehash lookup Message-ID: <20040831135419.GA17642@wotan.suse.de> References: <20040831125941.GA5534@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040831125941.GA5534@in.ibm.com> X-archive-position: 8265 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: 2500 Lines: 75 On Tue, Aug 31, 2004 at 06:29:41PM +0530, Srivatsa Vaddagiri wrote: > > I would be interested to know if anyone has seen high-rate of lock contention > for hash bucket lock. Such workloads would benefit from the lock-free lookup. I would suspect something that does IO from multiple threads over a single connection. However there is also the socket lock, which may prevent too much parallelism. > > In the absence of any workload which resulted in lock contention, I resorted > to disabling NAPI and irq balance (noirqbalance) to study the effect of cache > bouncing on the lookup routine. The result was that CPU usage of the stack > was halved in lock-free case, which IMHO, is a strong enough reason for us > to consider this seriously. Yes, sounds very nice. I bet also when you just do rdtsc timing for the TCP receive path the cycle numbers will be way down (excluding the copy). And it should also fix the performance problems with cat /proc/net/tcp on ppc64/ia64 for large hash tables because the rw locks are gone. > > - I presume that one of the reasons for keeping the hash table so big is to > keep lock contention low (& to reduce the size of hash chains). If the lookup > is made lock-free, then could the size of the hash table be reduced (without > adversely impacting performance)? Definitely worth trying IMHO. The current hash tables are far too big. I would do that as followon patches though. I haven't studied it in detail (yet), just two minor style comments: > - sk_free(sk); > +sp_loop: > + if (atomic_dec_and_test(&sk->sk_refcnt)) { > + /* Restore ref count and schedule callback. > + * If we don't restore ref count, then the callback can be > + * scheduled by more than one CPU. > + */ > + atomic_inc(&sk->sk_refcnt); > + > + if (atomic_read(&sk->sk_refcnt) == 1) > + call_rcu(&sk->sk_rcu, sk_free_rcu); > + else > + goto sp_loop; > + } Can you rewrite that without goto? > +tput_loop: > if (atomic_dec_and_test(&tw->tw_refcnt)) { > -#ifdef INET_REFCNT_DEBUG > - printk(KERN_DEBUG "tw_bucket %p released\n", tw); > -#endif > - kmem_cache_free(tcp_timewait_cachep, tw); > + /* Restore ref count and schedule callback. > + * If we don't restore ref count, then the callback can be > + * scheduled by more than one CPU. > + */ > + > + atomic_inc(&tw->tw_refcnt); > + > + if (atomic_read(&tw->tw_refcnt) == 1) > + call_rcu(&tw->tw_rcu, tcp_tw_free); > + else > + goto tput_loop; And that too. -Andi From akpm@osdl.org Tue Aug 31 08:21:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 08:21:39 -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 i7VFLWh5025264 for ; Tue, 31 Aug 2004 08:21:32 -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 i7VFLI122513 for ; Tue, 31 Aug 2004 08:21:18 -0700 Date: Tue, 31 Aug 2004 08:19:30 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [Bugme-new] [Bug 3318] New: TC crashes my Kernel 2.6.8.1, but do not crash my kernel 2.6.7!!! Message-Id: <20040831081930.3d9edc17.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: 8266 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: 8596 Lines: 169 Begin forwarded message: Date: Tue, 31 Aug 2004 06:41:48 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3318] New: TC crashes my Kernel 2.6.8.1, but do not crash my kernel 2.6.7!!! http://bugme.osdl.org/show_bug.cgi?id=3318 Summary: TC crashes my Kernel 2.6.8.1, but do not crash my kernel 2.6.7!!! Kernel Version: 2.6.8.1 Status: NEW Severity: blocking Owner: acme@conectiva.com.br Submitter: bluelightning.other.stuff@mantech.ro Distribution: Mandrake 10 & Debian 3 r2 Hardware Environment: AMD K7 Duron 900Mhz or AMD K7 XP 1500+ Software Environment: iproute2-2.4.7-now-ss020116-try.tar.bz2 iproute2-2.6.8-040823.tar.gz iproute2-2.6.9-jamal.tgz Problem Description: when i try to asign classes and u32 filter with htb with tc, my kernel crashes. It gives my this messege: Aug 31 11:43:45 localhost kernel: c0260150 Aug 31 11:43:45 localhost kernel: PREEMPT Aug 31 11:43:45 localhost kernel: Modules linked in: sch_htb nfsd exportfs lockd sunrpc md5 ipv6 snd_via82xx snd_ac97_codec snd_pcm snd_timer snd_page_alloc snd _mpu401_uart snd_rawmidi snd soundcore ip_gre ide_cd cdrom 8139too ne2k_pci 8390 crc32 nls_iso8859_1 nls_cp850 vfat fat supermount md via_agp uhci_hcd usbcore r eiserfs Aug 31 11:43:45 localhost kernel: CPU: 0 Aug 31 11:43:45 localhost kernel: EIP: 0060:[gen_new_kid+32/80] Not tainte d Aug 31 11:43:45 localhost kernel: EIP: 0060:[] Not tainted Aug 31 11:43:45 localhost kernel: EFLAGS: 00010206 (2.6.8.1) Aug 31 11:43:45 localhost kernel: eax: 00000803 ebx: 80000000 ecx: 00000803 edx: 000003e8 Aug 31 11:43:45 localhost kernel: esi: c6769e60 edi: 00000000 ebp: c6769c40 esp: c586dbb4 Aug 31 11:43:45 localhost kernel: ds: 007b es: 007b ss: 0068 Aug 31 11:43:45 localhost kernel: Process tc (pid: 7034, threadinfo=c586c000 tas k=c847ec90) Aug 31 11:43:45 localhost kernel: Stack: c65f9520 c02606b6 c6769c40 80000000 c9c 1b830 0000003c 00000001 00000001 Aug 31 11:43:45 localhost kernel: 00000013 00000013 00000013 c9c1b830 000 00000 00000000 00000000 c9c1b838 Aug 31 11:43:45 localhost kernel: 00000000 00000000 00000000 00000000 000 01000 c98e4aa4 00000000 c65f9520 Aug 31 11:43:45 localhost kernel: Call Trace: Aug 31 11:43:45 localhost kernel: [u32_change+598/1104] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [tc_ctl_tfilter+957/1552] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [rtnetlink_rcv+808/912] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [netlink_dump+177/560] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [netlink_data_ready+90/112] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [netlink_sendskb+140/192] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [netlink_sendmsg+534/768] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [sock_sendmsg+183/272] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [sock_sendmsg+183/272] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [verify_iovec+60/160] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [sys_sendmsg+415/576] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [do_no_page+111/880] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [handle_mm_fault+360/512] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [do_page_fault+425/1471] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [update_process_times+70/96] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [update_wall_time+11/64] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [rcu_check_quiescent_state+117/144] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [copy_from_user+66/112] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [sys_socketcall+137/608] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: [sysenter_past_esp+82/113] Aug 31 11:43:45 localhost kernel: [] Aug 31 11:43:45 localhost kernel: Code: 8b 42 04 8b 12 25 ff 0f 00 00 39 c1 0f 4 2 c8 85 d2 75 ed 41 Steps to reproduce: This is a part of my script that i use to create the traffic shapping: #!/bin/sh echo -en "\033[1;39m" DEV=eth2 TC="/usr/sbin/tc" #TC="/home/Kitts/iproute2/iproute2/tc/tc" U32="$TC filter add dev $DEV protocol ip parent 1:0 prio 1 u32" echo echo -e "HTB Script-create \033[1;35mV3.0\033[1;39m for\033[1;32m outgoing\033[1;39m trafic on device\033[1;34m $DEV\033[1;39m" echo "Del prev root" $TC qdisc del dev $DEV root echo "Add new root class - handle 1:" $TC qdisc add dev $DEV root handle 1: htb default 15 echo "|-Add LAN band (this is o root class!) - classid 1:1, parent 1:" $TC class add dev $DEV parent 1: classid 1:1 htb rate 100Mbit ceil 100Mbit burst 32k quantum 1536 $TC class add dev $DEV parent 1:1 classid 1:0x20 htb rate 24Mbit ceil 100Mbit burst 32k quantum 1536 echo -e "| |-Add FROM\033[1;32m LAN 80.97.163.0/28\033[1;39m TO\033[1;32m other LANs\033[1;39m class band - classid 1:0x20, parent 1:1" $U32 match ip src 80.97.163.0/28 match ip dst 80.97.163.0/28 flowid 1:0x20 $U32 match ip src 80.97.163.0/28 match ip dst 192.168.0.0/24 flowid 1:0x20 $U32 match ip src 80.97.163.0/28 match ip dst 172.16.0.0/28 flowid 1:0x20 $U32 match ip src 80.97.163.0/28 match ip dst 172.16.1.0/24 flowid 1:0x20 $U32 match ip src 80.97.163.0/28 match ip dst 192.168.1.0/24 flowid 1:0x20 $U32 match ip src 80.97.163.0/28 match ip dst 255.255.255.255/32 flowid 1:0x20 $TC qdisc add dev $DEV parent 1:0x20 handle 0x20: pfifo $TC class add dev $DEV parent 1:1 classid 1:0x21 htb rate 24Mbit ceil 100Mbit burst 32k quantum 1536 echo -e "| |-Add FROM\033[1;32m LAN 192.168.0.0/24\033[1;39m TO\033[1;32m other LANs\033[1;39m class band - classid 1:0x21, parent 1:1" $U32 match ip src 192.168.0.0/24 match ip dst 192.168.0.0/24 flowid 1:0x21 $U32 match ip src 192.168.0.0/24 match ip dst 192.168.1.0/24 flowid 1:0x21 $U32 match ip src 192.168.0.0/24 match ip dst 80.97.163.0/28 flowid 1:0x21 $U32 match ip src 192.168.0.0/24 match ip dst 172.16.0.0/28 flowid 1:0x21 $U32 match ip src 192.168.0.0/24 match ip dst 172.16.1.0/24 flowid 1:0x21 $U32 match ip src 192.168.0.0/24 match ip dst 255.255.255.255/32 flowid 1:0x21 $TC qdisc add dev $DEV parent 1:0x21 handle 0x21: pfifo $TC class add dev $DEV parent 1:1 classid 1:0x22 htb rate 24Mbit ceil 100Mbit burst 32k quantum 1536 echo -e "| |-Add FROM\033[1;32m LAN 172.16.0.0/28\033[1;39m TO\033[1;32m other LANs\033[1;39m class band - classid 1:0x22, parent 1:1" $U32 match ip src 172.16.0.0/28 match ip dst 172.16.0.0/28 flowid 1:0x22 $U32 match ip src 172.16.0.0/28 match ip dst 172.16.1.0/24 flowid 1:0x22 $U32 match ip src 172.16.0.0/28 match ip dst 80.97.163.0/28 flowid 1:0x22 $U32 match ip src 172.16.0.0/28 match ip dst 192.168.0.0/24 flowid 1:0x22 $U32 match ip src 172.16.0.0/28 match ip dst 192.168.1.0/24 flowid 1:0x22 $U32 match ip src 172.16.0.0/28 match ip dst 255.255.255.255/32 flowid 1:0x22 $TC qdisc add dev $DEV parent 1:0x22 handle 0x22: pfifo $TC class add dev $DEV parent 1:1 classid 1:0x23 htb rate 24Mbit ceil 100Mbit burst 32k quantum 1536 echo -e "| |-Add FROM\033[1;32m LAN 172.16.100.0/30\033[1;39m TO\033[1;32m other LANs\033[1;39m class band - classid 1:0x23, parent 1:1" $U32 match ip src 172.16.100.0/30 match ip dst 172.16.100.0/30 flowid 1:0x23 $U32 match ip src 172.16.100.0/30 match ip dst 255.255.255.255/32 flowid 1:0x23 $TC qdisc add dev $DEV parent 1:0x23 handle 0x23: pfifo I've tried on 2 sistems and 2 OS-es. The tc works very fine on kernel 2.6.7!!! Same script, same tc!!! TC="/home/Kitts/iproute2/iproute2/tc/tc" -> is the tc version ss020116, i use this path because i do not want to install over my current iproute2 version ss040823 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From ramalhais@serrado.net Tue Aug 31 08:33:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 08:34:05 -0700 (PDT) Received: from asterix.uninova.pt (asterix.uninova.pt [193.137.127.65]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7VFXvjO026173 for ; Tue, 31 Aug 2004 08:33:57 -0700 Received: (qmail 19279 invoked from network); 31 Aug 2004 15:33:47 -0000 Received: from a81-84-126-2.netcabo.pt (HELO ?192.168.1.239?) (81.84.126.2) by asterix.uninova.pt with SMTP; 31 Aug 2004 15:33:47 -0000 Subject: Re: Updated WE-18 (WPA) proposal From: Pedro Ramalhais To: "Luis R. Rodriguez" Cc: Jeff Garzik , "Luis R. Rodriguez" , jt@hpl.hp.com, Jouni Malinen , netdev@oss.sgi.com, hostap@shmoo.com In-Reply-To: <20040831085458.GD31207@ruslug.rutgers.edu> References: <20040830045441.GA7415@jm.kir.nu> <20040830165026.GD29492@bougret.hpl.hp.com> <413363CB.7060807@pobox.com> <20040830174215.GA32132@bougret.hpl.hp.com> <41336A28.9010608@pobox.com> <20040830220105.GY22126@ruslug.rutgers.edu> <4133A811.1010009@pobox.com> <20040831085458.GD31207@ruslug.rutgers.edu> Content-Type: text/plain Message-Id: <1093966225.1464.9.camel@rootix> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 31 Aug 2004 16:33:47 +0100 Content-Transfer-Encoding: 7bit X-archive-position: 8267 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ramalhais@serrado.net Precedence: bulk X-list: netdev Content-Length: 2363 Lines: 61 On Tue, 2004-08-31 at 09:54, Luis R. Rodriguez wrote: > On Mon, Aug 30, 2004 at 06:20:01PM -0400, Jeff Garzik wrote: > > Luis R. Rodriguez wrote: > > >On Mon, Aug 30, 2004 at 01:55:52PM -0400, Jeff Garzik wrote: > > > > > >>Jean Tourrilhes wrote: > > > > > > > > ><-- snip --> > > > > > >>> Also, I'm not clear how the stuff in wireless-2.6 is supposed > > >>>to trickle into the other trees (netdev-2.6, -mm and Linus's), and how > > >>>to better link it with the CVS of the various drivers involved. > > >> > > >>Less of a trickle than a flood: wireless-2.6 should be the target for > > >>development of shared wireless stack code. As several drivers are > > >>currently using bits of HostAP, for example, wireless-2.6 should be a > > >>focal point for patches that modify these drivers to instead share the > > >>same code. > > >> > > >>Once this generic work is done, it would get pushed all at once to > > >>netdev-2.6, where it would receive testing in -mm. Then, later, pushed > > >>to mainline. > > >> > > >> Jeff > > > > > > > > >Beides wpa_supplicant from hostap code (which is actually going into > > >WE18) what other code re-use is on the roadmap as of yet for wireless-2.6? > > > > Intel Centrino driver is re-using chunks of HostAP, and I'm looking at > > doing so for the RealTek 8180 driver I am about to publish. > > Can someone elaborate on what "chunks" the centrino driver is using > from hostap? > > Jeff what aspects are you looking to re-use from hostap? > > I guess we at prism54 should also see what we can re-use too then. > Our next driver (a softmac driver) will have a lot more code since the > MAC will need to be implemented on the driver side -- I'm not yet sure > of the exact details as I haven't grep'd through the available code yet > I'm wondering though -- are there any other softmac drivers out there, > or to come soon? > > Luis The ipw2100 driver and ipw2200 driver both use these parts of hostap code: RX code (i think now it's in file hostap_80211_rx.c) little parts of the TX code (hostap_80211_tx.c) the hostap_crypt* code for WEP. Some IEEE802.11 related parts of header files. The ipw2100 is beggining to use hostap_crypt_tkip and hostap_crypt_ccmp for WPA and WPA2. I think that's it. Better ask James Ketrenos, he is one of the developers at intel. -- Pedro Ramalhais From vkondra@mail.ru Tue Aug 31 08:49:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 08:49:39 -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 i7VFnXih027149 for ; Tue, 31 Aug 2004 08:49:33 -0700 Received: from [212.179.200.204] (port=50020 helo=[192.168.10.2]) by mx2.mail.ru with esmtp id 1C2Ask-000BMI-00; Tue, 31 Aug 2004 19:49:17 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: Re: Updated WE-18 (WPA) proposal Date: Tue, 31 Aug 2004 18:48:48 +0300 User-Agent: KMail/1.7 Cc: Pedro Ramalhais , "Luis R. Rodriguez" , Jeff Garzik , jt@hpl.hp.com, Jouni Malinen , hostap@shmoo.com References: <20040830045441.GA7415@jm.kir.nu> <20040831085458.GD31207@ruslug.rutgers.edu> <1093966225.1464.9.camel@rootix> In-Reply-To: <1093966225.1464.9.camel@rootix> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1097049.0dEAopxo3L"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408311848.55628.vkondra@mail.ru> X-Spam: Probable Spam X-archive-position: 8268 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 Content-Length: 2430 Lines: 68 --nextPart1097049.0dEAopxo3L Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 31 August 2004 18:33, Pedro Ramalhais wrote: PR> > > Intel Centrino driver is re-using chunks of HostAP, and I'm looking at PR> > > doing so for the RealTek 8180 driver I am about to publish. PR> > PR> > Can someone elaborate on what "chunks" the centrino driver is using PR> > from hostap? PR> > PR> > Jeff what aspects are you looking to re-use from hostap? PR> > PR> > I guess we at prism54 should also see what we can re-use too then. PR> > Our next driver (a softmac driver) will have a lot more code since the PR> > MAC will need to be implemented on the driver side -- I'm not yet sure PR> > of the exact details as I haven't grep'd through the available code y= et PR> > I'm wondering though -- are there any other softmac drivers out there, PR> > or to come soon? PR> > PR> > Luis PR> PR> The ipw2100 driver and ipw2200 driver both use these parts of hostap PR> code: PR> RX code (i think now it's in file hostap_80211_rx.c) PR> little parts of the TX code (hostap_80211_tx.c) PR> the hostap_crypt* code for WEP. PR> Some IEEE802.11 related parts of header files. PR> The ipw2100 is beggining to use hostap_crypt_tkip and hostap_crypt_ccmp PR> for WPA and WPA2. PR> PR> I think that's it. Better ask James Ketrenos, he is one of the PR> developers at intel. Luis, please correct me if I'm wrong. It seems to me that softmac drivers will ne= ed=20 significant changes relative to the model that HostAP employ. Also, many=20 changes dictated by QoS (TGe), if one want to really implement it. Will you= r=20 product support TGe? May be, we need to do design for generic "softmac" that will be then used w= ith=20 different PHY's. Question is, whether we can formally describe boundary=20 between softmac and PHY. I am interesting in joining this "softmac" development, as I will do some=20 other .11 card which is "softmac". Can't reveal details yet, but we may=20 discuss softmac issues without disclosing private info (I don't want to los= e=20 my job). Vladimir. --nextPart1097049.0dEAopxo3L Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBBNJ3nqxdj7mhC6o0RAvDDAKCRVT+zjNIJ8HNXu0ki/3OyLYke7gCePtm3 iffIl4s2WbJkiqD/jKTZSC4= =df+R -----END PGP SIGNATURE----- --nextPart1097049.0dEAopxo3L-- From pablo@eurodev.net Tue Aug 31 09:37:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 09:37:41 -0700 (PDT) Received: from smtp08.retemail.es (smtp08.auna.com [62.81.186.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VGbWdM028411 for ; Tue, 31 Aug 2004 09:37:33 -0700 Received: from eurodev.net ([217.216.70.61]) by smtp08.retemail.es (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20040831163717.YLPG26792.smtp08.retemail.es@eurodev.net>; Tue, 31 Aug 2004 18:37:17 +0200 Message-ID: <4134A961.20808@eurodev.net> Date: Tue, 31 Aug 2004 18:37:53 +0200 From: Pablo Neira User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.6) Gecko/20040528 Debian/1.6-7 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Improve behaviour of Netlink Sockets References: <412DF807.2040703@eurodev.net> <20040826141407.38b56729.davem@redhat.com> <412EB40A.6010100@eurodev.net> <20040826214710.5e322f1a.davem@redhat.com> <412F1269.8090303@eurodev.net> <20040827172736.543dbd54.davem@redhat.com> <413276D9.9080303@eurodev.net> <20040830172029.164fcf9c.davem@redhat.com> In-Reply-To: <20040830172029.164fcf9c.davem@redhat.com> Content-Type: multipart/mixed; boundary="------------040606080103020605090003" X-archive-position: 8269 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pablo@eurodev.net Precedence: bulk X-list: netdev Content-Length: 4946 Lines: 215 This is a multi-part message in MIME format. --------------040606080103020605090003 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Davem, David S. Miller wrote: >On Mon, 30 Aug 2004 02:37:45 +0200 >Pablo Neira wrote: > > > >>Attached the 2.4.x version. It just spawns one kernel thread called >>netlink, is it ok? >> >> > >It's fine, I'm going to make 2 minor fixes: > >1) Mark netlink_thread() function static. >2) Name the thread "knetlinkd" to be consistent with > other kernel thread names. > > Attached the version which correct these issues. regards, Pablo --------------040606080103020605090003 Content-Type: text/x-patch; name="netlink-tqueue.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="netlink-tqueue.patch" --- a/net/netlink/af_netlink.c 2004-08-28 05:35:35.000000000 +0200 +++ b/net/netlink/af_netlink.c 2004-08-29 16:00:46.000000000 +0200 @@ -42,6 +42,7 @@ #include #include #include +#include #define Nprintk(a...) @@ -63,6 +64,15 @@ void (*data_ready)(struct sock *sk, int bytes); }; +struct netlink_work +{ + struct sock *sk; + int len; + struct tq_struct work; +}; + +static DECLARE_TASK_QUEUE(tq_netlink); +static DECLARE_WAIT_QUEUE_HEAD(netlink_thread_wait); static struct sock *nl_table[MAX_LINKS]; static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait); static unsigned nl_nonroot[MAX_LINKS]; @@ -81,6 +91,15 @@ static struct notifier_block *netlink_chain; +static void netlink_tq_handler(void *data) +{ + struct netlink_work *work = data; + + work->sk->data_ready(work->sk, work->len); + sock_put(work->sk); + kfree(work); +} + static void netlink_sock_destruct(struct sock *sk) { skb_queue_purge(&sk->receive_queue); @@ -437,6 +456,8 @@ if (atomic_read(&sk->rmem_alloc) > sk->rcvbuf || test_bit(0, &sk->protinfo.af_netlink->state)) { + struct task_struct *client; + if (!timeo) { if (ssk->protinfo.af_netlink->pid == 0) netlink_overrun(sk); @@ -445,6 +466,19 @@ return -EAGAIN; } + if (!sk->protinfo.af_netlink->pid) { + /* Kernel is sending information to user space + * and socket buffer is full: Wake up user */ + + client = find_task_by_pid(sk->protinfo.af_netlink->pid); + if (!client) { + sock_put(sk); + kfree_skb(skb); + return -EAGAIN; + } + wake_up_process(client); + } + __set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&sk->protinfo.af_netlink->wait, &wait); @@ -467,8 +501,26 @@ skb_orphan(skb); skb_set_owner_r(skb, sk); skb_queue_tail(&sk->receive_queue, skb); - sk->data_ready(sk, len); - sock_put(sk); + + if (!sk->protinfo.af_netlink->pid) { + struct netlink_work *nlwork = + kmalloc(sizeof(struct netlink_work), GFP_KERNEL); + + if (!nlwork) { + sock_put(sk); + return -EAGAIN; + } + + INIT_TQUEUE(&nlwork->work, netlink_tq_handler, nlwork); + nlwork->sk = sk; + nlwork->len = len; + queue_task(&nlwork->work, &tq_netlink); + wake_up(&netlink_thread_wait); + } else { + sk->data_ready(sk, len); + sock_put(sk); + } + return len; no_dst: @@ -490,7 +542,22 @@ skb_orphan(skb); skb_set_owner_r(skb, sk); skb_queue_tail(&sk->receive_queue, skb); - sk->data_ready(sk, skb->len); + + if (!sk->protinfo.af_netlink->pid) { + struct netlink_work *nlwork = + kmalloc(sizeof(struct netlink_work), GFP_KERNEL); + + if (!nlwork) + return -EAGAIN; + + INIT_TQUEUE(&nlwork->work, netlink_tq_handler, nlwork); + nlwork->sk = sk; + nlwork->len = skb->len; + queue_task(&nlwork->work, &tq_netlink); + wake_up(&netlink_thread_wait); + } else + sk->data_ready(sk, skb->len); + return 0; } return -1; @@ -534,11 +601,12 @@ netlink_overrun(sk); /* Clone failed. Notify ALL listeners. */ failure = 1; + sock_put(sk); } else if (netlink_broadcast_deliver(sk, skb2)) { netlink_overrun(sk); + sock_put(sk); } else skb2 = NULL; - sock_put(sk); } netlink_unlock_table(); @@ -868,6 +936,26 @@ netlink_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); } +static int netlink_thread(void *unused) +{ + struct task_struct *tsk = current; + DECLARE_WAITQUEUE(wait, tsk); + + daemonize(); + strcpy(tsk->comm, "knetlinkd"); + sigfillset(&tsk->blocked); + mb(); + + for (;;) { + run_task_queue(&tq_netlink); + + __set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&netlink_thread_wait, &wait); + schedule(); + __set_current_state(TASK_RUNNING); + remove_wait_queue(&netlink_thread_wait, &wait); + } +} #ifdef NL_EMULATE_DEV @@ -1027,6 +1115,8 @@ #ifdef CONFIG_PROC_FS create_proc_read_entry("net/netlink", 0, 0, netlink_read_proc, NULL); #endif + kernel_thread(netlink_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL); + return 0; } --------------040606080103020605090003-- From tommy@mpenc1.prognet.com Tue Aug 31 10:41:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 10:41:20 -0700 (PDT) Received: from mpenc1.prognet.com (mpenc1.prognet.com [207.188.30.29]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VHfBxn029683 for ; Tue, 31 Aug 2004 10:41:13 -0700 Received: from tommy by mpenc1.prognet.com with local (Exim 4.34) id 1C2Cct-0005ju-VZ for netdev@oss.sgi.com; Tue, 31 Aug 2004 10:41:00 -0700 Date: Tue, 31 Aug 2004 10:40:59 -0700 From: Tom Marshall To: netdev@oss.sgi.com Subject: 2.6.9-rc1: panic in ipv6_rcv Message-ID: <20040831174059.GA22049@home.tig-grr.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 8270 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tommy@home.tig-grr.com Precedence: bulk X-list: netdev Content-Length: 2620 Lines: 72 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please reply to me directly, I am not subscribed] I booted 2.6.9-rc1 (gcc version 3.4.1 (Debian 3.4.1-4sarge1)) and got this panic within a couple minutes. The machine is a bridge with two eepro100 cards and no active ebtables or iptables rules. If this is worth checking into, I can provide more info and/or run any tests that are appropriate. CPU: 0 = =20 EIP: 0060:[] Not tainted VLI = =20 EFLAGS: 00010202 (2.6.9-rc1) EIP is at ip6_route_input+0x1ae/0x2e0 [ipv6] eax: 00000000 ebx: 00000004 ecx: c9921d38 edx: c9921c60 esi: c9921c60 edi: 00000000 ebp: 00000000 esp: c031deac ds: 007b es: 007b ss: 0060 Process swapper (pid: 0, threadinfo=3Dc031c000 task=3Dc02aca40) Stack: c9921d38 c7fdbc38 c7fdbc20 00000000 c7b80000 80000000 00000003 c60= c1140 c60c1140 c7b80000 c0357fa8 c98ef810 c60c1140 c60c1140 00000000 000= 00000 c0357ua8 c7b8007b 0000007b c0357f98 c60c1140 c9921fc0 c022e7dd c60= c1140 Call Trace: [] ipv6_rcv+0x250/0x270 [ipv6] [] netif_receive_skb+0x1ed/0x220 [] process_backlog+0x7f/0x100 [] net_rx_action+0x6a/0xf0 [] __do_softirq+0x41/0x90 [] do_softirq+0x27/0x30 [] do_IRQ+0x10d/0x130 [] common_interrupt+0x18/0x20 [] igmpv3_del_delrec+0xab/0xc0 [] default_idle+0x23/0x40 [] cpu_idle+0x2d/0x40 [] start_kernel=3D0x163/0x180 [] unknown_bootoption+0x0/0x170=20 Code: 8d b6 00 00 00 00 8d bc 27 00 00 00 00 8b 12 85 d2 74 27 8b 42 10 3= 9 58 34 0f 84 fe 00 00 00 f6 40 54 08 74 e8 8b 82 88 00 00 00 <8b> 00 39 58 34 7= 5 c2 89 d7 8b 12 85 d2 75 d9 85 ff 89 fb 75 0f <0>Kernel panic - not syncing: Fatal exception in interrupt --=20 You know the great thing about TV? If something important happens anywhere at all in the world, no matter what time of the day or night, you can always change the channel. -- Jim Ignatowski --envbJBWh7q8WU6mo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAkE0uCsACgkQFMm9uvwPXW5mSACgko+gug5ETRB9G74JevRuu9M1 wqkAoI1tHYN+WuWKJ3umV4NcskilbYXj =0FAi -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo-- From shemminger@osdl.org Tue Aug 31 10:59:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 11:00: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 i7VHxuvx030455 for ; Tue, 31 Aug 2004 10:59:56 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i7VHxU122650; Tue, 31 Aug 2004 10:59:30 -0700 Date: Tue, 31 Aug 2004 10:59:30 -0700 From: Stephen Hemminger To: hadi@znyx.com, "David S. Miller" Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: [announce] new iproute2 snapshot Message-Id: <20040831105930.6766ddc1@dell_ss3.pdx.osdl.net> In-Reply-To: <1093918395.1043.57.camel@jzny.localdomain> References: <1093796043.1077.386.camel@jzny.localdomain> <1093796588.1073.398.camel@jzny.localdomain> <20040830151234.6103757b@dell_ss3.pdx.osdl.net> <1093904731.1036.17.camel@jzny.localdomain> <20040830153723.05645bcf@dell_ss3.pdx.osdl.net> <1093918395.1043.57.camel@jzny.localdomain> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i386-redhat-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8271 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: 418 Lines: 13 A new version of iproute2 utilities is available: http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.9-ss040831.tar.gz This version includes: * support for the latest version on netem For more info on netem, see: http://developer.osdl.org/shemminger/netem * jamal's changes for tc actions and more tc_stats * several other small cleanup patches I'll make a final version after 2.6.9 is released. From hadi@cyberus.ca Tue Aug 31 11:09:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 11:09: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 i7VI9Scg030897 for ; Tue, 31 Aug 2004 11:09:29 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1C2D4J-0000jq-Lk for netdev@oss.sgi.com; Tue, 31 Aug 2004 14:09:19 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1C2D4G-0007Jf-Rb; Tue, 31 Aug 2004 14:09:16 -0400 Subject: Re: RFC/PATCH capture qdisc requeue event in stats From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com, shemminger@osdl.org In-Reply-To: <20040830212910.78047bcd.davem@davemloft.net> References: <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> <20040830154430.769d1d59.davem@redhat.com> <1093906592.1037.32.camel@jzny.localdomain> <20040830160052.548c4846.davem@redhat.com> <1093916592.1037.51.camel@jzny.localdomain> <20040830191716.0d002f91.davem@redhat.com> <1093919823.1043.80.camel@jzny.localdomain> <20040830212910.78047bcd.davem@davemloft.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1093975753.1052.14.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 31 Aug 2004 14:09:13 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 8272 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: 1196 Lines: 38 On Tue, 2004-08-31 at 00:29, David S. Miller wrote: > On 30 Aug 2004 22:37:03 -0400 > jamal wrote: > > > thmart. Lets go with this then. Steve, do you wanna take it from here > > with the iproute2 patch i sent or you want me to generate a new one? Now > > how do we tell all other people who have written netlink apps > > to beware? > > Yeah, how are you going to "tell those other people"? And how > are you going to get every user to know to upgrade all of those > apps when they try to use a kernel with your patch applied? Again, thats not an issue. new kernel. old app should work Challenge is old kernel, new app. > Look, let's get real about this topic. We can't be breaking shit > like this all the time. We're nearly letting it happen a lot > lately. Agreed. > These data structures are user visible APIs, they are just like > system call data structures, and if we cannot modify > them without potentially breaking some existing application we > cannot make that change. > > So please find another way to add make this statistic visible to > userspace Jamal. Thanks a lot. Well, Franks A Lot(TM) Dave ;-> Let me rethink - I will be back. cheers, jamal From vda@port.imtp.ilyichevsk.odessa.ua Tue Aug 31 11:13:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 11:13:49 -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 i7VIBjWk031232 for ; Tue, 31 Aug 2004 11:13:12 -0700 Received: (qmail 21543 invoked by alias); 31 Aug 2004 18:11:11 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 31 Aug 2004 18:11:11 -0000 From: Denis Vlasenko To: Jean Tourrilhes , Jouni Malinen , jgarzik@pobox.com Subject: [RFC] acx100 inclusion in mainline; generic 802.11 stack Date: Tue, 31 Aug 2004 21:11:02 +0300 User-Agent: KMail/1.5.4 Cc: acx100-devel@lists.sourceforge.net, netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 8273 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: 923 Lines: 25 Hi all, It looks like acx100 approaches state when we can consider it's inclusion into mainline kernel. Some background information: acx100 and acx111 hardware is a bit like Atheros and possibly prism54 "softmac": it handles mostly low-level rx/tx stuff, leaving 802.11 stack implementation up to OS (which is good. To have largish potentially buggy binary-only firmware to cope with is a nightmare). I think what acx100 devel is working on can be best described as "yet another 802.11 stack implementation". This is not ok. I think we definitely need generic 802.11 stack, with individual drivers providing only needed callbacks, just like it is done for wired eth drivers. I think 'senior' network guys are in position to decide upon which of currently available 802.11 stacks we should continue to work. (Atheros has one, said to be derived from BSD, is there any others?) Give us some guidance please... -- vda From jgarzik@pobox.com Tue Aug 31 11:22:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 11:22: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 i7VIM4G4031786 for ; Tue, 31 Aug 2004 11:22: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 1C2DGH-0006fr-HT; Tue, 31 Aug 2004 19:21:41 +0100 Message-ID: <4134C1A7.50600@pobox.com> Date: Tue, 31 Aug 2004 14:21:27 -0400 From: Jeff Garzik 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: Denis Vlasenko CC: Jean Tourrilhes , Jouni Malinen , acx100-devel@lists.sourceforge.net, netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [RFC] acx100 inclusion in mainline; generic 802.11 stack References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8274 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: 523 Lines: 15 Denis Vlasenko wrote: > I think 'senior' network guys are in position to decide upon which > of currently available 802.11 stacks we should continue to work. > (Atheros has one, said to be derived from BSD, is there any others?) Already have. Start with the code in wireless-2.6 -- HostAP -- and use DaveM's 802.11 stack template as a model for actually integrating 802.11 very tightly with the rest of the net stack. http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/davem-p80211.tar.bz2 Jeff From bdschuym@pandora.be Tue Aug 31 11:28:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 11:28:06 -0700 (PDT) Received: from kelmis.telenet-ops.be (kelmis.telenet-ops.be [195.130.132.60]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7VIRxJt032237 for ; Tue, 31 Aug 2004 11:28:00 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by kelmis.telenet-ops.be (Postfix) with SMTP id DC71037E59; Tue, 31 Aug 2004 20:27:50 +0200 (MEST) Received: from 192.168.0.138 (D5763CED.kabel.telenet.be [213.118.60.237]) by kelmis.telenet-ops.be (Postfix) with ESMTP id 94F9537E71; Tue, 31 Aug 2004 20:27:50 +0200 (MEST) From: Bart De Schuymer To: "David S.Miller" Subject: Re: [PATCH, RFC] Add bridged IPv6 packet filtering Date: Tue, 31 Aug 2004 20:28:42 +0200 User-Agent: KMail/1.5 Cc: netdev , netfilter-devel References: <200408281713.29192.bdschuym@pandora.be> In-Reply-To: <200408281713.29192.bdschuym@pandora.be> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408312028.42742.bdschuym@pandora.be> X-archive-position: 8275 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bdschuym@pandora.be Precedence: bulk X-list: netdev Content-Length: 1877 Lines: 52 On Saturday 28 August 2004 17:13, Bart De Schuymer wrote: Hi, How should I proceed to get any response in this matter? Should I be contacting someone else? I'm no authority on IPv6, so I would like an informed opinion... Mapping the IPv6 hooks onto the bridge hooks was really easy, because there is no NAT stuff to mess things up. This is not a complicated patch. Also, if the bridge-nf code causes a malfunction in ip6tables, this can be undone by simply setting /proc/sys/net/bridge/bridge-nf-call-ip6tables 0 untill a solution is available. cheers, Bart > Hello, > > The patch below adds bridged IPv6 packet filtering. > > One thing I was unclear of what to do: before giving an IPv6 packet to > ip6tables the IPv6 sanity checks are done (copied from ipv6_rcv()). > These checks include this code snippet: > > if (hdr->nexthdr == NEXTHDR_HOP) { > skb->h.raw = (u8*)(hdr+1); > if (ipv6_parse_hopopts(skb, offsetof(struct ipv6hdr, nexthdr)) < 0) { > IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); > return 0; > } > hdr = skb->nh.ipv6h; > } > > If it's necessary to call ipv6_parse_hopopts() then this function will need > to be exported. Note that we only need ip6tables to behave correctly. So, > is this function call needed to let ip6tables behave properly? > Also, what happens if skb->h.raw = (u8*)(hdr+1); is executed once > inside the bridge-nf code and later all the IPv6 checks are done again > in ipv6_rcv() ? This can happen if the IPv6 packet is destined for the > bridge box or if it's used as a router too. > > In short, I'd like to know which IPv6 sanity checks are absolutely > necessary for ip6tables and if there are any implications if those checks > are done twice. > > This patch has been tested by Scott MacKay . > > cheers, > Bart > > --- linux-2.6.8.1/include/linux/netfilter_ipv6.h.old Sun Aug 22 18:49:47 From akpm@osdl.org Tue Aug 31 11:54:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 11:54:49 -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 i7VIsh3t000424 for ; Tue, 31 Aug 2004 11:54:43 -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 i7VIsT101651 for ; Tue, 31 Aug 2004 11:54:29 -0700 Date: Tue, 31 Aug 2004 11:52:41 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [Bugme-new] [Bug 3320] New: 2.6 kernel trigger happy to load ipv6 module Message-Id: <20040831115241.1cc516d3.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: 8276 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: 2979 Lines: 59 Begin forwarded message: Date: Tue, 31 Aug 2004 09:07:28 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3320] New: 2.6 kernel trigger happy to load ipv6 module http://bugme.osdl.org/show_bug.cgi?id=3320 Summary: 2.6 kernel trigger happy to load ipv6 module Kernel Version: 2.6.8.1 Status: NEW Severity: normal Owner: other_modules@kernel-bugs.osdl.org Submitter: alex@milivojevic.org Distribution: Fedora Core 2 Hardware Environment: i386 Software Environment: kernel-2.6.8.1 modutils-2.4.26-16 Problem Description: Seems that triggering of automatic module loading has changed since 2.4 kernels. ipv6 module gets automatically loaded even in situations when it isn't really needed. It seems that ipv6 module will get loaded as soon as IPv6 aware application binds a port (most of standard daemons with standard configurations in most (all? some?) distributions). I haven't checked if IPv6 aware client application will trigger autoloading of ipv6 module. This is very different behaviour than in 2.4 that never autoloads ipv6 module (scripts in /etc/sysconfig/network-scripts were supposed to load it manually if IPv6 was to be configured on the box). Because of this, all network interfaces get autoconfigured IPv6 addresses even when user doesn't want/need them (link local for Ethernet interfaces, and loopback gets ::1). I've noticed this first on Fedora Core 1 after I upgraded kernel from 2.4 series to 2.6 series (I believe it was either one of 2.6.0-rc or maybe final 2.6.0, not sure). At first I tought it was a problem with network initialization scripts in /etc/sysconfig/network-scripts. However, after I reinvestigated the problem (now in Fedora Core 2 with 2.6.5 up to 2.6.8.1), I found that it is triggered by 2.6 kernel. For some people this might present security issue. Most firewall configurations are not written with IPv6 in mind. Depending of firewall/services configuration on particular host this can open new vector of attack for malicious user. An example would be if firewall rules prevent IPv4 access to (potentially with security flaw and still unpatched) service on WAN and loopback interfaces, but allow access from LAN. If attacker gains "regular" user access to the machine, he can exploit flaw in the service by connecting to it using IPv6 over loopback. Somebody with more imagination than me could probably find more dangeraous vector. I don't know much about IPv6, so I don't know if and how automatically assigned link local addresses could be used to bypass IPv4-only firewall from WAN/LAN. Steps to reproduce: No steps needed (at least on Fedora Core with 2.6 kernel). Just run lsmod or ifconfig, and you'll see that ipv6 is loaded, and IPv6 addresses automatically assigned to interfaces. ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From vkondra@mail.ru Tue Aug 31 12:15:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 12:15:26 -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 i7VJFJcA001090 for ; Tue, 31 Aug 2004 12:15:20 -0700 Received: from [212.179.200.204] (port=48396 helo=[192.168.10.2]) by mx2.mail.ru with esmtp id 1C2E5y-0002ZQ-00; Tue, 31 Aug 2004 23:15:08 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: Re: [RFC] acx100 inclusion in mainline; generic 802.11 stack Date: Tue, 31 Aug 2004 22:14:38 +0300 User-Agent: KMail/1.7 Cc: Jeff Garzik , Denis Vlasenko , Jean Tourrilhes , Jouni Malinen , acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org, davem@redhat.com References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <4134C1A7.50600@pobox.com> In-Reply-To: <4134C1A7.50600@pobox.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2369908.xRTpSoHTD6"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408312214.44701.vkondra@mail.ru> X-Spam: Probable Spam X-archive-position: 8277 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 Content-Length: 2069 Lines: 62 --nextPart2369908.xRTpSoHTD6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 31 August 2004 21:21, Jeff Garzik wrote: JG> Denis Vlasenko wrote: JG> > I think 'senior' network guys are in position to decide upon which JG> > of currently available 802.11 stacks we should continue to work. JG> > (Atheros has one, said to be derived from BSD, is there any others?) JG> JG> JG> Already have. Start with the code in wireless-2.6 -- HostAP -- and use JG> DaveM's 802.11 stack template as a model for actually integrating 802.11 JG> very tightly with the rest of the net stack. JG> JG> http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/davem-= p8 0211.tar.bz2 JG> JG> Jeff This stack raises many questions. The very idea to implement generic softmac is pretty good. So, first questions: =2D it defines structures that was present in Jean's wireless extensions. S= o,=20 will it replace Jean's wireless extensions, merge with it, or some other=20 relationship? Partually, I don't like to see definitions for .11 header and= =20 field constants in 2 includes. =2D QoS stuff is not defined. I suppose recent cards will all support WME a= nd/or=20 TGe. It is easy to add "QoS control" field to header and new frame types, b= ut=20 it is harder to formally define how PHY should handle it. And, TGe is big=20 story on itself, with all its HCCA, block ack, etc. I also think that QoS, = as=20 it is defined in TGe, required driver to have several tx queues and=20 start/stop them separately. Is anyone working on it? I'll be glad to join. =2D Security is not up-to date either. We need .1x, EAS, TKIP etc. This nee= d to=20 be done for modern cards to use this infrastructure. --nextPart2369908.xRTpSoHTD6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBBNM4kqxdj7mhC6o0RAhaSAKCcJg6ZuVykVSGI2fEtL2dha4wiqwCeLMML QneOrlNbTTtnHwlMW0XBAOo= =nHag -----END PGP SIGNATURE----- --nextPart2369908.xRTpSoHTD6-- From manfred@colorfullife.com Tue Aug 31 13:12:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 13:12:23 -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 i7VKCDuU005419 for ; Tue, 31 Aug 2004 13:12:17 -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 i7VKBuuG029555; Tue, 31 Aug 2004 22:11:58 +0200 Message-ID: <4134DB8C.1030108@colorfullife.com> Date: Tue, 31 Aug 2004 22:11:56 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik CC: Netdev Subject: [PATCH] fix media detection for nForce 2 nics Content-Type: multipart/mixed; boundary="------------030900010801050901060009" X-archive-position: 8278 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: 6531 Lines: 201 This is a multi-part message in MIME format. --------------030900010801050901060009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Jeff, attached is a patch that polls the media setting for non GigE nForce nics: Without polling, media changes are not autodetected. This is fatal, because the nic initialization is asynchroneous, thus "modprobe;ifup" resulted in a dead network connection. The attached patch fixes that problem. It's a repost of a patch I sent around three weeks ago: you objected that I rely on the nic irq instead of a software timer. I've documented why this is ok. Could you add the patch to your tree and forward it to Andrew? The bug is a show-stopper, it must be fixed before I can backport the gige changes to 2.4. -- Manfred --------------030900010801050901060009 Content-Type: text/plain; name="patch-forcedeth-029-timer" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-forcedeth-029-timer" // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 8 // EXTRAVERSION = --- 2.6/drivers/net/forcedeth.c 2004-08-20 19:56:32.000000000 +0200 +++ build-2.6/drivers/net/forcedeth.c 2004-08-31 21:58:32.896159514 +0200 @@ -75,6 +75,7 @@ * 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. @@ -86,7 +87,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.28" +#define FORCEDETH_VERSION "0.29" #define DRV_NAME "forcedeth" #include @@ -120,10 +121,11 @@ * 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, @@ -367,6 +369,7 @@ struct ring_desc { #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 @@ -446,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. */ @@ -1384,6 +1392,25 @@ set_speed: 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); + } + nv_start_rx(dev); + } else { + if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); + printk(KERN_INFO "%s: link down.\n", dev->name); + nv_stop_rx(dev); + } + } +} + static void nv_link_irq(struct net_device *dev) { u8 *base = get_hwbase(dev); @@ -1391,25 +1418,10 @@ static void nv_link_irq(struct net_devic miistat = readl(base + NvRegMIIStatus); writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - dprintk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); + dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat); - if (miistat & (NVREG_MIISTAT_LINKCHANGE)) { - 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); - } - nv_start_rx(dev); - } else { - if (netif_carrier_ok(dev)) { - netif_carrier_off(dev); - printk(KERN_INFO "%s: link down.\n", dev->name); - nv_stop_rx(dev); - } - } - } + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) + nv_linkchange(dev); dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); } @@ -1452,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); @@ -1816,6 +1834,14 @@ static int __devinit nv_probe(struct pci 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++) { @@ -1909,21 +1935,21 @@ static struct pci_device_id pci_tbl[] = .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 = 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, + .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, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, --------------030900010801050901060009-- From davem@redhat.com Tue Aug 31 13:16:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 13:16:54 -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 i7VKGjQI005755 for ; Tue, 31 Aug 2004 13:16:48 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7VKGZS0022865; Tue, 31 Aug 2004 16:16: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 i7VKGZ305829; Tue, 31 Aug 2004 16:16:35 -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 i7VKGShB008718; Tue, 31 Aug 2004 16:16:29 -0400 Date: Tue, 31 Aug 2004 13:16:18 -0700 From: "David S. Miller" To: Pablo Neira Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Improve behaviour of Netlink Sockets Message-Id: <20040831131618.48e740f4.davem@redhat.com> In-Reply-To: <4134A961.20808@eurodev.net> References: <412DF807.2040703@eurodev.net> <20040826141407.38b56729.davem@redhat.com> <412EB40A.6010100@eurodev.net> <20040826214710.5e322f1a.davem@redhat.com> <412F1269.8090303@eurodev.net> <20040827172736.543dbd54.davem@redhat.com> <413276D9.9080303@eurodev.net> <20040830172029.164fcf9c.davem@redhat.com> <4134A961.20808@eurodev.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: 8279 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: 385 Lines: 14 On Tue, 31 Aug 2004 18:37:53 +0200 Pablo Neira wrote: > >It's fine, I'm going to make 2 minor fixes: > > > >1) Mark netlink_thread() function static. > >2) Name the thread "knetlinkd" to be consistent with > > other kernel thread names. > > > > > > Attached the version which correct these issues. You misunderstood, I made these fixes for you in my tree :) From davem@redhat.com Tue Aug 31 13:28:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 13:29: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 i7VKSpww006284 for ; Tue, 31 Aug 2004 13:28:54 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7VKSdS0026744; Tue, 31 Aug 2004 16:28:39 -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 i7VKSd310319; Tue, 31 Aug 2004 16:28: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 i7VKSW2j015312; Tue, 31 Aug 2004 16:28:32 -0400 Date: Tue, 31 Aug 2004 13:28:22 -0700 From: "David S. Miller" To: Bart De Schuymer Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH, RFC] Add bridged IPv6 packet filtering Message-Id: <20040831132822.3c487f75.davem@redhat.com> In-Reply-To: <200408312028.42742.bdschuym@pandora.be> References: <200408281713.29192.bdschuym@pandora.be> <200408312028.42742.bdschuym@pandora.be> 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: 8280 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: 248 Lines: 7 On Tue, 31 Aug 2004 20:28:42 +0200 Bart De Schuymer wrote: > How should I proceed to get any response in this matter? Should I be > contacting someone else? Try pinging yoshfuji@linux-ipv6.org and usagi-core@linux-ipv6.org From davem@davemloft.net Tue Aug 31 13:55:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 13:55:05 -0700 (PDT) Received: from smtp111.mail.sc5.yahoo.com (smtp111.mail.sc5.yahoo.com [66.163.170.9]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7VKsxgF006966 for ; Tue, 31 Aug 2004 13:55:00 -0700 Received: from unknown (HELO cheetah.davemloft.net) (davem?330@63.197.226.105 with login) by smtp111.mail.sc5.yahoo.com with SMTP; 31 Aug 2004 20:54:51 -0000 Date: Tue, 31 Aug 2004 13:54:26 -0700 From: "David S. Miller" To: Andrew Morton Cc: netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3320] New: 2.6 kernel trigger happy to load ipv6 module Message-Id: <20040831135426.57d47f5a.davem@davemloft.net> In-Reply-To: <20040831115241.1cc516d3.akpm@osdl.org> References: <20040831115241.1cc516d3.akpm@osdl.org> Organization: DaveM Loft Enterprises X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 8281 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: 11 People who don't want features available, should not enable it (even modular) in their kernels. Socket calls are going to auto-load protocols by default. And you can work around this by defining a bogus alias for that protocol family value in the module tools config files. So this bugzilla doesn't have a leg to stand on, I'm afraid. From akpm@osdl.org Tue Aug 31 14:01:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 14:01: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 i7VL1OQ5007357 for ; Tue, 31 Aug 2004 14:01:25 -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 i7VL1B128928 for ; Tue, 31 Aug 2004 14:01:11 -0700 Date: Tue, 31 Aug 2004 14:04:54 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [Bugme-new] [Bug 3323] New: kernel NULL pointer dereference in ipv6_get_hoplimit Message-Id: <20040831140454.60237c07.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: 8282 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: 4030 Lines: 87 Begin forwarded message: Date: Tue, 31 Aug 2004 13:47:12 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3323] New: kernel NULL pointer dereference in ipv6_get_hoplimit http://bugme.osdl.org/show_bug.cgi?id=3323 Summary: kernel NULL pointer dereference in ipv6_get_hoplimit Kernel Version: 2.6.9-rc1 Status: NEW Severity: normal Owner: niv@us.ibm.com Submitter: thomasz@hostmaster.org 2.6.9-rc1 oopses here reproducibly during boot after bringing up the sit3 tunneling device: Unable to handle kernel NULL pointer dereference... ipv6_get_hoplimit+24, ipv6_rout_add+1367, inet6_rtm_newroute+63, rtnetlink_rcv+587, netlink_data_ready+22, netlink_sendskb+46, netlink_sendmsg+703, sock_sendmsg+174, __mark_inode_dirty+52, verify_iovec+75, sys_sendmsg+528, cap_vm_enough_memory+14, do_page_fault +497, netlink_autobind+184, sys_getsockname+135, sock_map_fd+376, netlink_create+207, system_call+126 Normally with 2.6.8.1 and before my routing table looks like this: Kernel IPv6 routing table Destination Next Hop Flags Metric Ref Use Iface ::1/128 :: U 0 104 2 lo 2000::/128 2000:: UC 0 12 0 sit1 2001:850:306::/128 :: U 0 9 0 lo 2001:850:306::1/128 :: U 0 6 0 lo 2001:850:306::/64 :: U 256 0 0 sit1 3ffe:80ee:14fa::/128 :: U 0 9 0 lo 3ffe:80ee:14fa::1/128 :: U 0 6 0 lo 3ffe:80ee:14fa::/64 :: U 256 0 0 sit2 3ffe:80ee:14fa::/64 :: U 256 0 0 sit3 2000::/3 :: U 1 3 0 sit1 2000::/3 :: U 1 0 0 sit2 2000::/3 :: U 1 0 0 sit3 fe80::/128 :: U 0 0 0 lo fe80::d4ba:6e20/128 :: U 0 0 0 lo fe80::2e0:81ff:fe29:9983/128 :: U 0 0 0 lo fe80::/64 :: U 256 0 0 eth0 fe80::/64 :: U 256 0 0 sit1 fe80::/64 :: U 256 0 0 sit2 fe80::/64 :: U 256 0 0 sit3 ff00::/128 ff00:: UC 0 12 0 eth0 ff00::/8 :: U 256 0 0 eth0 ff00::/8 :: U 256 0 0 sit1 ff00::/8 :: U 256 0 0 sit2 ff00::/8 :: U 256 0 0 sit3 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From mcgrof@studorgs.rutgers.edu Tue Aug 31 14:04:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 14:05:02 -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 i7VL4sOa007711 for ; Tue, 31 Aug 2004 14:04:55 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 2CBB2F99BE; Tue, 31 Aug 2004 17:04:46 -0400 (EDT) Date: Tue, 31 Aug 2004 17:04:46 -0400 To: Vladimir Kondratiev Cc: netdev@oss.sgi.com, Pedro Ramalhais , "Luis R. Rodriguez" , Jeff Garzik , jt@hpl.hp.com, Jouni Malinen , hostap@shmoo.com Subject: Re: Updated WE-18 (WPA) proposal Message-ID: <20040831210446.GE31207@ruslug.rutgers.edu> Mail-Followup-To: Vladimir Kondratiev , netdev@oss.sgi.com, Pedro Ramalhais , "Luis R. Rodriguez" , Jeff Garzik , jt@hpl.hp.com, Jouni Malinen , hostap@shmoo.com References: <20040830045441.GA7415@jm.kir.nu> <20040831085458.GD31207@ruslug.rutgers.edu> <1093966225.1464.9.camel@rootix> <200408311848.55628.vkondra@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408311848.55628.vkondra@mail.ru> 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: 8283 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: 2804 Lines: 72 On Tue, Aug 31, 2004 at 06:48:48PM +0300, Vladimir Kondratiev wrote: > On Tuesday 31 August 2004 18:33, Pedro Ramalhais wrote: > PR> > > Intel Centrino driver is re-using chunks of HostAP, and I'm looking > at PR> > > doing so for the RealTek 8180 driver I am about to publish. > PR> > > PR> > Can someone elaborate on what "chunks" the centrino driver is using > PR> > from hostap? > PR> > > PR> > Jeff what aspects are you looking to re-use from hostap? > PR> > > PR> > I guess we at prism54 should also see what we can re-use too then. > PR> > Our next driver (a softmac driver) will have a lot more code since the > PR> > MAC will need to be implemented on the driver side -- I'm not yet sure > PR> > of the exact details as I haven't grep'd through the available code yet > PR> > I'm wondering though -- are there any other softmac drivers out there, > PR> > or to come soon? > PR> > > PR> > Luis > PR> > PR> The ipw2100 driver and ipw2200 driver both use these parts of hostap > PR> code: > PR> RX code (i think now it's in file hostap_80211_rx.c) > PR> little parts of the TX code (hostap_80211_tx.c) > PR> the hostap_crypt* code for WEP. > PR> Some IEEE802.11 related parts of header files. > PR> The ipw2100 is beggining to use hostap_crypt_tkip and hostap_crypt_ccmp > PR> for WPA and WPA2. > PR> > PR> I think that's it. Better ask James Ketrenos, he is one of the > PR> developers at intel. > > Luis, > please correct me if I'm wrong. It seems to me that softmac drivers will need > significant changes relative to the model that HostAP employ. I am not sure as: 1. I haven't yet gone through hostap code besides wpa_supplicant 2. I haven't yet gone through the available softmac code: http://www.dse.co.nz/isroot/dse/support/XH8196-linux.zip Only once I have done both will I be able to tell. My guess yes as I do not think hostap is softmac based. > Also, many > changes dictated by QoS (TGe), if one want to really implement it. Will your > product support TGe? Again, 2. > May be, we need to do design for generic "softmac" that will be then used with > different PHY's. That's where I was going with my previous e-mail. > Question is, whether we can formally describe boundary > between softmac and PHY. We need as much public information available on softmac and review, or have someone experienced enough in this field to talk up. > I am interesting in joining this "softmac" development, as I will do some > other .11 card which is "softmac". Can't reveal details yet, but we may > discuss softmac issues without disclosing private info (I don't want to lose > my job). Well at least this confirms another card will be softmac based, and hence the possible need for code sharing. -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From jketreno@linux.intel.com Tue Aug 31 14:09:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 14:09:40 -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 i7VL9XWq008136 for ; Tue, 31 Aug 2004 14:09:33 -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 i7VL93ko019307; Tue, 31 Aug 2004 21:09:11 GMT Received: from linux.intel.com (hdlrvguser-223.hd.intel.com [10.127.52.242]) 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 ESMTP id i7VL2Xcl025290; Tue, 31 Aug 2004 21:02:33 GMT Message-ID: <4134E8EA.9080605@linux.intel.com> Date: Tue, 31 Aug 2004 16:08:58 -0500 From: James Ketrenos User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Linux kernel mailing list , Netdev Subject: [Announce] Update on ipw2100, ipw2200, and support for Intel PRO/Wireless 2915ABG Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 8284 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jketreno@linux.intel.com Precedence: bulk X-list: netdev Content-Length: 2795 Lines: 53 It's been a while since I've updated lkml and netdev on the progress of the ipw projects. Given the recent announcement by Intel for the introduction of Intel PRO/Wireless 2915 ABG Network Connection miniPCI adapter, I thought now was a good time... First, thanks to everyone that has been contributing, using, testing, and reporting feedback for the projects described below. The support by folks in the community has been terrific -- the drivers wouldn't be anywhere near as feature rich and stable as they are today if not for the contributions of everyone. The ipw2100 project (802.11b) has progressed very well. We are in the process of cleaning up the driver for submittal to netdev for eventual inclusion into the kernel. The driver currently supports wep, 802.1x, monitor mode, adhoc, infrastructure, etc. Suspend/resume isn't quite functioning yet, but we'll get there soon. This project is hosted at http://ipw2100.sf.net. The ipw2200 project (802.11bg), which was launched back in May, is quickly catching up to the ipw2100 project in terms of functionality. It currently supports wep and 802.1x in infrastructure mode. Currently it will only associate at B data rates; hooking in the G capabilities is going on right now. We'll then tackle adhoc and remaining feature gaps. We had been planning on holding off submittal for kernel inclusion until we were feature complete. However, several folks have requested that we accelerate that plan and get it in sooner rather than later. To that end we're working to try and get it ready for submittal along with the ipw2100 project. This project is hosted at http://ipw2200.sf.net. The ipw2100 and ipw2200 projects currently share the 802.11 frame handling stack for Tx/Rx and some management frame processing. That code has been pulled into its own module suite (ieee80211), based on work from the Host AP project. That code needs to be resync'd with the Host AP code (and vice versa where appropriate) so that then all of those drivers will be able to leverage a single wireless network stack. Anyway, this brings me to announcing Linux support for the Intel PRO/Wireless 2915 ABG Network Connection adapter. As of next week, the ipw2200 project will also begin supporting the ABG adapter. From the driver's perspective, the only change between the two cards is the addition fo the A radio on the 2915. So, adding support for the ABG is just a matter of updating the firmware used by the ipw2200 project, adding PCI id's, and putting in support for A. That work will progress as we continue to bring full support for the ipw2200 project. At some point in the near future we will rename the ipw2200 project to something more appropriate to identify it as supporting both the 2200 and 2915 adapters. Thanks, James From herbert@gondor.apana.org.au Tue Aug 31 14:28:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 14:28:58 -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 i7VLSlEg008689 for ; Tue, 31 Aug 2004 14:28:48 -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 1C2GAk-0001HK-00; Wed, 01 Sep 2004 07:28:10 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C2GAc-0001sM-00; Wed, 01 Sep 2004 07:28:02 +1000 Date: Wed, 1 Sep 2004 07:28:02 +1000 To: Julian Anastasov Cc: "David S. Miller" , laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831212802.GB7058@gondor.apana.org.au> References: <20040831111508.GA2327@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: 8285 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: 1361 Lines: 33 On Tue, Aug 31, 2004 at 03:33:22PM +0300, Julian Anastasov wrote: > > I do not see where the public IP is, what you mean? As the > mpath route does not have preferred src IP (usually when many ISPs > are used) the kernel uses inet_select_addr to select one, in similar > way as you are trying to do. But the difference is that it is now > cached and by using nfmark we have more options not to reach this > mpath route on next lookups. I was mistaken. In the mpath case there is no source address per nexthop. > The old way to provide oif as key adds one additional > cache entry per every normal input route. Another issue is that You still have one extra cache entry per input route now as the keys of this lookup is not the same as the one for the packet. > providing oif key can hit wrong route in some setups - not the > first match which we usually hit with oif=0. But for the usual > cases it works. True. But this has only been the case since a year ago. And I agree with others that if you really need this, then SNAT is better since your addresses are likely to be static and you can use the mark directly in netfilter. 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 Tue Aug 31 14:34:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 14:34: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 i7VLXxm7009043 for ; Tue, 31 Aug 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 1C2GFl-0001Nl-00; Wed, 01 Sep 2004 07:33:21 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C2GFi-0001tS-00; Wed, 01 Sep 2004 07:33:18 +1000 Date: Wed, 1 Sep 2004 07:33:18 +1000 To: Julian Anastasov Cc: "David S. Miller" , laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") Message-ID: <20040831213318.GA7262@gondor.apana.org.au> References: <20040831111508.GA2327@gondor.apana.org.au> <20040831212802.GB7058@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040831212802.GB7058@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 8286 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: 1353 Lines: 33 On Wed, Sep 01, 2004 at 07:28:02AM +1000, herbert wrote: > On Tue, Aug 31, 2004 at 03:33:22PM +0300, Julian Anastasov wrote: > > > > I do not see where the public IP is, what you mean? As the > > mpath route does not have preferred src IP (usually when many ISPs > > are used) the kernel uses inet_select_addr to select one, in similar > > way as you are trying to do. But the difference is that it is now > > cached and by using nfmark we have more options not to reach this > > mpath route on next lookups. > > I was mistaken. In the mpath case there is no source address per > nexthop. Actually, that should still work. For example, if you're like me and the nexthops all go to different devices then it's obviously OK as inet_select_addr will pick the right one for the device. If they're going through the same device but to different gateways then it'll still pick the right one for the given gateway. It only breaks when all your nexthops go to the same gateway (can't happen) or if somehow the gateway addresses don't match up with your desired source address. In that case I really think that you should use SNAT :) 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 mcgrof@studorgs.rutgers.edu Tue Aug 31 14:37:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 14:37:34 -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 i7VLbR15009389 for ; Tue, 31 Aug 2004 14:37:28 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id C309CF99BD; Tue, 31 Aug 2004 17:37:19 -0400 (EDT) Date: Tue, 31 Aug 2004 17:37:19 -0400 To: Vladimir Kondratiev Cc: netdev@oss.sgi.com, Jeff Garzik , Denis Vlasenko , Jean Tourrilhes , Jouni Malinen , acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org, davem@redhat.com Subject: Re: [RFC] acx100 inclusion in mainline; generic 802.11 stack Message-ID: <20040831213719.GH31207@ruslug.rutgers.edu> Mail-Followup-To: Vladimir Kondratiev , netdev@oss.sgi.com, Jeff Garzik , Denis Vlasenko , Jean Tourrilhes , Jouni Malinen , acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org, davem@redhat.com References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <4134C1A7.50600@pobox.com> <200408312214.44701.vkondra@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408312214.44701.vkondra@mail.ru> 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: 8287 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: 2046 Lines: 47 On Tue, Aug 31, 2004 at 10:14:38PM +0300, Vladimir Kondratiev wrote: > On Tuesday 31 August 2004 21:21, Jeff Garzik wrote: > JG> Denis Vlasenko wrote: > JG> > I think 'senior' network guys are in position to decide upon which > JG> > of currently available 802.11 stacks we should continue to work. > JG> > (Atheros has one, said to be derived from BSD, is there any others?) > JG> > JG> > JG> Already have. Start with the code in wireless-2.6 -- HostAP -- and use > JG> DaveM's 802.11 stack template as a model for actually integrating 802.11 > JG> very tightly with the rest of the net stack. > JG> > JG> > http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/davem-p8 > 0211.tar.bz2 JG> > JG> Jeff > > This stack raises many questions. > > The very idea to implement generic softmac is pretty good. > > So, first questions: > > - it defines structures that was present in Jean's wireless extensions. So, > will it replace Jean's wireless extensions, merge with it, or some other > relationship? Partually, I don't like to see definitions for .11 header and > field constants in 2 includes. > > - QoS stuff is not defined. I suppose recent cards will all support WME and/or > TGe. It is easy to add "QoS control" field to header and new frame types, but > it is harder to formally define how PHY should handle it. And, TGe is big > story on itself, with all its HCCA, block ack, etc. I also think that QoS, as > it is defined in TGe, required driver to have several tx queues and > start/stop them separately. Is anyone working on it? I'll be glad to join. > > - Security is not up-to date either. We need .1x, EAS, TKIP etc. This need to > be done for modern cards to use this infrastructure. This is handled by hostap wpa_supplicant now, which is going to be part of WE18. The question I think is whether somoene plans on re-doing it on wireless-2.6, since as you mentioned it seems WE are being redone on davem's patch. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From herbert@gondor.apana.org.au Tue Aug 31 15:02:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 15:02:42 -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 i7VM2X4m010061 for ; Tue, 31 Aug 2004 15:02:34 -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 1C2Ghl-0001xR-00; Wed, 01 Sep 2004 08:02:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1C2Ghh-0001wJ-00; Wed, 01 Sep 2004 08:02:13 +1000 From: Herbert Xu To: akpm@osdl.org (Andrew Morton) Subject: Re: Fw: [Bugme-new] [Bug 3323] New: kernel NULL pointer dereference in ipv6_get_hoplimit Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20040831140454.60237c07.akpm@osdl.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) Message-Id: Date: Wed, 01 Sep 2004 08:02:13 +1000 X-archive-position: 8288 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: 530 Lines: 17 Andrew Morton wrote: > > Begin forwarded message: > > Date: Tue, 31 Aug 2004 13:47:12 -0700 > From: bugme-daemon@osdl.org > To: bugme-new@lists.osdl.org > Subject: [Bugme-new] [Bug 3323] New: kernel NULL pointer dereference in ipv6_get_hoplimit This has already been fixed in the current BK. 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 vkondra@mail.ru Tue Aug 31 15:07:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 15:07:37 -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 i7VM7Tma010418 for ; Tue, 31 Aug 2004 15:07:30 -0700 Received: from [212.179.200.204] (port=38154 helo=[192.168.10.2]) by mx1.mail.ru with esmtp id 1C2GmU-000HnO-00; Wed, 01 Sep 2004 02:07:12 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: Re: [RFC] acx100 inclusion in mainline; generic 802.11 stack Date: Wed, 1 Sep 2004 01:06:43 +0300 User-Agent: KMail/1.7 Cc: "Luis R. Rodriguez" , Jeff Garzik , Denis Vlasenko , Jean Tourrilhes , Jouni Malinen , acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org, davem@redhat.com References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <200408312214.44701.vkondra@mail.ru> <20040831213719.GH31207@ruslug.rutgers.edu> In-Reply-To: <20040831213719.GH31207@ruslug.rutgers.edu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1807251.l8n9aNYoZk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409010106.54020.vkondra@mail.ru> X-Spam: Probable Spam X-archive-position: 8289 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 Content-Length: 5357 Lines: 174 --nextPart1807251.l8n9aNYoZk Content-Type: multipart/mixed; boundary="Boundary-01=_2ZPNBSf1w2nOWEF" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_2ZPNBSf1w2nOWEF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/davem-p= 80211.tar.bz2=20 LR> > - QoS stuff is not defined. I suppose recent cards will all support W= ME and/or LR> > TGe. It is easy to add "QoS control" field to header and new frame types, but LR> > it is harder to formally define how PHY should hand= le it. And, TGe is big LR> > story on itself, with all its HCCA, block ack, etc. I also think that QoS, as LR> > it is defined in TGe, required driver to have several tx queues and LR> > start/stop them separately. Is anyone working on it? I'll be glad to join. LR> > I'd like to contribute easiest part of TGe, to start with something (agains= t=20 source mentioned above). I defined only frame formats and bits for fixed=20 fields. --Boundary-01=_2ZPNBSf1w2nOWEF Content-Type: text/x-diff; charset="iso-8859-1"; name="tge.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tge.patch" Index: if_80211.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/vkondra-l/cvsroot/p80211/if_80211.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 if_80211.h =2D-- if_80211.h 31 Aug 2004 20:32:16 -0000 1.1.1.1 +++ if_80211.h 31 Aug 2004 21:29:58 -0000 @@ -31,6 +31,27 @@ u8 addr4[ETH_ALEN]; }; =20 +struct ieee802_11_hdrq { + u16 frame_ctl; + u16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + u16 seq_ctl; + u16 qos_ctl; +}; + +struct ieee802_11_hdr4q { + 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 qos_ctl; +}; + /* Address field usage based upon setting of FROMDS/TODS bits: * * FROMDS TODS addr1 addr2 addr3 addr4 @@ -78,8 +99,11 @@ #define IEEE802_11_STYPE_DISASSOC 0x00A0 #define IEEE802_11_STYPE_AUTH 0x00B0 #define IEEE802_11_STYPE_DEAUTH 0x00C0 +#define IEEE802_11_STYPE_ACTION 0x00D0 =20 /* control */ +#define IEEE802_11_STYPE_BACK_REQ 0x0080 +#define IEEE802_11_STYPE_BACK 0x0090 #define IEEE802_11_STYPE_PSPOLL 0x00A0 #define IEEE802_11_STYPE_RTS 0x00B0 #define IEEE802_11_STYPE_CTS 0x00C0 @@ -96,11 +120,51 @@ #define IEEE802_11_STYPE_CFACK 0x0050 #define IEEE802_11_STYPE_CFPOLL 0x0060 #define IEEE802_11_STYPE_CFACKPOLL 0x0070 +#define IEEE802_11_STYPE_QDATA 0x0080 +#define IEEE802_11_STYPE_QDATA_CFACK 0x0090 +#define IEEE802_11_STYPE_QDATA_CFPOLL 0x00A0 +#define IEEE802_11_STYPE_QDATA_CFACKPOLL 0x00B0 +#define IEEE802_11_STYPE_QNULLFUNC 0x00C0 +#define IEEE802_11_STYPE_QCFACK 0x00D0 +#define IEEE802_11_STYPE_QCFPOLL 0x00E0 +#define IEEE802_11_STYPE_QCFACKPOLL 0x00F0 =20 #define IEEE802_11_SCTL_FRAG 0x000F #define IEEE802_11_SCTL_SEQ 0xFFF0 #define IEEE802_11_SCTL_SEQ_SHIFT 4 =20 +/** QOS control field bits usage + * Frame 0..3 4 5..6 7 8..15 + *=20 + * QoS (+)CF-Poll TID EOSP Ack_policy rsrv TXOP limit + * sent by HC + *=20 + * QoS Data, QoS Null, TID EOSP Ack_policy rsrv QAP PS buffer size + * QoS CF-Ack, + * QoS Data + CF-Ack + * sent by HC + *=20 + * QoS Data sent by TID 0 Ack_policy rsrv TXOP duration reques= ted + * non-AP QSTA TID 1 Ack_policy rsrv Queue size + *=20 + */ +#define IEEE802_11_QCTL_FRAG 0x000F +#define IEEE802_11_QCTL_EOSP 0x0010 +#define IEEE802_11_QCTL_ACK 0x0060 +#define IEEE802_11_QCTL_VAL 0xFF00 + +/* bits for ack policy */ +#define IEEE802_11_QCTL_ACK_NORM 0x0000 /* normal Ack */ +#define IEEE802_11_QCTL_ACK_NO 0x0020 /* No ack */ +#define IEEE802_11_QCTL_ACK_NEXP 0x0040 /* No explicit Ack */ +#define IEEE802_11_QCTL_ACK_BLK 0x0060 /* Block Ack */ + +/* bits for QAP PS buffer size */ +#define IEEE802_11_QCTL_PSBUF_PRESENT 0x0200 /* next fields present = */ +#define IEEE802_11_QCTL_PSBUF_HI_AC 0x0C00 /* highest AC buffered = */ +#define IEEE802_11_QCTL_PSBUF_BUF 0xF000 /* total buffered payload = */ + + struct ieee802_11_snap { u8 dsap; u8 ssap; @@ -119,6 +183,14 @@ #define IEEE802_11_TLV_TYPE_TIM 5 #define IEEE802_11_TLV_TYPE_IBSSPARMS 6 #define IEEE802_11_TLV_TYPE_COUNTRY 7 +#define IEEE802_11_TLV_TYPE_QBSS_LOAD 11 +#define IEEE802_11_TLV_TYPE_EDCA 12 +#define IEEE802_11_TLV_TYPE_TSPEC 13 +#define IEEE802_11_TLV_TYPE_TCLAS 14 +#define IEEE802_11_TLV_TYPE_SCHED 15 +#define IEEE802_11_TLV_TYPE_TS_DELAY 43 +#define IEEE802_11_TLV_TYPE_TC_PROC 44 +#define IEEE802_11_TLV_TYPE_QOS_CAP 46 #define IEEE802_11_TLV_TYPE_XRATES 50 =20 #define IEEE802_11_MAX_RATES 8 --Boundary-01=_2ZPNBSf1w2nOWEF-- --nextPart1807251.l8n9aNYoZk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBBNPZ9qxdj7mhC6o0RAnSOAKCHcA9FzXz7Zj1EJPYMz1IjlVjRCgCfQM6i igW/a/012e2dk4wZ3Fq6lS8= =CfSh -----END PGP SIGNATURE----- --nextPart1807251.l8n9aNYoZk-- From akpm@osdl.org Tue Aug 31 15:31:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 15:31: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 i7VMVKTQ011059 for ; Tue, 31 Aug 2004 15:31:21 -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 i7VMV7116404 for ; Tue, 31 Aug 2004 15:31:07 -0700 Date: Tue, 31 Aug 2004 15:34:50 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: Re: 2.6.9-rc1-mm2 Message-Id: <20040831153450.4498282e.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: 8290 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: 21919 Lines: 1004 Begin forwarded message: Date: Tue, 31 Aug 2004 15:13:45 -0700 From: Rick Lindsley To: Andrew Morton Cc: linux-kernel@vger.kernel.org Subject: Re: 2.6.9-rc1-mm2 Getting an error of: net/built-in.o(.text+0x64047): In function `tcp_in_window': net/ipv4/netfilter/ip_conntrack_proto_tcp.c:683: undefined reference to `ip_ct_log_invalid' net/built-in.o(.text+0x6431f): In function `tcp_error': net/ipv4/netfilter/ip_conntrack_proto_tcp.c:792: undefined reference to `ip_ct_log_invalid' net/built-in.o(.text+0x64421):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:817: undefined reference to `ip_ct_log_invalid' net/built-in.o(.text+0x64450):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:808: undefined reference to `ip_ct_log_invalid' net/built-in.o(.text+0x64487):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:784: undefined reference to `ip_ct_log_invalid' net/built-in.o(.text+0x6478a):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:877: more undefined references to `ip_ct_log_invalid' follow The error is for all references of the LOG_INVALID macro in ip_conntrack_proto_tcp.c. My guess is that the declaration of ip_ct_log_invalid in ip_conntrack_standalone.c landed under a new #define that I'm not using in this set of patches, but I can't find where. All-important config file appended below. This is an older config file, but make oldconfig was done first, per normal. Rick # # Automatically generated make config: don't edit # Linux kernel version: 2.6.9-rc1-mm2 # Tue Aug 31 14:42:38 2004 # CONFIG_X86=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_GENERIC_ISA_DMA=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=15 CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y # CONFIG_CPUSETS is not set 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 is not set # # Processor type and features # # CONFIG_X86_PC is not set # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set CONFIG_X86_SUMMIT=y # 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_ACPI_SRAT=y CONFIG_X86_SUMMIT_NUMA=y CONFIG_X86_CYCLONE_TIMER=y # 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=32 CONFIG_X86_HT=y # CONFIG_SCHED_SMT is not set # CONFIG_PREEMPT is not set CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_TSC=y # CONFIG_X86_MCE is not set # 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 is not set # CONFIG_HIGHMEM4G is not set CONFIG_HIGHMEM64G=y CONFIG_HIGHMEM=y CONFIG_X86_PAE=y CONFIG_NUMA=y CONFIG_DISCONTIGMEM=y CONFIG_HAVE_ARCH_BOOTMEM_NODE=y # CONFIG_HIGHPTE 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_BOOT_IOREMAP=y # CONFIG_REGPARM is not set # # Performance-monitoring counters support # # CONFIG_PERFCTR is not set # CONFIG_KEXEC is not set # # Power management options (ACPI, APM) # # CONFIG_PM is not set # CONFIG_PM_DEBUG is not set # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y # CONFIG_ACPI_AC is not set # CONFIG_ACPI_BATTERY is not set # CONFIG_ACPI_BUTTON is not set # CONFIG_ACPI_FAN is not set # CONFIG_ACPI_PROCESSOR is not set # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_TOSHIBA is not set CONFIG_ACPI_DEBUG=y CONFIG_ACPI_EC=y CONFIG_ACPI_PCI=y # CONFIG_X86_PM_TIMER 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 is not set CONFIG_PCI_NAMES=y CONFIG_ISA=y CONFIG_EISA=y CONFIG_EISA_PCI_EISA=y CONFIG_EISA_NAMES=y # CONFIG_MCA is not set # CONFIG_SCx200 is not set # CONFIG_HOTPLUG_CPU is not set # # PCMCIA/CardBus support # # CONFIG_PCMCIA is not set CONFIG_PCMCIA_PROBE=y # # PCI Hotplug Support # # CONFIG_HOTPLUG_PCI is not set # # Executable file formats # CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set # # Device Drivers # # # Generic Driver Options # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Plug and Play support # # CONFIG_PNP is not set # # Block devices # CONFIG_BLK_DEV_FD=y # CONFIG_BLK_DEV_XD 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=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_LBD is not set # CONFIG_CDROM_PKTCDVD is not set # # ATA/ATAPI/MFM/RLL support # # CONFIG_IDE 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=y CONFIG_BLK_DEV_SR_VENDOR=y # CONFIG_CHR_DEV_SG is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_LOGGING=y # # 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_7000FASST is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_ITERAID is not set # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AHA1740 is not set # CONFIG_SCSI_AACRAID is not set CONFIG_SCSI_AIC7XXX=y CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 CONFIG_AIC7XXX_RESET_DELAY_MS=2000 # CONFIG_AIC7XXX_PROBE_EISA_VL is not set CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 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_GENERIC_NCR5380 is not set # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set CONFIG_SCSI_IPS=y # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS 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_SIM710 is not set # CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set # CONFIG_SCSI_ULTRASTOR is not set # CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set # # Old CD-ROM drivers (not SCSI, not IDE) # # CONFIG_CD_NO_IDESCSI 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=y CONFIG_NETLINK_DEV=y CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_FWMARK=y CONFIG_IP_ROUTE_MULTIPATH=y CONFIG_IP_ROUTE_TOS=y CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set CONFIG_IP_MROUTE=y CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y # CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y # 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 is not set # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set CONFIG_IP_NF_NAT_NEEDED=y # CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_COMPAT_IPCHAINS=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=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 is not set # CONFIG_NET_SCH_HFSC is not set 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 is not set 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=y CONFIG_NET_CLS_U32=y # CONFIG_CLS_U32_PERF is not set # CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=y CONFIG_NET_CLS_RSVP6=y # CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_KGDBOE is not set # CONFIG_NETPOLL is not set # CONFIG_NETPOLL_RX is not set # CONFIG_NETPOLL_TRAP 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=y # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_ETHERTAP 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 # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # # Tulip family network device support # # CONFIG_NET_TULIP is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set # CONFIG_HP100 is not set # CONFIG_NET_ISA is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set CONFIG_ADAPTEC_STARFIRE=y # CONFIG_ADAPTEC_STARFIRE_NAPI is not set # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_CS89x0 is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y # CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_LNE390 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_NE3210 is not set # CONFIG_ES3210 is not set # CONFIG_8139CP is not set # CONFIG_8139TOO is not set # CONFIG_SIS900 is not set # 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 # CONFIG_NET_POCKET 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=y # # 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_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=y # CONFIG_SERIO_CT82C710 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_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD 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=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_EXTENDED=y # CONFIG_SERIAL_8250_MANY_PORTS is not set # CONFIG_SERIAL_8250_SHARE_IRQ is not set # CONFIG_SERIAL_8250_DETECT_IRQ is not set # CONFIG_SERIAL_8250_MULTIPORT is not set # CONFIG_SERIAL_8250_RSA is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # # 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=y # 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=y CONFIG_AGP_ALI=y # CONFIG_AGP_ATI is not set CONFIG_AGP_AMD=y # CONFIG_AGP_AMD64 is not set CONFIG_AGP_INTEL=y # CONFIG_AGP_INTEL_MCH is not set # CONFIG_AGP_NVIDIA is not set CONFIG_AGP_SIS=y CONFIG_AGP_SWORKS=y CONFIG_AGP_VIA=y # CONFIG_AGP_EFFICEON 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=y # # Console display driver support # CONFIG_VGA_CONSOLE=y # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # # Sound # # CONFIG_SOUND is not set # # USB support # # CONFIG_USB 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_REISER4_FS=y CONFIG_REISER4_LARGE_KEY=y # CONFIG_REISER4_CHECK is not set # CONFIG_REISERFS_FS 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=y # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y CONFIG_JOLIET=y # CONFIG_ZISOFS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=y # CONFIG_MSDOS_FS is not set CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # # 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 is not set # CONFIG_NFSD is not set # CONFIG_EXPORTFS is not set # CONFIG_SMB_FS 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=y # CONFIG_ACORN_PARTITION is not set # CONFIG_OSF_PARTITION is not set # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set # CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y CONFIG_BSD_DISKLABEL=y # CONFIG_MINIX_SUBPARTITION is not set # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_EFI_PARTITION is not set # # Native Language Support # CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # 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 is not set # # Kernel hacking # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_HIGHMEM is not set CONFIG_DEBUG_INFO=y # CONFIG_FRAME_POINTER is not set CONFIG_EARLY_PRINTK=y # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_KPROBES is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_4KSTACKS is not set # CONFIG_SCHEDSTATS is not set # CONFIG_LOCKMETER is not set CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y # CONFIG_KGDB is not set # # Security options # # CONFIG_KEYS is not set # 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 is not set CONFIG_X86_SMP=y CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y CONFIG_PC=y From akpm@osdl.org Tue Aug 31 16:47:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 16:47: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 i7VNlRmM015692 for ; Tue, 31 Aug 2004 16:47:27 -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 i7VNlE100677 for ; Tue, 31 Aug 2004 16:47:14 -0700 Date: Tue, 31 Aug 2004 16:50:57 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [PATCH] Fix of wrong ipt debug messages Message-Id: <20040831165057.76ebd427.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Tue__31_Aug_2004_16_50_57_-0700_IdZYm.D6Z.iKKEaH" X-archive-position: 8291 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: 1445 Lines: 44 This is a multi-part message in MIME format. --Multipart=_Tue__31_Aug_2004_16_50_57_-0700_IdZYm.D6Z.iKKEaH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Begin forwarded message: Date: Tue, 31 Aug 2004 18:42:05 +0400 From: Kirill Korotaev To: torvalds@osdl.org, akpm@osdl.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] Fix of wrong ipt debug messages This patch fixes wrong ipt debug messages. The problem is that when CONFIG_NETFILTER_DEBUG is set, parp_redo() can flood debug output like this: Mar 13 19:57:19 ts1 nf_hook: hook 0 already set. Mar 13 19:57:19 ts1 skb: pf=0 (unowned) dev=eth0 len=46 ....... Kirill --Multipart=_Tue__31_Aug_2004_16_50_57_-0700_IdZYm.D6Z.iKKEaH Content-Type: application/octet-stream; name="diff-ipt-nfdbgarp-20030317" Content-Disposition: attachment; filename="diff-ipt-nfdbgarp-20030317" Content-Transfer-Encoding: base64 LS0tIGxpbnV4LTIuNC4yMC0wMTl0ZXN0MDAyL25ldC9pcHY0L2FycC5jCVRodSBNYXIgMTMgMTM6 MTU6NTEgMjAwMworKysgbGludXgtMi40LjIwLTAxOXRlc3QwMDMvbmV0L2lwdjQvYXJwLmMJTW9u IE1hciAxNyAxMzo0ODowOCAyMDAzCkBAIC01OTcsNiArNTk3LDkgQEAKIAogc3RhdGljIHZvaWQg cGFycF9yZWRvKHN0cnVjdCBza19idWZmICpza2IpCiB7CisjaWYgZGVmaW5lZChDT05GSUdfTkVU RklMVEVSKSAmJiBkZWZpbmVkKENPTkZJR19ORVRGSUxURVJfREVCVUcpCisJc2tiLT5uZl9kZWJ1 ZyA9IDA7CisjZW5kaWYKIAlhcnBfcmN2KHNrYiwgc2tiLT5kZXYsIE5VTEwpOwogfQogCg== --Multipart=_Tue__31_Aug_2004_16_50_57_-0700_IdZYm.D6Z.iKKEaH-- From niv@us.ibm.com Tue Aug 31 17:49:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 17:49:17 -0700 (PDT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i810n5SJ018969 for ; Tue, 31 Aug 2004 17:49:12 -0700 Received: from us.ibm.com (bi01p1.co.us.ibm.com[32.97.110.142]) by comcast.net (rwcrmhc11) with SMTP id <2004090100484701300govroe> (Authid: nsnix); Wed, 1 Sep 2004 00:48:51 +0000 Message-ID: <41351C86.7000704@us.ibm.com> Date: Tue, 31 Aug 2004 17:49:10 -0700 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Morton CC: netdev@oss.sgi.com, Rick Lindsley , linux-kernel@vger.kernel.org Subject: Re: Fw: Re: 2.6.9-rc1-mm2 References: <20040831153450.4498282e.akpm@osdl.org> In-Reply-To: <20040831153450.4498282e.akpm@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8292 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: 4118 Lines: 126 Andrew Morton wrote: > Getting an error of: > > net/built-in.o(.text+0x64047): In function `tcp_in_window': > net/ipv4/netfilter/ip_conntrack_proto_tcp.c:683: undefined reference to `ip_ct_log_invalid' > net/built-in.o(.text+0x6431f): In function `tcp_error': > net/ipv4/netfilter/ip_conntrack_proto_tcp.c:792: undefined reference to `ip_ct_log_invalid' > net/built-in.o(.text+0x64421):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:817: undefined reference to `ip_ct_log_invalid' > net/built-in.o(.text+0x64450):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:808: undefined reference to `ip_ct_log_invalid' > net/built-in.o(.text+0x64487):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:784: undefined reference to `ip_ct_log_invalid' > net/built-in.o(.text+0x6478a):net/ipv4/netfilter/ip_conntrack_proto_tcp.c:877: more undefined references to `ip_ct_log_invalid' follow > > The error is for all references of the LOG_INVALID macro in > ip_conntrack_proto_tcp.c. My guess is that the declaration of > ip_ct_log_invalid in ip_conntrack_standalone.c landed under a new #define > that I'm not using in this set of patches, but I can't find where. > > All-important config file appended below. This is an older config file, but > make oldconfig was done first, per normal. > > # IP: Netfilter Configuration > # > # CONFIG_IP_NF_CONNTRACK is not set > # CONFIG_IP_NF_QUEUE is not set > # CONFIG_IP_NF_IPTABLES is not set > CONFIG_IP_NF_NAT_NEEDED=y > # CONFIG_IP_NF_ARPTABLES is not set > CONFIG_IP_NF_COMPAT_IPCHAINS=y Woiks jes fine with latest default config. Might want to poke those automated builds to pick up the latest config as well. The connection tracking source files which include that symbol (ip_conntrack_proto_*.c, ip_conntrack_standalone.c) should only be included if you have CONFIG_IP_NF_CONNTRACK defined. You had NAT_NEEDED set, which does pull in the above files too, but are now dependent on CONNTRACK being set. Tested with latest config and several permutations such as conntrack on/off, etc. Here is a sample config which built fine, just the netfilter section: # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_LIMIT=m # CONFIG_IP_NF_MATCH_IPRANGE is not set CONFIG_IP_NF_MATCH_MAC=m CONFIG_IP_NF_MATCH_PKTTYPE=m CONFIG_IP_NF_MATCH_MARK=m CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH_ESP=m CONFIG_IP_NF_MATCH_LENGTH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_TCPMSS=m CONFIG_IP_NF_MATCH_HELPER=m CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_LOCAL is not set CONFIG_IP_NF_NAT_SNMP_BASIC=m CONFIG_IP_NF_NAT_IRC=m CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_LOCAL is not set CONFIG_IP_NF_NAT_SNMP_BASIC=m CONFIG_IP_NF_NAT_IRC=m CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m # CONFIG_IP_NF_TARGET_CLASSIFY is not set CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m # CONFIG_IP_NF_RAW is not set # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_REALM is not set # CONFIG_IP_NF_CT_ACCT is not set # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_CT_PROTO_SCTP is not set From jm@jm.kir.nu Tue Aug 31 19:24:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 19:24:55 -0700 (PDT) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i812OmIM021700 for ; Tue, 31 Aug 2004 19:24:49 -0700 Received: from jm by jm.kir.nu with local (Exim 4.34) id 1C2KlB-000252-OB; Tue, 31 Aug 2004 19:22:05 -0700 Date: Tue, 31 Aug 2004 19:22:05 -0700 From: Jouni Malinen To: Vladimir Kondratiev , netdev@oss.sgi.com, Jeff Garzik , Denis Vlasenko , Jean Tourrilhes , Jouni Malinen , acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org, davem@redhat.com Subject: Re: [RFC] acx100 inclusion in mainline; generic 802.11 stack Message-ID: <20040901022205.GB7366@jm.kir.nu> References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <4134C1A7.50600@pobox.com> <200408312214.44701.vkondra@mail.ru> <20040831213719.GH31207@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040831213719.GH31207@ruslug.rutgers.edu> User-Agent: Mutt/1.5.6i X-archive-position: 8293 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkmaline@cc.hut.fi Precedence: bulk X-list: netdev Content-Length: 3102 Lines: 56 On Tue, Aug 31, 2004 at 05:37:19PM -0400, Luis R. Rodriguez wrote: > On Tue, Aug 31, 2004 at 10:14:38PM +0300, Vladimir Kondratiev wrote: > > - Security is not up-to date either. We need .1x, EAS, TKIP etc. This need to > > be done for modern cards to use this infrastructure. > > This is handled by hostap wpa_supplicant now, which is going to be part > of WE18. The question I think is whether somoene plans on re-doing it on > wireless-2.6, since as you mentioned it seems WE are being redone on > davem's patch. This sounds somewhat confusing.. As far as WPA and IEEE 802.11i (RSN/WPA2) are concerned, there are number of different components involved. One part is in IEEE 802.11 data frame handling (TKIP, CCMP). This is implemented, e.g., in the current Host AP RX/TX paths more or less completely. The current implementation is still hardcoded to do this in software, so it would need to be extended to support offloading encryption to the wlan card since many of the modern cards have hardware (or combination of hardware/firmware) implementation of TKIP and CCMP. In addition, IEEE 802.11e will add some small changes to TKIP/CCMP processing; Host AP code has places for this for TX (mainly, setting priority value in the header). RX needs some more work because of possible reordering of packets with different priorities. This all lives in the generic 802.11 stack of the kernel. In addition to data encryption, IEEE 802.11i defines key management protocol (4-Way/PTK handshake, 2-Way/Group Key handshake) and optimizations for full IEEE 802.1X authentication (PMKSA caching, pre-authentication). IEEE 802.1X and EAP authentication is on similar level. All these are done using EAPOL packet (own ethertype; one for EAPOL and one for pre-authentication). This could be done in kernel, but I don't see much point in that and have thus implemented these in user space. wpa_supplicant includes the Supplicant part both for IEEE 802.1X and IEEE 802.11i key handshakes. hostapd includes the Authenticator part for the same functionality. Being able to keep authentication and key management separated from the data encryption. There needs to be an interface for configuring and getting event information. I would say this can be considered as separate design area. Currently, hostapd and wpa_supplicant are using combination of ioctls (WE and private, depending on the driver) for user space -> kernel configuration (e.g., encryption keys), wireless events (netlink) for getting event information (association/encryption error/etc.), network interfaces with or without IEEE 802.11 headers (e.g., hostapd includes IEEE 802.11 headers for management frames in a separate interface and wpa_supplicant uses just Ethernet header and normal data interface to get the two special ethertypes). This communication interface can be replaced with something different, if desired, without affecting the other parts of the implementation (the encryption of data frames itself or the authentication/key management protocols). -- Jouni Malinen PGP id EFC895FA From ja@ssi.bg Tue Aug 31 22:02:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 31 Aug 2004 22:02:57 -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 i8152ju1030307 for ; Tue, 31 Aug 2004 22:02:49 -0700 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i8154Ttg001481; Wed, 1 Sep 2004 08:04:29 +0300 Date: Wed, 1 Sep 2004 08:04:29 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: Herbert Xu cc: "David S. Miller" , laforge@netfilter.org, netfilter-devel@lists.netfilter.org, rusty@rustcorp.com.au, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else") In-Reply-To: <20040831213318.GA7262@gondor.apana.org.au> Message-ID: References: <20040831111508.GA2327@gondor.apana.org.au> <20040831212802.GB7058@gondor.apana.org.au> <20040831213318.GA7262@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 8294 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: 684 Lines: 24 Hello, On Wed, 1 Sep 2004, Herbert Xu wrote: > > I was mistaken. In the mpath case there is no source address per > > nexthop. > > Actually, that should still work. > > For example, if you're like me and the nexthops all go to different > devices then it's obviously OK as inet_select_addr will pick the > right one for the device. If they're going through the same device > but to different gateways then it'll still pick the right one for > the given gateway. Yes, if the targets are from some of the GW's subnets. It is a masquerade drawback not to match by GW because the routing does not support it but the world is not perfect. Regards -- Julian Anastasov