summaryrefslogtreecommitdiffstats
path: root/sys/netatm/atm_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't remove the first mbuf in the chain if it got empty.harti2004-02-211-7/+6
| | | | | | | | This removes the packet header in certain cases which later on will give panic. Clarify what the atm_intr expects in the comment and de-obscurify the code a little bit by replacing the portability macros with the BSD names. The code isn't maintained externally anymore so there's no point in keeping the extra level of obscurity.
* o add a flags parameter to netisr_register that is used to specifysam2003-11-081-1/+3
| | | | | | | | | | | | | | | | whether or not the isr needs to hold Giant when running; Giant-less operation is also controlled by the setting of debug_mpsafenet o mark all netisr's except NETISR_IP as needing Giant o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant o pickup Giant (when debug_mpsafenet is 1) inside ip_input before calling up with a packet o change netisr handling so swi_net runs w/o Giant; instead we grab Giant before invoking handlers based on whether the handler needs Giant o change netisr handling so that netisr's that are marked MPSAFE may have multiple instances active at a time o add netisr statistics for packets dropped because the isr is inactive Supported by: FreeBSD Foundation
* Create a subtree 'harp' of the net sysctl tree. This uses a fixedharti2003-07-241-3/+22
| | | | | | | | | OID as the other protocol family sub-trees do, that is equal to the protocol family identifier. Make the ATM layer debugging flags available under this tree. Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Constify the arguments to several pdu_print functions.harti2003-07-241-7/+4
|
* Remove the zone limits for all the zones used in the ATM code.harti2003-07-221-2/+0
| | | | | | | | | | | These were a left over from when the private memory pools were converted to use uma zones. The limit of UMA zones, however, works differently. When a zone is limited to only one or two pages than, on multi-cpu systems, processes can get stuck on the zonelimit, because all remaining free items are in caches of other CPUs. Also add rudimentary error handling in some places (panic) when a zone cannot be created.
* Fix a number of occurences of calling uma_zalloc() with neitherharti2003-07-181-1/+1
| | | | M_WAITOK nor M_NOWAIT.
* Use __FBSDID().obrien2003-06-111-10/+3
|
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-041-43/+28
| | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
* - Change the ATM stack functions to use intptr_t instead of int for opaquejhb2002-11-081-3/+3
| | | | | | | arguments. - Fix a few other places that assumed that sizeof(int) == sizeof(void *). Reviewed by: mdodd
* - Turn a DIAGNOSTIC check into a KASSERT(9).arr2002-06-171-4/+1
|
* - Chainsaw the storage pool code. This was being used by a bunch of codearr2002-06-141-345/+1
| | | | | | within the HARP atm stack and the hea and hfa device drivers, but since all of these systems were changed to use UMA zones, there is no use for the api any longer.
* - Remove the init routine for loop -- it broke something and I don't havearr2002-05-071-11/+4
| | | | the time to fix it properly at the moment.
* - Use an array of init functions to be used in a for loop in ourarr2002-05-071-4/+11
| | | | initialization routine.
* - Add atm_sock_init()arr2002-05-071-1/+2
| | | | - Move the Atm_pcb storage pool (atm_pcb_pool) to be an UMA zone.
* - Replaced the Atm_connection storage pool with an uma_zone ofarr2002-05-021-0/+1
| | | | | | | | | | Atm_connection items. - Replaced the Atm_connvc storage pool with an uma_zone of Atm_connvc items. - Created void atm_cm_init(void *) and added it to the netatm init code. I'm thinking that there will definetly be more ``subsystem'' init functions to be added so I'll probably change these calls to be a for loop through init routines (or something).
* - Take advantage of the M_ZERO flag that can now be passed to uma_zalloc.arr2002-04-301-13/+3
| | | | - Remove atm_uma_ctor() as the M_ZERO will zero out the memory for us.
* - Tweak wording of panic message to make more sense.arr2002-04-241-2/+2
|
* - Turn the atm_stackq_pool into a uma_zone (and change it's name toarr2002-04-241-9/+9
| | | | | | atm_stackq_zone). - Change the related atm_allocate() and atm_free() calls into uma_zalloc() and uma_zfree() calls.
* - Remove atm_attributes_pool and the relating atm_allocate() and atm_free()arr2002-04-241-7/+8
| | | | | | | | calls associated with the pool and the objects allocated out from the pool. - Insert atm_attributes_zone which is a uma_zone that is used just as the atm_attributes_pool was (including the max objects value). Also, used the appropriate zalloc and zfree's where necesary.
* - Revert previous change of atm storage pools -> uma_zones until a solutionarr2002-04-221-14/+15
| | | | to atm_free() is written.
* - Change the atm_attributes_pool and atm_stackq_pool to be uma_zone'sarr2002-04-221-15/+14
| | | | | (with the appropriate set_max) rather than using the HARP storage pool code.
* - Create a ``zero fill'' constructor for uma_zcreate's ctor argument.arr2002-04-201-0/+10
| | | | Inspired by: jake@
* - Nuke small sgi ifdef bits.arr2002-04-201-6/+0
|
* - Change KM_ macro calls to the appropriate function call.arr2002-04-191-9/+4
| | | | | | | - Nuke KM_ macros from port.h This is a leadin step towards cleaning up this code as I wait for some ATM cards and a ATM switch to arrive.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Remove __P.alfred2002-03-201-5/+5
|
* Allow this to compile againjulian2002-01-301-0/+1
| | | | not tested under LINT by: msmith
* Initialise the intrq_present fields at runtime, not link time. This allowsmsmith2002-01-081-2/+2
| | | | | | us to load protocols at runtime, and avoids the use of common variables. Also fix the ip6_intrq assignment so that it works at all.
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-0/+1
| | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
* Add back some #include <sys/systm.h> which were needed when <sys/ktr.h>phk2000-10-301-0/+1
| | | | | | doesn't mess us up. Noted by: Harti Brandt <brandt@fokus.gmd.de>
* Remove more unused #includes.phk2000-10-271-2/+0
|
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Remove the #include kitchensink <netatm/kern_include.h> and addphk2000-10-121-2/+22
| | | | | | | | | the #includes to the respective source files. Also un-nest includes in <dev/hfa/fore_include.h> I have run src/tools/tools/kerninclude to remove 1239 clearly unneeded #includes reducing the total from 3524 includes to 2285.
* Do some cleanups of the HARP atm codes interface into the system:phk2000-10-121-8/+0
| | | | | | | | Define the NETISR just like all the other NETISRs. unifdef -Usun -D__FreeBSD__ we will probably never support sun4c and if we do we can't use the solaris code anyway and I doubt anybody will be running Fore ATM cards in then in the first place.
* Clean up some loose ends in the network code, including the X.25 and ISOpeter2000-02-131-4/+3
| | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
* Move the *intrq variables into net/intrq.c and unconditionallybrian2000-01-241-1/+2
| | | | | | | | | | | include this in all kernels. Declare some const *intrq_present variables that can be checked by a module prior to using *intrq to queue data. Make the if_tun module capable of processing atm, ip, ip6, ipx, natm and netatalk packets when TUNSIFHEAD is ioctl()d on. Review not required by: freebsd-hackers
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-3/+3
| | | | kernel compile
* Trivial stylish changes, mostly to silence gcc.phk1998-10-311-4/+4
| | | | | Reviewed by: Mike Spengler <mks@networkcs.com> Submitted by: phk
* Two patches from the HARP people:phk1998-09-171-4/+4
| | | | | | | | Various Makefile related fixes. -Wformat fixes. Submitted by: Mike Spengler <mks@networkcs.com>
* Add new files for HARP3phk1998-09-151-0/+970
Host ATM Research Platform (HARP), Network Computing Services, Inc. This software was developed with the support of the Defense Advanced Research Projects Agency (DARPA).
OpenPOWER on IntegriCloud