aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* [SOCK][NETNS]: Register sockstat(6) files in each net.Pavel Emelyanov2008-03-31
| | | | | | | | Currently they live in init_net only, but now almost all the info they can provide is available per-net. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SOCK][NETNS]: Add the percpu prot_inuse counter in the struct net.Pavel Emelyanov2008-03-31
| | | | | | | | | | | | | | Such an accounting would cost us two more dereferences to get the percpu variable from the struct net, so I make sock_prot_inuse_get and _add calls work differently depending on CONFIG_NET_NS - without it old optimized routines are used. The per-cpu counter for init_net is prepared in core_initcall, so that even af_inet, that starts as fs_initcall, will already have the init_net prepared. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SOCK][NETNS]: Add a struct net argument to sock_prot_inuse_add and _get.Pavel Emelyanov2008-03-31
| | | | | | | | | | | | | | This counter is about to become per-proto-and-per-net, so we'll need two arguments to determine which cell in this "table" to work with. All the places, but proc already pass proper net to it - proc will be tuned a bit later. Some indentation with spaces in proc files is done to keep the file coding style consistent. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Introduce a netns_core structure.Pavel Emelyanov2008-03-31
| | | | | | | | | | There's already some stuff on the struct net, that should better be folded into netns_core structure. I'm making the per-proto inuse counter be per-net also, which is also a candidate for this, so introduce this structure and populate it a bit. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix allnoconfig build on powerpc and avr32David S. Miller2008-03-31
| | | | | | | | | | | | | As reported by Haavard Skinnemoen and Stephen Rothwell: > allnoconfig fails with > > include/linux/netdevice.h:843: error: implicit declaration of function 'dev_net' > > which seems to be because the definition of dev_net is inside #ifdef > CONFIG_NET, while next_net_device, which calls it, is not. Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'upstream-net26' of ↵David S. Miller2008-03-28
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
| * e1000e: reorganize PHY and flow control interfaceJeff Kirsher2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reorganization moves the PHY status into a separate struct. Flow Control setup is moved into this struct as well and frame size away from here into the adapter struct where its inly use is. The post-link-up code is now a separate function and moved out of the watchdog function itself. This allows us to track the es2lan restart issue a bit easier. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * e1000e: rename mc_addr_list_updateJeff Kirsher2008-03-28
| | | | | | | | | | | | | | | | Rename this function to be consistent with function naming (verb first) Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * e1000e: reformat comment blocks, cosmetic changes onlyBruce Allan2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Adjusting the comment blocks here to be code-style compliant. no code changes. Changed some copyright dates to 2008. Indentation fixes. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * Compilation fix for ixgbe_main.c.Denis V. Lunev2008-03-28
| | | | | | | | | | | | | | | | | | | | | | Under CONFIG_DCA the compilation is broken since the commit bd0362dde080cef377d99fa5beb5c25308c29c73 (ixgbe: Add optional DCA infrastructure). IXGBE_SUCCESS is not defined anywhere, replace it with 0. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * net: yellowfin parenthesis fixMariusz Kozlowski2008-03-28
| | | | | | | | | | | | | | | | | | The code is under unused #ifdef NO_TXSTATS branch but its better to have it fixed. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netdev: ehea: port_lock semaphore to mutexDaniel Walker2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the port_lock to a mutex. There is also some additional cleanup. The line length inside the ehea_rereg_mrs was getting long so I made some adjustments to shorten them. [akpm@linux-foundation.org: dec99ification] Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netdev: ehea: bcmc_regs semaphore to mutexDaniel Walker2008-03-28
| | | | | | | | | | | | | | | | | | | | | | Convert the ehea_bcmc_regs.lock to a mutex. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netdev: ehea: locking order correctionDaniel Walker2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | Nested locks always need to be taken in the same order. This change factors out the ehea_fw_handles.lock to make the locking order consistent. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netdev: ehea: ehea_fw_handles semaphore to mutexDaniel Walker2008-03-28
| | | | | | | | | | | | | | | | | | | | | | Converted the ehea_fw_handles.lock to a mutex. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netdev: ehea: semaphore to mutexDaniel Walker2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | Converted the dlpar_mem_lock. With a bit of cleanup, I converted to DEFINE_MUTEX() instead of a runtime init. I also made the lock static. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Acked-by: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * drivers/net/tokenring/3c359.c: use time_* macrosS.Caglar Onur2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So use the time_after() macro, defined in linux/jiffies.h, which deals with wrapping correctly. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * drivers/net/arcnet/arcnet.c: use time_* macrosS.Caglar Onur2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So use the time_after() macro, defined in linux/jiffies.h, which deals with wrapping correctly. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * 3c509: convert to isa_driver and pnp_driverOndrej Zary2008-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert 3c509 driver to isa_driver and pnp_driver. The result is that autoloading using udev and hibernation works with ISA PnP cards. It also adds hibernation support for non-PnP ISA cards. xcvr module parameter was removed as its value was not used. Tested using 3 ISA cards in various combinations of PnP and non-PnP modes. EISA and MCA only compile-tested. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [UDP]: Remove owner from udp_seq_afinfo.Denis V. Lunev2008-03-28
| | | | | | | | | | | | | | Move it to udp_seq_afinfo->seq_fops as should be. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Place file operations directly into udp_seq_afinfo.Denis V. Lunev2008-03-28
| | | | | | | | | | | | | | No need to have separate never-used variable. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Cleanup /proc/udp[6] creation/removal.Denis V. Lunev2008-03-28
| | | | | | | | | | | | | | | | Replace seq_open with seq_open_net and remove udp_seq_release completely. seq_release_net will do this job just fine. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Move seq_ops from udp_iter_state to udp_seq_afinfo.Denis V. Lunev2008-03-28
| | | | | | | | | | | | | | No need to create seq_operations for each instance of 'netstat'. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: No need to check afinfo != NULL in udp_proc_(un)register.Denis V. Lunev2008-03-28
| | | | | | | | | | | | | | udp_proc_register/udp_proc_unregister are called with a static pointer only. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Replace struct net on udp_iter_state with seq_net_private.Denis V. Lunev2008-03-28
|/ | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix dev_alloc_skb() typo.David S. Miller2008-03-28
| | | | | | Noticed by Joe Perches. Signed-off-by: David S. Miller <davem@davemloft.net>
* [LIB]: Drop the pcounter itself.Pavel Emelyanov2008-03-28
| | | | | | | | | | | | The knock-out. The pcounter abstraction is not used any longer in the kernel. Not sure whether this should go via netdev tree, but as far as I remember it was added via this one, and besides Eric thinks that Andrew shouldn't mind this. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SOCK]: Drop inuse pcounter from struct proto (v2).Pavel Emelyanov2008-03-28
| | | | | | | | An uppercut - do not use the pcounter on struct proto. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SOCK]: Drop per-proto inuse init and fre functions (v2).Pavel Emelyanov2008-03-28
| | | | | | | | | Constructive part of the set is finished here. We have to remove the pcounter, so start with its init and free functions. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SOCK]: Introduce a percpu inuse counters array (v2).Pavel Emelyanov2008-03-28
| | | | | | | | | | | | | | | | | | | And redirect sock_prot_inuse_add and _get to use one. As far as the dereferences are concerned. Before the patch we made 1 dereference to proto->inuse.add call, the call itself and then called the __get_cpu_var() on a static variable. After the patch we make a direct call, then one dereference to proto->inuse_idx and then the same __get_cpu_var() on a still static variable. So this patch doesn't seem to produce performance penalty on SMP. This is not per-net yet, but I will deliberately make NET_NS=y case separated from NET_NS=n one, since it'll cost us one-or-two more dereferences to get the struct net and the inuse counter. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SOCK]: Enumerate struct proto-s to facilitate percpu inuse accounting (v2).Pavel Emelyanov2008-03-28
| | | | | | | | | | | | | | The inuse counters are going to become a per-cpu array. Introduce an index for this array on the struct proto. To handle the case of proto register-unregister-register loop the bitmap is used. All its bits manipulations are protected with proto_list_lock and a sanity check for the bitmap being exhausted is also added. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Rename inet_frag.h identifiers COMPLETE, FIRST_IN, LAST_IN to INET_FRAG_*Joe Perches2008-03-28
| | | | | | | | | | On Fri, 2008-03-28 at 03:24 -0700, Andrew Morton wrote: > they should all be renamed. Done for include/net and net Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Remove unused method declaration in include/net/addrconf.h.Rami Rosen2008-03-28
| | | | | | | | This patches removes unused declaration of addrconf_forwarding_on() method in include/net/addrconf.h. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Add inline intent commentary to dev_alloc_skb().Denys Vlasenko2008-03-28
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Protect device namespace inlines with CONFIG_NETDavid S. Miller2008-03-28
| | | | | | | | | | Include sites should not be bothered by whether CONFIG_NET is set or not when trying to include benign files like linux/etherdevice.h et al. From a report by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6] NEIGH: Optimize is_router check.YOSHIFUJI Hideaki2008-03-28
| | | | | | | Our interest is not the whole entry of proxy neighbor but the NTF_ROUTER flag. Let's test it explicitly. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [NET] NEIGHBOUR: Extract hash/lookup functions for pneigh entries.YOSHIFUJI Hideaki2008-03-28
| | | | | | | | | Extract hash function for pneigh entries from pneigh_lookup(), __pneigh_lookup() and pneigh_delete() as pneigh_hash(). Extract core of pneigh_lookup() and __pneigh_lookup() as __pneigh_lookup_1(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [NET] NEIGHBOUR: Make each EXPORT_SYMBOL{,_GPL}() immediately follow its ↵YOSHIFUJI Hideaki2008-03-28
| | | | | | function/variable. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* Merge branch 'master' of ↵David S. Miller2008-03-27
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/usb/rndis_host.c drivers/net/wireless/b43/dma.c net/ipv6/ndisc.c
| * [NET]: Use local_irq_{save,restore}() in napi_complete().David S. Miller2008-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based upon a lockdep report. Since ->poll() can be invoked from netpoll with interrupts disabled, we must not unconditionally enable interrupts in napi_complete(). Instead we must use local_irq_{save,restore}(). Noticed by Peter Zijlstra: <irqs disabled> netpoll_poll() poll_napi() spin_trylock(&napi->poll_lock) poll_one_napi() napi->poll() := sky2_poll() napi_complete() local_irq_disable() local_irq_enable() <--- *BUG* <irq> irq_exit() do_softirq() net_rx_action() spin_lock(&napi->poll_lock) <--- Deadlock! Because we still hold the lock.... Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: Replate direct proc_fops assignment with proc_create call.Denis V. Lunev2008-03-27
| | | | | | | | | | | | | | | | This elliminates infamous race during module loading when one could lookup proc entry without proc_fops assigned. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB accessThomas Graf2008-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | ESP does not account for the IV size when calling pskb_may_pull() to ensure everything it accesses directly is within the linear part of a potential fragment. This results in a BUG() being triggered when the both the IPv4 and IPv6 ESP stack is fed with an skb where the first fragment ends between the end of the esp header and the end of the IV. This bug was found by Dirk Nehring <dnehring@gmx.net> . Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPSEC]: Fix BEET outputHerbert Xu2008-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IPv6 BEET output function is incorrectly including the inner header in the payload to be protected. This causes a crash as the packet doesn't actually have that many bytes for a second header. The IPv4 BEET output on the other hand is broken when it comes to handling an inner IPv6 header since it always assumes an inner IPv4 header. This patch fixes both by making sure that neither BEET output function touches the inner header at all. All access is now done through the protocol-independent cb structure. Two new attributes are added to make this work, the IP header length and the IPv4 option length. They're filled in by the inner mode's output function. Thanks to Joakim Koskela for finding this problem. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Merge branch 'master' of ↵David S. Miller2008-03-26
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| | * b43: Remove irqs_disabled() sanity checksMichael Buesch2008-03-24
| | | | | | | | | | | | | | | | | | | | | | | | Remove all irqs_disabled() sanity checks, as they are not safe on a RT-enabled kernel and will trigger bogus warnings. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * b43: Fix DMA mapping leakageMichael Buesch2008-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a DMA mapping leakage in the case where we reject a DMA buffer because of its address. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: Christian Casteyde <casteyde.christian@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * iwlwifi: fix __devexit_p points to __devexit functionsReinette Chatre2008-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iwlxxxx_pci_remove functions are not needed when drivers are not compiled as modules - they can thus be discarded at kernel link time. This is already captured by having them as __devexit_p in the pci_driver struct - these are supposed to be pointers to __devexit functions, but was not. This is now fixed. This problem was reported by Toralf Forster when testing the compilation of 2.6.25-rc6. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> CC: Toralf Forster <toralf.foerster@gmx.de> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * MAINTAINERS: update iwlwifi git urlReinette Chatre2008-03-24
| | | | | | | | | | | | | | | Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * arlan: fix warning when PROC_FS=nJohn W. Linville2008-03-24
| | | | | | | | | | | | | | | | | | drivers/net/wireless/arlan-proc.c:1216: warning: 'arlan_root_table' defined but not used Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * iwlwifi: mac start synchronization issueRick Farrington2008-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a synchronization problem on the 4965 and 3945 with the mac start callback routine. The problem is that this function exits BEFORE the 'xxx_alive_start' has completed. This can lead to a problem if a subsequent MAC callback attempts to issue a firmware command. Signed-off-by: Rick Farrington <rickdic@hotmail.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>