summaryrefslogtreecommitdiff
path: root/net/atm
AgeCommit message (Collapse)Author
2005-03-26[NET] make all protos partially use sk_protArnaldo Carvalho de Melo
sk_alloc_slab becomes proto_register, that receives a struct proto not necessarily completely filled, but at least with the proto name, owner and obj_size (aka proto specific sock size), with this we can remove the struct sock sk_owner and sk_slab, using sk->sk_prot->{owner,slab} instead. This patch also makes sk_set_owner not necessary anymore, as at sk_alloc time we have now access to the struct proto onwer and slab members, so we can bump the module refcount exactly at sock allocation time. Another nice "side effect" is that this patch removes the generic sk_cachep slab cache, making the only last two protocols that used it use just kmalloc, informing a struct proto obj_size equal to sizeof(struct sock). Ah, almost forgot that with this patch it is very easy to use a slab cache, as it is now created at proto_register time, and all protocols need to use proto_register, so its just a matter of switching the second parameter of proto_register to '1', heck, this can be done even at module load time with some small additional patch. Another optimization that will be possible in the future is to move the sk_protocol and sk_type struct sock members to struct proto, but this has to wait for all protocols to move completely to sk_prot. This changeset also introduces /proc/net/protocols, that lists the registered protocols details, some may seem excessive, but I'd like to keep them while working on further struct sock hierarchy work and also to realize which protocols are old ones, i.e. that still use struct proto_ops, etc, yeah, this is a bit of an exaggeration, as all protos still use struct proto_ops, but in time the idea is to move all to use sk->sk_prot and make the proto_ops infrastructure be shared among all protos, reducing one level of indirection. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22Merge bk://kernel.bkbits.net/acme/net-2.6David S. Miller
into sunset.davemloft.net:/home/davem/src/BK/acme-2.6
2005-03-22[ATM]: assorted cleanupsChas Williams
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[ATM]: Remove bridge/lec interdependencyChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[NET] use sk_acceptq_is_fullArnaldo Carvalho de Melo
Replacing the open coded equivalent. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-02-14Merge nuts.davemloft.net:/disk1/BK/network-2.6.12David S. Miller
into nuts.davemloft.net:/disk1/BK/net-2.6.12
2005-02-08Resolve ATM conflicts.David S. Miller
2005-02-08Resolve ATM conflicts.David S. Miller
2005-02-07Fix ATM copy-to-user usage.Linus Torvalds
More of the Guninski "copy_to_user() takes a size_t" series.
2005-01-26[ATM]: replace schedule_timeout() with msleep()Chas Williams
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-26[ATM]: [svc] get accounting right when we remove skbChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-26[ATM]: Fix IRQ flags type in lec_arp_expire_vccHerbert Xu
It should be unsigned long. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-20[ATM] stop using sk_protinfoArnaldo Carvalho de Melo
Required to introduce struct connection_sock. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-19Cset exclude: davem@nuts.davemloft.net|ChangeSet|20050120063740|10274David S. Miller
2005-01-19[NET]: Close NETIF_F_LLTX race conditions.David S. Miller
When drivers other than loopback were using the LLTX feature a race window was present. While sending queued packets, the packet scheduler layer drops the queue lock then calls directly into the drivers xmit handler. The driver then grabs it's private TX lock and goes to work. However, as soon as we've dropped the queue lock another thread doing TX processing for that card can execute a netif_stop_queue() due to the TX queue filling up. This race window causes problems because a properly coded driver should never end up in it's ->hard_start_xmit() handler if the queue on the device has been stopped and we even BUG() trap for this condition in all of the device drivers. That is how this race window was discovered by Roland and the Infiniband folks. Various suggestions were made to close this race. One of which involved holding onto the queue lock all the way into the ->hard_start_xmit() routine. Then having the driver drop that lock only after taking it's private TX lock. This solution was deemed grotty because it is not wise to put queueing discipline internals into the device drivers. The solution taken here, which is based upon ideas from Stephen Hemminger, is twofold: 1) Leave LLTX around for purely software devices that need no locking at all for TX processing. The existing example is loopback, although all tunnel devices could be converted in this way too. 2) Stop trying to use LLTX for the other devices. Instead achieve the same goal using a different mechanism. For #2, the thing we were trying to achieve with LLTX was to eliminate excess locking. We accomplish that now by letting the device driver use dev->xmit_lock directly instead of a seperate priv->tx_lock of some sort. In order to allow that, we had to turn dev->xmit_lock into a hardware IRQ disabling lock instead of a BH disabling one. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-17[ATM]: avoid race between svc_disconnect and sigd exitingChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-17[ATM]: change atm address functions to use list_addChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-17[ATM]: [lec] rewrite to eliminate lec_arp_users in favor of lec_arp_lockChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-13[NET]: Lock initializer cleanup.Thomas Gleixner
Use the new lock initializers DEFINE_SPIN_LOCk and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-11-25Merge bk://kernel.bkbits.net/davem/net-2.6Linus Torvalds
into ppc970.osdl.org:/home/torvalds/v2.6/linux
2004-11-23[ATM]: Handle register_netdevice_notifier() errors in mpc.cMaximilian Attems
Signed-off-by: walter harms <wharms@bfs.de> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-11-20[PATCH] misc __user annotationsAlexander Viro
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-11-09[NET]: Lock initializer unifyingAndrew Morton
From: <tglx@linutronix.de> To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-27[ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_closeChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-25[ATM]: Mark vcc_remove_socket staticChristoph Hellwig
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-20[ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil)Chas Williams
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-20[ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram()Chas Williams
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-05[SKBUFF] introduce eth_hdr(skb)Arnaldo Carvalho de Melo
This is the start of a series of patches to remove protocol specific stuff out of include/linux/skbuff.h and to make the struct sk_buff header pointers private, i.e. they will only be accessible thru foo_hdr(skb) and some other accessor functions. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@redhat.com>
2004-10-01[ATM]: Use neigh_table_{init,clear}() in clip.cDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-23[NET]: Convert neigh hashing over to jenkins.David S. Miller
Based upon work by Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-23[NET]: Apply NEIGH_HASHMASK at tbl->hash() caller.David S. Miller
Now there is no reason for any neigh implementation to know the value of {P,}NEIGH_HASHMASK Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-23[NET]: Abstract neigh table walking.David S. Miller
This way no code actually needs to traverse the neigh hash tables outside of net/core/neighbour.c Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-14[NET] NEIGHBOUR: save number of arguments for neigh_update() by flags.Hideaki Yoshifuji
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-09-06[NET]: Fully plug netigh_create/inetdev_destroy race.Herbert Xu
So here is a patch to make sure that there is a barrier between the reading of dev->*_ptr and *dev->neigh_parms. With these barriers in place, it's clear that *dev->neigh_parms can no longer be NULL since once the parms are allocated, that pointer is never reset to NULL again. Therefore I've also removed the parms check in these paths. They were bogus to begin with since if they ever triggered then we'll have dead neigh entries stuck in the hash table. Unfortunately I couldn't arrange for this to happen with DECnet due to the dn_db->parms.up() call that's sandwiched between the assignment of dev->dn_ptr and dn_db->neigh_parms. So I've kept the parms check there but it will now fail instead of continuing. I've also added an smp_wmb() there so that at least we won't be reading garbage from dn_db->neigh_parms. DECnet is also buggy since there is no locking at all in the destruction path. It either needs locking or RCU like IPv4. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-02[NET]: Add reference counting to neigh_parms.Herbert Xu
I've added a refcnt on neigh_parms as well as a dead flag. The latter is checked under the tbl_lock before adding a neigh entry to the hash table. The non-trivial bit of the patch is the first chunk of net/core/neighbour.c. I removed that line because not doing so would mean that I have to drop the reference to the parms right there. That would've lead to race conditions since many places dereference neigh->parms without holding locks. It's also unnecessary to reset n->parms since we're no longer in a hurry to see it go due to the new ref counting. You'll also notice that I've put all dereferences of dev->*_ptr under the rcu_read_lock(). Without this we may get a neigh_parms that's already been released. Incidentally a lot of these places were racy even before the RCU change. For example, in the IPv6 case neigh->parms may be set to a value that's just been released. Finally in order to make sure that all stale entries are purged as quickly as possible I've added neigh_ifdown/arp_ifdown calls after every neigh_parms_release call. In many cases we now have multiple calls to neigh_ifdown in the shutdown path. I didn't remove the earlier calls because there may be hidden dependencies for them to be there. Once the respective maintainers have looked at them we can probably remove most of them. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-08-25[PATCH] mpoa warning fixAlexander Viro
Forgot to switch return type from ssize_t to int when switching to seq_file Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-23Merge bk://kernel.bkbits.net/davem/net-2.6Linus Torvalds
into ppc970.osdl.org:/home/torvalds/v2.6/linux
2004-08-22[PATCH] remove dead prototypesCarl Spalletta
Remove a whole bunch of prototypes which declare no-longer-present functions. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-15[ATM]: Missing static in atm.Christoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-07[PATCH] mpoa patch done rightAlexander Viro
- conversion to seq_file, overflow fixes - qos_parse sanitized (3 sscanf calls instead of insane manual parsing) leaks plugged code cleaned up We still have serious races, but they are general problem in atm code - it has no locking whatsoever for any of the lists (mpcs, qos_head, per-client lists).
2004-07-27[ATM]: [lec] remove unnecessary inlines (from Adrian Bunk <bunk@fs.tum.de>)Chas Williams
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-26[PATCH] pointer-to-int conversion fixesAlexander Viro
Assorted pointer-to-int fixes: a) some places want to take pointer modulo alignment or extract integer that was cast to pointer (which is legitimate), but do that via wrong cast, triggering sparse warnings. b) usual %x (int)ptr -> %p ptr fixes Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-21[ATM]: Update Marko Kiiskila's email address.David S. Miller
2004-07-21[ATM]: use try_module_get appropriately (from Stephen Hemminger ↵Chas Williams
<shemminger@osdl.org>)
2004-07-12[PATCH] sparse: net/* NULL noise removalAlexander Viro
2004-06-26[ATM]: fix sparse checker warnings (by Stephen Hemminger <shemminger@osdl.org>)Chas Williams
2004-06-23[ATM]: In proc_mpc_read, make length ssize_t.David S. Miller
2004-06-03[PATCH] sparse: atm annotation (core)Alexander Viro
ATM core annotated; ATM drivers will go in the next patch, here we only annotated their method prototypes
2004-05-30[PATCH] sparse: missed piece of sock_get_timestamp() annotationAlexander Viro
2004-05-29[PATCH] sparse: ->[gs]etsockopt() annotationAlexander Viro
optval (and in case of getsockopt - optlen) made __user, changes percolated down into the instances.