summaryrefslogtreecommitdiff
path: root/drivers/net/shaper.c
AgeCommit message (Collapse)Author
2008-01-28[SHAPER]: The scheduled shaper removal.Adrian Bunk
This patch contains the scheduled removal of the shaper driver. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Move hardware header operations out of netdevice.Stephen Hemminger
Since hardware header operations are part of the protocol class not the device instance, make them into a separate object and save memory. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET] drivers/net: statistics cleanup #1 -- save memory and shrink codeJeff Garzik
We now have struct net_device_stats embedded in struct net_device, and the default ->get_stats() hook does the obvious thing for us. Run through drivers/net/* and remove the driver-local storage of statistics, and driver-local ->get_stats() hook where applicable. This was just the low-hanging fruit in drivers/net; plenty more drivers remain to be updated. [ Resolved conflicts with napi_struct changes and fix sunqe build regression... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Make the device list and device lookups per namespace.Eric W. Biederman
This patch makes most of the generic device layer network namespace safe. This patch makes dev_base_head a network namespace variable, and then it picks up a few associated variables. The functions: dev_getbyhwaddr dev_getfirsthwbytype dev_get_by_flags dev_get_by_name __dev_get_by_name dev_get_by_index __dev_get_by_index dev_ioctl dev_ethtool dev_load wireless_process_ioctl were modified to take a network namespace argument, and deal with it. vlan_ioctl_set and brioctl_set were modified so their hooks will receive a network namespace argument. So basically anthing in the core of the network stack that was affected to by the change of dev_base was modified to handle multiple network namespaces. The rest of the network stack was simply modified to explicitly use &init_net the initial network namespace. This can be fixed when those components of the network stack are modified to handle multiple network namespaces. For now the ifindex generator is left global. Fundametally ifindex numbers are per namespace, or else we will have corner case problems with migration when we get that far. At the same time there are assumptions in the network stack that the ifindex of a network device won't change. Making the ifindex number global seems a good compromise until the network stack can cope with ifindex changes when you change namespaces, and the like. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-19some kmalloc/memset ->kzalloc (tree wide)Yoann Padioleau
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) [akpm@linux-foundation.org: get kcalloc args the right way around] Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Bryan Wu <bryan.wu@analog.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Acked-by: Roland Dreier <rolandd@cisco.com> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: Pierre Ossman <drzeus-list@drzeus.cx> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Acked-by: Greg KH <greg@kroah.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-09-13drivers/net: Trim trailing whitespaceJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-17[PATCH] drivers/net/*: use time_after() and friendsMarcelo Feitoza Parisi
They deal with wrapping correctly and are nicer to read. Also make jiffies-holding variables unsigned long. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-29[NET]: Kill skb->listDavid S. Miller
Remove the "list" member of struct sk_buff, as it is entirely redundant. All SKB list removal callers know which list the SKB is on, so storing this in sk_buff does nothing other than taking up some space. Two tricky bits were SCTP, which I took care of, and two ATM drivers which Francois Romieu <romieu@fr.zoreil.com> fixed up. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2005-07-05[SHAPER]: Switch to spinlocks.Christoph Hellwig
Dave, you were right and the sleeping locks in shaper were broken. Markus Kanet noticed this and also tested the patch below that switches locking to spinlocks. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-02[NET]: Fix locking in shaper driver.Christoph Hellwig
o use a semaphore instead of an opencoded and racy lock o move locking out of shaper_kick and into the callers - most just released the lock before calling shaper_kick o remove in_interrupt() tests. from ->close we can always block, from ->hard_start_xmit and timer context never Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-02-20[PATCH] drivers/net/shaper.c: make a variable staticAdrian Bunk
On Fri, Feb 18, 2005 at 07:18:19PM -0500, Jeff Garzik wrote: > Adrian Bunk wrote: > >This patch contains the following cleanups: > >- remove an unused #define SHAPER_BANNER > >- remove the sh_debug flag > > > >Signed-off-by: Adrian Bunk <bunk@stusta.de> > > you are removing presumably-useful debug code; NAK. OK, less invasive patch below. <-- snip --> This patch makes a needlessly global variable static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-01-07[PATCH] MODULE_PARM conversionsAndrew Morton
Rusty Russell <rusty@rustcorp.com.au> MODULE_PARM conversions for x86 `allmodconfig'. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-06-04[PATCH] sparse: the rest of ifr_data cleanups and annotationsAlexander Viro
The rest of ->ifr_data cleanups. A bunch of drivers use address of ifr->ifr_ifru, but spell that as &ifr->ifr_data, which expands to &ifr->ifr_ifru.ifru_data. ifr_ifru is a union and in effect they sneak in a private field into that union; ifr_ifru.ifru_data is a field in that union and it has nothing to do with the things they want to do. Cleaned up by explicit use of &ifr->ifr_ifru. Several places where we really use ->ifr_data (i.e. use its value and use it as __user pointer) annotated.
2004-01-10[netdrvr shaper] fix double-freeAlexander Viro
Fix for double-free (we do explicit free_netdev() after unregister_netdev() in shaper.c)
2004-01-10[PATCH] 2.6.0-test6 - more free_netdev() conversionFrançois Romieu
Compiles ok (with true .o generated, yeah). Please review. free_netdev() of devices allocated through use of alloc_netdev(). Though baroque, drivers/net/3c515.c now uses alloc_etherdev(). drivers/net/3c515.c | 23 ++++++++++++----------- drivers/net/defxx.c | 2 +- drivers/net/dummy.c | 2 +- drivers/net/eql.c | 2 +- drivers/net/ns83820.c | 2 +- drivers/net/plip.c | 14 ++++++++++---- drivers/net/shaper.c | 11 ++++++++--- drivers/net/tun.c | 18 +++++++++--------- 9 files changed, 43 insertions(+), 31 deletions(-)
2003-08-19[NET]: free_netdev - destructors.Stephen Hemminger
Drivers that use kfree in destructor are easily converted to use free_netdev.
2003-06-16[NET]: alloc_netdev for shaper.Stephen Hemminger
2003-04-02[SHAPER]: Fix time_before_eq args.David S. Miller
2003-03-04[PATCH] Fix time comparison typing bugs.David S. Miller
Many places use inappropriate types for comparing jiffies, int for example. Fix those places up.
2003-02-15[PATCH] 2.5.61 Reduce the number of "nuber" by four.Steven Cole
This reduces the number of "nuber" by four and fixes the spelling of necessary in one of those files.
2002-12-07[SHAPER]: Make shapers_registers actually visible to shaper_exit.David S. Miller
2002-12-05[PATCH] net_shaper.c wrong variable on exitRusty Russell
From: Marcus Alanen <maalanen@ra.abo.fi> "shapers_registered" is the amount of netdevices registered, "shapers" is the amount of shapers we try to initialize.
2002-11-21o drivers/net: fix up header cleanup: remove unneeded sched.h includesArnaldo Carvalho de Melo
2002-08-18Remove extraneous ptrace.h includeLinus Torvalds
2002-02-05v2.5.1.11 -> v2.5.2Linus Torvalds
- Matt Domsch: combine common crc32 library - Pete Zaitcev: ymfpci update - Davide Libenzi: scheduler improvements - Al Viro: almost there: "struct block_device *" everywhere - Richard Gooch: devfs cpqarray update, race fix - Rusty Russell: PATH_MAX should include the final '0' count - David Miller: various random updates (mainly net and sparc)
2002-02-04v2.4.10.1 -> v2.4.10.2Linus Torvalds
- me/Al Viro: fix bdget() oops with block device modules that don't clean up after they exit - Alan Cox: continued merging (drivers, license tags) - David Miller: sparc update, network fixes - Christoph Hellwig: work around broken drivers that add a gendisk more than once - Jakub Jelinek: handle more ELF loading special cases - Trond Myklebust: NFS client and lockd reclaimer cleanups/fixes - Greg KH: USB updates - Mikael Pettersson: sparate out local APIC / IO-APIC config options
2002-02-04v2.4.5.5 -> v2.4.5.6Linus Torvalds
- Jeff Garzik: net driver updates, PCI PM induced cleanups - Me: do ACPI first, so that it doesn't mess up existing device driver configurations. Notably it used to completely destroy PCMCIA on some Sony VAIOs. - Paul Mackerras: powermac drivers and MAINTAINERS update - NIIBE Yutaka: SuperH update - Johannes Erdfelt: USB driver updates - Russell King: ARM update - Alan Cox: merging, merging, merging
2002-02-04v2.4.5.3 -> v2.4.5.4Linus Torvalds
- Chris Mason: ReiserFS pre-allocation locking bugfix - David Miller: fix bitops users (requires "long" alignment) - Andrey Savochkin: file locking failure case SMP lock fix - Urban Widmark: smbfs update (avoid unnecessary flushing, make NetApp work) - Andrew Grover: ACPI update - Jeff Garzik: network driver updates - Maciej Rozycki: IO-APIC level trigger problem workaround - Rusty Russell: ipt_unclean fix - Richard Gooch: devfs update
2002-02-04v2.4.3.4 -> v2.4.3.5Linus Torvalds
- Mike Phillips: olympic driver update - Alan Cox: continued resyncing (lots of small stuff, big NTFS merge from Anton) - Martin Dalecki: cleanup (remove unused and unnecessary get_hardblocksize) - Chris Mason: fix potential reiserfs journal overflow - Jeff Garzik: network driver updates - David Miller: sparc fixes, some network cleanups
2002-02-04v2.4.1.3 -> v2.4.1.4Linus Torvalds
- big S/390x 64-bit merge - typos and license name fixes. doc updates. - more include file cleanups (phase out "malloc.h") - even more elevator corner cases.. When not merging, find the best insertion point. - pmac ide update - network fixes (netif_wake_queue on tx timeout) - USB printer select() fix - NFS client missed initialization, deamon fixed client address check
2002-02-04Import changesetLinus Torvalds