Commit Graph

99 Commits

Author SHA1 Message Date
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
sobomax
f6cebc0606 Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoid
breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in
SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's.

Reviewed by:	-hackers, -net
2002-08-18 07:05:00 +00:00
arr
fc63b01c87 - Remove UM_* user land memory macros since they are no longer used. 2002-06-24 22:31:17 +00:00
arr
a9c60c7d01 - Remove DMA_* macros as only one, DMA_GET_ADDR, was used.
- Convert DMA_GET_ADDR() calls to vtophys() calls in order to finish
  removing the DMA_* macros.
2002-06-24 05:03:44 +00:00
arr
931ac795e1 - Remove the definition for SCHED_ATM
- Change SCHED_ATM statements into schednetisr() calls.
2002-06-24 04:10:12 +00:00
arr
325fb576a6 - Turn a DIAGNOSTIC check into a KASSERT(9). 2002-06-17 06:10:17 +00:00
arr
a229b7d3a3 - Turn a DIAGNOSTIC check into a KASSERT(9) macro. 2002-06-17 06:00:20 +00:00
arr
873ec67f04 - Explicitly pass M_WAITOK in a few calls to uma_zalloc(9). 2002-06-17 05:57:37 +00:00
arr
399bacf14b - Chainsaw the storage pool code. This was being used by a bunch of code
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.
2002-06-14 19:31:07 +00:00
arr
ddf3317bec - Turn the hea and hfa HARP storage pools into UMA zones and insert
the necesary uma_zcreate() and uma_zdestroy calls into module loading
  handler and the device attach handling.
- Change the related HARP netatm code to use UMA zone functions when
  dealing with the zones that were formerly the ATM interface (hea, hfa)
  storage pools.
- Have atm_physif_freenifs() now get passed an uma_zone_t so that we can
  properly free the allocated NIF's back to their zone.

This should be the last commit to remove any code that makes use of the
netatm storage pool api.  I will be removing the api code within the near
future.

Reviewed by:	mdodd
2002-06-14 16:59:38 +00:00
arr
1471410889 - Finish the uni part of the storage pool cleanup. There should now only
be a few bits left to clean from the HARP code in terms of what is using
  the storage pools; once that's done, the memory management code can be
  removed entirely.

  This commit effectively changes the use of dynamic memory routines from
  atm_allocate, atm_free, atm_release_pool to uma_zcreate, uma_zalloc,
  uma_zfree, uma_zdestroy.
2002-06-13 14:32:51 +00:00
mdodd
355983613b Use a larger data type to prevent counters wrapping so quickly.
Silence a warning.
2002-06-07 05:29:13 +00:00
tanimura
e6fa9b9e92 Back out my lats commit of locking down a socket, it conflicts with hsu's work.
Requested by:	hsu
2002-05-31 11:52:35 +00:00
peter
ccccf52bbe Pacify gcc by preinitializing a variable. 2002-05-24 06:17:42 +00:00
peter
962a6ce9c8 Fix a few warnings by adding a missing prototype 2002-05-24 06:17:17 +00:00
arr
0239286d2c - Remove a few storage pools and replace them with UMA zones. The spans
code is now storage pool free, so I believe this only leaves the uni
  base not cleaned.
2002-05-24 00:39:58 +00:00
arr
d756e3ff88 - Turn a couple of storage pools into UMA zones and their associated calls
to the appropriate UMA api calls.
2002-05-24 00:38:25 +00:00
arr
13ab9fa614 - Fix uma_zcreate parameters -- don't pass M_* flags here, doh. 2002-05-23 23:21:00 +00:00
arr
4fe0504ac9 - Turn two more storage pools into UMA zones and make the related memory
allocations and frees use the UMA api.
2002-05-23 00:34:12 +00:00
tanimura
92d8381dd5 Lock down a socket, milestone 1.
o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a
  socket buffer. The mutex in the receive buffer also protects the data
  in struct socket.

o Determine the lock strategy for each members in struct socket.

o Lock down the following members:

  - so_count
  - so_options
  - so_linger
  - so_state

o Remove *_locked() socket APIs.  Make the following socket APIs
  touching the members above now require a locked socket:

 - sodisconnect()
 - soisconnected()
 - soisconnecting()
 - soisdisconnected()
 - soisdisconnecting()
 - sofree()
 - soref()
 - sorele()
 - sorwakeup()
 - sotryfree()
 - sowakeup()
 - sowwakeup()

Reviewed by:	alfred
2002-05-20 05:41:09 +00:00
arr
51bcef4eb2 - Remove the init routine for loop -- it broke something and I don't have
the time to fix it properly at the moment.
2002-05-07 20:50:10 +00:00
arr
e98eeb7929 - Use an array of init functions to be used in a for loop in our
initialization routine.
2002-05-07 20:37:40 +00:00
arr
3ee655b971 - Add atm_init_fn 2002-05-07 20:36:35 +00:00
arr
a4e47caebb - Add atm_sock_init()
- Move the Atm_pcb storage pool (atm_pcb_pool) to be an UMA zone.
2002-05-07 20:13:55 +00:00
arr
c73ea9d79b - Change the atm_cm_init function to take no argument. 2002-05-07 20:12:29 +00:00
arr
de0c0b47fe - Replaced the Atm_connection storage pool with an uma_zone of
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).
2002-05-02 07:27:29 +00:00
arr
009ce05bfe - Take advantage of the M_ZERO flag that can now be passed to uma_zalloc.
- Remove atm_uma_ctor() as the M_ZERO will zero out the memory for us.
2002-04-30 07:41:59 +00:00
tanimura
89ec521d91 Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.
Requested by:	bde

Since locking sigio_lock is usually followed by calling pgsigio(),
move the declaration of sigio_lock and the definitions of SIGIO_*() to
sys/signalvar.h.

While I am here, sort include files alphabetically, where possible.
2002-04-30 01:54:54 +00:00
arr
d2d3484465 - Tweak wording of panic message to make more sense. 2002-04-24 22:32:48 +00:00
arr
34c9517fb0 - Turn the atm_stackq_pool into a uma_zone (and change it's name to
atm_stackq_zone).
- Change the related atm_allocate() and atm_free() calls into uma_zalloc()
  and uma_zfree() calls.
2002-04-24 20:56:23 +00:00
arr
35e5b8d0de - Remove atm_attributes_pool and the relating atm_allocate() and atm_free()
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.
2002-04-24 18:06:18 +00:00
arr
b148c4db98 - Revert previous change of atm storage pools -> uma_zones until a solution
to atm_free() is written.
2002-04-22 18:26:05 +00:00
arr
9570c296c3 - Change the atm_attributes_pool and atm_stackq_pool to be uma_zone's
(with the appropriate set_max) rather than using the HARP storage pool
  code.
2002-04-22 05:11:44 +00:00
arr
ab6fdd245b - Nuke some more not needed #ifdef cruft. 2002-04-21 01:41:05 +00:00
arr
6fd993af4d - Create a ``zero fill'' constructor for uma_zcreate's ctor argument.
Inspired by: jake@
2002-04-20 09:04:58 +00:00
arr
d5c7cd00fd - Nuke small sgi ifdef bits. 2002-04-20 00:39:32 +00:00
arr
96e8895af5 - Nuke some more #ifdef sun related sections. 2002-04-19 21:38:43 +00:00
arr
40a938fb61 - Nuke some #ifdef sun4m code; it hasn't been updated in 4 years and is not
being used.
2002-04-19 20:02:03 +00:00
arr
122c24db48 - Change KM_ macro calls to the appropriate function call.
- 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.
2002-04-19 17:45:22 +00:00
mdodd
ada2b95a74 Fix missing commas. 2002-04-17 16:12:24 +00:00
mdodd
22ef639eab Remove a stray comment terminator that was hiding beyond 80 columns. 2002-04-17 07:04:58 +00:00
mdodd
27dbe32723 - Add defines for ABR and UBR traffic types.
- Add IDT bits to vendor/vendorapi/device enums.
- Add EISA to atm_bus enum.
2002-04-17 07:00:56 +00:00
mdodd
8296d838e2 Wrap function in #ifdef DIAGNOSTIC to compile with -Werror. 2002-04-17 00:30:38 +00:00
mdodd
5a47ea7645 Add ESA200 to enum atm_device. 2002-04-17 00:30:06 +00:00
jhb
db9aa81e23 Change callers of mtx_init() to pass in an appropriate lock type name. In
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
2002-04-04 21:03:38 +00:00
jhb
dc2e474f79 Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
alfred
c61e01af35 Remove __P. 2002-03-20 08:00:54 +00:00
alfred
8c4c86de23 Remove __P. 2002-03-20 02:39:27 +00:00
julian
92a8c56dd6 Unbreak fore adapters from POV of warnings.
Define the atm_dev_free() routine so that its OK to free stuff that is defined
as volatile. Note this doesn't FORCE the arguemnts to be volatile,
just says that it's not an error if it is..
2002-02-27 21:12:44 +00:00
mjacob
f5604f2085 Replace a few more lines of code orphaned by MFREE going away.
MFC after:	1 day
2002-02-07 22:08:32 +00:00